diff --git a/configure b/configure index c46bfd3c5c9ee40ab05bc62b0c83ac68ff6b5cb2..32bc5baf87ee22035194bed471a1d094d55b398c 100755 --- a/configure +++ b/configure @@ -4437,9 +4437,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && die "ERROR: libcelt must be installed and version must be >= 0.11.0."; } enabled libcaca && require_pkg_config caca caca.h caca_create_canvas enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac -enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && - { check_cpp_condition fdk-aac/aacenc_lib.h "AACENCODER_LIB_VL0 >= 3 && AACENCODER_LIB_VL1 >= 4 && AACENCODER_LIB_VL2 >= 12" || - die "ERROR: libfdk-aac must be installed and version must be >= 0.1.3."; } +enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite" enabled libflite && require2 libflite "flite/flite.h" flite_init $flite_libs enabled libfreetype && require_libfreetype diff --git a/doc/encoders.texi b/doc/encoders.texi index d163440da40e487e6141798da9bafb8ee05f3cf1..c28cbcbdf4d11cf10c74f6ff3bafb3a88c66e949 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -623,6 +623,9 @@ VBR encoding, enabled through the @option{vbr} or @option{flags +qscale} options, is experimental and only works with some combinations of parameters. +Support for encoding 7.1 audio is only available with libfdk-aac 0.1.3 or +higher. + For more information see the fdk-aac project at @url{http://sourceforge.net/p/opencore-amr/fdk-aac/}. diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index 2d91e585589db7666b827894ac01c4ff73f22d7f..bc704008980810066594cc90b6988019c73c7e7c 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -151,6 +151,9 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) case 4: mode = MODE_1_2_1; sce = 2; cpe = 1; break; case 5: mode = MODE_1_2_2; sce = 1; cpe = 2; break; case 6: mode = MODE_1_2_2_1; sce = 2; cpe = 2; break; +/* The version macro is introduced the same time as the 7.1 support, so this + should suffice. */ +#ifdef AACENCODER_LIB_VL0 case 8: sce = 2; cpe = 3; @@ -161,6 +164,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) mode = MODE_7_1_FRONT_CENTER; } break; +#endif default: av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels %d\n", avctx->channels); @@ -394,8 +398,10 @@ static const uint64_t aac_channel_layout[] = { AV_CH_LAYOUT_4POINT0, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, +#ifdef AACENCODER_LIB_VL0 AV_CH_LAYOUT_7POINT1_WIDE_BACK, AV_CH_LAYOUT_7POINT1, +#endif 0, };