From aa47c35dff263f19f64f10a93ea9e4da4e395ede Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Tue, 24 May 2011 15:20:56 -0400 Subject: ac3enc: add support for E-AC-3 encoding. This adds basic stream format support and allows for arbitrary bit rates rather than just those supported in AC-3. --- libavcodec/ac3enc_float.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libavcodec/ac3enc_float.c') diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index 4f61440b52..012c31de5d 100644 --- a/libavcodec/ac3enc_float.c +++ b/libavcodec/ac3enc_float.c @@ -100,6 +100,7 @@ static void scale_coefficients(AC3EncodeContext *s) } +#if CONFIG_AC3_ENCODER AVCodec ff_ac3_encoder = { "ac3", AVMEDIA_TYPE_AUDIO, @@ -114,3 +115,20 @@ AVCodec ff_ac3_encoder = { .priv_class = &ac3enc_class, .channel_layouts = ac3_channel_layouts, }; +#endif + +#if CONFIG_EAC3_ENCODER +AVCodec ff_eac3_encoder = { + .name = "eac3", + .type = AVMEDIA_TYPE_AUDIO, + .id = CODEC_ID_EAC3, + .priv_data_size = sizeof(AC3EncodeContext), + .init = ac3_encode_init, + .encode = ac3_encode_frame, + .close = ac3_encode_close, + .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE}, + .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"), + .priv_class = &eac3enc_class, + .channel_layouts = ac3_channel_layouts, +}; +#endif -- cgit v1.2.1