mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 17:39:08 +00:00
tests/swscale: fix input pattern generation for very small sizes
This currently completely fails for images smaller than 12x12; and even in that case, the limited resolution makes these tests a bit useless. At the risk of triggering a lot of spurious SSIM regressions for very small sizes (due to insufficiently modelling the effects of low resolution on the expected noise), this patch allows us to at least *run* such tests. Incidentally, 8x8 is the smallest size that passes the SSIM check.
This commit is contained in:
@@ -793,8 +793,8 @@ static int init_ref(AVFrame *ref, const struct options *opts)
|
||||
if (!ctx || !rgb)
|
||||
goto error;
|
||||
|
||||
rgb->width = opts->w / 12;
|
||||
rgb->height = opts->h / 12;
|
||||
rgb->width = opts->w > 32 ? opts->w / 12 : opts->w;
|
||||
rgb->height = opts->h > 32 ? opts->h / 12 : opts->h;
|
||||
rgb->format = AV_PIX_FMT_RGBA;
|
||||
ret = av_frame_get_buffer(rgb, 32);
|
||||
if (ret < 0)
|
||||
|
||||
Reference in New Issue
Block a user