X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fopus.h;h=b73949a8112e3dc424055400223a23911a5f20b9;hb=d07534b5f5f20b4f780f5b0284aca6354da00695;hp=edbaab5ce7d064205b97e4ce72dfb04ffde8486c;hpb=f8377ffce35251bba043aeda5d81df0d411a0595;p=ffmpeg diff --git a/libavcodec/opus.h b/libavcodec/opus.h index edbaab5ce7d..b73949a8112 100644 --- a/libavcodec/opus.h +++ b/libavcodec/opus.h @@ -28,6 +28,7 @@ #include "libavutil/audio_fifo.h" #include "libavutil/float_dsp.h" #include "libavutil/frame.h" +#include "libavutil/mem_internal.h" #include "libswresample/swresample.h" @@ -101,6 +102,15 @@ typedef struct OpusStreamContext { AVCodecContext *avctx; int output_channels; + /* number of decoded samples for this stream */ + int decoded_samples; + /* current output buffers for this stream */ + float *out[2]; + int out_size; + /* Buffer with samples from this stream for synchronizing + * the streams when they have different resampling delays */ + AVAudioFifo *sync_buffer; + OpusRangeCoder rc; OpusRangeCoder redundancy_rc; SilkContext *silk; @@ -112,12 +122,12 @@ typedef struct OpusStreamContext { DECLARE_ALIGNED(32, float, celt_buf)[2][960]; float *celt_output[2]; - float redundancy_buf[2][960]; + DECLARE_ALIGNED(32, float, redundancy_buf)[2][960]; float *redundancy_output[2]; - /* data buffers for the final output data */ - float *out[2]; - int out_size; + /* buffers for the next samples to be decoded */ + float *cur_out[2]; + int remaining_out_size; float *out_dummy; int out_dummy_allocated_size; @@ -154,15 +164,6 @@ typedef struct OpusContext { OpusStreamContext *streams; int apply_phase_inv; - /* current output buffers for each streams */ - float **out; - int *out_size; - /* Buffers for synchronizing the streams when they have different - * resampling delays */ - AVAudioFifo **sync_buffers; - /* number of decoded samples for each stream */ - int *decoded_samples; - int nb_streams; int nb_stereo_streams;