|
|
| |
data_section | data_section |
| |
cextern FLAC__crc16_table ; unsigned FLAC__crc16_table[256]; |
|
cextern bitreader_read_from_client_ ; FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br); | cextern bitreader_read_from_client_ ; FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br); |
| |
cglobal FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap | cglobal FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap |
|
Lines 44-50
cglobal FLAC__bitreader_read_rice_signed
|
Link Here
|
|---|
|
| |
; ********************************************************************** | ; ********************************************************************** |
; | ; |
; void FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter) |
; void FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter, unsigned crc16[]) |
; | ; |
; Some details like assertions and other checking is performed by the caller. | ; Some details like assertions and other checking is performed by the caller. |
ALIGN 16 | ALIGN 16 |
|
Lines 58-63
cident FLAC__bitreader_read_rice_signed_
|
Link Here
|
|---|
|
; the above two asserts also guarantee that the binary part never straddles more than 2 words, so we don't have to loop to read it | ; the above two asserts also guarantee that the binary part never straddles more than 2 words, so we don't have to loop to read it |
| |
;; peppered throughout the code at major checkpoints are keys like this as to where things are at that point in time | ;; peppered throughout the code at major checkpoints are keys like this as to where things are at that point in time |
|
;; [esp + 20] unsigned crc16[] |
;; [esp + 16] unsigned parameter | ;; [esp + 16] unsigned parameter |
;; [esp + 12] unsigned nvals | ;; [esp + 12] unsigned nvals |
;; [esp + 8] int vals[] | ;; [esp + 8] int vals[] |
|
Lines 137-147
cident FLAC__bitreader_read_rice_signed_
|
Link Here
|
|---|
|
bswap edx ; edx = br->buffer[cwords] swapped; now we can CRC the bytes from LSByte to MSByte which makes things much easier | bswap edx ; edx = br->buffer[cwords] swapped; now we can CRC the bytes from LSByte to MSByte which makes things much easier |
mov ecx, [ebp + 28] ; ecx <- br->crc16_align | mov ecx, [ebp + 28] ; ecx <- br->crc16_align |
mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc) | mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc) |
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE |
mov edi, [esp + 20] ; edi <- FLAC__crc16_table |
mov edi, _FLAC__crc16_table |
|
%else |
|
mov edi, FLAC__crc16_table |
|
%endif |
|
;; eax (ax) crc a.k.a. br->read_crc | ;; eax (ax) crc a.k.a. br->read_crc |
;; ebx (bl) intermediate result index into FLAC__crc16_table[] | ;; ebx (bl) intermediate result index into FLAC__crc16_table[] |
;; ecx br->crc16_align | ;; ecx br->crc16_align |
|
Lines 213-223
cident FLAC__bitreader_read_rice_signed_
|
Link Here
|
|---|
|
bswap edx ; edx = br->buffer[cwords] swapped; now we can CRC the bytes from LSByte to MSByte which makes things much easier | bswap edx ; edx = br->buffer[cwords] swapped; now we can CRC the bytes from LSByte to MSByte which makes things much easier |
mov ecx, [ebp + 28] ; ecx <- br->crc16_align | mov ecx, [ebp + 28] ; ecx <- br->crc16_align |
mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc) | mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc) |
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE |
mov edi, [esp + 20] ; edi <- FLAC__crc16_table |
mov edi, _FLAC__crc16_table |
|
%else |
|
mov edi, FLAC__crc16_table |
|
%endif |
|
;; eax (ax) crc a.k.a. br->read_crc | ;; eax (ax) crc a.k.a. br->read_crc |
;; ebx (bl) intermediate result index into FLAC__crc16_table[] | ;; ebx (bl) intermediate result index into FLAC__crc16_table[] |
;; ecx br->crc16_align | ;; ecx br->crc16_align |
|
Lines 315-322
cident FLAC__bitreader_read_rice_signed_
|
Link Here
|
|---|
|
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE |
call _bitreader_read_from_client_ | call _bitreader_read_from_client_ |
%else | %else |
|
%ifdef OBJ_FORMAT_elf |
|
call bitreader_read_from_client_ wrt ..plt |
|
%else |
call bitreader_read_from_client_ | call bitreader_read_from_client_ |
%endif | %endif |
|
%endif |
pop edx ; /* discard, unused */ | pop edx ; /* discard, unused */ |
pop ecx ; /* restore */ | pop ecx ; /* restore */ |
mov esi, [ebp + 16] ; cwords = br->consumed_words; | mov esi, [ebp + 16] ; cwords = br->consumed_words; |
|
Lines 366-373
cident FLAC__bitreader_read_rice_signed_
|
Link Here
|
|---|
|
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE | %ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE |
call _bitreader_read_from_client_ | call _bitreader_read_from_client_ |
%else | %else |
|
%ifdef OBJ_FORMAT_elf |
|
call bitreader_read_from_client_ wrt ..plt |
|
%else |
call bitreader_read_from_client_ | call bitreader_read_from_client_ |
%endif | %endif |
|
%endif |
pop edx ; /* discard, unused */ | pop edx ; /* discard, unused */ |
pop ecx ; /* restore */ | pop ecx ; /* restore */ |
mov esi, [ebp + 16] ; cwords = br->consumed_words; | mov esi, [ebp + 16] ; cwords = br->consumed_words; |
|
Lines 434-444
cident FLAC__bitreader_read_rice_signed_
|
Link Here
|
|---|
|
bswap edx ; edx = br->buffer[cwords] swapped; now we can CRC the bytes from LSByte to MSByte which makes things much easier | bswap edx ; edx = br->buffer[cwords] swapped; now we can CRC the bytes from LSByte to MSByte which makes things much easier |
mov ecx, [ebp + 28] ; ecx <- br->crc16_align | mov ecx, [ebp + 28] ; ecx <- br->crc16_align |
mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc) | mov eax, [ebp + 24] ; ax <- br->read_crc (a.k.a. crc) |
%ifdef FLAC__PUBLIC_NEEDS_UNDERSCORE |
mov edi, [esp + 20] ; edi <- FLAC__crc16_table |
mov edi, _FLAC__crc16_table |
|
%else |
|
mov edi, FLAC__crc16_table |
|
%endif |
|
;; eax (ax) crc a.k.a. br->read_crc | ;; eax (ax) crc a.k.a. br->read_crc |
;; ebx (bl) intermediate result index into FLAC__crc16_table[] | ;; ebx (bl) intermediate result index into FLAC__crc16_table[] |
;; ecx br->crc16_align | ;; ecx br->crc16_align |