From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id E146949798 for ; Sun, 19 May 2024 19:40:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D550868D030; Sun, 19 May 2024 22:40:09 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5D0ED68BEFE for ; Sun, 19 May 2024 22:40:03 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id E3F35EA6B0 for ; Sun, 19 May 2024 21:40:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g3tMI6yjjL2j for ; Sun, 19 May 2024 21:40:00 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id CC507EA6AB for ; Sun, 19 May 2024 21:39:59 +0200 (CEST) Date: Sun, 19 May 2024 21:39:59 +0200 (CEST) From: Marton Balint To: Lynne via ffmpeg-devel In-Reply-To: <20240519165444.829271-9-dev@lynne.ee> Message-ID: References: <20240519165444.829271-1-dev@lynne.ee> <20240519165444.829271-9-dev@lynne.ee> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2 8/8] aacdec: add a decoder for AAC USAC (xHE-AAC) X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sun, 19 May 2024, Lynne via ffmpeg-devel wrote: > This commit adds a decoder for the frequency-domain part of USAC. > [...] > > +/* Finish later */ > +static const enum AVChannel usac_ch_pos_to_av[64] = { > + [0] = AV_CHAN_FRONT_LEFT, > + [1] = AV_CHAN_FRONT_RIGHT, > + [2] = AV_CHAN_FRONT_CENTER, > + [3] = AV_CHAN_LOW_FREQUENCY, > + [4] = AV_CHAN_BACK_LEFT, // unsure > + [5] = AV_CHAN_BACK_RIGHT, // unsure > + [6] = AV_CHAN_FRONT_LEFT_OF_CENTER, > + [7] = AV_CHAN_FRONT_RIGHT_OF_CENTER, > + [8] = 0, /* rear surround left is missing */ > + [9] = 0, /* rear surround right is missing */ > + [10] = AV_CHAN_BACK_CENTER, > + [11] = AV_CHAN_SURROUND_DIRECT_LEFT, > + [12] = AV_CHAN_SURROUND_DIRECT_RIGHT, > + [13] = AV_CHAN_SIDE_LEFT, // fairly sure > + [14] = AV_CHAN_SIDE_RIGHT, // fairly sure > + [15] = AV_CHAN_WIDE_LEFT, // somewhat confident > + [16] = AV_CHAN_WIDE_RIGHT, // somewhat confident > + [17] = AV_CHAN_TOP_FRONT_LEFT, > + [18] = AV_CHAN_TOP_FRONT_RIGHT, > + [19] = AV_CHAN_TOP_FRONT_CENTER, > + [20] = AV_CHAN_TOP_BACK_LEFT, > + [21] = AV_CHAN_TOP_BACK_RIGHT, > + [22] = AV_CHAN_TOP_BACK_CENTER, > + [23] = AV_CHAN_TOP_SIDE_LEFT, > + [24] = AV_CHAN_TOP_SIDE_RIGHT, > + [25] = AV_CHAN_TOP_CENTER, > + [26] = AV_CHAN_LOW_FREQUENCY, // actually LFE2 > + [27] = AV_CHAN_BOTTOM_FRONT_LEFT, > + [28] = AV_CHAN_BOTTOM_FRONT_RIGHT, > + [29] = AV_CHAN_BOTTOM_FRONT_CENTER, > + [30] = 0, /* top left surround is missing */ > + [31] = 0, /* top right surround is missing */ > +}; Some comment would be nice about the source of this table (which document, which table). It looks very similar to the ISO channel positons used in mov_chan. I think we follow this mapping in most cases: Left Surround is SIDE_LEFT Right Surround is SIDE_RIGHT Rear Surround Left is BACK_LEFT Rear Surround Right is BACK_RIGHT So in your table [4] and [5] should be SIDE, [8] and [9] should be BACK. [26] can be AV_CHAN_LOW_FREQUENCY_2, we do have that. Yes, Left/Right Surround and Left/Right Side Surround will be the same, but those are not present in commonly used layouts at the same time. Regards, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".