[FFmpeg-devel] [PATCH] vc1dec: C need to be cleared if not valid

Sebastian Sandberg sebastiand.sandberg at gmail.com
Tue Jan 29 00:25:51 CET 2013


otherwise it will be wrong on the line with mid_pred
---
 libavcodec/vc1dec.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e056ffb..9c0c105 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1720,8 +1720,10 @@ static inline void vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
                                 C[0] = (1 + C[0] + s->current_picture.f.motion_val[0][s->block_index[1] - 2 * wrap - 2][0]) >> 1;
                                 C[1] = (1 + C[1] + s->current_picture.f.motion_val[0][s->block_index[1] - 2 * wrap - 2][1]) >> 1;
                             }
-                        } else
+                        } else {
                             c_valid = 0;
+                            C[0] = C[1] = 0;
+                        }
                     }
                 }
             }
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list