178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar/*
278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 2007-2008 ARM Limited
378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License");
578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License.
678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at
778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *      http://www.apache.org/licenses/LICENSE-2.0
978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software
1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS,
1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions and
1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * limitations under the License.
1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar */
170c1bc742181ded4930842b46e9507372f0b1b963James Dong/* ----------------------------------------------------------------
180c1bc742181ded4930842b46e9507372f0b1b963James Dong *
190c1bc742181ded4930842b46e9507372f0b1b963James Dong *
200c1bc742181ded4930842b46e9507372f0b1b963James Dong * File Name:  armVCM4P10_CAVLCTables.c
210c1bc742181ded4930842b46e9507372f0b1b963James Dong * OpenMAX DL: v1.0.2
220c1bc742181ded4930842b46e9507372f0b1b963James Dong * Revision:   9641
230c1bc742181ded4930842b46e9507372f0b1b963James Dong * Date:       Thursday, February 7, 2008
240c1bc742181ded4930842b46e9507372f0b1b963James Dong *
250c1bc742181ded4930842b46e9507372f0b1b963James Dong *
260c1bc742181ded4930842b46e9507372f0b1b963James Dong *
270c1bc742181ded4930842b46e9507372f0b1b963James Dong *
280c1bc742181ded4930842b46e9507372f0b1b963James Dong * Optimized CAVLC tables for H.264
290c1bc742181ded4930842b46e9507372f0b1b963James Dong *
300c1bc742181ded4930842b46e9507372f0b1b963James Dong */
310c1bc742181ded4930842b46e9507372f0b1b963James Dong
320c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxtypes.h"
330c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armOMX.h"
340c1bc742181ded4930842b46e9507372f0b1b963James Dong
350c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armVCM4P10_CAVLCTables.h"
360c1bc742181ded4930842b46e9507372f0b1b963James Dong
370c1bc742181ded4930842b46e9507372f0b1b963James Dong/* 4x4 DeZigZag table */
380c1bc742181ded4930842b46e9507372f0b1b963James Dong
390c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_U8 armVCM4P10_ZigZag_4x4[16] =
400c1bc742181ded4930842b46e9507372f0b1b963James Dong{
410c1bc742181ded4930842b46e9507372f0b1b963James Dong    0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
420c1bc742181ded4930842b46e9507372f0b1b963James Dong};
430c1bc742181ded4930842b46e9507372f0b1b963James Dong
440c1bc742181ded4930842b46e9507372f0b1b963James Dong/* 2x2 DeZigZag table */
450c1bc742181ded4930842b46e9507372f0b1b963James Dong
460c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_U8 armVCM4P10_ZigZag_2x2[4] =
470c1bc742181ded4930842b46e9507372f0b1b963James Dong{
480c1bc742181ded4930842b46e9507372f0b1b963James Dong    0, 1, 2, 3
490c1bc742181ded4930842b46e9507372f0b1b963James Dong};
500c1bc742181ded4930842b46e9507372f0b1b963James Dong
510c1bc742181ded4930842b46e9507372f0b1b963James Dong
520c1bc742181ded4930842b46e9507372f0b1b963James Dong/*
530c1bc742181ded4930842b46e9507372f0b1b963James Dong * Suffix To Level table
540c1bc742181ded4930842b46e9507372f0b1b963James Dong * We increment the suffix length if
550c1bc742181ded4930842b46e9507372f0b1b963James Dong * ((LevelCode>>1)+1)>(3<<(SuffixLength-1)) && SuffixLength<6
560c1bc742181ded4930842b46e9507372f0b1b963James Dong * (LevelCode>>1)>=(3<<(SuffixLength-1))    && SuffixLength<6
570c1bc742181ded4930842b46e9507372f0b1b963James Dong *  LevelCode    >= 3<<SuffixLength         && SuffixLength<6
580c1bc742181ded4930842b46e9507372f0b1b963James Dong * (LevelCode+2) >= (3<<SuffixLength)+2     && SuffixLength<6
590c1bc742181ded4930842b46e9507372f0b1b963James Dong */
600c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_S8 armVCM4P10_SuffixToLevel[7] =
610c1bc742181ded4930842b46e9507372f0b1b963James Dong{
620c1bc742181ded4930842b46e9507372f0b1b963James Dong    (3<<1)+2,       /* SuffixLength=1 */
630c1bc742181ded4930842b46e9507372f0b1b963James Dong    (3<<1)+2,       /* SuffixLength=1 */
640c1bc742181ded4930842b46e9507372f0b1b963James Dong    (3<<2)+2,       /* SuffixLength=2 */
650c1bc742181ded4930842b46e9507372f0b1b963James Dong    (3<<3)+2,       /* SuffixLength=3 */
660c1bc742181ded4930842b46e9507372f0b1b963James Dong    (3<<4)+2,       /* SuffixLength=4 */
670c1bc742181ded4930842b46e9507372f0b1b963James Dong    (3<<5)+2,       /* SuffixLength=5 */
680c1bc742181ded4930842b46e9507372f0b1b963James Dong    -1              /* SuffixLength=6 - never increment */
690c1bc742181ded4930842b46e9507372f0b1b963James Dong};
700c1bc742181ded4930842b46e9507372f0b1b963James Dong
710c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCCoeffTokenTables_0[132] = {
720c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0100, 0x2015, 0x2015, 0x400b, 0x400b, 0x400b, 0x400b,
730c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001,
740c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0028, 0x00f0, 0x00f8, 0x0027, 0x0030, 0x00d8, 0x00e0, 0x00e8,
750c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0038, 0x00a0, 0x00c8, 0x00d0, 0x0040, 0x0068, 0x0090, 0x0098,
760c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0048, 0x0050, 0x0058, 0x0060, 0x27ff, 0x27ff, 0x206b, 0x206b,
770c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0081, 0x0085, 0x0083, 0x0079, 0x0087, 0x007d, 0x007b, 0x0071,
780c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x007f, 0x0075, 0x0073, 0x0069, 0x0070, 0x0078, 0x0080, 0x0088,
790c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2077, 0x2077, 0x206d, 0x206d, 0x2063, 0x2063, 0x2061, 0x2061,
800c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x206f, 0x206f, 0x2065, 0x2065, 0x205b, 0x205b, 0x2059, 0x2059,
810c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0067, 0x005d, 0x0053, 0x0051, 0x005f, 0x0055, 0x004b, 0x0049,
820c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x00a8, 0x00b0, 0x00b8, 0x00c0, 0x2041, 0x2041, 0x204d, 0x204d,
830c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2043, 0x2043, 0x2039, 0x2039, 0x2057, 0x2057, 0x2045, 0x2045,
840c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x203b, 0x203b, 0x2031, 0x2031, 0x204f, 0x204f, 0x203d, 0x203d,
850c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2033, 0x2033, 0x2029, 0x2029, 0x0047, 0x0035, 0x002b, 0x0021,
860c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x203f, 0x203f, 0x202d, 0x202d, 0x2023, 0x2023, 0x2019, 0x2019,
870c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0037, 0x0025, 0x001b, 0x0011, 0x202f, 0x202f, 0x201d, 0x201d,
880c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0013, 0x0009, 0x201f, 0x201f
890c1bc742181ded4930842b46e9507372f0b1b963James Dong};
900c1bc742181ded4930842b46e9507372f0b1b963James Dong
910c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCCoeffTokenTables_1[128] = {
920c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x00e8, 0x00f0, 0x00f8, 0x0027, 0x001f, 0x2015, 0x2015,
930c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x400b, 0x400b, 0x400b, 0x400b, 0x4001, 0x4001, 0x4001, 0x4001,
940c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0028, 0x00d0, 0x00d8, 0x00e0, 0x0030, 0x0098, 0x00c0, 0x00c8,
950c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0038, 0x0060, 0x0088, 0x0090, 0x0040, 0x0048, 0x0050, 0x0058,
960c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x27ff, 0x27ff, 0x207f, 0x207f, 0x0087, 0x0085, 0x0083, 0x0081,
970c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x007b, 0x0079, 0x007d, 0x0073, 0x2075, 0x2075, 0x2071, 0x2071,
980c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0068, 0x0070, 0x0078, 0x0080, 0x2077, 0x2077, 0x206d, 0x206d,
990c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x206b, 0x206b, 0x2069, 0x2069, 0x206f, 0x206f, 0x2065, 0x2065,
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2063, 0x2063, 0x2061, 0x2061, 0x0059, 0x005d, 0x005b, 0x0051,
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0067, 0x0055, 0x0053, 0x0049, 0x00a0, 0x00a8, 0x00b0, 0x00b8,
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x205f, 0x205f, 0x204d, 0x204d, 0x204b, 0x204b, 0x2041, 0x2041,
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2057, 0x2057, 0x2045, 0x2045, 0x2043, 0x2043, 0x2039, 0x2039,
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x204f, 0x204f, 0x203d, 0x203d, 0x203b, 0x203b, 0x2031, 0x2031,
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0029, 0x0035, 0x0033, 0x0021, 0x2047, 0x2047, 0x202d, 0x202d,
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x202b, 0x202b, 0x2019, 0x2019, 0x003f, 0x0025, 0x0023, 0x0011,
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0037, 0x001d, 0x001b, 0x0009, 0x202f, 0x202f, 0x2013, 0x2013
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong
1100c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCCoeffTokenTables_2[112] = {
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0088, 0x00b0, 0x00b8, 0x00c0, 0x00c8, 0x00d0, 0x00d8,
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x003f, 0x0037, 0x002f, 0x0027, 0x001f, 0x0015, 0x000b, 0x0001,
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0028, 0x0050, 0x0078, 0x0080, 0x0030, 0x0038, 0x0040, 0x0048,
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x07ff, 0x0081, 0x0087, 0x0085, 0x0083, 0x0079, 0x007f, 0x007d,
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x007b, 0x0071, 0x0077, 0x0075, 0x0073, 0x0069, 0x206b, 0x206b,
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0058, 0x0060, 0x0068, 0x0070, 0x2061, 0x2061, 0x206d, 0x206d,
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2063, 0x2063, 0x2059, 0x2059, 0x206f, 0x206f, 0x2065, 0x2065,
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x205b, 0x205b, 0x2051, 0x2051, 0x0067, 0x005d, 0x0053, 0x0049,
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x005f, 0x0055, 0x004b, 0x0041, 0x0090, 0x0098, 0x00a0, 0x00a8,
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2039, 0x2039, 0x2031, 0x2031, 0x204d, 0x204d, 0x2029, 0x2029,
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2057, 0x2057, 0x2045, 0x2045, 0x2043, 0x2043, 0x2021, 0x2021,
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0019, 0x003d, 0x003b, 0x0011, 0x004f, 0x0035, 0x0033, 0x0009,
1230c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x202b, 0x202b, 0x202d, 0x202d, 0x2023, 0x2023, 0x2025, 0x2025,
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x201b, 0x201b, 0x2047, 0x2047, 0x201d, 0x201d, 0x2013, 0x2013
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong
1270c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCCoeffTokenTables_3[80] = {
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0028, 0x0030, 0x0038, 0x0040, 0x0048, 0x0050, 0x0058,
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0060, 0x0068, 0x0070, 0x0078, 0x0080, 0x0088, 0x0090, 0x0098,
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0009, 0x000b, 0x07ff, 0x0001, 0x0011, 0x0013, 0x0015, 0x07ff,
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0019, 0x001b, 0x001d, 0x001f, 0x0021, 0x0023, 0x0025, 0x0027,
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0029, 0x002b, 0x002d, 0x002f, 0x0031, 0x0033, 0x0035, 0x0037,
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0039, 0x003b, 0x003d, 0x003f, 0x0041, 0x0043, 0x0045, 0x0047,
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0049, 0x004b, 0x004d, 0x004f, 0x0051, 0x0053, 0x0055, 0x0057,
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0059, 0x005b, 0x005d, 0x005f, 0x0061, 0x0063, 0x0065, 0x0067,
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0069, 0x006b, 0x006d, 0x006f, 0x0071, 0x0073, 0x0075, 0x0077,
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0079, 0x007b, 0x007d, 0x007f, 0x0081, 0x0083, 0x0085, 0x0087
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong
1400c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCCoeffTokenTables_4[32] = {
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0038, 0x2015, 0x2015, 0x4001, 0x4001, 0x4001, 0x4001,
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x600b, 0x600b, 0x600b, 0x600b, 0x600b, 0x600b, 0x600b, 0x600b,
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0028, 0x0030, 0x0021, 0x0019, 0x2027, 0x2027, 0x0025, 0x0023,
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x201d, 0x201d, 0x201b, 0x201b, 0x0011, 0x001f, 0x0013, 0x0009
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong
1470c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_U16 * armVCM4P10_CAVLCCoeffTokenTables[18] = {
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_0, /* nC=0 */
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_0, /* nC=1 */
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_1, /* nC=2 */
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_1, /* nC=3 */
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_2, /* nC=4 */
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_2, /* nC=5 */
1540c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_2, /* nC=6 */
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_2, /* nC=7 */
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=8 */
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=9 */
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=10 */
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=11 */
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=12 */
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=13 */
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=14 */
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=15 */
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_3, /* nC=16 */
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCCoeffTokenTables_4  /* nC=-1 */
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1670c1bc742181ded4930842b46e9507372f0b1b963James Dong
1680c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_0[40] = {
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0048, 0x0009, 0x0007, 0x2005, 0x2005, 0x2003, 0x2003,
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001,
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0028, 0x0040, 0x0011, 0x000f, 0x0030, 0x0038, 0x0019, 0x0017,
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x27ff, 0x27ff, 0x201f, 0x201f, 0x201d, 0x201d, 0x201b, 0x201b,
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2015, 0x2015, 0x2013, 0x2013, 0x200d, 0x200d, 0x200b, 0x200b
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong
1760c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_1[24] = {
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0028, 0x0011, 0x000f, 0x000d, 0x000b, 0x2009, 0x2009,
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2007, 0x2007, 0x2005, 0x2005, 0x2003, 0x2003, 0x2001, 0x2001,
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x001d, 0x001b, 0x0019, 0x0017, 0x2015, 0x2015, 0x2013, 0x2013
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong
1820c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_2[24] = {
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0028, 0x0011, 0x000b, 0x0009, 0x0001, 0x200f, 0x200f,
1840c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x200d, 0x200d, 0x2007, 0x2007, 0x2005, 0x2005, 0x2003, 0x2003,
1850c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x001b, 0x0017, 0x2019, 0x2019, 0x2015, 0x2015, 0x2013, 0x2013
1860c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong
1880c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_3[24] = {
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0028, 0x0013, 0x000f, 0x0007, 0x0005, 0x2011, 0x2011,
1900c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x200d, 0x200d, 0x200b, 0x200b, 0x2009, 0x2009, 0x2003, 0x2003,
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2019, 0x2019, 0x2017, 0x2017, 0x2015, 0x2015, 0x2001, 0x2001
1920c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong
1940c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_4[20] = {
1950c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0015, 0x0011, 0x0005, 0x0003, 0x0001, 0x200f, 0x200f,
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x200d, 0x200d, 0x200b, 0x200b, 0x2009, 0x2009, 0x2007, 0x2007,
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2017, 0x2017, 0x2013, 0x2013
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong};
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong
2000c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_5[20] = {
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0011, 0x2013, 0x2013, 0x200f, 0x200f, 0x200d, 0x200d,
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x200b, 0x200b, 0x2009, 0x2009, 0x2007, 0x2007, 0x2005, 0x2005,
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0015, 0x0001, 0x2003, 0x2003
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong
2060c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_6[20] = {
2070c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x000f, 0x2011, 0x2011, 0x200d, 0x200d, 0x2009, 0x2009,
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2007, 0x2007, 0x2005, 0x2005, 0x400b, 0x400b, 0x400b, 0x400b,
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0013, 0x0001, 0x2003, 0x2003
2100c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong
2120c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_7[20] = {
2130c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0003, 0x200f, 0x200f, 0x200d, 0x200d, 0x2007, 0x2007,
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x400b, 0x400b, 0x400b, 0x400b, 0x4009, 0x4009, 0x4009, 0x4009,
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0011, 0x0001, 0x2005, 0x2005
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2170c1bc742181ded4930842b46e9507372f0b1b963James Dong
2180c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_8[20] = {
2190c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x0005, 0x200b, 0x200b, 0x400d, 0x400d, 0x400d, 0x400d,
2200c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x4009, 0x4009, 0x4009, 0x4009, 0x4007, 0x4007, 0x4007, 0x4007,
2210c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0003, 0x0001, 0x200f, 0x200f
2220c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2230c1bc742181ded4930842b46e9507372f0b1b963James Dong
2240c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_9[20] = {
2250c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0020, 0x000d, 0x2005, 0x2005, 0x400b, 0x400b, 0x400b, 0x400b,
2260c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x4009, 0x4009, 0x4009, 0x4009, 0x4007, 0x4007, 0x4007, 0x4007,
2270c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2003, 0x2003, 0x2001, 0x2001
2280c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2290c1bc742181ded4930842b46e9507372f0b1b963James Dong
2300c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_10[16] = {
2310c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0001, 0x0003, 0x2005, 0x2005, 0x2007, 0x2007, 0x200b, 0x200b,
2320c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6009, 0x6009, 0x6009, 0x6009, 0x6009, 0x6009, 0x6009, 0x6009
2330c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2340c1bc742181ded4930842b46e9507372f0b1b963James Dong
2350c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_11[16] = {
2360c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0001, 0x0003, 0x2009, 0x2009, 0x4005, 0x4005, 0x4005, 0x4005,
2370c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6007, 0x6007, 0x6007, 0x6007, 0x6007, 0x6007, 0x6007, 0x6007
2380c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2390c1bc742181ded4930842b46e9507372f0b1b963James Dong
2400c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_12[16] = {
2410c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2001, 0x2001, 0x2003, 0x2003, 0x4007, 0x4007, 0x4007, 0x4007,
2420c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6005, 0x6005, 0x6005, 0x6005, 0x6005, 0x6005, 0x6005, 0x6005
2430c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2440c1bc742181ded4930842b46e9507372f0b1b963James Dong
2450c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_13[16] = {
2460c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x4001, 0x4001, 0x4001, 0x4001, 0x4003, 0x4003, 0x4003, 0x4003,
2470c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6005, 0x6005, 0x6005, 0x6005, 0x6005, 0x6005, 0x6005, 0x6005
2480c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2490c1bc742181ded4930842b46e9507372f0b1b963James Dong
2500c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeroTables_14[16] = {
2510c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001,
2520c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003
2530c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2540c1bc742181ded4930842b46e9507372f0b1b963James Dong
2550c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_U16 * armVCM4P10_CAVLCTotalZeroTables[15] = {
2560c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_0,
2570c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_1,
2580c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_2,
2590c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_3,
2600c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_4,
2610c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_5,
2620c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_6,
2630c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_7,
2640c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_8,
2650c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_9,
2660c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_10,
2670c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_11,
2680c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_12,
2690c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_13,
2700c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeroTables_14
2710c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2720c1bc742181ded4930842b46e9507372f0b1b963James Dong
2730c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeros2x2Tables_0[16] = {
2740c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2007, 0x2007, 0x2005, 0x2005, 0x4003, 0x4003, 0x4003, 0x4003,
2750c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001
2760c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2770c1bc742181ded4930842b46e9507372f0b1b963James Dong
2780c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeros2x2Tables_1[16] = {
2790c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x4005, 0x4005, 0x4005, 0x4005, 0x4003, 0x4003, 0x4003, 0x4003,
2800c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001
2810c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2820c1bc742181ded4930842b46e9507372f0b1b963James Dong
2830c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCTotalZeros2x2Tables_2[16] = {
2840c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003,
2850c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001
2860c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2870c1bc742181ded4930842b46e9507372f0b1b963James Dong
2880c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_U16 * armVCM4P10_CAVLCTotalZeros2x2Tables[3] = {
2890c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeros2x2Tables_0,
2900c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeros2x2Tables_1,
2910c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCTotalZeros2x2Tables_2
2920c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2930c1bc742181ded4930842b46e9507372f0b1b963James Dong
2940c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_0[8] = {
2950c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x4003, 0x4003, 0x4003, 0x4003, 0x4001, 0x4001, 0x4001, 0x4001
2960c1bc742181ded4930842b46e9507372f0b1b963James Dong};
2970c1bc742181ded4930842b46e9507372f0b1b963James Dong
2980c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_1[8] = {
2990c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2005, 0x2005, 0x2003, 0x2003, 0x4001, 0x4001, 0x4001, 0x4001
3000c1bc742181ded4930842b46e9507372f0b1b963James Dong};
3010c1bc742181ded4930842b46e9507372f0b1b963James Dong
3020c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_2[8] = {
3030c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x2007, 0x2007, 0x2005, 0x2005, 0x2003, 0x2003, 0x2001, 0x2001
3040c1bc742181ded4930842b46e9507372f0b1b963James Dong};
3050c1bc742181ded4930842b46e9507372f0b1b963James Dong
3060c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_3[8] = {
3070c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0009, 0x0007, 0x2005, 0x2005, 0x2003, 0x2003, 0x2001, 0x2001
3080c1bc742181ded4930842b46e9507372f0b1b963James Dong};
3090c1bc742181ded4930842b46e9507372f0b1b963James Dong
3100c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_4[8] = {
3110c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x000b, 0x0009, 0x0007, 0x0005, 0x2003, 0x2003, 0x2001, 0x2001
3120c1bc742181ded4930842b46e9507372f0b1b963James Dong};
3130c1bc742181ded4930842b46e9507372f0b1b963James Dong
3140c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_5[8] = {
3150c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0003, 0x0005, 0x0009, 0x0007, 0x000d, 0x000b, 0x2001, 0x2001
3160c1bc742181ded4930842b46e9507372f0b1b963James Dong};
3170c1bc742181ded4930842b46e9507372f0b1b963James Dong
3180c1bc742181ded4930842b46e9507372f0b1b963James Dongstatic const OMX_U16 armVCM4P10_CAVLCRunBeforeTables_6[24] = {
3190c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0010, 0x000d, 0x000b, 0x0009, 0x0007, 0x0005, 0x0003, 0x0001,
3200c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0018, 0x0011, 0x200f, 0x200f, 0x0020, 0x0015, 0x2013, 0x2013,
3210c1bc742181ded4930842b46e9507372f0b1b963James Dong    0x0028, 0x0019, 0x2017, 0x2017, 0x07ff, 0x001d, 0x201b, 0x201b
3220c1bc742181ded4930842b46e9507372f0b1b963James Dong};
3230c1bc742181ded4930842b46e9507372f0b1b963James Dong
3240c1bc742181ded4930842b46e9507372f0b1b963James Dong/* Tables 7 to 14 are duplicates of table 6 */
3250c1bc742181ded4930842b46e9507372f0b1b963James Dong
3260c1bc742181ded4930842b46e9507372f0b1b963James Dongconst OMX_U16 * armVCM4P10_CAVLCRunBeforeTables[15] = {
3270c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_0,  /* ZerosLeft=1 */
3280c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_1,
3290c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_2,
3300c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_3,
3310c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_4,
3320c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_5,  /* ZerosLeft=6 */
3330c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=7 */
3340c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=8 */
3350c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=9 */
3360c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=10 */
3370c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=11 */
3380c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=12 */
3390c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=13 */
3400c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6,  /* ZerosLeft=14 */
3410c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P10_CAVLCRunBeforeTables_6   /* ZerosLeft=15 */
3420c1bc742181ded4930842b46e9507372f0b1b963James Dong};
343