Commit 91489d28 authored by Jean First's avatar Jean First Committed by Michael Niedermayer

avcodec/libfdk_aacenc: enable 7.1 channel encoding

7.1(wide) and 7.1(wide-side) channel layouts are supported in fdk_aac since october 2013 (commit fa3eba1644)
Signed-off-by: 's avatarJean First <jeanfirst@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c46faacd
......@@ -4426,7 +4426,9 @@ 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
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 >= 3.4.12."; }
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
......
......@@ -151,6 +151,16 @@ 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;
case 8:
sce = 2;
cpe = 3;
if (avctx->channel_layout == AV_CH_LAYOUT_7POINT1_WIDE_BACK) {
mode = MODE_7_1_REAR_SURROUND;
} else {
// MODE_1_2_2_2_1 and MODE_7_1_FRONT_CENTER use the same channel layout
mode = MODE_7_1_FRONT_CENTER;
}
break;
default:
av_log(avctx, AV_LOG_ERROR,
"Unsupported number of channels %d\n", avctx->channels);
......@@ -384,6 +394,8 @@ static const uint64_t aac_channel_layout[] = {
AV_CH_LAYOUT_4POINT0,
AV_CH_LAYOUT_5POINT0_BACK,
AV_CH_LAYOUT_5POINT1_BACK,
AV_CH_LAYOUT_7POINT1_WIDE,
AV_CH_LAYOUT_7POINT1_WIDE_BACK,
0,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment