|
|
@@ -7,7 +7,7 @@ |
|
|
|
#define VC9DATA_H |
|
|
|
|
|
|
|
/* Set a method for reading VLC in NORM6 bitplane decoding */ |
|
|
|
#define TILE_VLC_METHOD 1 |
|
|
|
#define VLC_NORM6_METH0D 1 |
|
|
|
|
|
|
|
/* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */ |
|
|
|
const int16_t vc9_bfraction_lut[23] = { |
|
|
@@ -74,7 +74,7 @@ static const uint8_t vc9_norm2_bits[4] = { |
|
|
|
1, 3, 3, 2 |
|
|
|
}; |
|
|
|
|
|
|
|
#if TILE_VLC_METHOD == 1 |
|
|
|
#if VLC_NORM6_METH0D == 1 |
|
|
|
static const uint16_t vc9_norm6_codes[64] = { |
|
|
|
0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, |
|
|
|
0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, |
|
|
@@ -157,34 +157,19 @@ static const uint8_t vc9_norm6_spec[64][5] = { |
|
|
|
}; |
|
|
|
#endif |
|
|
|
|
|
|
|
#if TILE_VLC_METHOD == 2 //Hyper-stupid way to handle sparse tables |
|
|
|
static const uint8_t vc9_norm6_first[2][64] = { |
|
|
|
//Mechanical way, handling sparse/incomplete tables |
|
|
|
#if VLC_NORM6_METH0D == 2 |
|
|
|
//(2,5) is VLC+FLC, (3,5) double VLC |
|
|
|
static const uint8_t vc9_norm6_first[24][2] = { |
|
|
|
{ 1, 1}, { 2, 4}, { 3, 4}, { 0, 8}, |
|
|
|
{ 4, 4}, { 5, 1}, { 2, 8}, { 2, 5}, |
|
|
|
{ 5, 4}, { 3, 8}, { 4, 8}, { 2, 5}, |
|
|
|
{ 5, 8}, { 2, 5}, { 2, 5}, { 3, 5}, |
|
|
|
{ 6, 4}, { 6, 8}, { 7, 8}, { 2, 5}, |
|
|
|
{ 8, 8}, { 2, 5}, { 2, 5}, { 3, 5}, |
|
|
|
{ 9, 8}, { 2, 5}, { 2, 5}, { 3, 5}, |
|
|
|
{ 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, |
|
|
|
{ 7, 4}, { 10, 8}, { 11, 8}, { 2, 5}, |
|
|
|
{ 12, 8}, { 2, 5}, { 2, 5}, { 3, 5}, |
|
|
|
{ 13, 8}, { 2, 5}, { 2, 5}, { 3, 5}, |
|
|
|
{ 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, |
|
|
|
{ 14, 8}, { 2, 5}, { 2, 5}, { 3, 5}, |
|
|
|
{ 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, |
|
|
|
{ 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, |
|
|
|
{ 3, 5}, { 3, 5}, { 3, 5}, { 3, 5} |
|
|
|
{ 4, 4}, { 1, 8}, { 2, 8}, { 5, 4}, |
|
|
|
{ 3, 8}, { 4, 8}, { 5, 8}, { 6, 4}, |
|
|
|
{ 6, 8}, { 7, 8}, { 8, 8}, { 9, 8}, |
|
|
|
{ 7, 4}, { 10, 8}, { 11, 8}, { 12, 8}, |
|
|
|
{ 13, 8}, { 14, 8}, { 2, 5}, { 3, 5} |
|
|
|
}; |
|
|
|
|
|
|
|
/* 0=>simple VLC, 1=>VLCFLC, 2=>double VLC */ |
|
|
|
static const int vc9_norm6_mode[64] = { |
|
|
|
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, |
|
|
|
0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 2, |
|
|
|
0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 2, |
|
|
|
0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2 |
|
|
|
}; |
|
|
|
static const uint8_t vc9_norm6_second[22] = { |
|
|
|
static const uint8_t vc9_norm6_second[22][2] = { |
|
|
|
{ 14, 8}, { 13, 8}, { 12, 8}, { 11, 8}, |
|
|
|
{ 10, 8}, { 7, 4}, { 9, 8}, { 8, 8}, |
|
|
|
{ 7, 8}, { 6, 8}, { 6, 4}, { 5, 8}, |
|
|
|