diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index d77bcb07b..46701a5c7 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -52,10 +52,8 @@ typedef struct { } POS; typedef enum PlaneType { - PLANE_TYPE_Y_NO_DC_UNUSED = 0, - PLANE_TYPE_Y2_UNUSED, - PLANE_TYPE_UV, PLANE_TYPE_Y_WITH_DC, + PLANE_TYPE_UV, } PLANE_TYPE; typedef char ENTROPY_CONTEXT; diff --git a/vp9/common/vp9_default_coef_probs.h b/vp9/common/vp9_default_coef_probs.h index 10d3c389f..c18712259 100644 --- a/vp9/common/vp9_default_coef_probs.h +++ b/vp9/common/vp9_default_coef_probs.h @@ -14,132 +14,6 @@ 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 */ - { 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 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 }, @@ -181,136 +55,52 @@ static const vp9_coeff_probs default_coef_probs_4x4[BLOCK_TYPES_4X4] = { { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 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 }, + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 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 */ + } +}; +static const vp9_coeff_probs default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID] = { + { /* block Type 0 */ { /* 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 }, @@ -357,89 +147,47 @@ static const vp9_coeff_probs default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4] = { 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 }, + { 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 */ - { 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 } + { 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, 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 } + { 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, 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 } + { 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, 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 } + { 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, 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 } + { 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, 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 } + { 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, 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 } + { 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 } } }, { /* 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 */ { 229, 64, 235, 236, 189, 190, 227, 179, 247, 203, 226 }, { 148, 70, 194, 228, 175, 182, 216, 170, 238, 192, 224 }, @@ -481,178 +229,10 @@ static const vp9_coeff_probs default_coef_probs_8x8[BLOCK_TYPES_8X8] = { { 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 */ - { /* Coeff Band 0 */ - { 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] = { +static const vp9_coeff_probs default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID] = { { /* 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 */ { 118, 27, 105, 170, 137, 166, 183, 137, 243, 189, 241 }, { 44, 34, 85, 142, 127, 158, 161, 128, 232, 174, 213 }, @@ -699,89 +279,47 @@ static const vp9_coeff_probs default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8] = { 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 }, + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 */ - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 }, - { 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 } + { 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 } } }, { /* 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 }, @@ -823,178 +361,10 @@ static const vp9_coeff_probs default_coef_probs_16x16[BLOCK_TYPES_16X16] = { { 6, 106, 163, 240, 176, 188, 247, 198, 251, 222, 255 }, { 1, 51, 88, 196, 127, 159, 232, 169, 252, 214, 255 } } - }, { /* block Type 3 */ - { /* Coeff Band 0 */ - { 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_HYBRID] = { { /* 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 */ { 3, 29, 86, 140, 130, 163, 135, 131, 190, 148, 186 }, { 1, 26, 61, 105, 124, 156, 105, 119, 178, 138, 173 }, @@ -1040,132 +410,6 @@ static const vp9_coeff_probs default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16] }; 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 }, diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c index df0bf0083..ec96b4489 100644 --- a/vp9/common/vp9_entropy.c +++ b/vp9/common/vp9_entropy.c @@ -1,4 +1,4 @@ -/* + /* * Copyright (c) 2010 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license @@ -290,7 +290,7 @@ static void update_coef_probs(vp9_coeff_probs *dst_coef_probs, for (i = 0; i < block_types; ++i) for (j = 0; j < COEF_BANDS; ++j) for (k = 0; k < PREV_COEF_CONTEXTS; ++k) { - if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0))) + if (k >= 3 && j == 0) continue; vp9_tree_probs_from_distribution(MAX_ENTROPY_TOKENS, vp9_coef_encodings, vp9_coef_tree, @@ -389,21 +389,21 @@ void vp9_adapt_coef_probs(VP9_COMMON *cm) { count_sat, update_factor); update_coef_probs(cm->fc.hybrid_coef_probs_4x4, cm->fc.pre_hybrid_coef_probs_4x4, - BLOCK_TYPES_4X4, cm->fc.hybrid_coef_counts_4x4, + BLOCK_TYPES_4X4_HYBRID, cm->fc.hybrid_coef_counts_4x4, count_sat, update_factor); update_coef_probs(cm->fc.coef_probs_8x8, cm->fc.pre_coef_probs_8x8, BLOCK_TYPES_8X8, cm->fc.coef_counts_8x8, count_sat, update_factor); update_coef_probs(cm->fc.hybrid_coef_probs_8x8, cm->fc.pre_hybrid_coef_probs_8x8, - BLOCK_TYPES_8X8, cm->fc.hybrid_coef_counts_8x8, + BLOCK_TYPES_8X8_HYBRID, cm->fc.hybrid_coef_counts_8x8, count_sat, update_factor); update_coef_probs(cm->fc.coef_probs_16x16, cm->fc.pre_coef_probs_16x16, BLOCK_TYPES_16X16, cm->fc.coef_counts_16x16, count_sat, update_factor); update_coef_probs(cm->fc.hybrid_coef_probs_16x16, cm->fc.pre_hybrid_coef_probs_16x16, - BLOCK_TYPES_16X16, cm->fc.hybrid_coef_counts_16x16, + BLOCK_TYPES_16X16_HYBRID, cm->fc.hybrid_coef_counts_16x16, count_sat, update_factor); update_coef_probs(cm->fc.coef_probs_32x32, cm->fc.pre_coef_probs_32x32, BLOCK_TYPES_32X32, cm->fc.coef_counts_32x32, diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h index d331bbccb..8e9f60b26 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -59,14 +59,17 @@ extern vp9_extra_bit_struct vp9_extra_bits[12]; /* indexed by token value */ /* Coefficients are predicted via a 3-dimensional probability table. */ -/* Outside dimension. 0 = Y no DC, 1 = Y2, 2 = UV, 3 = Y with DC */ -#define BLOCK_TYPES_4X4 4 +/* Outside dimension. 0 = Y with DC, 1 = UV */ +#define BLOCK_TYPES_4X4 2 +#define BLOCK_TYPES_4X4_HYBRID 1 -#define BLOCK_TYPES_8X8 4 +#define BLOCK_TYPES_8X8 2 +#define BLOCK_TYPES_8X8_HYBRID 1 -#define BLOCK_TYPES_16X16 4 +#define BLOCK_TYPES_16X16 2 +#define BLOCK_TYPES_16X16_HYBRID 1 -#define BLOCK_TYPES_32X32 4 +#define BLOCK_TYPES_32X32 1 /* Middle dimension is a coarsening of the coefficient's position within the 4x4 DCT. */ diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h index c98242174..6fee493f1 100644 --- a/vp9/common/vp9_onyxc_int.h +++ b/vp9/common/vp9_onyxc_int.h @@ -55,11 +55,11 @@ typedef struct frame_contexts { vp9_prob sub_mv_ref_prob[SUBMVREF_COUNT][VP9_SUBMVREFS - 1]; vp9_prob mbsplit_prob[VP9_NUMMBSPLITS - 1]; vp9_coeff_probs coef_probs_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]; + vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_probs coef_probs_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]; + vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_probs coef_probs_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]; + vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_probs coef_probs_32x32[BLOCK_TYPES_32X32]; nmv_context nmvc; @@ -80,19 +80,19 @@ typedef struct frame_contexts { unsigned int mbsplit_counts[VP9_NUMMBSPLITS]; vp9_coeff_probs pre_coef_probs_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_probs pre_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]; + vp9_coeff_probs pre_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_probs pre_coef_probs_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_probs pre_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]; + vp9_coeff_probs pre_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_probs pre_coef_probs_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_probs pre_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]; + vp9_coeff_probs pre_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_probs pre_coef_probs_32x32[BLOCK_TYPES_32X32]; vp9_coeff_count coef_counts_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4]; + vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_count coef_counts_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8]; + vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_count coef_counts_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16]; + vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_count coef_counts_32x32[BLOCK_TYPES_32X32]; nmv_context_counts NMVcount; diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index b46d412a8..e619c3e84 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -1179,11 +1179,10 @@ static void read_coef_probs_common(BOOL_DECODER* const bc, if (vp9_read_bit(bc)) { for (i = 0; i < block_types; i++) { - for (j = !i; j < COEF_BANDS; j++) { + for (j = 0; j < COEF_BANDS; j++) { /* NB: This j loop starts from 1 on block type i == 0 */ for (k = 0; k < PREV_COEF_CONTEXTS; k++) { - if (k >= 3 && ((i == 0 && j == 1) || - (i > 0 && j == 0))) + if (k >= 3 && j == 0) continue; for (l = 0; l < ENTROPY_NODES; l++) { vp9_prob *const p = coef_probs[i][j][k] + l; @@ -1202,16 +1201,18 @@ static void read_coef_probs(VP9D_COMP *pbi, BOOL_DECODER* const bc) { VP9_COMMON *const pc = &pbi->common; read_coef_probs_common(bc, pc->fc.coef_probs_4x4, BLOCK_TYPES_4X4); - read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_4x4, BLOCK_TYPES_4X4); + read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_4x4, + BLOCK_TYPES_4X4_HYBRID); if (pbi->common.txfm_mode != ONLY_4X4) { read_coef_probs_common(bc, pc->fc.coef_probs_8x8, BLOCK_TYPES_8X8); - read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_8x8, BLOCK_TYPES_8X8); + read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_8x8, + BLOCK_TYPES_8X8_HYBRID); } if (pbi->common.txfm_mode > ALLOW_8X8) { read_coef_probs_common(bc, pc->fc.coef_probs_16x16, BLOCK_TYPES_16X16); read_coef_probs_common(bc, pc->fc.hybrid_coef_probs_16x16, - BLOCK_TYPES_16X16); + BLOCK_TYPES_16X16_HYBRID); } if (pbi->common.txfm_mode > ALLOW_16X16) { read_coef_probs_common(bc, pc->fc.coef_probs_32x32, BLOCK_TYPES_32X32); diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 67aabcf85..41fa4ed28 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -43,11 +43,11 @@ int intra_mode_stats[VP9_KF_BINTRAMODES] [VP9_KF_BINTRAMODES] [VP9_KF_BINTRAMODES]; vp9_coeff_stats tree_update_hist_4x4[BLOCK_TYPES_4X4]; -vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4]; +vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_stats tree_update_hist_8x8[BLOCK_TYPES_8X8]; -vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8]; +vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_stats tree_update_hist_16x16[BLOCK_TYPES_16X16]; -vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16]; +vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_stats tree_update_hist_32x32[BLOCK_TYPES_32X32]; extern unsigned int active_section; @@ -1187,7 +1187,7 @@ static void build_tree_distribution(vp9_coeff_probs *coef_probs, for (i = 0; i < block_types; ++i) { for (j = 0; j < COEF_BANDS; ++j) { for (k = 0; k < PREV_COEF_CONTEXTS; ++k) { - if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0))) + if (k >= 3 && j == 0) continue; vp9_tree_probs_from_distribution(MAX_ENTROPY_TOKENS, vp9_coef_encodings, vp9_coef_tree, @@ -1216,7 +1216,8 @@ static void build_coeff_contexts(VP9_COMP *cpi) { #ifdef ENTROPY_STATS cpi, hybrid_context_counters_4x4, #endif - cpi->frame_hybrid_branch_ct_4x4, BLOCK_TYPES_4X4); + cpi->frame_hybrid_branch_ct_4x4, + BLOCK_TYPES_4X4_HYBRID); build_tree_distribution(cpi->frame_coef_probs_8x8, cpi->coef_counts_8x8, #ifdef ENTROPY_STATS @@ -1228,7 +1229,8 @@ static void build_coeff_contexts(VP9_COMP *cpi) { #ifdef ENTROPY_STATS cpi, hybrid_context_counters_8x8, #endif - cpi->frame_hybrid_branch_ct_8x8, BLOCK_TYPES_8X8); + cpi->frame_hybrid_branch_ct_8x8, + BLOCK_TYPES_8X8_HYBRID); build_tree_distribution(cpi->frame_coef_probs_16x16, cpi->coef_counts_16x16, #ifdef ENTROPY_STATS @@ -1240,7 +1242,8 @@ static void build_coeff_contexts(VP9_COMP *cpi) { #ifdef ENTROPY_STATS cpi, hybrid_context_counters_16x16, #endif - cpi->frame_hybrid_branch_ct_16x16, BLOCK_TYPES_16X16); + cpi->frame_hybrid_branch_ct_16x16, + BLOCK_TYPES_16X16_HYBRID); build_tree_distribution(cpi->frame_coef_probs_32x32, cpi->coef_counts_32x32, #ifdef ENTROPY_STATS @@ -1266,7 +1269,7 @@ static void update_coef_probs_common(vp9_writer* const bc, /* dry run to see if there is any udpate at all needed */ savings = 0; for (i = 0; i < block_types; ++i) { - for (j = !i; j < COEF_BANDS; ++j) { + for (j = 0; j < COEF_BANDS; ++j) { int prev_coef_savings[ENTROPY_NODES] = {0}; for (k = 0; k < PREV_COEF_CONTEXTS; ++k) { for (t = 0; t < ENTROPY_NODES; ++t) { @@ -1275,7 +1278,7 @@ static void update_coef_probs_common(vp9_writer* const bc, const vp9_prob upd = COEF_UPDATE_PROB; int s = prev_coef_savings[t]; int u = 0; - if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0))) + if (k >= 3 && j == 0) continue; #if defined(SEARCH_NEWP) s = prob_diff_update_savings_search( @@ -1310,7 +1313,7 @@ static void update_coef_probs_common(vp9_writer* const bc, } else { vp9_write_bit(bc, 1); for (i = 0; i < block_types; ++i) { - for (j = !i; j < COEF_BANDS; ++j) { + for (j = 0; j < COEF_BANDS; ++j) { int prev_coef_savings[ENTROPY_NODES] = {0}; for (k = 0; k < PREV_COEF_CONTEXTS; ++k) { // calc probs and branch cts for this frame only @@ -1320,7 +1323,7 @@ static void update_coef_probs_common(vp9_writer* const bc, const vp9_prob upd = COEF_UPDATE_PROB; int s = prev_coef_savings[t]; int u = 0; - if (k >= 3 && ((i == 0 && j == 1) || (i > 0 && j == 0))) + if (k >= 3 && j == 0) continue; #if defined(SEARCH_NEWP) @@ -1377,7 +1380,7 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) { cpi->frame_hybrid_coef_probs_4x4, cpi->common.fc.hybrid_coef_probs_4x4, cpi->frame_hybrid_branch_ct_4x4, - BLOCK_TYPES_4X4); + BLOCK_TYPES_4X4_HYBRID); /* do not do this if not even allowed */ if (cpi->common.txfm_mode != ONLY_4X4) { @@ -1399,7 +1402,7 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) { cpi->frame_hybrid_coef_probs_8x8, cpi->common.fc.hybrid_coef_probs_8x8, cpi->frame_hybrid_branch_ct_8x8, - BLOCK_TYPES_8X8); + BLOCK_TYPES_8X8_HYBRID); } if (cpi->common.txfm_mode > ALLOW_8X8) { @@ -1420,7 +1423,7 @@ static void update_coef_probs(VP9_COMP* const cpi, vp9_writer* const bc) { cpi->frame_hybrid_coef_probs_16x16, cpi->common.fc.hybrid_coef_probs_16x16, cpi->frame_hybrid_branch_ct_16x16, - BLOCK_TYPES_16X16); + BLOCK_TYPES_16X16_HYBRID); } if (cpi->common.txfm_mode > ALLOW_16X16) { @@ -2153,17 +2156,22 @@ void print_tree_update_probs() { print_tree_update_for_type(f, tree_update_hist_4x4, BLOCK_TYPES_4X4, "vp9_coef_update_probs_4x4[BLOCK_TYPES_4X4]"); - print_tree_update_for_type(f, hybrid_tree_update_hist_4x4, BLOCK_TYPES_4X4, - "vp9_coef_update_probs_4x4[BLOCK_TYPES_4X4]"); + print_tree_update_for_type(f, hybrid_tree_update_hist_4x4, + BLOCK_TYPES_4X4_HYBRID, + "vp9_coef_update_probs_4x4" + "[BLOCK_TYPES_4X4_HYBRID]"); print_tree_update_for_type(f, tree_update_hist_8x8, BLOCK_TYPES_8X8, "vp9_coef_update_probs_8x8[BLOCK_TYPES_8X8]"); - print_tree_update_for_type(f, hybrid_tree_update_hist_8x8, BLOCK_TYPES_8X8, - "vp9_coef_update_probs_8x8[BLOCK_TYPES_8X8]"); + print_tree_update_for_type(f, hybrid_tree_update_hist_8x8, + BLOCK_TYPES_8X8_HYBRID, + "vp9_coef_update_probs_8x8" + "[BLOCK_TYPES_8X8_HYBRID]"); print_tree_update_for_type(f, tree_update_hist_16x16, BLOCK_TYPES_16X16, "vp9_coef_update_probs_16x16[BLOCK_TYPES_16X16]"); print_tree_update_for_type(f, hybrid_tree_update_hist_16x16, - BLOCK_TYPES_16X16, - "vp9_coef_update_probs_16x16[BLOCK_TYPES_16X16]"); + BLOCK_TYPES_16X16_HYBRID, + "vp9_coef_update_probs_16x16" + "[BLOCK_TYPES_16X16_HYBRID]"); print_tree_update_for_type(f, tree_update_hist_32x32, BLOCK_TYPES_32X32, "vp9_coef_update_probs_32x32[BLOCK_TYPES_32X32]"); diff --git a/vp9/encoder/vp9_block.h b/vp9/encoder/vp9_block.h index 555a5ae99..6c4645561 100644 --- a/vp9/encoder/vp9_block.h +++ b/vp9/encoder/vp9_block.h @@ -157,7 +157,7 @@ typedef struct macroblock { unsigned char *active_ptr; vp9_coeff_count token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4]; - vp9_coeff_count hybrid_token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4]; + vp9_coeff_count hybrid_token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4_HYBRID]; int optimize; diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index 11d599e37..efe95c911 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -288,13 +288,10 @@ struct vp9_token_state { // TODO: experiments to find optimal multiple numbers #define Y1_RD_MULT 4 #define UV_RD_MULT 2 -#define Y2_RD_MULT 4 static const int plane_rd_mult[4] = { Y1_RD_MULT, - Y2_RD_MULT, UV_RD_MULT, - Y1_RD_MULT }; #define UPDATE_RD_COST()\ diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 2a24112b3..813003388 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -87,11 +87,11 @@ typedef struct { signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS]; vp9_coeff_probs coef_probs_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]; + vp9_coeff_probs hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_probs coef_probs_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]; + vp9_coeff_probs hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_probs coef_probs_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]; + vp9_coeff_probs hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_probs coef_probs_32x32[BLOCK_TYPES_32X32]; vp9_prob sb_ymode_prob[VP9_I32X32_MODES - 1]; @@ -467,23 +467,23 @@ typedef struct VP9_COMP { vp9_coeff_count coef_counts_4x4[BLOCK_TYPES_4X4]; vp9_coeff_probs frame_coef_probs_4x4[BLOCK_TYPES_4X4]; vp9_coeff_stats frame_branch_ct_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_probs frame_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]; - vp9_coeff_stats frame_hybrid_branch_ct_4x4[BLOCK_TYPES_4X4]; + vp9_coeff_count hybrid_coef_counts_4x4[BLOCK_TYPES_4X4_HYBRID]; + vp9_coeff_probs frame_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID]; + vp9_coeff_stats frame_hybrid_branch_ct_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_count coef_counts_8x8[BLOCK_TYPES_8X8]; vp9_coeff_probs frame_coef_probs_8x8[BLOCK_TYPES_8X8]; vp9_coeff_stats frame_branch_ct_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_probs frame_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]; - vp9_coeff_stats frame_hybrid_branch_ct_8x8[BLOCK_TYPES_8X8]; + vp9_coeff_count hybrid_coef_counts_8x8[BLOCK_TYPES_8X8_HYBRID]; + vp9_coeff_probs frame_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID]; + vp9_coeff_stats frame_hybrid_branch_ct_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_count coef_counts_16x16[BLOCK_TYPES_16X16]; vp9_coeff_probs frame_coef_probs_16x16[BLOCK_TYPES_16X16]; vp9_coeff_stats frame_branch_ct_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_probs frame_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]; - vp9_coeff_stats frame_hybrid_branch_ct_16x16[BLOCK_TYPES_16X16]; + vp9_coeff_count hybrid_coef_counts_16x16[BLOCK_TYPES_16X16_HYBRID]; + vp9_coeff_probs frame_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID]; + vp9_coeff_stats frame_hybrid_branch_ct_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_count coef_counts_32x32[BLOCK_TYPES_32X32]; vp9_coeff_probs frame_coef_probs_32x32[BLOCK_TYPES_32X32]; diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 1c4dd5834..400190c41 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -155,7 +155,7 @@ static void fill_token_costs(vp9_coeff_count *c, for (i = 0; i < block_type_counts; i++) for (j = 0; j < COEF_BANDS; j++) for (k = 0; k < PREV_COEF_CONTEXTS; k++) { - if (k == 0 && ((j > 0 && i > 0) || (j > 1 && i == 0))) + if (k == 0 && j > 0) vp9_cost_tokens_skip((int *)(c[i][j][k]), p[i][j][k], vp9_coef_tree); @@ -280,17 +280,20 @@ void vp9_initialize_rd_consts(VP9_COMP *cpi, int QIndex) { fill_token_costs(cpi->mb.token_costs[TX_4X4], cpi->common.fc.coef_probs_4x4, BLOCK_TYPES_4X4); fill_token_costs(cpi->mb.hybrid_token_costs[TX_4X4], - cpi->common.fc.hybrid_coef_probs_4x4, BLOCK_TYPES_4X4); + cpi->common.fc.hybrid_coef_probs_4x4, + BLOCK_TYPES_4X4_HYBRID); fill_token_costs(cpi->mb.token_costs[TX_8X8], cpi->common.fc.coef_probs_8x8, BLOCK_TYPES_8X8); fill_token_costs(cpi->mb.hybrid_token_costs[TX_8X8], - cpi->common.fc.hybrid_coef_probs_8x8, BLOCK_TYPES_8X8); + cpi->common.fc.hybrid_coef_probs_8x8, + BLOCK_TYPES_8X8_HYBRID); fill_token_costs(cpi->mb.token_costs[TX_16X16], cpi->common.fc.coef_probs_16x16, BLOCK_TYPES_16X16); fill_token_costs(cpi->mb.hybrid_token_costs[TX_16X16], - cpi->common.fc.hybrid_coef_probs_16x16, BLOCK_TYPES_16X16); + cpi->common.fc.hybrid_coef_probs_16x16, + BLOCK_TYPES_16X16_HYBRID); fill_token_costs(cpi->mb.token_costs[TX_32X32], cpi->common.fc.coef_probs_32x32, BLOCK_TYPES_32X32); diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c index 09ee9f923..17eae463f 100644 --- a/vp9/encoder/vp9_tokenize.c +++ b/vp9/encoder/vp9_tokenize.c @@ -26,19 +26,19 @@ #ifdef ENTROPY_STATS vp9_coeff_accum context_counters_4x4[BLOCK_TYPES_4X4]; -vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4]; +vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4_HYBRID]; vp9_coeff_accum context_counters_8x8[BLOCK_TYPES_8X8]; -vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8]; +vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8_HYBRID]; vp9_coeff_accum context_counters_16x16[BLOCK_TYPES_16X16]; -vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16]; +vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16_HYBRID]; vp9_coeff_accum context_counters_32x32[BLOCK_TYPES_32X32]; extern vp9_coeff_stats tree_update_hist_4x4[BLOCK_TYPES_4X4]; -extern vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4]; +extern vp9_coeff_stats hybrid_tree_update_hist_4x4[BLOCK_TYPES_4X4_HYBRID]; extern vp9_coeff_stats tree_update_hist_8x8[BLOCK_TYPES_8X8]; -extern vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8]; +extern vp9_coeff_stats hybrid_tree_update_hist_8x8[BLOCK_TYPES_8X8_HYBRID]; extern vp9_coeff_stats tree_update_hist_16x16[BLOCK_TYPES_16X16]; -extern vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16]; +extern vp9_coeff_stats hybrid_tree_update_hist_16x16[BLOCK_TYPES_16X16_HYBRID]; extern vp9_coeff_stats tree_update_hist_32x32[BLOCK_TYPES_32X32]; #endif /* ENTROPY_STATS */ @@ -605,32 +605,33 @@ void print_context_counters() { /* print counts */ print_counter(f, context_counters_4x4, BLOCK_TYPES_4X4, "vp9_default_coef_counts_4x4[BLOCK_TYPES_4X4]"); - print_counter(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4, - "vp9_default_hybrid_coef_counts_4x4[BLOCK_TYPES_4X4]"); + print_counter(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4_HYBRID, + "vp9_default_hybrid_coef_counts_4x4[BLOCK_TYPES_4X4_HYBRID]"); print_counter(f, context_counters_8x8, BLOCK_TYPES_8X8, "vp9_default_coef_counts_8x8[BLOCK_TYPES_8X8]"); - print_counter(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8, - "vp9_default_hybrid_coef_counts_8x8[BLOCK_TYPES_8X8]"); + print_counter(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8_HYBRID, + "vp9_default_hybrid_coef_counts_8x8[BLOCK_TYPES_8X8_HYBRID]"); print_counter(f, context_counters_16x16, BLOCK_TYPES_16X16, "vp9_default_coef_counts_16x16[BLOCK_TYPES_16X16]"); - print_counter(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16, - "vp9_default_hybrid_coef_counts_16x16[BLOCK_TYPES_16X16]"); + print_counter(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16_HYBRID, + "vp9_default_hybrid_coef_counts_16x16" + "[BLOCK_TYPES_16X16_HYBRID]"); print_counter(f, context_counters_32x32, BLOCK_TYPES_32X32, "vp9_default_coef_counts_32x32[BLOCK_TYPES_32X32]"); /* print coefficient probabilities */ print_probs(f, context_counters_4x4, BLOCK_TYPES_4X4, "default_coef_probs_4x4[BLOCK_TYPES_4X4]"); - print_probs(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4, - "default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4]"); + print_probs(f, hybrid_context_counters_4x4, BLOCK_TYPES_4X4_HYBRID, + "default_hybrid_coef_probs_4x4[BLOCK_TYPES_4X4_HYBRID]"); print_probs(f, context_counters_8x8, BLOCK_TYPES_8X8, "default_coef_probs_8x8[BLOCK_TYPES_8X8]"); - print_probs(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8, - "default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8]"); + print_probs(f, hybrid_context_counters_8x8, BLOCK_TYPES_8X8_HYBRID, + "default_hybrid_coef_probs_8x8[BLOCK_TYPES_8X8_HYBRID]"); print_probs(f, context_counters_16x16, BLOCK_TYPES_16X16, "default_coef_probs_16x16[BLOCK_TYPES_16X16]"); - print_probs(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16, - "default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16]"); + print_probs(f, hybrid_context_counters_16x16, BLOCK_TYPES_16X16_HYBRID, + "default_hybrid_coef_probs_16x16[BLOCK_TYPES_16X16_HYBRID]"); print_probs(f, context_counters_32x32, BLOCK_TYPES_32X32, "default_coef_probs_32x32[BLOCK_TYPES_32X32]"); diff --git a/vp9/encoder/vp9_tokenize.h b/vp9/encoder/vp9_tokenize.h index c1a4c0520..01aa7fb79 100644 --- a/vp9/encoder/vp9_tokenize.h +++ b/vp9/encoder/vp9_tokenize.h @@ -61,9 +61,9 @@ extern vp9_coeff_accum context_counters_8x8[BLOCK_TYPES_8X8]; extern vp9_coeff_accum context_counters_16x16[BLOCK_TYPES_16X16]; extern vp9_coeff_accum context_counters_32x32[BLOCK_TYPES_32X32]; -extern vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4]; -extern vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8]; -extern vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16]; +extern vp9_coeff_accum hybrid_context_counters_4x4[BLOCK_TYPES_4X4_HYBRID]; +extern vp9_coeff_accum hybrid_context_counters_8x8[BLOCK_TYPES_8X8_HYBRID]; +extern vp9_coeff_accum hybrid_context_counters_16x16[BLOCK_TYPES_16X16_HYBRID]; #endif extern const int *vp9_dct_value_cost_ptr;