[FFmpeg-devel] [PATCH 2/2] swscale/swscale_unscaled: avoid nv12 <-> nv21 bug
James Almer
jamrial at gmail.com
Sun Mar 16 17:02:19 EET 2025
On 3/16/2025 9:52 AM, Niklas Haas wrote:
> From: Niklas Haas <git at haasn.dev>
>
> This is not handled by the planar copy wrapper, so exclude it.
> ---
> libswscale/swscale_unscaled.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
> index 1df160daaa..4959963b18 100644
> --- a/libswscale/swscale_unscaled.c
> +++ b/libswscale/swscale_unscaled.c
> @@ -2660,7 +2660,8 @@ void ff_get_unscaled_swscale(SwsInternal *c)
> (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) &&
> c->chrDstHSubSample == c->chrSrcHSubSample &&
> c->chrDstVSubSample == c->chrSrcVSubSample &&
> - isSemiPlanarYUV(srcFormat) == isSemiPlanarYUV(dstFormat))))
> + isSemiPlanarYUV(srcFormat) == isSemiPlanarYUV(dstFormat) &&
> + isSwappedChroma(srcFormat) == isSwappedChroma(dstFormat))))
> {
> if (isPacked(c->opts.src_format))
> c->convert_unscaled = packedCopyWrapper;
LGTM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250316/816b92df/attachment.sig>
More information about the ffmpeg-devel
mailing list