[FFmpeg-devel] [PATCH] lavc: Add option to encode MPEG-2 AAC with libfdk-aac

Hendrik Leppkes h.leppkes at gmail.com
Sat Jun 22 18:39:04 CEST 2013


On Sat, Jun 22, 2013 at 6:31 PM, Timothy Gu <timothygu99 at gmail.com> wrote:
> On Jun 22, 2013 8:17 AM, "Kieran Kunhya" <kierank at ob-encoder.com> wrote:
>>
>> ---
>>  doc/APIchanges             |    3 +++
>>  libavcodec/avcodec.h       |    2 ++
>>  libavcodec/libfdk-aacenc.c |    1 +
>>  libavcodec/options_table.h |    2 ++
>>  libavcodec/version.h       |    2 +-
>>  5 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/doc/APIchanges b/doc/APIchanges
>> index c301835..cdfcc09 100644
>> --- a/doc/APIchanges
>> +++ b/doc/APIchanges
>> @@ -13,6 +13,9 @@ libavutil:     2012-10-22
>>
>>  API changes, most recent first:
>>
>> +2013-06-xx - xxxxxxx - lavc 55.10.0 - avcodec.h
>> +  Add MPEG-2 AAC profiles
>> +
>>  2013-06-xx - xxxxxxx - lavu 52.13.0 - mem.h
>>    Add av_realloc_array and av_reallocp_array
>>
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index bb33d4a..f4a10e1 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -2530,6 +2530,8 @@ typedef struct AVCodecContext {
>>  #define FF_PROFILE_AAC_HE_V2 28
>>  #define FF_PROFILE_AAC_LD   22
>>  #define FF_PROFILE_AAC_ELD  38
>> +#define FF_PROFILE_MPEG2_AAC_LOW 128
>> +#define FF_PROFILE_MPEG2_AAC_HE  131
>>
>>  #define FF_PROFILE_DTS         20
>>  #define FF_PROFILE_DTS_ES      30
>> diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
>> index ef154c1..4938262 100644
>> --- a/libavcodec/libfdk-aacenc.c
>> +++ b/libavcodec/libfdk-aacenc.c
>> @@ -197,6 +197,7 @@ static av_cold int aac_encode_init(AVCodecContext
> *avctx)
>>              avctx->bit_rate = (96*sce + 128*cpe) * avctx->sample_rate /
> 44;
>>              if (avctx->profile == FF_PROFILE_AAC_HE ||
>>                  avctx->profile == FF_PROFILE_AAC_HE_V2 ||
>> +                avctx->profile == FF_PROFILE_MPEG2_AAC_HE ||
>>                  s->eld_sbr)
>>                  avctx->bit_rate /= 2;
>>          }
>> diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
>> index 5595c0e..244d3b9 100644
>> --- a/libavcodec/options_table.h
>> +++ b/libavcodec/options_table.h
>> @@ -291,6 +291,8 @@ static const AVOption options[]={
>>  {"aac_he_v2", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_HE_V2
> }, INT_MIN, INT_MAX, A|E, "profile"},
>>  {"aac_ld", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_LD },
> INT_MIN, INT_MAX, A|E, "profile"},
>>  {"aac_eld", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_ELD },
> INT_MIN, INT_MAX, A|E, "profile"},
>> +{"mpeg2_aac_low", NULL, 0, AV_OPT_TYPE_CONST, {.i64 =
> FF_PROFILE_MPEG2_AAC_LOW }, INT_MIN, INT_MAX, A|E, "profile"},
>> +{"mpeg2_aac_he", NULL, 0, AV_OPT_TYPE_CONST, {.i64 =
> FF_PROFILE_MPEG2_AAC_HE }, INT_MIN, INT_MAX, A|E, "profile"},
>>  {"dts", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS }, INT_MIN,
> INT_MAX, A|E, "profile"},
>>  {"dts_es", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS_ES },
> INT_MIN, INT_MAX, A|E, "profile"},
>>  {"dts_96_24", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS_96_24
> }, INT_MIN, INT_MAX, A|E, "profile"},
>> diff --git a/libavcodec/version.h b/libavcodec/version.h
>> index 3405ce9..7c82519 100644
>> --- a/libavcodec/version.h
>> +++ b/libavcodec/version.h
>> @@ -27,7 +27,7 @@
>>   */
>>
>>  #define LIBAVCODEC_VERSION_MAJOR 55
>> -#define LIBAVCODEC_VERSION_MINOR  9
>> +#define LIBAVCODEC_VERSION_MINOR 10
>>  #define LIBAVCODEC_VERSION_MICRO  0
>>
>>  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR,
> \
>> --
>> 1.7.9.5
>
> a) Don't break the thread.
>

He didn't, your mail client broke the thread because the subject
changed, the proper headers are there. See the ML archives, thread is
intact.


More information about the ffmpeg-devel mailing list