1 /****************************************************************************** 2 * 3 * Copyright (C) 2015 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ***************************************************************************** 18 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 #ifndef __IMPEG2D_VLD_TABLES_H__ 21 #define __IMPEG2D_VLD_TABLES_H__ 22 23 24 #define MB_ADDR_INCR_OFFSET 34 25 #define MB_ADDR_INCR_LEN 11 26 #define MB_TYPE_LEN 6 27 #define MV_CODE_LEN 11 28 #define MB_CBP_LEN 9 29 30 31 32 #define MB_BIDRECT 0x20 33 #define MB_QUANT 0x10 34 #define MB_MV_FORW 0x8 35 #define MB_MV_BACK 0x4 36 #define MB_PATTERN 0x2 37 #define MB_TYPE_INTRA 0x1 38 #define MB_FORW_OR_BACK (MB_MV_FORW | MB_MV_BACK) 39 #define MB_CODED (MB_TYPE_INTRA | MB_PATTERN) 40 41 42 #define MPEG2_MB_ADDR_INCR_OFFSET 34 43 #define MPEG2_INTRA_MBTYPE_OFFSET 69 44 #define MPEG2_INTER_MBTYPE_OFFSET 105 45 #define MPEG2_BVOP_MBTYPE_OFFSET 125 46 #define MPEG2_DCT_DC_SIZE_OFFSET 12 47 #define MPEG2_CBP_OFFSET 64 48 #define MPEG2_MOTION_CODE_OFFSET 17 49 #define MPEG2_DMV_OFFSET 2 50 51 #define MPEG2_AC_COEFF_MAX_LEN 16 52 #define MB_ADDR_INCR_LEN 11 53 #define MPEG2_INTRA_MBTYPE_LEN 2 54 #define MPEG2_INTER_MBTYPE_LEN 6 55 56 #define MPEG2_DCT_DC_SIZE_LEN 9 57 #define MPEG2_DCT_DC_LUMA_SIZE_LEN 9 58 #define MPEG2_DCT_DC_CHROMA_SIZE_LEN 10 59 #define MPEG2_CBP_LEN 9 60 #define MPEG2_MOTION_CODE_LEN 11 61 #define MPEG2_DMV_LEN 2 62 63 #define END_OF_BLOCK 0x01 64 #define ESCAPE_CODE 0x06 65 66 /* Table to be used for decoding the MB increment value */ 67 extern const WORD16 gai2_impeg2d_mb_addr_incr[][2]; 68 extern const WORD16 gai2_impeg2d_dct_dc_size[][11][2]; 69 70 extern const UWORD16 gau2_impeg2d_dct_coeff_zero[]; 71 extern const UWORD16 gau2_impeg2d_dct_coeff_one[]; 72 extern const UWORD16 gau2_impeg2d_offset_zero[]; 73 extern const UWORD16 gau2_impeg2d_offset_one[]; 74 75 extern const UWORD16 gau2_impeg2d_tab_zero_1_9[]; 76 extern const UWORD16 gau2_impeg2d_tab_one_1_9[]; 77 extern const UWORD16 gau2_impeg2d_tab_zero_10_16[]; 78 extern const UWORD16 gau2_impeg2d_tab_one_10_16[]; 79 80 extern const UWORD16 gau2_impeg2d_p_mb_type[]; 81 extern const UWORD16 gau2_impeg2d_b_mb_type[]; 82 extern const UWORD16 gau2_impeg2d_mv_code[]; 83 extern const WORD16 gai2_impeg2d_dec_mv[4]; 84 extern const UWORD16 gau2_impeg2d_cbp_code[]; 85 86 87 #endif /* __IMPEG2D_VLD_TABLES_H__ */ 88 89