mvbitstream.c
来自「优化过的xvid1.1.2源代码」· C语言 代码 · 共 35 行
C
35 行
#include "MVBitstream.h"
extern const uint16_t scan_tables[3][64];
void bs_get_matrix(Bitstream * bs, uint8_t * matrix)
{
int i = 0;
int last, value = 0;
do
{
last = value;
value = BitstreamGetBits(bs, 8);
matrix[scan_tables[0][i++]] = value;
}
while (value != 0 && i < 64);
if (value != 0) return;
i--;
while (i < 64)
{
matrix[scan_tables[0][i++]] = last;
}
}
int32_t get_dbquant(Bitstream * bs)
{
if (!BitstreamGetBit(bs)) /* '0' */
return (0);
else if (!BitstreamGetBit(bs)) /* '10' */
return (-2);
else /* '11' */
return (2);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?