From: nu774 Date: Sun, 3 Nov 2013 02:26:12 +0000 (+0900) Subject: support 7.1 channel mode added on FDK 3.4.12 X-Git-Tag: v0.5.0~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=3c0f152d39a935dbabba2e32db23a6c954f5854f;p=fdkaac.git support 7.1 channel mode added on FDK 3.4.12 --- diff --git a/src/aacenc.c b/src/aacenc.c index 3640498..00c37f3 100644 --- a/src/aacenc.c +++ b/src/aacenc.c @@ -93,10 +93,10 @@ int aacenc_channel_mode(const pcm_sample_description_t *format) { uint32_t chanmask = format->channel_mask; - if (format->channels_per_frame > 6) + if (format->channels_per_frame > 8) return 0; if (!chanmask) { - static uint32_t defaults[] = { 0x4, 0x3, 0x7, 0, 0x37, 0x3f }; + static uint32_t defaults[] = { 0x4, 0x3, 0x7, 0, 0x37, 0x3f, 0, 0x63f }; chanmask = defaults[format->channels_per_frame - 1]; } switch (chanmask) { @@ -108,6 +108,10 @@ int aacenc_channel_mode(const pcm_sample_description_t *format) case 0x107: return MODE_1_2_1; case 0x607: return MODE_1_2_2; case 0x60f: return MODE_1_2_2_1; +#if AACENCODER_LIB_VL0 > 3 || (AACENCODER_LIB_VL0==3 && AACENCODER_LIB_VL1>=4) + case 0xff: return MODE_1_2_2_2_1; + case 0x63f: return MODE_7_1_REAR_SURROUND; +#endif } return 0; }