*/
#define CONFIG_AC3ENC_FLOAT 1
+
+#include "libavutil/attributes.h"
#include "ac3enc.h"
#include "eac3enc.h"
#include "eac3_data.h"
#define AC3ENC_TYPE AC3ENC_TYPE_EAC3
#include "ac3enc_opts_template.c"
-static const AVClass eac3enc_class = { "E-AC-3 Encoder", av_default_item_name,
- eac3_options, LIBAVUTIL_VERSION_INT };
+
+static const AVClass eac3enc_class = {
+ .class_name = "E-AC-3 Encoder",
+ .item_name = av_default_item_name,
+ .option = ac3_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
/**
static int8_t eac3_frame_expstr_index_tab[3][4][4][4][4][4];
-void ff_eac3_exponent_init(void)
+av_cold void ff_eac3_exponent_init(void)
{
int i;
for (ch = 1; ch <= s->fbw_channels; ch++) {
if (block->channel_in_cpl[ch]) {
if (first_cpl_coords[ch]) {
- block->new_cpl_coords = 2;
+ block->new_cpl_coords[ch] = 2;
first_cpl_coords[ch] = 0;
}
} else {
}
-#if CONFIG_EAC3_ENCODER
AVCodec ff_eac3_encoder = {
.name = "eac3",
+ .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"),
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_EAC3,
+ .id = AV_CODEC_ID_EAC3,
.priv_data_size = sizeof(AC3EncodeContext),
- .init = ff_ac3_encode_init,
- .encode = ff_ac3_float_encode_frame,
+ .init = ff_ac3_float_encode_init,
+ .encode2 = ff_ac3_float_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"),
+ .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
+ AV_SAMPLE_FMT_NONE },
.priv_class = &eac3enc_class,
.channel_layouts = ff_ac3_channel_layouts,
+ .defaults = ac3_defaults,
};
-#endif