X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fac3enc.h;h=76b6d7f6e5eee3fb482136020e95211e99e769f1;hb=b4bb9593834460bbbe0e70823f2c503cb01ad052;hp=4a017498f605b66b78086049ddd7f0df9f1decc9;hpb=5f3fb599536dd5bceb1d45cb73cd0b0ce3e5560c;p=ffmpeg diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h index 4a017498f60..76b6d7f6e5e 100644 --- a/libavcodec/ac3enc.h +++ b/libavcodec/ac3enc.h @@ -29,12 +29,17 @@ #define AVCODEC_AC3ENC_H #include + +#include "libavutil/float_dsp.h" + #include "ac3.h" #include "ac3dsp.h" #include "avcodec.h" -#include "dsputil.h" -#include "put_bits.h" #include "fft.h" +#include "mathops.h" +#include "me_cmp.h" +#include "put_bits.h" +#include "audiodsp.h" #ifndef CONFIG_AC3ENC_FLOAT #define CONFIG_AC3ENC_FLOAT 0 @@ -75,12 +80,14 @@ typedef int64_t CoefSumType; #define AC3ENC_OPT_NOT_INDICATED 0 #define AC3ENC_OPT_MODE_ON 2 #define AC3ENC_OPT_MODE_OFF 1 +#define AC3ENC_OPT_DSUREX_DPLIIZ 3 /* specific option values */ #define AC3ENC_OPT_LARGE_ROOM 1 #define AC3ENC_OPT_SMALL_ROOM 2 #define AC3ENC_OPT_DOWNMIX_LTRT 1 #define AC3ENC_OPT_DOWNMIX_LORO 2 +#define AC3ENC_OPT_DOWNMIX_DPLII 3 // reserved value in A/52, but used by encoders to indicate DPL2 #define AC3ENC_OPT_ADCONV_STANDARD 0 #define AC3ENC_OPT_ADCONV_HDCD 1 @@ -157,7 +164,9 @@ typedef struct AC3EncodeContext { AC3EncOptions options; ///< encoding options AVCodecContext *avctx; ///< parent AVCodecContext PutBitContext pb; ///< bitstream writer context - DSPContext dsp; + AudioDSPContext adsp; + AVFloatDSPContext fdsp; + MECmpContext mecc; AC3DSPContext ac3dsp; ///< AC-3 optimized functions FFTContext mdct; ///< FFT context for MDCT calculation const SampleType *mdct_window; ///< MDCT window function array @@ -258,9 +267,10 @@ typedef struct AC3EncodeContext { } AC3EncodeContext; -extern const int64_t ff_ac3_channel_layouts[19]; +extern const uint64_t ff_ac3_channel_layouts[19]; int ff_ac3_encode_init(AVCodecContext *avctx); +int ff_ac3_float_encode_init(AVCodecContext *avctx); int ff_ac3_encode_close(AVCodecContext *avctx); @@ -297,9 +307,9 @@ int ff_ac3_float_mdct_init(AC3EncodeContext *s); int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s); int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s); -int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, unsigned char *frame, - int buf_size, void *data); -int ff_ac3_float_encode_frame(AVCodecContext *avctx, unsigned char *frame, - int buf_size, void *data); +int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + const AVFrame *frame, int *got_packet_ptr); +int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + const AVFrame *frame, int *got_packet_ptr); #endif /* AVCODEC_AC3ENC_H */