changeset 4834:300b60dee58c libavcodec

Set C predictor to zero if unavailable (should fix B-frame border artifacts)
author kostya
date Tue, 10 Apr 2007 05:31:22 +0000
parents cad24e81a7b4
children ae2f8c9bc25d
files vc1.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vc1.c	Mon Apr 09 22:25:27 2007 +0000
+++ b/vc1.c	Tue Apr 10 05:31:22 2007 +0000
@@ -2318,6 +2318,7 @@
         off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
         B = s->current_picture.motion_val[0][xy - wrap*2 + off];
 
+        if(!s->mb_x) C[0] = C[1] = 0;
         if(!s->first_slice_line) { // predictor A is not out of bounds
             if(s->mb_width == 1) {
                 px = A[0];
@@ -2395,6 +2396,7 @@
         off = (s->mb_x == (s->mb_width - 1)) ? -2 : 2;
         B = s->current_picture.motion_val[1][xy - wrap*2 + off];
 
+        if(!s->mb_x) C[0] = C[1] = 0;
         if(!s->first_slice_line) { // predictor A is not out of bounds
             if(s->mb_width == 1) {
                 px = A[0];