Unified · Split
| @@ -841,26 +841,6 @@ Possible values: · 840 unmodified lines | |||
| 841 | @table @samp | 841 | @table @samp |
| 842 | @item unknown | 842 | @item unknown |
| 843 | 843 | ||
| 844 | @item aac_main | ||
| 845 | |||
| 846 | @item aac_low | ||
| 847 | |||
| 848 | @item aac_ssr | ||
| 849 | |||
| 850 | @item aac_ltp | ||
| 851 | |||
| 852 | @item aac_he | ||
| 853 | |||
| 854 | @item aac_he_v2 | ||
| 855 | |||
| 856 | @item aac_ld | ||
| 857 | |||
| 858 | @item aac_eld | ||
| 859 | |||
| 860 | @item mpeg2_aac_low | ||
| 861 | |||
| 862 | @item mpeg2_aac_he | ||
| 863 | |||
| 864 | @item mpeg4_sp | 844 | @item mpeg4_sp |
| 865 | 845 | ||
| 866 | @item mpeg4_core | 846 | @item mpeg4_core |
| @@ -39,6 +39,7 @@ · 38 unmodified lines | |||
| 39 | #include "mpeg4audio.h" | 39 | #include "mpeg4audio.h" |
| 40 | #include "kbdwin.h" | 40 | #include "kbdwin.h" |
| 41 | #include "sinewin.h" | 41 | #include "sinewin.h" |
| 42 | #include "profiles.h" | ||
| 42 | 43 | ||
| 43 | #include "aac.h" | 44 | #include "aac.h" |
| 44 | #include "aactab.h" | 45 | #include "aactab.h" |
| @@ -1131,6 +1132,7 @@ static const AVOption aacenc_options[] = { · 1086 unmodified lines | |||
| 1131 | {"aac_ltp", "Long term prediction", offsetof(AACEncContext, options.ltp), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS}, | 1132 | {"aac_ltp", "Long term prediction", offsetof(AACEncContext, options.ltp), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS}, |
| 1132 | {"aac_pred", "AAC-Main prediction", offsetof(AACEncContext, options.pred), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS}, | 1133 | {"aac_pred", "AAC-Main prediction", offsetof(AACEncContext, options.pred), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS}, |
| 1133 | {"aac_pce", "Forces the use of PCEs", offsetof(AACEncContext, options.pce), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS}, | 1134 | {"aac_pce", "Forces the use of PCEs", offsetof(AACEncContext, options.pce), AV_OPT_TYPE_BOOL, {.i64 = 0}, -1, 1, AACENC_FLAGS}, |
| 1135 | FF_AAC_PROFILE_OPTS | ||
| 1134 | {NULL} | 1136 | {NULL} |
| 1135 | }; | 1137 | }; |
| 1136 | 1138 | ||
| @@ -25,6 +25,7 @@ · 24 unmodified lines | |||
| 25 | #include "avcodec.h" | 25 | #include "avcodec.h" |
| 26 | #include "audio_frame_queue.h" | 26 | #include "audio_frame_queue.h" |
| 27 | #include "internal.h" | 27 | #include "internal.h" |
| 28 | #include "profiles.h" | ||
| 28 | 29 | ||
| 29 | #ifdef AACENCODER_LIB_VL0 | 30 | #ifdef AACENCODER_LIB_VL0 |
| 30 | #define FDKENC_VER_AT_LEAST(vl0, vl1) \ | 31 | #define FDKENC_VER_AT_LEAST(vl0, vl1) \ |
| @@ -62,6 +63,7 @@ static const AVOption aac_enc_options[] = { · 31 unmodified lines | |||
| 62 | { "latm", "Output LATM/LOAS encapsulated data", offsetof(AACContext, latm), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, | 63 | { "latm", "Output LATM/LOAS encapsulated data", offsetof(AACContext, latm), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, |
| 63 | { "header_period", "StreamMuxConfig and PCE repetition period (in frames)", offsetof(AACContext, header_period), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xffff, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, | 64 | { "header_period", "StreamMuxConfig and PCE repetition period (in frames)", offsetof(AACContext, header_period), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xffff, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, |
| 64 | { "vbr", "VBR mode (1-5)", offsetof(AACContext, vbr), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 5, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, | 65 | { "vbr", "VBR mode (1-5)", offsetof(AACContext, vbr), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 5, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM }, |
| 66 | FF_AAC_PROFILE_OPTS | ||
| 65 | { NULL } | 67 | { NULL } |
| 66 | }; | 68 | }; |
| 67 | 69 | ||
| @@ -263,16 +263,6 @@ static const AVOption avcodec_options[] = { · 262 unmodified lines | |||
| 263 | {"skip_bottom", "number of macroblock rows at the bottom which are skipped", OFFSET(skip_bottom), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D}, | 263 | {"skip_bottom", "number of macroblock rows at the bottom which are skipped", OFFSET(skip_bottom), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|D}, |
| 264 | {"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.profile"}, | 264 | {"profile", NULL, OFFSET(profile), AV_OPT_TYPE_INT, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E|CC, "avctx.profile"}, |
| 265 | {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.profile"}, | 265 | {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "avctx.profile"}, |
| 266 | {"aac_main", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_MAIN }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 267 | {"aac_low", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_LOW }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 268 | {"aac_ssr", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_SSR }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 269 | {"aac_ltp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_LTP }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 270 | {"aac_he", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_HE }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 271 | {"aac_he_v2", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_HE_V2 }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 272 | {"aac_ld", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_LD }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 273 | {"aac_eld", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_AAC_ELD }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 274 | {"mpeg2_aac_low", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_MPEG2_AAC_LOW }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 275 | {"mpeg2_aac_he", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_MPEG2_AAC_HE }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | ||
| 276 | {"dts", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | 266 | {"dts", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, |
| 277 | {"dts_es", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS_ES }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | 267 | {"dts_es", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS_ES }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, |
| 278 | {"dts_96_24", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS_96_24 }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, | 268 | {"dts_96_24", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_DTS_96_24 }, INT_MIN, INT_MAX, A|E, "avctx.profile"}, |
| @@ -20,6 +20,22 @@ · 19 unmodified lines | |||
| 20 | #define AVCODEC_PROFILES_H | 20 | #define AVCODEC_PROFILES_H |
| 21 | 21 | ||
| 22 | #include "avcodec.h" | 22 | #include "avcodec.h" |
| 23 | #include "libavutil/opt.h" | ||
| 24 | |||
| 25 | #define FF_AVCTX_PROFILE_OPTION(name, description, type, value) \ | ||
| 26 | {name, description, 0, AV_OPT_TYPE_CONST, {.i64 = value }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_## type ##_PARAM, "avctx.profile"}, | ||
| 27 | |||
| 28 | #define FF_AAC_PROFILE_OPTS \ | ||
| 29 | FF_AVCTX_PROFILE_OPTION("aac_main", NULL, AUDIO, FF_PROFILE_AAC_MAIN)\ | ||
| 30 | FF_AVCTX_PROFILE_OPTION("aac_low", NULL, AUDIO, FF_PROFILE_AAC_LOW)\ | ||
| 31 | FF_AVCTX_PROFILE_OPTION("aac_ssr", NULL, AUDIO, FF_PROFILE_AAC_SSR)\ | ||
| 32 | FF_AVCTX_PROFILE_OPTION("aac_ltp", NULL, AUDIO, FF_PROFILE_AAC_LTP)\ | ||
| 33 | FF_AVCTX_PROFILE_OPTION("aac_he", NULL, AUDIO, FF_PROFILE_AAC_HE)\ | ||
| 34 | FF_AVCTX_PROFILE_OPTION("aac_he_v2", NULL, AUDIO, FF_PROFILE_AAC_HE_V2)\ | ||
| 35 | FF_AVCTX_PROFILE_OPTION("aac_ld", NULL, AUDIO, FF_PROFILE_AAC_LD)\ | ||
| 36 | FF_AVCTX_PROFILE_OPTION("aac_eld", NULL, AUDIO, FF_PROFILE_AAC_ELD)\ | ||
| 37 | FF_AVCTX_PROFILE_OPTION("mpeg2_aac_low", NULL, AUDIO, FF_PROFILE_MPEG2_AAC_LOW)\ | ||
| 38 | FF_AVCTX_PROFILE_OPTION("mpeg2_aac_he", NULL, AUDIO, FF_PROFILE_MPEG2_AAC_HE)\ | ||
| 23 | 39 | ||
| 24 | extern const AVProfile ff_aac_profiles[]; | 40 | extern const AVProfile ff_aac_profiles[]; |
| 25 | extern const AVProfile ff_dca_profiles[]; | 41 | extern const AVProfile ff_dca_profiles[]; |