diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2016-10-03 21:53:11 +0300 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2017-11-09 06:37:48 +0300 |
commit | fbf295e2bd4d48d7a0a094ed5afce2fa5b6cf35a (patch) | |
tree | 8e9393646be34185894c56ad5beaf8308a8c1ca3 /libavcodec/aacenctab.h | |
parent | 0a771e6b32429f9195d431415bf707c28ef31fff (diff) |
aacenc: support extended channel layouts using PCEs
This commit implements support for PCE (Program Configuration Elements) in the
AAC encoder, and as such allows for encoding of channel layouts not present
in the presets defined by the spec (which only lists the 8 most common ones).
This has been a highly requested feature and is also the first open source encoder
to support this many layouts.
Many thanks to pkviet <pkv.stream@gmail.com> who implemented support for and
verified all channel layouts.
Diffstat (limited to 'libavcodec/aacenctab.h')
-rw-r--r-- | libavcodec/aacenctab.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/aacenctab.h b/libavcodec/aacenctab.h index 5fc9411232..c852a29f53 100644 --- a/libavcodec/aacenctab.h +++ b/libavcodec/aacenctab.h @@ -36,13 +36,24 @@ /** Total number of codebooks, including special ones **/ #define CB_TOT_ALL 15 -#define AAC_MAX_CHANNELS 8 +#define AAC_MAX_CHANNELS 16 extern const uint8_t *ff_aac_swb_size_1024[]; extern const int ff_aac_swb_size_1024_len; extern const uint8_t *ff_aac_swb_size_128[]; extern const int ff_aac_swb_size_128_len; +/* Supported layouts without using a PCE */ +static const int64_t aac_normal_chan_layouts[7] = { + AV_CH_LAYOUT_MONO, + AV_CH_LAYOUT_STEREO, + AV_CH_LAYOUT_SURROUND, + AV_CH_LAYOUT_4POINT0, + AV_CH_LAYOUT_5POINT0, + AV_CH_LAYOUT_5POINT1, + AV_CH_LAYOUT_7POINT1, +}; + /** default channel configurations */ static const uint8_t aac_chan_configs[AAC_MAX_CHANNELS][6] = { {1, TYPE_SCE}, // 1 channel - single channel element |