[FFmpeg-devel] [PATCH] swscale/x86/init: use isSemiPlanarYUV

Michael Niedermayer michael at niedermayer.cc
Thu Dec 23 15:28:36 EET 2021


On Thu, Dec 23, 2021 at 01:35:31AM -0600, rcombs wrote:
> Fixes P210/P410 cases introduced (and broken) in 88d804b7ffa20caab2e8e2809da974c41f7fd8fc
> ---
>  libswscale/x86/swscale.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
> index ffc7691c12..fdc93866a6 100644
> --- a/libswscale/x86/swscale.c
> +++ b/libswscale/x86/swscale.c
> @@ -417,14 +417,14 @@ av_cold void ff_sws_init_swscale_x86(SwsContext *c)
>  #define ASSIGN_VSCALEX_FUNC(vscalefn, opt, do_16_case, condition_8bit) \
>  switch(c->dstBpc){ \
>      case 16:                          do_16_case;                          break; \
> -    case 10: if (!isBE(c->dstFormat) && c->dstFormat != AV_PIX_FMT_P010LE) vscalefn = ff_yuv2planeX_10_ ## opt; break; \
> +    case 10: if (!isBE(c->dstFormat) && !isSemiPlanarYUV(c->dstFormat)) vscalefn = ff_yuv2planeX_10_ ## opt; break; \
>      case 9:  if (!isBE(c->dstFormat)) vscalefn = ff_yuv2planeX_9_  ## opt; break; \
>      case 8: if ((condition_8bit) && !c->use_mmx_vfilter) vscalefn = ff_yuv2planeX_8_  ## opt; break; \
>      }
>  #define ASSIGN_VSCALE_FUNC(vscalefn, opt1, opt2, opt2chk) \
>      switch(c->dstBpc){ \
>      case 16: if (!isBE(c->dstFormat))            vscalefn = ff_yuv2plane1_16_ ## opt1; break; \
> -    case 10: if (!isBE(c->dstFormat) && c->dstFormat != AV_PIX_FMT_P010LE && opt2chk) vscalefn = ff_yuv2plane1_10_ ## opt2; break; \
> +    case 10: if (!isBE(c->dstFormat) && !isSemiPlanarYUV(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_10_ ## opt2; break; \
>      case 9:  if (!isBE(c->dstFormat) && opt2chk) vscalefn = ff_yuv2plane1_9_  ## opt2;  break; \
>      case 8:                                      vscalefn = ff_yuv2plane1_8_  ## opt1;  break; \
>      default: av_assert0(c->dstBpc>8); \
> -- 

Still fails

@@ -25,10 +25,10 @@
 nv21                0fdeb2cdd56cf5a7147dc273456fa217
 nv24                193b9eadcc06ad5081609f76249b3e47
 nv42                1738ad3c31c6c16e17679f5b09ce4677
-p210le              10b53de63b086de93c076d1d40f9da42
-p216le              0bbf778e1b6101a3f650ce0454a357f2
-p410le              fcab6381bde9cd84b813925ff29be4d2
-p416le              6db094f8d7d27d7299bf9496ad66e2e0
+p210le              abc02945a9b9585f0914716e4787cefb
+p216le              1b43feb94b8a030c0c699aa0deff017b
+p410le              1f0294141ae1657d6c10c6a0d46a879f
+p416le              320e558b7ee8d598231ae0763ecca275
 rgb0                78d500c8361ab6423a4826a00268c908
 rgb24               17f9e2e0c609009acaf2175c42d4a2a5
 rgba                b157c90191463d34fb3ce77b36c96386

make: *** [fate-filter-pixfmts-pad] Error 1

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

Modern terrorism, a quick summary: Need oil, start war with country that
has oil, kill hundread thousand in war. Let country fall into chaos,
be surprised about raise of fundamantalists. Drop more bombs, kill more
people, be surprised about them taking revenge and drop even more bombs
and strip your own citizens of their rights and freedoms. to be continued
-------------- 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/20211223/dc8ff1c5/attachment.sig>


More information about the ffmpeg-devel mailing list