aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/eac3enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-14 04:55:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-14 04:56:26 +0200
commit173cd695cbb79a50a0738ce7bcc966cb40f4a28a (patch)
tree1a8025d98e71b5950eb12ed24c2c8787a5c185e3 /libavcodec/eac3enc.c
parentfdb5e02901111a6a53f8386d82afae0aa2d746a7 (diff)
parent35bdaf3d427b6856df01d41ee826bd515440ec46 (diff)
downloadffmpeg-173cd695cbb79a50a0738ce7bcc966cb40f4a28a.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: (24 commits) utils: Drop pointless '#if 1' preprocessor directive. ac3enc: remove empty ac3_float function that is never called ac3enc: split templated float vs. fixed functions into a separate file. ac3enc: dynamically allocate AC3EncodeContext fields windowed_samples and mdct ac3enc: use function pointer to choose between AC-3 and E-AC-3 header output functions. Roll back 4:4:4 H.264 for now Needs some ARM/PPC asm modifications. Fix SVQ3 after adding 4:4:4 H.264 support H.264: fix CODEC_FLAG_GRAY 4:4:4 H.264 decoding support h264_parser: Fix whitespace after previous change. h264_parser: Fix behaviour when PARSER_FLAG_COMPLETE_FRAMES is set. wav: remove an invalid free(). lavf: initialise reference_dts in av_estimate_timings_from_pts. h264: don't be so picky on decoding pps in extradata. avcodec.h: add or elaborate on some documentation comments. h264: change a few comments into error messages ac3dec: fix doxy-style for comment ("///>" should be "///<" instead). img2: add .dpx to the list of supported file extensions. ffv1: fix undefined behavior with insane widths. ARM: jrevdct_arm: simplify stack usage ... Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/eac3enc.c')
-rw-r--r--libavcodec/eac3enc.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index 20f4b879c6..d37acaf20b 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -28,6 +28,13 @@
#include "ac3enc.h"
#include "eac3enc.h"
+
+#define AC3ENC_TYPE AC3ENC_TYPE_EAC3
+#include "ac3enc_opts_template.c"
+static AVClass eac3enc_class = { "E-AC-3 Encoder", av_default_item_name,
+ eac3_options, LIBAVUTIL_VERSION_INT };
+
+
void ff_eac3_set_cpl_states(AC3EncodeContext *s)
{
int ch, blk;
@@ -129,3 +136,20 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s)
/* block start info */
put_bits(&s->pb, 1, 0);
}
+
+
+#if CONFIG_EAC3_ENCODER
+AVCodec ff_eac3_encoder = {
+ .name = "eac3",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .id = CODEC_ID_EAC3,
+ .priv_data_size = sizeof(AC3EncodeContext),
+ .init = ff_ac3_encode_init,
+ .encode = ff_ac3_encode_frame,
+ .close = ff_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 = ff_ac3_channel_layouts,
+};
+#endif