[FFmpeg-devel] [PATCH] swscale/x86/yuv2rgb: Fix build without SSSE3

James Darnley james.darnley at gmail.com
Sun Feb 23 14:38:10 EET 2020


On 2020-02-23 13:22, Michael Niedermayer wrote:
> From: Parker Ernest <@>
> 
> commit fc6a5883d6af8cae0e96af84dda0ad74b360a084 breaks build on
> x86_64 CPUs which do not have SSSE3, e.g. AMD Phenom-II
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libswscale/x86/yuv2rgb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libswscale/x86/yuv2rgb.c b/libswscale/x86/yuv2rgb.c
> index c12e88cbb5..4791e5b93a 100644
> --- a/libswscale/x86/yuv2rgb.c
> +++ b/libswscale/x86/yuv2rgb.c
> @@ -83,6 +83,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
>  #if HAVE_X86ASM
>      int cpu_flags = av_get_cpu_flags();
>  
> +#if HAVE_SSSE3
>      if (EXTERNAL_SSSE3(cpu_flags)) {
>          switch (c->dstFormat) {
>          case AV_PIX_FMT_RGB32:
> @@ -111,6 +112,7 @@ av_cold SwsFunc ff_yuv2rgb_init_x86(SwsContext *c)
>              return yuv420_rgb15_ssse3;
>          }
>      }
> +#endif
>  
>      if (EXTERNAL_MMXEXT(cpu_flags)) {
>          switch (c->dstFormat) {
> 

What?  Why doesn't the the EXTERNAL_SSSE3 macro stop the code from
entering that branch?  The #if would only stop the section from being
compiled with --disable-ssse3.  A normal build would still enter that
branch on that CPU.



More information about the ffmpeg-devel mailing list