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

Michael Niedermayer michaelni at gmx.at
Sun Feb 23 19:58:06 EET 2020


On Sun, Feb 23, 2020 at 05:03:36PM +0100, Carl Eugen Hoyos wrote:
> Am So., 23. Feb. 2020 um 13:30 Uhr schrieb Michael Niedermayer
> <michael at niedermayer.cc>:
> >
> > From: Parker Ernest <@>
> >
> > commit fc6a5883d6af8cae0e96af84dda0ad74b360a084 breaks build on
> > x86_64 CPUs which do not have SSSE3, e.g. AMD Phenom-II
> 
> Does the commit break build on specific CPUs or specific toolchains?

I dont know what the testcase was the author encountered, i just posted
this here as the author wanted me to post it for him.
but a simple
make distclean ; ./configure --disable-ssse3 && make -j32
replicates the build failure here (see below for the errors)

We do have the 
extern void RENAME(ff_yuv_420_rgb32)(x86_reg index, uint8_t *image, const uint8_t *pu_index,
                                     const uint8_t *pv_index, const uint64_t *pointer_c_dither,
                                     const uint8_t *py_2index);
...

under #if HAVE_SSSE3

so i think either that needs to be changed or the code using it needs to be
similarly protected.
the if(...)
is not good enough because it is not something failingh at linking stage but
already before because the compiler has no idea what the identifer even is.
(compared to knowing what it is but not having a implemenetation later, which
 works as disabled code and optimized out references dont fail to link)



libswscale/x86/yuv2rgb.c: In function ‘ff_yuv2rgb_init_x86’:
libswscale/x86/yuv2rgb.c:91:24: error: ‘yuva420_rgb32_ssse3’ undeclared (first use in this function); did you mean ‘yuva420_rgb32_mmx’?
                 return yuva420_rgb32_ssse3;
                        ^~~~~~~~~~~~~~~~~~~
                        yuva420_rgb32_mmx
libswscale/x86/yuv2rgb.c:91:24: note: each undeclared identifier is reported only once for each function it appears in
libswscale/x86/yuv2rgb.c:95:24: error: ‘yuv420_rgb32_ssse3’ undeclared (first use in this function); did you mean ‘yuva420_rgb32_ssse3’?
                 return yuv420_rgb32_ssse3;
                        ^~~~~~~~~~~~~~~~~~
                        yuva420_rgb32_ssse3
libswscale/x86/yuv2rgb.c:99:24: error: ‘yuva420_bgr32_ssse3’ undeclared (first use in this function); did you mean ‘yuva420_rgb32_ssse3’?
                 return yuva420_bgr32_ssse3;
                        ^~~~~~~~~~~~~~~~~~~
                        yuva420_rgb32_ssse3
libswscale/x86/yuv2rgb.c:103:24: error: ‘yuv420_bgr32_ssse3’ undeclared (first use in this function); did you mean ‘yuva420_bgr32_ssse3’?
                 return yuv420_bgr32_ssse3;
                        ^~~~~~~~~~~~~~~~~~
                        yuva420_bgr32_ssse3
libswscale/x86/yuv2rgb.c:105:20: error: ‘yuv420_rgb24_ssse3’ undeclared (first use in this function); did you mean ‘yuv420_rgb32_ssse3’?
             return yuv420_rgb24_ssse3;
                    ^~~~~~~~~~~~~~~~~~
                    yuv420_rgb32_ssse3
libswscale/x86/yuv2rgb.c:107:20: error: ‘yuv420_bgr24_ssse3’ undeclared (first use in this function); did you mean ‘yuv420_rgb24_ssse3’?
             return yuv420_bgr24_ssse3;
                    ^~~~~~~~~~~~~~~~~~
                    yuv420_rgb24_ssse3
libswscale/x86/yuv2rgb.c:109:20: error: ‘yuv420_rgb16_ssse3’ undeclared (first use in this function); did you mean ‘yuv420_rgb24_ssse3’?
             return yuv420_rgb16_ssse3;
                    ^~~~~~~~~~~~~~~~~~
                    yuv420_rgb24_ssse3
libswscale/x86/yuv2rgb.c:111:20: error: ‘yuv420_rgb15_ssse3’ undeclared (first use in this function); did you mean ‘yuv420_rgb16_ssse3’?
             return yuv420_rgb15_ssse3;
                    ^~~~~~~~~~~~~~~~~~
                    yuv420_rgb16_ssse3
ffbuild/common.mak:59: recipe for target 'libswscale/x86/yuv2rgb.o' failed
make: *** [libswscale/x86/yuv2rgb.o] Error 1
make: *** Waiting for unfinished jobs....

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200223/cd7fd4d8/attachment.sig>


More information about the ffmpeg-devel mailing list