Closed GoogleCodeExporter closed 8 years ago
To fix this bug, I have created one CL with minimum change:
https://webrtc-codereview.appspot.com/32959004/. This patch use LIBYUV_NEON to
work around undefined __ARM_NEON__. But doing this conceal the fact that
__ARM_NEON__ is undefined without compile flag "-mfpu=neon". Ignoring it might
bring other potential issues.
I'm considering some ways as follows:
1. Identify files which has NEON initialization code and pass compile flag
"-mfpu=neon" to them.
Doing this might be complex, because there many files including NEON
initialization code. In addition, it destroys current structure of files.
2. Pass compile flag "-mfpu=neon" to all the C file.
It's a little dangerous becasue the toolchain might generate NEON instructions
automitically. If NEON floating-point instructions which isn't fullly
compatible with IEEE 754 are generated, the C version is no longer reference.
3. Use LIBYUV_NEON for ARM32 and use LIBYUV_NEON64 for ARM64
Using them instead of __ARM_NEON__/__aarch64__ could minimize the impact of
toolchain and compile flag. Based on this way, the macro definition need to be
added in gyp according to ARM architecture and all the __ARM_NEON__/__aarch64__
need to be removed. But the structure of NEON files needn’t to be modified.
4. Using unified macro such as LIBYUV_NEON for ARM32/ARM64
Using LIBYUV_NEON only makes the NEON enable clear, but the ARM32 NEON files
and ARM64 NEON files need to be separated. All the __ARM_NEON__/__aarch64__
need to be removed too.
Original comment by yang.zh...@arm.com
on 9 Jan 2015 at 9:26
1 and 2 would potentially crash on cpus without neon
3 seems unnecessary
4 seems right. it says neon code will be present (e.g. row_neon.cc) but the
code being compiled (e.g. convert.cc) does not have -ffpu=neon and needs to
know if the code is there. row.h will detect the ifdef and enable HAVE_*_NEON
function macros, which most of the code uses.
For 64 bit I think we can move toward a single library again, requiring neon
for all code.
For all platforms, the libyuv_neon library should be buildable, but will be
empty if its not a 32 bit arm build.
Original comment by fbarch...@google.com
on 12 Feb 2015 at 12:00
fixed yes?
Original comment by fbarch...@chromium.org
on 16 Mar 2015 at 2:32
Original issue reported on code.google.com by
yang.zh...@arm.com
on 9 Jan 2015 at 7:41