X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fffv1dec_template.c;h=0b1d176ba12a47c6b8fb7c0e29275f55db60edc3;hb=bdd57e2a371f70ee75f70bfde5a9a162c76b48ba;hp=25032feda0bdbad2cfcd4d578c6e96c5685f9601;hpb=1c9ac700dd141e545538a824f5a8cb81bb0a375d;p=ffmpeg diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c index 25032feda0b..0b1d176ba12 100644 --- a/libavcodec/ffv1dec_template.c +++ b/libavcodec/ffv1dec_template.c @@ -86,6 +86,19 @@ static av_always_inline int RENAME(decode_line)(FFV1Context *s, int w, run_mode = 2; } } + if (sample[1][x - 1] == sample[0][x - 1]) { + while (run_count > 1 && w-x > 1) { + sample[1][x] = sample[0][x]; + x++; + run_count--; + } + } else { + while (run_count > 1 && w-x > 1) { + sample[1][x] = RENAME(predict)(sample[1] + x, sample[0] + x); + x++; + run_count--; + } + } run_count--; if (run_count < 0) { run_mode = 0;