www.pudn.com > JM60.ZIP > vlc.h


/* 
*********************************************************************** 
* COPYRIGHT AND WARRANTY INFORMATION 
* 
* Copyright 2001, International Telecommunications Union, Geneva 
* 
* DISCLAIMER OF WARRANTY 
* 
* These software programs are available to the user without any 
* license fee or royalty on an "as is" basis. The ITU disclaims 
* any and all warranties, whether express, implied, or 
* statutory, including any implied warranties of merchantability 
* or of fitness for a particular purpose.  In no event shall the 
* contributor or the ITU be liable for any incidental, punitive, or 
* consequential damages of any kind whatsoever arising from the 
* use of these programs. 
* 
* This disclaimer of warranty extends to the user of these programs 
* and user's customers, employees, agents, transferees, successors, 
* and assigns. 
* 
* The ITU does not represent or warrant that the programs furnished 
* hereunder are free of infringement of any third-party patents. 
* Commercial implementations of ITU-T Recommendations, including 
* shareware, may be subject to royalty fees to patent holders. 
* Information regarding the ITU-T patent policy is available from 
* the ITU Web site at http://www.itu.int. 
* 
* THIS IS NOT A GRANT OF PATENT RIGHTS - SEE THE ITU-T PATENT POLICY. 
************************************************************************ 
*/ 
 
/*! 
 ************************************************************************ 
 * \file vlc.h 
 * 
 * \brief 
 *    header for (CA)VLC coding functions 
 * 
 * \author 
 *    Karsten Suehring 
 * 
 ************************************************************************ 
 */ 
 
#ifndef _VLC_H_ 
#define _VLC_H_ 
 
int se_v (char *tracestring, DataPartition *part); 
int ue_v (char *tracestring, DataPartition *part); 
int u_1 (char *tracestring, DataPartition *part); 
int u_v (int LenInBits, char *tracestring, DataPartition *part); 
 
// UVLC mapping 
void linfo(int len, int info, int *value1, int *dummy); 
void linfo_mvd(int len,int info, int *signed_mvd, int *dummy); 
void linfo_cbp_intra(int len,int info,int *cbp, int *dummy); 
void linfo_cbp_inter(int len,int info,int *cbp, int *dummy); 
void linfo_dquant(int len,  int info, int *signed_dquant, int *dummy); 
void linfo_levrun_inter(int len,int info,int *level,int *irun); 
void linfo_levrun_c2x2(int len,int info,int *level,int *irun); 
 
int  readSyntaxElement_UVLC(SyntaxElement *sym, struct img_par *img, struct inp_par *inp, struct datapartition *dp); 
// int  readSliceUVLC(struct img_par *img, struct inp_par *inp); 
int  readSyntaxElement_fixed(SyntaxElement *sym, struct img_par *img, struct inp_par *inp, struct datapartition *dP); 
int  readSyntaxElement_Intra4x4PredictionMode(SyntaxElement *sym, struct img_par *img, struct inp_par *inp, struct datapartition *dp); 
 
int  GetVLCSymbol (byte buffer[],int totbitoffset,int *info, int bytecount); 
int  GetfixedSymbol (byte buffer[],int totbitoffset,int *info, int bytecount, int len); 
int  GetVLCSymbol_IntraMode (byte buffer[],int totbitoffset,int *info, int bytecount); 
 
int readSyntaxElement_FLC(SyntaxElement *sym, struct datapartition *dp); 
int readSyntaxElement_NumCoeffTrailingOnes(SyntaxElement *sym,  DataPartition *dP, 
                                           char *type); 
int readSyntaxElement_NumCoeffTrailingOnesChromaDC(SyntaxElement *sym,  DataPartition *dP); 
int readSyntaxElement_Level_VLC0(SyntaxElement *sym, struct datapartition *dP); 
int readSyntaxElement_Level_VLCN(SyntaxElement *sym, int vlc, struct datapartition *dP); 
int readSyntaxElement_TotalZeros(SyntaxElement *sym,  DataPartition *dP); 
int readSyntaxElement_TotalZerosChromaDC(SyntaxElement *sym,  DataPartition *dP); 
int readSyntaxElement_Run(SyntaxElement *sym,  DataPartition *dP); 
int GetBits (byte buffer[],int totbitoffset,int *info, int bytecount,  
             int numbits); 
int ShowBits (byte buffer[],int totbitoffset,int bytecount, int numbits); 
 
 
#endif