[FFmpeg-devel] [PATCH] swscale/swscale-test: Code to test scaler with slices

Pedro Arthur bygrandao at gmail.com
Thu Jun 9 03:04:46 CEST 2016


Hi, I took the time to investigate it and I find a few bugs which I'm
attaching a patch for them.
Yet I'm not convinced that it is a definitive fix, since the output of
swscale-test differs in some cases when scaling the whole frame or in
slices.
Also there is a few fixes needed in this patch which took me a while to
figure out because I blindly trusted the patch was correct.

2016-06-05 9:27 GMT-03:00 Michael Niedermayer <michael at niedermayer.cc>:

> +        src_tmp[0] += srcStride[0] * i * STEP;
>
here it should be:
src_tmp[0] += srcStride[0] * i;

+        if (src_tmp[2]) {
> +            int step = STEP >> desc_src->log2_chroma_h;
>
+            src_tmp[1] += srcStride[1] * i * step;
> +            src_tmp[2] += srcStride[2] * i * step;
> +        }
> +        if (src_tmp[3])
> +            src_tmp[3] += srcStride[3] * i * STEP;
>
The same applies for the above code.

Regards,
Pedro.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-swscale-fix-crash-with-swscale-test-when-using-slice.patch
Type: text/x-patch
Size: 1392 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160608/b5378aef/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-swscale-fix-ring-buffer-size-when-scaling-slices-of-.patch
Type: text/x-patch
Size: 5821 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160608/b5378aef/attachment-0001.bin>


More information about the ffmpeg-devel mailing list