From patchwork Sun Oct 1 22:40:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "pkv.stream" X-Patchwork-Id: 5362 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.61.8 with SMTP id n8csp887137jan; Sun, 1 Oct 2017 15:40:16 -0700 (PDT) X-Received: by 10.28.113.28 with SMTP id m28mr7689113wmc.141.1506897616424; Sun, 01 Oct 2017 15:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506897616; cv=none; d=google.com; s=arc-20160816; b=As6X5TD6u58f1nwYJbuya+5dgdRQ1FsnPJRu7ak+gTELw/nC5fQB2oLY1XcnLkzGCF rblxLdUPdb5WqdkDMN1LXtZ+X2MjoojZu59lHcuc1tkDv+aNLhGnPygvgQ9kyV98IjEq /SFkQA0Xw3fEWxtx78VmDZrKQDuOA0UbPxs7MLA6gaVsIHqRFKSU7qtQFsoko61Zr4q+ DNMl+F+mLaIzFPxLM1yt9vs8hadCfIs4wjd4bFOx/4ogw+PgZcbzChO4ZE8FEwPkpYPn RiESmoljINV9nQUy3ZAbpBW05luo1BejUAUOAuIyQF0w2ibIeLKp1HErOah5QYb551bI 6oSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:dkim-signature:delivered-to :arc-authentication-results; bh=RveZRyzkgsHx/DCvnjAkWdk6SluvxjMdZgL8qxV4c9I=; b=Djvlfrz24a2ZHnhLjdS4yDBIe2PfbYS2cIxCWeZpWzYTXrZ7VU7DXaiRWv1eh0X5RR kAtqVRsUCExqiFGQnz47Zx3zzad1tzVewEyMXEG+Jro77oGEUAytu5t1zv3P9teOGmCi on28n0b1HmX36bhxI77hq8hPTb4a4Gj/ykW1FRTQDTC9qhPlb0B4iCaDy+NQFH7A3cvB uL7MQcIj23KzYvwUjTbWG8JZvBz5xXs20PwxqqPICKI6vZpc5xFRbmkH6NHtUDPF4PPK V3o7MmW89eaXrvdthe5CEmVdZ9b2ZzCKRUimjWDnHGJ7VIKqiOki3wCEaB0MSuonTVN+ yHiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DCKCRRQ9; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id q7si5290788wrf.439.2017.10.01.15.40.15; Sun, 01 Oct 2017 15:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=DCKCRRQ9; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F2681689CEA; Mon, 2 Oct 2017 01:40:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8CAFA6882C7 for ; Mon, 2 Oct 2017 01:39:54 +0300 (EEST) Received: by mail-wm0-f54.google.com with SMTP id q132so7386631wmd.2 for ; Sun, 01 Oct 2017 15:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=+hGjkIjtoLa2/ULVC6OCUShuVbpo0hMo6huYegib29s=; b=DCKCRRQ9PZ9nhM+y237SrYJFRTHplWrUyjBND2CywJItFOIaiWUM0agVgQWzKXQLoK C8Wh35qdoMb+FN6iOs86DooQmDg9M1nTdLFYu4PZskkMOKao1nXhGfSmSiaIbhbcRTwP Lr6+VG7Y42CpXAW7DPx295pl8lZdfKSVrajTdQsuxlz1ukN45YSfQpZbnqNdqTlSZ7Sw xiDfHLO8mWQ63W2TGefpiYuL4V4fxW/cgEOeZo3IqTO18JTYfMN+q1Q+L4UMgUzwAiI8 s1owQdxgXKkmRyVgKEqKWx1agasU1nxmJe0w0K6zR/G6cxrlvCJP36gkRYXVp8O0Dg8s MOgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=+hGjkIjtoLa2/ULVC6OCUShuVbpo0hMo6huYegib29s=; b=BdytZNbgDKQobAR4G5Fl6pGD4Njp0YPa+Vv2s80HrMcRPDjlMDBLpnj9jYQDe4MBEr UA0r2ZozHi5BjuqxLAIlZDghG+1CF+XyV1CGKEuNZaqCif1I+DoVS8g9NoICWeCYBma/ KnY+qPO6gH4/yTTrvKdY8tndhcUGYAqWDBhV9hau7Dc+zjFRloO2ez1mGTe+ZuD8jC/5 2no/HfmzxXFUULFCKRPkmkX4MWioQn56+BWSy5mEaJbmiWRfWT/zohUkue7iajS3BtOr VbtXDJc/67d3CeGsR6tc0MlKHkGTG16oW3fToV6mLITW9loM2gSgY4BVgYjXfvHhgB/Y KWzw== X-Gm-Message-State: AHPjjUi7Ol31oSt6UnfWXOZrmJHN8LmM35kGkMtlQGgQkoyF52elKeE5 BjzdQihaACNoUo6tefY8HtXxAg== X-Google-Smtp-Source: AOwi7QAH2vPQQLXqLZIPpQ9kBmn7+YhzWg7l9ja5DlbaqXwBK4PGgu82DcnOBEpKUnrR0qt7+dHgVQ== X-Received: by 10.80.180.214 with SMTP id x22mr17429422edd.230.1506897607974; Sun, 01 Oct 2017 15:40:07 -0700 (PDT) Received: from [192.168.0.2] ([176.159.7.188]) by smtp.googlemail.com with ESMTPSA id f9sm8920841ede.38.2017.10.01.15.40.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Oct 2017 15:40:07 -0700 (PDT) To: ffmpeg-devel@ffmpeg.org References: From: "pkv.stream" Message-ID: <68150eab-1ce5-49c7-171e-996ef572fb86@gmail.com> Date: Mon, 2 Oct 2017 00:40:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: fr Subject: Re: [FFmpeg-devel] [PATCH] aacenc: WIP support for PCEs X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Hi atomnuker, got your PCE working; my previous issues where index related and were the reasons ffmpeg aac decoder would issue errors. So found out: - index is not reset between groups of front, side, back; - it runs actually for each type (SCE, CPE, LFE) - for ffmpeg aac decoder to work, the list of index for a type must be continuous (and probably start with 0, although the order is arbitrary); ex: 0 1 2 or 2 0 1 are ok but not 0 4 I've corrected your PCE table accordingly. I've tested the correctness of the PCE encode for all the layouts listed in the attachment through the following systematic procedure:  - pcm stream with required number of channels declared with -channel_layout identical to destination (to avoid any automatic channel matrixing) - the encoded file was decoded, channels split into mono streams in the order of the channels. This allowed me to check the channel orders are fine as well as the correctness of the aac encode itself. For channels layouts with LFE starting from 4.1, I have had issues with the order of the LFE channel. When encoding with PCE, the LFE channel is always positioned as the last one even if the PCE positions it elsewhere; the -config_map and -reorder_map options make no difference. So either these layouts with LFE should be removed from the table; or a workaround could be to replace the LFE by a SCE. This is not sub-optimal, in terms of bitrate. But maybe as a convenience to user this might be ok provisionally, until a real fix is found. I have no opinion on the matter, but have provided working PCEs for these layouts with LFE, in case. I have added two convenience layouts in the PCE table , with 9 and 10 channels. They might be of use for order 2 ambisonics or mixed ambisonics (of course this assumes the user has ordered his channels in a meaningful way for a third party software since ffmpeg does not provide ambisonics information yet). Also, during the research into this PCE, I uncovered a bug with -channel_layout option which initially is not passed correctly for non-default layouts; output filters detect the layout as the default one (for instance 4.0 instead of quad). This means there are auto-inserts of unneeded filters remapping the channels. For instance when encoding a quad pcm source  to aac file with quad layout with PCE, an auto-insertion of aformat filter remaps quad source to 4.0. This completely blows up the aac PCE encode since channel matrixing occurs. I have a separate patch for that issue (see ticket 6706). regards From 507fa698974fe72d297e01c90396e602de0d42da Mon Sep 17 00:00:00 2001 From: pkviet Date: Sun, 24 Sep 2017 16:11:17 +0200 Subject: [PATCH] avcodec/aacenc: PCE for all ffmpeg usual layouts PCE for all usual layouts listed in channel_layout_map (channel_layout.c) have been added. All encodes with PCE are decoded correctly by ffmpeg aac decoder (not checked with others). The correctness of the channel positions in the encodes have been checked by splitting the channels to independent audio tracks. Two non standard layouts have been added in the PCE for support of 9 and 10 channels, which are useful for ambisonics. For layouts with LFE, the LFE element has been replaced by a SCE because the encoder always puts the LFE as last channel, irrespective of config_map and reorder_map. This is not optimal but it enables these layouts. --- libavcodec/aacenc.c | 2 +- libavcodec/aacenc.h | 239 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 234 insertions(+), 7 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 2996996..faa0684 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -565,7 +565,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, return 0; } - copy_input_samples(s, frame); + copy_input_samples(s, frame); if (s->psypp) ff_psy_preprocess(s->psypp, s->planar_samples, s->channels); diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index 346d989..31afd04 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -99,6 +99,33 @@ typedef struct AACPCEInfo { uint8_t reorder_map[16]; ///< maps channels from lavc to aac order } AACPCEInfo; +/** + *List of PCE (Program Configuration Element) for the channel layouts listed in channel_layout.h + * + *For those wishing in the future to add other layouts: + * - num_ele: number of elements in each group of front, side, back, lfe channels; + * (an element is of type SCE (single channel) , CPE (channel pair) for the first 3 groups; + * and is LFE for LFE group). + * - pairing: 0 for an SCE element or 1 for a CPE; does not apply to LFE group + * - index: there are three independent indices for SCE, CPE and LFE; + * they are incremented irrespective of the group to which the element belongs; + * they are not reset when going from one group to another + * + * Example: for 7.0 channel layout, + * .pairing = { { 1, 0 }, { 1 }, { 1 }, }, (3 CPE and 1 SCE in front group) + * .index = { { 0, 0 }, { 1 }, { 2 }, }, index is 0 for the single SCE + * but goes from 0 to 2 for the CPEs . + * + * The index order impacts the channel ordering. But is otherwise arbitrary + * (the sequence could have been 2, 0, 1 instead of 0, 1, 2). + * Spec allows discontinuous indices, e.g. if one has a total of two SCE, SCE.0 SCE.15 is OK per spec; + * BUT it won't be decoded by ffmpeg aac decoder which at this time requires that indices fully cover some range starting from 0. + * (SCE.1 SCE.0 is OK but not SCE.0 SCE.15). + * + * - config_map: total number of elements and their types. Beware, the way the types are ordered impacts the final channel ordering. + * - reorder_map: reorders the channels. + * + */ static const AACPCEInfo aac_pce_configs[] = { { .layout = AV_CH_LAYOUT_MONO, @@ -117,20 +144,220 @@ static const AACPCEInfo aac_pce_configs[] = { .reorder_map = { 0, 1 }, }, { + .layout = AV_CH_LAYOUT_2POINT1, + .num_ele = { 1, 0, 0, 1 }, + .pairing = { { 1 }, }, + .index = { { 0 },{ 0 },{ 0 },{ 0 } }, + .config_map = { 2, TYPE_CPE, TYPE_LFE }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CH_LAYOUT_2_1, + .num_ele = { 1, 0, 1, 0 }, + .pairing = { { 1 },{ 0 },{ 0 } }, + .index = { { 0 },{ 0 },{ 0 }, }, + .config_map = { 2, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2 }, + }, + { .layout = AV_CH_LAYOUT_SURROUND, .num_ele = { 2, 0, 0, 0 }, .pairing = { { 1, 0 }, }, - .index = { { 0, 1 }, }, - .config_map = { 2, TYPE_SCE, TYPE_CPE }, - .reorder_map = { 2, 0, 1 }, + .index = { { 0, 0 }, }, + .config_map = { 2, TYPE_CPE, TYPE_SCE, }, + .reorder_map = { 0, 1, 2 }, + }, + { + .layout = AV_CH_LAYOUT_3POINT1, + .num_ele = { 2, 0, 0, 1 }, + .pairing = { { 1, 0 }, }, + .index = { { 0, 0 }, { 0 }, { 0 }, { 0 }, }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_LFE }, + .reorder_map = { 0, 1, 2, 3 }, }, { .layout = AV_CH_LAYOUT_4POINT0, .num_ele = { 2, 0, 1, 0 }, .pairing = { { 1, 0 }, { 0 }, { 0 }, }, - .index = { { 0, 1 }, { 0 }, { 0 } }, - .config_map = { 3, TYPE_SCE, TYPE_CPE, TYPE_SCE }, - .reorder_map = { 2, 0, 1, 3 }, + .index = { { 0, 0 }, { 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_4POINT1, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 0 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, { 0 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CH_LAYOUT_2_2, + .num_ele = { 1, 1, 0, 0 }, + .pairing = { { 1 }, { 1 }, }, + .index = { { 0 }, { 1 }, }, + .config_map = { 2, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_QUAD, + .num_ele = { 1, 0, 1, 0 }, + .pairing = { { 1 }, { 0 }, { 1 }, }, + .index = { { 0 }, { 0 }, { 1 } }, + .config_map = { 2, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT0, + .num_ele = { 2, 1, 0, 0 }, + .pairing = { { 1, 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT1, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT0_BACK, + .num_ele = { 2, 0, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 } }, + .index = { { 0, 0 }, { 0 }, { 1 } }, + .config_map = { 3, TYPE_CPE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4 }, + }, + { + .layout = AV_CH_LAYOUT_5POINT1_BACK, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT0, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT0_FRONT, + .num_ele = { 2, 1, 0, 0 }, + .pairing = { { 1, 1 }, { 1 } }, + .index = { { 1, 0 }, { 2 }, }, + .config_map = { 3, TYPE_CPE, TYPE_CPE, TYPE_CPE, }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_HEXAGONAL, + .num_ele = { 2, 0, 2, 0 }, + .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, + .index = { { 0, 0 },{ 0 },{ 1, 1 } }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, }, + .reorder_map = { 0, 1, 2, 3, 4, 5 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT1, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 },{ 0 },{ 1, 0 }, }, + .index = { { 0, 0 },{ 1 },{ 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT1_BACK, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_6POINT1_FRONT, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT0, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT0_FRONT, + .num_ele = { 2, 1, 1, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1 }, }, + .index = { { 0, 0 }, { 1 }, { 2 }, }, + .config_map = { 4, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT1, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT1_WIDE, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 },{ 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CH_LAYOUT_7POINT1_WIDE_BACK, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 0 }, { 1, 1 }, }, + .index = { { 0, 0 }, { 1 }, { 1, 2 }, { 0 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_SCE, TYPE_CPE, TYPE_CPE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = AV_CH_LAYOUT_OCTAGONAL, + .num_ele = { 2, 1, 2, 0 }, + .pairing = { { 1, 0 }, { 1 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1 }, { 2, 1 } }, + .config_map = { 5, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7 }, + }, + { + .layout = 0x00000f37, //FL+FR+FC+BL+BR+BC+SL+SR+TC + .num_ele = { 2, 2, 2, 0 }, + .pairing = { { 1, 0 }, { 1, 0 }, { 1, 0 }, }, + .index = { { 0, 0 }, { 1, 1 }, { 2, 2 } }, + .config_map = { 6, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE, TYPE_CPE, TYPE_SCE }, + .reorder_map = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, + }, + { + .layout = 0x00000ff3, //FL+FR+BL+BR+FLC+FRC+BC+SL+SR+TC + .num_ele = { 2, 2, 2, 0 }, + .pairing = { { 1, 1 }, { 1, 0 }, { 1, 0 }, }, + .index = { { 0, 1 }, { 2, 0 }, { 3, 1 } }, + .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 }, + }, + { + .layout = AV_CH_LAYOUT_HEXADECAGONAL, + .num_ele = { 4, 2, 4, 0 }, + .pairing = { { 1, 0, 1, 0 }, { 1, 1 }, { 1, 0, 1, 0 }, }, + .index = { { 0, 0, 1, 1 }, { 2, 3 }, { 4, 2, 5, 3 } }, + .config_map = { 10, TYPE_CPE, TYPE_SCE, TYPE_CPE, 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, 12, 13, 14, 15 }, }, };