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
b61e510e7500c27c7dee2b9c8cfa77689195f2a0)
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