search for: opus_int16

Displaying 20 results from an estimated 105 matches for "opus_int16".

2016 Jul 28
0
[PATCH] Optimize silk_LPC_analysis_filter() for ARM NEON
...POSSIBILITY OF SUCH DAMAGE. current implementation silences by casting to unsigned. Enabling this should be safe in pretty much all cases, even though it is not technically C89-compliant. */ -#define USE_CELT_FIR 0 -void silk_LPC_analysis_filter( +void silk_LPC_analysis_filter_c( opus_int16 *out, /* O Output signal */ const opus_int16 *in, /* I Input signal */ const opus_int16 *B, /* I MA pre...
2015 Nov 16
0
[Fast Int64 3/4] Explicitly cast results of silk OPUS_FAST_INT64 macros back to opus_int32.
--- silk/macros.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/silk/macros.h b/silk/macros.h index 1ba614a..e1e05b9 100644 --- a/silk/macros.h +++ b/silk/macros.h @@ -48,14 +48,14 @@ POSSIBILITY OF SUCH DAMAGE. /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ #if OPUS_FAST_INT64 -#define silk_SMULWB(a32, b32) (((a32) * (opus_int64)((opus_int16)(b32))) >> 16) +#define silk_SMULWB(a32, b32) ((opus_int32)(((a32) * (opus_int64)((opus_int16)(b32))) >> 16)) #else #define s...
2015 Jun 03
5
[PATCH 1/1] Updated opus_types.h to correctly support 8 and 64 bit types.
...p; __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H)) -#include <stdint.h> +# include <stdint.h> + typedef int8_t opus_int8; + typedef uint8_t opus_uint8; typedef int16_t opus_int16; typedef uint16_t opus_uint16; typedef int32_t opus_int32; typedef uint32_t opus_uint32; + typedef int64_t opus_int64; + typedef uint64_t opus_uint64; + #elif defined(_WIN32) # if defined(__CYGWIN__) -# include <_G_config.h> - typedef _G_int32_t opus_int32; -...
2020 Jul 25
2
Regarding encoded data
Hello, I've been trying to understand how to use opus codec for quite some time. There is a thing that doesn't make sense to me. I will try to explain what it is below, In *opus_encode() *function, *opus_int16 pcm* is said to have a size of *frame_size * channels*, where *frame_size* is said to be one of* 20, 240, 480, 960, 1920, and 2880.* Let's say, frame_size is 960, then opus_int16 pcm's size in bytes would be *3840*. Documentation page says the recommended size for *output payload *should be...
2015 Nov 16
3
[Fast Int64 1/4] Move OPUS_FAST_INT64 definition to celt/arch.h.
...SUCH DAMAGE. #define opus_unlikely(x) (!!(x)) #endif -/* Set this if opus_int64 is a native type of the CPU. */ -#define OPUS_FAST_INT64 (defined(__x86_64__) || defined(__LP64__) || defined(_WIN64)) - /* This is an OPUS_INLINE header file for general platform. */ /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ -- 2.4.9 (Apple Git-60)
2015 Aug 04
0
[PATCH] Create OPUS_FAST_INT64 macro, to abstract conditions where opus_int64 should be used.
...SUCH DAMAGE. #define opus_unlikely(x) (!!(x)) #endif +/* Set this if opus_int64 is a native type of the CPU. */ +#define OPUS_FAST_INT64 (defined(__x86_64__) || defined(__LP64__) || defined(_WIN64)) + /* This is an OPUS_INLINE header file for general platform. */ /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ -#if defined(__x86_64__) || defined(__LP64__) || defined(_WIN64) +#if OPUS_FAST_INT64 #define silk_SMULWB(a32, b32) (((a32) * (opus_int64)((opus_int16)(b32))) >> 16) #else #define silk_SMULWB(a32, b32) ((((a32) >&g...
2012 Sep 10
11
Cleanup/build improvement for opus
Hello all, after FOMS I decided to take a look at the opus library and I found that I could improve a bit the build system and cleanup the code a little bit. Most of the changes to the code has been suggested by my two tools cowstats and missingstatic (part of the ruby-elf gem if you care). HTH, Diego
2016 Aug 23
0
[PATCH 8/8] Optimize silk_NSQ_del_dec() for ARM NEON
.../* I Encoder State */ silk_nsq_state *NSQ, /* I/O NSQ state */ SideInfoIndices *psIndices, /* I/O Quantization Indices */ const opus_int16 x16[], /* I Input */ @@ -341,7 +341,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( opus_int predictLPCOrder, /* I Prediction filter order */ opus_int...
2016 Aug 23
2
[PATCH 7/8] Update NSQ_LPC_BUF_LENGTH macro.
NSQ_LPC_BUF_LENGTH is independent of DECISION_DELAY. --- silk/define.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/silk/define.h b/silk/define.h index 781cfdc..1286048 100644 --- a/silk/define.h +++ b/silk/define.h @@ -173,11 +173,7 @@ extern "C" #define MAX_MATRIX_SIZE MAX_LPC_ORDER /* Max of LPC Order and LTP order */ -#if( MAX_LPC_ORDER >
2016 Aug 26
2
[PATCH 9/9] Optimize silk_inner_prod_aligned_scale() for ARM NEON
...r_prod_aligned_arm.h" #include "arm/LPC_analysis_filter_arm.h" #include "arm/LPC_inv_pred_gain_arm.h" #endif @@ -377,7 +378,7 @@ opus_int32 silk_inner_prod_aligned( ); -opus_int32 silk_inner_prod_aligned_scale( +opus_int32 silk_inner_prod_aligned_scale_c( const opus_int16 *const inVec1, /* I input vector 1 */ const opus_int16 *const inVec2, /* I input vector 2 */ const opus_int scale, /* I number of bi...
2013 May 17
1
[Patch]01-Add ARM5E macros
...4 --- a/silk/macros.h +++ b/silk/macros.h @@ -32,6 +32,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "config.h" #endif +#ifdef ARM5E_ASM +#include "macros_arm5e.h" +#else /* Generic macro */ + /* This is an inline header file for general platform. */ /* (a32 * (opus_int32)((opus_int16)(b32))) >> 16 output have to be 32bit int */ @@ -134,5 +138,7 @@ static inline opus_int32 silk_CLZ32(opus_int32 in32) (*((Matrix_base_adr) + ((row)+(M)*(column)))) #endif +#endif + #endif /* SILK_MACROS_H */ diff --git a/silk/macros_arm5e.h b/silk/macros_arm5e.h new file mode 10064...
2018 Jun 29
1
OPUS on cortex M4
...r, If I try to make a simple example of opus_encode followed by and immediate opus_decode I do not get reasonable values compared to the input. I'm wondering if I'm somehow misunderstanding how the codec works. Could somebody tell me if my approach could work? int frame_size = 160; opus_int16 test_data_size = frame_size*channels*sizeof(opus_int16); opus_int32 max_data_bytes = 100; opus_int16 test_data[test_data_size]; opus_int16 *p_test_data = test_data; unsigned char encoded_buffer[max_data_bytes]; unsigned char *p_encoded_buffer = encoded_buffer; opus_int16 de...
2013 May 27
1
Empty buffer on encoder write byte
...bufferIndex < numberOfBuffers ; ++bufferIndex) { AudioBuffer audioBuffer = bufferList->mBuffers[bufferIndex]; int frameSize = (samplingRate/1000) * sampleDuration; // sampling rate is 8000, sample duration is 20ms size_t count = frameSize*channels / sizeof(opus_int16); __block opus_int16 *pcmInput = calloc(count, sizeof(opus_int16)); memcpy(pcmInput, audioBuffer.mData, count * sizeof(opus_int16)); [_encoder encodeWithPCMInput:pcmInput frameSize:frameSize outputBlock:^(unsigned char *payloadOutput, opus_int32 payloadLength) {...
2015 Nov 02
1
[PATCH 1/2] Declare silk_warped_LPC_analysis_filter_FIX_c in silk/fixed/main_FIX.h.
.../main_FIX.h | 11 +++++++++++ silk/x86/x86_silk_map.c | 2 ++ 2 files changed, 13 insertions(+) diff --git a/silk/fixed/main_FIX.h b/silk/fixed/main_FIX.h index ffeb4f3..375b5eb 100644 --- a/silk/fixed/main_FIX.h +++ b/silk/fixed/main_FIX.h @@ -97,6 +97,17 @@ void silk_prefilter_FIX( const opus_int16 x[] /* I Speech signal */ ); +void silk_warped_LPC_analysis_filter_FIX_c( + opus_int32 state[], /* I/O State [order + 1] *...
2017 Apr 26
2
2 patches related to silk_biquad_alt() optimization
...e silk_biquad_alt_c_MulSingleAQ28() for your information. It uses 64-bit multiplications and is about 0.6% - 0.9% slower (for the whole encoder) than the original C code using 32-bit multiplications (for both strides and the same stride 2 unrolling). void silk_biquad_alt_c_MulSingleAQ28( const opus_int16 *in, /* I input signal */ const opus_int32 *B_Q28, /* I MA coefficients [3] */ const opus_int32 *A_Q28, /* I AR coefficients...
2015 Nov 02
2
[PATCH 1/2] Declare silk_warped_LPC_analysis_filter_FIX_c in silk/fixed/main_FIX.h.
.../main_FIX.h | 11 +++++++++++ silk/x86/x86_silk_map.c | 2 ++ 2 files changed, 13 insertions(+) diff --git a/silk/fixed/main_FIX.h b/silk/fixed/main_FIX.h index ffeb4f3..375b5eb 100644 --- a/silk/fixed/main_FIX.h +++ b/silk/fixed/main_FIX.h @@ -97,6 +97,17 @@ void silk_prefilter_FIX( const opus_int16 x[] /* I Speech signal */ ); +void silk_warped_LPC_analysis_filter_FIX_c( + opus_int32 state[], /* I/O State [order + 1] *...
2017 Oct 12
2
[PATCH] Support for Channel Mapping 253.
thanks for all your feedback. here's the revised patch: On Wed, Oct 11, 2017 at 2:20 PM Timothy B. Terriberry <tterribe at xiph.org> wrote: > Jean-Marc Valin wrote: > > I think you'll want something like: > > (opus_int16)((unsigned)demixing_matrix[2*i+1] << 8) > > (though you might want to check it too) > > FWIW, we use the construct > int s = buf[2*i + 1] << 8 | buf[2*i]; > s = ((s & 0xFFFF) ^ 0x8000) - 0x8000; > > to manually sign-extend the result in opus_compare (an...
2015 Nov 21
8
[Aarch64 v2 10/18] Clean up some intrinsics-related wording in configure.
--- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f52d2c2..e1a6e9b 100644 --- a/configure.ac +++ b/configure.ac @@ -190,7 +190,7 @@ AC_ARG_ENABLE([rtcd], [enable_rtcd=yes]) AC_ARG_ENABLE([intrinsics], - [AS_HELP_STRING([--disable-intrinsics], [Disable intrinsics optimizations for ARM(float) X86(fixed)])],, +
2017 May 15
2
2 patches related to silk_biquad_alt() optimization
...mation. It uses > 64-bit multiplications and is about 0.6% - 0.9% slower (for the > whole encoder) than the original C code using 32-bit multiplications > (for both strides and the same stride 2 unrolling). > > void silk_biquad_alt_c_MulSingleAQ28( > const opus_int16 *in, /* I input > signal */ > const opus_int32 *B_Q28, /* I MA > coefficients [3] */ > const opus_int32 *A_Q28...
2017 Oct 31
7
[PATCH] Support for Channel Mapping 253.
...gt; think is incorrect. > > Done. > 3) opus_projection_ambisonics_encoder_init() (which should be > OPUS_EXPORT) is missing from opus_projection.h > > Done. > 4) I believe mapping_matrix_get_size() should be returning > align(sizeof(MappingMatrix)) + rows * cols * sizeof(opus_int16) > rather than: > align(sizeof(MappingMatrix) + rows * cols * sizeof(opus_int16)) > to match what mapping_matrix_get_data() does > > Done. > 5) I'm not sure I understand the purpose of mapping_matrix_validate(). > Can the user really cause the matrix not to be valid? If y...