41 |
* * |
* * |
42 |
* Revision history: * |
* Revision history: * |
43 |
* * |
* * |
44 |
* 26.03.2002 interlacing support |
* 15.04.2002 rewrite log2bin use asm386 By MinChen <chenm001@163.com> * |
45 |
|
* 26.03.2002 interlacing support * |
46 |
* 03.03.2002 qmatrix writing * |
* 03.03.2002 qmatrix writing * |
47 |
* 03.03.2002 merged BITREADER and BITWRITER * |
* 03.03.2002 merged BITREADER and BITWRITER * |
48 |
* 30.02.2002 intra_dc_threshold support * |
* 30.02.2002 intra_dc_threshold support * |
56 |
#include "zigzag.h" |
#include "zigzag.h" |
57 |
#include "../quant/quant_matrix.h" |
#include "../quant/quant_matrix.h" |
58 |
|
|
59 |
|
|
60 |
static int __inline log2bin(int value) |
static int __inline log2bin(int value) |
61 |
{ |
{ |
62 |
|
/* Changed by Chenm001 */ |
63 |
|
#ifndef WIN32 |
64 |
int n = 0; |
int n = 0; |
65 |
while (value) |
while (value) |
66 |
{ |
{ |
68 |
n++; |
n++; |
69 |
} |
} |
70 |
return n; |
return n; |
71 |
|
#else |
72 |
|
__asm{ |
73 |
|
bsr eax,value |
74 |
|
inc eax |
75 |
|
} |
76 |
|
#endif |
77 |
} |
} |
78 |
|
|
79 |
|
|
294 |
|
|
295 |
} |
} |
296 |
|
|
297 |
if (dec->interlacing = BitstreamGetBit(bs)) |
if ((dec->interlacing = BitstreamGetBit(bs))) |
298 |
{ |
{ |
299 |
DEBUG("vol: interlacing"); |
DEBUG("vol: interlacing"); |
300 |
} |
} |
528 |
|
|
529 |
if (dec->interlacing) |
if (dec->interlacing) |
530 |
{ |
{ |
531 |
if (dec->top_field_first = BitstreamGetBit(bs)) |
if ((dec->top_field_first = BitstreamGetBit(bs))) |
532 |
{ |
{ |
533 |
DEBUG("vop: top_field_first"); |
DEBUG("vop: top_field_first"); |
534 |
} |
} |
535 |
if (dec->alternate_vertical_scan = BitstreamGetBit(bs)) |
if ((dec->alternate_vertical_scan = BitstreamGetBit(bs))) |
536 |
{ |
{ |
537 |
DEBUG("vop: alternate_vertical_scan"); |
DEBUG("vop: alternate_vertical_scan"); |
538 |
} |
} |