📄 jpeg_vlc_test.c
字号:
#include <stdio.h>
#include<imagelib.h>
#include "test.h" // Quantized DCT coefficents (2 Macro Blocks (YUV4:2;0) 12 blocks)
#pragma DATA_SECTION( VLC_status,"status");
void IMG_jpeg_vlc(int *,int *, int *,int);
int VLC_status[80];// the memory location of VLC_status should start of a new data page
int output[64]; // JPEG baseline VLC coded bitestream. The legnth of output is
// data-dependent.
void main()
{
int *ptr;
int blocks;
int type;
int i, temp;
for(i=0;i<64;i++)
output[i]=0;
JPEG_vlc_init(VLC_status); // JPEG VLC variables initialization.
for(blocks=0;blocks<12;blocks++)
{
temp=blocks%6;
if (temp==0 | temp==1 | temp==2 | temp==3 ) type=0;
if (temp==4) type=1;
if (temp==5) type=2;
ptr=(Q_dct_coef+blocks*64);
IMG_jpeg_vlc(ptr,output,VLC_status,type);
}
// If "0xFF" add "0x00"
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -