1cabdff1aSopenharmony_ci/*
2cabdff1aSopenharmony_ci * RealVideo 4 decoder
3cabdff1aSopenharmony_ci * copyright (c) 2007 Konstantin Shishkov
4cabdff1aSopenharmony_ci *
5cabdff1aSopenharmony_ci * This file is part of FFmpeg.
6cabdff1aSopenharmony_ci *
7cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or
8cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public
9cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either
10cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version.
11cabdff1aSopenharmony_ci *
12cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful,
13cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
14cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15cabdff1aSopenharmony_ci * Lesser General Public License for more details.
16cabdff1aSopenharmony_ci *
17cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public
18cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software
19cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20cabdff1aSopenharmony_ci */
21cabdff1aSopenharmony_ci
22cabdff1aSopenharmony_ci/**
23cabdff1aSopenharmony_ci * @file
24cabdff1aSopenharmony_ci * RV40 VLC tables used for macroblock information decoding
25cabdff1aSopenharmony_ci */
26cabdff1aSopenharmony_ci
27cabdff1aSopenharmony_ci#ifndef AVCODEC_RV40VLC2_H
28cabdff1aSopenharmony_ci#define AVCODEC_RV40VLC2_H
29cabdff1aSopenharmony_ci
30cabdff1aSopenharmony_ci#include <stdint.h>
31cabdff1aSopenharmony_ci
32cabdff1aSopenharmony_ci/**
33cabdff1aSopenharmony_ci * codes used for the first four block types
34cabdff1aSopenharmony_ci */
35cabdff1aSopenharmony_ci//@{
36cabdff1aSopenharmony_ci#define AIC_TOP_BITS  7
37cabdff1aSopenharmony_ci#define AIC_TOP_SIZE 16
38cabdff1aSopenharmony_cistatic const uint8_t rv40_aic_top_vlc_tab[AIC_TOP_SIZE][2] = {
39cabdff1aSopenharmony_ci    { 0x3, 5 }, { 0x2, 5 }, { 0x7, 5 }, { 0x4, 5 }, { 0xF, 3 }, { 0x8, 4 },
40cabdff1aSopenharmony_ci    { 0x1, 4 }, { 0xE, 5 }, { 0xC, 5 }, { 0xB, 6 }, { 0x6, 6 }, { 0x9, 7 },
41cabdff1aSopenharmony_ci    { 0x5, 7 }, { 0xD, 7 }, { 0xA, 7 }, { 0x0, 1 },
42cabdff1aSopenharmony_ci};
43cabdff1aSopenharmony_ci//@}
44cabdff1aSopenharmony_ci
45cabdff1aSopenharmony_ci/**
46cabdff1aSopenharmony_ci * codes used for determining a pair of block types
47cabdff1aSopenharmony_ci */
48cabdff1aSopenharmony_ci//@{
49cabdff1aSopenharmony_ci#define AIC_MODE2_NUM  20
50cabdff1aSopenharmony_ci#define AIC_MODE2_SIZE 81
51cabdff1aSopenharmony_ci#define AIC_MODE2_BITS  9
52cabdff1aSopenharmony_ci
53cabdff1aSopenharmony_cistatic const uint8_t aic_mode2_vlc_syms[AIC_MODE2_NUM][AIC_MODE2_SIZE] = {
54cabdff1aSopenharmony_ci    {
55cabdff1aSopenharmony_ci        0x06, 0x01, 0x28, 0x11, 0x22, 0x20, 0x04, 0x07, 0x05, 0x16, 0x08, 0x60,
56cabdff1aSopenharmony_ci        0x02, 0x66, 0x61, 0x23, 0x15, 0x31, 0x26, 0x77, 0x12, 0x10, 0x42, 0x21,
57cabdff1aSopenharmony_ci        0x72, 0x50, 0x88, 0x82, 0x27, 0x24, 0x44, 0x40, 0x62, 0x55, 0x18, 0x13,
58cabdff1aSopenharmony_ci        0x53, 0x52, 0x64, 0x46, 0x41, 0x51, 0x47, 0x33, 0x32, 0x74, 0x67, 0x14,
59cabdff1aSopenharmony_ci        0x03, 0x30, 0x25, 0x36, 0x34, 0x45, 0x37, 0x78, 0x85, 0x84, 0x75, 0x73,
60cabdff1aSopenharmony_ci        0x57, 0x86, 0x65, 0x58, 0x71, 0x68, 0x70, 0x56, 0x54, 0x17, 0x76, 0x63,
61cabdff1aSopenharmony_ci        0x87, 0x81, 0x80, 0x38, 0x35, 0x48, 0x43, 0x83, 0x00,
62cabdff1aSopenharmony_ci    },
63cabdff1aSopenharmony_ci    {
64cabdff1aSopenharmony_ci        0x77, 0x62, 0x46, 0x33, 0x68, 0x52, 0x18, 0x05, 0x31, 0x25, 0x42, 0x04,
65cabdff1aSopenharmony_ci        0x51, 0x44, 0x40, 0x32, 0x55, 0x41, 0x26, 0x24, 0x30, 0x27, 0x57, 0x36,
66cabdff1aSopenharmony_ci        0x84, 0x76, 0x81, 0x83, 0x78, 0x73, 0x45, 0x85, 0x75, 0x86, 0x87, 0x56,
67cabdff1aSopenharmony_ci        0x53, 0x80, 0x67, 0x35, 0x34, 0x43, 0x37, 0x82, 0x70, 0x65, 0x74, 0x71,
68cabdff1aSopenharmony_ci        0x54, 0x48, 0x63, 0x58, 0x72, 0x64, 0x07, 0x03, 0x47, 0x38, 0x88, 0x20,
69cabdff1aSopenharmony_ci        0x01, 0x60, 0x28, 0x16, 0x02, 0x61, 0x50, 0x13, 0x08, 0x23, 0x17, 0x66,
70cabdff1aSopenharmony_ci        0x14, 0x06, 0x21, 0x15, 0x10, 0x00, 0x22, 0x12, 0x11,
71cabdff1aSopenharmony_ci    },
72cabdff1aSopenharmony_ci    {
73cabdff1aSopenharmony_ci        0x10, 0x01, 0x24, 0x12, 0x88, 0x83, 0x70, 0x14, 0x08, 0x46, 0x25, 0x87,
74cabdff1aSopenharmony_ci        0x44, 0x42, 0x60, 0x50, 0x61, 0x51, 0x71, 0x66, 0x15, 0x04, 0x41, 0x33,
75cabdff1aSopenharmony_ci        0x17, 0x03, 0x34, 0x18, 0x86, 0x68, 0x67, 0x63, 0x57, 0x75, 0x65, 0x45,
76cabdff1aSopenharmony_ci        0x36, 0x58, 0x54, 0x43, 0x37, 0x56, 0x53, 0x74, 0x62, 0x85, 0x78, 0x07,
77cabdff1aSopenharmony_ci        0x05, 0x35, 0x13, 0x84, 0x64, 0x55, 0x76, 0x73, 0x47, 0x38, 0x52, 0x48,
78cabdff1aSopenharmony_ci        0x11, 0x00, 0x21, 0x20, 0x82, 0x28, 0x81, 0x80, 0x31, 0x30, 0x40, 0x32,
79cabdff1aSopenharmony_ci        0x16, 0x06, 0x26, 0x23, 0x27, 0x02, 0x77, 0x72, 0x22,
80cabdff1aSopenharmony_ci    },
81cabdff1aSopenharmony_ci    {
82cabdff1aSopenharmony_ci        0x88, 0x82, 0x50, 0x47, 0x74, 0x43, 0x76, 0x75, 0x68, 0x24, 0x00, 0x37,
83cabdff1aSopenharmony_ci        0x30, 0x54, 0x44, 0x64, 0x58, 0x36, 0x34, 0x65, 0x40, 0x06, 0x03, 0x20,
84cabdff1aSopenharmony_ci        0x17, 0x08, 0x04, 0x48, 0x45, 0x87, 0x84, 0x71, 0x85, 0x78, 0x80, 0x73,
85cabdff1aSopenharmony_ci        0x07, 0x86, 0x63, 0x57, 0x70, 0x67, 0x77, 0x72, 0x83, 0x81, 0x32, 0x28,
86cabdff1aSopenharmony_ci        0x18, 0x05, 0x42, 0x38, 0x52, 0x14, 0x02, 0x25, 0x23, 0x66, 0x56, 0x53,
87cabdff1aSopenharmony_ci        0x62, 0x60, 0x35, 0x33, 0x46, 0x41, 0x21, 0x12, 0x10, 0x01, 0x26, 0x13,
88cabdff1aSopenharmony_ci        0x61, 0x22, 0x16, 0x27, 0x15, 0x55, 0x31, 0x51, 0x11,
89cabdff1aSopenharmony_ci    },
90cabdff1aSopenharmony_ci    {
91cabdff1aSopenharmony_ci        0x13, 0x10, 0x27, 0x14, 0x66, 0x44, 0x41, 0x53, 0x46, 0x25, 0x18, 0x35,
92cabdff1aSopenharmony_ci        0x33, 0x68, 0x63, 0x88, 0x71, 0x34, 0x24, 0x50, 0x47, 0x37, 0x08, 0x48,
93cabdff1aSopenharmony_ci        0x45, 0x82, 0x74, 0x70, 0x84, 0x76, 0x30, 0x04, 0x57, 0x43, 0x83, 0x78,
94cabdff1aSopenharmony_ci        0x86, 0x85, 0x73, 0x07, 0x80, 0x75, 0x87, 0x65, 0x56, 0x03, 0x00, 0x20,
95cabdff1aSopenharmony_ci        0x06, 0x72, 0x52, 0x31, 0x62, 0x60, 0x21, 0x15, 0x51, 0x22, 0x16, 0x12,
96cabdff1aSopenharmony_ci        0x02, 0x01, 0x23, 0x17, 0x55, 0x77, 0x64, 0x58, 0x54, 0x81, 0x67, 0x36,
97cabdff1aSopenharmony_ci        0x05, 0x40, 0x38, 0x28, 0x26, 0x42, 0x32, 0x61, 0x11,
98cabdff1aSopenharmony_ci    },
99cabdff1aSopenharmony_ci    {
100cabdff1aSopenharmony_ci        0x22, 0x11, 0x23, 0x13, 0x32, 0x25, 0x72, 0x45, 0x40, 0x57, 0x50, 0x03,
101cabdff1aSopenharmony_ci        0x00, 0x30, 0x08, 0x86, 0x75, 0x80, 0x68, 0x43, 0x04, 0x47, 0x07, 0x48,
102cabdff1aSopenharmony_ci        0x65, 0x58, 0x85, 0x84, 0x78, 0x64, 0x67, 0x63, 0x74, 0x73, 0x06, 0x05,
103cabdff1aSopenharmony_ci        0x44, 0x37, 0x87, 0x83, 0x46, 0x42, 0x54, 0x53, 0x18, 0x17, 0x36, 0x34,
104cabdff1aSopenharmony_ci        0x66, 0x55, 0x38, 0x24, 0x56, 0x41, 0x02, 0x01, 0x20, 0x14, 0x16, 0x12,
105cabdff1aSopenharmony_ci        0x61, 0x27, 0x26, 0x15, 0x31, 0x28, 0x21, 0x88, 0x82, 0x62, 0x60, 0x76,
106cabdff1aSopenharmony_ci        0x70, 0x33, 0x10, 0x52, 0x35, 0x71, 0x51, 0x81, 0x77,
107cabdff1aSopenharmony_ci    },
108cabdff1aSopenharmony_ci    {
109cabdff1aSopenharmony_ci        0x16, 0x12, 0x61, 0x22, 0x51, 0x21, 0x15, 0x52, 0x31, 0x55, 0x81, 0x66,
110cabdff1aSopenharmony_ci        0x46, 0x42, 0x62, 0x54, 0x14, 0x01, 0x25, 0x23, 0x27, 0x13, 0x56, 0x41,
111cabdff1aSopenharmony_ci        0x35, 0x33, 0x58, 0x53, 0x26, 0x10, 0x32, 0x28, 0x84, 0x77, 0x43, 0x00,
112cabdff1aSopenharmony_ci        0x68, 0x47, 0x85, 0x45, 0x34, 0x57, 0x50, 0x05, 0x03, 0x37, 0x30, 0x87,
113cabdff1aSopenharmony_ci        0x86, 0x76, 0x08, 0x07, 0x80, 0x75, 0x70, 0x73, 0x04, 0x78, 0x74, 0x63,
114cabdff1aSopenharmony_ci        0x48, 0x71, 0x67, 0x82, 0x65, 0x17, 0x06, 0x24, 0x20, 0x88, 0x83, 0x60,
115cabdff1aSopenharmony_ci        0x44, 0x40, 0x72, 0x64, 0x18, 0x02, 0x38, 0x36, 0x11,
116cabdff1aSopenharmony_ci    },
117cabdff1aSopenharmony_ci    {
118cabdff1aSopenharmony_ci        0x66, 0x01, 0x14, 0x03, 0x24, 0x23, 0x62, 0x08, 0x04, 0x35, 0x20, 0x72,
119cabdff1aSopenharmony_ci        0x63, 0x58, 0x70, 0x68, 0x48, 0x45, 0x54, 0x53, 0x26, 0x25, 0x65, 0x44,
120cabdff1aSopenharmony_ci        0x13, 0x05, 0x51, 0x41, 0x61, 0x16, 0x12, 0x10, 0x06, 0x28, 0x27, 0x60,
121cabdff1aSopenharmony_ci        0x40, 0x32, 0x56, 0x52, 0x17, 0x00, 0x31, 0x18, 0x73, 0x30, 0x75, 0x74,
122cabdff1aSopenharmony_ci        0x88, 0x84, 0x83, 0x86, 0x80, 0x85, 0x43, 0x38, 0x87, 0x47, 0x76, 0x71,
123cabdff1aSopenharmony_ci        0x50, 0x37, 0x78, 0x57, 0x82, 0x77, 0x67, 0x33, 0x07, 0x36, 0x34, 0x81,
124cabdff1aSopenharmony_ci        0x46, 0x42, 0x64, 0x55, 0x15, 0x02, 0x22, 0x21, 0x11,
125cabdff1aSopenharmony_ci    },
126cabdff1aSopenharmony_ci    {
127cabdff1aSopenharmony_ci        0x22, 0x00, 0x11, 0x01, 0x20, 0x08, 0x88, 0x62, 0x27, 0x02, 0x07, 0x06,
128cabdff1aSopenharmony_ci        0x21, 0x12, 0x28, 0x87, 0x66, 0x32, 0x30, 0x38, 0x33, 0x15, 0x14, 0x25,
129cabdff1aSopenharmony_ci        0x17, 0x26, 0x24, 0x60, 0x42, 0x78, 0x71, 0x84, 0x81, 0x44, 0x23, 0x52,
130cabdff1aSopenharmony_ci        0x50, 0x80, 0x70, 0x35, 0x13, 0x48, 0x46, 0x83, 0x51, 0x40, 0x64, 0x61,
131cabdff1aSopenharmony_ci        0x55, 0x47, 0x74, 0x58, 0x18, 0x03, 0x41, 0x31, 0x73, 0x68, 0x43, 0x36,
132cabdff1aSopenharmony_ci        0x57, 0x45, 0x85, 0x56, 0x54, 0x67, 0x65, 0x76, 0x75, 0x37, 0x34, 0x63,
133cabdff1aSopenharmony_ci        0x53, 0x86, 0x77, 0x72, 0x05, 0x04, 0x16, 0x10, 0x82,
134cabdff1aSopenharmony_ci    },
135cabdff1aSopenharmony_ci    {
136cabdff1aSopenharmony_ci        0x22, 0x12, 0x27, 0x21, 0x14, 0x01, 0x20, 0x15, 0x62, 0x02, 0x00, 0x16,
137cabdff1aSopenharmony_ci        0x10, 0x60, 0x17, 0x72, 0x66, 0x28, 0x07, 0x06, 0x18, 0x13, 0x82, 0x55,
138cabdff1aSopenharmony_ci        0x40, 0x78, 0x71, 0x25, 0x23, 0x32, 0x31, 0x42, 0x26, 0x61, 0x52, 0x24,
139cabdff1aSopenharmony_ci        0x08, 0x50, 0x44, 0x77, 0x37, 0x34, 0x63, 0x57, 0x87, 0x84, 0x80, 0x86,
140cabdff1aSopenharmony_ci        0x83, 0x45, 0x36, 0x85, 0x73, 0x70, 0x68, 0x81, 0x74, 0x33, 0x03, 0x38,
141cabdff1aSopenharmony_ci        0x35, 0x88, 0x56, 0x54, 0x76, 0x75, 0x46, 0x43, 0x53, 0x48, 0x64, 0x51,
142cabdff1aSopenharmony_ci        0x58, 0x47, 0x67, 0x65, 0x05, 0x04, 0x41, 0x30, 0x11,
143cabdff1aSopenharmony_ci    },
144cabdff1aSopenharmony_ci    {
145cabdff1aSopenharmony_ci        0x44, 0x40, 0x66, 0x60, 0x23, 0x16, 0x32, 0x30, 0x07, 0x06, 0x18, 0x14,
146cabdff1aSopenharmony_ci        0x86, 0x50, 0x47, 0x75, 0x55, 0x33, 0x31, 0x41, 0x35, 0x80, 0x70, 0x84,
147cabdff1aSopenharmony_ci        0x83, 0x78, 0x71, 0x87, 0x81, 0x77, 0x12, 0x38, 0x25, 0x52, 0x51, 0x08,
148cabdff1aSopenharmony_ci        0x01, 0x17, 0x15, 0x58, 0x54, 0x68, 0x67, 0x34, 0x13, 0x48, 0x46, 0x04,
149cabdff1aSopenharmony_ci        0x03, 0x36, 0x05, 0x85, 0x56, 0x45, 0x65, 0x57, 0x73, 0x43, 0x37, 0x63,
150cabdff1aSopenharmony_ci        0x53, 0x64, 0x61, 0x76, 0x74, 0x24, 0x10, 0x62, 0x42, 0x21, 0x11, 0x02,
151cabdff1aSopenharmony_ci        0x00, 0x26, 0x20, 0x88, 0x28, 0x27, 0x82, 0x72, 0x22,
152cabdff1aSopenharmony_ci    },
153cabdff1aSopenharmony_ci    {
154cabdff1aSopenharmony_ci        0x28, 0x27, 0x71, 0x70, 0x87, 0x78, 0x82, 0x22, 0x77, 0x72, 0x07, 0x01,
155cabdff1aSopenharmony_ci        0x14, 0x08, 0x81, 0x66, 0x62, 0x80, 0x75, 0x40, 0x25, 0x51, 0x50, 0x02,
156cabdff1aSopenharmony_ci        0x00, 0x26, 0x20, 0x42, 0x24, 0x52, 0x44, 0x16, 0x10, 0x23, 0x17, 0x64,
157cabdff1aSopenharmony_ci        0x60, 0x86, 0x83, 0x46, 0x41, 0x55, 0x54, 0x48, 0x47, 0x58, 0x56, 0x18,
158cabdff1aSopenharmony_ci        0x04, 0x35, 0x31, 0x57, 0x38, 0x34, 0x03, 0x63, 0x53, 0x67, 0x13, 0x05,
159cabdff1aSopenharmony_ci        0x36, 0x33, 0x73, 0x61, 0x43, 0x37, 0x68, 0x65, 0x45, 0x85, 0x76, 0x74,
160cabdff1aSopenharmony_ci        0x15, 0x06, 0x32, 0x30, 0x84, 0x12, 0x11, 0x88, 0x21,
161cabdff1aSopenharmony_ci    },
162cabdff1aSopenharmony_ci    {
163cabdff1aSopenharmony_ci        0x82, 0x27, 0x08, 0x07, 0x16, 0x10, 0x62, 0x76, 0x74, 0x50, 0x41, 0x86,
164cabdff1aSopenharmony_ci        0x67, 0x15, 0x14, 0x38, 0x17, 0x40, 0x23, 0x61, 0x42, 0x11, 0x02, 0x26,
165cabdff1aSopenharmony_ci        0x20, 0x72, 0x77, 0x28, 0x12, 0x01, 0x60, 0x24, 0x88, 0x52, 0x44, 0x75,
166cabdff1aSopenharmony_ci        0x64, 0x25, 0x06, 0x32, 0x30, 0x55, 0x51, 0x68, 0x58, 0x46, 0x33, 0x48,
167cabdff1aSopenharmony_ci        0x47, 0x43, 0x37, 0x56, 0x54, 0x13, 0x03, 0x35, 0x34, 0x85, 0x73, 0x65,
168cabdff1aSopenharmony_ci        0x63, 0x45, 0x36, 0x57, 0x53, 0x83, 0x80, 0x05, 0x04, 0x31, 0x18, 0x84,
169cabdff1aSopenharmony_ci        0x70, 0x66, 0x87, 0x81, 0x21, 0x00, 0x78, 0x71, 0x22,
170cabdff1aSopenharmony_ci    },
171cabdff1aSopenharmony_ci    {
172cabdff1aSopenharmony_ci        0x84, 0x81, 0x32, 0x25, 0x86, 0x83, 0x10, 0x04, 0x23, 0x14, 0x62, 0x26,
173cabdff1aSopenharmony_ci        0x70, 0x66, 0x42, 0x24, 0x64, 0x44, 0x87, 0x75, 0x71, 0x85, 0x80, 0x55,
174cabdff1aSopenharmony_ci        0x52, 0x67, 0x61, 0x50, 0x48, 0x58, 0x51, 0x18, 0x15, 0x38, 0x30, 0x33,
175cabdff1aSopenharmony_ci        0x31, 0x65, 0x41, 0x05, 0x03, 0x13, 0x08, 0x37, 0x36, 0x53, 0x43, 0x60,
176cabdff1aSopenharmony_ci        0x73, 0x68, 0x63, 0x57, 0x45, 0x35, 0x56, 0x54, 0x78, 0x76, 0x40, 0x34,
177cabdff1aSopenharmony_ci        0x47, 0x46, 0x06, 0x01, 0x17, 0x07, 0x77, 0x28, 0x02, 0x00, 0x12, 0x11,
178cabdff1aSopenharmony_ci        0x88, 0x72, 0x27, 0x20, 0x16, 0x74, 0x21, 0x82, 0x22,
179cabdff1aSopenharmony_ci    },
180cabdff1aSopenharmony_ci    {
181cabdff1aSopenharmony_ci        0x77, 0x12, 0x81, 0x78, 0x72, 0x38, 0x33, 0x50, 0x44, 0x23, 0x01, 0x31,
182cabdff1aSopenharmony_ci        0x25, 0x34, 0x13, 0x37, 0x35, 0x86, 0x58, 0x55, 0x73, 0x68, 0x43, 0x04,
183cabdff1aSopenharmony_ci        0x54, 0x53, 0x64, 0x46, 0x65, 0x63, 0x57, 0x45, 0x67, 0x05, 0x03, 0x56,
184cabdff1aSopenharmony_ci        0x36, 0x62, 0x52, 0x83, 0x66, 0x42, 0x32, 0x80, 0x71, 0x10, 0x08, 0x24,
185cabdff1aSopenharmony_ci        0x16, 0x87, 0x18, 0x17, 0x47, 0x41, 0x07, 0x06, 0x15, 0x14, 0x75, 0x74,
186cabdff1aSopenharmony_ci        0x85, 0x76, 0x51, 0x48, 0x61, 0x60, 0x40, 0x30, 0x84, 0x70, 0x22, 0x82,
187cabdff1aSopenharmony_ci        0x28, 0x21, 0x11, 0x02, 0x00, 0x26, 0x20, 0x27, 0x88,
188cabdff1aSopenharmony_ci    },
189cabdff1aSopenharmony_ci    {
190cabdff1aSopenharmony_ci        0x72, 0x27, 0x87, 0x81, 0x42, 0x33, 0x52, 0x50, 0x16, 0x08, 0x31, 0x23,
191cabdff1aSopenharmony_ci        0x02, 0x00, 0x78, 0x20, 0x82, 0x88, 0x28, 0x38, 0x32, 0x71, 0x62, 0x24,
192cabdff1aSopenharmony_ci        0x10, 0x30, 0x26, 0x64, 0x61, 0x76, 0x75, 0x44, 0x18, 0x58, 0x55, 0x54,
193cabdff1aSopenharmony_ci        0x48, 0x45, 0x43, 0x57, 0x46, 0x73, 0x35, 0x34, 0x37, 0x36, 0x04, 0x03,
194cabdff1aSopenharmony_ci        0x13, 0x05, 0x85, 0x65, 0x63, 0x68, 0x67, 0x47, 0x41, 0x56, 0x53, 0x70,
195cabdff1aSopenharmony_ci        0x60, 0x07, 0x06, 0x15, 0x14, 0x84, 0x83, 0x80, 0x66, 0x51, 0x86, 0x74,
196cabdff1aSopenharmony_ci        0x17, 0x01, 0x40, 0x25, 0x12, 0x11, 0x77, 0x21, 0x22,
197cabdff1aSopenharmony_ci    },
198cabdff1aSopenharmony_ci    {
199cabdff1aSopenharmony_ci        0x27, 0x21, 0x88, 0x72, 0x28, 0x12, 0x11, 0x83, 0x77, 0x82, 0x80, 0x78,
200cabdff1aSopenharmony_ci        0x25, 0x24, 0x38, 0x32, 0x08, 0x01, 0x18, 0x16, 0x20, 0x02, 0x26, 0x23,
201cabdff1aSopenharmony_ci        0x81, 0x74, 0x86, 0x84, 0x10, 0x00, 0x62, 0x61, 0x04, 0x03, 0x13, 0x06,
202cabdff1aSopenharmony_ci        0x76, 0x58, 0x51, 0x64, 0x60, 0x31, 0x17, 0x41, 0x35, 0x44, 0x42, 0x70,
203cabdff1aSopenharmony_ci        0x66, 0x33, 0x15, 0x48, 0x40, 0x87, 0x65, 0x55, 0x67, 0x63, 0x54, 0x07,
204cabdff1aSopenharmony_ci        0x57, 0x56, 0x46, 0x45, 0x50, 0x47, 0x73, 0x68, 0x30, 0x14, 0x53, 0x43,
205cabdff1aSopenharmony_ci        0x75, 0x71, 0x52, 0x34, 0x05, 0x37, 0x36, 0x85, 0x22,
206cabdff1aSopenharmony_ci    },
207cabdff1aSopenharmony_ci    {
208cabdff1aSopenharmony_ci        0x21, 0x14, 0x32, 0x27, 0x10, 0x72, 0x67, 0x82, 0x77, 0x44, 0x40, 0x54,
209cabdff1aSopenharmony_ci        0x45, 0x41, 0x37, 0x68, 0x56, 0x08, 0x01, 0x24, 0x13, 0x78, 0x48, 0x04,
210cabdff1aSopenharmony_ci        0x03, 0x43, 0x05, 0x81, 0x25, 0x07, 0x47, 0x35, 0x34, 0x06, 0x46, 0x36,
211cabdff1aSopenharmony_ci        0x88, 0x84, 0x83, 0x75, 0x74, 0x76, 0x73, 0x86, 0x85, 0x70, 0x65, 0x80,
212cabdff1aSopenharmony_ci        0x71, 0x57, 0x53, 0x87, 0x63, 0x51, 0x50, 0x23, 0x18, 0x33, 0x31, 0x61,
213cabdff1aSopenharmony_ci        0x12, 0x62, 0x22, 0x02, 0x00, 0x17, 0x15, 0x66, 0x55, 0x42, 0x64, 0x58,
214cabdff1aSopenharmony_ci        0x26, 0x20, 0x38, 0x30, 0x28, 0x16, 0x60, 0x52, 0x11,
215cabdff1aSopenharmony_ci    },
216cabdff1aSopenharmony_ci    {
217cabdff1aSopenharmony_ci        0x61, 0x15, 0x27, 0x25, 0x32, 0x28, 0x06, 0x01, 0x24, 0x17, 0x78, 0x75,
218cabdff1aSopenharmony_ci        0x87, 0x80, 0x85, 0x08, 0x07, 0x73, 0x70, 0x48, 0x47, 0x84, 0x83, 0x81,
219cabdff1aSopenharmony_ci        0x71, 0x88, 0x86, 0x76, 0x74, 0x30, 0x04, 0x43, 0x37, 0x82, 0x72, 0x67,
220cabdff1aSopenharmony_ci        0x20, 0x03, 0x57, 0x45, 0x77, 0x52, 0x36, 0x41, 0x38, 0x68, 0x58, 0x05,
221cabdff1aSopenharmony_ci        0x00, 0x34, 0x33, 0x55, 0x26, 0x60, 0x56, 0x11, 0x66, 0x16, 0x64, 0x51,
222cabdff1aSopenharmony_ci        0x10, 0x02, 0x23, 0x18, 0x62, 0x54, 0x53, 0x65, 0x63, 0x40, 0x35, 0x50,
223cabdff1aSopenharmony_ci        0x42, 0x31, 0x13, 0x46, 0x44, 0x14, 0x12, 0x22, 0x21,
224cabdff1aSopenharmony_ci    },
225cabdff1aSopenharmony_ci    {
226cabdff1aSopenharmony_ci        0x22, 0x21, 0x12, 0x01, 0x16, 0x15, 0x82, 0x88, 0x87, 0x42, 0x40, 0x60,
227cabdff1aSopenharmony_ci        0x44, 0x06, 0x05, 0x31, 0x10, 0x66, 0x61, 0x83, 0x76, 0x26, 0x25, 0x72,
228cabdff1aSopenharmony_ci        0x27, 0x81, 0x11, 0x46, 0x41, 0x84, 0x62, 0x13, 0x02, 0x24, 0x20, 0x80,
229cabdff1aSopenharmony_ci        0x75, 0x65, 0x63, 0x68, 0x54, 0x37, 0x07, 0x57, 0x30, 0x50, 0x52, 0x48,
230cabdff1aSopenharmony_ci        0x73, 0x67, 0x74, 0x55, 0x53, 0x47, 0x58, 0x56, 0x34, 0x04, 0x43, 0x38,
231cabdff1aSopenharmony_ci        0x70, 0x64, 0x17, 0x00, 0x45, 0x36, 0x78, 0x86, 0x85, 0x33, 0x32, 0x51,
232cabdff1aSopenharmony_ci        0x35, 0x08, 0x03, 0x18, 0x14, 0x28, 0x23, 0x77, 0x71,
233cabdff1aSopenharmony_ci    },
234cabdff1aSopenharmony_ci};
235cabdff1aSopenharmony_ci
236cabdff1aSopenharmony_cistatic const uint8_t aic_mode2_vlc_bits[AIC_MODE2_NUM][AIC_MODE2_SIZE] = {
237cabdff1aSopenharmony_ci    {
238cabdff1aSopenharmony_ci         5,  5,  5,  5,  3,  6,  6,  8,  8,  8,  8,  6,  4,  7,  7,  9,  9,
239cabdff1aSopenharmony_ci         9,  9,  7,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8,  9,  9,
240cabdff1aSopenharmony_ci        11, 11, 11, 11,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
241cabdff1aSopenharmony_ci        14, 14, 14, 14, 12, 13, 13, 15, 15, 14, 13, 12, 12, 12, 12, 11, 11,
242cabdff1aSopenharmony_ci        13, 13, 13, 13, 11, 10, 10, 12, 12, 12, 12, 10,  1,
243cabdff1aSopenharmony_ci    },
244cabdff1aSopenharmony_ci    {
245cabdff1aSopenharmony_ci         8,  8, 10, 10, 10, 10, 10, 10, 10, 10,  8,  8,  8,  8,  9,  9,  9,
246cabdff1aSopenharmony_ci         9,  9,  9,  9,  9, 13, 13, 13, 13, 11, 12, 12, 14, 14, 15, 15, 14,
247cabdff1aSopenharmony_ci        12, 11, 11, 11, 11, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12, 12,
248cabdff1aSopenharmony_ci        12,  9,  9, 11, 11, 11, 11,  9,  6,  6,  6,  6,  5,  5,  7,  7,  9,
249cabdff1aSopenharmony_ci         9,  9,  9,  7,  7,  7,  7,  7,  4,  4,  4,  4,  1,
250cabdff1aSopenharmony_ci    },
251cabdff1aSopenharmony_ci    {
252cabdff1aSopenharmony_ci         7,  7,  7,  7,  5,  8,  8, 10, 10, 10, 10,  8,  8,  8,  8,  8,  9,
253cabdff1aSopenharmony_ci         9,  9,  9,  9,  9,  9,  9, 12, 12, 12, 12, 10, 13, 13, 14, 14, 14,
254cabdff1aSopenharmony_ci        14, 13, 13, 13, 13, 12, 12, 12, 12, 10, 10, 10, 10, 11, 11, 11, 11,
255cabdff1aSopenharmony_ci         9, 11, 11, 11, 11, 11, 11, 11, 11,  5,  5,  5,  5,  4,  4,  6,  6,
256cabdff1aSopenharmony_ci         8,  8,  8,  8,  8,  8,  8,  8,  6,  6,  6,  6,  1,
257cabdff1aSopenharmony_ci    },
258cabdff1aSopenharmony_ci    {
259cabdff1aSopenharmony_ci         9,  9, 11, 11, 13, 13, 13, 13, 11, 11, 11, 11, 11,  9,  9,  9,  9,
260cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 10, 12, 12, 13, 13,
261cabdff1aSopenharmony_ci        15, 15, 14, 13, 12, 12, 12, 12, 10, 10, 10, 10,  7,  7,  9,  9,  9,
262cabdff1aSopenharmony_ci         9,  7,  8,  8,  8,  8,  6,  8,  8,  8,  8,  8,  8,  8,  8,  5,  5,
263cabdff1aSopenharmony_ci         7,  7,  7,  7,  5,  4,  4,  6,  6,  6,  6,  4,  1,
264cabdff1aSopenharmony_ci    },
265cabdff1aSopenharmony_ci    {
266cabdff1aSopenharmony_ci         7,  7,  7,  7,  5,  9,  9,  9,  9,  9,  9,  9,  9, 11, 11, 11, 11,
267cabdff1aSopenharmony_ci        11, 11, 11, 11, 12, 12, 12, 12, 10, 13, 13, 13, 13, 13, 13, 13, 13,
268cabdff1aSopenharmony_ci        12, 12, 14, 14, 15, 15, 15, 15, 12,  9,  9, 11, 11, 11, 11,  9,  7,
269cabdff1aSopenharmony_ci         7,  7,  7,  5,  5,  5,  5,  4,  4,  8,  8,  8,  8,  6,  8,  8, 10,
270cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 10, 10,  8,  8,  8,  8,  4,  1,
271cabdff1aSopenharmony_ci    },
272cabdff1aSopenharmony_ci    {
273cabdff1aSopenharmony_ci         2,  2,  7,  7,  7,  7,  5, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11,
274cabdff1aSopenharmony_ci        12, 12, 13, 13, 14, 14, 13, 10, 10, 10, 10,  9,  9, 11, 11, 11, 11,
275cabdff1aSopenharmony_ci        11, 11, 11, 11,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10,  7,  7,  9,
276cabdff1aSopenharmony_ci         9,  9,  9,  9,  9,  9,  9,  5,  5,  5,  5,  6,  6,  6,  6,  4,  6,
277cabdff1aSopenharmony_ci         6,  8,  8,  8,  8,  8,  8,  8,  8,  6,  6,  6,  6,
278cabdff1aSopenharmony_ci    },
279cabdff1aSopenharmony_ci    {
280cabdff1aSopenharmony_ci         5,  5,  5,  5,  3,  6,  6,  6,  6,  4,  7,  7,  9,  9,  9,  9,  9,
281cabdff1aSopenharmony_ci         9,  9,  9,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8, 11, 11,
282cabdff1aSopenharmony_ci        13, 13, 13, 13, 11, 11, 11, 11, 11, 12, 12, 12, 12, 10, 12, 12, 15,
283cabdff1aSopenharmony_ci        15, 15, 15, 13, 14, 14, 14, 14, 12, 12, 12, 12,  9,  9, 11, 11, 11,
284cabdff1aSopenharmony_ci        11,  9,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10,  1,
285cabdff1aSopenharmony_ci    },
286cabdff1aSopenharmony_ci    {
287cabdff1aSopenharmony_ci         5,  5,  9,  9,  9,  9,  7, 11, 11, 11, 11,  9, 11, 11, 11, 11, 11,
288cabdff1aSopenharmony_ci        11, 11, 11,  9,  9,  9,  9,  7,  7,  7,  7,  3,  4,  4,  8,  8,  8,
289cabdff1aSopenharmony_ci         8,  6, 10, 10, 10, 10, 10, 10, 10, 10, 14, 14, 14, 14, 12, 13, 13,
290cabdff1aSopenharmony_ci        14, 14, 13, 12, 12, 12, 12, 11, 11, 13, 13, 13, 13, 11, 10, 10, 12,
291cabdff1aSopenharmony_ci        12, 12, 12, 10,  8,  8,  8,  8,  6,  6,  6,  6,  1,
292cabdff1aSopenharmony_ci    },
293cabdff1aSopenharmony_ci    {
294cabdff1aSopenharmony_ci         2,  2,  5,  5,  7,  7,  7,  7,  5,  3,  6,  6,  6,  6,  4,  8,  8,
295cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 10, 10, 10,  8,  8,  8,  8,  9,  9,  9,  9,  9,
296cabdff1aSopenharmony_ci         9,  9,  9, 10, 10, 12, 12, 12, 12, 10, 10, 10, 10, 10, 11, 11, 11,
297cabdff1aSopenharmony_ci        11, 11, 11, 11, 11, 12, 12, 14, 14, 14, 14, 12, 12, 12, 12, 12, 11,
298cabdff1aSopenharmony_ci        11, 13, 13, 13, 13, 11,  6,  6,  8,  8,  8,  8,  6,
299cabdff1aSopenharmony_ci    },
300cabdff1aSopenharmony_ci    {
301cabdff1aSopenharmony_ci         3,  3,  6,  6,  8,  8,  8,  8,  6,  6,  6,  6,  6,  7,  7,  7,  7,
302cabdff1aSopenharmony_ci         5, 10, 10, 10, 10,  8, 10, 10, 10, 10, 10, 10, 10, 10,  8,  8,  8,
303cabdff1aSopenharmony_ci         8,  9,  9,  9,  9,  7, 13, 13, 13, 13, 11, 12, 12, 13, 13, 14, 14,
304cabdff1aSopenharmony_ci        14, 14, 11, 11, 11, 11, 12, 12, 12, 12, 10, 12, 12, 12, 12, 12, 12,
305cabdff1aSopenharmony_ci        12, 12,  9,  9, 11, 11, 11, 11, 11, 11, 11, 11,  1,
306cabdff1aSopenharmony_ci    },
307cabdff1aSopenharmony_ci    {
308cabdff1aSopenharmony_ci         9,  9,  9,  9,  9,  9,  9,  9, 11, 11, 11, 11,  9, 11, 11, 11, 11,
309cabdff1aSopenharmony_ci        11, 11, 11, 11,  9,  9,  9,  9,  7,  7,  7,  7,  6,  6, 10, 10, 10,
310cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
311cabdff1aSopenharmony_ci        11, 14, 14, 14, 14, 12, 13, 13, 13, 13, 10, 10, 10, 10,  8,  8,  8,
312cabdff1aSopenharmony_ci         8,  5,  5,  7,  7,  7,  7,  5,  4,  4,  4,  4,  1,
313cabdff1aSopenharmony_ci    },
314cabdff1aSopenharmony_ci    {
315cabdff1aSopenharmony_ci         4,  4,  6,  6,  6,  6,  4,  2,  3,  3,  9,  9,  9,  9,  7,  9,  9,
316cabdff1aSopenharmony_ci         9,  9,  9,  9,  9,  9,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,
317cabdff1aSopenharmony_ci         8, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11,
318cabdff1aSopenharmony_ci        12, 12, 14, 14, 14, 14, 12, 12, 12, 12, 12, 11, 11, 13, 13, 14, 14,
319cabdff1aSopenharmony_ci        13, 11,  8,  8, 10, 10, 10, 10,  8,  5,  5,  5,  5,
320cabdff1aSopenharmony_ci    },
321cabdff1aSopenharmony_ci    {
322cabdff1aSopenharmony_ci         5,  5,  9,  9,  9,  9,  7,  9,  9, 11, 11, 11, 11, 11, 11, 11, 11,
323cabdff1aSopenharmony_ci         9,  9,  9,  9,  7,  7,  7,  7,  3,  4,  4,  8,  8,  8,  8,  6, 10,
324cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13,
325cabdff1aSopenharmony_ci        13, 13, 13, 13, 13, 13, 12, 12, 13, 13, 14, 14, 14, 14, 10, 10, 12,
326cabdff1aSopenharmony_ci        12, 12, 12, 10,  8,  8,  8,  8,  6,  6,  6,  6,  1,
327cabdff1aSopenharmony_ci    },
328cabdff1aSopenharmony_ci    {
329cabdff1aSopenharmony_ci         7,  7,  9,  9,  9,  9,  9,  9,  9,  9,  7,  7,  7,  7,  8,  8,  8,
330cabdff1aSopenharmony_ci         8,  6, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
331cabdff1aSopenharmony_ci        11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 11, 12, 12, 13,
332cabdff1aSopenharmony_ci        13, 14, 14, 14, 14,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10,  5,  5,
333cabdff1aSopenharmony_ci         7,  7,  7,  7,  5,  4,  4,  6,  6,  6,  6,  4,  1,
334cabdff1aSopenharmony_ci    },
335cabdff1aSopenharmony_ci    {
336cabdff1aSopenharmony_ci         6,  6,  6,  6,  4,  9,  9,  9,  9,  9,  9,  9,  9, 11, 11, 11, 11,
337cabdff1aSopenharmony_ci         9, 12, 12, 12, 12, 12, 12, 12, 12, 11, 11, 13, 13, 14, 14, 13, 13,
338cabdff1aSopenharmony_ci        13, 13, 13,  9,  9,  9,  9,  7,  7,  7,  7,  8,  8,  8,  8,  6, 10,
339cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,  8,  8,
340cabdff1aSopenharmony_ci         8,  8,  2,  3,  3,  5,  5,  7,  7,  7,  7,  5,  3,
341cabdff1aSopenharmony_ci    },
342cabdff1aSopenharmony_ci    {
343cabdff1aSopenharmony_ci         5,  5,  7,  7,  9,  9,  9,  9,  9,  9,  9,  9,  7,  7,  7,  7,  3,
344cabdff1aSopenharmony_ci         4,  4,  8,  8,  8,  8,  8,  8,  8,  8, 11, 11, 11, 11, 11, 11, 11,
345cabdff1aSopenharmony_ci        11, 12, 12, 14, 14, 14, 14, 12, 12, 12, 12, 12, 13, 13, 13, 13, 11,
346cabdff1aSopenharmony_ci        13, 13, 13, 13, 13, 13, 13, 13,  9,  9, 11, 11, 11, 11,  9,  8,  8,
347cabdff1aSopenharmony_ci        10, 10, 10, 10, 10, 10, 10, 10,  6,  6,  6,  6,  1,
348cabdff1aSopenharmony_ci    },
349cabdff1aSopenharmony_ci    {
350cabdff1aSopenharmony_ci         5,  5,  5,  5,  3,  6,  6,  6,  6,  4,  7,  7,  9,  9,  9,  9,  9,
351cabdff1aSopenharmony_ci         9,  9,  9,  7,  7,  7,  7,  8,  8,  8,  8,  8,  8,  8,  8, 11, 11,
352cabdff1aSopenharmony_ci        11, 11,  9, 11, 11, 11, 11, 11, 11, 11, 11,  9,  9,  9,  9, 10, 10,
353cabdff1aSopenharmony_ci        10, 10,  8, 12, 12, 13, 13, 14, 14, 14, 14, 12, 12, 12, 12, 11, 11,
354cabdff1aSopenharmony_ci        13, 13, 13, 13, 11, 10, 10, 12, 12, 12, 12, 10,  1,
355cabdff1aSopenharmony_ci    },
356cabdff1aSopenharmony_ci    {
357cabdff1aSopenharmony_ci         7,  7,  7,  7,  5,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10,
358cabdff1aSopenharmony_ci        10, 10, 10, 10, 11, 11, 13, 13, 13, 13, 11, 11, 11, 11, 11, 12, 12,
359cabdff1aSopenharmony_ci        12, 12, 10, 13, 13, 14, 14, 15, 15, 15, 15, 13, 13, 13, 13, 12, 12,
360cabdff1aSopenharmony_ci        12, 12,  7,  7,  9,  9,  9,  9,  7,  3,  4,  4,  8,  8,  8,  8,  6,
361cabdff1aSopenharmony_ci         8,  8,  8,  8,  8,  8,  8,  8,  6,  6,  6,  6,  1,
362cabdff1aSopenharmony_ci    },
363cabdff1aSopenharmony_ci    {
364cabdff1aSopenharmony_ci         4,  4,  8,  8,  8,  8,  8,  8,  8,  8, 13, 13, 14, 14, 13, 13, 13,
365cabdff1aSopenharmony_ci        13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 12, 12, 12, 12, 10,
366cabdff1aSopenharmony_ci         9,  9, 11, 11, 11, 11,  9,  8,  8, 10, 10, 10, 10, 10, 10, 10, 10,
367cabdff1aSopenharmony_ci         6,  6,  6,  6,  2,  3,  3,  5,  5,  9,  9,  9,  9,  7,  9,  9,  9,
368cabdff1aSopenharmony_ci         9,  9,  9,  9,  9,  7,  7,  7,  7,  5,  5,  5,  5,
369cabdff1aSopenharmony_ci    },
370cabdff1aSopenharmony_ci    {
371cabdff1aSopenharmony_ci         2,  2,  7,  7,  7,  7,  5,  7,  7,  9,  9,  9,  9,  9,  9,  9,  9,
372cabdff1aSopenharmony_ci         7,  7,  7,  7,  5,  5,  5,  5,  4,  4,  8,  8,  8,  8,  8,  8,  8,
373cabdff1aSopenharmony_ci         8, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 14, 11, 11, 11, 11, 10,
374cabdff1aSopenharmony_ci        10, 12, 12, 12, 12, 12, 12, 12, 12,  9,  9, 11, 11, 11, 11,  9,  8,
375cabdff1aSopenharmony_ci         8, 10, 10, 10, 10, 10, 10, 10, 10,  6,  6,  6,  6,
376cabdff1aSopenharmony_ci    },
377cabdff1aSopenharmony_ci};
378cabdff1aSopenharmony_ci//@}
379cabdff1aSopenharmony_ci
380cabdff1aSopenharmony_ci/**
381cabdff1aSopenharmony_ci * Codes used for determining block type
382cabdff1aSopenharmony_ci */
383cabdff1aSopenharmony_ci//@{
384cabdff1aSopenharmony_ci#define AIC_MODE1_NUM  90
385cabdff1aSopenharmony_ci#define AIC_MODE1_SIZE  9
386cabdff1aSopenharmony_ci#define AIC_MODE1_BITS  7
387cabdff1aSopenharmony_ci
388cabdff1aSopenharmony_cistatic const uint8_t aic_mode1_vlc_tabs[AIC_MODE1_NUM][AIC_MODE1_SIZE][2] = {
389cabdff1aSopenharmony_ci    { { 4, 4 }, { 1, 4 }, { 7, 7 }, { 3, 7 }, { 5, 6 },
390cabdff1aSopenharmony_ci      { 8, 5 }, { 6, 4 }, { 2, 2 }, { 0, 1 } },
391cabdff1aSopenharmony_ci    { { 5, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 4, 6 },
392cabdff1aSopenharmony_ci      { 0, 5 }, { 3, 4 }, { 6, 3 }, { 1, 1 } },
393cabdff1aSopenharmony_ci    { { 7, 4 }, { 1, 4 }, { 5, 7 }, { 3, 7 }, { 4, 6 },
394cabdff1aSopenharmony_ci      { 6, 5 }, { 8, 4 }, { 2, 2 }, { 0, 1 } },
395cabdff1aSopenharmony_ci    { { 2, 3 }, { 1, 3 }, { 7, 7 }, { 4, 7 }, { 8, 6 },
396cabdff1aSopenharmony_ci      { 6, 5 }, { 5, 4 }, { 3, 3 }, { 0, 1 } },
397cabdff1aSopenharmony_ci    { { 2, 2 }, { 0, 2 }, { 4, 4 }, { 1, 4 }, { 8, 6 },
398cabdff1aSopenharmony_ci      { 3, 6 }, { 5, 5 }, { 7, 4 }, { 6, 2 } },
399cabdff1aSopenharmony_ci    { { 4, 7 }, { 0, 7 }, { 8, 7 }, { 7, 7 }, { 6, 5 },
400cabdff1aSopenharmony_ci      { 3, 4 }, { 2, 3 }, { 1, 2 }, { 5, 1 } },
401cabdff1aSopenharmony_ci    { { 4, 5 }, { 0, 5 }, { 8, 7 }, { 7, 7 }, { 3, 6 },
402cabdff1aSopenharmony_ci      { 5, 5 }, { 2, 3 }, { 6, 2 }, { 1, 1 } },
403cabdff1aSopenharmony_ci    { { 6, 5 }, { 1, 5 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
404cabdff1aSopenharmony_ci      { 7, 5 }, { 4, 3 }, { 0, 2 }, { 2, 1 } },
405cabdff1aSopenharmony_ci    { { 3, 4 }, { 1, 4 }, { 7, 7 }, { 5, 7 }, { 6, 6 },
406cabdff1aSopenharmony_ci      { 4, 5 }, { 8, 4 }, { 0, 2 }, { 2, 1 } },
407cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
408cabdff1aSopenharmony_ci    { { 5, 5 }, { 4, 5 }, { 8, 7 }, { 7, 7 }, { 3, 6 },
409cabdff1aSopenharmony_ci      { 6, 5 }, { 2, 3 }, { 0, 2 }, { 1, 1 } },
410cabdff1aSopenharmony_ci    { { 5, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 4, 6 },
411cabdff1aSopenharmony_ci      { 0, 5 }, { 3, 4 }, { 6, 3 }, { 1, 1 } },
412cabdff1aSopenharmony_ci    { { 6, 4 }, { 0, 4 }, { 5, 5 }, { 4, 5 }, { 8, 6 },
413cabdff1aSopenharmony_ci      { 3, 6 }, { 7, 5 }, { 2, 2 }, { 1, 1 } },
414cabdff1aSopenharmony_ci    { { 2, 3 }, { 0, 3 }, { 8, 7 }, { 7, 7 }, { 4, 6 },
415cabdff1aSopenharmony_ci      { 6, 5 }, { 3, 4 }, { 5, 3 }, { 1, 1 } },
416cabdff1aSopenharmony_ci    { { 4, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 3, 6 },
417cabdff1aSopenharmony_ci      { 5, 5 }, { 0, 4 }, { 6, 3 }, { 1, 1 } },
418cabdff1aSopenharmony_ci    { { 3, 4 }, { 2, 4 }, { 8, 7 }, { 7, 7 }, { 0, 6 },
419cabdff1aSopenharmony_ci      { 4, 5 }, { 6, 4 }, { 5, 2 }, { 1, 1 } },
420cabdff1aSopenharmony_ci    { { 3, 7 }, { 0, 7 }, { 8, 7 }, { 7, 7 }, { 2, 5 },
421cabdff1aSopenharmony_ci      { 4, 4 }, { 5, 3 }, { 6, 2 }, { 1, 1 } },
422cabdff1aSopenharmony_ci    { { 4, 5 }, { 0, 5 }, { 8, 7 }, { 3, 7 }, { 5, 6 },
423cabdff1aSopenharmony_ci      { 7, 5 }, { 1, 3 }, { 2, 2 }, { 6, 1 } },
424cabdff1aSopenharmony_ci    { { 6, 4 }, { 0, 4 }, { 7, 7 }, { 4, 7 }, { 3, 6 },
425cabdff1aSopenharmony_ci      { 5, 5 }, { 8, 4 }, { 2, 2 }, { 1, 1 } },
426cabdff1aSopenharmony_ci    { { 2, 1 }, { 0, 1 } }, /* Unused */
427cabdff1aSopenharmony_ci    { { 1, 3 }, { 0, 3 }, { 4, 5 }, { 3, 5 }, { 6, 6 },
428cabdff1aSopenharmony_ci      { 5, 6 }, { 7, 5 }, { 8, 3 }, { 2, 1 } },
429cabdff1aSopenharmony_ci    { { 7, 4 }, { 6, 4 }, { 5, 5 }, { 3, 5 }, { 4, 6 },
430cabdff1aSopenharmony_ci      { 0, 6 }, { 8, 5 }, { 1, 2 }, { 2, 1 } },
431cabdff1aSopenharmony_ci    { { 4, 6 }, { 0, 6 }, { 5, 7 }, { 3, 7 }, { 6, 6 },
432cabdff1aSopenharmony_ci      { 1, 4 }, { 7, 3 }, { 8, 2 }, { 2, 1 } },
433cabdff1aSopenharmony_ci    { { 8, 3 }, { 1, 3 }, { 3, 4 }, { 0, 4 }, { 6, 6 },
434cabdff1aSopenharmony_ci      { 4, 6 }, { 7, 5 }, { 5, 4 }, { 2, 1 } },
435cabdff1aSopenharmony_ci    { { 7, 3 }, { 6, 3 }, { 5, 7 }, { 3, 7 }, { 0, 6 },
436cabdff1aSopenharmony_ci      { 1, 5 }, { 4, 4 }, { 8, 3 }, { 2, 1 } },
437cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 4, 7 }, { 0, 7 }, { 7, 6 },
438cabdff1aSopenharmony_ci      { 8, 5 }, { 6, 4 }, { 3, 3 }, { 5, 2 } },
439cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 7, 4 }, { 4, 4 }, { 3, 6 },
440cabdff1aSopenharmony_ci      { 0, 6 }, { 5, 5 }, { 8, 4 }, { 6, 2 } },
441cabdff1aSopenharmony_ci    { { 1, 4 }, { 0, 4 }, { 5, 7 }, { 3, 7 }, { 4, 6 },
442cabdff1aSopenharmony_ci      { 6, 5 }, { 8, 4 }, { 7, 2 }, { 2, 1 } },
443cabdff1aSopenharmony_ci    { { 7, 4 }, { 1, 4 }, { 3, 5 }, { 0, 5 }, { 5, 6 },
444cabdff1aSopenharmony_ci      { 4, 6 }, { 6, 5 }, { 8, 2 }, { 2, 1 } },
445cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
446cabdff1aSopenharmony_ci    { { 1, 2 }, { 0, 2 }, { 5, 5 }, { 4, 5 }, { 7, 6 },
447cabdff1aSopenharmony_ci      { 6, 6 }, { 8, 5 }, { 3, 3 }, { 2, 2 } },
448cabdff1aSopenharmony_ci    { { 3, 3 }, { 2, 3 }, { 7, 7 }, { 0, 7 }, { 4, 6 },
449cabdff1aSopenharmony_ci      { 8, 5 }, { 6, 4 }, { 5, 3 }, { 1, 1 } },
450cabdff1aSopenharmony_ci    { { 3, 4 }, { 1, 4 }, { 6, 7 }, { 5, 7 }, { 4, 6 },
451cabdff1aSopenharmony_ci      { 7, 5 }, { 8, 4 }, { 0, 2 }, { 2, 1 } },
452cabdff1aSopenharmony_ci    { { 5, 3 }, { 2, 3 }, { 7, 7 }, { 0, 7 }, { 6, 6 },
453cabdff1aSopenharmony_ci      { 4, 5 }, { 1, 4 }, { 8, 3 }, { 3, 1 } },
454cabdff1aSopenharmony_ci    { { 2, 3 }, { 1, 3 }, { 3, 4 }, { 0, 4 }, { 7, 6 },
455cabdff1aSopenharmony_ci      { 5, 6 }, { 8, 5 }, { 6, 4 }, { 4, 1 } },
456cabdff1aSopenharmony_ci    { { 2, 4 }, { 1, 4 }, { 7, 7 }, { 0, 7 }, { 4, 6 },
457cabdff1aSopenharmony_ci      { 8, 5 }, { 6, 4 }, { 3, 2 }, { 5, 1 } },
458cabdff1aSopenharmony_ci    { { 6, 2 }, { 1, 2 }, { 5, 3 }, { 2, 3 }, { 4, 4 },
459cabdff1aSopenharmony_ci      { 3, 4 }, { 7, 5 }, { 0, 5 }, { 8, 4 } },
460cabdff1aSopenharmony_ci    { { 4, 2 }, { 2, 2 }, { 3, 3 }, { 0, 3 }, { 5, 5 },
461cabdff1aSopenharmony_ci      { 1, 5 }, { 7, 5 }, { 6, 5 }, { 8, 3 } },
462cabdff1aSopenharmony_ci    { { 2, 4 }, { 1, 4 }, { 7, 7 }, { 6, 7 }, { 0, 6 },
463cabdff1aSopenharmony_ci      { 4, 5 }, { 5, 4 }, { 3, 2 }, { 8, 1 } },
464cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
465cabdff1aSopenharmony_ci    { { 1, 2 }, { 0, 2 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
466cabdff1aSopenharmony_ci      { 7, 5 }, { 6, 4 }, { 4, 3 }, { 2, 2 } },
467cabdff1aSopenharmony_ci    { { 6, 3 }, { 2, 3 }, { 4, 4 }, { 0, 4 }, { 7, 6 },
468cabdff1aSopenharmony_ci      { 3, 6 }, { 8, 5 }, { 5, 4 }, { 1, 1 } },
469cabdff1aSopenharmony_ci    { { 7, 6 }, { 6, 6 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
470cabdff1aSopenharmony_ci      { 1, 4 }, { 4, 3 }, { 0, 2 }, { 2, 1 } },
471cabdff1aSopenharmony_ci    { { 2, 3 }, { 0, 3 }, { 5, 4 }, { 1, 4 }, { 8, 6 },
472cabdff1aSopenharmony_ci      { 7, 6 }, { 3, 5 }, { 6, 4 }, { 4, 1 } },
473cabdff1aSopenharmony_ci    { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 1, 5 },
474cabdff1aSopenharmony_ci      { 0, 4 }, { 6, 3 }, { 2, 2 }, { 4, 1 } },
475cabdff1aSopenharmony_ci    { { 6, 2 }, { 1, 2 }, { 4, 3 }, { 2, 3 }, { 7, 6 },
476cabdff1aSopenharmony_ci      { 0, 6 }, { 3, 5 }, { 8, 4 }, { 5, 3 } },
477cabdff1aSopenharmony_ci    { { 1, 4 }, { 0, 4 }, { 8, 7 }, { 3, 7 }, { 7, 6 },
478cabdff1aSopenharmony_ci      { 5, 5 }, { 2, 4 }, { 4, 2 }, { 6, 1 } },
479cabdff1aSopenharmony_ci    { { 6, 4 }, { 0, 4 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
480cabdff1aSopenharmony_ci      { 1, 5 }, { 7, 4 }, { 2, 2 }, { 4, 1 } },
481cabdff1aSopenharmony_ci    { { 2, 2 }, { 0, 2 }, { 5, 4 }, { 1, 4 }, { 6, 6 },
482cabdff1aSopenharmony_ci      { 3, 6 }, { 7, 5 }, { 8, 4 }, { 4, 2 } },
483cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
484cabdff1aSopenharmony_ci    { { 2, 3 }, { 1, 3 }, { 6, 5 }, { 3, 5 }, { 7, 6 },
485cabdff1aSopenharmony_ci      { 4, 6 }, { 8, 5 }, { 5, 3 }, { 0, 1 } },
486cabdff1aSopenharmony_ci    { { 3, 4 }, { 2, 4 }, { 7, 7 }, { 0, 7 }, { 4, 6 },
487cabdff1aSopenharmony_ci      { 8, 5 }, { 6, 4 }, { 5, 2 }, { 1, 1 } },
488cabdff1aSopenharmony_ci    { { 1, 2 }, { 0, 2 }, { 6, 5 }, { 4, 5 }, { 7, 6 },
489cabdff1aSopenharmony_ci      { 3, 6 }, { 8, 5 }, { 5, 3 }, { 2, 2 } },
490cabdff1aSopenharmony_ci    { { 2, 4 }, { 1, 4 }, { 7, 7 }, { 0, 7 }, { 4, 6 },
491cabdff1aSopenharmony_ci      { 6, 5 }, { 8, 4 }, { 3, 2 }, { 5, 1 } },
492cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 5, 3 }, { 0, 3 }, { 4, 4 },
493cabdff1aSopenharmony_ci      { 3, 4 }, { 8, 5 }, { 7, 5 }, { 6, 4 } },
494cabdff1aSopenharmony_ci    { { 4, 7 }, { 0, 7 }, { 8, 7 }, { 7, 7 }, { 2, 5 },
495cabdff1aSopenharmony_ci      { 6, 4 }, { 3, 3 }, { 1, 2 }, { 5, 1 } },
496cabdff1aSopenharmony_ci    { { 5, 2 }, { 1, 2 }, { 8, 7 }, { 7, 7 }, { 0, 6 },
497cabdff1aSopenharmony_ci      { 4, 5 }, { 3, 4 }, { 2, 3 }, { 6, 2 } },
498cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 8, 3 }, { 0, 3 }, { 6, 4 },
499cabdff1aSopenharmony_ci      { 5, 4 }, { 4, 5 }, { 3, 5 }, { 7, 4 } },
500cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 5, 3 }, { 0, 3 }, { 7, 6 },
501cabdff1aSopenharmony_ci      { 4, 6 }, { 6, 5 }, { 3, 4 }, { 8, 3 } },
502cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
503cabdff1aSopenharmony_ci    { { 2, 3 }, { 1, 3 }, { 8, 7 }, { 3, 7 }, { 5, 6 },
504cabdff1aSopenharmony_ci      { 7, 5 }, { 4, 4 }, { 6, 3 }, { 0, 1 } },
505cabdff1aSopenharmony_ci    { { 2, 4 }, { 0, 4 }, { 8, 7 }, { 3, 7 }, { 7, 6 },
506cabdff1aSopenharmony_ci      { 5, 5 }, { 4, 4 }, { 6, 2 }, { 1, 1 } },
507cabdff1aSopenharmony_ci    { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 4, 5 },
508cabdff1aSopenharmony_ci      { 1, 4 }, { 6, 3 }, { 0, 2 }, { 2, 1 } },
509cabdff1aSopenharmony_ci    { { 6, 2 }, { 1, 2 }, { 2, 3 }, { 0, 3 }, { 8, 6 },
510cabdff1aSopenharmony_ci      { 7, 6 }, { 3, 5 }, { 5, 4 }, { 4, 3 } },
511cabdff1aSopenharmony_ci    { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 1, 5 },
512cabdff1aSopenharmony_ci      { 2, 4 }, { 0, 3 }, { 4, 2 }, { 6, 1 } },
513cabdff1aSopenharmony_ci    { { 5, 3 }, { 2, 3 }, { 8, 7 }, { 7, 7 }, { 3, 6 },
514cabdff1aSopenharmony_ci      { 4, 5 }, { 0, 4 }, { 6, 3 }, { 1, 1 } },
515cabdff1aSopenharmony_ci    { { 5, 7 }, { 3, 7 }, { 8, 7 }, { 7, 7 }, { 2, 5 },
516cabdff1aSopenharmony_ci      { 0, 4 }, { 4, 3 }, { 1, 2 }, { 6, 1 } },
517cabdff1aSopenharmony_ci    { { 3, 7 }, { 0, 7 }, { 8, 7 }, { 5, 7 }, { 7, 5 },
518cabdff1aSopenharmony_ci      { 1, 4 }, { 4, 3 }, { 6, 2 }, { 2, 1 } },
519cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 4, 4 }, { 0, 4 }, { 7, 6 },
520cabdff1aSopenharmony_ci      { 3, 6 }, { 5, 5 }, { 8, 4 }, { 6, 2 } },
521cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
522cabdff1aSopenharmony_ci    { { 6, 6 }, { 4, 6 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
523cabdff1aSopenharmony_ci      { 1, 4 }, { 0, 3 }, { 7, 2 }, { 2, 1 } },
524cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 6, 4 }, { 0, 4 }, { 4, 6 },
525cabdff1aSopenharmony_ci      { 3, 6 }, { 5, 5 }, { 8, 4 }, { 7, 2 } },
526cabdff1aSopenharmony_ci    { { 1, 4 }, { 0, 4 }, { 5, 7 }, { 3, 7 }, { 6, 6 },
527cabdff1aSopenharmony_ci      { 4, 5 }, { 8, 4 }, { 7, 2 }, { 2, 1 } },
528cabdff1aSopenharmony_ci    { { 7, 2 }, { 2, 2 }, { 1, 3 }, { 0, 3 }, { 5, 4 },
529cabdff1aSopenharmony_ci      { 4, 4 }, { 6, 5 }, { 3, 5 }, { 8, 4 } },
530cabdff1aSopenharmony_ci    { { 4, 2 }, { 2, 2 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
531cabdff1aSopenharmony_ci      { 1, 5 }, { 0, 4 }, { 6, 3 }, { 7, 2 } },
532cabdff1aSopenharmony_ci    { { 7, 2 }, { 2, 2 }, { 6, 3 }, { 1, 3 }, { 5, 4 },
533cabdff1aSopenharmony_ci      { 0, 4 }, { 4, 5 }, { 3, 5 }, { 8, 4 } },
534cabdff1aSopenharmony_ci    { { 4, 2 }, { 2, 2 }, { 3, 7 }, { 0, 7 }, { 8, 6 },
535cabdff1aSopenharmony_ci      { 5, 5 }, { 1, 4 }, { 6, 3 }, { 7, 2 } },
536cabdff1aSopenharmony_ci    { { 6, 6 }, { 1, 6 }, { 5, 7 }, { 3, 7 }, { 8, 6 },
537cabdff1aSopenharmony_ci      { 0, 4 }, { 4, 3 }, { 2, 2 }, { 7, 1 } },
538cabdff1aSopenharmony_ci    { { 8, 4 }, { 4, 4 }, { 1, 5 }, { 0, 5 }, { 5, 6 },
539cabdff1aSopenharmony_ci      { 3, 6 }, { 6, 5 }, { 7, 2 }, { 2, 1 } },
540cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
541cabdff1aSopenharmony_ci    { { 8, 2 }, { 2, 2 }, { 1, 3 }, { 0, 3 }, { 6, 6 },
542cabdff1aSopenharmony_ci      { 5, 6 }, { 4, 5 }, { 7, 4 }, { 3, 3 } },
543cabdff1aSopenharmony_ci    { { 3, 3 }, { 2, 3 }, { 6, 7 }, { 0, 7 }, { 4, 6 },
544cabdff1aSopenharmony_ci      { 5, 5 }, { 7, 4 }, { 8, 3 }, { 1, 1 } },
545cabdff1aSopenharmony_ci    { { 7, 4 }, { 1, 4 }, { 3, 5 }, { 0, 5 }, { 6, 6 },
546cabdff1aSopenharmony_ci      { 5, 6 }, { 4, 5 }, { 8, 2 }, { 2, 1 } },
547cabdff1aSopenharmony_ci    { { 3, 2 }, { 2, 2 }, { 4, 6 }, { 0, 6 }, { 7, 6 },
548cabdff1aSopenharmony_ci      { 6, 6 }, { 1, 4 }, { 5, 3 }, { 8, 2 } },
549cabdff1aSopenharmony_ci    { { 8, 2 }, { 2, 2 }, { 6, 3 }, { 4, 3 }, { 5, 6 },
550cabdff1aSopenharmony_ci      { 0, 6 }, { 3, 5 }, { 1, 4 }, { 7, 3 } },
551cabdff1aSopenharmony_ci    { { 5, 2 }, { 2, 2 }, { 3, 3 }, { 1, 3 }, { 7, 6 },
552cabdff1aSopenharmony_ci      { 0, 6 }, { 4, 5 }, { 6, 4 }, { 8, 3 } },
553cabdff1aSopenharmony_ci    { { 2, 2 }, { 1, 2 }, { 6, 3 }, { 4, 3 }, { 7, 6 },
554cabdff1aSopenharmony_ci      { 0, 6 }, { 5, 5 }, { 3, 4 }, { 8, 3 } },
555cabdff1aSopenharmony_ci    { { 3, 7 }, { 0, 7 }, { 6, 7 }, { 5, 7 }, { 1, 5 },
556cabdff1aSopenharmony_ci      { 4, 4 }, { 7, 3 }, { 8, 2 }, { 2, 1 } },
557cabdff1aSopenharmony_ci    { { 1, 5 }, { 0, 5 }, { 6, 7 }, { 5, 7 }, { 4, 6 },
558cabdff1aSopenharmony_ci      { 7, 5 }, { 3, 3 }, { 2, 2 }, { 8, 1 } },
559cabdff1aSopenharmony_ci    { { 0 } }, /* unused */
560cabdff1aSopenharmony_ci};
561cabdff1aSopenharmony_ci
562cabdff1aSopenharmony_ci//@}
563cabdff1aSopenharmony_ci
564cabdff1aSopenharmony_ci#define PBTYPE_ESCAPE 0xFF
565cabdff1aSopenharmony_ci
566cabdff1aSopenharmony_ci/** tables used for P-frame macroblock type decoding */
567cabdff1aSopenharmony_ci//@{
568cabdff1aSopenharmony_ci#define NUM_PTYPE_VLCS 7
569cabdff1aSopenharmony_ci#define PTYPE_VLC_SIZE 8
570cabdff1aSopenharmony_ci#define PTYPE_VLC_BITS 7
571cabdff1aSopenharmony_ci
572cabdff1aSopenharmony_cistatic const uint8_t ptype_vlc_tabs[NUM_PTYPE_VLCS][PTYPE_VLC_SIZE][2] = {
573cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 7 }, { 11, 7 }, { 3, 6 }, { 8, 5 },
574cabdff1aSopenharmony_ci      { 9, 4 }, { 2, 3 }, { 1, 2 }, { 0, 1 } },
575cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 7 }, { 3, 7 }, { 8, 6 }, { 9, 5 },
576cabdff1aSopenharmony_ci      { 11, 4 }, { 0, 3 }, { 2, 2 }, { 1, 1 } },
577cabdff1aSopenharmony_ci    { { 9, 3 }, { 8, 3 }, { 3, 4 }, { 1, 4 }, { PBTYPE_ESCAPE, 5 },
578cabdff1aSopenharmony_ci      { 0, 5 }, { 11, 4 }, { 2, 1 } },
579cabdff1aSopenharmony_ci    { { 3, 2 }, { 2, 2 }, { PBTYPE_ESCAPE, 6 }, { 11, 6 },
580cabdff1aSopenharmony_ci      { 1, 5 }, { 0, 4 }, { 8, 3 }, { 9, 2 } },
581cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 7 }, { 11, 7 }, { 1, 6 }, { 0, 5 },
582cabdff1aSopenharmony_ci      { 3, 4 }, { 9, 3 }, { 8, 2 }, { 2, 1 } },
583cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 7 }, { 11, 7 }, { 1, 6 }, { 0, 5 },
584cabdff1aSopenharmony_ci      { 3, 4 }, { 8, 3 }, { 9, 2 }, { 2, 1 } },
585cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 7 }, { 3, 7 }, { 0, 6 }, { 8, 5 },
586cabdff1aSopenharmony_ci      { 9, 4 }, { 1, 3 }, { 2, 2 }, { 11, 1 } },
587cabdff1aSopenharmony_ci};
588cabdff1aSopenharmony_ci
589cabdff1aSopenharmony_cistatic const uint8_t block_num_to_ptype_vlc_num[12] = {
590cabdff1aSopenharmony_ci 0, 1, 2, 3, 0, 0, 2, 0, 4, 5, 0, 6
591cabdff1aSopenharmony_ci};
592cabdff1aSopenharmony_ci//@}
593cabdff1aSopenharmony_ci
594cabdff1aSopenharmony_ci/** tables used for P-frame macroblock type decoding */
595cabdff1aSopenharmony_ci//@{
596cabdff1aSopenharmony_ci#define NUM_BTYPE_VLCS 6
597cabdff1aSopenharmony_ci#define BTYPE_VLC_SIZE 7
598cabdff1aSopenharmony_ci#define BTYPE_VLC_BITS 6
599cabdff1aSopenharmony_ci
600cabdff1aSopenharmony_cistatic const uint8_t btype_vlc_tabs[NUM_BTYPE_VLCS][BTYPE_VLC_SIZE][2] = {
601cabdff1aSopenharmony_ci    { { 4, 2 }, { 0, 2 }, { PBTYPE_ESCAPE, 5 },
602cabdff1aSopenharmony_ci      { 10, 5 }, { 7, 4 }, { 1, 3 }, { 5, 2 } },
603cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 6 }, { 10, 6 }, { 7, 5 },
604cabdff1aSopenharmony_ci      { 0, 4 }, { 4, 3 }, { 5, 2 }, { 1, 1 } },
605cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 6 }, { 0, 6 }, { 10, 5 },
606cabdff1aSopenharmony_ci      { 1, 4 }, { 7, 3 }, { 5, 2 }, { 4, 1 } },
607cabdff1aSopenharmony_ci    { { 4, 3 }, { 1, 3 }, { PBTYPE_ESCAPE, 5 },
608cabdff1aSopenharmony_ci      { 0, 5 }, { 10, 4 }, { 7, 3 }, { 5, 1 } },
609cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 6 }, { 0, 6 }, { 1, 5 },
610cabdff1aSopenharmony_ci      { 10, 4 }, { 4, 3 }, { 5, 2 }, { 7, 1 } },
611cabdff1aSopenharmony_ci    { { PBTYPE_ESCAPE, 6 }, { 0, 6 }, { 1, 5 },
612cabdff1aSopenharmony_ci      { 10, 4 }, { 4, 3 }, { 7, 2 }, { 5, 1 } },
613cabdff1aSopenharmony_ci};
614cabdff1aSopenharmony_ci
615cabdff1aSopenharmony_cistatic const uint8_t block_num_to_btype_vlc_num[12] = {
616cabdff1aSopenharmony_ci 0, 1, 0, 0, 2, 3, 0, 5, 0, 0, 4, 0
617cabdff1aSopenharmony_ci};
618cabdff1aSopenharmony_ci//@}
619cabdff1aSopenharmony_ci#endif /* AVCODEC_RV40VLC2_H */
620