changeset 9881:c69559e9f6c3 libavcodec

Edge emulation should be used in B-frame MC in mspel mode with mv_x < 1 or mv_y < 1.
author kostya
date Tue, 23 Jun 2009 07:41:38 +0000
parents e934c5f8f4a9
children 7b58b1410f48
files vc1dec.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vc1dec.c	Mon Jun 22 22:22:40 2009 +0000
+++ b/vc1dec.c	Tue Jun 23 07:41:38 2009 +0000
@@ -860,8 +860,8 @@
     }
 
     if(v->rangeredfrm
-       || (unsigned)src_x > s->h_edge_pos - (mx&3) - 16 - s->mspel*3
-       || (unsigned)src_y > s->v_edge_pos - (my&3) - 16 - s->mspel*3){
+       || (unsigned)(src_x - s->mspel) > s->h_edge_pos - (mx&3) - 16 - s->mspel*3
+       || (unsigned)(src_y - s->mspel) > s->v_edge_pos - (my&3) - 16 - s->mspel*3){
         uint8_t *uvbuf= s->edge_emu_buffer + 19 * s->linesize;
 
         srcY -= s->mspel * (1 + s->linesize);