[FFmpeg-devel] How to wire asm to the makefile

James Almer jamrial at gmail.com
Mon Jul 9 23:49:59 EEST 2018


On 7/9/2018 1:29 AM, Book Moons wrote:
> Hello,
> 
> I have a Power optimized function in asm for an upcoming patch. Having some trouble figuring out how to wire it up to the makefiles / build system. Are there any docs on how to do that?
> 
> The only other example of Power asm seems to be libavcodec/ppc/fft_altivec.S. That's simply appended to the OBJS-yes variable:
> 
> OBJS-$(CONFIG_FFT)   += ppc/fft_init.o                \
>                                           ppc/fft_altivec.o             \
>                                           ppc/fft_vsx.o
> 
> Doing the same thing in the relevant makefile (for libswscale/ppc) doesn't seem to work.
> 
> OBJS += ppc/swscale_altivec.o                                     \
>         ppc/yuv2rgb_altivec.o                                           \
>         ppc/yuv2yuv_altivec.o                                           \
>         ppc/hScale8To15_vsx.o
> 
> It looks for a .c file. Building with that change gives this error:
> 
>> make: *** No rule to make target 'src/libswscale/ppc/hScale8To15_vsx.c', needed by 'libswscale/ppc/hScale8To15_vsx.o'. Stop.

First, always make sure to clean the build folder. Rogue .d files
(created by the build system) usually result in gnu make assuming wrong
dependencies if you made some changes to the source tree after they were
created.

That aside, are you sure your file is called hScale8To15_vsx.S and not
hScale8To15_vsx.s? The build system expects .S, not .s
Otherwise, I can't say why it looks for a .c file when in libavcodec it
handles fft_altivec.S just fine.


More information about the ffmpeg-devel mailing list