1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /*
19 *     -------------------------------------------------------------------   *
20 *                    MPEG-4 Simple Profile Video Decoder                    *
21 *     -------------------------------------------------------------------   *
22 *
23 * This software module was originally developed by
24 *
25 *   Paulo Nunes (IST / ACTS-MoMuSyS)
26 *
27 * and edited by
28 *
29 *   Robert Danielsen (Telenor / ACTS-MoMuSyS)
30 *
31 * in the course of development of the MPEG-4 Video (ISO/IEC 14496-2) standard.
32 * This software module is an implementation of a part of one or more MPEG-4
33 * Video (ISO/IEC 14496-2) tools as specified by the MPEG-4 Video (ISO/IEC
34 * 14496-2) standard.
35 *
36 * ISO/IEC gives users of the MPEG-4 Video (ISO/IEC 14496-2) standard free
37 * license to this software module or modifications thereof for use in hardware
38 * or software products claiming conformance to the MPEG-4 Video (ISO/IEC
39 * 14496-2) standard.
40 *
41 * Those intending to use this software module in hardware or software products
42 * are advised that its use may infringe existing patents. The original
43 * developer of this software module and his/her company, the subsequent
44 * editors and their companies, and ISO/IEC have no liability for use of this
45 * software module or modifications thereof in an implementation. Copyright is
46 * not released for non MPEG-4 Video (ISO/IEC 14496-2) Standard conforming
47 * products.
48 *
49 * ACTS-MoMuSys partners retain full right to use the code for his/her own
50 * purpose, assign or donate the code to a third party and to inhibit third
51 * parties from using the code for non MPEG-4 Video (ISO/IEC 14496-2) Standard
52 * conforming products. This copyright notice must be included in all copies or
53 * derivative works.
54 *
55 * Copyright (c) 1996
56 *
57 *****************************************************************************
58 ***********************************************************HeaderBegin*******
59 *
60 * File: vlc_dec_tab.h
61 *
62 * Author:   Paulo Nunes (IST) - Paulo.Nunes@it.ist.utl.pt
63 * Created:  1-Mar-96
64 *
65 * Description: This file contains the VLC tables for module which deals
66 *       with VLC decoding.
67 *
68 * Notes:    This file was created based on tmndecode
69 *       Written by Karl Olav Lillevold <kol@nta.no>,
70 *       1995 Telenor R&D.
71 *       Donated to the Momusys-project as background code by
72 *       Telenor.
73 *
74 *       based on mpeg2decode, (C) 1994, MPEG Software Simulation Group
75 *       and mpeg2play, (C) 1994 Stefan Eckart
76 *                         <stefan@lis.e-technik.tu-muenchen.de>
77 *
78 *
79 * Modified:  9-May-96 Paulo Nunes: Reformatted. New headers.
80 *       14-May-96 Paulo Nunes: Changed TMNMVtabs according to VM2.1.
81 *   04.11.96 Robert Danielsen: Added three new tables for coding
82 *           of Intra luminance coefficients (VM 4.0)
83 *      01.05.97 Luis Ducla-Soares: added VM7.0 Reversible VLC tables (RVLC).
84 *      13.05.97 Minhua Zhou: added VlC tables for CBPYtab2 CBPYtab3,
85 *   revised  CBPYtab
86 *
87 ***********************************************************HeaderEnd*********
88 
89 This module is a header file for "vlc_decode.c".  The table data actually
90 resides in "vlc_tab.c".
91 
92 
93 ------------------------------------------------------------------------------
94 */
95 
96 /*----------------------------------------------------------------------------
97 ; CONTINUE ONLY IF NOT ALREADY DEFINED
98 ----------------------------------------------------------------------------*/
99 #ifndef vlc_dec_tab_H
100 #define vlc_dec_tab_H
101 
102 /*----------------------------------------------------------------------------
103 ; INCLUDES
104 ----------------------------------------------------------------------------*/
105 #include "mp4def.h"
106 
107 /*----------------------------------------------------------------------------
108 ; MACROS
109 ; Define module specific macros here
110 ----------------------------------------------------------------------------*/
111 
112 
113 /*----------------------------------------------------------------------------
114 ; DEFINES
115 ; Include all pre-processor statements here.
116 ----------------------------------------------------------------------------*/
117 
118 
119 /*----------------------------------------------------------------------------
120 ; EXTERNAL VARIABLES REFERENCES
121 ; Declare variables used in this module but defined elsewhere
122 ----------------------------------------------------------------------------*/
123 #ifdef __cplusplus
124 extern "C"
125 {
126 #endif
127 
128     extern const VLCshorttab PV_TMNMVtab0[];
129 
130     extern const VLCshorttab PV_TMNMVtab1[];
131 
132     extern const VLCshorttab PV_TMNMVtab2[];
133 
134     extern const VLCshorttab PV_MCBPCtab[];
135 
136 #ifdef PV_ANNEX_IJKT_SUPPORT
137     extern const VLCshorttab PV_MCBPCtab1[];
138 #endif
139     extern const VLCshorttab PV_MCBPCtabintra[];
140 
141     /* Table for separate mode MCBPC, for coding DQUANT-flag and CBPC */
142 
143     extern const VLCshorttab MCBPCtab_sep[32];
144 
145     extern const VLCshorttab PV_CBPYtab[48];
146 
147     extern const VLCshorttab CBPYtab2[16];
148 
149     extern const VLCshorttab CBPYtab3[64];
150 
151     extern const VLCtab2 PV_DCT3Dtab0[];
152 
153 
154     extern const VLCtab2 PV_DCT3Dtab1[];
155 
156 
157     extern const VLCtab2 PV_DCT3Dtab2[];
158 
159     /* New tables for Intra luminance blocks */
160 
161     extern const VLCtab2 PV_DCT3Dtab3[];
162 
163     extern const VLCtab2 PV_DCT3Dtab4[];
164 
165     extern const VLCtab2 PV_DCT3Dtab5[];
166 #ifdef PV_ANNEX_IJKT_SUPPORT
167     /* Annex I tables */
168     extern const VLCtab2 PV_DCT3Dtab6[];
169 
170     extern const VLCtab2 PV_DCT3Dtab7[];
171 
172     extern const VLCtab2 PV_DCT3Dtab8[];
173 #endif
174     /* RVLC tables */
175     extern const int ptrRvlcTab[];
176 
177     extern const VLCtab2 RvlcDCTtabIntra[];
178 
179     extern const VLCtab2 RvlcDCTtabInter[];
180 
181     /*----------------------------------------------------------------------------
182     ; SIMPLE TYPEDEF'S
183     ----------------------------------------------------------------------------*/
184 
185 
186     /*----------------------------------------------------------------------------
187     ; ENUMERATED TYPEDEF'S
188     ----------------------------------------------------------------------------*/
189 
190     /*----------------------------------------------------------------------------
191     ; STRUCTURES TYPEDEF'S
192     ----------------------------------------------------------------------------*/
193 
194     /*----------------------------------------------------------------------------
195     ; GLOBAL FUNCTION DEFINITIONS
196     ; Function Prototype declaration
197     ----------------------------------------------------------------------------*/
198 
199 
200     /*----------------------------------------------------------------------------
201     ; END
202     ----------------------------------------------------------------------------*/
203 #endif
204 
205 #ifdef __cplusplus
206 }
207 #endif
208 
209 
210 
211 
212 
213 
214 
215 
216