Should call celt_inner_prod().
This change is bit exact as original, except for x86 floating-point.
In x86 floating-point, it calls celt_inner_prod_sse() which may have
different output with the change of floating-point operations' orders.
Change-Id: Ia2381e2e198a84296ac28305183f15be842b3454
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
frame_size_select() ensures that frame_size is a valid size or -1,
!st->variable_duration is always false, and delay_compensation is
no longer needed to choose the frame size.
The multistream encoder input has st->layout.nb_channels channels.
The number of channels actually encoded is st->layout.nb_streams +
st->layout.nb_coupled_streams, which may be fewer, so ideally it
would only analyze those when computing the optimal frame size, but
there is no code to do that currently.
We were previously returning OPUS_BAD_ARG because the failure was
only detected in opus_repacketizer_out_range_impl() rather than in
opus_repacketizer_cat(). Checking the return value from opus_repacketizer_cat()
also addresses the last outstanding Coverity defect.
The implementation currently only codes each channel independently with no
special allocation rules.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Optimize opus encode (float only) usecase using ARM NE10
library. Mainly effects opus_fft and ctl_mdct_forward
and related functions.
This optimization can be used for ARM CPUs that have NEON
VFP unit. This patch only enables optimizations for ARMv7.
Official ARM NE10 library page available at
http://projectne10.github.io/Ne10/
To enable this optimization, use
--enable-intrinsics --with-NE10=<install_prefix>
or
--enable-intrinsics --with-NE10-libraries=<NE10_lib_dir> --with-NE10-includes=<NE10_includes_dir>
Compile time checks made during configure process to make sure
optimization option available only when compiler supports NEON
instrinsics.
Runtime checks made to make sure optimized functions only called
on appropriate hardware.
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
Fix out-of-bounds memory read in multichannel surround analysis
with float input that contains NaNs. Found by afl-fuzz.
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Considers the case where one stream would eat up all the remaining bytes,
including a 2-byte size that would then not leave enough for the even a PLC
packet in the next streams.
OPUS_AUTO should now work fine, while using OPUS_BITRATE_MAX would still
be a bad idea for controlling CBR rate for multistream. The encoder should
now throw an error early on if max_data_bytes is just too small to do anything.
Works by turning off pitch and energy prediction in CELT, while
setting first_frame_after_reset in SILK to disable pitch and LSF interpolation
and reduce LPC gain.