--- bitstream.c 2002/03/26 11:16:08 1.4 +++ bitstream.c 2002/04/16 00:17:35 1.6 @@ -40,8 +40,9 @@ /****************************************************************************** * * * Revision history: * - * * - * 26.03.2002 interlacing support + * * + * 15.04.2002 rewrite log2bin use asm386 By MinChen * + * 26.03.2002 interlacing support * * 03.03.2002 qmatrix writing * * 03.03.2002 merged BITREADER and BITWRITER * * 30.02.2002 intra_dc_threshold support * @@ -55,8 +56,11 @@ #include "zigzag.h" #include "../quant/quant_matrix.h" + static int __inline log2bin(int value) { +/* Changed by Chenm001 */ +#ifndef WIN32 int n = 0; while (value) { @@ -64,6 +68,12 @@ n++; } return n; +#else + __asm{ + bsr eax,value + inc eax + } +#endif } @@ -284,7 +294,7 @@ } - if (dec->interlacing = BitstreamGetBit(bs)) + if ((dec->interlacing = BitstreamGetBit(bs))) { DEBUG("vol: interlacing"); } @@ -518,11 +528,11 @@ if (dec->interlacing) { - if (dec->top_field_first = BitstreamGetBit(bs)) + if ((dec->top_field_first = BitstreamGetBit(bs))) { DEBUG("vop: top_field_first"); } - if (dec->alternate_vertical_scan = BitstreamGetBit(bs)) + if ((dec->alternate_vertical_scan = BitstreamGetBit(bs))) { DEBUG("vop: alternate_vertical_scan"); }