summaryrefslogtreecommitdiff
path: root/libavcodec/cavsdata.h
diff options
context:
space:
mode:
authorStefan Gehrer <stefan.gehrer@gmx.de>2006-07-14 19:15:08 +0000
committerStefan Gehrer <stefan.gehrer@gmx.de>2006-07-14 19:15:08 +0000
commit50879935d1da8ae68ab862cd087ffd3139f5a13c (patch)
treee9ab3363cbcc70b5575d385e5718f5d114e30090 /libavcodec/cavsdata.h
parent8ea543b5805453853d8071c86ce15a70dfd097b1 (diff)
downloadffmpeg-50879935d1da8ae68ab862cd087ffd3139f5a13c.tar.gz
replace run by run+1 in VLC tables
Originally committed as revision 5751 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cavsdata.h')
-rw-r--r--libavcodec/cavsdata.h462
1 files changed, 233 insertions, 229 deletions
diff --git a/libavcodec/cavsdata.h b/libavcodec/cavsdata.h
index 0dc6d51fc1..d6c78e433b 100644
--- a/libavcodec/cavsdata.h
+++ b/libavcodec/cavsdata.h
@@ -229,385 +229,389 @@ static const vector_t intra_mv = {0,0,1,REF_INTRA};
typedef struct residual_vlc_t {
int8_t rltab[59][3];
- int8_t level_add[26];
+ int8_t level_add[27];
int8_t golomb_order;
int inc_limit;
int8_t max_run;
} residual_vlc_t;
+#define EOB 0,0,0
+
static const residual_vlc_t intra_2dvlc[7] = {
{
{ //level / run / table_inc
- { 1, 0, 1},{ -1, 0, 1},{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},
- { 1, 3, 1},{ -1, 3, 1},{ 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},
- { 1, 6, 1},{ -1, 6, 1},{ 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},
- { 1, 9, 1},{ -1, 9, 1},{ 1,10, 1},{ -1,10, 1},{ 2, 0, 2},{ -2, 0, 2},
- { 1,11, 1},{ -1,11, 1},{ 1,12, 1},{ -1,12, 1},{ 1,13, 1},{ -1,13, 1},
- { 1,14, 1},{ -1,14, 1},{ 2, 1, 2},{ -2, 1, 2},{ 1,15, 1},{ -1,15, 1},
- { 1,16, 1},{ -1,16, 1},{ 3, 0, 3},{ -3, 0, 3},{ 1,17, 1},{ -1,17, 1},
- { 1,18, 1},{ -1,18, 1},{ 2, 2, 2},{ -2, 2, 2},{ 1,19, 1},{ -1,19, 1},
- { 1,20, 1},{ -1,20, 1},{ 2, 3, 2},{ -2, 3, 2},{ 1,21, 1},{ -1,21, 1},
- { 2, 4, 2},{ -2, 4, 2},{ 1,22, 1},{ -1,22, 1},{ 0, 0,-1}
+ { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
+ { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1},
+ { 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1},
+ { 1,10, 1},{ -1,10, 1},{ 1,11, 1},{ -1,11, 1},{ 2, 1, 2},{ -2, 1, 2},
+ { 1,12, 1},{ -1,12, 1},{ 1,13, 1},{ -1,13, 1},{ 1,14, 1},{ -1,14, 1},
+ { 1,15, 1},{ -1,15, 1},{ 2, 2, 2},{ -2, 2, 2},{ 1,16, 1},{ -1,16, 1},
+ { 1,17, 1},{ -1,17, 1},{ 3, 1, 3},{ -3, 1, 3},{ 1,18, 1},{ -1,18, 1},
+ { 1,19, 1},{ -1,19, 1},{ 2, 3, 2},{ -2, 3, 2},{ 1,20, 1},{ -1,20, 1},
+ { 1,21, 1},{ -1,21, 1},{ 2, 4, 2},{ -2, 4, 2},{ 1,22, 1},{ -1,22, 1},
+ { 2, 5, 2},{ -2, 5, 2},{ 1,23, 1},{ -1,23, 1},{ EOB }
},
//level_add
- { 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ { 0, 4, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2,-1,-1,-1},
2, //golomb_order
0, //inc_limit
- 22, //max_run
+ 23, //max_run
},{
{ //level / run
- { 1, 0, 0},{ -1, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 2, 0, 1},{ -2, 0, 1},
- { 1, 2, 0},{ -1, 2, 0},{ 0, 0, 0},{ 1, 3, 0},{ -1, 3, 0},{ 1, 4, 0},
- { -1, 4, 0},{ 1, 5, 0},{ -1, 5, 0},{ 3, 0, 2},{ -3, 0, 2},{ 2, 1, 1},
- { -2, 1, 1},{ 1, 6, 0},{ -1, 6, 0},{ 1, 7, 0},{ -1, 7, 0},{ 1, 8, 0},
- { -1, 8, 0},{ 2, 2, 1},{ -2, 2, 1},{ 4, 0, 2},{ -4, 0, 2},{ 1, 9, 0},
- { -1, 9, 0},{ 1,10, 0},{ -1,10, 0},{ 2, 3, 1},{ -2, 3, 1},{ 3, 1, 2},
- { -3, 1, 2},{ 1,11, 0},{ -1,11, 0},{ 2, 4, 1},{ -2, 4, 1},{ 5, 0, 3},
- { -5, 0, 3},{ 1,12, 0},{ -1,12, 0},{ 2, 5, 1},{ -2, 5, 1},{ 1,13, 0},
- { -1,13, 0},{ 2, 6, 1},{ -2, 6, 1},{ 2, 7, 1},{ -2, 7, 1},{ 3, 2, 2},
- { -3, 2, 2},{ 6, 0, 3},{ -6, 0, 3},{ 1,14, 0},{ -1,14, 0}
+ { 1, 1, 0},{ -1, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 2, 1, 1},{ -2, 1, 1},
+ { 1, 3, 0},{ -1, 3, 0},{ EOB },{ 1, 4, 0},{ -1, 4, 0},{ 1, 5, 0},
+ { -1, 5, 0},{ 1, 6, 0},{ -1, 6, 0},{ 3, 1, 2},{ -3, 1, 2},{ 2, 2, 1},
+ { -2, 2, 1},{ 1, 7, 0},{ -1, 7, 0},{ 1, 8, 0},{ -1, 8, 0},{ 1, 9, 0},
+ { -1, 9, 0},{ 2, 3, 1},{ -2, 3, 1},{ 4, 1, 2},{ -4, 1, 2},{ 1,10, 0},
+ { -1,10, 0},{ 1,11, 0},{ -1,11, 0},{ 2, 4, 1},{ -2, 4, 1},{ 3, 2, 2},
+ { -3, 2, 2},{ 1,12, 0},{ -1,12, 0},{ 2, 5, 1},{ -2, 5, 1},{ 5, 1, 3},
+ { -5, 1, 3},{ 1,13, 0},{ -1,13, 0},{ 2, 6, 1},{ -2, 6, 1},{ 1,14, 0},
+ { -1,14, 0},{ 2, 7, 1},{ -2, 7, 1},{ 2, 8, 1},{ -2, 8, 1},{ 3, 3, 2},
+ { -3, 3, 2},{ 6, 1, 3},{ -6, 1, 3},{ 1,15, 0},{ -1,15, 0}
},
//level_add
- { 7, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,-1,
+ { 0, 7, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
1, //inc_limit
- 14, //max_run
+ 15, //max_run
},{
{ //level / run
- { 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 1, 1, 0},{ -1, 1, 0},
- { 3, 0, 1},{ -3, 0, 1},{ 0, 0, 0},{ 1, 2, 0},{ -1, 2, 0},{ 2, 1, 0},
- { -2, 1, 0},{ 4, 0, 1},{ -4, 0, 1},{ 1, 3, 0},{ -1, 3, 0},{ 5, 0, 2},
- { -5, 0, 2},{ 1, 4, 0},{ -1, 4, 0},{ 3, 1, 1},{ -3, 1, 1},{ 2, 2, 0},
- { -2, 2, 0},{ 1, 5, 0},{ -1, 5, 0},{ 6, 0, 2},{ -6, 0, 2},{ 2, 3, 0},
- { -2, 3, 0},{ 1, 6, 0},{ -1, 6, 0},{ 4, 1, 1},{ -4, 1, 1},{ 7, 0, 2},
- { -7, 0, 2},{ 3, 2, 1},{ -3, 2, 1},{ 2, 4, 0},{ -2, 4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+ { -4, 2, 0},{ 1, 5, 0},{ -1, 5, 0},{ 9, 1, 2},{ -9, 1, 2},{ 5, 2, 1},
+ { -5, 2, 1},{ 2, 4, 0},{ -2, 4, 0},{ 10, 1, 2},{-10, 1, 2},{ 3, 3, 0},
+ { -3, 3, 0},{ 1, 6, 0},{ -1, 6, 0},{ 11, 1, 3},{-11, 1, 3},{ 6, 2, 1},
+ { -6, 2, 1},{ 1, 7, 0},{ -1, 7, 0},{ 2, 5, 0},{ -2, 5, 0},{ 3, 4, 0},
+ { -3, 4, 0},{ 12, 1, 3},{-12, 1, 3},{ 4, 3, 0},{ -4, 3, 0}
},
//level_add
- {13, 7, 5, 4, 3, 2, 2,-1,-1,-1 -1,-1,-1,-1,-1,-1,
+ { 0,13, 7, 5, 4, 3, 2, 2,-1,-1,-1 -1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
4, //inc_limit
- 6, //max_run
+ 7, //max_run
},{
{ //level / run
- { 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 0},{ -3, 0, 0},
- { 0, 0, 0},{ 4, 0, 0},{ -4, 0, 0},{ 5, 0, 0},{ -5, 0, 0},{ 6, 0, 0},
- { -6, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 7, 0, 0},{ -7, 0, 0},{ 8, 0, 1},
- { -8, 0, 1},{ 2, 1, 0},{ -2, 1, 0},{ 9, 0, 1},{ -9, 0, 1},{ 10, 0, 1},
- {-10, 0, 1},{ 1, 2, 0},{ -1, 2, 0},{ 3, 1, 0},{ -3, 1, 0},{ 11, 0, 2},
- {-11, 0, 2},{ 4, 1, 0},{ -4, 1, 0},{ 12, 0, 2},{-12, 0, 2},{ 13, 0, 2},
- {-13, 0, 2},{ 5, 1, 0},{ -5, 1, 0},{ 1, 3, 0},{ -1, 3, 0},{ 2, 2, 0},
- { -2, 2, 0},{ 14, 0, 2},{-14, 0, 2},{ 6, 1, 0},{ -6, 1, 0},{ 15, 0, 2},
- {-15, 0, 2},{ 16, 0, 2},{-16, 0, 2},{ 3, 2, 0},{ -3, 2, 0},{ 1, 4, 0},
- { -1, 4, 0},{ 7, 1, 0},{ -7, 1, 0},{ 17, 0, 2},{-17, 0, 2},
+ { 1, 1, 0},{ -1, 1, 0},{ 2, 1, 0},{ -2, 1, 0},{ 3, 1, 0},{ -3, 1, 0},
+ { EOB },{ 4, 1, 0},{ -4, 1, 0},{ 5, 1, 0},{ -5, 1, 0},{ 6, 1, 0},
+ { -6, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 7, 1, 0},{ -7, 1, 0},{ 8, 1, 1},
+ { -8, 1, 1},{ 2, 2, 0},{ -2, 2, 0},{ 9, 1, 1},{ -9, 1, 1},{ 10, 1, 1},
+ {-10, 1, 1},{ 1, 3, 0},{ -1, 3, 0},{ 3, 2, 0},{ -3, 2, 0},{ 11, 1, 2},
+ {-11, 1, 2},{ 4, 2, 0},{ -4, 2, 0},{ 12, 1, 2},{-12, 1, 2},{ 13, 1, 2},
+ {-13, 1, 2},{ 5, 2, 0},{ -5, 2, 0},{ 1, 4, 0},{ -1, 4, 0},{ 2, 3, 0},
+ { -2, 3, 0},{ 14, 1, 2},{-14, 1, 2},{ 6, 2, 0},{ -6, 2, 0},{ 15, 1, 2},
+ {-15, 1, 2},{ 16, 1, 2},{-16, 1, 2},{ 3, 3, 0},{ -3, 3, 0},{ 1, 5, 0},
+ { -1, 5, 0},{ 7, 2, 0},{ -7, 2, 0},{ 17, 1, 2},{-17, 1, 2}
},
//level_add
- {18, 8, 4, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,18, 8, 4, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
7, //inc_limit
- 4, //max_run
+ 5, //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 0},
- { -3, 0, 0},{ 4, 0, 0},{ -4, 0, 0},{ 5, 0, 0},{ -5, 0, 0},{ 6, 0, 0},
- { -6, 0, 0},{ 7, 0, 0},{ -7, 0, 0},{ 8, 0, 0},{ -8, 0, 0},{ 9, 0, 0},
- { -9, 0, 0},{ 10, 0, 0},{-10, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 11, 0, 1},
- {-11, 0, 1},{ 12, 0, 1},{-12, 0, 1},{ 13, 0, 1},{-13, 0, 1},{ 2, 1, 0},
- { -2, 1, 0},{ 14, 0, 1},{-14, 0, 1},{ 15, 0, 1},{-15, 0, 1},{ 3, 1, 0},
- { -3, 1, 0},{ 16, 0, 1},{-16, 0, 1},{ 1, 2, 0},{ -1, 2, 0},{ 17, 0, 1},
- {-17, 0, 1},{ 4, 1, 0},{ -4, 1, 0},{ 18, 0, 1},{-18, 0, 1},{ 5, 1, 0},
- { -5, 1, 0},{ 19, 0, 1},{-19, 0, 1},{ 20, 0, 1},{-20, 0, 1},{ 6, 1, 0},
- { -6, 1, 0},{ 21, 0, 1},{-21, 0, 1},{ 2, 2, 0},{ -2, 2, 0},
+ { EOB },{ 1, 1, 0},{ -1, 1, 0},{ 2, 1, 0},{ -2, 1, 0},{ 3, 1, 0},
+ { -3, 1, 0},{ 4, 1, 0},{ -4, 1, 0},{ 5, 1, 0},{ -5, 1, 0},{ 6, 1, 0},
+ { -6, 1, 0},{ 7, 1, 0},{ -7, 1, 0},{ 8, 1, 0},{ -8, 1, 0},{ 9, 1, 0},
+ { -9, 1, 0},{ 10, 1, 0},{-10, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 11, 1, 1},
+ {-11, 1, 1},{ 12, 1, 1},{-12, 1, 1},{ 13, 1, 1},{-13, 1, 1},{ 2, 2, 0},
+ { -2, 2, 0},{ 14, 1, 1},{-14, 1, 1},{ 15, 1, 1},{-15, 1, 1},{ 3, 2, 0},
+ { -3, 2, 0},{ 16, 1, 1},{-16, 1, 1},{ 1, 3, 0},{ -1, 3, 0},{ 17, 1, 1},
+ {-17, 1, 1},{ 4, 2, 0},{ -4, 2, 0},{ 18, 1, 1},{-18, 1, 1},{ 5, 2, 0},
+ { -5, 2, 0},{ 19, 1, 1},{-19, 1, 1},{ 20, 1, 1},{-20, 1, 1},{ 6, 2, 0},
+ { -6, 2, 0},{ 21, 1, 1},{-21, 1, 1},{ 2, 3, 0},{ -2, 3, 0}
},
//level_add
- {22, 7, 3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,22, 7, 3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
10, //inc_limit
- 2, //max_run
+ 3, //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 0},
- { -3, 0, 0},{ 4, 0, 0},{ -4, 0, 0},{ 5, 0, 0},{ -5, 0, 0},{ 6, 0, 0},
- { -6, 0, 0},{ 7, 0, 0},{ -7, 0, 0},{ 8, 0, 0},{ -8, 0, 0},{ 9, 0, 0},
- { -9, 0, 0},{ 10, 0, 0},{-10, 0, 0},{ 11, 0, 0},{-11, 0, 0},{ 12, 0, 0},
- {-12, 0, 0},{ 13, 0, 0},{-13, 0, 0},{ 14, 0, 0},{-14, 0, 0},{ 15, 0, 0},
- {-15, 0, 0},{ 16, 0, 0},{-16, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 17, 0, 0},
- {-17, 0, 0},{ 18, 0, 0},{-18, 0, 0},{ 19, 0, 0},{-19, 0, 0},{ 20, 0, 0},
- {-20, 0, 0},{ 21, 0, 0},{-21, 0, 0},{ 2, 1, 0},{ -2, 1, 0},{ 22, 0, 0},
- {-22, 0, 0},{ 23, 0, 0},{-23, 0, 0},{ 24, 0, 0},{-24, 0, 0},{ 25, 0, 0},
- {-25, 0, 0},{ 3, 1, 0},{ -3, 1, 0},{ 26, 0, 0},{-26, 0, 0}
+ { EOB },{ 1, 1, 0},{ -1, 1, 0},{ 2, 1, 0},{ -2, 1, 0},{ 3, 1, 0},
+ { -3, 1, 0},{ 4, 1, 0},{ -4, 1, 0},{ 5, 1, 0},{ -5, 1, 0},{ 6, 1, 0},
+ { -6, 1, 0},{ 7, 1, 0},{ -7, 1, 0},{ 8, 1, 0},{ -8, 1, 0},{ 9, 1, 0},
+ { -9, 1, 0},{ 10, 1, 0},{-10, 1, 0},{ 11, 1, 0},{-11, 1, 0},{ 12, 1, 0},
+ {-12, 1, 0},{ 13, 1, 0},{-13, 1, 0},{ 14, 1, 0},{-14, 1, 0},{ 15, 1, 0},
+ {-15, 1, 0},{ 16, 1, 0},{-16, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 17, 1, 0},
+ {-17, 1, 0},{ 18, 1, 0},{-18, 1, 0},{ 19, 1, 0},{-19, 1, 0},{ 20, 1, 0},
+ {-20, 1, 0},{ 21, 1, 0},{-21, 1, 0},{ 2, 2, 0},{ -2, 2, 0},{ 22, 1, 0},
+ {-22, 1, 0},{ 23, 1, 0},{-23, 1, 0},{ 24, 1, 0},{-24, 1, 0},{ 25, 1, 0},
+ {-25, 1, 0},{ 3, 2, 0},{ -3, 2, 0},{ 26, 1, 0},{-26, 1, 0}
},
//level_add
- {27, 4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,27, 4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
INT_MAX, //inc_limit
- 1, //max_run
+ 2, //max_run
}
};
static const residual_vlc_t inter_2dvlc[7] = {
{
{ //level / run
- { 1, 0, 1},{ -1, 0, 1},{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},
- { 1, 3, 1},{ -1, 3, 1},{ 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},
- { 1, 6, 1},{ -1, 6, 1},{ 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},
- { 1, 9, 1},{ -1, 9, 1},{ 1,10, 1},{ -1,10, 1},{ 1,11, 1},{ -1,11, 1},
- { 1,12, 1},{ -1,12, 1},{ 2, 0, 2},{ -2, 0, 2},{ 1,13, 1},{ -1,13, 1},
- { 1,14, 1},{ -1,14, 1},{ 1,15, 1},{ -1,15, 1},{ 1,16, 1},{ -1,16, 1},
- { 1,17, 1},{ -1,17, 1},{ 1,18, 1},{ -1,18, 1},{ 3, 0, 3},{ -3, 0, 3},
- { 1,19, 1},{ -1,19, 1},{ 1,20, 1},{ -1,20, 1},{ 2, 1, 2},{ -2, 1, 2},
- { 1,21, 1},{ -1,21, 1},{ 1,22, 1},{ -1,22, 1},{ 1,23, 1},{ -1,23, 1},
- { 1,24, 1},{ -1,24, 1},{ 1,25, 1},{ -1,25, 1},{ 0, 0,-1}
+ { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
+ { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1},
+ { 1, 7, 1},{ -1, 7, 1},{ 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1},
+ { 1,10, 1},{ -1,10, 1},{ 1,11, 1},{ -1,11, 1},{ 1,12, 1},{ -1,12, 1},
+ { 1,13, 1},{ -1,13, 1},{ 2, 1, 2},{ -2, 1, 2},{ 1,14, 1},{ -1,14, 1},
+ { 1,15, 1},{ -1,15, 1},{ 1,16, 1},{ -1,16, 1},{ 1,17, 1},{ -1,17, 1},
+ { 1,18, 1},{ -1,18, 1},{ 1,19, 1},{ -1,19, 1},{ 3, 1, 3},{ -3, 1, 3},
+ { 1,20, 1},{ -1,20, 1},{ 1,21, 1},{ -1,21, 1},{ 2, 2, 2},{ -2, 2, 2},
+ { 1,22, 1},{ -1,22, 1},{ 1,23, 1},{ -1,23, 1},{ 1,24, 1},{ -1,24, 1},
+ { 1,25, 1},{ -1,25, 1},{ 1,26, 1},{ -1,26, 1},{ EOB }
},
//level_add
- { 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ { 0, 4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
3, //golomb_order
0, //inc_limit
- 25 //max_run
+ 26 //max_run
},{
{ //level / run
- { 1, 0, 0},{ -1, 0, 0},{ 0, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 1, 2, 0},
- { -1, 2, 0},{ 1, 3, 0},{ -1, 3, 0},{ 1, 4, 0},{ -1, 4, 0},{ 1, 5, 0},
- { -1, 5, 0},{ 2, 0, 1},{ -2, 0, 1},{ 1, 6, 0},{ -1, 6, 0},{ 1, 7, 0},
- { -1, 7, 0},{ 1, 8, 0},{ -1, 8, 0},{ 1, 9, 0},{ -1, 9, 0},{ 2, 1, 1},
- { -2, 1, 1},{ 1,10, 0},{ -1,10, 0},{ 1,11, 0},{ -1,11, 0},{ 3, 0, 2},
- { -3, 0, 2},{ 1,12, 0},{ -1,12, 0},{ 1,13, 0},{ -1,13, 0},{ 2, 2, 1},
- { -2, 2, 1},{ 1,14, 0},{ -1,14, 0},{ 2, 3, 1},{ -2, 3, 1},{ 1,15, 0},
- { -1,15, 0},{ 2, 4, 1},{ -2, 4, 1},{ 1,16, 0},{ -1,16, 0},{ 4, 0, 3},
- { -4, 0, 3},{ 2, 5, 1},{ -2, 5, 1},{ 1,17, 0},{ -1,17, 0},{ 1,18, 0},
- { -1,18, 0},{ 2, 6, 1},{ -2, 6, 1},{ 3, 1, 2},{ -3, 1, 2},
+ { 1, 1, 0},{ -1, 1, 0},{ EOB },{ 1, 2, 0},{ -1, 2, 0},{ 1, 3, 0},
+ { -1, 3, 0},{ 1, 4, 0},{ -1, 4, 0},{ 1, 5, 0},{ -1, 5, 0},{ 1, 6, 0},
+ { -1, 6, 0},{ 2, 1, 1},{ -2, 1, 1},{ 1, 7, 0},{ -1, 7, 0},{ 1, 8, 0},
+ { -1, 8, 0},{ 1, 9, 0},{ -1, 9, 0},{ 1,10, 0},{ -1,10, 0},{ 2, 2, 1},
+ { -2, 2, 1},{ 1,11, 0},{ -1,11, 0},{ 1,12, 0},{ -1,12, 0},{ 3, 1, 2},
+ { -3, 1, 2},{ 1,13, 0},{ -1,13, 0},{ 1,14, 0},{ -1,14, 0},{ 2, 3, 1},
+ { -2, 3, 1},{ 1,15, 0},{ -1,15, 0},{ 2, 4, 1},{ -2, 4, 1},{ 1,16, 0},
+ { -1,16, 0},{ 2, 5, 1},{ -2, 5, 1},{ 1,17, 0},{ -1,17, 0},{ 4, 1, 3},
+ { -4, 1, 3},{ 2, 6, 1},{ -2, 6, 1},{ 1,18, 0},{ -1,18, 0},{ 1,19, 0},
+ { -1,19, 0},{ 2, 7, 1},{ -2, 7, 1},{ 3, 2, 2},{ -3, 2, 2}
},
//level_add
- { 5, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ { 0, 5, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
1, //inc_limit
- 18 //max_run
+ 19 //max_run
},{
{ //level / run
- { 1, 0, 0},{ -1, 0, 0},{ 0, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 2, 0, 0},
- { -2, 0, 0},{ 1, 2, 0},{ -1, 2, 0},{ 1, 3, 0},{ -1, 3, 0},{ 3, 0, 1},
- { -3, 0, 1},{ 2, 1, 0},{ -2, 1, 0},{ 1, 4, 0},{ -1, 4, 0},{ 1, 5, 0},
- { -1, 5, 0},{ 1, 6, 0},{ -1, 6, 0},{ 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},{ 3, 4, 1},{ -3, 4, 1},{ 1,14, 0},{ -1,14, 0}
},
//level_add
- { 7, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,-1,-1,
+ { 0, 7, 5, 4, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
2, //inc_limit
- 13 //max_run
+ 14 //max_run
},{
{ //level / run
- { 1, 0, 0},{ -1, 0, 0},{ 0, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 1, 1, 0},
- { -1, 1, 0},{ 3, 0, 0},{ -3, 0, 0},{ 1, 2, 0},{ -1, 2, 0},{ 2, 1, 0},
- { -2, 1, 0},{ 4, 0, 1},{ -4, 0, 1},{ 1, 3, 0},{ -1, 3, 0},{ 5, 0, 1},
- { -5, 0, 1},{ 1, 4, 0},{ -1, 4, 0},{ 3, 1, 0},{ -3, 1, 0},{ 2, 2, 0},
- { -2, 2, 0},{ 1, 5, 0},{ -1, 5, 0},{ 6, 0, 1},{ -6, 0, 1},{ 2, 3, 0},
- { -2, 3, 0},{ 1, 6, 0},{ -1, 6, 0},{ 4, 1, 1},{ -4, 1, 1},{ 7, 0, 2},
- { -7, 0, 2},{ 3, 2, 0},{ -3, 2, 0},{ 1, 7, 0},{ -1, 7, 0},{ 2, 4, 0},
- { -2, 4, 0},{ 8, 0, 2},{ -8, 0, 2},{ 1, 8, 0},{ -1, 8, 0},{ 3, 3, 0},
- { -3, 3, 0},{ 2, 5, 0},{ -2, 5, 0},{ 5, 1, 1},{ -5, 1, 1},{ 1, 9, 0},
- { -1, 9, 0},{ 9, 0, 2},{ -9, 0, 2},{ 4, 2, 1},{ -4, 2, 1},
+ { 1, 1, 0},{ -1, 1, 0},{ EOB },{ 2, 1, 0},{ -2, 1, 0},{ 1, 2, 0},
+ { -1, 2, 0},{ 3, 1, 0},{ -3, 1, 0},{ 1, 3, 0},{ -1, 3, 0},{ 2, 2, 0},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{13, 7, 5, 4, 3, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,13, 7, 5, 4, 3, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
6, //inc_limit
- 6 //max_run
+ 7 //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 0},
- { -3, 0, 0},{ 4, 0, 0},{ -4, 0, 0},{ 5, 0, 0},{ -5, 0, 0},{ 1, 1, 0},
- { -1, 1, 0},{ 6, 0, 0},{ -6, 0, 0},{ 7, 0, 0},{ -7, 0, 0},{ 8, 0, 0},
- { -8, 0, 0},{ 2, 1, 0},{ -2, 1, 0},{ 9, 0, 0},{ -9, 0, 0},{ 1, 2, 0},
- { -1, 2, 0},{ 10, 0, 1},{-10, 0, 1},{ 3, 1, 0},{ -3, 1, 0},{ 11, 0, 1},
- {-11, 0, 1},{ 4, 1, 0},{ -4, 1, 0},{ 12, 0, 1},{-12, 0, 1},{ 1, 3, 0},
- { -1, 3, 0},{ 2, 2, 0},{ -2, 2, 0},{ 13, 0, 1},{-13, 0, 1},{ 5, 1, 0},
- { -5, 1, 0},{ 14, 0, 1},{-14, 0, 1},{ 6, 1, 0},{ -6, 1, 0},{ 1, 4, 0},
- { -1, 4, 0},{ 15, 0, 1},{-15, 0, 1},{ 3, 2, 0},{ -3, 2, 0},{ 16, 0, 1},
- {-16, 0, 1},{ 2, 3, 0},{ -2, 3, 0},{ 7, 1, 0},{ -7, 1, 0},
+ { EOB },{ 1, 1, 0},{ -1, 1, 0},{ 2, 1, 0},{ -2, 1, 0},{ 3, 1, 0},
+ { -3, 1, 0},{ 4, 1, 0},{ -4, 1, 0},{ 5, 1, 0},{ -5, 1, 0},{ 1, 2, 0},
+ { -1, 2, 0},{ 6, 1, 0},{ -6, 1, 0},{ 7, 1, 0},{ -7, 1, 0},{ 8, 1, 0},
+ { -8, 1, 0},{ 2, 2, 0},{ -2, 2, 0},{ 9, 1, 0},{ -9, 1, 0},{ 1, 3, 0},
+ { -1, 3, 0},{ 10, 1, 1},{-10, 1, 1},{ 3, 2, 0},{ -3, 2, 0},{ 11, 1, 1},
+ {-11, 1, 1},{ 4, 2, 0},{ -4, 2, 0},{ 12, 1, 1},{-12, 1, 1},{ 1, 4, 0},
+ { -1, 4, 0},{ 2, 3, 0},{ -2, 3, 0},{ 13, 1, 1},{-13, 1, 1},{ 5, 2, 0},
+ { -5, 2, 0},{ 14, 1, 1},{-14, 1, 1},{ 6, 2, 0},{ -6, 2, 0},{ 1, 5, 0},
+ { -1, 5, 0},{ 15, 1, 1},{-15, 1, 1},{ 3, 3, 0},{ -3, 3, 0},{ 16, 1, 1},
+ {-16, 1, 1},{ 2, 4, 0},{ -2, 4, 0},{ 7, 2, 0},{ -7, 2, 0}
},
//level_add
- {17, 8, 4, 3, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,17, 8, 4, 3, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
9, //inc_limit
- 4 //max_run
+ 5 //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 0},
- { -3, 0, 0},{ 4, 0, 0},{ -4, 0, 0},{ 5, 0, 0},{ -5, 0, 0},{ 6, 0, 0},
- { -6, 0, 0},{ 7, 0, 0},{ -7, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 8, 0, 0},
- { -8, 0, 0},{ 9, 0, 0},{ -9, 0, 0},{ 10, 0, 0},{-10, 0, 0},{ 11, 0, 0},
- {-11, 0, 0},{ 12, 0, 0},{-12, 0, 0},{ 2, 1, 0},{ -2, 1, 0},{ 13, 0, 0},
- {-13, 0, 0},{ 1, 2, 0},{ -1, 2, 0},{ 14, 0, 0},{-14, 0, 0},{ 15, 0, 0},
- {-15, 0, 0},{ 3, 1, 0},{ -3, 1, 0},{ 16, 0, 0},{-16, 0, 0},{ 17, 0, 0},
- {-17, 0, 0},{ 18, 0, 0},{-18, 0, 0},{ 4, 1, 0},{ -4, 1, 0},{ 19, 0, 0},
- {-19, 0, 0},{ 20, 0, 0},{-20, 0, 0},{ 2, 2, 0},{ -2, 2, 0},{ 1, 3, 0},
- { -1, 3, 0},{ 5, 1, 0},{ -5, 1, 0},{ 21, 0, 0},{-21, 0, 0},
+ { EOB },{ 1, 1, 0},{ -1, 1, 0},{ 2, 1, 0},{ -2, 1, 0},{ 3, 1, 0},
+ { -3, 1, 0},{ 4, 1, 0},{ -4, 1, 0},{ 5, 1, 0},{ -5, 1, 0},{ 6, 1, 0},
+ { -6, 1, 0},{ 7, 1, 0},{ -7, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 8, 1, 0},
+ { -8, 1, 0},{ 9, 1, 0},{ -9, 1, 0},{ 10, 1, 0},{-10, 1, 0},{ 11, 1, 0},
+ {-11, 1, 0},{ 12, 1, 0},{-12, 1, 0},{ 2, 2, 0},{ -2, 2, 0},{ 13, 1, 0},
+ {-13, 1, 0},{ 1, 3, 0},{ -1, 3, 0},{ 14, 1, 0},{-14, 1, 0},{ 15, 1, 0},
+ {-15, 1, 0},{ 3, 2, 0},{ -3, 2, 0},{ 16, 1, 0},{-16, 1, 0},{ 17, 1, 0},
+ {-17, 1, 0},{ 18, 1, 0},{-18, 1, 0},{ 4, 2, 0},{ -4, 2, 0},{ 19, 1, 0},
+ {-19, 1, 0},{ 20, 1, 0},{-20, 1, 0},{ 2, 3, 0},{ -2, 3, 0},{ 1, 4, 0},
+ { -1, 4, 0},{ 5, 2, 0},{ -5, 2, 0},{ 21, 1, 0},{-21, 1, 0}
},
//level_add
- {22, 6, 3, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,22, 6, 3, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
2, //golomb_order
INT_MAX, //inc_limit
- 3 //max_run
+ 4 //max_run
}
};
static const residual_vlc_t chroma_2dvlc[5] = {
{
{ //level / run
- { 1, 0, 1},{ -1, 0, 1},{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},
- { 1, 3, 1},{ -1, 3, 1},{ 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},
- { 1, 6, 1},{ -1, 6, 1},{ 2, 0, 2},{ -2, 0, 2},{ 1, 7, 1},{ -1, 7, 1},
- { 1, 8, 1},{ -1, 8, 1},{ 1, 9, 1},{ -1, 9, 1},{ 1,10, 1},{ -1,10, 1},
- { 1,11, 1},{ -1,11, 1},{ 1,12, 1},{ -1,12, 1},{ 1,13, 1},{ -1,13, 1},
- { 1,14, 1},{ -1,14, 1},{ 3, 0, 3},{ -3, 0, 3},{ 1,15, 1},{ -1,15, 1},
- { 1,16, 1},{ -1,16, 1},{ 1,17, 1},{ -1,17, 1},{ 1,18, 1},{ -1,18, 1},
- { 1,19, 1},{ -1,19, 1},{ 1,20, 1},{ -1,20, 1},{ 1,21, 1},{ -1,21, 1},
- { 2, 1, 2},{ -2, 1, 2},{ 1,22, 1},{ -1,22, 1},{ 1,23, 1},{ -1,23, 1},
- { 1,24, 1},{ -1,24, 1},{ 4, 0, 3},{ -4, 0, 3},{ 0, 0,-1}
+ { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
+ { 1, 4, 1},{ -1, 4, 1},{ 1, 5, 1},{ -1, 5, 1},{ 1, 6, 1},{ -1, 6, 1},
+ { 1, 7, 1},{ -1, 7, 1},{ 2, 1, 2},{ -2, 1, 2},{ 1, 8, 1},{ -1, 8, 1},
+ { 1, 9, 1},{ -1, 9, 1},{ 1,10, 1},{ -1,10, 1},{ 1,11, 1},{ -1,11, 1},
+ { 1,12, 1},{ -1,12, 1},{ 1,13, 1},{ -1,13, 1},{ 1,14, 1},{ -1,14, 1},
+ { 1,15, 1},{ -1,15, 1},{ 3, 1, 3},{ -3, 1, 3},{ 1,16, 1},{ -1,16, 1},
+ { 1,17, 1},{ -1,17, 1},{ 1,18, 1},{ -1,18, 1},{ 1,19, 1},{ -1,19, 1},
+ { 1,20, 1},{ -1,20, 1},{ 1,21, 1},{ -1,21, 1},{ 1,22, 1},{ -1,22, 1},
+ { 2, 2, 2},{ -2, 2, 2},{ 1,23, 1},{ -1,23, 1},{ 1,24, 1},{ -1,24, 1},
+ { 1,25, 1},{ -1,25, 1},{ 4, 1, 3},{ -4, 1, 3},{ EOB }
},
//level_add
- { 5, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ { 0, 5, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2,-1},
2, //golomb_order
0, //inc_limit
- 24, //max_run
+ 25 //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 2, 0, 1},
- { -2, 0, 1},{ 1, 2, 0},{ -1, 2, 0},{ 1, 3, 0},{ -1, 3, 0},{ 1, 4, 0},
- { -1, 4, 0},{ 1, 5, 0},{ -1, 5, 0},{ 3, 0, 2},{ -3, 0, 2},{ 1, 6, 0},
- { -1, 6, 0},{ 1, 7, 0},{ -1, 7, 0},{ 2, 1, 1},{ -2, 1, 1},{ 1, 8, 0},
- { -1, 8, 0},{ 1, 9, 0},{ -1, 9, 0},{ 1,10, 0},{ -1,10, 0},{ 4, 0, 2},
- { -4, 0, 2},{ 1,11, 0},{ -1,11, 0},{ 1,12, 0},{ -1,12, 0},{ 1,13, 0},
- { -1,13, 0},{ 2, 2, 1},{ -2, 2, 1},{ 1,14, 0},{ -1,14, 0},{ 2, 3, 1},
- { -2, 3, 1},{ 5, 0, 3},{ -5, 0, 3},{ 3, 1, 2},{ -3, 1, 2},{ 1,15, 0},
- { -1,15, 0},{ 1,16, 0},{ -1,16, 0},{ 1,17, 0},{ -1,17, 0},{ 2, 4, 1},
- { -2, 4, 1},{ 1,18, 0},{ -1,18, 0},{ 1,19, 0},{ -1,19, 0},
+ { EOB },{ 1, 1, 0},{ -1, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 2, 1, 1},
+ { -2, 1, 1},{ 1, 3, 0},{ -1, 3, 0},{ 1, 4, 0},{ -1, 4, 0},{ 1, 5, 0},
+ { -1, 5, 0},{ 1, 6, 0},{ -1, 6, 0},{ 3, 1, 2},{ -3, 1, 2},{ 1, 7, 0},
+ { -1, 7, 0},{ 1, 8, 0},{ -1, 8, 0},{ 2, 2, 1},{ -2, 2, 1},{ 1, 9, 0},
+ { -1, 9, 0},{ 1,10, 0},{ -1,10, 0},{ 1,11, 0},{ -1,11, 0},{ 4, 1, 2},
+ { -4, 1, 2},{ 1,12, 0},{ -1,12, 0},{ 1,13, 0},{ -1,13, 0},{ 1,14, 0},
+ { -1,14, 0},{ 2, 3, 1},{ -2, 3, 1},{ 1,15, 0},{ -1,15, 0},{ 2, 4, 1},
+ { -2, 4, 1},{ 5, 1, 3},{ -5, 1, 3},{ 3, 2, 2},{ -3, 2, 2},{ 1,16, 0},
+ { -1,16, 0},{ 1,17, 0},{ -1,17, 0},{ 1,18, 0},{ -1,18, 0},{ 2, 5, 1},
+ { -2, 5, 1},{ 1,19, 0},{ -1,19, 0},{ 1,20, 0},{ -1,20, 0}
},
//level_add
- { 6, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ { 0, 6, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2,-1,-1,-1,-1,-1,-1},
0, //golomb_order
1, //inc_limit
- 19, //max_run
+ 20 //max_run
},{
{ //level / run
- { 1, 0,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1, 2},{ -7, 1, 2},{ 1, 8, 0},
+ { -1, 8, 0},{ 4, 2, 1},{ -4, 2, 1},{ 1, 9, 0},{ -1, 9, 0},{ 3, 3, 1},
+ { -3, 3, 1},{ 2, 5, 0},{ -2, 5, 0},{ 2, 6, 0},{ -2, 6, 0},{ 8, 1, 2},
+ { -8, 1, 2},{ 1,10, 0},{ -1,10, 0},{ 1,11, 0},{ -1,11, 0},{ 9, 1, 2},
+ { -9, 1, 2},{ 5, 2, 2},{ -5, 2, 2},{ 3, 4, 1},{ -3, 4, 1},
},
//level_add
- {10, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2,-1,-1,-1,-1,-1,
+ { 0,10, 6, 4, 4, 3, 3, 2, 2, 2, 2, 2,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
1, //golomb_order
2, //inc_limit
- 10, //max_run
+ 11 //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 0},
- { -3, 0, 0},{ 4, 0, 0},{ -4, 0, 0},{ 1, 1, 0},{ -1, 1, 0},{ 5, 0, 1},
- { -5, 0, 1},{ 2, 1, 0},{ -2, 1, 0},{ 6, 0, 1},{ -6, 0, 1},{ 1, 2, 0},
- { -1, 2, 0},{ 7, 0, 1},{ -7, 0, 1},{ 3, 1, 0},{ -3, 1, 0},{ 8, 0, 1},
- { -8, 0, 1},{ 1, 3, 0},{ -1, 3, 0},{ 2, 2, 0},{ -2, 2, 0},{ 9, 0, 1},
- { -9, 0, 1},{ 4, 1, 0},{ -4, 1, 0},{ 1, 4, 0},{ -1, 4, 0},{ 10, 0, 1},
- {-10, 0, 1},{ 3, 2, 0},{ -3, 2, 0},{ 5, 1, 1},{ -5, 1, 1},{ 2, 3, 0},
- { -2, 3, 0},{ 11, 0, 1},{-11, 0, 1},{ 1, 5, 0},{ -1, 5, 0},{ 12, 0, 1},
- {-12, 0, 1},{ 1, 6, 0},{ -1, 6, 0},{ 6, 1, 1},{ -6, 1, 1},{ 13, 0, 1},
- {-13, 0, 1},{ 2, 4, 0},{ -2, 4, 0},{ 1, 7, 0},{ -1, 7, 0},
+ { EOB },{ 1, 1, 0},{ -1, 1, 0},{ 2, 1, 0},{ -2, 1, 0},{ 3, 1, 0},
+ { -3, 1, 0},{ 4, 1, 0},{ -4, 1, 0},{ 1, 2, 0},{ -1, 2, 0},{ 5, 1, 1},
+ { -5, 1, 1},{ 2, 2, 0},{ -2, 2, 0},{ 6, 1, 1},{ -6, 1, 1},{ 1, 3, 0},
+ { -1, 3, 0},{ 7, 1, 1},{ -7, 1, 1},{ 3, 2, 0},{ -3, 2, 0},{ 8, 1, 1},
+ { -8, 1, 1},{ 1, 4, 0},{ -1, 4, 0},{ 2, 3, 0},{ -2, 3, 0},{ 9, 1, 1},
+ { -9, 1, 1},{ 4, 2, 0},{ -4, 2, 0},{ 1, 5, 0},{ -1, 5, 0},{ 10, 1, 1},
+ {-10, 1, 1},{ 3, 3, 0},{ -3, 3, 0},{ 5, 2, 1},{ -5, 2, 1},{ 2, 4, 0},
+ { -2, 4, 0},{ 11, 1, 1},{-11, 1, 1},{ 1, 6, 0},{ -1, 6, 0},{ 12, 1, 1},
+ {-12, 1, 1},{ 1, 7, 0},{ -1, 7, 0},{ 6, 2, 1},{ -6, 2, 1},{ 13, 1, 1},
+ {-13, 1, 1},{ 2, 5, 0},{ -2, 5, 0},{ 1, 8, 0},{ -1, 8, 0},
},
//level_add
- {14, 7, 4, 3, 3, 2, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,14, 7, 4, 3, 3, 2, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
1, //golomb_order
4, //inc_limit
- 7, //max_run
+ 8 //max_run
},{
{ //level / run
- { 0, 0, 0},{ 1, 0, 0},{ -1, 0, 0},{ 2, 0, 0},{ -2, 0, 0},{ 3, 0, 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4, 2, 0},{ -4, 2, 0},{ 16, 1, 0},
+ {-16, 1, 0},{ 17, 1, 0},{-17, 1, 0},{ 5, 2, 0},{ -5, 2, 0},{ 1, 4, 0},
+ { -1, 4, 0},{ 2, 3, 0},{ -2, 3, 0},{ 18, 1, 0},{-18, 1, 0},{ 6, 2, 0},
+ { -6, 2, 0},{ 19, 1, 0},{-19, 1, 0},{ 1, 5, 0},{ -1, 5, 0},
},
//level_add
- {20, 7, 3, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+ { 0,20, 7, 3, 2, 2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1},
0, //golomb_order
INT_MAX, //inc_limit
- 4, //max_run
+ 5, //max_run
}
};
+#undef EOB
+
static const uint8_t alpha_tab[64] = {
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3,
4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 18, 20,