summaryrefslogtreecommitdiff
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-12-17 19:39:56 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-12-17 19:39:56 +0000
commit26bc319c1d358f32587a9938db0a4a97d26206b7 (patch)
treeb21903bf76739ecde0224ee4559eb1996aad56f2 /libavcodec/rv34.c
parentf610fc81c16c410df40744208a8818b05fbbce9b (diff)
Generate correct deblock pattern for RV30
Originally committed as revision 16191 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 6cf5869ab1..feffa343ad 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1109,7 +1109,15 @@ static int rv34_set_deblock_coef(RV34DecContext *r)
hmvmask &= ~0x000F;
if(!s->mb_x)
vmvmask &= ~0x1111;
- return hmvmask | vmvmask; //XXX: should be stored separately for RV3
+ if(r->rv30){ //RV30 marks both subblocks on the edge for filtering
+ vmvmask |= (vmvmask & 0x4444) >> 1;
+ hmvmask |= (hmvmask & 0x0F00) >> 4;
+ if(s->mb_x)
+ r->deblock_coefs[s->mb_x - 1 + s->mb_y*s->mb_stride] |= (vmvmask & 0x1111) << 3;
+ if(!s->first_slice_line)
+ r->deblock_coefs[s->mb_x + (s->mb_y - 1)*s->mb_stride] |= (hmvmask & 0xF) << 12;
+ }
+ return hmvmask | vmvmask;
}
static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types)