Commit f882f50b authored by tlegrand@chromium.org's avatar tlegrand@chromium.org

Enable FIXED_POINT and -O3 for Opus when building for ARM

The original CL:
https://codereview.chromium.org/315673002/

The revert of the CL above:
https://codereview.chromium.org/349293006/

The reason for the original revert:
Media tests started failing consistently on a tsan bot
(http://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20Tests%20%28tsan%29%281%29?numbuilds=200) with revision 277414 (the commit of original CL).
Cl was reverted in revision 279198.

This CL solved the problem differently, by not using the release_optimize flag, and instead replace the cflag -Os with -O3.

Opus speed gain with -03 flag on ARM:
ARM32b - 6-8% for encoding, 2% for decoding
ARM64b - 20% for encoding, 17% for decoding

Increased binary size: 

BUG=chromium:354539

Review URL: https://codereview.chromium.org/354903003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281729 0039d316-1c4b-4281-b951-d872f2087c98
parent 8aa3fab8
...@@ -5,14 +5,17 @@ ...@@ -5,14 +5,17 @@
{ {
'variables': { 'variables': {
'conditions': [ 'conditions': [
['((OS=="android" or chromeos==1) and target_arch=="arm") or (OS=="ios" and target_arch=="armv7")', { ['target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64"', {
'use_opus_fixed_point%': 1, 'use_opus_fixed_point%': 1,
'use_opus_arm_optimization%': 1,
}, { }, {
'use_opus_fixed_point%': 0, 'use_opus_fixed_point%': 0,
}],
['target_arch=="arm" or target_arch=="armv7"', {
'use_opus_arm_optimization%': 1,
}, {
'use_opus_arm_optimization%': 0, 'use_opus_arm_optimization%': 0,
}], }],
['(OS=="android" or chromeos==1) and target_arch=="arm"', { ['target_arch=="arm"', {
'use_opus_rtcd%': 1, 'use_opus_rtcd%': 1,
}, { }, {
'use_opus_rtcd%': 0, 'use_opus_rtcd%': 0,
...@@ -56,7 +59,7 @@ ...@@ -56,7 +59,7 @@
4334, # Disable 32-bit shift warning in src/opus_encoder.c . 4334, # Disable 32-bit shift warning in src/opus_encoder.c .
], ],
}], }],
[ 'os_posix==1 and OS!="android"', { ['os_posix==1 and OS!="android"', {
# Suppress a warning given by opus_decoder.c that tells us # Suppress a warning given by opus_decoder.c that tells us
# optimizations are turned off. # optimizations are turned off.
'cflags': [ 'cflags': [
...@@ -68,6 +71,10 @@ ...@@ -68,6 +71,10 @@
], ],
}, },
}], }],
['os_posix==1 and (target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64")', {
'cflags!': ['-Os'],
'cflags': ['-O3'],
}],
['use_opus_fixed_point==0', { ['use_opus_fixed_point==0', {
'include_dirs': [ 'include_dirs': [
'src/silk/float', 'src/silk/float',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment