[FFmpeg-devel] [PATCH 2/3] avcodec/aacenc: Add PCE support for 11 to 15 channels
pkv.stream
pkv.stream at gmail.com
Sun Oct 21 15:23:36 EEST 2018
For context , search for the discussion: aacenc: remove unsupported PCE
mappings
-------------- next part --------------
From 69bb2a21b873eb0bd49bba965acb98b09b115331 Mon Sep 17 00:00:00 2001
From: pkviet <pkv.stream at gmail.com>
Date: Sun, 16 Sep 2018 01:46:05 +0200
Subject: [PATCH 2/3] avcodec/aacenc: Add PCE support for 11 to 15 channels
This adds supports to 11 to 15 channels through PCE.
Signed-off-by: pkviet <pkv.stream at gmail.com>
---
libavcodec/aacenc.h | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
index da20affc38..eacbde6565 100644
--- a/libavcodec/aacenc.h
+++ b/libavcodec/aacenc.h
@@ -360,6 +360,46 @@ static const AACPCEInfo aac_pce_configs[] = {
.config_map = { 6, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE },
.reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
},
+ { /* Arbitrary layout selected to provide 11 channels; mask = 0x5F37 */
+ .layout = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT,
+ .num_ele = { 4, 2, 1, 0 },
+ .pairing = { { 0, 0, 1, 1 }, { 1, 0 }, { 1 }, },
+ .index = { { 0, 1, 0, 1 }, { 2, 2 }, { 3 } },
+ .config_map = { 7, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE },
+ .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },
+ },
+ { /* Arbitrary layout selected to provide 12 channels; mask = 0x7F37 */
+ .layout = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT | AV_CH_TOP_FRONT_CENTER,
+ .num_ele = { 4, 2, 2, 0 },
+ .pairing = { { 0, 0, 1, 1 }, { 1, 0 }, { 1, 0 }, },
+ .index = { { 0, 1, 0, 1 }, { 2, 2 }, { 3, 3 } },
+ .config_map = { 8, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE },
+ .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
+ },
+ { /* Arbitrary layout selected to provide 13 channels; mask = 0x17F37 */
+ .layout = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT | AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_BACK_CENTER,
+ .num_ele = { 3, 2, 2, 0 },
+ .pairing = { { 0, 1, 1 }, { 1, 1 }, { 1, 1 }, },
+ .index = { { 0, 0, 1 }, { 2, 3 }, { 4, 5 } },
+ .config_map = { 7, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE },
+ .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 },
+ },
+ { /* Arbitrary layout selected to provide 14 channels; mask = 0x2FF37 */
+ .layout = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT | AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT,
+ .num_ele = { 4, 2, 2, 0 },
+ .pairing = { { 0, 0, 1, 1 }, { 1, 1 }, { 1, 1 }, },
+ .index = { { 0, 1, 0, 1 }, { 2, 3 }, { 4, 5 } },
+ .config_map = { 8, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE },
+ .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 },
+ },
+ { /* Arbitrary layout selected to provide 15 channels; mask = 0x3FF37 */
+ .layout = AV_CH_LAYOUT_OCTAGONAL | AV_CH_TOP_CENTER | AV_CH_TOP_FRONT_LEFT | AV_CH_TOP_FRONT_RIGHT | AV_CH_TOP_FRONT_CENTER | AV_CH_TOP_BACK_CENTER | AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT ,
+ .num_ele = { 4, 2, 3, 0 },
+ .pairing = { { 0, 0, 1, 1 }, { 1, 1 }, { 1, 1, 0 }, },
+ .index = { { 0, 1, 0, 1 }, { 2, 3 }, { 4, 5, 2 } },
+ .config_map = { 9, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_SCE },
+ .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
+ },
{
.layout = AV_CH_LAYOUT_HEXADECAGONAL,
.num_ele = { 4, 2, 4, 0 },
--
2.16.2.windows.1
More information about the ffmpeg-devel
mailing list