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 |
|
|