[FFmpeg-devel] [PATCH v2] swscale: Take the destination range into account for yuv->rgb->yuv conversions
Michael Niedermayer
michael at niedermayer.cc
Fri Feb 25 00:50:17 EET 2022
On Wed, Feb 23, 2022 at 09:45:53PM +0200, Martin Storsjö wrote:
> The range parameters need to be set up before calling
> sws_init_context (which selects which fastpaths can be used;
> this gets called by sws_getContext); solely passing them via
> sws_setColorspaceDetails isn't enough.
>
> This fixes producing full range YUV range output when doing
> YUV->YUV conversions between different YUV color spaces.
>
> Signed-off-by: Martin Storsjö <martin at martin.st>
> ---
> libswscale/utils.c | 11 ++++++++---
> tests/fate/libswscale.mak | 16 ++++++++++++++++
> tests/ref/fate/sws-yuv-colorspace | 6 ++++++
> tests/ref/fate/sws-yuv-range | 6 ++++++
> 4 files changed, 36 insertions(+), 3 deletions(-)
> create mode 100644 tests/ref/fate/sws-yuv-colorspace
> create mode 100644 tests/ref/fate/sws-yuv-range
LGTM
tested on mingw32/64 + wine / linux x86 32/64bit, arm/mips qemu
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220224/087e63e8/attachment.sig>
More information about the ffmpeg-devel
mailing list