[vlc-devel] [PATCH] deinterlace/yadif: Disable x86 asm on Android

Marvin Scholz epirat07 at gmail.com
Tue Oct 15 22:46:14 CEST 2019


On 15 Oct 2019, at 17:16, Rémi Denis-Courmont wrote:

> Hi,
>
> Text relocations don't work on Linux and ELF platforms in general, 
> AFAIK. So this needs proper fixing if it's *really* text relocations.

I’ve investigate this issue more.
I turns out it is only an issue when configuring libvlc with 
--enable-static --disable-shared
which causes libtool to not default to PIC, as expected. But even when 
using --with-pic
it does not use PIC which in fact isn’t libtools fault but DOLT, which 
does not handle
this correctly.

I’ve submitted another patch that reverts this one and adds a 
workaround for that.
It’s not a perfect fix, just a workaround because dolt.m4 is quite 
hard to read and follow,
so I really can’t figure out how to patch that to do the right thing.

Just opting out of DOLT in case of --with-pic being given does not work 
either, because
the --tag=ASM flag used for NASM compilation with libtool is only 
supported by the DOLT
wrapper script, not by the real libtool…

>
> Le 15 octobre 2019 15:55:31 GMT+03:00, Marvin Scholz 
> <epirat07 at gmail.com> a écrit :
>> It contains text relocations which are not allowed on Android.
>> ---
>> modules/video_filter/Makefile.am              | 3 +++
>> modules/video_filter/deinterlace/algo_yadif.c | 2 +-
>> 2 files changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/modules/video_filter/Makefile.am
>> b/modules/video_filter/Makefile.am
>> index 51ee92aff1..6f1714c683 100644
>> --- a/modules/video_filter/Makefile.am
>> +++ b/modules/video_filter/Makefile.am
>> @@ -136,9 +136,12 @@ libdeinterlace_plugin_la_SOURCES = \
>> 	video_filter/deinterlace/algo_ivtc.c
>> video_filter/deinterlace/algo_ivtc.h
>> # inline ASM doesn't build with -O0
>> libdeinterlace_plugin_la_CFLAGS = $(AM_CFLAGS) -O2
>> +# Disabled on Android due to text reloc issues
>> +if !HAVE_ANDROID
>> if HAVE_X86ASM
>> libdeinterlace_plugin_la_SOURCES +=
>> video_filter/deinterlace/yadif_x86.asm
>> endif
>> +endif
>> if HAVE_NEON
>> libdeinterlace_plugin_la_SOURCES +=
>> video_filter/deinterlace/merge_arm.S
>> libdeinterlace_plugin_la_CFLAGS += -DCAN_COMPILE_ARM
>> diff --git a/modules/video_filter/deinterlace/algo_yadif.c
>> b/modules/video_filter/deinterlace/algo_yadif.c
>> index 6fdecf53a5..98dbbe9b04 100644
>> --- a/modules/video_filter/deinterlace/algo_yadif.c
>> +++ b/modules/video_filter/deinterlace/algo_yadif.c
>> @@ -112,7 +112,7 @@ int RenderYadif( filter_t *p_filter, picture_t
>> *p_dst, picture_t *p_src,
>> void (*filter)(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t
>> *next,
>>                    int w, int prefs, int mrefs, int parity, int 
>> mode);
>>
>> -#if defined(HAVE_X86ASM)
>> +#if defined(HAVE_X86ASM) && !defined (__ANDROID__)
>>         if( vlc_CPU_SSSE3() )
>>             filter = vlcpriv_yadif_filter_line_ssse3;
>>         else
>> -- 
>> 2.20.1 (Apple Git-117)
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté._______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list