avcodec/cavs: improve conformance with rm52j reference decoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Yao Wang 2014-06-28 18:45:31 +02:00 committed by Michael Niedermayer
parent f9f8491ddf
commit 5464916677
2 changed files with 189 additions and 179 deletions

View File

@ -73,15 +73,16 @@ static inline int get_bs(cavs_vector *mvP, cavs_vector *mvQ, int b)
{
if ((mvP->ref == REF_INTRA) || (mvQ->ref == REF_INTRA))
return 2;
if ((abs(mvP->x - mvQ->x) >= 4) || (abs(mvP->y - mvQ->y) >= 4))
if((abs(mvP->x - mvQ->x) >= 4) ||
(abs(mvP->y - mvQ->y) >= 4) ||
(mvP->ref != mvQ->ref))
return 1;
if (b) {
mvP += MV_BWD_OFFS;
mvQ += MV_BWD_OFFS;
if ((abs(mvP->x - mvQ->x) >= 4) || (abs(mvP->y - mvQ->y) >= 4))
return 1;
} else {
if (mvP->ref != mvQ->ref)
if((abs(mvP->x - mvQ->x) >= 4) ||
(abs(mvP->y - mvQ->y) >= 4) ||
(mvP->ref != mvQ->ref))
return 1;
}
return 0;
@ -147,6 +148,8 @@ void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type)
qp_avg = (h->qp + h->left_qp + 1) >> 1;
SET_PARAMS;
h->cdsp.cavs_filter_lv(h->cy, h->l_stride, alpha, beta, tc, bs[0], bs[1]);
qp_avg = (ff_cavs_chroma_qp[h->qp] + ff_cavs_chroma_qp[h->left_qp] + 1) >> 1;
SET_PARAMS;
h->cdsp.cavs_filter_cv(h->cu, h->c_stride, alpha, beta, tc, bs[0], bs[1]);
h->cdsp.cavs_filter_cv(h->cv, h->c_stride, alpha, beta, tc, bs[0], bs[1]);
}
@ -159,6 +162,8 @@ void ff_cavs_filter(AVSContext *h, enum cavs_mb mb_type)
qp_avg = (h->qp + h->top_qp[h->mbx] + 1) >> 1;
SET_PARAMS;
h->cdsp.cavs_filter_lh(h->cy, h->l_stride, alpha, beta, tc, bs[4], bs[5]);
qp_avg = (ff_cavs_chroma_qp[h->qp] + ff_cavs_chroma_qp[h->top_qp[h->mbx]] + 1) >> 1;
SET_PARAMS;
h->cdsp.cavs_filter_ch(h->cu, h->c_stride, alpha, beta, tc, bs[4], bs[5]);
h->cdsp.cavs_filter_ch(h->cv, h->c_stride, alpha, beta, tc, bs[4], bs[5]);
}
@ -232,9 +237,14 @@ void ff_cavs_load_intra_pred_chroma(AVSContext *h)
/* extend borders by one pixel */
h->left_border_u[9] = h->left_border_u[8];
h->left_border_v[9] = h->left_border_v[8];
h->top_border_u[h->mbx * 10 + 9] = h->top_border_u[h->mbx * 10 + 8];
h->top_border_v[h->mbx * 10 + 9] = h->top_border_v[h->mbx * 10 + 8];
if (h->mbx && h->mby) {
if(h->flags & C_AVAIL) {
h->top_border_u[h->mbx*10 + 9] = h->top_border_u[h->mbx*10 + 11];
h->top_border_v[h->mbx*10 + 9] = h->top_border_v[h->mbx*10 + 11];
} else {
h->top_border_u[h->mbx * 10 + 9] = h->top_border_u[h->mbx * 10 + 8];
h->top_border_v[h->mbx * 10 + 9] = h->top_border_v[h->mbx * 10 + 8];
}
if((h->flags & A_AVAIL) && (h->flags & B_AVAIL)) {
h->top_border_u[h->mbx * 10] = h->left_border_u[0] = h->topleft_border_u;
h->top_border_v[h->mbx * 10] = h->left_border_v[0] = h->topleft_border_v;
} else {

View File

@ -1,172 +1,172 @@
#tb 0: 1/25
0, 0, 0, 1, 622080, 0x76183b91
0, 1, 1, 1, 622080, 0x2ca5e808
0, 2, 2, 1, 622080, 0xc503eda4
0, 3, 3, 1, 622080, 0xa0dbf06c
0, 4, 4, 1, 622080, 0xf4363cfa
0, 5, 5, 1, 622080, 0xaa7dd9b8
0, 6, 6, 1, 622080, 0x3ab6223b
0, 7, 7, 1, 622080, 0xe402644b
0, 8, 8, 1, 622080, 0xd0da3ade
0, 9, 9, 1, 622080, 0x0aff6151
0, 10, 10, 1, 622080, 0x02aea3d5
0, 11, 11, 1, 622080, 0x5d8eeccd
0, 12, 12, 1, 622080, 0x54384735
0, 13, 13, 1, 622080, 0x890d71c2
0, 14, 14, 1, 622080, 0xc60ae25b
0, 15, 15, 1, 622080, 0xe589e774
0, 16, 16, 1, 622080, 0x03471e74
0, 17, 17, 1, 622080, 0x4e22302c
0, 18, 18, 1, 622080, 0x00333583
0, 19, 19, 1, 622080, 0xd6eae7d9
0, 20, 20, 1, 622080, 0x72fe94f7
0, 21, 21, 1, 622080, 0x3ebbad1e
0, 22, 22, 1, 622080, 0x2fb1de4b
0, 23, 23, 1, 622080, 0x3bfea6d2
0, 24, 24, 1, 622080, 0x0fb551b2
0, 25, 25, 1, 622080, 0xb203284f
0, 26, 26, 1, 622080, 0xb3baac30
0, 27, 27, 1, 622080, 0x15f2c1c7
0, 28, 28, 1, 622080, 0xb2b530ce
0, 29, 29, 1, 622080, 0xbbaaf241
0, 30, 30, 1, 622080, 0x01bc9dfc
0, 31, 31, 1, 622080, 0x8a449a42
0, 32, 32, 1, 622080, 0xdc63d73f
0, 33, 33, 1, 622080, 0xf06bc231
0, 34, 34, 1, 622080, 0x19e04295
0, 35, 35, 1, 622080, 0x1e7d1acd
0, 36, 36, 1, 622080, 0x43878b48
0, 37, 37, 1, 622080, 0xcd94b702
0, 38, 38, 1, 622080, 0xd2706cf1
0, 39, 39, 1, 622080, 0x47d636f3
0, 40, 40, 1, 622080, 0x4a516acc
0, 41, 41, 1, 622080, 0x52b7d89a
0, 42, 42, 1, 622080, 0xc9ba03be
0, 43, 43, 1, 622080, 0x6d17785e
0, 44, 44, 1, 622080, 0x8264871b
0, 45, 45, 1, 622080, 0xd59c84c0
0, 46, 46, 1, 622080, 0x2b86d6cd
0, 47, 47, 1, 622080, 0x9c5a5f51
0, 48, 48, 1, 622080, 0x221f79ca
0, 49, 49, 1, 622080, 0x98edb3ec
0, 50, 50, 1, 622080, 0x9a31262c
0, 51, 51, 1, 622080, 0x18f48378
0, 52, 52, 1, 622080, 0x957c3d9c
0, 53, 53, 1, 622080, 0x9cc6866e
0, 54, 54, 1, 622080, 0x45613726
0, 55, 55, 1, 622080, 0x7a6c5e65
0, 56, 56, 1, 622080, 0x976d7a11
0, 57, 57, 1, 622080, 0x192aea08
0, 58, 58, 1, 622080, 0x8d4fc823
0, 59, 59, 1, 622080, 0x1f9c55d7
0, 60, 60, 1, 622080, 0xd4336d41
0, 61, 61, 1, 622080, 0x7aa650cd
0, 62, 62, 1, 622080, 0x8efaaeb1
0, 63, 63, 1, 622080, 0x3d8c3053
0, 64, 64, 1, 622080, 0x1e2b64b0
0, 65, 65, 1, 622080, 0x0436b1a7
0, 66, 66, 1, 622080, 0xc5120072
0, 67, 67, 1, 622080, 0x0203b245
0, 68, 68, 1, 622080, 0x9815582b
0, 69, 69, 1, 622080, 0x3c60c359
0, 70, 70, 1, 622080, 0x1a26b948
0, 71, 71, 1, 622080, 0x56079812
0, 72, 72, 1, 622080, 0x7b192a55
0, 73, 73, 1, 622080, 0x335632ab
0, 74, 74, 1, 622080, 0xd0c12eb8
0, 75, 75, 1, 622080, 0x93bf46cb
0, 76, 76, 1, 622080, 0xce67ce24
0, 77, 77, 1, 622080, 0xff95bb26
0, 78, 78, 1, 622080, 0x5e750705
0, 79, 79, 1, 622080, 0x45a35725
0, 80, 80, 1, 622080, 0xd8e93c39
0, 81, 81, 1, 622080, 0xa9f8db50
0, 82, 82, 1, 622080, 0xf90a862e
0, 83, 83, 1, 622080, 0x5e5a4216
0, 84, 84, 1, 622080, 0xaaf45ed6
0, 85, 85, 1, 622080, 0x1933cda5
0, 86, 86, 1, 622080, 0x7ff68d91
0, 87, 87, 1, 622080, 0x10038fe9
0, 88, 88, 1, 622080, 0x9b3425a6
0, 89, 89, 1, 622080, 0x8d2a141d
0, 90, 90, 1, 622080, 0x698a333e
0, 91, 91, 1, 622080, 0x334685d1
0, 92, 92, 1, 622080, 0x40317d40
0, 93, 93, 1, 622080, 0xd3c6f519
0, 94, 94, 1, 622080, 0xfc2210c2
0, 95, 95, 1, 622080, 0x3761df34
0, 96, 96, 1, 622080, 0xef25462a
0, 97, 97, 1, 622080, 0x0fd38121
0, 98, 98, 1, 622080, 0x184856a6
0, 99, 99, 1, 622080, 0xc57c9f12
0, 100, 100, 1, 622080, 0x39874291
0, 101, 101, 1, 622080, 0x7c13cec4
0, 102, 102, 1, 622080, 0xc4192a76
0, 103, 103, 1, 622080, 0x2af404e3
0, 104, 104, 1, 622080, 0x1ee18f41
0, 105, 105, 1, 622080, 0xfb4d9ee5
0, 106, 106, 1, 622080, 0x50aae4ff
0, 107, 107, 1, 622080, 0x030f91fe
0, 108, 108, 1, 622080, 0x3a3ee08c
0, 109, 109, 1, 622080, 0x50121423
0, 110, 110, 1, 622080, 0xda39e2d6
0, 111, 111, 1, 622080, 0x9e13ccd6
0, 112, 112, 1, 622080, 0xb72a22a7
0, 113, 113, 1, 622080, 0xb76904d5
0, 114, 114, 1, 622080, 0xcffa04a8
0, 115, 115, 1, 622080, 0x2984bf3f
0, 116, 116, 1, 622080, 0x274b5778
0, 117, 117, 1, 622080, 0xf059413a
0, 118, 118, 1, 622080, 0x969fae57
0, 119, 119, 1, 622080, 0x75c29097
0, 120, 120, 1, 622080, 0x2bf3b07d
0, 121, 121, 1, 622080, 0x9f43271d
0, 122, 122, 1, 622080, 0x67bf23f3
0, 123, 123, 1, 622080, 0xa8edcf33
0, 124, 124, 1, 622080, 0x17a0789e
0, 125, 125, 1, 622080, 0x14b67cc7
0, 126, 126, 1, 622080, 0x779215cd
0, 127, 127, 1, 622080, 0x8b460a21
0, 128, 128, 1, 622080, 0x0502ad7d
0, 129, 129, 1, 622080, 0x6860678f
0, 130, 130, 1, 622080, 0xe180469e
0, 131, 131, 1, 622080, 0x9a992835
0, 132, 132, 1, 622080, 0x2efafa33
0, 133, 133, 1, 622080, 0xe24e59b2
0, 134, 134, 1, 622080, 0xfb774d53
0, 135, 135, 1, 622080, 0x3de4ea81
0, 136, 136, 1, 622080, 0xaf9aa1d6
0, 137, 137, 1, 622080, 0xa0e3722f
0, 138, 138, 1, 622080, 0x81684492
0, 139, 139, 1, 622080, 0xa4e971fb
0, 140, 140, 1, 622080, 0x4a1903c8
0, 141, 141, 1, 622080, 0x26304e4a
0, 142, 142, 1, 622080, 0x867983a4
0, 143, 143, 1, 622080, 0x2e7e4d13
0, 144, 144, 1, 622080, 0x736f4682
0, 145, 145, 1, 622080, 0x426a95fa
0, 146, 146, 1, 622080, 0x2bc8850c
0, 147, 147, 1, 622080, 0x047e77ab
0, 148, 148, 1, 622080, 0x414ab77f
0, 149, 149, 1, 622080, 0x42681090
0, 150, 150, 1, 622080, 0x80744ccb
0, 151, 151, 1, 622080, 0x50e2ecc0
0, 152, 152, 1, 622080, 0x5c9fe70e
0, 153, 153, 1, 622080, 0x016461ee
0, 154, 154, 1, 622080, 0xd42f019a
0, 155, 155, 1, 622080, 0x8171bf41
0, 156, 156, 1, 622080, 0xf4d8ef7e
0, 157, 157, 1, 622080, 0xf2d513c8
0, 158, 158, 1, 622080, 0xb5b07704
0, 159, 159, 1, 622080, 0x2168a07a
0, 160, 160, 1, 622080, 0x840418f9
0, 161, 161, 1, 622080, 0xd36f1b7c
0, 162, 162, 1, 622080, 0x52532604
0, 163, 163, 1, 622080, 0x0856d6eb
0, 164, 164, 1, 622080, 0x21748734
0, 165, 165, 1, 622080, 0xbd315c05
0, 166, 166, 1, 622080, 0x1cea8103
0, 167, 167, 1, 622080, 0x71f6e3cb
0, 168, 168, 1, 622080, 0xb12d7aa7
0, 169, 169, 1, 622080, 0x54dd2acb
0, 170, 170, 1, 622080, 0xe8f93765
0, 0, 0, 1, 622080, 0x2276bc78
0, 1, 1, 1, 622080, 0xda1f698a
0, 2, 2, 1, 622080, 0xb9907023
0, 3, 3, 1, 622080, 0xc1c05e44
0, 4, 4, 1, 622080, 0x9366d0a7
0, 5, 5, 1, 622080, 0xbf92812d
0, 6, 6, 1, 622080, 0xd6b1cb3e
0, 7, 7, 1, 622080, 0x8be011f6
0, 8, 8, 1, 622080, 0xfde1f1de
0, 9, 9, 1, 622080, 0xabad03c3
0, 10, 10, 1, 622080, 0x74204d0a
0, 11, 11, 1, 622080, 0x220a9de9
0, 12, 12, 1, 622080, 0x913be934
0, 13, 13, 1, 622080, 0xab47295b
0, 14, 14, 1, 622080, 0x1938afc3
0, 15, 15, 1, 622080, 0x3a5fbe19
0, 16, 16, 1, 622080, 0x8c15f517
0, 17, 17, 1, 622080, 0x78410c15
0, 18, 18, 1, 622080, 0xe2861423
0, 19, 19, 1, 622080, 0x1dfac8aa
0, 20, 20, 1, 622080, 0x07b57615
0, 21, 21, 1, 622080, 0xe9558e77
0, 22, 22, 1, 622080, 0x917abfc8
0, 23, 23, 1, 622080, 0xe13d883b
0, 24, 24, 1, 622080, 0x8abb3304
0, 25, 25, 1, 622080, 0xc3f10a22
0, 26, 26, 1, 622080, 0x0ecf8c84
0, 27, 27, 1, 622080, 0xc3eba1dd
0, 28, 28, 1, 622080, 0x147d28fd
0, 29, 29, 1, 622080, 0xba0be99c
0, 30, 30, 1, 622080, 0xa6d99d9e
0, 31, 31, 1, 622080, 0xf173991c
0, 32, 32, 1, 622080, 0x0779d637
0, 33, 33, 1, 622080, 0xc1f8c139
0, 34, 34, 1, 622080, 0x7d3a42fc
0, 35, 35, 1, 622080, 0xcd621bc9
0, 36, 36, 1, 622080, 0x03cc8d02
0, 37, 37, 1, 622080, 0xac39b968
0, 38, 38, 1, 622080, 0xb7896f8c
0, 39, 39, 1, 622080, 0x57c4399d
0, 40, 40, 1, 622080, 0xcdc16dc1
0, 41, 41, 1, 622080, 0x9621db44
0, 42, 42, 1, 622080, 0xd59d064c
0, 43, 43, 1, 622080, 0x17a97e5d
0, 44, 44, 1, 622080, 0xde7789e8
0, 45, 45, 1, 622080, 0xf5708808
0, 46, 46, 1, 622080, 0x5b94d8fd
0, 47, 47, 1, 622080, 0x98bf5f8f
0, 48, 48, 1, 622080, 0x92107bf6
0, 49, 49, 1, 622080, 0x86a1b601
0, 50, 50, 1, 622080, 0x9d7f28c0
0, 51, 51, 1, 622080, 0x185a85bb
0, 52, 52, 1, 622080, 0x10a34015
0, 53, 53, 1, 622080, 0xea21890e
0, 54, 54, 1, 622080, 0x9a64399a
0, 55, 55, 1, 622080, 0x2bb460d2
0, 56, 56, 1, 622080, 0x73ce7c21
0, 57, 57, 1, 622080, 0x6289ebca
0, 58, 58, 1, 622080, 0x63a2c57e
0, 59, 59, 1, 622080, 0xaf5a5123
0, 60, 60, 1, 622080, 0xcc3062c7
0, 61, 61, 1, 622080, 0xac434664
0, 62, 62, 1, 622080, 0x7d5fa464
0, 63, 63, 1, 622080, 0xd2c4260a
0, 64, 64, 1, 622080, 0xe2f95a6c
0, 65, 65, 1, 622080, 0xe073a85a
0, 66, 66, 1, 622080, 0x34b9f64b
0, 67, 67, 1, 622080, 0x861da899
0, 68, 68, 1, 622080, 0x611d4ed5
0, 69, 69, 1, 622080, 0x3077b9de
0, 70, 70, 1, 622080, 0x4dedaf9f
0, 71, 71, 1, 622080, 0xe48d8e8b
0, 72, 72, 1, 622080, 0x5db2207a
0, 73, 73, 1, 622080, 0xf10128ab
0, 74, 74, 1, 622080, 0xd8fd249e
0, 75, 75, 1, 622080, 0x8f643cc2
0, 76, 76, 1, 622080, 0xfe1cc433
0, 77, 77, 1, 622080, 0x3af0b0f4
0, 78, 78, 1, 622080, 0x4a75fcc8
0, 79, 79, 1, 622080, 0x48874d71
0, 80, 80, 1, 622080, 0x3eb5324f
0, 81, 81, 1, 622080, 0xd7a7d172
0, 82, 82, 1, 622080, 0x32a17c2a
0, 83, 83, 1, 622080, 0xcf1137bb
0, 84, 84, 1, 622080, 0x622e54a2
0, 85, 85, 1, 622080, 0x0b73c385
0, 86, 86, 1, 622080, 0x47f082fb
0, 87, 87, 1, 622080, 0xe7e68540
0, 88, 88, 1, 622080, 0x77551fde
0, 89, 89, 1, 622080, 0xa70b0faf
0, 90, 90, 1, 622080, 0x05ee3436
0, 91, 91, 1, 622080, 0x2d2f86a9
0, 92, 92, 1, 622080, 0x78b07e1f
0, 93, 93, 1, 622080, 0x9714f5fc
0, 94, 94, 1, 622080, 0x521d118c
0, 95, 95, 1, 622080, 0x0102e005
0, 96, 96, 1, 622080, 0x20b1470c
0, 97, 97, 1, 622080, 0x828f8212
0, 98, 98, 1, 622080, 0x6fbb57b5
0, 99, 99, 1, 622080, 0x3b19a01f
0, 100, 100, 1, 622080, 0x114d43b2
0, 101, 101, 1, 622080, 0xeca5cfda
0, 102, 102, 1, 622080, 0x8ca12ba6
0, 103, 103, 1, 622080, 0xc11e061b
0, 104, 104, 1, 622080, 0xca6c905a
0, 105, 105, 1, 622080, 0x9c2ca00f
0, 106, 106, 1, 622080, 0x8641e615
0, 107, 107, 1, 622080, 0x90e1930f
0, 108, 108, 1, 622080, 0xa2eae188
0, 109, 109, 1, 622080, 0x9be41511
0, 110, 110, 1, 622080, 0x4268e3b3
0, 111, 111, 1, 622080, 0x69d0cdd5
0, 112, 112, 1, 622080, 0x437223c2
0, 113, 113, 1, 622080, 0x669205c5
0, 114, 114, 1, 622080, 0x85f1059b
0, 115, 115, 1, 622080, 0x1595c0a9
0, 116, 116, 1, 622080, 0xa7fa58c4
0, 117, 117, 1, 622080, 0x839c42c2
0, 118, 118, 1, 622080, 0xfadaa4c1
0, 119, 119, 1, 622080, 0xdbd08677
0, 120, 120, 1, 622080, 0xbc529d52
0, 121, 121, 1, 622080, 0x9c9013f3
0, 122, 122, 1, 622080, 0x7ea9112f
0, 123, 123, 1, 622080, 0xbb49bc2c
0, 124, 124, 1, 622080, 0x18c9656f
0, 125, 125, 1, 622080, 0x637f698e
0, 126, 126, 1, 622080, 0x4f66028c
0, 127, 127, 1, 622080, 0xaf1bf6eb
0, 128, 128, 1, 622080, 0x22c19a51
0, 129, 129, 1, 622080, 0x085d547a
0, 130, 130, 1, 622080, 0x11143435
0, 131, 131, 1, 622080, 0x3a6d15b9
0, 132, 132, 1, 622080, 0xd380e7cb
0, 133, 133, 1, 622080, 0xfd1247d5
0, 134, 134, 1, 622080, 0xd0de3b55
0, 135, 135, 1, 622080, 0xa876d813
0, 136, 136, 1, 622080, 0xdc8d8f66
0, 137, 137, 1, 622080, 0x3a8e5ffe
0, 138, 138, 1, 622080, 0x1a8a31da
0, 139, 139, 1, 622080, 0x7e975fba
0, 140, 140, 1, 622080, 0x242ef158
0, 141, 141, 1, 622080, 0xbcad3b81
0, 142, 142, 1, 622080, 0x5db0701f
0, 143, 143, 1, 622080, 0x4cbf3ab5
0, 144, 144, 1, 622080, 0xed603395
0, 145, 145, 1, 622080, 0xd098834b
0, 146, 146, 1, 622080, 0x92b972e0
0, 147, 147, 1, 622080, 0xdd4f64d5
0, 148, 148, 1, 622080, 0x60b1a37b
0, 149, 149, 1, 622080, 0xed6efdba
0, 150, 150, 1, 622080, 0xa30235f6
0, 151, 151, 1, 622080, 0x3419d5c3
0, 152, 152, 1, 622080, 0x1adbd052
0, 153, 153, 1, 622080, 0x88e14b04
0, 154, 154, 1, 622080, 0xca66eada
0, 155, 155, 1, 622080, 0xa6daa83c
0, 156, 156, 1, 622080, 0x7ea4d899
0, 157, 157, 1, 622080, 0x4929fce5
0, 158, 158, 1, 622080, 0x3c2d6009
0, 159, 159, 1, 622080, 0xa40e8949
0, 160, 160, 1, 622080, 0x624801ea
0, 161, 161, 1, 622080, 0x7877045d
0, 162, 162, 1, 622080, 0x8dae0e94
0, 163, 163, 1, 622080, 0xaed5bfd9
0, 164, 164, 1, 622080, 0x17ab701c
0, 165, 165, 1, 622080, 0x564f44e8
0, 166, 166, 1, 622080, 0x05496a5d
0, 167, 167, 1, 622080, 0xdcb4cee8
0, 168, 168, 1, 622080, 0xb41172e5
0, 169, 169, 1, 622080, 0x56c72478
0, 170, 170, 1, 622080, 0x84ff3af9