00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _VLC_H_
00014 #define _VLC_H_
00015
00016 #include "enc_statistics.h"
00017
00018 extern Boolean u_1 (char *tracestring, int value, Bitstream *bitstream);
00019 extern int se_v (char *tracestring, int value, Bitstream *bitstream);
00020 extern int ue_v (char *tracestring, int value, Bitstream *bitstream);
00021 extern int u_v (int n, char *tracestring, int value, Bitstream *bitstream);
00022
00023 extern void levrun_linfo_c2x2(int level,int run,int *len,int *info);
00024 extern void levrun_linfo_inter(int level,int run,int *len,int *info);
00025
00026 extern void writeSE_Fix (SyntaxElement *se, Bitstream *bitstream);
00027 extern void writeSE_UVLC (SyntaxElement *se, DataPartition *dp);
00028 extern void writeSE_SVLC (SyntaxElement *se, DataPartition *dp);
00029 extern void writeSE_Flag (SyntaxElement *se, DataPartition *dp);
00030 extern void writeSE_invFlag (SyntaxElement *se, DataPartition *dp);
00031 extern void writeSE_Dummy (SyntaxElement *se, DataPartition *dp);
00032
00033 extern void writeCBP_VLC (Macroblock* currMB, SyntaxElement *se, DataPartition *dp);
00034 extern void writeIntraPredMode_CAVLC (SyntaxElement *se, DataPartition *dp);
00035 extern int writeSyntaxElement2Buf_UVLC (SyntaxElement *se, Bitstream* this_streamBuffer );
00036 extern void writeUVLC2buffer (SyntaxElement *se, Bitstream *currStream);
00037 extern void writeVlcByteAlign (ImageParameters *p_Img, Bitstream* currStream, StatParameters *cur_stats);
00038 extern int writeSyntaxElement2Buf_Fixed(SyntaxElement *se, Bitstream* this_streamBuffer );
00039 extern int symbol2uvlc (SyntaxElement *se);
00040 extern void ue_linfo (int n, int dummy, int *len,int *info);
00041 extern void se_linfo (int mvd, int dummy, int *len,int *info);
00042 extern void cbp_linfo_intra_normal(int cbp, int dummy, int *len,int *info);
00043 extern void cbp_linfo_intra_other (int cbp, int dummy, int *len,int *info);
00044 extern void cbp_linfo_inter_normal(int cbp, int dummy, int *len,int *info);
00045 extern void cbp_linfo_inter_other (int cbp, int dummy, int *len,int *info);
00046
00047 extern int writeSyntaxElement_VLC(SyntaxElement *se, DataPartition *this_dataPart);
00048 extern int writeSyntaxElement_TotalZeros(SyntaxElement *se, DataPartition *this_dataPart);
00049 extern int writeSyntaxElement_TotalZerosChromaDC(ImageParameters *p_Img, SyntaxElement *se, DataPartition *this_dataPart);
00050 extern int writeSyntaxElement_Run(SyntaxElement *se, DataPartition *this_dataPart);
00051 extern int writeSyntaxElement_NumCoeffTrailingOnes(SyntaxElement *se, DataPartition *this_dataPart);
00052 extern int writeSyntaxElement_NumCoeffTrailingOnesChromaDC(ImageParameters *p_Img, SyntaxElement *se, DataPartition *this_dataPart);
00053 extern int writeSyntaxElement_Level_VLC1(SyntaxElement *se, DataPartition *this_dataPart, int profile_idc);
00054 extern int writeSyntaxElement_Level_VLCN(SyntaxElement *se, int vlc, DataPartition *this_dataPart, int profile_idc);
00055
00056 extern void writeUVLC_CAVLC (Macroblock *currMB, SyntaxElement *se, DataPartition *dp);
00057 extern void writeSVLC_CAVLC (Macroblock *currMB, SyntaxElement *se, DataPartition *dp);
00058 extern void writeFlag_CAVLC (Macroblock *currMB, SyntaxElement *se, DataPartition *dp);
00059
00060 extern void reset_mb_nz_coeff(ImageParameters *p_Img, int mb_number);
00061
00062 #endif
00063