Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM scramble function is not included in build #162

Open
amishutin opened this issue Jan 9, 2024 · 0 comments
Open

ARM scramble function is not included in build #162

amishutin opened this issue Jan 9, 2024 · 0 comments

Comments

@amishutin
Copy link

amishutin commented Jan 9, 2024

Hi,

I was compiling fdk-aac for aarch64 platfrom and I noticed that ARM version of scramble function is never included in build.
It looks to me that the reason is incorrect preprocessor directives in scramble_arm.h file.

Replacing this line( scramble_arm.h 106):
-#if defined(FUNCTION_scramble)
with
+#if !defined(FUNCTION_scramble)
fixes the issue, and the function is now included in arm build.
But this causes other compilation errors. Assembly code in this function uses r registers, and it can't be compiled for 64-bit architecture.
I replaced r registers with x, this compiles well.
But now the test-encode-decode.c produces failures.
So, the results of generic scramble function and ARM version do not match.

17 failures
encode hash: 7e1784d6c92bfe1aeb9f1bd806443c660a2da036
decode hash: d04dcdcbddb760ce8370ffc4b28d9a14e3b32da5 

It can be reproduced like this(x86_64 Ubuntu):

  • set up aarch64 environment
  • ./autogen.sh
  • mkdir -p build && cd build
  • ../configure --prefix=$BUILD_PATH --host=aarch64-linux-gnu --enable-shared=no --enable-static --enable-example
  • make -j8 && make install
  • export LD_LIBRARY_PATH=/path/to/aarch64-unknown-linux-gnu/sysroot/lib/
  • qemu-aarch64-static ./test-encode-decode Sample01_4.wav

There was used aarch64-linux-gnu-gcc compiler.

Is this a bug or was ARM version of scramble function intentionally excluded from build?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant