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 50EA544897 for ; Sun, 30 Oct 2022 18:58:33 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BD67A68BD3C; Sun, 30 Oct 2022 20:58:31 +0200 (EET) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C141B68BCCA for ; Sun, 30 Oct 2022 20:58:24 +0200 (EET) Received: by mail-ua1-f46.google.com with SMTP id v8so4322205uap.12 for ; Sun, 30 Oct 2022 11:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=tektwv5BEseOGjA0pRGBzkA76o4wxufN9/gFGaVuZDo=; b=O6srzXETVN/Qb9aVdKLYMY3wmr5AEiXAAFbChAtoQaCeTfaICvdAl5vTGNcGaskjOf Y00iSVR6FilfbU6GprKi83J+unLf9B1xSr9b05J+cxn7KYG86oTbxv3gjOtyKU6V9nNI TWI7ZKR+HWKINm2qwarmYDn4sPdJKBWIPlmeks94muMwupEPS6TO8nh/wqTAvZpb6Hgr NQ2D05xfAQB64v6+NwImDj7TnbP1IeHc6qWrWkHIWRFKMYj81HOynkrwqkPfyNOEjTfE uXx9BwcWjeSJ5NoHMB+zQ8lq+8ulgmSrE7LZcmEsCOfBEKeoCUPQ5+XFaZrvrvMPk/eT jXCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:references:in-reply-to:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tektwv5BEseOGjA0pRGBzkA76o4wxufN9/gFGaVuZDo=; b=F+sHaGNw4OQntp0R2zCnzuRaWeqg+FJ/tyLT6PoegomJH/jticMUJfRvo+wFyz/9lP lSKF+wQElMvv+8beCeSw+bmI3F/yH5hj1y9ERum7xPtESDbBdkHnHyVWNbjd+QXILGMk 4PiUmoSSmt9j18CRLeUbHL7wfxRlVmxXRm/2ym4xCmFCX3KWMwgdcHK/iKd+W6nFYLKN 44p674dArQu4oyAUHjGo/azC87D9wefs3TZCh3sV4j0cmn+cmHKmSFzjRoTZTr7Ul7P+ SUpTkjU7/K0uT9TEsYxrECKhfF3Guf08UclZOc2vedfszffMwyx4wokducO26pJCkrqv r5QQ== X-Gm-Message-State: ACrzQf0n/zdaQqs4LpHab6/wlwR5OuOF+Td/iRQ5O0MSIOLZvMrJBqUr OF1XnrKzjlRWr0bcWrMUBs2HuQpylrSZ4PSfx3Q160RQ X-Google-Smtp-Source: AMsMyM54A5Ti+ReUx8JMTp7pbRfejt8ieqwYoCoUOIJcHgsQ1lYcatJONzaZ0PnWWNWdTqK5IS6/m8p8kPo2zjIwhPk= X-Received: by 2002:a9f:26a7:0:b0:3de:de10:4fc8 with SMTP id 36-20020a9f26a7000000b003dede104fc8mr3298124uay.38.1667156303311; Sun, 30 Oct 2022 11:58:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:612c:612:b0:314:ac6a:1eb7 with HTTP; Sun, 30 Oct 2022 11:58:22 -0700 (PDT) In-Reply-To: <01478b24-aae8-ad9c-9947-cefb696ffb39@gmail.com> References: <103b6b6c-5c56-2af7-bde6-1e1706d21930@gmail.com> <3a38e8dc-0c3a-eec2-9278-75f2bc6118aa@gmail.com> <01478b24-aae8-ad9c-9947-cefb696ffb39@gmail.com> From: Paul B Mahol Date: Sun, 30 Oct 2022 19:58:22 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avfilter: add ambisonic decoder filter 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 10/30/22, James Almer wrote: > On 10/30/2022 3:29 PM, Paul B Mahol wrote: >> On 10/30/22, James Almer wrote: >>> >>> >>> On 10/30/2022 3:19 PM, Paul B Mahol wrote: >>>> On 10/30/22, James Almer wrote: >>>>> On 10/30/2022 12:34 PM, Paul B Mahol wrote: >>>>>> +static const struct { >>>>>> + const int order; >>>>>> + const int inputs; >>>>>> + const int speakers; >>>>>> + const int near_field; >>>>>> + const int type; >>>>>> + const double xover; >>>>>> + const AVChannelLayout outlayout; >>>>>> + const double *speakers_azimuth; >>>>>> + const double *speakers_elevation; >>>>>> + const double *speakers_distance; >>>>>> +} ambisonic_tab[] = { >>>>>> + [MONO] = { >>>>>> + .order = 0, >>>>>> + .inputs = 1, >>>>>> + .speakers = 1, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO, >>>>>> + .speakers_azimuth = (const double[1]){ 0. }, >>>>>> + .speakers_distance = (const double[1]){ 1. }, >>>>>> + }, >>>>>> + [STEREO] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 2, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO, >>>>>> + .speakers_azimuth = (const double[2]){ -30, 30}, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [STEREO_DOWNMIX] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 2, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = >>>>>> (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO_DOWNMIX, >>>>>> + .speakers_azimuth = (const double[2]){ -90, 90 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [SURROUND] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 3, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_SURROUND, >>>>>> + .speakers_azimuth = (const double[3]){ -45, 45, 0 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [L2_1] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 3, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_2_1, >>>>>> + .speakers_azimuth = (const double[3]){ -45, 45, 180 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [TRIANGLE] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 3, >>>>>> + .type = 1, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_SURROUND, >>>>>> + .speakers_azimuth = (const double[3]){ -120, 120, 0 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [QUAD] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 4, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_QUAD, >>>>>> + .speakers_azimuth = (const double[4]){ -45, 45, -135, 135 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [SQUARE] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 4, >>>>>> + .type = 1, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_4POINT0, >>>>>> + .speakers_azimuth = (const double[4]){ 0, -90, 180, 90 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [L4_0] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 4, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_4POINT0, >>>>>> + .speakers_azimuth = (const double[4]){ -30, 30, 0, 180 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [L5_0] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 5, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = >>>>>> (AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT0_BACK, >>>>>> + .speakers_azimuth = (const double[5]){ -30, 30, 0, -145, 145 >>>>>> }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [L5_0_SIDE] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 5, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT0, >>>>>> + .speakers_azimuth = (const double[5]){ -30, 30, 0, -110, 110 >>>>>> }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [L6_0] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 6, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_6POINT0, >>>>>> + .speakers_azimuth = (const double[6]){ -30, 30, 0, 180, >>>>>> -110, >>>>>> 110 >>>>>> }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [L7_0] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 7, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_7POINT0, >>>>>> + .speakers_azimuth = (const double[7]){ -30, 30, 0, -145, >>>>>> 145, >>>>>> -110, 110 }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [TETRA] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 4, >>>>>> + .type = 2, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_QUAD, >>>>>> + .speakers_azimuth = (const double[4]){ -90, 90, 0, 180 }, >>>>>> + .speakers_elevation = (const double[4]){ -35.3, -35.3, 35.3, >>>>>> 35.3 >>>>>> }, >>>>>> + .speakers_distance = same_distance, >>>>>> + }, >>>>>> + [CUBE] = { >>>>>> + .order = 1, >>>>>> + .inputs = 4, >>>>>> + .speakers = 8, >>>>>> + .type = 2, >>>>>> + .near_field = NF_NONE, >>>>>> + .xover = 0., >>>>>> + .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_7POINT1, >>>>> >>>>> 7.1 defines an LFE channel, which is clearly not intended here, so it >>>>> should be either: >>>>> >>>>> .outlayout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MASK(8, >>>>> AV_CH_LAYOUT_QUAD | >>>>> AV_CH_TOP_FRONT_LEFT | >>>>> AV_CH_TOP_FRONT_RIGHT | >>>>> AV_CH_TOP_BACK_LEFT | >>>>> AV_CH_TOP_BACK_RIGHT), >>>>> >>>>> Or the AV_CHANNEL_LAYOUT_CUBE layout (using the exact same bitmask as >>>>> above) after the patch i sent just now is committed. >>>> >>>> CUBE is as real cube in 3d space. No current layout in API can be >>>> described correctly. >>> >>> the TOP_* channels are in a different height layer than the other >>> channels, namely above them. The result for this bitmask is a 3D cube >>> layout (Left and right speakers both front and back, in two different >>> height layers). >> >> https://en.wikipedia.org/wiki/Ambisonic_reproduction_systems#Cube > > "If all speakers are placed in room corners", So a 7.1 layout, besides > defining one channel as LFE, is also not ideal given that it defines two > speaker positions in places other than the room corners, and by no means > describes a 3D cube since all speakers are at the same height. > The TOP channel ids let you assign four channels to speakers placed in > the top room corners. 7.1 is there just because it have 8 channels. No other reasons. > _______________________________________________ > 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". > _______________________________________________ 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".