[FFmpeg-devel] [PATCH v2 2/5] swscale/swscale_unscaled: add missing gbrap10 on ff_get_unscaled_swscale

Michael Niedermayer michael at niedermayer.cc
Tue Jan 29 00:14:38 EET 2019


On Mon, Jan 28, 2019 at 05:07:38PM +0700, Muhammad Faiz wrote:
> Fix inconsistent checksums between gbrap10be and gbrap10le
> on fate-filter-pixfmts.
> 
> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
> ---
>  libswscale/swscale_unscaled.c            | 3 +++
>  tests/ref/fate/filter-pixfmts-copy       | 2 +-
>  tests/ref/fate/filter-pixfmts-crop       | 2 +-
>  tests/ref/fate/filter-pixfmts-field      | 2 +-
>  tests/ref/fate/filter-pixfmts-fieldorder | 2 +-
>  tests/ref/fate/filter-pixfmts-hflip      | 2 +-
>  tests/ref/fate/filter-pixfmts-il         | 2 +-
>  tests/ref/fate/filter-pixfmts-null       | 2 +-
>  tests/ref/fate/filter-pixfmts-scale      | 2 +-
>  tests/ref/fate/filter-pixfmts-transpose  | 2 +-
>  tests/ref/fate/filter-pixfmts-vflip      | 2 +-
>  11 files changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
> index 058f2b94db..734a527e68 100644
> --- a/libswscale/swscale_unscaled.c
> +++ b/libswscale/swscale_unscaled.c
> @@ -1942,6 +1942,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
>           dstFormat == AV_PIX_FMT_GBRP12LE || dstFormat == AV_PIX_FMT_GBRP12BE ||
>           dstFormat == AV_PIX_FMT_GBRP14LE || dstFormat == AV_PIX_FMT_GBRP14BE ||
>           dstFormat == AV_PIX_FMT_GBRP16LE || dstFormat == AV_PIX_FMT_GBRP16BE ||
> +         dstFormat == AV_PIX_FMT_GBRAP10LE || dstFormat == AV_PIX_FMT_GBRAP10BE ||
>           dstFormat == AV_PIX_FMT_GBRAP12LE || dstFormat == AV_PIX_FMT_GBRAP12BE ||
>           dstFormat == AV_PIX_FMT_GBRAP16LE || dstFormat == AV_PIX_FMT_GBRAP16BE ))
>          c->swscale = Rgb16ToPlanarRgb16Wrapper;
> @@ -1951,6 +1952,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
>           srcFormat == AV_PIX_FMT_GBRP10LE || srcFormat == AV_PIX_FMT_GBRP10BE ||
>           srcFormat == AV_PIX_FMT_GBRP12LE || srcFormat == AV_PIX_FMT_GBRP12BE ||
>           srcFormat == AV_PIX_FMT_GBRP14LE || srcFormat == AV_PIX_FMT_GBRP14BE ||
> +         srcFormat == AV_PIX_FMT_GBRAP10LE || srcFormat == AV_PIX_FMT_GBRAP10BE ||
>           srcFormat == AV_PIX_FMT_GBRAP12LE || srcFormat == AV_PIX_FMT_GBRAP12BE ||
>           srcFormat == AV_PIX_FMT_GBRAP16LE || srcFormat == AV_PIX_FMT_GBRAP16BE) &&
>          (dstFormat == AV_PIX_FMT_RGB48LE  || dstFormat == AV_PIX_FMT_RGB48BE  ||
> @@ -1997,6 +1999,7 @@ void ff_get_unscaled_swscale(SwsContext *c)
>          IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRP12) ||
>          IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRP14) ||
>          IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRP16) ||
> +        IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRAP10) ||
>          IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRAP12) ||
>          IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GBRAP16) ||
>          IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGB444) ||

have you tested these ?
iam asking as the previous iteration had a bug which was missed in testing
also adding a test or tests to fate which would cover that codepath that was
missed could be a good idea

the change itself looks fine i think but i have not tested it beyond seeing
that it changes the output for some files

Thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The smallest minority on earth is the individual. Those who deny 
individual rights cannot claim to be defenders of minorities. - Ayn Rand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190128/90ffa93f/attachment.sig>


More information about the ffmpeg-devel mailing list