[vlc-devel] [PATCH] Add ARM mode compilation for JNI files

Måns Rullgård mans at mansr.com
Wed May 2 02:34:40 CEST 2012


Rafaël Carré <funman at videolan.org> writes:

> Le 01/05/2012 13:36, Måns Rullgård a écrit :
>> Jean-Baptiste Kempf <jb at videolan.org> writes:
>> 
>>> On Tue, May 01, 2012 at 01:23:27PM -0400, Rafaël Carré wrote :
>>>> Le 01/05/2012 06:51, satish MR a écrit :
>>>>> Hi,
>>>>> This patch covers Support for ARM mode compilation of JNI files instead of
>>>>> THUMB mode (selected by default now).
>>>>
>>>> What is wrong with thumb ?
>>>
>>> It is slower than ARM, IIRC.
>> 
>> Thumb-1 is certainly slower.  Thumb-2 is usually about the same speed.
>> All Cortex-Ax CPUs support Thumb-2.  ARM1136/76 do not.
>
> Here are 2 armv7a+neon builds:
> http://people.videolan.org/~funman/andro/VLC-armv7a-neon-arm.apk
> http://people.videolan.org/~funman/andro/VLC-armv7a-neon-thumb.apk
>
> The thumb build is 456kB smaller (7.5%)
>
> Decoding a mpeg-4 ASP gives, as expected, identical performance as
> measured with top -m 10

Yes, this is the expected result with Thumb2.

> I think it makes sense to build for thumb when targetting armv7a, opinions ?

Only if you are prepared to deal with, or do not care about, the errata
in Cortex-A8 r1pX revisions (e.g. the classic Beagleboard is affected)
making Thumb2 mostly unusable without applying workarounds both in OS
and compiler/linker, some with negative effects on performance.  Maybe
these things are taken care of in Android, maybe not.

> Here is how I made the thumb build :
>
> android.git diff (add -mthumb -mthumb-interwork):

There is no need for -mthumb-interwork on ARMv5TE and later.

-- 
Måns Rullgård
mans at mansr.com




More information about the vlc-devel mailing list