[FFmpeg-devel] [PATCH] aacenc: set default coding tools by profile

Rostislav Pehlivanov atomnuker at gmail.com
Wed Sep 2 05:32:30 CEST 2015


>static const?
Didn't notice that, thanks.

>You could consider using the FF_PROFILE_ macros as the array index.
Not really feasible without alot of padding:
$ git grep FF_PROFILE_MPEG2_
>libavcodec/avcodec.h:#define FF_PROFILE_MPEG2_AAC_LOW 128
>libavcodec/avcodec.h:#define FF_PROFILE_AAC_HE_V2 28

Anyway, still wondering about the -help encoder=aac. I think it's better
to allow users to directly specify profile and let them override options,
even
though it's not printing sensible default values the standard way and has to
edit the option description.


On 2 September 2015 at 04:05, Timothy Gu <timothygu99 at gmail.com> wrote:

>
>
> On Tue, Sep 1, 2015 at 6:46 PM Rostislav Pehlivanov <atomnuker at gmail.com>
> wrote:
>
>>  /**
>> + * List of currently supported profiles, anything not listed isn't
>> supported.
>> + */
>>
>
>
>> +struct AACProfileOptions aacenc_profiles[] = {
>>
>
> static const?
>
>
>> +    {FF_PROFILE_AAC_LOW,
>> +        {  /* Default profile, these are the settings that get set by
>> default */
>> +            .stereo_mode = 0,
>> +            .aac_coder = AAC_CODER_TWOLOOP,
>> +            .pns = 1,
>> +            .tns = 0,
>> +            .pred = OPT_NEEDS_MAIN,
>> +            .intensity_stereo = 1,
>> +        },
>> +    },
>> +    {FF_PROFILE_MPEG2_AAC_LOW,
>> +        {  /* Strict MPEG 2 Part 7 compliance profile */
>> +            .stereo_mode = 0,
>> +            .aac_coder = AAC_CODER_TWOLOOP,
>> +            .pns = OPT_BANNED,
>> +            .tns = 0,
>> +            .pred = OPT_BANNED,
>> +            .intensity_stereo = 1,
>> +        },
>> +    },
>> +    {FF_PROFILE_AAC_MAIN,
>> +        {  /* Main profile, all advanced encoding abilities enabled */
>> +            .stereo_mode = 0,
>> +            .aac_coder = AAC_CODER_TWOLOOP,
>> +            .pns = 1,
>> +            .tns = 0,
>> +            .pred = OPT_REQUIRED,
>> +            .intensity_stereo = 0,
>> +        },
>> +    },
>> +};
>>
>
> You could consider using the FF_PROFILE_ macros as the array index.
>
> Timothy
>


More information about the ffmpeg-devel mailing list