#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "mathops.h"
#include "os_support.h"
#include "opus_private.h"
#include "opus_defines.h"
#include "opus_projection.h"
#include "opus_multistream.h"
#include "mapping_matrix.h"
#include "stack_alloc.h"
struct OpusProjectionDecoder
{ … };
#if !defined(DISABLE_FLOAT_API)
static void opus_projection_copy_channel_out_float(
void *dst,
int dst_stride,
int dst_channel,
const opus_val16 *src,
int src_stride,
int frame_size,
void *user_data)
{ … }
#endif
static void opus_projection_copy_channel_out_short(
void *dst,
int dst_stride,
int dst_channel,
const opus_val16 *src,
int src_stride,
int frame_size,
void *user_data)
{ … }
static MappingMatrix *get_dec_demixing_matrix(OpusProjectionDecoder *st)
{ … }
static OpusMSDecoder *get_multistream_decoder(OpusProjectionDecoder *st)
{ … }
opus_int32 opus_projection_decoder_get_size(int channels, int streams,
int coupled_streams)
{ … }
int opus_projection_decoder_init(OpusProjectionDecoder *st, opus_int32 Fs,
int channels, int streams, int coupled_streams,
unsigned char *demixing_matrix, opus_int32 demixing_matrix_size)
{ … }
OpusProjectionDecoder *opus_projection_decoder_create(
opus_int32 Fs, int channels, int streams, int coupled_streams,
unsigned char *demixing_matrix, opus_int32 demixing_matrix_size, int *error)
{ … }
#ifdef FIXED_POINT
int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data,
opus_int32 len, opus_int16 *pcm, int frame_size,
int decode_fec)
{
return opus_multistream_decode_native(get_multistream_decoder(st), data, len,
pcm, opus_projection_copy_channel_out_short, frame_size, decode_fec, 0,
get_dec_demixing_matrix(st));
}
#else
int opus_projection_decode(OpusProjectionDecoder *st, const unsigned char *data,
opus_int32 len, opus_int16 *pcm, int frame_size,
int decode_fec)
{ … }
#endif
#ifndef DISABLE_FLOAT_API
int opus_projection_decode_float(OpusProjectionDecoder *st, const unsigned char *data,
opus_int32 len, float *pcm, int frame_size, int decode_fec)
{ … }
#endif
int opus_projection_decoder_ctl(OpusProjectionDecoder *st, int request, ...)
{ … }
void opus_projection_decoder_destroy(OpusProjectionDecoder *st)
{ … }