📄 quantization.c
字号:
#include "dct.h"
extern short block[BLOCK_SIZE];
extern short quant[BLOCK_SIZE];
void quantization(void)
{
int i;
for(i=0;i<64;i++)
{
block[i] = (short)(block[i] * quant[i] >> 14);
if((block[i] & 0x0001) == 1) { // test the first bit after the radix point
block[i] += 2; // if it is 1, the value should add 1
}
block[i] = block[i] >> 1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -