diff options
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r-- | libavcodec/ac3enc.c | 53 |
1 files changed, 13 insertions, 40 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 95bdc58f16..eb5a0f94e3 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -4,20 +4,20 @@ * Copyright (c) 2006-2010 Justin Ruggles <justin.ruggles@gmail.com> * Copyright (c) 2006-2010 Prakash Punnoor <prakash@punnoor.de> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -71,37 +71,6 @@ typedef struct AC3MDCTContext { } AC3MDCTContext; /** - * Encoding Options used by AVOption. - */ -typedef struct AC3EncOptions { - /* AC-3 metadata options*/ - int dialogue_level; - int bitstream_mode; - float center_mix_level; - float surround_mix_level; - int dolby_surround_mode; - int audio_production_info; - int mixing_level; - int room_type; - int copyright; - int original; - int extended_bsi_1; - int preferred_stereo_downmix; - float ltrt_center_mix_level; - float ltrt_surround_mix_level; - float loro_center_mix_level; - float loro_surround_mix_level; - int extended_bsi_2; - int dolby_surround_ex_mode; - int dolby_headphone_mode; - int ad_converter_type; - - /* other encoding options */ - int allow_per_frame_metadata; - int stereo_rematrixing; -} AC3EncOptions; - -/** * Data for a single audio block. */ typedef struct AC3Block { @@ -225,7 +194,8 @@ static const float extmixlev_options[EXTMIXLEV_NUM_OPTIONS] = { #define OFFSET(param) offsetof(AC3EncodeContext, options.param) #define AC3ENC_PARAM (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM) -static const AVOption options[] = { +#if CONFIG_AC3ENC_FLOAT || !CONFIG_AC3_FLOAT_ENCODER //we need this exactly once compiled in +const AVOption ff_ac3_options[] = { /* Metadata Options */ {"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), FF_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, AC3ENC_PARAM}, /* downmix levels */ @@ -269,13 +239,14 @@ static const AVOption options[] = { {"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), FF_OPT_TYPE_INT, {.dbl = 1 }, 0, 1, AC3ENC_PARAM}, {NULL} }; +#endif #if CONFIG_AC3ENC_FLOAT static AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name, - options, LIBAVUTIL_VERSION_INT }; + ff_ac3_options, LIBAVUTIL_VERSION_INT }; #else static AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_item_name, - options, LIBAVUTIL_VERSION_INT }; + ff_ac3_options, LIBAVUTIL_VERSION_INT }; #endif @@ -304,7 +275,8 @@ static uint8_t exponent_group_tab[3][256]; /** * List of supported channel layouts. */ -static const int64_t ac3_channel_layouts[] = { +#if CONFIG_AC3ENC_FLOAT || !CONFIG_AC3_FLOAT_ENCODER //we need this exactly once compiled in +const int64_t ff_ac3_channel_layouts[] = { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_2_1, @@ -325,6 +297,7 @@ static const int64_t ac3_channel_layouts[] = { AV_CH_LAYOUT_5POINT1_BACK, 0 }; +#endif /** @@ -376,7 +349,7 @@ static void adjust_frame_size(AC3EncodeContext *s) /** * Deinterleave input samples. - * Channels are reordered from Libav's default order to AC-3 order. + * Channels are reordered from FFmpeg's default order to AC-3 order. */ static void deinterleave_input_samples(AC3EncodeContext *s, const SampleType *samples) |