00001 /********************************************************************** 00002 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qtopia Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 #ifndef VLC_H 00021 #define VLC_H 00022 00023 /* variable length code tables */ 00024 00025 typedef struct { 00026 char val, len; 00027 } mpeg3_VLCtab_t; 00028 00029 typedef struct { 00030 char run, level, len; 00031 } mpeg3_DCTtab_t; 00032 00033 /* Added 03/38/96 by Alex de Jong : avoid IRIX GNU warning */ 00034 #ifdef ERROR 00035 #undef ERROR 00036 #define ERROR 99 00037 #endif 00038 00039 /* Table B-3, mb_type in P-pictures, codes 001..1xx */ 00040 extern mpeg3_VLCtab_t mpeg3_PMBtab0[8]; 00041 00042 /* Table B-3, mb_type in P-pictures, codes 000001..00011x */ 00043 extern mpeg3_VLCtab_t mpeg3_PMBtab1[8]; 00044 00045 /* Table B-4, mb_type in B-pictures, codes 0010..11xx */ 00046 extern mpeg3_VLCtab_t mpeg3_BMBtab0[16]; 00047 00048 /* Table B-4, mb_type in B-pictures, codes 000001..00011x */ 00049 extern mpeg3_VLCtab_t mpeg3_BMBtab1[8]; 00050 00051 /* Table B-5, mb_type in spat. scal. I-pictures, codes 0001..1xxx */ 00052 extern mpeg3_VLCtab_t mpeg3_spIMBtab[16]; 00053 00054 /* Table B-6, mb_type in spat. scal. P-pictures, codes 0010..11xx */ 00055 extern mpeg3_VLCtab_t mpeg3_spPMBtab0[16]; 00056 00057 /* Table B-6, mb_type in spat. scal. P-pictures, codes 0000010..000111x */ 00058 extern mpeg3_VLCtab_t mpeg3_spPMBtab1[16]; 00059 00060 /* Table B-7, mb_type in spat. scal. B-pictures, codes 0010..11xx */ 00061 extern mpeg3_VLCtab_t mpeg3_spBMBtab0[14]; 00062 00063 /* Table B-7, mb_type in spat. scal. B-pictures, codes 0000100..000111x */ 00064 extern mpeg3_VLCtab_t mpeg3_spBMBtab1[12]; 00065 00066 /* Table B-7, mb_type in spat. scal. B-pictures, codes 00000100x..000001111 */ 00067 extern mpeg3_VLCtab_t mpeg3_spBMBtab2[8]; 00068 00069 /* Table B-8, mb_type in spat. scal. B-pictures, codes 001..1xx */ 00070 extern mpeg3_VLCtab_t mpeg3_SNRMBtab[8]; 00071 00072 /* Table B-10, motion_code, codes 0001 ... 01xx */ 00073 extern mpeg3_VLCtab_t mpeg3_MVtab0[8]; 00074 00075 /* Table B-10, motion_code, codes 0000011 ... 000011x */ 00076 extern mpeg3_VLCtab_t mpeg3_MVtab1[8]; 00077 00078 /* Table B-10, motion_code, codes 0000001100 ... 000001011x */ 00079 extern mpeg3_VLCtab_t mpeg3_MVtab2[12]; 00080 00081 /* Table B-9, coded_block_pattern, codes 01000 ... 111xx */ 00082 extern mpeg3_VLCtab_t mpeg3_CBPtab0[32]; 00083 00084 /* Table B-9, coded_block_pattern, codes 00000100 ... 001111xx */ 00085 extern mpeg3_VLCtab_t mpeg3_CBPtab1[64]; 00086 00087 /* Table B-9, coded_block_pattern, codes 000000001 ... 000000111 */ 00088 extern mpeg3_VLCtab_t mpeg3_CBPtab2[8]; 00089 00090 /* Table B-1, macroblock_address_increment, codes 00010 ... 011xx */ 00091 extern mpeg3_VLCtab_t mpeg3_MBAtab1[16]; 00092 00093 /* Table B-1, macroblock_address_increment, codes 00000011000 ... 0000111xxxx */ 00094 extern mpeg3_VLCtab_t mpeg3_MBAtab2[104]; 00095 00096 /* Table B-12, dct_dc_size_luminance, codes 00xxx ... 11110 */ 00097 extern mpeg3_VLCtab_t mpeg3_DClumtab0[32]; 00098 00099 /* Table B-12, dct_dc_size_luminance, codes 111110xxx ... 111111111 */ 00100 extern mpeg3_VLCtab_t mpeg3_DClumtab1[16]; 00101 00102 /* Table B-13, dct_dc_size_chrominance, codes 00xxx ... 11110 */ 00103 extern mpeg3_VLCtab_t mpeg3_DCchromtab0[32]; 00104 00105 /* Table B-13, dct_dc_size_chrominance, codes 111110xxxx ... 1111111111 */ 00106 extern mpeg3_VLCtab_t mpeg3_DCchromtab1[32]; 00107 00108 /* Table B-14, DCT coefficients table zero, 00109 * codes 0100 ... 1xxx (used for first (DC) coefficient) 00110 */ 00111 extern mpeg3_DCTtab_t mpeg3_DCTtabfirst[12]; 00112 00113 /* Table B-14, DCT coefficients table zero, 00114 * codes 0100 ... 1xxx (used for all other coefficients) 00115 */ 00116 extern mpeg3_DCTtab_t mpeg3_DCTtabnext[12]; 00117 00118 /* Table B-14, DCT coefficients table zero, 00119 * codes 000001xx ... 00111xxx 00120 */ 00121 extern mpeg3_DCTtab_t mpeg3_DCTtab0[60]; 00122 00123 /* Table B-15, DCT coefficients table one, 00124 * codes 000001xx ... 11111111 00125 */ 00126 extern mpeg3_DCTtab_t mpeg3_DCTtab0a[252]; 00127 00128 /* Table B-14, DCT coefficients table zero, 00129 * codes 0000001000 ... 0000001111 00130 */ 00131 extern mpeg3_DCTtab_t mpeg3_DCTtab1[8]; 00132 00133 /* Table B-15, DCT coefficients table one, 00134 * codes 000000100x ... 000000111x 00135 */ 00136 extern mpeg3_DCTtab_t mpeg3_DCTtab1a[8]; 00137 00138 /* Table B-14/15, DCT coefficients table zero / one, 00139 * codes 000000010000 ... 000000011111 00140 */ 00141 extern mpeg3_DCTtab_t mpeg3_DCTtab2[16]; 00142 00143 /* Table B-14/15, DCT coefficients table zero / one, 00144 * codes 0000000010000 ... 0000000011111 00145 */ 00146 extern mpeg3_DCTtab_t mpeg3_DCTtab3[16]; 00147 00148 /* Table B-14/15, DCT coefficients table zero / one, 00149 * codes 00000000010000 ... 00000000011111 00150 */ 00151 extern mpeg3_DCTtab_t mpeg3_DCTtab4[16]; 00152 00153 /* Table B-14/15, DCT coefficients table zero / one, 00154 * codes 000000000010000 ... 000000000011111 00155 */ 00156 extern mpeg3_DCTtab_t mpeg3_DCTtab5[16]; 00157 00158 /* Table B-14/15, DCT coefficients table zero / one, 00159 * codes 0000000000010000 ... 0000000000011111 00160 */ 00161 extern mpeg3_DCTtab_t mpeg3_DCTtab6[16]; 00162 00163 00164 #endif
1.4.2