mpeg4quant.h
来自「DM642的mpeg4编码」· C头文件 代码 · 共 55 行
H
55 行
#ifndef _MPEG4QUANT_H_
#define _MPEG4QUANT_H_
# include <stdio.h>
#include "../bitstream/bitstream.c"
/* mpeg4 quant-matrix intra */
static const unsigned char mpeg4_intra_matrix[64] =
{
8, 17, 18, 19, 21, 23, 25, 27,
17, 18, 19, 21, 23, 25, 27, 28,
20, 21, 22, 23, 24, 26, 28, 30,
21, 22, 23, 24, 26, 28, 30, 32,
22, 23, 24, 26, 28, 30, 32, 35,
23, 24, 26, 28, 30, 32, 35, 38,
25, 26, 28, 30, 32, 35, 38, 41,
27, 28, 30, 32, 35, 38, 41, 45
};
static const unsigned char mpeg4_inter_matrix[64] =
{
16, 17, 18, 19, 20, 21, 22, 23,
17, 18, 19, 20, 21, 22, 23, 24,
18, 19, 20, 21, 22, 23, 24, 25,
19, 20, 21, 22, 23, 24, 26, 27,
20, 21, 22, 23, 25, 26, 27, 28,
21, 22, 23, 24, 26, 27, 28, 30,
22, 23, 24, 26, 27, 28, 30, 31,
23, 24, 25, 27, 28, 30, 31, 33
};
void LoadMpeg4IntraMatrix(Stream*, const unsigned char*);
void LoadMpeg4InterMatrix(Stream*, const unsigned char*);
int IsCustomIntraMatrix(const short*);
int IsCustomInterMatrix(const short*);
short Mpeg4IntraQuant1(short* Dst, const short* Src, short iQuant, short iScalar, short iFlag);
short Mpeg4IntraQuant2(short* Dst, const short* Src, short iQuant, short iScalar);
short Mpeg4InterQuant1(short* Dst, const short* Src, short iQuant, short iFlag);
short Mpeg4InterQuant2(short* Dst, const short* Src, short iQuant);
short Mpeg4IntraDeQuant1(short* Dst, const short* Src, short iQuant, short iScalar, short iFlag);
short Mpeg4InterDeQuant1(short* Dst, const short* Src, short iQuant, short iFlag);
short Mpeg4IntraDeQuant2(short* Dst, const short* Src, short iQuant, short iScalar);
short Mpeg4InterDeQuant2(short* Dst, const short* Src, short iQuant);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?