annotate vp56data.h @ 5156:387979b83884 libavcodec

correct type for h263_parse()
author mru
date Sat, 16 Jun 2007 15:15:16 +0000
parents 340c876320eb
children 2b72f9bc4f06
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3695
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
1 /**
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
2 * @file vp56data.h
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
3 * VP5 and VP6 compatible video decoder (common data)
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
4 *
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
5 * Copyright (C) 2006 Aurelien Jacobs <aurel@gnuage.org>
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
6 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3695
diff changeset
7 * This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3695
diff changeset
8 *
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3695
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
3695
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
13 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3695
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
3695
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
17 * Lesser General Public License for more details.
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
18 *
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3695
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
3695
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
22 */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
23
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
24 #ifndef VP56DATA_H
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
25 #define VP56DATA_H
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
26
4078
6a10cc9adb8a Don't include inttypes.h/stdint.h directly, there is an abstraction in
diego
parents: 3947
diff changeset
27 #include "common.h"
3695
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
28
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
29 typedef enum {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
30 VP56_FRAME_CURRENT = 0,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
31 VP56_FRAME_PREVIOUS = 1,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
32 VP56_FRAME_GOLDEN = 2,
4595
340c876320eb Use pointers to avoid copying AVFrame.
aurel
parents: 4078
diff changeset
33 VP56_FRAME_UNUSED = 3,
3695
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
34 } vp56_frame_t;
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
35
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
36 typedef enum {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
37 VP56_MB_INTER_NOVEC_PF = 0, /**< Inter MB, no vector, from previous frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
38 VP56_MB_INTRA = 1, /**< Intra MB */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
39 VP56_MB_INTER_DELTA_PF = 2, /**< Inter MB, above/left vector + delta, from previous frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
40 VP56_MB_INTER_V1_PF = 3, /**< Inter MB, first vector, from previous frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
41 VP56_MB_INTER_V2_PF = 4, /**< Inter MB, second vector, from previous frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
42 VP56_MB_INTER_NOVEC_GF = 5, /**< Inter MB, no vector, from golden frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
43 VP56_MB_INTER_DELTA_GF = 6, /**< Inter MB, above/left vector + delta, from golden frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
44 VP56_MB_INTER_4V = 7, /**< Inter MB, 4 vectors, from previous frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
45 VP56_MB_INTER_V1_GF = 8, /**< Inter MB, first vector, from golden frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
46 VP56_MB_INTER_V2_GF = 9, /**< Inter MB, second vector, from golden frame */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
47 } vp56_mb_t;
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
48
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
49 typedef struct {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
50 int8_t val;
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
51 int8_t prob_idx;
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
52 } vp56_tree_t;
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
53
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
54 extern const uint8_t vp56_b6to3[];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
55 extern const uint8_t vp56_b6to4[];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
56 extern const uint8_t vp56_coeff_parse_table[6][11];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
57 extern const uint8_t vp56_def_mb_types_stats[3][10][2];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
58 extern const vp56_tree_t vp56_pva_tree[];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
59 extern const vp56_tree_t vp56_pc_tree[];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
60 extern const uint8_t vp56_coeff_bias[];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
61 extern const uint8_t vp56_coeff_bit_length[];
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
62
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
63 static const vp56_frame_t vp56_reference_frame[] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
64 VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_NOVEC_PF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
65 VP56_FRAME_CURRENT, /* VP56_MB_INTRA */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
66 VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_DELTA_PF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
67 VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_V1_PF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
68 VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_V2_PF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
69 VP56_FRAME_GOLDEN, /* VP56_MB_INTER_NOVEC_GF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
70 VP56_FRAME_GOLDEN, /* VP56_MB_INTER_DELTA_GF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
71 VP56_FRAME_PREVIOUS, /* VP56_MB_INTER_4V */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
72 VP56_FRAME_GOLDEN, /* VP56_MB_INTER_V1_GF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
73 VP56_FRAME_GOLDEN, /* VP56_MB_INTER_V2_GF */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
74 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
75
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
76 static const uint8_t vp56_ac_dequant[64] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
77 94, 92, 90, 88, 86, 82, 78, 74,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
78 70, 66, 62, 58, 54, 53, 52, 51,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
79 50, 49, 48, 47, 46, 45, 44, 43,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
80 42, 40, 39, 37, 36, 35, 34, 33,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
81 32, 31, 30, 29, 28, 27, 26, 25,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
82 24, 23, 22, 21, 20, 19, 18, 17,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
83 16, 15, 14, 13, 12, 11, 10, 9,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
84 8, 7, 6, 5, 4, 3, 2, 1,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
85 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
86
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
87 static const uint8_t vp56_dc_dequant[64] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
88 47, 47, 47, 47, 45, 43, 43, 43,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
89 43, 43, 42, 41, 41, 40, 40, 40,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
90 40, 35, 35, 35, 35, 33, 33, 33,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
91 33, 32, 32, 32, 27, 27, 26, 26,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
92 25, 25, 24, 24, 23, 23, 19, 19,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
93 19, 19, 18, 18, 17, 16, 16, 16,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
94 16, 16, 15, 11, 11, 11, 10, 10,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
95 9, 8, 7, 5, 3, 3, 2, 2,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
96 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
97
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
98 static const uint8_t vp56_pre_def_mb_type_stats[16][3][10][2] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
99 { { { 9, 15 }, { 32, 25 }, { 7, 19 }, { 9, 21 }, { 1, 12 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
100 { 14, 12 }, { 3, 18 }, { 14, 23 }, { 3, 10 }, { 0, 4 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
101 { { 41, 22 }, { 1, 0 }, { 1, 31 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
102 { 0, 1 }, { 1, 7 }, { 0, 1 }, { 98, 25 }, { 4, 10 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
103 { { 2, 3 }, { 2, 3 }, { 0, 2 }, { 0, 2 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
104 { 11, 4 }, { 1, 4 }, { 0, 2 }, { 3, 2 }, { 0, 4 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
105 { { { 48, 39 }, { 1, 2 }, { 11, 27 }, { 29, 44 }, { 7, 27 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
106 { 1, 4 }, { 0, 3 }, { 1, 6 }, { 1, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
107 { { 123, 37 }, { 6, 4 }, { 1, 27 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
108 { 5, 8 }, { 1, 7 }, { 0, 1 }, { 12, 10 }, { 0, 2 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
109 { { 49, 46 }, { 3, 4 }, { 7, 31 }, { 42, 41 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
110 { 2, 6 }, { 1, 7 }, { 1, 4 }, { 2, 4 }, { 0, 1 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
111 { { { 21, 32 }, { 1, 2 }, { 4, 10 }, { 32, 43 }, { 6, 23 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
112 { 2, 3 }, { 1, 19 }, { 1, 6 }, { 12, 21 }, { 0, 7 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
113 { { 26, 14 }, { 14, 12 }, { 0, 24 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
114 { 55, 17 }, { 1, 9 }, { 0, 36 }, { 5, 7 }, { 1, 3 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
115 { { 26, 25 }, { 1, 1 }, { 2, 10 }, { 67, 39 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
116 { 1, 1 }, { 0, 14 }, { 0, 2 }, { 31, 26 }, { 1, 6 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
117 { { { 69, 83 }, { 0, 0 }, { 0, 2 }, { 10, 29 }, { 3, 12 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
118 { 0, 1 }, { 0, 3 }, { 0, 3 }, { 2, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
119 { { 209, 5 }, { 0, 0 }, { 0, 27 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
120 { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
121 { { 103, 46 }, { 1, 2 }, { 2, 10 }, { 33, 42 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
122 { 1, 4 }, { 0, 3 }, { 0, 1 }, { 1, 3 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
123 { { { 11, 20 }, { 1, 4 }, { 18, 36 }, { 43, 48 }, { 13, 35 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
124 { 0, 2 }, { 0, 5 }, { 3, 12 }, { 1, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
125 { { 2, 5 }, { 4, 5 }, { 0, 121 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
126 { 0, 3 }, { 2, 4 }, { 1, 4 }, { 2, 2 }, { 0, 1 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
127 { { 14, 31 }, { 9, 13 }, { 14, 54 }, { 22, 29 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
128 { 2, 6 }, { 4, 18 }, { 6, 13 }, { 1, 5 }, { 0, 1 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
129 { { { 70, 44 }, { 0, 1 }, { 2, 10 }, { 37, 46 }, { 8, 26 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
130 { 0, 2 }, { 0, 2 }, { 0, 2 }, { 0, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
131 { { 175, 5 }, { 0, 1 }, { 0, 48 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
132 { 0, 2 }, { 0, 1 }, { 0, 2 }, { 0, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
133 { { 85, 39 }, { 0, 0 }, { 1, 9 }, { 69, 40 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
134 { 0, 1 }, { 0, 3 }, { 0, 1 }, { 2, 3 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
135 { { { 8, 15 }, { 0, 1 }, { 8, 21 }, { 74, 53 }, { 22, 42 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
136 { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
137 { { 83, 5 }, { 2, 3 }, { 0, 102 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
138 { 1, 3 }, { 0, 2 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
139 { { 31, 28 }, { 0, 0 }, { 3, 14 }, { 130, 34 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
140 { 0, 1 }, { 0, 3 }, { 0, 1 }, { 3, 3 }, { 0, 1 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
141 { { { 141, 42 }, { 0, 0 }, { 1, 4 }, { 11, 24 }, { 1, 11 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
142 { 0, 1 }, { 0, 1 }, { 0, 2 }, { 0, 0 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
143 { { 233, 6 }, { 0, 0 }, { 0, 8 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
144 { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
145 { { 171, 25 }, { 0, 0 }, { 1, 5 }, { 25, 21 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
146 { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
147 { { { 8, 19 }, { 4, 10 }, { 24, 45 }, { 21, 37 }, { 9, 29 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
148 { 0, 3 }, { 1, 7 }, { 11, 25 }, { 0, 2 }, { 0, 1 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
149 { { 34, 16 }, { 112, 21 }, { 1, 28 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
150 { 6, 8 }, { 1, 7 }, { 0, 3 }, { 2, 5 }, { 0, 2 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
151 { { 17, 21 }, { 68, 29 }, { 6, 15 }, { 13, 22 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
152 { 6, 12 }, { 3, 14 }, { 4, 10 }, { 1, 7 }, { 0, 3 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
153 { { { 46, 42 }, { 0, 1 }, { 2, 10 }, { 54, 51 }, { 10, 30 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
154 { 0, 2 }, { 0, 2 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
155 { { 159, 35 }, { 2, 2 }, { 0, 25 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
156 { 3, 6 }, { 0, 5 }, { 0, 1 }, { 4, 4 }, { 0, 1 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
157 { { 51, 39 }, { 0, 1 }, { 2, 12 }, { 91, 44 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
158 { 0, 2 }, { 0, 3 }, { 0, 1 }, { 2, 3 }, { 0, 1 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
159 { { { 28, 32 }, { 0, 0 }, { 3, 10 }, { 75, 51 }, { 14, 33 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
160 { 0, 1 }, { 0, 2 }, { 0, 1 }, { 1, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
161 { { 75, 39 }, { 5, 7 }, { 2, 48 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
162 { 3, 11 }, { 2, 16 }, { 1, 4 }, { 7, 10 }, { 0, 2 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
163 { { 81, 25 }, { 0, 0 }, { 2, 9 }, { 106, 26 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
164 { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
165 { { { 100, 46 }, { 0, 1 }, { 3, 9 }, { 21, 37 }, { 5, 20 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
166 { 0, 1 }, { 0, 2 }, { 1, 2 }, { 0, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
167 { { 212, 21 }, { 0, 1 }, { 0, 9 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
168 { 1, 2 }, { 0, 2 }, { 0, 0 }, { 2, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
169 { { 140, 37 }, { 0, 1 }, { 1, 8 }, { 24, 33 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
170 { 1, 2 }, { 0, 2 }, { 0, 1 }, { 1, 2 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
171 { { { 27, 29 }, { 0, 1 }, { 9, 25 }, { 53, 51 }, { 12, 34 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
172 { 0, 1 }, { 0, 3 }, { 1, 5 }, { 0, 2 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
173 { { 4, 2 }, { 0, 0 }, { 0, 172 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
174 { 0, 1 }, { 0, 2 }, { 0, 0 }, { 2, 0 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
175 { { 14, 23 }, { 1, 3 }, { 11, 53 }, { 90, 31 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
176 { 0, 3 }, { 1, 5 }, { 2, 6 }, { 1, 2 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
177 { { { 80, 38 }, { 0, 0 }, { 1, 4 }, { 69, 33 }, { 5, 16 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
178 { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
179 { { 187, 22 }, { 1, 1 }, { 0, 17 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
180 { 3, 6 }, { 0, 4 }, { 0, 1 }, { 4, 4 }, { 0, 1 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
181 { { 123, 29 }, { 0, 0 }, { 1, 7 }, { 57, 30 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
182 { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
183 { { { 16, 20 }, { 0, 0 }, { 2, 8 }, { 104, 49 }, { 15, 33 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
184 { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
185 { { 133, 6 }, { 1, 2 }, { 1, 70 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
186 { 0, 2 }, { 0, 4 }, { 0, 3 }, { 1, 1 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
187 { { 13, 14 }, { 0, 0 }, { 4, 20 }, { 175, 20 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
188 { 0, 1 }, { 0, 1 }, { 0, 1 }, { 1, 1 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
189 { { { 194, 16 }, { 0, 0 }, { 1, 1 }, { 1, 9 }, { 1, 3 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
190 { 0, 0 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
191 { { 251, 1 }, { 0, 0 }, { 0, 2 }, { 0, 0 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
192 { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
193 { { 202, 23 }, { 0, 0 }, { 1, 3 }, { 2, 9 }, { 0, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
194 { 0, 1 }, { 0, 1 }, { 0, 1 }, { 0, 0 }, { 0, 0 }, }, },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
195 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
196
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
197 static const uint8_t vp56_filter_threshold[] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
198 14, 14, 13, 13, 12, 12, 10, 10,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
199 10, 10, 8, 8, 8, 8, 8, 8,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
200 8, 8, 8, 8, 8, 8, 8, 8,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
201 8, 8, 8, 8, 8, 8, 8, 8,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
202 8, 8, 8, 8, 7, 7, 7, 7,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
203 7, 7, 6, 6, 6, 6, 6, 6,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
204 5, 5, 5, 5, 4, 4, 4, 4,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
205 4, 4, 4, 3, 3, 3, 3, 2,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
206 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
207
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
208 static const uint8_t vp56_mb_type_model_model[] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
209 171, 83, 199, 140, 125, 104,
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
210 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
211
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
212 static const vp56_tree_t vp56_pmbtm_tree[] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
213 { 4, 0},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
214 { 2, 1}, {-8}, {-4},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
215 { 8, 2},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
216 { 6, 3},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
217 { 4, 4},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
218 { 2, 5}, {-24}, {-20}, {-16}, {-12}, {-0},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
219 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
220
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
221 static const vp56_tree_t vp56_pmbt_tree[] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
222 { 8, 1},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
223 { 4, 2},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
224 { 2, 4}, {-VP56_MB_INTER_NOVEC_PF}, {-VP56_MB_INTER_DELTA_PF},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
225 { 2, 5}, {-VP56_MB_INTER_V1_PF}, {-VP56_MB_INTER_V2_PF},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
226 { 4, 3},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
227 { 2, 6}, {-VP56_MB_INTRA}, {-VP56_MB_INTER_4V},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
228 { 4, 7},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
229 { 2, 8}, {-VP56_MB_INTER_NOVEC_GF}, {-VP56_MB_INTER_DELTA_GF},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
230 { 2, 9}, {-VP56_MB_INTER_V1_GF}, {-VP56_MB_INTER_V2_GF},
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
231 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
232
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
233 /* relative pos of surrounding blocks, from closest to farthest */
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
234 static const int8_t vp56_candidate_predictor_pos[12][2] = {
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
235 { 0, -1 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
236 { -1, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
237 { -1, -1 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
238 { 1, -1 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
239 { 0, -2 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
240 { -2, 0 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
241 { -2, -1 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
242 { -1, -2 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
243 { 1, -2 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
244 { 2, -1 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
245 { -2, -2 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
246 { 2, -2 },
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
247 };
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
248
6795c9e5f983 VP5 and VP6 video decoder
aurel
parents:
diff changeset
249 #endif /* VP56DATA */