diff options
author | Jean First <jeanfirst@gmail.com> | 2014-01-26 04:31:53 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-26 06:31:42 +0400 |
commit | 91489d28ba271fb9dde54cb26e7ae93ada2997df (patch) | |
tree | 41cca8eacd0cf862c823eea8cbaf73a0f09b97fd /libavcodec/libfdk-aacenc.c | |
parent | c46faacdf4e17a78a7e7617d5807a759a6a2868a (diff) |
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: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libfdk-aacenc.c')
-rw-r--r-- | libavcodec/libfdk-aacenc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index 755b76f958..82bfce17c0 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -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, }; |