diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-04-10 05:31:22 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-04-10 05:31:22 +0000 |
commit | 44942d52b60ebe5e7331737ca608e0969055692e (patch) | |
tree | 40013dc1c76f6dc804d13450a338ce0426a33c83 /libavcodec | |
parent | c4a7b86100fb118d0fbee828091c1c300389efa7 (diff) | |
download | ffmpeg-streaming-44942d52b60ebe5e7331737ca608e0969055692e.zip ffmpeg-streaming-44942d52b60ebe5e7331737ca608e0969055692e.tar.gz |
Set C predictor to zero if unavailable (should fix B-frame border artifacts)
Originally committed as revision 8702 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 51f2a7c..77d6828 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -2318,6 +2318,7 @@ static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], int 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 @@ static inline void vc1_pred_b_mv(VC1Context *v, int dmv_x[2], int dmv_y[2], int 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]; |