swscale/swscale_unscaled: use 8 line alignment for planarCopyWrapper with dithering

Dithering relies on a 8 line dithering table and the code always uses it from
the beginning. So in order to make dithering independent from height of the
slices used we must enforce a 8 line alignment.

Fixes issue #20071.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit b61e510e75)
This commit is contained in:
Marton Balint
2025-08-03 13:44:03 +02:00
parent c2184b65d2
commit 1b48158a23

View File

@@ -2267,10 +2267,13 @@ void ff_get_unscaled_swscale(SwsContext *c)
c->chrDstVSubSample == c->chrSrcVSubSample &&
!isSemiPlanarYUV(srcFormat) && !isSemiPlanarYUV(dstFormat))))
{
if (isPacked(c->srcFormat))
if (isPacked(c->srcFormat)) {
c->convert_unscaled = packedCopyWrapper;
else /* Planar YUV or gray */
} else { /* Planar YUV or gray */
c->convert_unscaled = planarCopyWrapper;
if (c->dither != SWS_DITHER_NONE)
c->dst_slice_align = 8 << c->chrDstVSubSample;
}
}
#if ARCH_PPC