opus: allow to select fixed-point implementation
PATCH 1/1 opus: allow to select fixed-point implementation
The default of choosing the fixed-point implementation if the target hardware does not have floating-point unit is not always the best choice. Modern ARM hardware has floating point support but most likely the fixed-point implementation in Opus will still perform better. In particular if your CPU supports the NEON extension.
This commit allows to select the fixed-point implementation manually and sets the default based on the availability of a floating-point unit.
--- package/opus/Config.in | 11 +++++++++++ package/opus/opus.mk | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)
package/opus/Config.in +11 -0
@@ -13,3 +13,14 @@ config BR2_PACKAGE_OPUS quality stereo music. http://opus-codec.org + +if BR2_PACKAGE_OPUS + +config BR2_PACKAGE_OPUS_FIXED_POINT + bool "opus fixed-point implementation" + default y if BR2_SOFT_FLOAT + help + Compile without floating point operations (for machines without + a fast enough FPU). + +endif
package/opus/opus.mk +1 -1
@@ -12,7 +12,7 @@ OPUS_INSTALL_STAGING = YES OPUS_CONF_OPT = --disable-doc OPUS_AUTORECONF = YES -ifeq ($(BR2_SOFT_FLOAT),y) +ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y) OPUS_CONF_OPT += --enable-fixed-point endif
Signature · 1 line
1.8.3.2
PATCH 1/1 opus: allow to select fixed-point implementation
Quoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
The default of choosing the fixed-point implementation if the target hardware does not have floating-point unit is not always the best choice. Modern ARM hardware has floating point support but most likely the fixed-point implementation in Opus will still perform better. In particular if your CPU supports the NEON extension.
This commit allows to select the fixed-point implementation manually and sets the default based on the availability of a floating-point unit.
Signed-off-by Sven Neumann <[email protected]>--- package/opus/Config.in | 11 +++++++++++ package/opus/opus.mk | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)package/opus/Config.in +0
-0
package/opus/Config.in config BR2_PACKAGE_OPUS · line 20
Quoted 8 lines
package/opus/Config.in +5
-0@@ -13,3 +13,14 @@ config BR2_PACKAGE_OPUS quality stereo music. http://opus-codec.org + +if BR2_PACKAGE_OPUS + +config BR2_PACKAGE_OPUS_FIXED_POINT + bool "opus fixed-point implementation"
this should probably be:
bool "use fixed-point" if !BR2_SOFT_FLOAT
E.G. only allow it to be disabled if you have hardware floating point.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard