diff options
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_blockd.c | 27 | ||||
-rw-r--r-- | vp9/common/vp9_blockd.h | 23 | ||||
-rw-r--r-- | vp9/common/vp9_common.h | 6 | ||||
-rw-r--r-- | vp9/common/vp9_default_coef_probs.h | 2443 | ||||
-rw-r--r-- | vp9/common/vp9_entropy.c | 8 | ||||
-rw-r--r-- | vp9/common/vp9_entropy.h | 6 | ||||
-rw-r--r-- | vp9/common/vp9_entropymode.c | 202 | ||||
-rw-r--r-- | vp9/common/vp9_entropymv.c | 42 | ||||
-rw-r--r-- | vp9/common/vp9_filter.c | 74 | ||||
-rw-r--r-- | vp9/common/vp9_idctllm.c | 31 | ||||
-rw-r--r-- | vp9/common/vp9_pred_common.c | 20 | ||||
-rw-r--r-- | vp9/common/vp9_recon.c | 75 | ||||
-rw-r--r-- | vp9/common/vp9_reconinter.c | 10 | ||||
-rw-r--r-- | vp9/common/vp9_reconintra.c | 26 | ||||
-rw-r--r-- | vp9/common/vp9_reconintra4x4.c | 100 | ||||
-rw-r--r-- | vp9/common/vp9_treecoder.c | 29 | ||||
-rw-r--r-- | vp9/common/vp9_treecoder.h | 27 |
17 files changed, 1389 insertions, 1760 deletions
diff --git a/vp9/common/vp9_blockd.c b/vp9/common/vp9_blockd.c index 60aedf8cb..4c88a4fa2 100644 --- a/vp9/common/vp9_blockd.c +++ b/vp9/common/vp9_blockd.c @@ -12,18 +12,19 @@ #include "vp9/common/vp9_blockd.h" #include "vpx_mem/vpx_mem.h" - -const unsigned char vp9_block2left[25] = { - 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8 -}; -const unsigned char vp9_block2above[25] = { - 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8 +const unsigned char vp9_block2left[TX_SIZE_MAX_SB][25] = { + {0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8}, + {0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}, +#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8} +#endif }; - -const unsigned char vp9_block2left_8x8[25] = { - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8 +const unsigned char vp9_block2above[TX_SIZE_MAX_SB][25] = { + {0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8}, + {0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8}, + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8}, +#if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS + {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 6, 6, 6, 6, 8} +#endif }; -const unsigned char vp9_block2above_8x8[25] = { - 0, 0, 0, 0, 2, 2, 2, 2, 0, 0, 0, 0, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8 -}; - diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 11efd4475..4306eb02a 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -66,11 +66,6 @@ typedef struct { ENTROPY_CONTEXT y2; } ENTROPY_CONTEXT_PLANES; -extern const unsigned char vp9_block2left[25]; -extern const unsigned char vp9_block2above[25]; -extern const unsigned char vp9_block2left_8x8[25]; -extern const unsigned char vp9_block2above_8x8[25]; - #define VP9_COMBINEENTROPYCONTEXTS( Dest, A, B) \ Dest = ((A)!=0) + ((B)!=0); @@ -102,13 +97,11 @@ typedef enum TM_PRED, /* Truemotion prediction */ I8X8_PRED, /* 8x8 based prediction, each 8x8 has its own prediction mode */ B_PRED, /* block based prediction, each block has its own prediction mode */ - NEARESTMV, NEARMV, ZEROMV, NEWMV, SPLITMV, - MB_MODE_COUNT } MB_PREDICTION_MODE; @@ -121,18 +114,17 @@ typedef enum { SEG_LVL_EOB = 4, // EOB end stop marker. SEG_LVL_TRANSFORM = 5, // Block transform size. SEG_LVL_MAX = 6 // Number of MB level features supported - } SEG_LVL_FEATURES; // Segment level features. typedef enum { - TX_4X4, // 4x4 dct transform - TX_8X8, // 8x8 dct transform - TX_16X16, // 16x16 dct transform - TX_SIZE_MAX_MB, // Number of transforms available to MBs + TX_4X4 = 0, // 4x4 dct transform + TX_8X8 = 1, // 8x8 dct transform + TX_16X16 = 2, // 16x16 dct transform + TX_SIZE_MAX_MB = 3, // Number of different transforms available #if CONFIG_TX32X32 && CONFIG_SUPERBLOCKS - TX_32X32 = TX_SIZE_MAX_MB, // 32x32 dct transform - TX_SIZE_MAX_SB, // Number of transforms available to SBs + TX_32X32 = TX_SIZE_MAX_MB, // 32x32 dct transform + TX_SIZE_MAX_SB, // Number of transforms available to SBs #else TX_SIZE_MAX_SB = TX_SIZE_MAX_MB, #endif @@ -510,6 +502,9 @@ static TX_TYPE txfm_map(B_PREDICTION_MODE bmode) { return tx_type; } +extern const unsigned char vp9_block2left[TX_SIZE_MAX_SB][25]; +extern const unsigned char vp9_block2above[TX_SIZE_MAX_SB][25]; + #define USE_ADST_FOR_I16X16_8X8 0 #define USE_ADST_FOR_I16X16_4X4 0 #define USE_ADST_FOR_I8X8_4X4 1 diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h index 893a3f8b3..d6887afa0 100644 --- a/vp9/common/vp9_common.h +++ b/vp9/common/vp9_common.h @@ -17,7 +17,7 @@ /* Interface header for common constant data structures and lookup tables */ #include "vpx_mem/vpx_mem.h" - +#include "vpx/vpx_integer.h" #include "vp9/common/vp9_common_types.h" /* Only need this for fixed-size arrays, for structs just assign. */ @@ -38,4 +38,8 @@ #define vp9_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest)); +static __inline uint8_t clip_pixel(int val) { + return (val > 255) ? 255u : (val < 0) ? 0u : val; +} + #endif /* common_h */ diff --git a/vp9/common/vp9_default_coef_probs.h b/vp9/common/vp9_default_coef_probs.h index 1255fce5e..afd517064 100644 --- a/vp9/common/vp9_default_coef_probs.h +++ b/vp9/common/vp9_default_coef_probs.h @@ -13,1346 +13,1201 @@ static const vp9_coeff_probs default_coef_probs_4x4[BLOCK_TYPES_4X4] = { - { - /* Block Type ( 0 ) */ - { - /* Coeff Band ( 0 )*/ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 }, - { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 }, - { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 }, - { 90, 116, 227, 252, 214, 209, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 }, - { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 }, - { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, - { 64, 128, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 }, - { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 }, - { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, - { 64, 100, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 }, - { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 }, - { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 }, - { 28, 110, 196, 243, 228, 255, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 }, - { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 }, - { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 }, - { 90, 90, 231, 255, 211, 171, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 }, - { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 }, - { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 }, - { 64, 120, 211, 255, 194, 224, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - } - }, - { - /* Block Type ( 1 ) */ - { - /* Coeff Band ( 0 )*/ - { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 }, - { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 }, - { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 }, - { 48, 32, 146, 208, 149, 167, 221, 162, 255, 223, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 }, - { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 }, - { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 }, - { 66, 90, 181, 242, 176, 190, 249, 202, 255, 255, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 }, - { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 }, - { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 }, - { 18, 80, 163, 242, 170, 187, 247, 210, 255, 255, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 }, - { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 }, - { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 }, - { 36, 120, 201, 253, 205, 192, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 }, - { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 }, - { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 }, - { 18, 90, 174, 245, 186, 161, 255, 199, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 }, - { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 }, - { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 }, - { 28, 70, 181, 251, 193, 211, 255, 205, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 }, - { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 }, - { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 }, - { 40, 90, 188, 251, 195, 217, 255, 224, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }, - { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }, - } - }, - { - /* Block Type ( 2 ) */ - { - /* Coeff Band ( 0 )*/ - { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 }, - { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 }, - { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }, - { 64, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 }, - { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 }, - { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 }, - { 140, 70, 195, 248, 188, 195, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 }, - { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 }, - { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 }, - { 60, 40, 190, 239, 201, 218, 255, 228, 128, 128, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 132, 118, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 }, - { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 48, 85, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { /* block Type 0 */ + { /* Coeff Band 0 */ { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 224, 180, 254, 255, 234, 224, 255, 227, 128, 128, 128 }, + { 187, 178, 250, 255, 226, 218, 255, 229, 255, 255, 128 }, + { 145, 171, 243, 253, 219, 211, 254, 226, 255, 224, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 1, 187, 252, 255, 231, 220, 255, 229, 255, 255, 128 }, + { 129, 174, 244, 254, 225, 216, 253, 219, 255, 255, 128 }, + { 16, 131, 193, 251, 205, 205, 254, 222, 255, 255, 128 }, + { 2, 93, 136, 236, 159, 179, 255, 197, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 1, 188, 254, 255, 241, 236, 254, 220, 255, 255, 128 }, + { 133, 165, 249, 255, 236, 220, 252, 220, 255, 255, 128 }, + { 20, 112, 203, 254, 217, 214, 255, 224, 255, 255, 128 }, + { 4, 61, 106, 240, 155, 189, 252, 202, 255, 255, 128 } + }, { /* Coeff Band 4 */ + { 1, 168, 252, 255, 239, 228, 253, 217, 255, 255, 128 }, + { 158, 163, 247, 255, 231, 221, 255, 242, 128, 128, 128 }, + { 23, 127, 205, 253, 212, 224, 255, 234, 255, 255, 128 }, + { 2, 83, 141, 237, 176, 210, 245, 207, 255, 255, 128 } + }, { /* Coeff Band 5 */ + { 1, 233, 254, 255, 243, 241, 255, 213, 128, 128, 128 }, + { 155, 213, 253, 255, 240, 221, 216, 112, 255, 255, 128 }, + { 41, 159, 237, 254, 229, 216, 255, 161, 128, 128, 128 }, + { 11, 95, 176, 244, 194, 191, 255, 167, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 1, 160, 253, 255, 238, 231, 255, 230, 255, 255, 128 }, + { 174, 152, 248, 255, 230, 223, 255, 223, 255, 255, 128 }, + { 86, 125, 213, 253, 207, 207, 254, 224, 255, 171, 128 }, + { 39, 89, 156, 240, 168, 190, 251, 181, 255, 255, 128 } + }, { /* Coeff Band 7 */ + { 1, 101, 255, 255, 243, 244, 255, 255, 128, 128, 128 }, + { 230, 66, 255, 255, 238, 238, 128, 128, 128, 128, 128 }, + { 151, 92, 229, 255, 224, 197, 128, 128, 128, 128, 128 }, + { 109, 57, 171, 255, 73, 255, 128, 128, 128, 128, 128 } } - }, - { - /* Block Type ( 3 ) */ - { - /* Coeff Band ( 0 )*/ - { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 }, - { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 }, - { 63, 48, 138, 219, 151, 178, 240, 170, 255, 216, 128 }, - { 54, 40, 138, 219, 151, 178, 240, 170, 255, 216, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 }, - { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 }, - { 44, 84, 162, 232, 172, 180, 245, 178, 255, 255, 128 }, - { 32, 70, 162, 232, 172, 180, 245, 178, 255, 255, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 }, - { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 }, - { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }, - { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 }, - { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 }, - { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 }, - { 26, 104, 170, 242, 183, 194, 254, 223, 255, 255, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 }, - { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 }, - { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }, - { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 }, - { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 }, - { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }, - { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 }, - { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 }, - { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }, - { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, { /* block Type 1 */ + { /* Coeff Band 0 */ + { 148, 109, 219, 239, 203, 184, 222, 172, 238, 203, 192 }, + { 101, 110, 206, 229, 181, 178, 224, 171, 250, 206, 180 }, + { 67, 108, 186, 222, 172, 174, 216, 167, 246, 195, 221 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 184, 249, 254, 226, 220, 253, 241, 255, 255, 128 }, + { 84, 182, 244, 254, 222, 218, 254, 217, 255, 255, 128 }, + { 56, 147, 210, 252, 208, 210, 253, 218, 255, 255, 128 }, + { 32, 124, 170, 233, 165, 178, 249, 196, 255, 253, 128 } + }, { /* Coeff Band 2 */ + { 1, 182, 242, 245, 208, 194, 239, 179, 255, 238, 128 }, + { 28, 170, 230, 241, 202, 192, 243, 171, 255, 243, 128 }, + { 16, 109, 165, 231, 182, 184, 237, 168, 255, 249, 255 }, + { 2, 76, 113, 202, 141, 172, 221, 160, 252, 227, 255 } + }, { /* Coeff Band 3 */ + { 1, 195, 249, 254, 230, 239, 251, 211, 255, 255, 128 }, + { 39, 164, 242, 254, 224, 222, 255, 235, 255, 255, 128 }, + { 16, 111, 179, 251, 204, 197, 251, 234, 255, 209, 128 }, + { 3, 84, 130, 225, 155, 176, 226, 196, 255, 238, 128 } + }, { /* Coeff Band 4 */ + { 1, 180, 248, 254, 227, 219, 254, 211, 255, 255, 128 }, + { 38, 170, 242, 253, 222, 214, 254, 242, 255, 255, 128 }, + { 5, 111, 176, 250, 204, 197, 255, 208, 128, 128, 128 }, + { 1, 75, 120, 233, 146, 186, 250, 203, 255, 255, 128 } + }, { /* Coeff Band 5 */ + { 1, 183, 251, 255, 232, 223, 252, 229, 255, 255, 128 }, + { 51, 158, 245, 255, 230, 224, 255, 239, 128, 128, 128 }, + { 13, 80, 158, 253, 206, 216, 255, 233, 128, 128, 128 }, + { 4, 39, 76, 212, 107, 153, 252, 206, 255, 255, 128 } + }, { /* Coeff Band 6 */ + { 1, 181, 252, 254, 231, 214, 242, 225, 255, 236, 128 }, + { 81, 167, 247, 254, 229, 217, 252, 226, 255, 255, 128 }, + { 20, 122, 195, 253, 213, 212, 249, 211, 255, 238, 128 }, + { 18, 100, 153, 231, 158, 182, 244, 203, 255, 219, 128 } + }, { /* Coeff Band 7 */ + { 1, 100, 254, 255, 242, 246, 255, 230, 128, 128, 128 }, + { 177, 62, 250, 255, 246, 210, 255, 255, 128, 128, 128 }, + { 65, 58, 186, 255, 227, 241, 255, 219, 128, 128, 128 }, + { 45, 23, 118, 244, 162, 208, 255, 228, 128, 128, 128 } + } + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 242, 73, 238, 244, 198, 192, 241, 189, 253, 226, 247 }, + { 171, 70, 204, 231, 180, 183, 228, 172, 247, 215, 221 }, + { 73, 62, 144, 202, 153, 169, 207, 153, 245, 199, 230 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 163, 241, 245, 201, 192, 243, 191, 255, 229, 255 }, + { 165, 147, 230, 245, 201, 193, 244, 193, 255, 231, 255 }, + { 76, 109, 191, 243, 190, 193, 243, 192, 255, 231, 255 }, + { 22, 63, 111, 202, 138, 164, 225, 164, 252, 218, 248 } + }, { /* Coeff Band 2 */ + { 1, 113, 225, 245, 201, 195, 238, 185, 254, 225, 255 }, + { 122, 105, 195, 236, 183, 186, 235, 180, 254, 227, 252 }, + { 38, 79, 135, 217, 154, 172, 229, 171, 253, 220, 250 }, + { 9, 53, 78, 161, 121, 151, 202, 141, 251, 207, 244 } + }, { /* Coeff Band 3 */ + { 1, 150, 238, 250, 213, 202, 244, 194, 255, 236, 255 }, + { 140, 132, 223, 247, 204, 199, 243, 193, 255, 234, 255 }, + { 51, 101, 182, 240, 188, 189, 240, 186, 255, 232, 255 }, + { 6, 59, 100, 201, 137, 165, 225, 161, 252, 221, 249 } + }, { /* Coeff Band 4 */ + { 1, 151, 233, 248, 205, 199, 248, 196, 255, 243, 255 }, + { 133, 140, 214, 244, 193, 193, 245, 194, 255, 236, 255 }, + { 27, 104, 168, 235, 172, 183, 243, 187, 254, 235, 255 }, + { 2, 61, 101, 202, 135, 164, 229, 167, 254, 223, 255 } + }, { /* Coeff Band 5 */ + { 1, 227, 246, 254, 225, 215, 254, 217, 255, 255, 128 }, + { 132, 195, 239, 253, 219, 210, 252, 212, 255, 255, 128 }, + { 49, 143, 214, 251, 207, 204, 253, 212, 255, 238, 128 }, + { 11, 93, 151, 235, 169, 185, 247, 190, 255, 238, 128 } + }, { /* Coeff Band 6 */ + { 1, 143, 237, 251, 213, 203, 249, 203, 255, 243, 128 }, + { 137, 120, 216, 246, 198, 196, 248, 199, 255, 240, 255 }, + { 50, 94, 166, 233, 169, 181, 245, 189, 255, 240, 255 }, + { 9, 56, 97, 190, 129, 158, 228, 159, 255, 226, 255 } + }, { /* Coeff Band 7 */ + { 1, 96, 245, 254, 229, 216, 255, 212, 255, 255, 128 }, + { 179, 81, 234, 253, 217, 209, 255, 230, 255, 255, 128 }, + { 105, 56, 192, 248, 192, 197, 252, 212, 255, 205, 128 }, + { 53, 32, 133, 228, 151, 177, 250, 192, 255, 255, 128 } + } + }, { /* block Type 3 */ + { /* Coeff Band 0 */ + { 209, 89, 216, 242, 191, 190, 245, 191, 240, 235, 168 }, + { 142, 96, 196, 229, 173, 180, 233, 175, 247, 220, 174 }, + { 66, 89, 157, 205, 155, 171, 209, 156, 243, 200, 197 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 159, 235, 246, 202, 197, 237, 186, 248, 223, 223 }, + { 96, 137, 223, 247, 203, 198, 242, 188, 241, 202, 209 }, + { 22, 95, 167, 243, 184, 196, 237, 187, 247, 221, 221 }, + { 3, 51, 81, 192, 125, 158, 220, 164, 242, 211, 197 } + }, { /* Coeff Band 2 */ + { 1, 145, 226, 244, 196, 194, 240, 191, 247, 225, 233 }, + { 66, 127, 203, 240, 188, 189, 239, 188, 248, 225, 220 }, + { 9, 83, 136, 224, 159, 176, 235, 177, 247, 223, 207 }, + { 2, 46, 71, 169, 121, 152, 210, 149, 241, 212, 199 } + }, { /* Coeff Band 3 */ + { 1, 174, 238, 249, 209, 201, 245, 198, 241, 196, 241 }, + { 76, 151, 223, 247, 203, 197, 245, 194, 243, 202, 198 }, + { 12, 102, 170, 240, 183, 187, 242, 191, 247, 225, 209 }, + { 1, 52, 85, 202, 135, 162, 225, 168, 240, 209, 221 } + }, { /* Coeff Band 4 */ + { 1, 140, 230, 247, 204, 198, 242, 190, 249, 209, 248 }, + { 94, 126, 213, 244, 195, 194, 240, 190, 247, 210, 237 }, + { 13, 95, 159, 232, 171, 181, 237, 179, 245, 205, 237 }, + { 1, 51, 83, 186, 128, 158, 216, 154, 240, 193, 229 } + }, { /* Coeff Band 5 */ + { 1, 218, 244, 251, 214, 202, 243, 199, 253, 214, 255 }, + { 91, 194, 238, 249, 210, 200, 247, 203, 251, 223, 255 }, + { 18, 140, 207, 247, 198, 194, 246, 203, 252, 213, 255 }, + { 3, 76, 126, 223, 156, 172, 233, 185, 251, 206, 255 } + }, { /* Coeff Band 6 */ + { 1, 135, 235, 250, 210, 203, 246, 206, 251, 219, 241 }, + { 105, 120, 214, 246, 196, 196, 245, 195, 250, 216, 243 }, + { 24, 91, 154, 231, 166, 180, 241, 183, 250, 214, 242 }, + { 3, 53, 84, 183, 127, 157, 218, 153, 244, 195, 237 } + }, { /* Coeff Band 7 */ + { 1, 83, 246, 252, 215, 208, 246, 206, 255, 237, 128 }, + { 184, 61, 233, 250, 208, 204, 245, 198, 254, 227, 255 }, + { 83, 58, 190, 246, 189, 195, 244, 198, 255, 229, 128 }, + { 41, 38, 125, 214, 144, 169, 229, 171, 251, 216, 255 } } } }; - static const vp9_coeff_probs default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4] = { - { - /* Block Type ( 0 ) */ - { - /* Coeff Band ( 0 )*/ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128 }, - { 189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128 }, - { 106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128 }, - { 90, 116, 227, 252, 214, 209, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128 }, - { 181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128 }, - { 78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, - { 64, 128, 202, 247, 198, 180, 255, 219, 128, 128, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128 }, - { 184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128 }, - { 77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, - { 64, 100, 216, 255, 236, 230, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128 }, - { 170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128 }, - { 37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128 }, - { 28, 110, 196, 243, 228, 255, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128 }, - { 207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128 }, - { 102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128 }, - { 90, 90, 231, 255, 211, 171, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128 }, - { 177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128 }, - { 80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128 }, - { 64, 120, 211, 255, 194, 224, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { /* block Type 0 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { - /* Block Type ( 1 ) */ - { - /* Coeff Band ( 0 )*/ - { 198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62 }, - { 131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1 }, - { 68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128 }, - { 48, 32, 146, 208, 149, 167, 221, 162, 255, 223, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128 }, - { 184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128 }, - { 81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128 }, - { 66, 90, 181, 242, 176, 190, 249, 202, 255, 255, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128 }, - { 99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128 }, - { 23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128 }, - { 18, 80, 163, 242, 170, 187, 247, 210, 255, 255, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128 }, - { 109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128 }, - { 44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128 }, - { 36, 120, 201, 253, 205, 192, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128 }, - { 94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128 }, - { 22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128 }, - { 18, 90, 174, 245, 186, 161, 255, 199, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128 }, - { 124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128 }, - { 35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128 }, - { 28, 70, 181, 251, 193, 211, 255, 205, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128 }, - { 121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128 }, - { 45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128 }, - { 40, 90, 188, 251, 195, 217, 255, 224, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }, - { 137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128 }, + }, { /* block Type 1 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { - /* Block Type ( 2 ) */ - { - /* Coeff Band ( 0 )*/ - { 253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128 }, - { 175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128 }, - { 73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }, - { 64, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128 }, - { 239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128 }, - { 155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128 }, - { 140, 70, 195, 248, 188, 195, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128 }, - { 201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128 }, - { 69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128 }, - { 60, 40, 190, 239, 201, 218, 255, 228, 128, 128, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128 }, - { 141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 132, 118, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128 }, - { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128 }, - { 55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 48, 85, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { - /* Block Type ( 3 ) */ - { - /* Coeff Band ( 0 )*/ - { 202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255 }, - { 126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128 }, - { 63, 48, 138, 219, 151, 178, 240, 170, 255, 216, 128 }, - { 54, 40, 138, 219, 151, 178, 240, 170, 255, 216, 128 }, - }, - { - /* Coeff Band ( 1 )*/ - { 1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128 }, - { 166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128 }, - { 44, 84, 162, 232, 172, 180, 245, 178, 255, 255, 128 }, - { 32, 70, 162, 232, 172, 180, 245, 178, 255, 255, 128 }, - }, - { - /* Coeff Band ( 2 )*/ - { 1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128 }, - { 124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128 }, - { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }, - { 24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128 }, - }, - { - /* Coeff Band ( 3 )*/ - { 1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128 }, - { 149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128 }, - { 28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128 }, - { 26, 104, 170, 242, 183, 194, 254, 223, 255, 255, 128 }, - }, - { - /* Coeff Band ( 4 )*/ - { 1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128 }, - { 123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128 }, - { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }, - { 20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128 }, - }, - { - /* Coeff Band ( 5 )*/ - { 1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128 }, - { 168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128 }, - { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }, - { 47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128 }, - }, - { - /* Coeff Band ( 6 )*/ - { 1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128 }, - { 141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128 }, - { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }, - { 42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128 }, - }, - { - /* Coeff Band ( 7 )*/ - { 1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128 }, + }, { /* block Type 3 */ + { /* Coeff Band 0 */ + { 191, 34, 178, 193, 160, 173, 196, 142, 247, 191, 244 }, + { 84, 45, 129, 187, 145, 170, 189, 145, 240, 186, 212 }, + { 14, 36, 69, 149, 120, 154, 177, 136, 231, 177, 196 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 76, 169, 226, 167, 180, 227, 171, 247, 218, 226 }, + { 72, 75, 162, 226, 166, 181, 231, 172, 242, 200, 219 }, + { 30, 63, 130, 218, 153, 175, 226, 170, 247, 216, 219 }, + { 5, 39, 67, 156, 119, 151, 194, 140, 239, 202, 216 } + }, { /* Coeff Band 2 */ + { 1, 79, 182, 228, 175, 183, 224, 170, 247, 215, 220 }, + { 69, 77, 168, 224, 170, 180, 223, 168, 246, 215, 223 }, + { 24, 63, 126, 209, 153, 171, 219, 160, 247, 215, 225 }, + { 3, 35, 58, 151, 115, 151, 191, 138, 240, 199, 220 } + }, { /* Coeff Band 3 */ + { 1, 139, 213, 238, 194, 192, 234, 180, 244, 193, 236 }, + { 82, 127, 204, 238, 190, 186, 234, 175, 244, 191, 235 }, + { 26, 93, 161, 230, 173, 179, 233, 178, 249, 217, 241 }, + { 3, 48, 78, 186, 132, 158, 212, 157, 244, 205, 233 } + }, { /* Coeff Band 4 */ + { 1, 100, 208, 233, 180, 182, 238, 175, 250, 206, 225 }, + { 84, 87, 184, 230, 175, 180, 236, 179, 250, 209, 243 }, + { 14, 61, 111, 217, 146, 171, 236, 174, 249, 207, 245 }, + { 1, 32, 49, 150, 106, 142, 212, 145, 242, 191, 237 } + }, { /* Coeff Band 5 */ + { 1, 130, 223, 241, 192, 189, 231, 176, 250, 209, 246 }, + { 101, 120, 207, 239, 188, 187, 240, 196, 250, 202, 255 }, + { 19, 90, 155, 232, 169, 181, 238, 190, 250, 207, 249 }, + { 1, 54, 86, 197, 130, 161, 220, 170, 248, 196, 248 } + }, { /* Coeff Band 6 */ + { 1, 103, 208, 236, 183, 185, 235, 190, 243, 202, 219 }, + { 95, 92, 185, 230, 175, 181, 233, 174, 242, 203, 225 }, + { 24, 72, 131, 213, 152, 171, 226, 164, 241, 202, 220 }, + { 3, 45, 74, 169, 123, 154, 204, 145, 238, 188, 222 } + }, { /* Coeff Band 7 */ + { 1, 63, 236, 247, 205, 194, 241, 189, 252, 222, 255 }, + { 151, 48, 224, 245, 200, 193, 240, 187, 255, 234, 255 }, + { 76, 45, 178, 240, 180, 189, 239, 182, 253, 231, 255 }, + { 38, 31, 111, 187, 125, 154, 217, 155, 253, 214, 255 } } } }; - static const vp9_coeff_probs default_coef_probs_8x8[BLOCK_TYPES_8X8] = { - { - /* block Type 0 */ - { - /* Coeff Band 0 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 1 */ - { 60, 140, 195, 255, 212, 214, 128, 128, 128, 128, 128}, - { 75, 221, 231, 255, 203, 255, 128, 128, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128} - }, - { - /* Coeff Band 2 */ - { 1, 227, 226, 255, 215, 215, 128, 128, 128, 128, 128}, - { 5, 163, 209, 255, 212, 212, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128} - }, - { - /* Coeff Band 3 */ - { 1, 226, 225, 255, 228, 236, 128, 128, 128, 128, 128}, - { 6, 163, 208, 255, 224, 234, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128} - }, - { - /* Coeff Band 4 */ - { 1, 222, 197, 254, 193, 216, 255, 236, 128, 128, 128}, - { 7, 140, 163, 251, 195, 211, 255, 238, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128} - }, - { - /* Coeff Band 5 */ - { 1, 226, 218, 255, 216, 241, 255, 255, 128, 128, 128}, - { 6, 154, 191, 255, 218, 240, 255, 255, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { - /* Coeff Band 6 */ - { 1, 221, 217, 255, 208, 217, 255, 232, 128, 128, 128}, - { 11, 155, 189, 254, 203, 211, 255, 249, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { - /* Coeff Band 7 */ - { 1, 207, 235, 255, 232, 240, 128, 128, 128, 128, 128}, - { 58, 161, 216, 255, 229, 235, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128} + { /* block Type 0 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 179, 203, 246, 252, 217, 208, 249, 197, 238, 237, 255 }, + { 136, 193, 232, 247, 202, 199, 245, 194, 255, 235, 255 }, + { 66, 170, 209, 244, 190, 191, 250, 199, 255, 242, 192 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 1, 191, 232, 250, 204, 201, 248, 199, 254, 243, 213 }, + { 50, 161, 209, 247, 196, 197, 250, 206, 253, 240, 213 }, + { 6, 118, 160, 239, 173, 186, 249, 203, 254, 235, 255 }, + { 2, 90, 110, 211, 141, 166, 242, 181, 254, 235, 255 } + }, { /* Coeff Band 3 */ + { 1, 209, 242, 254, 223, 215, 253, 218, 255, 253, 128 }, + { 58, 168, 227, 253, 216, 211, 254, 226, 255, 251, 128 }, + { 7, 111, 178, 249, 195, 202, 253, 222, 254, 240, 255 }, + { 2, 63, 103, 226, 142, 175, 250, 202, 255, 246, 128 } + }, { /* Coeff Band 4 */ + { 1, 207, 241, 252, 213, 205, 252, 215, 255, 228, 255 }, + { 55, 171, 225, 251, 209, 205, 251, 212, 254, 234, 255 }, + { 5, 108, 173, 247, 187, 195, 251, 211, 255, 231, 128 }, + { 2, 56, 97, 220, 138, 169, 248, 191, 253, 237, 255 } + }, { /* Coeff Band 5 */ + { 1, 211, 245, 255, 227, 219, 255, 233, 255, 255, 128 }, + { 58, 175, 228, 254, 217, 215, 255, 231, 255, 255, 128 }, + { 6, 124, 181, 249, 191, 199, 255, 222, 255, 251, 128 }, + { 2, 85, 122, 227, 149, 172, 250, 195, 255, 245, 128 } + }, { /* Coeff Band 6 */ + { 1, 216, 246, 255, 231, 217, 254, 220, 255, 250, 128 }, + { 74, 177, 236, 254, 222, 214, 254, 221, 255, 255, 128 }, + { 13, 125, 192, 250, 200, 203, 254, 217, 255, 245, 128 }, + { 2, 70, 114, 227, 147, 175, 251, 198, 255, 240, 128 } + }, { /* Coeff Band 7 */ + { 1, 199, 246, 255, 238, 229, 255, 226, 255, 255, 128 }, + { 132, 162, 240, 255, 229, 222, 255, 239, 255, 255, 128 }, + { 79, 125, 207, 253, 213, 214, 255, 232, 255, 255, 128 }, + { 41, 89, 149, 240, 161, 187, 250, 216, 255, 255, 128 } } - }, - { - /* block Type 1 */ - { - /* Coeff Band 0 */ - { 134, 152, 233, 224, 234, 52, 255, 166, 128, 128, 128}, - { 97, 132, 185, 234, 186, 189, 197, 171, 255, 212, 128}, - { 84, 110, 185, 237, 182, 182, 145, 145, 255, 255, 128} - }, - { - /* Coeff Band 1 */ - { 1, 124, 213, 247, 192, 212, 255, 255, 128, 128, 128}, - { 88, 111, 178, 254, 189, 211, 255, 255, 128, 128, 128}, - { 12, 59, 129, 236, 150, 179, 239, 195, 255, 255, 128}, - { 12, 59, 129, 236, 150, 179, 239, 195, 255, 255, 128} - }, - { - /* Coeff Band 2 */ - { 1, 102, 225, 255, 210, 240, 128, 128, 128, 128, 128}, - { 110, 78, 195, 254, 200, 191, 255, 255, 128, 128, 128}, - { 37, 63, 177, 255, 194, 195, 128, 128, 128, 128, 128}, - { 37, 63, 177, 255, 194, 195, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 3 */ - { 1, 1, 229, 255, 202, 224, 128, 128, 128, 128, 128}, - { 150, 1, 192, 255, 206, 226, 128, 128, 128, 128, 128}, - { 75, 1, 138, 255, 172, 228, 128, 128, 128, 128, 128}, - { 75, 1, 138, 255, 172, 228, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 4 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 5 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 6 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 7 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} + }, { /* block Type 1 */ + { /* Coeff Band 0 */ + { 138, 65, 189, 212, 172, 169, 200, 153, 233, 182, 214 }, + { 93, 60, 162, 203, 160, 169, 200, 153, 239, 190, 213 }, + { 66, 55, 141, 195, 152, 166, 199, 152, 238, 190, 212 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 102, 221, 247, 205, 198, 248, 201, 255, 235, 128 }, + { 122, 95, 215, 247, 200, 197, 248, 200, 254, 227, 255 }, + { 60, 81, 166, 241, 177, 190, 245, 193, 255, 246, 255 }, + { 32, 61, 108, 195, 133, 159, 230, 163, 254, 230, 238 } + }, { /* Coeff Band 2 */ + { 1, 58, 203, 242, 194, 193, 229, 177, 253, 225, 249 }, + { 113, 62, 192, 237, 184, 187, 231, 181, 253, 220, 249 }, + { 50, 50, 135, 225, 159, 177, 229, 172, 254, 222, 241 }, + { 24, 34, 82, 185, 125, 152, 223, 158, 253, 212, 219 } + }, { /* Coeff Band 3 */ + { 1, 1, 220, 253, 218, 209, 251, 213, 255, 255, 128 }, + { 154, 1, 216, 252, 211, 206, 252, 212, 255, 252, 128 }, + { 102, 1, 157, 249, 184, 200, 253, 214, 255, 247, 128 }, + { 68, 1, 101, 213, 129, 161, 247, 186, 255, 237, 255 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { - /* block Type 2 */ - { - /* Coeff Band 0 */ - { 11, 181, 226, 199, 183, 255, 255, 255, 128, 128, 128}, - { 2, 147, 185, 248, 163, 180, 255, 236, 128, 128, 128}, - { 1, 123, 157, 238, 154, 176, 255, 226, 255, 255, 128}, - { 1, 123, 157, 238, 154, 176, 255, 226, 255, 255, 128} - }, - { - /* Coeff Band 1 */ - { 1, 150, 191, 246, 174, 188, 255, 235, 128, 128, 128}, - { 1, 125, 166, 245, 165, 185, 255, 234, 128, 128, 128}, - { 1, 79, 125, 240, 148, 179, 255, 234, 255, 255, 128}, - { 1, 79, 125, 240, 148, 179, 255, 234, 255, 255, 128} - }, - { - /* Coeff Band 2 */ - { 1, 146, 184, 242, 167, 183, 255, 230, 255, 255, 128}, - { 1, 119, 160, 239, 156, 178, 255, 231, 255, 255, 128}, - { 1, 75, 115, 234, 142, 173, 255, 225, 255, 255, 128}, - { 1, 75, 115, 234, 142, 173, 255, 225, 255, 255, 128} - }, - { - /* Coeff Band 3 */ - { 1, 150, 188, 244, 169, 183, 255, 233, 255, 255, 128}, - { 1, 123, 162, 243, 161, 180, 255, 233, 128, 128, 128}, - { 1, 76, 120, 238, 148, 178, 255, 230, 255, 255, 128}, - { 1, 76, 120, 238, 148, 178, 255, 230, 255, 255, 128} - }, - { - /* Coeff Band 4 */ - { 1, 163, 202, 252, 188, 204, 255, 248, 128, 128, 128}, - { 1, 136, 180, 251, 181, 201, 255, 246, 128, 128, 128}, - { 1, 92, 146, 249, 170, 197, 255, 245, 128, 128, 128}, - { 1, 92, 146, 249, 170, 197, 255, 245, 128, 128, 128} - }, - { - /* Coeff Band 5 */ - { 1, 156, 195, 249, 179, 193, 255, 241, 255, 255, 128}, - { 1, 128, 169, 248, 171, 192, 255, 242, 255, 255, 128}, - { 1, 84, 132, 245, 158, 187, 255, 240, 255, 255, 128}, - { 1, 84, 132, 245, 158, 187, 255, 240, 255, 255, 128} - }, - { - /* Coeff Band 6 */ - { 1, 36, 71, 251, 192, 201, 255, 243, 255, 255, 128}, - { 1, 49, 185, 250, 184, 199, 255, 242, 128, 128, 128}, - { 1, 95, 147, 247, 168, 190, 255, 239, 255, 255, 128}, - { 1, 95, 147, 247, 168, 190, 255, 239, 255, 255, 128} - }, - { - /* Coeff Band 7 */ - { 1, 19, 98, 255, 218, 222, 255, 255, 128, 128, 128}, - { 36, 50, 210, 255, 212, 221, 255, 255, 128, 128, 128}, - { 6, 117, 180, 254, 199, 216, 255, 251, 128, 128, 128}, - { 6, 117, 180, 254, 199, 216, 255, 251, 128, 128, 128} + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 229, 64, 235, 236, 189, 190, 227, 179, 247, 203, 226 }, + { 148, 70, 194, 228, 175, 182, 216, 170, 238, 192, 224 }, + { 53, 63, 134, 207, 150, 169, 213, 161, 247, 204, 232 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 173, 234, 244, 201, 193, 239, 180, 252, 214, 255 }, + { 160, 156, 222, 243, 200, 193, 237, 179, 253, 216, 255 }, + { 55, 119, 187, 240, 189, 192, 236, 180, 253, 226, 255 }, + { 14, 65, 105, 193, 142, 165, 205, 151, 249, 200, 250 } + }, { /* Coeff Band 2 */ + { 1, 124, 218, 246, 195, 196, 242, 198, 254, 229, 255 }, + { 85, 114, 180, 240, 179, 187, 239, 191, 253, 223, 239 }, + { 18, 81, 128, 220, 152, 173, 232, 176, 252, 221, 254 }, + { 2, 42, 64, 150, 115, 149, 192, 137, 247, 197, 247 } + }, { /* Coeff Band 3 */ + { 1, 164, 230, 251, 210, 204, 245, 201, 255, 238, 255 }, + { 96, 137, 210, 248, 199, 199, 244, 198, 254, 218, 255 }, + { 20, 97, 169, 240, 179, 188, 242, 190, 254, 228, 255 }, + { 2, 58, 95, 197, 137, 164, 220, 158, 252, 217, 248 } + }, { /* Coeff Band 4 */ + { 1, 193, 236, 245, 203, 194, 243, 191, 254, 223, 255 }, + { 86, 163, 217, 241, 190, 188, 242, 189, 253, 220, 255 }, + { 14, 108, 161, 228, 167, 178, 238, 180, 253, 224, 255 }, + { 1, 51, 84, 186, 127, 159, 216, 155, 251, 208, 243 } + }, { /* Coeff Band 5 */ + { 1, 183, 235, 248, 209, 197, 244, 195, 253, 236, 239 }, + { 79, 144, 208, 243, 193, 190, 244, 191, 254, 231, 255 }, + { 13, 100, 151, 227, 163, 176, 240, 180, 255, 233, 244 }, + { 1, 48, 77, 171, 121, 153, 214, 150, 252, 214, 245 } + }, { /* Coeff Band 6 */ + { 1, 202, 234, 252, 215, 207, 248, 207, 254, 242, 255 }, + { 75, 153, 216, 249, 203, 201, 248, 203, 255, 239, 255 }, + { 11, 104, 168, 241, 179, 189, 245, 194, 255, 237, 128 }, + { 1, 57, 95, 201, 134, 163, 229, 165, 254, 223, 246 } + }, { /* Coeff Band 7 */ + { 1, 184, 236, 254, 222, 212, 254, 225, 255, 255, 128 }, + { 74, 149, 220, 252, 210, 208, 253, 223, 255, 249, 128 }, + { 18, 109, 175, 247, 184, 195, 253, 211, 255, 250, 128 }, + { 3, 64, 113, 219, 144, 171, 246, 187, 255, 250, 128 } } - }, - { /* block Type 3 */ + }, { /* block Type 3 */ { /* Coeff Band 0 */ - { 192, 18, 155, 172, 145, 164, 192, 135, 246, 223, 255}, - { 94, 29, 97, 131, 131, 153, 171, 121, 250, 190, 255}, - { 25, 29, 63, 128, 119, 147, 168, 124, 251, 183, 255}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 108, 192, 220, 186, 173, 255, 194, 255, 255, 128}, - { 123, 104, 188, 221, 165, 171, 247, 180, 255, 255, 128}, - { 23, 76, 152, 216, 154, 166, 226, 182, 255, 209, 128}, - { 1, 26, 52, 162, 109, 152, 208, 144, 255, 231, 128} - }, - { /* Coeff Band 2 */ - { 1, 57, 179, 220, 156, 175, 210, 158, 255, 223, 128}, - { 48, 57, 134, 212, 151, 170, 219, 185, 255, 248, 128}, - { 4, 35, 63, 189, 120, 156, 221, 159, 255, 241, 128}, - { 1, 17, 23, 110, 97, 143, 187, 120, 255, 234, 128} - }, - { /* Coeff Band 3 */ - { 1, 115, 205, 243, 182, 187, 254, 218, 255, 255, 128}, - { 80, 101, 186, 241, 183, 186, 249, 182, 255, 255, 128}, - { 10, 81, 144, 229, 164, 175, 241, 185, 255, 255, 128}, - { 1, 44, 81, 192, 130, 148, 240, 180, 255, 255, 128} - }, - { /* Coeff Band 4 */ - { 1, 161, 207, 249, 187, 176, 255, 180, 128, 128, 128}, - { 79, 148, 196, 240, 186, 182, 253, 171, 255, 255, 128}, - { 14, 111, 171, 233, 170, 178, 235, 204, 255, 255, 128}, - { 1, 63, 103, 202, 143, 162, 240, 178, 255, 255, 128} - }, - { /* Coeff Band 5 */ - { 1, 101, 202, 239, 185, 184, 252, 186, 255, 255, 128}, - { 43, 67, 166, 237, 178, 190, 246, 194, 255, 255, 128}, - { 4, 49, 85, 220, 140, 168, 253, 182, 255, 255, 128}, - { 1, 24, 35, 144, 93, 135, 239, 159, 255, 253, 128} - }, - { /* Coeff Band 6 */ - { 1, 212, 243, 255, 240, 234, 255, 255, 128, 128, 128}, - { 98, 168, 234, 255, 229, 234, 255, 255, 128, 128, 128}, - { 19, 127, 199, 255, 212, 198, 255, 255, 128, 128, 128}, - { 1, 103, 162, 253, 186, 151, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 188, 253, 255, 255, 128, 128, 128, 128, 128, 128}, - { 191, 68, 242, 255, 255, 128, 128, 128, 128, 128, 128}, - { 8, 132, 255, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} + { 140, 101, 214, 227, 176, 182, 218, 167, 233, 205, 164 }, + { 96, 101, 176, 204, 161, 173, 193, 152, 223, 182, 182 }, + { 27, 84, 123, 176, 140, 162, 190, 142, 238, 189, 210 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 178, 218, 240, 189, 189, 238, 184, 250, 232, 189 }, + { 69, 146, 204, 239, 187, 189, 238, 183, 251, 226, 221 }, + { 16, 98, 157, 234, 170, 185, 237, 183, 252, 220, 218 }, + { 3, 49, 78, 172, 122, 154, 204, 150, 242, 198, 207 } + }, { /* Coeff Band 2 */ + { 1, 165, 207, 230, 179, 181, 234, 172, 252, 228, 218 }, + { 25, 130, 175, 224, 169, 177, 232, 169, 252, 230, 207 }, + { 4, 81, 118, 205, 144, 167, 227, 162, 252, 225, 219 }, + { 2, 51, 63, 150, 114, 148, 197, 138, 244, 202, 204 } + }, { /* Coeff Band 3 */ + { 1, 181, 222, 247, 200, 197, 246, 199, 252, 232, 228 }, + { 25, 142, 200, 244, 190, 193, 245, 195, 253, 233, 204 }, + { 3, 90, 146, 233, 166, 181, 242, 188, 252, 229, 216 }, + { 1, 47, 79, 188, 124, 157, 222, 162, 245, 213, 203 } + }, { /* Coeff Band 4 */ + { 1, 179, 220, 242, 195, 191, 237, 182, 251, 217, 231 }, + { 27, 144, 200, 241, 188, 190, 238, 185, 250, 224, 235 }, + { 3, 93, 149, 230, 166, 180, 235, 180, 249, 222, 221 }, + { 1, 47, 79, 181, 125, 157, 211, 154, 241, 205, 198 } + }, { /* Coeff Band 5 */ + { 1, 176, 222, 247, 202, 198, 247, 199, 252, 234, 219 }, + { 24, 139, 197, 244, 190, 192, 246, 196, 253, 232, 220 }, + { 2, 89, 140, 229, 161, 178, 243, 185, 253, 233, 234 }, + { 1, 49, 76, 176, 121, 154, 214, 153, 243, 209, 208 } + }, { /* Coeff Band 6 */ + { 1, 197, 233, 251, 213, 205, 247, 206, 249, 222, 247 }, + { 35, 159, 216, 249, 203, 201, 246, 203, 250, 222, 223 }, + { 4, 108, 167, 240, 178, 188, 244, 195, 248, 220, 235 }, + { 1, 58, 93, 198, 133, 161, 220, 167, 233, 195, 221 } + }, { /* Coeff Band 7 */ + { 1, 188, 240, 253, 221, 209, 248, 207, 252, 223, 255 }, + { 84, 153, 227, 251, 212, 205, 247, 205, 254, 215, 255 }, + { 25, 117, 182, 244, 186, 192, 243, 198, 250, 209, 255 }, + { 7, 72, 108, 197, 138, 162, 203, 161, 240, 178, 247 } } } }; - static const vp9_coeff_probs default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8] = { - { - /* block Type 0 */ - { - /* Coeff Band 0 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 1 */ - { 60, 140, 195, 255, 212, 214, 128, 128, 128, 128, 128}, - { 75, 221, 231, 255, 203, 255, 128, 128, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128} - }, - { - /* Coeff Band 2 */ - { 1, 227, 226, 255, 215, 215, 128, 128, 128, 128, 128}, - { 5, 163, 209, 255, 212, 212, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128} - }, - { - /* Coeff Band 3 */ - { 1, 226, 225, 255, 228, 236, 128, 128, 128, 128, 128}, - { 6, 163, 208, 255, 224, 234, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128} - }, - { - /* Coeff Band 4 */ - { 1, 222, 197, 254, 193, 216, 255, 236, 128, 128, 128}, - { 7, 140, 163, 251, 195, 211, 255, 238, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128} - }, - { - /* Coeff Band 5 */ - { 1, 226, 218, 255, 216, 241, 255, 255, 128, 128, 128}, - { 6, 154, 191, 255, 218, 240, 255, 255, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { - /* Coeff Band 6 */ - { 1, 221, 217, 255, 208, 217, 255, 232, 128, 128, 128}, - { 11, 155, 189, 254, 203, 211, 255, 249, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { - /* Coeff Band 7 */ - { 1, 207, 235, 255, 232, 240, 128, 128, 128, 128, 128}, - { 58, 161, 216, 255, 229, 235, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128} + { /* block Type 0 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { - /* block Type 1 */ - { - /* Coeff Band 0 */ - { 134, 152, 233, 224, 234, 52, 255, 166, 128, 128, 128}, - { 97, 132, 185, 234, 186, 189, 197, 171, 255, 212, 128}, - { 84, 110, 185, 237, 182, 182, 145, 145, 255, 255, 128} - }, - { - /* Coeff Band 1 */ - { 1, 124, 213, 247, 192, 212, 255, 255, 128, 128, 128}, - { 88, 111, 178, 254, 189, 211, 255, 255, 128, 128, 128}, - { 12, 59, 129, 236, 150, 179, 239, 195, 255, 255, 128}, - { 12, 59, 129, 236, 150, 179, 239, 195, 255, 255, 128} - }, - { - /* Coeff Band 2 */ - { 1, 102, 225, 255, 210, 240, 128, 128, 128, 128, 128}, - { 110, 78, 195, 254, 200, 191, 255, 255, 128, 128, 128}, - { 37, 63, 177, 255, 194, 195, 128, 128, 128, 128, 128}, - { 37, 63, 177, 255, 194, 195, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 3 */ - { 1, 1, 229, 255, 202, 224, 128, 128, 128, 128, 128}, - { 150, 1, 192, 255, 206, 226, 128, 128, 128, 128, 128}, - { 75, 1, 138, 255, 172, 228, 128, 128, 128, 128, 128}, - { 75, 1, 138, 255, 172, 228, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 4 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 5 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 6 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { - /* Coeff Band 7 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} + }, { /* block Type 1 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { - /* block Type 2 */ - { - /* Coeff Band 0 */ - { 11, 181, 226, 199, 183, 255, 255, 255, 128, 128, 128}, - { 2, 147, 185, 248, 163, 180, 255, 236, 128, 128, 128}, - { 1, 123, 157, 238, 154, 176, 255, 226, 255, 255, 128}, - { 1, 123, 157, 238, 154, 176, 255, 226, 255, 255, 128} - }, - { - /* Coeff Band 1 */ - { 1, 150, 191, 246, 174, 188, 255, 235, 128, 128, 128}, - { 1, 125, 166, 245, 165, 185, 255, 234, 128, 128, 128}, - { 1, 79, 125, 240, 148, 179, 255, 234, 255, 255, 128}, - { 1, 79, 125, 240, 148, 179, 255, 234, 255, 255, 128} - }, - { - /* Coeff Band 2 */ - { 1, 146, 184, 242, 167, 183, 255, 230, 255, 255, 128}, - { 1, 119, 160, 239, 156, 178, 255, 231, 255, 255, 128}, - { 1, 75, 115, 234, 142, 173, 255, 225, 255, 255, 128}, - { 1, 75, 115, 234, 142, 173, 255, 225, 255, 255, 128} - }, - { - /* Coeff Band 3 */ - { 1, 150, 188, 244, 169, 183, 255, 233, 255, 255, 128}, - { 1, 123, 162, 243, 161, 180, 255, 233, 128, 128, 128}, - { 1, 76, 120, 238, 148, 178, 255, 230, 255, 255, 128}, - { 1, 76, 120, 238, 148, 178, 255, 230, 255, 255, 128} - }, - { - /* Coeff Band 4 */ - { 1, 163, 202, 252, 188, 204, 255, 248, 128, 128, 128}, - { 1, 136, 180, 251, 181, 201, 255, 246, 128, 128, 128}, - { 1, 92, 146, 249, 170, 197, 255, 245, 128, 128, 128}, - { 1, 92, 146, 249, 170, 197, 255, 245, 128, 128, 128} - }, - { - /* Coeff Band 5 */ - { 1, 156, 195, 249, 179, 193, 255, 241, 255, 255, 128}, - { 1, 128, 169, 248, 171, 192, 255, 242, 255, 255, 128}, - { 1, 84, 132, 245, 158, 187, 255, 240, 255, 255, 128}, - { 1, 84, 132, 245, 158, 187, 255, 240, 255, 255, 128} - }, - { - /* Coeff Band 6 */ - { 1, 36, 71, 251, 192, 201, 255, 243, 255, 255, 128}, - { 1, 49, 185, 250, 184, 199, 255, 242, 128, 128, 128}, - { 1, 95, 147, 247, 168, 190, 255, 239, 255, 255, 128}, - { 1, 95, 147, 247, 168, 190, 255, 239, 255, 255, 128} - }, - { - /* Coeff Band 7 */ - { 1, 19, 98, 255, 218, 222, 255, 255, 128, 128, 128}, - { 36, 50, 210, 255, 212, 221, 255, 255, 128, 128, 128}, - { 6, 117, 180, 254, 199, 216, 255, 251, 128, 128, 128}, - { 6, 117, 180, 254, 199, 216, 255, 251, 128, 128, 128} + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { /* block Type 3 */ + }, { /* block Type 3 */ { /* Coeff Band 0 */ - { 192, 18, 155, 172, 145, 164, 192, 135, 246, 223, 255}, - { 94, 29, 97, 131, 131, 153, 171, 121, 250, 190, 255}, - { 25, 29, 63, 128, 119, 147, 168, 124, 251, 183, 255}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 108, 192, 220, 186, 173, 255, 194, 255, 255, 128}, - { 123, 104, 188, 221, 165, 171, 247, 180, 255, 255, 128}, - { 23, 76, 152, 216, 154, 166, 226, 182, 255, 209, 128}, - { 1, 26, 52, 162, 109, 152, 208, 144, 255, 231, 128} - }, - { /* Coeff Band 2 */ - { 1, 57, 179, 220, 156, 175, 210, 158, 255, 223, 128}, - { 48, 57, 134, 212, 151, 170, 219, 185, 255, 248, 128}, - { 4, 35, 63, 189, 120, 156, 221, 159, 255, 241, 128}, - { 1, 17, 23, 110, 97, 143, 187, 120, 255, 234, 128} - }, - { /* Coeff Band 3 */ - { 1, 115, 205, 243, 182, 187, 254, 218, 255, 255, 128}, - { 80, 101, 186, 241, 183, 186, 249, 182, 255, 255, 128}, - { 10, 81, 144, 229, 164, 175, 241, 185, 255, 255, 128}, - { 1, 44, 81, 192, 130, 148, 240, 180, 255, 255, 128} - }, - { /* Coeff Band 4 */ - { 1, 161, 207, 249, 187, 176, 255, 180, 128, 128, 128}, - { 79, 148, 196, 240, 186, 182, 253, 171, 255, 255, 128}, - { 14, 111, 171, 233, 170, 178, 235, 204, 255, 255, 128}, - { 1, 63, 103, 202, 143, 162, 240, 178, 255, 255, 128} - }, - { /* Coeff Band 5 */ - { 1, 101, 202, 239, 185, 184, 252, 186, 255, 255, 128}, - { 43, 67, 166, 237, 178, 190, 246, 194, 255, 255, 128}, - { 4, 49, 85, 220, 140, 168, 253, 182, 255, 255, 128}, - { 1, 24, 35, 144, 93, 135, 239, 159, 255, 253, 128} - }, - { /* Coeff Band 6 */ - { 1, 212, 243, 255, 240, 234, 255, 255, 128, 128, 128}, - { 98, 168, 234, 255, 229, 234, 255, 255, 128, 128, 128}, - { 19, 127, 199, 255, 212, 198, 255, 255, 128, 128, 128}, - { 1, 103, 162, 253, 186, 151, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 188, 253, 255, 255, 128, 128, 128, 128, 128, 128}, - { 191, 68, 242, 255, 255, 128, 128, 128, 128, 128, 128}, - { 8, 132, 255, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} + { 118, 27, 105, 170, 137, 166, 183, 137, 243, 189, 241 }, + { 44, 34, 85, 142, 127, 158, 161, 128, 232, 174, 213 }, + { 8, 26, 47, 104, 108, 145, 143, 117, 226, 168, 207 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 134, 172, 217, 163, 175, 226, 167, 251, 220, 204 }, + { 56, 129, 168, 217, 161, 174, 223, 164, 249, 218, 223 }, + { 20, 110, 151, 215, 158, 174, 221, 165, 249, 209, 221 }, + { 2, 59, 88, 169, 128, 157, 192, 143, 239, 189, 214 } + }, { /* Coeff Band 2 */ + { 1, 65, 126, 191, 140, 163, 218, 153, 252, 218, 229 }, + { 21, 57, 92, 175, 126, 156, 214, 148, 252, 218, 229 }, + { 4, 44, 66, 148, 114, 148, 200, 136, 251, 211, 228 }, + { 1, 28, 42, 108, 104, 141, 158, 119, 235, 180, 210 } + }, { /* Coeff Band 3 */ + { 1, 114, 172, 227, 166, 177, 236, 178, 252, 226, 233 }, + { 41, 94, 152, 218, 156, 172, 233, 172, 251, 223, 231 }, + { 9, 69, 116, 202, 142, 165, 226, 162, 251, 221, 227 }, + { 1, 36, 60, 151, 113, 148, 195, 140, 241, 198, 211 } + }, { /* Coeff Band 4 */ + { 1, 186, 200, 227, 174, 178, 230, 169, 248, 210, 238 }, + { 27, 148, 181, 221, 167, 176, 226, 166, 250, 218, 228 }, + { 3, 96, 139, 208, 154, 170, 219, 161, 249, 214, 229 }, + { 1, 44, 70, 156, 120, 152, 188, 139, 239, 193, 200 } + }, { /* Coeff Band 5 */ + { 1, 169, 203, 238, 186, 186, 238, 184, 252, 224, 230 }, + { 32, 119, 173, 232, 172, 181, 236, 182, 252, 222, 237 }, + { 6, 84, 128, 215, 150, 170, 232, 172, 251, 221, 235 }, + { 1, 49, 78, 167, 124, 154, 200, 145, 243, 198, 217 } + }, { /* Coeff Band 6 */ + { 1, 193, 215, 244, 197, 195, 239, 192, 249, 213, 240 }, + { 52, 136, 193, 239, 184, 189, 237, 189, 248, 211, 226 }, + { 13, 90, 146, 227, 162, 178, 233, 182, 248, 211, 231 }, + { 1, 49, 79, 177, 124, 156, 201, 154, 234, 188, 212 } + }, { /* Coeff Band 7 */ + { 1, 189, 238, 248, 219, 196, 232, 180, 253, 211, 255 }, + { 104, 148, 224, 245, 211, 194, 225, 171, 251, 206, 255 }, + { 43, 116, 190, 231, 179, 183, 217, 168, 249, 199, 255 }, + { 13, 65, 92, 154, 131, 152, 167, 132, 238, 174, 243 } } } }; - static const vp9_coeff_probs default_coef_probs_16x16[BLOCK_TYPES_16X16] = { { /* block Type 0 */ { /* Coeff Band 0 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 60, 140, 195, 255, 212, 214, 128, 128, 128, 128, 128}, - { 75, 221, 231, 255, 203, 255, 128, 128, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128} - }, - { /* Coeff Band 2 */ - { 1, 227, 226, 255, 215, 215, 128, 128, 128, 128, 128}, - { 5, 163, 209, 255, 212, 212, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 3 */ - { 1, 226, 225, 255, 228, 236, 128, 128, 128, 128, 128}, - { 6, 163, 208, 255, 224, 234, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 4 */ - { 1, 222, 197, 254, 193, 216, 255, 236, 128, 128, 128}, - { 7, 140, 163, 251, 195, 211, 255, 238, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128} - }, - { /* Coeff Band 5 */ - { 1, 226, 218, 255, 216, 241, 255, 255, 128, 128, 128}, - { 6, 154, 191, 255, 218, 240, 255, 255, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { /* Coeff Band 6 */ - { 1, 221, 217, 255, 208, 217, 255, 232, 128, 128, 128}, - { 11, 155, 189, 254, 203, 211, 255, 249, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 207, 235, 255, 232, 240, 128, 128, 128, 128, 128}, - { 58, 161, 216, 255, 229, 235, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128} + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 1 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 223, 34, 236, 234, 193, 185, 216, 169, 239, 189, 229 }, + { 125, 40, 195, 221, 173, 175, 209, 165, 220, 181, 196 }, + { 41, 37, 127, 185, 145, 162, 191, 150, 227, 180, 219 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 160, 224, 239, 193, 190, 213, 178, 244, 174, 255 }, + { 199, 154, 212, 238, 190, 190, 210, 173, 246, 183, 249 }, + { 88, 122, 178, 234, 180, 187, 213, 174, 244, 182, 247 }, + { 27, 69, 100, 174, 139, 165, 159, 142, 225, 157, 240 } + }, { /* Coeff Band 2 */ + { 1, 118, 207, 237, 179, 185, 234, 189, 241, 194, 237 }, + { 86, 103, 161, 227, 163, 176, 231, 183, 241, 196, 234 }, + { 19, 69, 113, 205, 140, 166, 220, 169, 240, 188, 242 }, + { 3, 32, 49, 106, 111, 144, 132, 121, 225, 151, 237 } + }, { /* Coeff Band 3 */ + { 1, 160, 218, 245, 197, 195, 235, 189, 254, 218, 255 }, + { 90, 127, 193, 240, 186, 189, 235, 187, 251, 217, 230 }, + { 18, 92, 148, 229, 164, 179, 228, 180, 254, 212, 229 }, + { 2, 50, 79, 163, 126, 156, 186, 140, 247, 191, 236 } + }, { /* Coeff Band 4 */ + { 1, 196, 231, 240, 203, 191, 225, 171, 253, 214, 255 }, + { 71, 167, 210, 234, 194, 188, 218, 165, 253, 215, 236 }, + { 11, 119, 165, 217, 171, 177, 213, 155, 252, 209, 255 }, + { 1, 46, 70, 145, 121, 153, 180, 131, 249, 192, 246 } + }, { /* Coeff Band 5 */ + { 1, 176, 223, 242, 202, 194, 222, 169, 253, 211, 244 }, + { 62, 131, 191, 233, 185, 186, 219, 164, 251, 211, 252 }, + { 7, 89, 133, 207, 156, 173, 211, 157, 251, 206, 247 }, + { 1, 36, 56, 127, 113, 147, 166, 125, 243, 183, 242 } + }, { /* Coeff Band 6 */ + { 1, 203, 232, 249, 213, 202, 245, 193, 254, 237, 255 }, + { 51, 155, 212, 245, 199, 195, 244, 192, 254, 234, 255 }, + { 7, 101, 158, 233, 170, 181, 244, 185, 253, 242, 255 }, + { 1, 49, 82, 185, 123, 157, 226, 156, 252, 225, 240 } + }, { /* Coeff Band 7 */ + { 1, 222, 233, 252, 220, 207, 247, 206, 255, 240, 128 }, + { 40, 159, 216, 250, 205, 201, 248, 207, 249, 219, 255 }, + { 6, 106, 163, 240, 176, 188, 247, 198, 251, 222, 255 }, + { 1, 51, 88, 196, 127, 159, 232, 169, 252, 214, 255 } } - }, - { /* block Type 1 */ - { /* Coeff Band 0 */ - { 1, 30, 103, 204, 142, 168, 235, 161, 255, 228, 128}, - { 1, 35, 90, 192, 130, 161, 227, 158, 255, 226, 255}, - { 1, 36, 78, 180, 122, 156, 221, 153, 255, 222, 255}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 163, 228, 253, 212, 194, 255, 205, 128, 128, 128}, - { 67, 160, 226, 253, 210, 202, 245, 172, 255, 255, 128}, - { 51, 147, 219, 251, 207, 207, 255, 217, 128, 128, 128}, - { 25, 107, 175, 245, 183, 190, 254, 209, 255, 255, 128} - }, - { /* Coeff Band 2 */ - { 1, 66, 170, 240, 177, 186, 252, 203, 255, 245, 128}, - { 23, 64, 145, 230, 161, 177, 252, 198, 255, 255, 128}, - { 6, 51, 99, 208, 135, 163, 249, 178, 255, 248, 128}, - { 1, 33, 59, 161, 104, 151, 238, 164, 255, 237, 128} - }, - { /* Coeff Band 3 */ - { 1, 76, 216, 250, 198, 199, 255, 226, 255, 255, 128}, - { 86, 83, 200, 247, 189, 193, 255, 224, 255, 255, 128}, - { 30, 75, 164, 242, 172, 184, 254, 218, 255, 255, 128}, - { 3, 54, 103, 227, 140, 172, 253, 201, 255, 255, 128} - }, - { /* Coeff Band 4 */ - { 1, 241, 247, 255, 233, 223, 255, 255, 128, 128, 128}, - { 78, 212, 242, 255, 226, 230, 255, 255, 128, 128, 128}, - { 10, 167, 224, 255, 217, 225, 255, 128, 128, 128, 128}, - { 1, 104, 176, 250, 166, 219, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 5 */ - { 1, 194, 241, 254, 228, 214, 248, 237, 255, 255, 128}, - { 95, 133, 228, 254, 218, 215, 255, 229, 128, 128, 128}, - { 24, 119, 201, 252, 202, 205, 255, 229, 128, 128, 128}, - { 1, 88, 155, 246, 183, 193, 255, 205, 128, 128, 128} - }, - { /* Coeff Band 6 */ - { 1, 204, 236, 255, 222, 220, 255, 239, 128, 128, 128}, - { 126, 105, 225, 254, 214, 217, 255, 254, 128, 128, 128}, - { 44, 86, 190, 251, 197, 204, 255, 233, 128, 128, 128}, - { 6, 71, 130, 240, 164, 188, 255, 246, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 195, 250, 255, 239, 197, 128, 128, 128, 128, 128}, - { 167, 102, 249, 255, 234, 255, 128, 128, 128, 128, 128}, - { 65, 91, 222, 255, 217, 255, 128, 128, 128, 128, 128}, - { 1, 59, 128, 255, 154, 255, 128, 128, 128, 128, 128} - } - }, - { /* block Type 2 */ - { /* Coeff Band 0 */ - { 1, 30, 103, 204, 142, 168, 235, 161, 255, 228, 128}, - { 1, 35, 90, 192, 130, 161, 227, 158, 255, 226, 255}, - { 1, 36, 78, 180, 122, 156, 221, 153, 255, 222, 255}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 163, 228, 253, 212, 194, 255, 205, 128, 128, 128}, - { 67, 160, 226, 253, 210, 202, 245, 172, 255, 255, 128}, - { 51, 147, 219, 251, 207, 207, 255, 217, 128, 128, 128}, - { 25, 107, 175, 245, 183, 190, 254, 209, 255, 255, 128} - }, - { /* Coeff Band 2 */ - { 1, 66, 170, 240, 177, 186, 252, 203, 255, 245, 128}, - { 23, 64, 145, 230, 161, 177, 252, 198, 255, 255, 128}, - { 6, 51, 99, 208, 135, 163, 249, 178, 255, 248, 128}, - { 1, 33, 59, 161, 104, 151, 238, 164, 255, 237, 128} - }, - { /* Coeff Band 3 */ - { 1, 76, 216, 250, 198, 199, 255, 226, 255, 255, 128}, - { 86, 83, 200, 247, 189, 193, 255, 224, 255, 255, 128}, - { 30, 75, 164, 242, 172, 184, 254, 218, 255, 255, 128}, - { 3, 54, 103, 227, 140, 172, 253, 201, 255, 255, 128} - }, - { /* Coeff Band 4 */ - { 1, 241, 247, 255, 233, 223, 255, 255, 128, 128, 128}, - { 78, 212, 242, 255, 226, 230, 255, 255, 128, 128, 128}, - { 10, 167, 224, 255, 217, 225, 255, 128, 128, 128, 128}, - { 1, 104, 176, 250, 166, 219, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 5 */ - { 1, 194, 241, 254, 228, 214, 248, 237, 255, 255, 128}, - { 95, 133, 228, 254, 218, 215, 255, 229, 128, 128, 128}, - { 24, 119, 201, 252, 202, 205, 255, 229, 128, 128, 128}, - { 1, 88, 155, 246, 183, 193, 255, 205, 128, 128, 128} - }, - { /* Coeff Band 6 */ - { 1, 204, 236, 255, 222, 220, 255, 239, 128, 128, 128}, - { 126, 105, 225, 254, 214, 217, 255, 254, 128, 128, 128}, - { 44, 86, 190, 251, 197, 204, 255, 233, 128, 128, 128}, - { 6, 71, 130, 240, 164, 188, 255, 246, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 195, 250, 255, 239, 197, 128, 128, 128, 128, 128}, - { 167, 102, 249, 255, 234, 255, 128, 128, 128, 128, 128}, - { 65, 91, 222, 255, 217, 255, 128, 128, 128, 128, 128}, - { 1, 59, 128, 255, 154, 255, 128, 128, 128, 128, 128} - } - }, - { /* block Type 3 */ + }, { /* block Type 3 */ { /* Coeff Band 0 */ - { 17, 105, 227, 195, 164, 170, 168, 137, 221, 160, 184}, - { 6, 92, 166, 193, 158, 169, 179, 142, 236, 175, 200}, - { 2, 68, 118, 193, 147, 168, 187, 149, 241, 178, 247}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 193, 221, 246, 198, 194, 244, 176, 255, 192, 128}, - { 112, 160, 209, 244, 196, 194, 243, 175, 255, 209, 128}, - { 45, 123, 175, 240, 184, 195, 239, 178, 255, 218, 255}, - { 16, 53, 75, 169, 119, 152, 209, 146, 255, 219, 255} - }, - { /* Coeff Band 2 */ - { 1, 141, 183, 240, 176, 187, 246, 198, 255, 218, 128}, - { 36, 97, 150, 231, 161, 180, 243, 191, 255, 217, 255}, - { 8, 65, 111, 210, 143, 166, 230, 167, 255, 224, 255}, - { 2, 35, 61, 157, 113, 149, 208, 142, 255, 217, 255} - }, - { /* Coeff Band 3 */ - { 1, 173, 196, 245, 184, 191, 252, 211, 255, 240, 128}, - { 35, 119, 175, 242, 177, 187, 252, 209, 255, 235, 128}, - { 4, 88, 141, 234, 161, 180, 249, 200, 255, 228, 128}, - { 1, 57, 95, 203, 133, 161, 235, 167, 255, 231, 255} - }, - { /* Coeff Band 4 */ - { 1, 208, 227, 249, 209, 204, 248, 188, 255, 248, 128}, - { 28, 162, 211, 247, 203, 200, 252, 188, 255, 232, 128}, - { 5, 114, 174, 238, 182, 189, 245, 184, 255, 238, 128}, - { 1, 61, 100, 205, 136, 164, 235, 163, 255, 239, 128} - }, - { /* Coeff Band 5 */ - { 1, 195, 218, 252, 208, 207, 250, 205, 255, 245, 128}, - { 22, 141, 196, 249, 198, 201, 250, 202, 255, 244, 128}, - { 2, 105, 163, 240, 178, 189, 246, 191, 255, 246, 128}, - { 1, 70, 112, 206, 144, 167, 232, 162, 255, 239, 128} - }, - { /* Coeff Band 6 */ - { 1, 204, 215, 251, 204, 203, 255, 222, 255, 225, 128}, - { 15, 140, 194, 249, 194, 199, 254, 221, 255, 253, 128}, - { 1, 95, 153, 243, 172, 188, 254, 213, 255, 248, 128}, - { 1, 59, 99, 216, 135, 166, 247, 190, 255, 237, 255} - }, - { /* Coeff Band 7 */ - { 1, 7, 231, 255, 227, 223, 255, 240, 255, 255, 128}, - { 15, 157, 217, 255, 218, 219, 255, 239, 255, 255, 128}, - { 1, 114, 182, 252, 198, 207, 255, 235, 255, 255, 128}, - { 1, 71, 122, 238, 154, 181, 255, 216, 255, 255, 128} + { 14, 78, 225, 217, 173, 181, 198, 153, 228, 185, 176 }, + { 9, 74, 179, 191, 157, 171, 178, 143, 229, 175, 209 }, + { 3, 48, 92, 128, 130, 155, 135, 123, 220, 155, 219 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 178, 209, 214, 173, 175, 208, 152, 252, 210, 237 }, + { 142, 151, 193, 212, 170, 175, 209, 151, 251, 208, 237 }, + { 38, 105, 150, 206, 159, 173, 208, 151, 250, 209, 238 }, + { 5, 44, 61, 128, 114, 147, 167, 125, 239, 184, 217 } + }, { /* Coeff Band 2 */ + { 1, 154, 195, 202, 166, 173, 184, 144, 245, 184, 236 }, + { 49, 110, 150, 188, 155, 168, 180, 141, 244, 183, 239 }, + { 4, 63, 90, 158, 132, 157, 171, 134, 243, 179, 239 }, + { 1, 25, 37, 93, 104, 141, 133, 114, 231, 161, 226 } + }, { /* Coeff Band 3 */ + { 1, 184, 201, 223, 173, 177, 224, 164, 253, 220, 238 }, + { 42, 127, 170, 215, 164, 173, 223, 162, 253, 219, 233 }, + { 4, 75, 114, 195, 142, 164, 218, 155, 253, 217, 235 }, + { 1, 32, 50, 128, 108, 144, 180, 127, 247, 197, 219 } + }, { /* Coeff Band 4 */ + { 1, 190, 207, 232, 181, 184, 228, 172, 251, 216, 212 }, + { 35, 136, 180, 227, 173, 180, 227, 171, 251, 216, 218 }, + { 2, 85, 131, 214, 154, 173, 224, 166, 250, 214, 225 }, + { 1, 44, 71, 162, 120, 153, 195, 143, 240, 195, 197 } + }, { /* Coeff Band 5 */ + { 1, 185, 201, 230, 177, 180, 232, 172, 253, 225, 235 }, + { 27, 122, 165, 221, 164, 175, 230, 169, 253, 224, 220 }, + { 1, 72, 108, 197, 139, 163, 224, 159, 253, 224, 226 }, + { 1, 33, 51, 132, 107, 144, 186, 130, 245, 201, 206 } + }, { /* Coeff Band 6 */ + { 1, 203, 214, 240, 193, 191, 235, 178, 252, 225, 224 }, + { 20, 140, 188, 235, 182, 186, 234, 177, 252, 226, 226 }, + { 1, 85, 132, 218, 155, 174, 230, 170, 251, 224, 227 }, + { 1, 39, 62, 154, 114, 150, 199, 141, 241, 203, 214 } + }, { /* Coeff Band 7 */ + { 1, 217, 224, 244, 202, 193, 241, 187, 252, 227, 239 }, + { 22, 151, 200, 239, 187, 188, 240, 184, 252, 226, 237 }, + { 2, 90, 138, 222, 158, 174, 237, 176, 252, 226, 239 }, + { 1, 41, 66, 163, 116, 151, 206, 146, 243, 201, 230 } } } }; - -static const vp9_coeff_probs - default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16] = { +static const vp9_coeff_probs default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16] = { { /* block Type 0 */ { /* Coeff Band 0 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 60, 140, 195, 255, 212, 214, 128, 128, 128, 128, 128}, - { 75, 221, 231, 255, 203, 255, 128, 128, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128}, - { 9, 212, 196, 251, 197, 207, 255, 185, 128, 128, 128} - }, - { /* Coeff Band 2 */ - { 1, 227, 226, 255, 215, 215, 128, 128, 128, 128, 128}, - { 5, 163, 209, 255, 212, 212, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128}, - { 1, 133, 203, 255, 210, 220, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 3 */ - { 1, 226, 225, 255, 228, 236, 128, 128, 128, 128, 128}, - { 6, 163, 208, 255, 224, 234, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128}, - { 1, 122, 196, 253, 212, 248, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 4 */ - { 1, 222, 197, 254, 193, 216, 255, 236, 128, 128, 128}, - { 7, 140, 163, 251, 195, 211, 255, 238, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128}, - { 1, 91, 152, 249, 181, 197, 255, 239, 128, 128, 128} - }, - { /* Coeff Band 5 */ - { 1, 226, 218, 255, 216, 241, 255, 255, 128, 128, 128}, - { 6, 154, 191, 255, 218, 240, 255, 255, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { /* Coeff Band 6 */ - { 1, 221, 217, 255, 208, 217, 255, 232, 128, 128, 128}, - { 11, 155, 189, 254, 203, 211, 255, 249, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128}, - { 1, 110, 171, 252, 191, 204, 255, 236, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 207, 235, 255, 232, 240, 128, 128, 128, 128, 128}, - { 58, 161, 216, 255, 229, 235, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128}, - { 8, 133, 204, 255, 219, 231, 255, 255, 128, 128, 128} + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } } - }, - { /* block Type 1 */ - { /* Coeff Band 0 */ - { 1, 30, 103, 204, 142, 168, 235, 161, 255, 228, 128}, - { 1, 35, 90, 192, 130, 161, 227, 158, 255, 226, 255}, - { 1, 36, 78, 180, 122, 156, 221, 153, 255, 222, 255}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 163, 228, 253, 212, 194, 255, 205, 128, 128, 128}, - { 67, 160, 226, 253, 210, 202, 245, 172, 255, 255, 128}, - { 51, 147, 219, 251, 207, 207, 255, 217, 128, 128, 128}, - { 25, 107, 175, 245, 183, 190, 254, 209, 255, 255, 128} - }, - { /* Coeff Band 2 */ - { 1, 66, 170, 240, 177, 186, 252, 203, 255, 245, 128}, - { 23, 64, 145, 230, 161, 177, 252, 198, 255, 255, 128}, - { 6, 51, 99, 208, 135, 163, 249, 178, 255, 248, 128}, - { 1, 33, 59, 161, 104, 151, 238, 164, 255, 237, 128} - }, - { /* Coeff Band 3 */ - { 1, 76, 216, 250, 198, 199, 255, 226, 255, 255, 128}, - { 86, 83, 200, 247, 189, 193, 255, 224, 255, 255, 128}, - { 30, 75, 164, 242, 172, 184, 254, 218, 255, 255, 128}, - { 3, 54, 103, 227, 140, 172, 253, 201, 255, 255, 128} - }, - { /* Coeff Band 4 */ - { 1, 241, 247, 255, 233, 223, 255, 255, 128, 128, 128}, - { 78, 212, 242, 255, 226, 230, 255, 255, 128, 128, 128}, - { 10, 167, 224, 255, 217, 225, 255, 128, 128, 128, 128}, - { 1, 104, 176, 250, 166, 219, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 5 */ - { 1, 194, 241, 254, 228, 214, 248, 237, 255, 255, 128}, - { 95, 133, 228, 254, 218, 215, 255, 229, 128, 128, 128}, - { 24, 119, 201, 252, 202, 205, 255, 229, 128, 128, 128}, - { 1, 88, 155, 246, 183, 193, 255, 205, 128, 128, 128} - }, - { /* Coeff Band 6 */ - { 1, 204, 236, 255, 222, 220, 255, 239, 128, 128, 128}, - { 126, 105, 225, 254, 214, 217, 255, 254, 128, 128, 128}, - { 44, 86, 190, 251, 197, 204, 255, 233, 128, 128, 128}, - { 6, 71, 130, 240, 164, 188, 255, 246, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 195, 250, 255, 239, 197, 128, 128, 128, 128, 128}, - { 167, 102, 249, 255, 234, 255, 128, 128, 128, 128, 128}, - { 65, 91, 222, 255, 217, 255, 128, 128, 128, 128, 128}, - { 1, 59, 128, 255, 154, 255, 128, 128, 128, 128, 128} - } - }, - { /* block Type 2 */ - { /* Coeff Band 0 */ - { 1, 30, 103, 204, 142, 168, 235, 161, 255, 228, 128}, - { 1, 35, 90, 192, 130, 161, 227, 158, 255, 226, 255}, - { 1, 36, 78, 180, 122, 156, 221, 153, 255, 222, 255}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 163, 228, 253, 212, 194, 255, 205, 128, 128, 128}, - { 67, 160, 226, 253, 210, 202, 245, 172, 255, 255, 128}, - { 51, 147, 219, 251, 207, 207, 255, 217, 128, 128, 128}, - { 25, 107, 175, 245, 183, 190, 254, 209, 255, 255, 128} - }, - { /* Coeff Band 2 */ - { 1, 66, 170, 240, 177, 186, 252, 203, 255, 245, 128}, - { 23, 64, 145, 230, 161, 177, 252, 198, 255, 255, 128}, - { 6, 51, 99, 208, 135, 163, 249, 178, 255, 248, 128}, - { 1, 33, 59, 161, 104, 151, 238, 164, 255, 237, 128} - }, - { /* Coeff Band 3 */ - { 1, 76, 216, 250, 198, 199, 255, 226, 255, 255, 128}, - { 86, 83, 200, 247, 189, 193, 255, 224, 255, 255, 128}, - { 30, 75, 164, 242, 172, 184, 254, 218, 255, 255, 128}, - { 3, 54, 103, 227, 140, 172, 253, 201, 255, 255, 128} - }, - { /* Coeff Band 4 */ - { 1, 241, 247, 255, 233, 223, 255, 255, 128, 128, 128}, - { 78, 212, 242, 255, 226, 230, 255, 255, 128, 128, 128}, - { 10, 167, 224, 255, 217, 225, 255, 128, 128, 128, 128}, - { 1, 104, 176, 250, 166, 219, 255, 255, 128, 128, 128} - }, - { /* Coeff Band 5 */ - { 1, 194, 241, 254, 228, 214, 248, 237, 255, 255, 128}, - { 95, 133, 228, 254, 218, 215, 255, 229, 128, 128, 128}, - { 24, 119, 201, 252, 202, 205, 255, 229, 128, 128, 128}, - { 1, 88, 155, 246, 183, 193, 255, 205, 128, 128, 128} - }, - { /* Coeff Band 6 */ - { 1, 204, 236, 255, 222, 220, 255, 239, 128, 128, 128}, - { 126, 105, 225, 254, 214, 217, 255, 254, 128, 128, 128}, - { 44, 86, 190, 251, 197, 204, 255, 233, 128, 128, 128}, - { 6, 71, 130, 240, 164, 188, 255, 246, 128, 128, 128} - }, - { /* Coeff Band 7 */ - { 1, 195, 250, 255, 239, 197, 128, 128, 128, 128, 128}, - { 167, 102, 249, 255, 234, 255, 128, 128, 128, 128, 128}, - { 65, 91, 222, 255, 217, 255, 128, 128, 128, 128, 128}, - { 1, 59, 128, 255, 154, 255, 128, 128, 128, 128, 128} - } - }, - { /* block Type 3 */ + }, { /* block Type 1 */ { /* Coeff Band 0 */ - { 17, 105, 227, 195, 164, 170, 168, 137, 221, 160, 184}, - { 6, 92, 166, 193, 158, 169, 179, 142, 236, 175, 200}, - { 2, 68, 118, 193, 147, 168, 187, 149, 241, 178, 247}, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128} - }, - { /* Coeff Band 1 */ - { 1, 193, 221, 246, 198, 194, 244, 176, 255, 192, 128}, - { 112, 160, 209, 244, 196, 194, 243, 175, 255, 209, 128}, - { 45, 123, 175, 240, 184, 195, 239, 178, 255, 218, 255}, - { 16, 53, 75, 169, 119, 152, 209, 146, 255, 219, 255} - }, - { /* Coeff Band 2 */ - { 1, 141, 183, 240, 176, 187, 246, 198, 255, 218, 128}, - { 36, 97, 150, 231, 161, 180, 243, 191, 255, 217, 255}, - { 8, 65, 111, 210, 143, 166, 230, 167, 255, 224, 255}, - { 2, 35, 61, 157, 113, 149, 208, 142, 255, 217, 255} - }, - { /* Coeff Band 3 */ - { 1, 173, 196, 245, 184, 191, 252, 211, 255, 240, 128}, - { 35, 119, 175, 242, 177, 187, 252, 209, 255, 235, 128}, - { 4, 88, 141, 234, 161, 180, 249, 200, 255, 228, 128}, - { 1, 57, 95, 203, 133, 161, 235, 167, 255, 231, 255} - }, - { /* Coeff Band 4 */ - { 1, 208, 227, 249, 209, 204, 248, 188, 255, 248, 128}, - { 28, 162, 211, 247, 203, 200, 252, 188, 255, 232, 128}, - { 5, 114, 174, 238, 182, 189, 245, 184, 255, 238, 128}, - { 1, 61, 100, 205, 136, 164, 235, 163, 255, 239, 128} - }, - { /* Coeff Band 5 */ - { 1, 195, 218, 252, 208, 207, 250, 205, 255, 245, 128}, - { 22, 141, 196, 249, 198, 201, 250, 202, 255, 244, 128}, - { 2, 105, 163, 240, 178, 189, 246, 191, 255, 246, 128}, - { 1, 70, 112, 206, 144, 167, 232, 162, 255, 239, 128} - }, - { /* Coeff Band 6 */ - { 1, 204, 215, 251, 204, 203, 255, 222, 255, 225, 128}, - { 15, 140, 194, 249, 194, 199, 254, 221, 255, 253, 128}, - { 1, 95, 153, 243, 172, 188, 254, 213, 255, 248, 128}, - { 1, 59, 99, 216, 135, 166, 247, 190, 255, 237, 255} - }, - { /* Coeff Band 7 */ - { 1, 7, 231, 255, 227, 223, 255, 240, 255, 255, 128}, - { 15, 157, 217, 255, 218, 219, 255, 239, 255, 255, 128}, - { 1, 114, 182, 252, 198, 207, 255, 235, 255, 255, 128}, - { 1, 71, 122, 238, 154, 181, 255, 216, 255, 255, 128} + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 3 */ + { /* Coeff Band 0 */ + { 3, 29, 86, 140, 130, 163, 135, 131, 190, 148, 186 }, + { 1, 26, 61, 105, 124, 156, 105, 119, 178, 138, 173 }, + { 1, 15, 28, 60, 105, 142, 80, 105, 173, 128, 178 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 130, 142, 172, 141, 161, 191, 140, 244, 193, 216 }, + { 61, 124, 141, 173, 141, 161, 190, 139, 244, 194, 215 }, + { 28, 103, 124, 171, 138, 160, 190, 140, 243, 194, 225 }, + { 1, 36, 51, 111, 109, 144, 152, 120, 227, 173, 205 } + }, { /* Coeff Band 2 */ + { 1, 60, 125, 153, 143, 159, 156, 127, 234, 170, 233 }, + { 22, 48, 78, 129, 124, 152, 151, 123, 234, 170, 233 }, + { 3, 32, 46, 98, 107, 142, 138, 114, 232, 165, 232 }, + { 1, 15, 23, 61, 96, 135, 101, 103, 210, 144, 213 } + }, { /* Coeff Band 3 */ + { 1, 102, 144, 182, 146, 162, 194, 143, 246, 196, 239 }, + { 34, 76, 116, 171, 136, 159, 192, 140, 246, 195, 239 }, + { 4, 51, 81, 153, 124, 153, 184, 135, 246, 192, 239 }, + { 1, 23, 37, 98, 102, 140, 142, 116, 230, 167, 227 } + }, { /* Coeff Band 4 */ + { 1, 165, 171, 214, 163, 174, 214, 160, 245, 203, 219 }, + { 16, 120, 154, 210, 158, 172, 212, 159, 245, 201, 219 }, + { 1, 80, 122, 199, 147, 167, 208, 154, 244, 200, 223 }, + { 1, 40, 65, 145, 118, 151, 171, 135, 226, 175, 202 } + }, { /* Coeff Band 5 */ + { 1, 146, 162, 215, 159, 172, 226, 165, 251, 218, 231 }, + { 16, 92, 131, 205, 147, 167, 224, 162, 252, 217, 228 }, + { 2, 60, 92, 182, 129, 158, 216, 152, 251, 214, 234 }, + { 1, 32, 50, 126, 107, 144, 176, 128, 240, 189, 216 } + }, { /* Coeff Band 6 */ + { 1, 178, 186, 224, 172, 178, 224, 167, 251, 214, 232 }, + { 14, 118, 158, 215, 160, 173, 223, 164, 250, 214, 228 }, + { 2, 70, 109, 194, 139, 164, 217, 156, 250, 213, 227 }, + { 1, 32, 51, 129, 108, 146, 175, 128, 240, 187, 218 } + }, { /* Coeff Band 7 */ + { 1, 210, 214, 240, 192, 188, 235, 182, 251, 221, 228 }, + { 22, 140, 187, 233, 177, 183, 234, 178, 251, 219, 233 }, + { 3, 82, 130, 215, 152, 171, 229, 171, 250, 217, 232 }, + { 1, 38, 63, 154, 115, 149, 195, 141, 240, 196, 219 } } } }; - -#define default_coef_probs_32x32 default_coef_probs_16x16 +#if CONFIG_SUPERBLOCKS && CONFIG_TX32X32 +static const vp9_coeff_probs default_coef_probs_32x32[BLOCK_TYPES_32X32] = { + { /* block Type 0 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 1 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 2 */ + { /* Coeff Band 0 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 2 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 3 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 4 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 5 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 6 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 7 */ + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + } + }, { /* block Type 3 */ + { /* Coeff Band 0 */ + { 8, 40, 224, 217, 183, 181, 180, 148, 200, 180, 123 }, + { 6, 37, 178, 193, 173, 171, 160, 139, 205, 166, 173 }, + { 3, 27, 93, 133, 143, 159, 115, 125, 183, 141, 178 }, + { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + }, { /* Coeff Band 1 */ + { 1, 170, 209, 202, 172, 175, 179, 143, 238, 181, 214 }, + { 184, 164, 199, 199, 169, 173, 180, 143, 238, 184, 217 }, + { 99, 128, 165, 194, 161, 171, 180, 142, 239, 182, 219 }, + { 17, 49, 59, 102, 117, 148, 122, 116, 208, 152, 191 } + }, { /* Coeff Band 2 */ + { 1, 136, 200, 197, 172, 172, 168, 142, 226, 170, 216 }, + { 66, 104, 146, 175, 152, 165, 163, 139, 225, 170, 219 }, + { 11, 52, 83, 144, 130, 156, 151, 130, 222, 165, 216 }, + { 1, 16, 25, 65, 99, 137, 96, 106, 190, 138, 184 } + }, { /* Coeff Band 3 */ + { 1, 180, 203, 198, 166, 170, 190, 143, 241, 190, 227 }, + { 74, 125, 161, 187, 154, 165, 187, 142, 241, 189, 224 }, + { 15, 70, 98, 163, 133, 157, 182, 137, 241, 187, 226 }, + { 1, 25, 37, 89, 104, 140, 128, 113, 218, 158, 206 } + }, { /* Coeff Band 4 */ + { 1, 191, 208, 213, 169, 173, 212, 156, 246, 206, 217 }, + { 53, 136, 170, 205, 159, 170, 211, 156, 246, 205, 208 }, + { 3, 75, 112, 189, 140, 163, 209, 151, 246, 205, 215 }, + { 1, 32, 51, 127, 108, 145, 171, 128, 231, 183, 197 } + }, { /* Coeff Band 5 */ + { 1, 183, 195, 202, 161, 168, 206, 150, 247, 202, 229 }, + { 42, 113, 144, 190, 147, 163, 203, 148, 247, 202, 229 }, + { 2, 56, 82, 160, 124, 153, 195, 140, 246, 200, 229 }, + { 1, 22, 34, 93, 99, 138, 143, 115, 227, 170, 206 } + }, { /* Coeff Band 6 */ + { 1, 202, 193, 221, 168, 175, 227, 167, 251, 217, 236 }, + { 26, 122, 158, 213, 157, 171, 225, 165, 251, 216, 242 }, + { 1, 68, 105, 194, 136, 162, 221, 158, 251, 215, 239 }, + { 1, 32, 51, 131, 107, 145, 179, 130, 240, 188, 231 } + }, { /* Coeff Band 7 */ + { 1, 234, 212, 243, 195, 192, 240, 187, 253, 226, 227 }, + { 14, 141, 186, 237, 181, 186, 239, 184, 253, 226, 233 }, + { 1, 85, 132, 221, 155, 174, 235, 176, 253, 224, 226 }, + { 1, 39, 65, 159, 115, 150, 202, 144, 245, 202, 214 } + } + } +}; +#endif diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c index b5da685ac..1e5848843 100644 --- a/vp9/common/vp9_entropy.c +++ b/vp9/common/vp9_entropy.c @@ -592,15 +592,13 @@ static void update_coef_probs(vp9_coeff_probs *dst_coef_probs, vp9_tree_probs_from_distribution(MAX_ENTROPY_TOKENS, vp9_coef_encodings, vp9_coef_tree, coef_probs, branch_ct, - coef_counts[i][j][k], 256, 1); + coef_counts[i][j][k]); for (t = 0; t < ENTROPY_NODES; ++t) { - int prob; count = branch_ct[t][0] + branch_ct[t][1]; count = count > count_sat ? count_sat : count; factor = (update_factor * count / count_sat); - prob = ((int)pre_coef_probs[i][j][k][t] * (256 - factor) + - (int)coef_probs[t] * factor + 128) >> 8; - dst_coef_probs[i][j][k][t] = clip_prob(prob); + dst_coef_probs[i][j][k][t] = weighted_prob(pre_coef_probs[i][j][k][t], + coef_probs[t], factor); } } } diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h index 6ec044606..4262b3030 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -129,4 +129,10 @@ void vp9_coef_tree_initialize(void); void vp9_adapt_coef_probs(struct VP9Common *); +static void vp9_reset_mb_tokens_context(MACROBLOCKD* const xd) { + /* Clear entropy contexts */ + vpx_memset(xd->above_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); + vpx_memset(xd->left_context, 0, sizeof(ENTROPY_CONTEXT_PLANES)); +} + #endif diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c index cda217670..d7c2d8e06 100644 --- a/vp9/common/vp9_entropymode.c +++ b/vp9/common/vp9_entropymode.c @@ -309,24 +309,24 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) { vp9_tree_probs_from_distribution(VP9_YMODES, vp9_ymode_encodings, vp9_ymode_tree, x->fc.ymode_prob, - bct, y_mode_cts, 256, 1); + bct, y_mode_cts); #if CONFIG_SUPERBLOCKS vp9_tree_probs_from_distribution(VP9_I32X32_MODES, vp9_sb_ymode_encodings, vp9_sb_ymode_tree, x->fc.sb_ymode_prob, - bct, y_mode_cts, 256, 1); + bct, y_mode_cts); #endif { int i; for (i = 0; i < 8; i++) { vp9_tree_probs_from_distribution(VP9_YMODES, vp9_kf_ymode_encodings, vp9_kf_ymode_tree, x->kf_ymode_prob[i], - bct, kf_y_mode_cts[i], 256, 1); + bct, kf_y_mode_cts[i]); #if CONFIG_SUPERBLOCKS vp9_tree_probs_from_distribution(VP9_I32X32_MODES, vp9_sb_kf_ymode_encodings, vp9_sb_kf_ymode_tree, x->sb_kf_ymode_prob[i], bct, - kf_y_mode_cts[i], 256, 1); + kf_y_mode_cts[i]); #endif } } @@ -335,16 +335,16 @@ void vp9_init_mbmode_probs(VP9_COMMON *x) { for (i = 0; i < VP9_YMODES; i++) { vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, x->kf_uv_mode_prob[i], - bct, kf_uv_mode_cts[i], 256, 1); + bct, kf_uv_mode_cts[i]); vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, x->fc.uv_mode_prob[i], - bct, uv_mode_cts[i], 256, 1); + bct, uv_mode_cts[i]); } } vp9_tree_probs_from_distribution(VP9_I8X8_MODES, vp9_i8x8_mode_encodings, vp9_i8x8_mode_tree, x->fc.i8x8_mode_prob, - bct, i8x8_mode_cts, 256, 1); + bct, i8x8_mode_cts); vpx_memcpy(x->fc.sub_mv_ref_prob, vp9_sub_mv_ref_prob2, sizeof(vp9_sub_mv_ref_prob2)); @@ -362,7 +362,7 @@ static void intra_bmode_probs_from_distribution( unsigned int branch_ct[VP9_NKF_BINTRAMODES - 1][2], const unsigned int events[VP9_NKF_BINTRAMODES]) { vp9_tree_probs_from_distribution(VP9_NKF_BINTRAMODES, vp9_bmode_encodings, - vp9_bmode_tree, p, branch_ct, events, 256, 1); + vp9_bmode_tree, p, branch_ct, events); } void vp9_default_bmode_probs(vp9_prob p[VP9_NKF_BINTRAMODES - 1]) { @@ -375,7 +375,7 @@ static void intra_kf_bmode_probs_from_distribution( unsigned int branch_ct[VP9_KF_BINTRAMODES - 1][2], const unsigned int events[VP9_KF_BINTRAMODES]) { vp9_tree_probs_from_distribution(VP9_KF_BINTRAMODES, vp9_kf_bmode_encodings, - vp9_kf_bmode_tree, p, branch_ct, events, 256, 1); + vp9_kf_bmode_tree, p, branch_ct, events); } void vp9_kf_default_bmode_probs(vp9_prob p[VP9_KF_BINTRAMODES] @@ -495,17 +495,14 @@ void vp9_update_mode_context(VP9_COMMON *pc) { for (j = 0; j < INTER_MODE_CONTEXTS; j++) { for (i = 0; i < 4; i++) { - int this_prob; - int count = mv_ref_ct[j][i][0] + mv_ref_ct[j][i][1]; - int factor; - { - this_prob = count > 0 ? 256 * mv_ref_ct[j][i][0] / count : 128; - count = count > MVREF_COUNT_SAT ? MVREF_COUNT_SAT : count; - factor = (MVREF_MAX_UPDATE_FACTOR * count / MVREF_COUNT_SAT); - this_prob = (pc->fc.vp9_mode_contexts[j][i] * (256 - factor) + - this_prob * factor + 128) >> 8; - mode_context[j][i] = clip_prob(this_prob); - } + int count = mv_ref_ct[j][i][0] + mv_ref_ct[j][i][1], factor; + + count = count > MVREF_COUNT_SAT ? MVREF_COUNT_SAT : count; + factor = (MVREF_MAX_UPDATE_FACTOR * count / MVREF_COUNT_SAT); + mode_context[j][i] = weighted_prob(pc->fc.vp9_mode_contexts[j][i], + get_binary_prob(mv_ref_ct[j][i][0], + mv_ref_ct[j][i][1]), + factor); } } } @@ -531,25 +528,33 @@ void print_mode_contexts(VP9_COMMON *pc) { } #endif -// #define MODE_COUNT_TESTING #define MODE_COUNT_SAT 20 #define MODE_MAX_UPDATE_FACTOR 144 +static void update_mode_probs(int n_modes, struct vp9_token_struct *encoding, + const vp9_tree_index *tree, unsigned int *cnt, + vp9_prob *pre_probs, vp9_prob *dst_probs) { +#define MAX_PROBS 32 + vp9_prob probs[MAX_PROBS]; + unsigned int branch_ct[MAX_PROBS][2]; + int t, count, factor; + + assert(n_modes - 1 < MAX_PROBS); + vp9_tree_probs_from_distribution(n_modes, encoding, tree, probs, + branch_ct, cnt); + for (t = 0; t < n_modes - 1; ++t) { + count = branch_ct[t][0] + branch_ct[t][1]; + count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; + factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); + dst_probs[t] = weighted_prob(pre_probs[t], probs[t], factor); + } +} + +// #define MODE_COUNT_TESTING void vp9_adapt_mode_probs(VP9_COMMON *cm) { - int i, t, count, factor; - unsigned int branch_ct[32][2]; - vp9_prob ymode_probs[VP9_YMODES - 1]; -#if CONFIG_SUPERBLOCKS - vp9_prob sb_ymode_probs[VP9_I32X32_MODES - 1]; -#endif - vp9_prob uvmode_probs[VP9_UV_MODES - 1]; - vp9_prob bmode_probs[VP9_NKF_BINTRAMODES - 1]; - vp9_prob i8x8_mode_probs[VP9_I8X8_MODES - 1]; - vp9_prob sub_mv_ref_probs[VP9_SUBMVREFS - 1]; - vp9_prob mbsplit_probs[VP9_NUMMBSPLITS - 1]; -#if CONFIG_COMP_INTERINTRA_PRED - vp9_prob interintra_prob; -#endif + int i; #ifdef MODE_COUNT_TESTING + int t; + printf("static const unsigned int\nymode_counts" "[VP9_YMODES] = {\n"); for (t = 0; t < VP9_YMODES; ++t) printf("%d, ", cm->fc.ymode_counts[t]); @@ -590,116 +595,45 @@ void vp9_adapt_mode_probs(VP9_COMMON *cm) { printf("};\n"); #endif #endif - vp9_tree_probs_from_distribution( - VP9_YMODES, vp9_ymode_encodings, vp9_ymode_tree, - ymode_probs, branch_ct, cm->fc.ymode_counts, - 256, 1); - for (t = 0; t < VP9_YMODES - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_ymode_prob[t] * (256 - factor) + - (int)ymode_probs[t] * factor + 128) >> 8; - cm->fc.ymode_prob[t] = clip_prob(prob); - } + + update_mode_probs(VP9_YMODES, vp9_ymode_encodings, vp9_ymode_tree, + cm->fc.ymode_counts, cm->fc.pre_ymode_prob, + cm->fc.ymode_prob); #if CONFIG_SUPERBLOCKS - vp9_tree_probs_from_distribution(VP9_I32X32_MODES, - vp9_sb_ymode_encodings, vp9_sb_ymode_tree, - sb_ymode_probs, branch_ct, - cm->fc.sb_ymode_counts, - 256, 1); - for (t = 0; t < VP9_I32X32_MODES - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_sb_ymode_prob[t] * (256 - factor) + - (int)sb_ymode_probs[t] * factor + 128) >> 8; - cm->fc.sb_ymode_prob[t] = clip_prob(prob); - } + update_mode_probs(VP9_I32X32_MODES, vp9_sb_ymode_encodings, vp9_sb_ymode_tree, + cm->fc.sb_ymode_counts, cm->fc.pre_sb_ymode_prob, + cm->fc.sb_ymode_prob); #endif for (i = 0; i < VP9_YMODES; ++i) { - vp9_tree_probs_from_distribution(VP9_UV_MODES, vp9_uv_mode_encodings, - vp9_uv_mode_tree, uvmode_probs, branch_ct, - cm->fc.uv_mode_counts[i], 256, 1); - for (t = 0; t < VP9_UV_MODES - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_uv_mode_prob[i][t] * (256 - factor) + - (int)uvmode_probs[t] * factor + 128) >> 8; - cm->fc.uv_mode_prob[i][t] = clip_prob(prob); - } - } - vp9_tree_probs_from_distribution(VP9_NKF_BINTRAMODES, vp9_bmode_encodings, - vp9_bmode_tree, bmode_probs, branch_ct, - cm->fc.bmode_counts, 256, 1); - for (t = 0; t < VP9_NKF_BINTRAMODES - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_bmode_prob[t] * (256 - factor) + - (int)bmode_probs[t] * factor + 128) >> 8; - cm->fc.bmode_prob[t] = clip_prob(prob); - } - vp9_tree_probs_from_distribution(VP9_I8X8_MODES, vp9_i8x8_mode_encodings, - vp9_i8x8_mode_tree, i8x8_mode_probs, - branch_ct, cm->fc.i8x8_mode_counts, 256, 1); - for (t = 0; t < VP9_I8X8_MODES - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_i8x8_mode_prob[t] * (256 - factor) + - (int)i8x8_mode_probs[t] * factor + 128) >> 8; - cm->fc.i8x8_mode_prob[t] = clip_prob(prob); + update_mode_probs(VP9_UV_MODES, vp9_uv_mode_encodings, vp9_uv_mode_tree, + cm->fc.uv_mode_counts[i], cm->fc.pre_uv_mode_prob[i], + cm->fc.uv_mode_prob[i]); } + update_mode_probs(VP9_NKF_BINTRAMODES, vp9_bmode_encodings, vp9_bmode_tree, + cm->fc.bmode_counts, cm->fc.pre_bmode_prob, + cm->fc.bmode_prob); + update_mode_probs(VP9_I8X8_MODES, vp9_i8x8_mode_encodings, + vp9_i8x8_mode_tree, cm->fc.i8x8_mode_counts, + cm->fc.pre_i8x8_mode_prob, cm->fc.i8x8_mode_prob); for (i = 0; i < SUBMVREF_COUNT; ++i) { - vp9_tree_probs_from_distribution(VP9_SUBMVREFS, - vp9_sub_mv_ref_encoding_array, - vp9_sub_mv_ref_tree, sub_mv_ref_probs, - branch_ct, cm->fc.sub_mv_ref_counts[i], - 256, 1); - for (t = 0; t < VP9_SUBMVREFS - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_sub_mv_ref_prob[i][t] * (256 - factor) + - (int)sub_mv_ref_probs[t] * factor + 128) >> 8; - cm->fc.sub_mv_ref_prob[i][t] = clip_prob(prob); - } - } - vp9_tree_probs_from_distribution(VP9_NUMMBSPLITS, vp9_mbsplit_encodings, - vp9_mbsplit_tree, mbsplit_probs, branch_ct, - cm->fc.mbsplit_counts, 256, 1); - for (t = 0; t < VP9_NUMMBSPLITS - 1; ++t) { - int prob; - count = branch_ct[t][0] + branch_ct[t][1]; - count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; - factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_mbsplit_prob[t] * (256 - factor) + - (int)mbsplit_probs[t] * factor + 128) >> 8; - cm->fc.mbsplit_prob[t] = clip_prob(prob); + update_mode_probs(VP9_SUBMVREFS, vp9_sub_mv_ref_encoding_array, + vp9_sub_mv_ref_tree, cm->fc.sub_mv_ref_counts[i], + cm->fc.pre_sub_mv_ref_prob[i], cm->fc.sub_mv_ref_prob[i]); } + update_mode_probs(VP9_NUMMBSPLITS, vp9_mbsplit_encodings, vp9_mbsplit_tree, + cm->fc.mbsplit_counts, cm->fc.pre_mbsplit_prob, + cm->fc.mbsplit_prob); #if CONFIG_COMP_INTERINTRA_PRED if (cm->use_interintra) { - int prob; - interintra_prob = vp9_bin_prob_from_distribution(cm->fc.interintra_counts); + int factor, interintra_prob, count; + + interintra_prob = get_binary_prob(cm->fc.interintra_counts[0], + cm->fc.interintra_counts[1]); count = cm->fc.interintra_counts[0] + cm->fc.interintra_counts[1]; count = count > MODE_COUNT_SAT ? MODE_COUNT_SAT : count; factor = (MODE_MAX_UPDATE_FACTOR * count / MODE_COUNT_SAT); - prob = ((int)cm->fc.pre_interintra_prob * (256 - factor) + - (int)interintra_prob * factor + 128) >> 8; - if (prob <= 0) - cm->fc.interintra_prob = 1; - else if (prob > 255) - cm->fc.interintra_prob = 255; - else - cm->fc.interintra_prob = prob; + cm->fc.interintra_prob = weighted_prob(cm->fc.pre_interintra_prob, + interintra_prob, factor); } #endif } diff --git a/vp9/common/vp9_entropymv.c b/vp9/common/vp9_entropymv.c index 94543c54d..99e3c2e8c 100644 --- a/vp9/common/vp9_entropymv.c +++ b/vp9/common/vp9_entropymv.c @@ -213,16 +213,12 @@ void vp9_increment_nmv(const MV *mv, const MV *ref, nmv_context_counts *mvctx, static void adapt_prob(vp9_prob *dest, vp9_prob prep, vp9_prob newp, unsigned int ct[2]) { - int factor; - int prob; int count = ct[0] + ct[1]; + if (count) { count = count > MV_COUNT_SAT ? MV_COUNT_SAT : count; - factor = (MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT); - prob = ((int)prep * (256 - factor) + (int)(newp) * factor + 128) >> 8; - prob += !prob; - prob = (prob > 255 ? 255 : prob); - *dest = prob; + *dest = weighted_prob(prep, newp, + MV_MAX_UPDATE_FACTOR * count / MV_COUNT_SAT); } } @@ -251,11 +247,10 @@ void vp9_counts_to_nmv_context( vp9_mv_joint_tree, prob->joints, branch_ct_joint, - NMVcount->joints, - 256, 1); + NMVcount->joints); for (i = 0; i < 2; ++i) { - prob->comps[i].sign = - vp9_bin_prob_from_distribution(NMVcount->comps[i].sign); + prob->comps[i].sign = get_binary_prob(NMVcount->comps[i].sign[0], + NMVcount->comps[i].sign[1]); branch_ct_sign[i][0] = NMVcount->comps[i].sign[0]; branch_ct_sign[i][1] = NMVcount->comps[i].sign[1]; vp9_tree_probs_from_distribution(MV_CLASSES, @@ -263,18 +258,16 @@ void vp9_counts_to_nmv_context( vp9_mv_class_tree, prob->comps[i].classes, branch_ct_classes[i], - NMVcount->comps[i].classes, - 256, 1); + NMVcount->comps[i].classes); vp9_tree_probs_from_distribution(CLASS0_SIZE, vp9_mv_class0_encodings, vp9_mv_class0_tree, prob->comps[i].class0, branch_ct_class0[i], - NMVcount->comps[i].class0, - 256, 1); + NMVcount->comps[i].class0); for (j = 0; j < MV_OFFSET_BITS; ++j) { - prob->comps[i].bits[j] = vp9_bin_prob_from_distribution( - NMVcount->comps[i].bits[j]); + prob->comps[i].bits[j] = get_binary_prob(NMVcount->comps[i].bits[j][0], + NMVcount->comps[i].bits[j][1]); branch_ct_bits[i][j][0] = NMVcount->comps[i].bits[j][0]; branch_ct_bits[i][j][1] = NMVcount->comps[i].bits[j][1]; } @@ -286,26 +279,25 @@ void vp9_counts_to_nmv_context( vp9_mv_fp_tree, prob->comps[i].class0_fp[k], branch_ct_class0_fp[i][k], - NMVcount->comps[i].class0_fp[k], - 256, 1); + NMVcount->comps[i].class0_fp[k]); } vp9_tree_probs_from_distribution(4, vp9_mv_fp_encodings, vp9_mv_fp_tree, prob->comps[i].fp, branch_ct_fp[i], - NMVcount->comps[i].fp, - 256, 1); + NMVcount->comps[i].fp); } if (usehp) { for (i = 0; i < 2; ++i) { - prob->comps[i].class0_hp = vp9_bin_prob_from_distribution( - NMVcount->comps[i].class0_hp); + prob->comps[i].class0_hp = + get_binary_prob(NMVcount->comps[i].class0_hp[0], + NMVcount->comps[i].class0_hp[1]); branch_ct_class0_hp[i][0] = NMVcount->comps[i].class0_hp[0]; branch_ct_class0_hp[i][1] = NMVcount->comps[i].class0_hp[1]; - prob->comps[i].hp = - vp9_bin_prob_from_distribution(NMVcount->comps[i].hp); + prob->comps[i].hp = get_binary_prob(NMVcount->comps[i].hp[0], + NMVcount->comps[i].hp[1]); branch_ct_hp[i][0] = NMVcount->comps[i].hp[0]; branch_ct_hp[i][1] = NMVcount->comps[i].hp[1]; } diff --git a/vp9/common/vp9_filter.c b/vp9/common/vp9_filter.c index 18217e627..710b3917e 100644 --- a/vp9/common/vp9_filter.c +++ b/vp9/common/vp9_filter.c @@ -13,6 +13,7 @@ #include "vp9/common/vp9_filter.h" #include "vpx_ports/mem.h" #include "vp9_rtcd.h" +#include "vp9/common/vp9_common.h" DECLARE_ALIGNED(16, const short, vp9_bilinear_filters[SUBPEL_SHIFTS][2]) = { { 128, 0 }, @@ -148,11 +149,11 @@ static void filter_block2d_first_pass_6(unsigned char *src_ptr, unsigned int output_width, const short *vp9_filter) { unsigned int i, j; - int Temp; + int temp; for (i = 0; i < output_height; i++) { for (j = 0; j < output_width; j++) { - Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) + + temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) + ((int)src_ptr[-1 * (int)pixel_step] * vp9_filter[1]) + ((int)src_ptr[0] * vp9_filter[2]) + ((int)src_ptr[pixel_step] * vp9_filter[3]) + @@ -161,14 +162,7 @@ static void filter_block2d_first_pass_6(unsigned char *src_ptr, (VP9_FILTER_WEIGHT >> 1); /* Rounding */ /* Normalize back to 0-255 */ - Temp = Temp >> VP9_FILTER_SHIFT; - - if (Temp < 0) - Temp = 0; - else if (Temp > 255) - Temp = 255; - - output_ptr[j] = Temp; + output_ptr[j] = clip_pixel(temp >> VP9_FILTER_SHIFT); src_ptr++; } @@ -187,12 +181,12 @@ static void filter_block2d_second_pass_6(int *src_ptr, unsigned int output_width, const short *vp9_filter) { unsigned int i, j; - int Temp; + int temp; for (i = 0; i < output_height; i++) { for (j = 0; j < output_width; j++) { /* Apply filter */ - Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) + + temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) + ((int)src_ptr[-1 * (int)pixel_step] * vp9_filter[1]) + ((int)src_ptr[0] * vp9_filter[2]) + ((int)src_ptr[pixel_step] * vp9_filter[3]) + @@ -201,14 +195,7 @@ static void filter_block2d_second_pass_6(int *src_ptr, (VP9_FILTER_WEIGHT >> 1); /* Rounding */ /* Normalize back to 0-255 */ - Temp = Temp >> VP9_FILTER_SHIFT; - - if (Temp < 0) - Temp = 0; - else if (Temp > 255) - Temp = 255; - - output_ptr[j] = (unsigned char)Temp; + output_ptr[j] = clip_pixel(temp >> VP9_FILTER_SHIFT); src_ptr++; } @@ -235,12 +222,12 @@ static void filter_block2d_second_pass_avg_6(int *src_ptr, unsigned int output_width, const short *vp9_filter) { unsigned int i, j; - int Temp; + int temp; for (i = 0; i < output_height; i++) { for (j = 0; j < output_width; j++) { /* Apply filter */ - Temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) + + temp = ((int)src_ptr[-2 * (int)pixel_step] * vp9_filter[0]) + ((int)src_ptr[-1 * (int)pixel_step] * vp9_filter[1]) + ((int)src_ptr[0] * vp9_filter[2]) + ((int)src_ptr[pixel_step] * vp9_filter[3]) + @@ -249,14 +236,8 @@ static void filter_block2d_second_pass_avg_6(int *src_ptr, (VP9_FILTER_WEIGHT >> 1); /* Rounding */ /* Normalize back to 0-255 */ - Temp = Temp >> VP9_FILTER_SHIFT; - - if (Temp < 0) - Temp = 0; - else if (Temp > 255) - Temp = 255; - - output_ptr[j] = (unsigned char)((output_ptr[j] + Temp + 1) >> 1); + output_ptr[j] = (clip_pixel(temp >> VP9_FILTER_SHIFT) + + output_ptr[j] + 1) >> 1; src_ptr++; } @@ -539,14 +520,8 @@ static void filter_block2d_8_c(const unsigned char *src_ptr, (VP9_FILTER_WEIGHT >> 1); // Rounding // Normalize back to 0-255... - temp >>= VP9_FILTER_SHIFT; - if (temp < 0) { - temp = 0; - } else if (temp > 255) { - temp = 255; - } + *output_ptr = clip_pixel(temp >> VP9_FILTER_SHIFT); src_ptr++; - *output_ptr = temp; output_ptr += intermediate_height; } src_ptr += src_next_row_stride; @@ -573,15 +548,8 @@ static void filter_block2d_8_c(const unsigned char *src_ptr, (VP9_FILTER_WEIGHT >> 1); // Rounding // Normalize back to 0-255... - temp >>= VP9_FILTER_SHIFT; - if (temp < 0) { - temp = 0; - } else if (temp > 255) { - temp = 255; - } - + *dst_ptr++ = clip_pixel(temp >> VP9_FILTER_SHIFT); src_ptr += intermediate_height; - *dst_ptr++ = (unsigned char)temp; } src_ptr += intermediate_next_stride; dst_ptr += dst_next_row_stride; @@ -940,15 +908,15 @@ static void filter_block2d_bil_second_pass(unsigned short *src_ptr, unsigned int width, const short *vp9_filter) { unsigned int i, j; - int Temp; + int temp; for (i = 0; i < height; i++) { for (j = 0; j < width; j++) { /* Apply filter */ - Temp = ((int)src_ptr[0] * vp9_filter[0]) + + temp = ((int)src_ptr[0] * vp9_filter[0]) + ((int)src_ptr[width] * vp9_filter[1]) + (VP9_FILTER_WEIGHT / 2); - dst_ptr[j] = (unsigned int)(Temp >> VP9_FILTER_SHIFT); + dst_ptr[j] = (unsigned int)(temp >> VP9_FILTER_SHIFT); src_ptr++; } @@ -973,15 +941,15 @@ static void filter_block2d_bil_second_pass_avg(unsigned short *src_ptr, unsigned int width, const short *vp9_filter) { unsigned int i, j; - int Temp; + int temp; for (i = 0; i < height; i++) { for (j = 0; j < width; j++) { /* Apply filter */ - Temp = ((int)src_ptr[0] * vp9_filter[0]) + - ((int)src_ptr[width] * vp9_filter[1]) + - (VP9_FILTER_WEIGHT / 2); - dst_ptr[j] = (unsigned int)(((Temp >> VP9_FILTER_SHIFT) + dst_ptr[j] + 1) >> 1); + temp = (((int)src_ptr[0] * vp9_filter[0]) + + ((int)src_ptr[width] * vp9_filter[1]) + + (VP9_FILTER_WEIGHT / 2)) >> VP9_FILTER_SHIFT; + dst_ptr[j] = (unsigned int)((temp + dst_ptr[j] + 1) >> 1); src_ptr++; } diff --git a/vp9/common/vp9_idctllm.c b/vp9/common/vp9_idctllm.c index b09f3bde6..22c26ba12 100644 --- a/vp9/common/vp9_idctllm.c +++ b/vp9/common/vp9_idctllm.c @@ -26,8 +26,8 @@ #include <math.h> #include "vpx_ports/config.h" #include "vp9/common/vp9_systemdependent.h" - #include "vp9/common/vp9_blockd.h" +#include "vp9/common/vp9_common.h" static const int cospi8sqrt2minus1 = 20091; static const int sinpi8sqrt2 = 35468; @@ -562,15 +562,7 @@ void vp9_dc_only_idct_add_c(short input_dc, unsigned char *pred_ptr, for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { - int a = a1 + pred_ptr[c]; - - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(a1 + pred_ptr[c]); } dst_ptr += stride; @@ -765,14 +757,7 @@ void vp9_dc_only_inv_walsh_add_c(short input_dc, unsigned char *pred_ptr, for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { - int a = tmp[r * 4 + c] + pred_ptr[c]; - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(tmp[r * 4 + c] + pred_ptr[c]); } dst_ptr += stride; @@ -792,15 +777,7 @@ void vp9_dc_only_idct_add_8x8_c(short input_dc, for (b = 0; b < 4; b++) { for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { - int a = a1 + pred_ptr[c]; - - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(a1 + pred_ptr[c]); } dst_ptr += stride; diff --git a/vp9/common/vp9_pred_common.c b/vp9/common/vp9_pred_common.c index 2abae34b2..e8a3c4f5e 100644 --- a/vp9/common/vp9_pred_common.c +++ b/vp9/common/vp9_pred_common.c @@ -11,6 +11,7 @@ #include "vp9/common/vp9_pred_common.h" #include "vp9/common/vp9_seg_common.h" +#include "vp9/common/vp9_treecoder.h" // TBD prediction functions for various bitstream signals @@ -383,26 +384,13 @@ void vp9_calc_ref_probs(int *count, vp9_prob *probs) { int tot_count; tot_count = count[0] + count[1] + count[2] + count[3]; - if (tot_count) { - probs[0] = (vp9_prob)((count[0] * 255 + (tot_count >> 1)) / tot_count); - probs[0] += !probs[0]; - } else - probs[0] = 128; + probs[0] = get_prob(count[0], tot_count); tot_count -= count[0]; - if (tot_count) { - probs[1] = (vp9_prob)((count[1] * 255 + (tot_count >> 1)) / tot_count); - probs[1] += !probs[1]; - } else - probs[1] = 128; + probs[1] = get_prob(count[1], tot_count); tot_count -= count[1]; - if (tot_count) { - probs[2] = (vp9_prob)((count[2] * 255 + (tot_count >> 1)) / tot_count); - probs[2] += !probs[2]; - } else - probs[2] = 128; - + probs[2] = get_prob(count[2], tot_count); } // Computes a set of modified conditional probabilities for the reference frame diff --git a/vp9/common/vp9_recon.c b/vp9/common/vp9_recon.c index e567bac8d..d8bcd77c0 100644 --- a/vp9/common/vp9_recon.c +++ b/vp9/common/vp9_recon.c @@ -24,15 +24,7 @@ void vp9_recon_b_c for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { - int a = diff_ptr[c] + pred_ptr[c]; - - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(diff_ptr[c] + pred_ptr[c]); } dst_ptr += stride; @@ -52,15 +44,7 @@ void vp9_recon_uv_b_c for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { - int a = diff_ptr[c] + pred_ptr[c]; - - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(diff_ptr[c] + pred_ptr[c]); } dst_ptr += stride; @@ -79,15 +63,7 @@ void vp9_recon4b_c for (r = 0; r < 4; r++) { for (c = 0; c < 16; c++) { - int a = diff_ptr[c] + pred_ptr[c]; - - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(diff_ptr[c] + pred_ptr[c]); } dst_ptr += stride; @@ -107,15 +83,7 @@ void vp9_recon2b_c for (r = 0; r < 4; r++) { for (c = 0; c < 8; c++) { - int a = diff_ptr[c] + pred_ptr[c]; - - if (a < 0) - a = 0; - - if (a > 255) - a = 255; - - dst_ptr[c] = (unsigned char) a; + dst_ptr[c] = clip_pixel(diff_ptr[c] + pred_ptr[c]); } dst_ptr += stride; @@ -133,12 +101,7 @@ void vp9_recon_mby_s_c(MACROBLOCKD *xd, uint8_t *dst) { for (y = 0; y < 16; y++) { for (x = 0; x < 16; x++) { - int a = dst[x] + diff[x]; - if (a < 0) - a = 0; - else if (a > 255) - a = 255; - dst[x] = a; + dst[x] = clip_pixel(dst[x] + diff[x]); } dst += stride; diff += 16; @@ -156,12 +119,7 @@ void vp9_recon_mbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) { for (y = 0; y < 8; y++) { for (x = 0; x < 8; x++) { - int a = dst[x] + diff[x]; - if (a < 0) - a = 0; - else if (a > 255) - a = 255; - dst[x] = a; + dst[x] = clip_pixel(dst[x] + diff[x]); } dst += stride; diff += 8; @@ -176,12 +134,7 @@ void vp9_recon_sby_s_c(MACROBLOCKD *xd, uint8_t *dst) { for (y = 0; y < 32; y++) { for (x = 0; x < 32; x++) { - int a = dst[x] + diff[x]; - if (a < 0) - a = 0; - else if (a > 255) - a = 255; - dst[x] = a; + dst[x] = clip_pixel(dst[x] + diff[x]); } dst += stride; diff += 32; @@ -195,18 +148,8 @@ void vp9_recon_sbuv_s_c(MACROBLOCKD *xd, uint8_t *udst, uint8_t *vdst) { for (y = 0; y < 16; y++) { for (x = 0; x < 16; x++) { - int u = udst[x] + udiff[x]; - int v = vdst[x] + vdiff[x]; - if (u < 0) - u = 0; - else if (u > 255) - u = 255; - if (v < 0) - v = 0; - else if (v > 255) - v = 255; - udst[x] = u; - vdst[x] = v; + udst[x] = clip_pixel(udst[x] + udiff[x]); + vdst[x] = clip_pixel(vdst[x] + vdiff[x]); } udst += stride; vdst += stride; diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index fb4906e6a..11d1c97b1 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -332,8 +332,8 @@ void filter_mb(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int width, int height) { int i, j, k; - unsigned int Temp[32 * 32]; - unsigned int *pTmp = Temp; + unsigned int temp[32 * 32]; + unsigned int *pTmp = temp; unsigned char *pSrc = src - (1 + src_stride) * (PRED_FILT_LEN / 2); // Horizontal @@ -350,7 +350,7 @@ void filter_mb(unsigned char *src, int src_stride, } // Vertical - pTmp = Temp; + pTmp = temp; for (i = 0; i < width; i++) { unsigned char *pDst = dst + i; for (j = 0; j < height; j++) { @@ -358,8 +358,8 @@ void filter_mb(unsigned char *src, int src_stride, for (k = 0; k < PRED_FILT_LEN; k++) sum += pTmp[(j + k) * width] * pred_filter[k]; // Round - sum = (sum + ((1 << (filt_shift << 1)) >> 1)) >> (filt_shift << 1); - pDst[j * dst_stride] = (sum < 0 ? 0 : sum > 255 ? 255 : sum); + pDst[j * dst_stride] = (sum + ((1 << (filt_shift << 1)) >> 1)) >> + (filt_shift << 1); } ++pTmp; } diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c index 92492aa5b..14f94820d 100644 --- a/vp9/common/vp9_reconintra.c +++ b/vp9/common/vp9_reconintra.c @@ -124,18 +124,20 @@ static void d45_predictor(uint8_t *ypred_ptr, int y_stride, int n, } } for (c = 0; c <= r; ++c) { - int yabove_ext = yabove_row[r]; // 2*yabove_row[r] - yabove_row[r-1]; - int yleft_ext = yleft_col[r]; // 2*yleft_col[r] - yleft_col[r-1]; - yabove_ext = (yabove_ext > 255 ? 255 : (yabove_ext < 0 ? 0 : yabove_ext)); - yleft_ext = (yleft_ext > 255 ? 255 : (yleft_ext < 0 ? 0 : yleft_ext)); + int yabove_ext = yabove_row[r]; // clip_pixel(2 * yabove_row[r] - + // yabove_row[r - 1]); + int yleft_ext = yleft_col[r]; // clip_pixel(2 * yleft_col[r] - + // yleft_col[r-1]); ypred_ptr[(r - c) * y_stride + c] = (yabove_ext * (c + 1) + yleft_ext * (r - c + 1) + r / 2 + 1) / (r + 2); } for (r = 1; r < n; ++r) { - for (c = n - r; c < n; ++c) - ypred_ptr[r * y_stride + c] = (ypred_ptr[(r - 1) * y_stride + c] + - ypred_ptr[r * y_stride + c - 1] + 1) >> 1; + for (c = n - r; c < n; ++c) { + const int yabove_ext = ypred_ptr[(r - 1) * y_stride + c]; + const int yleft_ext = ypred_ptr[r * y_stride + c - 1]; + ypred_ptr[r * y_stride + c] = (yabove_ext + yleft_ext + 1) >> 1; + } } } @@ -321,15 +323,7 @@ void vp9_build_intra_predictors_internal(unsigned char *src, int src_stride, case TM_PRED: { for (r = 0; r < bsize; r++) { for (c = 0; c < bsize; c++) { - int pred = yleft_col[r] + yabove_row[ c] - ytop_left; - - if (pred < 0) - pred = 0; - - if (pred > 255) - pred = 255; - - ypred_ptr[c] = pred; + ypred_ptr[c] = clip_pixel(yleft_col[r] + yabove_row[c] - ytop_left); } ypred_ptr += y_stride; diff --git a/vp9/common/vp9_reconintra4x4.c b/vp9/common/vp9_reconintra4x4.c index f542acb3d..82338901a 100644 --- a/vp9/common/vp9_reconintra4x4.c +++ b/vp9/common/vp9_reconintra4x4.c @@ -156,14 +156,14 @@ void vp9_intra4x4_predict(BLOCKD *x, unsigned char *predictor) { int i, r, c; - unsigned char *Above = *(x->base_dst) + x->dst - x->dst_stride; - unsigned char Left[4]; - unsigned char top_left = Above[-1]; + unsigned char *above = *(x->base_dst) + x->dst - x->dst_stride; + unsigned char left[4]; + unsigned char top_left = above[-1]; - Left[0] = (*(x->base_dst))[x->dst - 1]; - Left[1] = (*(x->base_dst))[x->dst - 1 + x->dst_stride]; - Left[2] = (*(x->base_dst))[x->dst - 1 + 2 * x->dst_stride]; - Left[3] = (*(x->base_dst))[x->dst - 1 + 3 * x->dst_stride]; + left[0] = (*(x->base_dst))[x->dst - 1]; + left[1] = (*(x->base_dst))[x->dst - 1 + x->dst_stride]; + left[2] = (*(x->base_dst))[x->dst - 1 + 2 * x->dst_stride]; + left[3] = (*(x->base_dst))[x->dst - 1 + 3 * x->dst_stride]; #if CONFIG_NEWBINTRAMODES if (b_mode == B_CONTEXT_PRED) @@ -175,8 +175,8 @@ void vp9_intra4x4_predict(BLOCKD *x, int expected_dc = 0; for (i = 0; i < 4; i++) { - expected_dc += Above[i]; - expected_dc += Left[i]; + expected_dc += above[i]; + expected_dc += left[i]; } expected_dc = (expected_dc + 4) >> 3; @@ -194,15 +194,7 @@ void vp9_intra4x4_predict(BLOCKD *x, /* prediction similar to true_motion prediction */ for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { - int pred = Above[c] - top_left + Left[r]; - - if (pred < 0) - pred = 0; - - if (pred > 255) - pred = 255; - - predictor[c] = pred; + predictor[c] = clip_pixel(above[c] - top_left + left[r]); } predictor += 16; @@ -213,10 +205,10 @@ void vp9_intra4x4_predict(BLOCKD *x, case B_VE_PRED: { unsigned int ap[4]; - ap[0] = Above[0]; - ap[1] = Above[1]; - ap[2] = Above[2]; - ap[3] = Above[3]; + ap[0] = above[0]; + ap[1] = above[1]; + ap[2] = above[2]; + ap[3] = above[3]; for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { @@ -234,10 +226,10 @@ void vp9_intra4x4_predict(BLOCKD *x, case B_HE_PRED: { unsigned int lp[4]; - lp[0] = Left[0]; - lp[1] = Left[1]; - lp[2] = Left[2]; - lp[3] = Left[3]; + lp[0] = left[0]; + lp[1] = left[1]; + lp[2] = left[2]; + lp[3] = left[3]; for (r = 0; r < 4; r++) { for (c = 0; c < 4; c++) { @@ -249,7 +241,7 @@ void vp9_intra4x4_predict(BLOCKD *x, } break; case B_LD_PRED: { - unsigned char *ptr = Above; + unsigned char *ptr = above; predictor[0 * 16 + 0] = (ptr[0] + ptr[1] * 2 + ptr[2] + 2) >> 2; predictor[0 * 16 + 1] = predictor[1 * 16 + 0] = (ptr[1] + ptr[2] * 2 + ptr[3] + 2) >> 2; @@ -273,15 +265,15 @@ void vp9_intra4x4_predict(BLOCKD *x, unsigned char pp[9]; - pp[0] = Left[3]; - pp[1] = Left[2]; - pp[2] = Left[1]; - pp[3] = Left[0]; + pp[0] = left[3]; + pp[1] = left[2]; + pp[2] = left[1]; + pp[3] = left[0]; pp[4] = top_left; - pp[5] = Above[0]; - pp[6] = Above[1]; - pp[7] = Above[2]; - pp[8] = Above[3]; + pp[5] = above[0]; + pp[6] = above[1]; + pp[7] = above[2]; + pp[8] = above[3]; predictor[3 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; predictor[3 * 16 + 1] = @@ -306,15 +298,15 @@ void vp9_intra4x4_predict(BLOCKD *x, unsigned char pp[9]; - pp[0] = Left[3]; - pp[1] = Left[2]; - pp[2] = Left[1]; - pp[3] = Left[0]; + pp[0] = left[3]; + pp[1] = left[2]; + pp[2] = left[1]; + pp[3] = left[0]; pp[4] = top_left; - pp[5] = Above[0]; - pp[6] = Above[1]; - pp[7] = Above[2]; - pp[8] = Above[3]; + pp[5] = above[0]; + pp[6] = above[1]; + pp[7] = above[2]; + pp[8] = above[3]; predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2; @@ -338,7 +330,7 @@ void vp9_intra4x4_predict(BLOCKD *x, break; case B_VL_PRED: { - unsigned char *pp = Above; + unsigned char *pp = above; predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1; predictor[1 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; @@ -361,15 +353,15 @@ void vp9_intra4x4_predict(BLOCKD *x, case B_HD_PRED: { unsigned char pp[9]; - pp[0] = Left[3]; - pp[1] = Left[2]; - pp[2] = Left[1]; - pp[3] = Left[0]; + pp[0] = left[3]; + pp[1] = left[2]; + pp[2] = left[1]; + pp[3] = left[0]; pp[4] = top_left; - pp[5] = Above[0]; - pp[6] = Above[1]; - pp[7] = Above[2]; - pp[8] = Above[3]; + pp[5] = above[0]; + pp[6] = above[1]; + pp[7] = above[2]; + pp[8] = above[3]; predictor[3 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1; @@ -393,7 +385,7 @@ void vp9_intra4x4_predict(BLOCKD *x, case B_HU_PRED: { - unsigned char *pp = Left; + unsigned char *pp = left; predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1; predictor[0 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2; predictor[0 * 16 + 2] = @@ -418,7 +410,7 @@ void vp9_intra4x4_predict(BLOCKD *x, break; /* case B_CORNER_PRED: - corner_predictor(predictor, 16, 4, Above, Left); + corner_predictor(predictor, 16, 4, above, left); break; */ #endif diff --git a/vp9/common/vp9_treecoder.c b/vp9/common/vp9_treecoder.c index 64018a100..fbc8a38cd 100644 --- a/vp9/common/vp9_treecoder.c +++ b/vp9/common/vp9_treecoder.c @@ -100,9 +100,7 @@ void vp9_tree_probs_from_distribution( vp9_tree tree, vp9_prob probs [ /* n-1 */ ], unsigned int branch_ct [ /* n-1 */ ] [2], - const unsigned int num_events[ /* n */ ], - unsigned int Pfac, - int rd + const unsigned int num_events[ /* n */ ] ) { const int tree_len = n - 1; int t = 0; @@ -110,29 +108,6 @@ void vp9_tree_probs_from_distribution( branch_counts(n, tok, tree, branch_ct, num_events); do { - const unsigned int *const c = branch_ct[t]; - const unsigned int tot = c[0] + c[1]; - -#if CONFIG_DEBUG - assert(tot < (1 << 24)); /* no overflow below */ -#endif - - if (tot) { - const unsigned int p = ((c[0] * Pfac) + (rd ? tot >> 1 : 0)) / tot; - probs[t] = p < 256 ? (p ? p : 1) : 255; /* agree w/old version for now */ - } else - probs[t] = vp9_prob_half; + probs[t] = get_binary_prob(branch_ct[t][0], branch_ct[t][1]); } while (++t < tree_len); } - -vp9_prob vp9_bin_prob_from_distribution(const unsigned int counts[2]) { - int tot_count = counts[0] + counts[1]; - vp9_prob prob; - if (tot_count) { - prob = (counts[0] * 255 + (tot_count >> 1)) / tot_count; - prob += !prob; - } else { - prob = 128; - } - return prob; -} diff --git a/vp9/common/vp9_treecoder.h b/vp9/common/vp9_treecoder.h index bbf7e74d7..525b77dc8 100644 --- a/vp9/common/vp9_treecoder.h +++ b/vp9/common/vp9_treecoder.h @@ -12,6 +12,8 @@ #ifndef VP9_COMMON_VP9_TREECODER_H_ #define VP9_COMMON_VP9_TREECODER_H_ +#include "vpx/vpx_integer.h" + typedef unsigned char vp9_prob; #define vp9_prob_half ( (vp9_prob) 128) @@ -65,19 +67,24 @@ void vp9_tree_probs_from_distribution( vp9_tree tree, vp9_prob probs [ /* n-1 */ ], unsigned int branch_ct [ /* n-1 */ ] [2], - const unsigned int num_events[ /* n */ ], - unsigned int Pfactor, - int Round + const unsigned int num_events[ /* n */ ] ); -static __inline int clip_prob(int p) { - if (p > 255) - return 255; - else if (p < 1) - return 1; - return p; +static __inline vp9_prob clip_prob(int p) { + return (p > 255) ? 255u : (p < 1) ? 1u : p; +} + +static __inline vp9_prob get_prob(int num, int den) { + return (den == 0) ? 128u : clip_prob((num * 256 + (den >> 1)) / den); } -vp9_prob vp9_bin_prob_from_distribution(const unsigned int counts[2]); +static __inline vp9_prob get_binary_prob(int n0, int n1) { + return get_prob(n0, n0 + n1); +} + +/* this function assumes prob1 and prob2 are already within [1,255] range */ +static __inline vp9_prob weighted_prob(int prob1, int prob2, int factor) { + return (prob1 * (256 - factor) + prob2 * factor + 128) >> 8; +} #endif |