⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mvbitstream.c

📁 优化过的xvid1.1.2源代码
💻 C
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -