00001 /* 00002 * MSMPEG4 backend for ffmpeg encoder and decoder 00003 * copyright (c) 2001 Fabrice Bellard 00004 * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> 00005 * 00006 * msmpeg4v1 & v2 stuff by Michael Niedermayer <michaelni@gmx.at> 00007 * 00008 * This file is part of FFmpeg. 00009 * 00010 * FFmpeg is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * FFmpeg is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with FFmpeg; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00023 */ 00024 00030 #ifndef AVCODEC_MSMPEG4DATA_H 00031 #define AVCODEC_MSMPEG4DATA_H 00032 00033 #include "libavutil/common.h" 00034 #include "bitstream.h" 00035 #include "rl.h" 00036 00037 /* motion vector table */ 00038 typedef struct MVTable { 00039 int n; 00040 const uint16_t *table_mv_code; 00041 const uint8_t *table_mv_bits; 00042 const uint8_t *table_mvx; 00043 const uint8_t *table_mvy; 00044 uint16_t *table_mv_index; /* encoding: convert mv to index in table_mv */ 00045 VLC vlc; /* decoding: vlc */ 00046 } MVTable; 00047 00048 extern VLC ff_msmp4_mb_i_vlc; 00049 extern VLC ff_msmp4_dc_luma_vlc[2]; 00050 extern VLC ff_msmp4_dc_chroma_vlc[2]; 00051 00052 /* intra picture macroblock coded block pattern */ 00053 extern const uint16_t ff_msmp4_mb_i_table[64][2]; 00054 00055 extern const uint8_t cbpy_tab[16][2]; 00056 00057 extern const uint8_t DCtab_lum[13][2]; 00058 extern const uint8_t DCtab_chrom[13][2]; 00059 00060 extern const uint8_t mvtab[33][2]; 00061 00062 extern const uint8_t intra_MCBPC_code[9]; 00063 extern const uint8_t intra_MCBPC_bits[9]; 00064 00065 extern const uint8_t inter_MCBPC_code[28]; 00066 extern const uint8_t inter_MCBPC_bits[28]; 00067 00068 #define WMV1_SCANTABLE_COUNT 4 00069 00070 extern const uint8_t wmv1_scantable[WMV1_SCANTABLE_COUNT][64]; 00071 00072 #define NB_RL_TABLES 6 00073 00074 extern RLTable rl_table[NB_RL_TABLES]; 00075 00076 extern const uint8_t wmv1_y_dc_scale_table[32]; 00077 extern const uint8_t wmv1_c_dc_scale_table[32]; 00078 extern const uint8_t old_ff_y_dc_scale_table[32]; 00079 00080 extern MVTable mv_tables[2]; 00081 00082 extern const uint8_t v2_mb_type[8][2]; 00083 extern const uint8_t v2_intra_cbpc[4][2]; 00084 00085 extern const uint32_t table_mb_non_intra[128][2]; 00086 extern const uint8_t table_inter_intra[4][2]; 00087 00088 extern const uint32_t ff_table0_dc_lum[120][2]; 00089 extern const uint32_t ff_table1_dc_lum[120][2]; 00090 extern const uint32_t ff_table0_dc_chroma[120][2]; 00091 extern const uint32_t ff_table1_dc_chroma[120][2]; 00092 00093 #define WMV2_INTER_CBP_TABLE_COUNT 4 00094 extern const uint32_t (* const wmv2_inter_table[WMV2_INTER_CBP_TABLE_COUNT])[2]; 00095 00096 extern const uint8_t wmv2_scantableA[64]; 00097 extern const uint8_t wmv2_scantableB[64]; 00098 00099 #endif /* AVCODEC_MSMPEG4DATA_H */