Mercurial > libavcodec.hg
comparison rv34.c @ 8181:d8f516ca0002 libavcodec
33l Fix applying residue condition in RV30/40 decoder
author | kostya |
---|---|
date | Thu, 20 Nov 2008 14:07:37 +0000 |
parents | f4a291734ad7 |
children | 466100c8e27b |
comparison
equal
deleted
inserted
replaced
8180:f4a291734ad7 | 8181:d8f516ca0002 |
---|---|
1044 */ | 1044 */ |
1045 /** | 1045 /** |
1046 * mask for retrieving all bits in coded block pattern | 1046 * mask for retrieving all bits in coded block pattern |
1047 * corresponding to one 8x8 block | 1047 * corresponding to one 8x8 block |
1048 */ | 1048 */ |
1049 #define LUMA_CBP_BLOCK_MASK 0x303 | 1049 #define LUMA_CBP_BLOCK_MASK 0x33 |
1050 | 1050 |
1051 #define U_CBP_MASK 0x0F0000 | 1051 #define U_CBP_MASK 0x0F0000 |
1052 #define V_CBP_MASK 0xF00000 | 1052 #define V_CBP_MASK 0xF00000 |
1053 | 1053 |
1054 | 1054 |
1057 static const int shifts[4] = { 0, 2, 8, 10 }; | 1057 static const int shifts[4] = { 0, 2, 8, 10 }; |
1058 MpegEncContext *s = &r->s; | 1058 MpegEncContext *s = &r->s; |
1059 int i; | 1059 int i; |
1060 | 1060 |
1061 for(i = 0; i < 4; i++) | 1061 for(i = 0; i < 4; i++) |
1062 if(cbp & (LUMA_CBP_BLOCK_MASK << shifts[i])) | 1062 if((cbp & (LUMA_CBP_BLOCK_MASK << shifts[i])) || r->block_type == RV34_MB_P_MIX16x16) |
1063 s->dsp.add_pixels_clamped(s->block[i], s->dest[0] + (i & 1)*8 + (i&2)*4*s->linesize, s->linesize); | 1063 s->dsp.add_pixels_clamped(s->block[i], s->dest[0] + (i & 1)*8 + (i&2)*4*s->linesize, s->linesize); |
1064 if(cbp & U_CBP_MASK) | 1064 if(cbp & U_CBP_MASK) |
1065 s->dsp.add_pixels_clamped(s->block[4], s->dest[1], s->uvlinesize); | 1065 s->dsp.add_pixels_clamped(s->block[4], s->dest[1], s->uvlinesize); |
1066 if(cbp & V_CBP_MASK) | 1066 if(cbp & V_CBP_MASK) |
1067 s->dsp.add_pixels_clamped(s->block[5], s->dest[2], s->uvlinesize); | 1067 s->dsp.add_pixels_clamped(s->block[5], s->dest[2], s->uvlinesize); |