--- trunk/xvidcore/src/bitstream/mbcoding.c 2002/09/08 13:44:11 450 +++ trunk/xvidcore/src/bitstream/mbcoding.c 2002/09/08 14:43:04 451 @@ -1,53 +1,37 @@ - /****************************************************************************** - * * - * This file is part of XviD, a free MPEG-4 video encoder/decoder * - * * - * XviD is an implementation of a part of one or more MPEG-4 Video tools * - * as specified in ISO/IEC 14496-2 standard. Those intending to use this * - * software module in hardware or software products are advised that its * - * use may infringe existing patents or copyrights, and any such use * - * would be at such party's own risk. The original developer of this * - * software module and his/her company, and subsequent editors and their * - * companies, will have no liability for use of this software or * - * modifications or derivatives thereof. * - * * - * XviD 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. * - * * - * XviD 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 * - * * - ******************************************************************************/ - - /****************************************************************************** - * * - * mbcoding.c * - * * - * Copyright (C) 2002 - Michael Militzer * - * * - * For more information visit the XviD homepage: http://www.xvid.org * - * * - ******************************************************************************/ - - /****************************************************************************** - * * - * Revision history: * - * * - * 28.06.2002 added check_resync_marker() * - * 14.04.2002 bframe encoding * - * 08.03.2002 initial version; isibaar * - * * - ******************************************************************************/ - - +/***************************************************************************** + * + * XVID MPEG-4 VIDEO CODEC + * - Vector Length Coding tables - + * + * Copyright(C) 2002 Michael Militzer + * + * + * This program is an implementation of a part of one or more MPEG-4 + * Video tools as specified in ISO/IEC 14496-2 standard. Those intending + * to use this software module in hardware or software products are + * advised that its use may infringe existing patents or copyrights, and + * any such use would be at such party's own risk. The original + * developer of this software module and his/her company, and subsequent + * editors and their companies, will have no liability for use of this + * software or modifications or derivatives thereof. + * + * 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.c,v 1.26 2002-09-08 14:43:04 edgomez Exp $ + * + ****************************************************************************/ #include #include "../portab.h" @@ -61,11 +45,19 @@ #define ABS(X) (((X)>0)?(X):-(X)) #define CLIP(X,A) (X > A) ? (A) : (X) -VLC intra_table[524032]; -VLC inter_table[524032]; - -VLC DCT3Dintra[4096]; -VLC DCT3Dinter[4096]; +/***************************************************************************** + * Local data + ****************************************************************************/ + +static VLC intra_table[524032]; +static VLC inter_table[524032]; + +static VLC DCT3Dintra[4096]; +static VLC DCT3Dinter[4096]; + +/***************************************************************************** + * Functions + ****************************************************************************/ void init_vlc_tables(void) @@ -82,8 +74,11 @@ vlc[0] = intra_table; vlc[1] = inter_table; - // generate encoding vlc lookup tables - // the lookup table idea is taken from the excellent fame project by Vivien Chapellier + /* + * Generate encoding vlc lookup tables + * the lookup table idea is taken from the excellent fame project + * by Vivien Chapellier + */ for (i = 0; i < 4; i++) { intra = i % 2; last = i / 2;