The .align directive takes an argument in number of bits, i.e. the
actual alignment is 2^n. Previously building with binutils failed,
since 16 isn't a valid parameter to .align, the maximum is 15.
Thus, this makes the code try to align to 16 bytes, instead of aligning
to 65536 bytes.
This fixes building for android.
This also clears up the same mistake in the aarch64 code, even though
that one built just fine.
This file is built on its own from within the xcode projects,
even though it isn't necessary. Previously its contents was just
empty, but now a .syntax unified was added, which failed the build
when building for arm64.
Make this file a no-op, just like the other arm assembly source files,
unless HAVE_NEON is defined.
This fixes building for android on windows.
Building for android on windows still requires MSYS for running make,
but running the ndk-build of the sample projects from within MSYS
doesn't seem to work (the OS variable from the OpenH264 makefile
interferes with the host system detection in ndk-build), so one still
needs to build it in two steps, first make OS=android ... libopenh264.so,
then building the sample projects manually.
Make sure that pOptions is initialized to the parameters that
the codec actually uses, not the ones that we initially tried
to set.
When calling SetOption to update the codec parameters, this may
cause a reset of the whole codec if e.g. the number of threads
differs from what is set within the codec itself.
If the number of threads was changed by the codec internally
when inited (e.g. changed from 0 to 1), WelsEncoderParamAdjust
may think the whole codec needs to be reset.
This fixes running EncoderInterfaceTest.TemporalLayerSettingTest
on machines where the detected number of cores is 1.
If kiCpuCores < 2, then iCountThreadsNum (and iMultipleThreadIdc)
can't be >= 2, because they're initialized with
WELS_MIN (kiCpuCores, ...) just a few lines above.
If iMultipleThreadIdc is initially set to 0 by the caller, this
removed piece of code would change it to 1, if kiCpuCores < 2.
When iMultipleThreadIdc is changed from the originally set value,
a call to WelsEncoderParamAdjust with the original parameters
would reset the whole codec since iMultipleThreadIdc differs.
This fixes running EncoderInterfaceTest.TemporalLayerSettingTest
on machines where the detected number of cores is 1.
This is the default when building with the clang built-in assembler,
but not if using the external assembler - thus always specify it,
for clarity.
Also use the three-operand for of a sub instruction in BS_NZC_CHECK.
The same is already done in the gnu version of the macro.
This fixes building most of the arm assembly with Apple's external
assembler. While this isn't a necessary goal in itself, there's no
harm in doing this either.