1cabdff1aSopenharmony_ci/* 2cabdff1aSopenharmony_ci * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org> 3cabdff1aSopenharmony_ci * 4cabdff1aSopenharmony_ci * This file is part of FFmpeg. 5cabdff1aSopenharmony_ci * 6cabdff1aSopenharmony_ci * FFmpeg is free software; you can redistribute it and/or 7cabdff1aSopenharmony_ci * modify it under the terms of the GNU Lesser General Public 8cabdff1aSopenharmony_ci * License as published by the Free Software Foundation; either 9cabdff1aSopenharmony_ci * version 2.1 of the License, or (at your option) any later version. 10cabdff1aSopenharmony_ci * 11cabdff1aSopenharmony_ci * FFmpeg is distributed in the hope that it will be useful, 12cabdff1aSopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of 13cabdff1aSopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14cabdff1aSopenharmony_ci * Lesser General Public License for more details. 15cabdff1aSopenharmony_ci * 16cabdff1aSopenharmony_ci * You should have received a copy of the GNU Lesser General Public 17cabdff1aSopenharmony_ci * License along with FFmpeg; if not, write to the Free Software 18cabdff1aSopenharmony_ci * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19cabdff1aSopenharmony_ci */ 20cabdff1aSopenharmony_ci 21cabdff1aSopenharmony_ci/** 22cabdff1aSopenharmony_ci * @file 23cabdff1aSopenharmony_ci * VP5 and VP6 compatible video decoder (common data) 24cabdff1aSopenharmony_ci */ 25cabdff1aSopenharmony_ci 26cabdff1aSopenharmony_ci#include "vp56data.h" 27cabdff1aSopenharmony_ci 28cabdff1aSopenharmony_ciconst uint8_t ff_vp56_b2p[] = { 0, 0, 0, 0, 1, 2, 3, 3, 3, 3 }; 29cabdff1aSopenharmony_ciconst uint8_t ff_vp56_b6to4[] = { 0, 0, 1, 1, 2, 3 }; 30cabdff1aSopenharmony_ci 31cabdff1aSopenharmony_ciconst uint8_t ff_vp56_coeff_parse_table[6][11] = { 32cabdff1aSopenharmony_ci { 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 33cabdff1aSopenharmony_ci { 145, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 34cabdff1aSopenharmony_ci { 140, 148, 173, 0, 0, 0, 0, 0, 0, 0, 0 }, 35cabdff1aSopenharmony_ci { 135, 140, 155, 176, 0, 0, 0, 0, 0, 0, 0 }, 36cabdff1aSopenharmony_ci { 130, 134, 141, 157, 180, 0, 0, 0, 0, 0, 0 }, 37cabdff1aSopenharmony_ci { 129, 130, 133, 140, 153, 177, 196, 230, 243, 254, 254 }, 38cabdff1aSopenharmony_ci}; 39cabdff1aSopenharmony_ci 40cabdff1aSopenharmony_ciconst uint8_t ff_vp56_def_mb_types_stats[3][10][2] = { 41cabdff1aSopenharmony_ci { { 69, 42 }, { 1, 2 }, { 1, 7 }, { 44, 42 }, { 6, 22 }, 42cabdff1aSopenharmony_ci { 1, 3 }, { 0, 2 }, { 1, 5 }, { 0, 1 }, { 0, 0 }, }, 43cabdff1aSopenharmony_ci { { 229, 8 }, { 1, 1 }, { 0, 8 }, { 0, 0 }, { 0, 0 }, 44cabdff1aSopenharmony_ci { 1, 2 }, { 0, 1 }, { 0, 0 }, { 1, 1 }, { 0, 0 }, }, 45cabdff1aSopenharmony_ci { { 122, 35 }, { 1, 1 }, { 1, 6 }, { 46, 34 }, { 0, 0 }, 46cabdff1aSopenharmony_ci { 1, 2 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, 47cabdff1aSopenharmony_ci}; 48cabdff1aSopenharmony_ci 49cabdff1aSopenharmony_ciconst VP56Tree ff_vp56_pva_tree[] = { 50cabdff1aSopenharmony_ci { 8, 0}, 51cabdff1aSopenharmony_ci { 4, 1}, 52cabdff1aSopenharmony_ci { 2, 2}, {-0}, {-1}, 53cabdff1aSopenharmony_ci { 2, 3}, {-2}, {-3}, 54cabdff1aSopenharmony_ci { 4, 4}, 55cabdff1aSopenharmony_ci { 2, 5}, {-4}, {-5}, 56cabdff1aSopenharmony_ci { 2, 6}, {-6}, {-7}, 57cabdff1aSopenharmony_ci}; 58cabdff1aSopenharmony_ci 59cabdff1aSopenharmony_ciconst VP56Tree ff_vp56_pc_tree[] = { 60cabdff1aSopenharmony_ci { 4, 6}, 61cabdff1aSopenharmony_ci { 2, 7}, {-0}, {-1}, 62cabdff1aSopenharmony_ci { 4, 8}, 63cabdff1aSopenharmony_ci { 2, 9}, {-2}, {-3}, 64cabdff1aSopenharmony_ci { 2,10}, {-4}, {-5}, 65cabdff1aSopenharmony_ci}; 66cabdff1aSopenharmony_ci 67cabdff1aSopenharmony_ciconst uint8_t ff_vp56_coeff_bias[] = { 0, 1, 2, 3, 4, 5, 7, 11, 19, 35, 67 }; 68cabdff1aSopenharmony_ciconst uint8_t ff_vp56_coeff_bit_length[] = { 0, 1, 2, 3, 4, 10 }; 69cabdff1aSopenharmony_ci 70cabdff1aSopenharmony_ciconst VP56Frame ff_vp56_reference_frame[] = { 71cabdff1aSopenharmony_ci VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_NOVEC_PF */ 72cabdff1aSopenharmony_ci VP56_FRAME_CURRENT, /* VP56_MB_INTRA */ 73cabdff1aSopenharmony_ci VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_DELTA_PF */ 74cabdff1aSopenharmony_ci VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_V1_PF */ 75cabdff1aSopenharmony_ci VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_V2_PF */ 76cabdff1aSopenharmony_ci VP56_FRAME_GOLDEN, /* VP56_MB_INTER_NOVEC_GF */ 77cabdff1aSopenharmony_ci VP56_FRAME_GOLDEN, /* VP56_MB_INTER_DELTA_GF */ 78cabdff1aSopenharmony_ci VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_4V */ 79cabdff1aSopenharmony_ci VP56_FRAME_GOLDEN, /* VP56_MB_INTER_V1_GF */ 80cabdff1aSopenharmony_ci VP56_FRAME_GOLDEN, /* VP56_MB_INTER_V2_GF */ 81cabdff1aSopenharmony_ci}; 82cabdff1aSopenharmony_ci 83cabdff1aSopenharmony_ciconst uint8_t ff_vp56_ac_dequant[64] = { 84cabdff1aSopenharmony_ci 94, 92, 90, 88, 86, 82, 78, 74, 85cabdff1aSopenharmony_ci 70, 66, 62, 58, 54, 53, 52, 51, 86cabdff1aSopenharmony_ci 50, 49, 48, 47, 46, 45, 44, 43, 87cabdff1aSopenharmony_ci 42, 40, 39, 37, 36, 35, 34, 33, 88cabdff1aSopenharmony_ci 32, 31, 30, 29, 28, 27, 26, 25, 89cabdff1aSopenharmony_ci 24, 23, 22, 21, 20, 19, 18, 17, 90cabdff1aSopenharmony_ci 16, 15, 14, 13, 12, 11, 10, 9, 91cabdff1aSopenharmony_ci 8, 7, 6, 5, 4, 3, 2, 1, 92cabdff1aSopenharmony_ci}; 93cabdff1aSopenharmony_ci 94cabdff1aSopenharmony_ciconst uint8_t ff_vp56_dc_dequant[64] = { 95cabdff1aSopenharmony_ci 47, 47, 47, 47, 45, 43, 43, 43, 96cabdff1aSopenharmony_ci 43, 43, 42, 41, 41, 40, 40, 40, 97cabdff1aSopenharmony_ci 40, 35, 35, 35, 35, 33, 33, 33, 98cabdff1aSopenharmony_ci 33, 32, 32, 32, 27, 27, 26, 26, 99cabdff1aSopenharmony_ci 25, 25, 24, 24, 23, 23, 19, 19, 100cabdff1aSopenharmony_ci 19, 19, 18, 18, 17, 16, 16, 16, 101cabdff1aSopenharmony_ci 16, 16, 15, 11, 11, 11, 10, 10, 102cabdff1aSopenharmony_ci 9, 8, 7, 5, 3, 3, 2, 2, 103cabdff1aSopenharmony_ci}; 104cabdff1aSopenharmony_ci 105cabdff1aSopenharmony_ciconst uint8_t ff_vp56_pre_def_mb_type_stats[16][3][10][2] = { 106cabdff1aSopenharmony_ci { { { 9, 15 }, { 32, 25 }, { 7, 19 }, { 9, 21 }, { 1, 12 }, 107cabdff1aSopenharmony_ci { 14, 12 }, { 3, 18 }, { 14, 23 }, { 3, 10 }, { 0, 4 }, }, 108cabdff1aSopenharmony_ci { { 41, 22 }, { 1, 0 }, { 1, 31 }, { 0, 0 }, { 0, 0 }, 109cabdff1aSopenharmony_ci { 0, 1 }, { 1, 7 }, { 0, 1 }, { 98, 25 }, { 4, 10 }, }, 110cabdff1aSopenharmony_ci { { 2, 3 }, { 2, 3 }, { 0, 2 }, { 0, 2 }, { 0, 0 }, 111cabdff1aSopenharmony_ci { 11, 4 }, { 1, 4 }, { 0, 2 }, { 3, 2 }, { 0, 4 }, }, }, 112cabdff1aSopenharmony_ci { { { 48, 39 }, { 1, 2 }, { 11, 27 }, { 29, 44 }, { 7, 27 }, 113cabdff1aSopenharmony_ci { 1, 4 }, { 0, 3 }, { 1, 6 }, { 1, 2 }, { 0, 0 }, }, 114cabdff1aSopenharmony_ci { { 123, 37 }, { 6, 4 }, { 1, 27 }, { 0, 0 }, { 0, 0 }, 115cabdff1aSopenharmony_ci { 5, 8 }, { 1, 7 }, { 0, 1 }, { 12, 10 }, { 0, 2 }, }, 116cabdff1aSopenharmony_ci { { 49, 46 }, { 3, 4 }, { 7, 31 }, { 42, 41 }, { 0, 0 }, 117cabdff1aSopenharmony_ci { 2, 6 }, { 1, 7 }, { 1, 4 }, { 2, 4 }, { 0, 1 }, }, }, 118cabdff1aSopenharmony_ci { { { 21, 32 }, { 1, 2 }, { 4, 10 }, { 32, 43 }, { 6, 23 }, 119cabdff1aSopenharmony_ci { 2, 3 }, { 1, 19 }, { 1, 6 }, { 12, 21 }, { 0, 7 }, }, 120cabdff1aSopenharmony_ci { { 26, 14 }, { 14, 12 }, { 0, 24 }, { 0, 0 }, { 0, 0 }, 121cabdff1aSopenharmony_ci { 55, 17 }, { 1, 9 }, { 0, 36 }, { 5, 7 }, { 1, 3 }, }, 122cabdff1aSopenharmony_ci { { 26, 25 }, { 1, 1 }, { 2, 10 }, { 67, 39 }, { 0, 0 }, 123cabdff1aSopenharmony_ci { 1, 1 }, { 0, 14 }, { 0, 2 }, { 31, 26 }, { 1, 6 }, }, }, 124cabdff1aSopenharmony_ci { { { 69, 83 }, { 0, 0 }, { 0, 2 }, { 10, 29 }, { 3, 12 }, 125cabdff1aSopenharmony_ci { 0, 1 }, { 0, 3 }, { 0, 3 }, { 2, 2 }, { 0, 0 }, }, 126cabdff1aSopenharmony_ci { { 209, 5 }, { 0, 0 }, { 0, 27 }, { 0, 0 }, { 0, 0 }, 127cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, }, 128cabdff1aSopenharmony_ci { { 103, 46 }, { 1, 2 }, { 2, 10 }, { 33, 42 }, { 0, 0 }, 129cabdff1aSopenharmony_ci { 1, 4 }, { 0, 3 }, { 0, 1 }, { 1, 3 }, { 0, 0 }, }, }, 130cabdff1aSopenharmony_ci { { { 11, 20 }, { 1, 4 }, { 18, 36 }, { 43, 48 }, { 13, 35 }, 131cabdff1aSopenharmony_ci { 0, 2 }, { 0, 5 }, { 3, 12 }, { 1, 2 }, { 0, 0 }, }, 132cabdff1aSopenharmony_ci { { 2, 5 }, { 4, 5 }, { 0, 121 }, { 0, 0 }, { 0, 0 }, 133cabdff1aSopenharmony_ci { 0, 3 }, { 2, 4 }, { 1, 4 }, { 2, 2 }, { 0, 1 }, }, 134cabdff1aSopenharmony_ci { { 14, 31 }, { 9, 13 }, { 14, 54 }, { 22, 29 }, { 0, 0 }, 135cabdff1aSopenharmony_ci { 2, 6 }, { 4, 18 }, { 6, 13 }, { 1, 5 }, { 0, 1 }, }, }, 136cabdff1aSopenharmony_ci { { { 70, 44 }, { 0, 1 }, { 2, 10 }, { 37, 46 }, { 8, 26 }, 137cabdff1aSopenharmony_ci { 0, 2 }, { 0, 2 }, { 0, 2 }, { 0, 1 }, { 0, 0 }, }, 138cabdff1aSopenharmony_ci { { 175, 5 }, { 0, 1 }, { 0, 48 }, { 0, 0 }, { 0, 0 }, 139cabdff1aSopenharmony_ci { 0, 2 }, { 0, 1 }, { 0, 2 }, { 0, 1 }, { 0, 0 }, }, 140cabdff1aSopenharmony_ci { { 85, 39 }, { 0, 0 }, { 1, 9 }, { 69, 40 }, { 0, 0 }, 141cabdff1aSopenharmony_ci { 0, 1 }, { 0, 3 }, { 0, 1 }, { 2, 3 }, { 0, 0 }, }, }, 142cabdff1aSopenharmony_ci { { { 8, 15 }, { 0, 1 }, { 8, 21 }, { 74, 53 }, { 22, 42 }, 143cabdff1aSopenharmony_ci { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 0, 0 }, }, 144cabdff1aSopenharmony_ci { { 83, 5 }, { 2, 3 }, { 0, 102 }, { 0, 0 }, { 0, 0 }, 145cabdff1aSopenharmony_ci { 1, 3 }, { 0, 2 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, }, 146cabdff1aSopenharmony_ci { { 31, 28 }, { 0, 0 }, { 3, 14 }, { 130, 34 }, { 0, 0 }, 147cabdff1aSopenharmony_ci { 0, 1 }, { 0, 3 }, { 0, 1 }, { 3, 3 }, { 0, 1 }, }, }, 148cabdff1aSopenharmony_ci { { { 141, 42 }, { 0, 0 }, { 1, 4 }, { 11, 24 }, { 1, 11 }, 149cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 2 }, { 0, 0 }, { 0, 0 }, }, 150cabdff1aSopenharmony_ci { { 233, 6 }, { 0, 0 }, { 0, 8 }, { 0, 0 }, { 0, 0 }, 151cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 1 }, { 0, 0 }, }, 152cabdff1aSopenharmony_ci { { 171, 25 }, { 0, 0 }, { 1, 5 }, { 25, 21 }, { 0, 0 }, 153cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, }, }, 154cabdff1aSopenharmony_ci { { { 8, 19 }, { 4, 10 }, { 24, 45 }, { 21, 37 }, { 9, 29 }, 155cabdff1aSopenharmony_ci { 0, 3 }, { 1, 7 }, { 11, 25 }, { 0, 2 }, { 0, 1 }, }, 156cabdff1aSopenharmony_ci { { 34, 16 }, { 112, 21 }, { 1, 28 }, { 0, 0 }, { 0, 0 }, 157cabdff1aSopenharmony_ci { 6, 8 }, { 1, 7 }, { 0, 3 }, { 2, 5 }, { 0, 2 }, }, 158cabdff1aSopenharmony_ci { { 17, 21 }, { 68, 29 }, { 6, 15 }, { 13, 22 }, { 0, 0 }, 159cabdff1aSopenharmony_ci { 6, 12 }, { 3, 14 }, { 4, 10 }, { 1, 7 }, { 0, 3 }, }, }, 160cabdff1aSopenharmony_ci { { { 46, 42 }, { 0, 1 }, { 2, 10 }, { 54, 51 }, { 10, 30 }, 161cabdff1aSopenharmony_ci { 0, 2 }, { 0, 2 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, }, 162cabdff1aSopenharmony_ci { { 159, 35 }, { 2, 2 }, { 0, 25 }, { 0, 0 }, { 0, 0 }, 163cabdff1aSopenharmony_ci { 3, 6 }, { 0, 5 }, { 0, 1 }, { 4, 4 }, { 0, 1 }, }, 164cabdff1aSopenharmony_ci { { 51, 39 }, { 0, 1 }, { 2, 12 }, { 91, 44 }, { 0, 0 }, 165cabdff1aSopenharmony_ci { 0, 2 }, { 0, 3 }, { 0, 1 }, { 2, 3 }, { 0, 1 }, }, }, 166cabdff1aSopenharmony_ci { { { 28, 32 }, { 0, 0 }, { 3, 10 }, { 75, 51 }, { 14, 33 }, 167cabdff1aSopenharmony_ci { 0, 1 }, { 0, 2 }, { 0, 1 }, { 1, 2 }, { 0, 0 }, }, 168cabdff1aSopenharmony_ci { { 75, 39 }, { 5, 7 }, { 2, 48 }, { 0, 0 }, { 0, 0 }, 169cabdff1aSopenharmony_ci { 3, 11 }, { 2, 16 }, { 1, 4 }, { 7, 10 }, { 0, 2 }, }, 170cabdff1aSopenharmony_ci { { 81, 25 }, { 0, 0 }, { 2, 9 }, { 106, 26 }, { 0, 0 }, 171cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, }, 172cabdff1aSopenharmony_ci { { { 100, 46 }, { 0, 1 }, { 3, 9 }, { 21, 37 }, { 5, 20 }, 173cabdff1aSopenharmony_ci { 0, 1 }, { 0, 2 }, { 1, 2 }, { 0, 1 }, { 0, 0 }, }, 174cabdff1aSopenharmony_ci { { 212, 21 }, { 0, 1 }, { 0, 9 }, { 0, 0 }, { 0, 0 }, 175cabdff1aSopenharmony_ci { 1, 2 }, { 0, 2 }, { 0, 0 }, { 2, 2 }, { 0, 0 }, }, 176cabdff1aSopenharmony_ci { { 140, 37 }, { 0, 1 }, { 1, 8 }, { 24, 33 }, { 0, 0 }, 177cabdff1aSopenharmony_ci { 1, 2 }, { 0, 2 }, { 0, 1 }, { 1, 2 }, { 0, 0 }, }, }, 178cabdff1aSopenharmony_ci { { { 27, 29 }, { 0, 1 }, { 9, 25 }, { 53, 51 }, { 12, 34 }, 179cabdff1aSopenharmony_ci { 0, 1 }, { 0, 3 }, { 1, 5 }, { 0, 2 }, { 0, 0 }, }, 180cabdff1aSopenharmony_ci { { 4, 2 }, { 0, 0 }, { 0, 172 }, { 0, 0 }, { 0, 0 }, 181cabdff1aSopenharmony_ci { 0, 1 }, { 0, 2 }, { 0, 0 }, { 2, 0 }, { 0, 0 }, }, 182cabdff1aSopenharmony_ci { { 14, 23 }, { 1, 3 }, { 11, 53 }, { 90, 31 }, { 0, 0 }, 183cabdff1aSopenharmony_ci { 0, 3 }, { 1, 5 }, { 2, 6 }, { 1, 2 }, { 0, 0 }, }, }, 184cabdff1aSopenharmony_ci { { { 80, 38 }, { 0, 0 }, { 1, 4 }, { 69, 33 }, { 5, 16 }, 185cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 1 }, { 0, 0 }, }, 186cabdff1aSopenharmony_ci { { 187, 22 }, { 1, 1 }, { 0, 17 }, { 0, 0 }, { 0, 0 }, 187cabdff1aSopenharmony_ci { 3, 6 }, { 0, 4 }, { 0, 1 }, { 4, 4 }, { 0, 1 }, }, 188cabdff1aSopenharmony_ci { { 123, 29 }, { 0, 0 }, { 1, 7 }, { 57, 30 }, { 0, 0 }, 189cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, }, }, 190cabdff1aSopenharmony_ci { { { 16, 20 }, { 0, 0 }, { 2, 8 }, { 104, 49 }, { 15, 33 }, 191cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, 192cabdff1aSopenharmony_ci { { 133, 6 }, { 1, 2 }, { 1, 70 }, { 0, 0 }, { 0, 0 }, 193cabdff1aSopenharmony_ci { 0, 2 }, { 0, 4 }, { 0, 3 }, { 1, 1 }, { 0, 0 }, }, 194cabdff1aSopenharmony_ci { { 13, 14 }, { 0, 0 }, { 4, 20 }, { 175, 20 }, { 0, 0 }, 195cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, }, 196cabdff1aSopenharmony_ci { { { 194, 16 }, { 0, 0 }, { 1, 1 }, { 1, 9 }, { 1, 3 }, 197cabdff1aSopenharmony_ci { 0, 0 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, }, 198cabdff1aSopenharmony_ci { { 251, 1 }, { 0, 0 }, { 0, 2 }, { 0, 0 }, { 0, 0 }, 199cabdff1aSopenharmony_ci { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, }, 200cabdff1aSopenharmony_ci { { 202, 23 }, { 0, 0 }, { 1, 3 }, { 2, 9 }, { 0, 0 }, 201cabdff1aSopenharmony_ci { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, }, }, 202cabdff1aSopenharmony_ci}; 203cabdff1aSopenharmony_ci 204cabdff1aSopenharmony_ciconst uint8_t ff_vp56_filter_threshold[] = { 205cabdff1aSopenharmony_ci 14, 14, 13, 13, 12, 12, 10, 10, 206cabdff1aSopenharmony_ci 10, 10, 8, 8, 8, 8, 8, 8, 207cabdff1aSopenharmony_ci 8, 8, 8, 8, 8, 8, 8, 8, 208cabdff1aSopenharmony_ci 8, 8, 8, 8, 8, 8, 8, 8, 209cabdff1aSopenharmony_ci 8, 8, 8, 8, 7, 7, 7, 7, 210cabdff1aSopenharmony_ci 7, 7, 6, 6, 6, 6, 6, 6, 211cabdff1aSopenharmony_ci 5, 5, 5, 5, 4, 4, 4, 4, 212cabdff1aSopenharmony_ci 4, 4, 4, 3, 3, 3, 3, 2, 213cabdff1aSopenharmony_ci}; 214cabdff1aSopenharmony_ci 215cabdff1aSopenharmony_ciconst uint8_t ff_vp56_mb_type_model_model[] = { 216cabdff1aSopenharmony_ci 171, 83, 199, 140, 125, 104, 217cabdff1aSopenharmony_ci}; 218cabdff1aSopenharmony_ci 219cabdff1aSopenharmony_ciconst VP56Tree ff_vp56_pmbtm_tree[] = { 220cabdff1aSopenharmony_ci { 4, 0}, 221cabdff1aSopenharmony_ci { 2, 1}, {-8}, {-4}, 222cabdff1aSopenharmony_ci { 8, 2}, 223cabdff1aSopenharmony_ci { 6, 3}, 224cabdff1aSopenharmony_ci { 4, 4}, 225cabdff1aSopenharmony_ci { 2, 5}, {-24}, {-20}, {-16}, {-12}, {-0}, 226cabdff1aSopenharmony_ci}; 227cabdff1aSopenharmony_ci 228cabdff1aSopenharmony_ciconst VP56Tree ff_vp56_pmbt_tree[] = { 229cabdff1aSopenharmony_ci { 8, 1}, 230cabdff1aSopenharmony_ci { 4, 2}, 231cabdff1aSopenharmony_ci { 2, 4}, {-VP56_MB_INTER_NOVEC_PF}, {-VP56_MB_INTER_DELTA_PF}, 232cabdff1aSopenharmony_ci { 2, 5}, {-VP56_MB_INTER_V1_PF}, {-VP56_MB_INTER_V2_PF}, 233cabdff1aSopenharmony_ci { 4, 3}, 234cabdff1aSopenharmony_ci { 2, 6}, {-VP56_MB_INTRA}, {-VP56_MB_INTER_4V}, 235cabdff1aSopenharmony_ci { 4, 7}, 236cabdff1aSopenharmony_ci { 2, 8}, {-VP56_MB_INTER_NOVEC_GF}, {-VP56_MB_INTER_DELTA_GF}, 237cabdff1aSopenharmony_ci { 2, 9}, {-VP56_MB_INTER_V1_GF}, {-VP56_MB_INTER_V2_GF}, 238cabdff1aSopenharmony_ci}; 239cabdff1aSopenharmony_ci 240cabdff1aSopenharmony_ci/* relative pos of surrounding blocks, from closest to farthest */ 241cabdff1aSopenharmony_ciconst int8_t ff_vp56_candidate_predictor_pos[12][2] = { 242cabdff1aSopenharmony_ci { 0, -1 }, 243cabdff1aSopenharmony_ci { -1, 0 }, 244cabdff1aSopenharmony_ci { -1, -1 }, 245cabdff1aSopenharmony_ci { 1, -1 }, 246cabdff1aSopenharmony_ci { 0, -2 }, 247cabdff1aSopenharmony_ci { -2, 0 }, 248cabdff1aSopenharmony_ci { -2, -1 }, 249cabdff1aSopenharmony_ci { -1, -2 }, 250cabdff1aSopenharmony_ci { 1, -2 }, 251cabdff1aSopenharmony_ci { 2, -1 }, 252cabdff1aSopenharmony_ci { -2, -2 }, 253cabdff1aSopenharmony_ci { 2, -2 }, 254cabdff1aSopenharmony_ci}; 255