--- mbcoding.h 2002/11/03 01:43:32 1.8.2.4 +++ mbcoding.h 2003/06/09 13:52:20 1.11.2.4 @@ -1,8 +1,34 @@ +/***************************************************************************** + * + * XVID MPEG-4 VIDEO CODEC + * - MB coding header - + * + * Copyright (C) 2002 Michael Militzer + * + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program ; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: mbcoding.h,v 1.11.2.4 2003/06/09 13:52:20 edgomez Exp $ + * + ****************************************************************************/ + #ifndef _MB_CODING_H_ #define _MB_CODING_H_ #include "../portab.h" #include "../global.h" +#include "vlc_codes.h" #include "bitstream.h" void init_vlc_tables(void); @@ -10,6 +36,7 @@ int check_resync_marker(Bitstream * bs, int addbits); void bs_put_spritetrajectory(Bitstream * bs, const int val); +int bs_get_spritetrajectory(Bitstream * bs); int get_mcbpc_intra(Bitstream * bs); int get_mcbpc_inter(Bitstream * bs); @@ -23,12 +50,6 @@ int get_dc_size_lum(Bitstream * bs); int get_dc_size_chrom(Bitstream * bs); -static int get_coeff(Bitstream * bs, - int *run, - int *last, - int intra, - int short_video_header); - void get_intra_block(Bitstream * bs, int16_t * block, int direction, @@ -50,7 +71,15 @@ static __inline void MBSkip(Bitstream * bs) { - BitstreamPutBit(bs, 1); // not coded + BitstreamPutBit(bs, 1); /* not coded */ } + +#ifdef BIGLUT +extern VLC *intra_table; +int CodeCoeff_CalcBits(const int16_t qcoeff[64], VLC * table, const uint16_t * zigzag, uint16_t intra); +#else +int CodeCoeffIntra_CalcBits(const int16_t qcoeff[64], const uint16_t * zigzag); +#endif + #endif /* _MB_CODING_H_ */