From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 7F45C4E2E8 for ; Sun, 8 Jun 2025 14:29:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id BED2C68C1C5; Sun, 8 Jun 2025 17:29:25 +0300 (EEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2084.outbound.protection.outlook.com [40.92.91.84]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id B46D468B50A for ; Sun, 8 Jun 2025 17:29:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SNLaxACBoMYveY66ZUzh7L0Xihlm+qBgu+U9j8BcGpQIRFals+xcui+PoXHHF+NhAZFAQJ3Pqr2zYusknON53ToDyvAUjB90pZqckQuWWkhSFNJTL7+L90r1c5op46DWTqReyNvgGr7KmTqAw8Q+Vn95NoIirJvwVxSTV0kW0HNjQa4ripWbCOFhjrvvBKraMTrDez5OtgoOZ1O1wxAhYXU6yiSxiJClFPau0kDXNwHTl0G7KHs6v7Hj1avpnxjeqRWz532x2umdcdNFePJdJ+cMj7YFhHa6LA5U9aj7AqbwycF3OQPLgbtGstf8xKTH1fJqgWZUXY9VnYWOgbuEpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=19jB4+fzlXHmJJ/17HvfDiSBvWVmSSdYM+vRlF9yklM=; b=EhKcRU02PrvebRjWCwL1E8DqfJXhaLgtTvHne4z9aAj0RiWQRB5Dj2NFnbMj5YFlblb+f2SRHWRHhZRhyTt+cCCj/ci9QWNkDuspOLZA024IY2Hi9SCNhT4xxU/7ptWg4+Zho0tQWEBHgLSw4rXjTtVTFZv26Ia3xyq/c+BlIPq0gUIv0uuhxS8b0XfxRycRd+IRSY7EuOZj2FSanWF9fhwFu0MF1LMzl4wWEbs76Slm3b6hepcbTY4iWNIJEh8RCiYyv7lt/Z9xO5mD9CqJ50MDCWqotwV1aK7CosAKHPja3VqfxgGzCwlB5tl9+n6/jGPdjrmXmKo+rHBYSxFt7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=19jB4+fzlXHmJJ/17HvfDiSBvWVmSSdYM+vRlF9yklM=; b=AnvBPR7JHUqnT5U8Nk11YtWOkkUB/ZeggDfxhSo/2CHon89H20flGF1INNBRK4dwq/hdGXR75e24rTaHpLnZKyLixqBiVYGipb9fCnGj8tnITwb7pCHlTalPpToogfIwR+06/aqKnDIPw97kGdQiJSKoYJrvp8Z0J3y3GanAmqQIwKEyjrU5zIq/kUWK0Uaoo0PtTjy5TTqHwPHj+uKNNJNuWldjv99Pd2Spxmrvk8zGrAeUngZoKfVL4RWJwRNWTPPY0sgH2wqWkyjfPE455t7Tj2uvtuY/SWZbrSI2kGaS0yt2y8yONZQwxEm84dgP+1jaWu7jP8hVq2/gCtYrtw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by GVXP250MB1058.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:1b2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.35; Sun, 8 Jun 2025 14:29:18 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%5]) with mapi id 15.20.8792.034; Sun, 8 Jun 2025 14:29:18 +0000 Message-ID: Date: Sun, 8 Jun 2025 16:29:17 +0200 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20250607213509.16424-1-timo@rothenpieler.org> Content-Language: en-US From: Andreas Rheinhardt In-Reply-To: <20250607213509.16424-1-timo@rothenpieler.org> X-ClientProxiedBy: FR4P281CA0264.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:e8::18) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|GVXP250MB1058:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c57272b-a48d-49ea-1f9e-08dda698da18 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199028|5072599009|19110799006|15080799009|8060799009|7092599006|41001999006|6090799003|3412199025|440099028|12091999003; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Uy9Yb09hQkNDSkEvZUV3QjRvcklIWW8rcktpb0gwNE9ETE4ydkVJWktZcllQ?= =?utf-8?B?ZEtQejlUNkpENU1XZFgyRFlDdmp6S2tjOFR4ckxtUHE2d3hlb1JyRjVQaWxO?= =?utf-8?B?dzAvcHBWSUJKTUlVcFVuVmxyN2s1Rm5COFJ1Wm9nc0hCMmZpcDdlalh3Tld6?= =?utf-8?B?cnh0THB5ZzliM2plcHdIQnhZOGVHYm93TDNic0p6SXMvaUhydDF4bHc0U1Fa?= =?utf-8?B?V3NJTGR1ak5RVDUxRm53VytKUUxhWjdON2dzZVVERUZ5UjY5bHQ1UnYwWkt0?= =?utf-8?B?bWRvSTZHSU41UFQvZFBSa3UxKys1WnhMNFM4SnpHSjdLVnUra3d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hobGtrTTN0d3JsWU04Qndxdi85SEZ0VEdQVlVHUERt?= =?utf-8?B?cTZlZS82enJlZ05ta2FvUHByT3ZsYWx3UUlXZ2ZuVThRQytxYXlxU2c2ZVJw?= =?utf-8?B?ZlBPMWRLTkZ5WGNpcmRyOFFDUFVkaHl0N25hOElCVkNxQTJCY1pJZytOZktz?= =?utf-8?B?a1lLMzZ3MWRvTGVWMHJYTUx4QW12OU5QKzVuK2hycEpsc0lEek1ROHZOMEJl?= =?utf-8?B?eHpIRE1Xdm10RkJCazRzWWxUWDlRRnlaeUFoTGhqR3NiR1QxOFdtZE9JRTFr?= =?utf-8?B?WDBqeVErT2hHcmZ0S2hHd1hXYVpweFZ0a1ZoQk5mNWFYczFTamJ1ZkpER3Jv?= =?utf-8?B?TVV1YlhaeTY2UlFkQk5ZVFVtdy82YjlWT2NtQTZKbjQrMVdWcVpEM2NGTlBI?= =?utf-8?B?aWFoZGx4YU9qQkRscGQ2cElwb3BaRmRqZGdod3IvbkFORjZ5QmxVazBKbTJV?= =?utf-8?B?Uk5ieU5HZEZvWE0yS0R6T0phbk4wMk5abkVPWVlLMVdPVmJXZ1kvRHpMMUhG?= =?utf-8?B?Y2dyWkZKRVloSUFyY2tXdz09?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c57272b-a48d-49ea-1f9e-08dda698da18 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2025 14:29:18.3864 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXP250MB1058 Subject: Re: [FFmpeg-devel] [PATCH 1/7] avutil: add an API to handle 3D Reference Displays Information 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: Timo Rothenpieler: > From: James Almer > > As defined in section G.14.3.2.3 of ITU-T H.265, it's required for proper > signaling of MV-HEVC. > > Signed-off-by: James Almer > --- > libavutil/Makefile | 2 + > libavutil/tdrdi.c | 51 ++++++++++++++ > libavutil/tdrdi.h | 164 +++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 217 insertions(+) > create mode 100644 libavutil/tdrdi.c > create mode 100644 libavutil/tdrdi.h > > diff --git a/libavutil/Makefile b/libavutil/Makefile > index 9ef118016b..94a56bb72f 100644 > --- a/libavutil/Makefile > +++ b/libavutil/Makefile > @@ -85,6 +85,7 @@ HEADERS = adler32.h \ > sha512.h \ > spherical.h \ > stereo3d.h \ > + tdrdi.h \ > threadmessage.h \ > time.h \ > timecode.h \ > @@ -179,6 +180,7 @@ OBJS = adler32.o \ > slicethread.o \ > spherical.o \ > stereo3d.o \ > + tdrdi.o \ > threadmessage.o \ > time.o \ > timecode.o \ > diff --git a/libavutil/tdrdi.c b/libavutil/tdrdi.c > new file mode 100644 > index 0000000000..26192a1d2f > --- /dev/null > +++ b/libavutil/tdrdi.c > @@ -0,0 +1,51 @@ > +/* > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#include > +#include > + > +#include "mem.h" > +#include "tdrdi.h" > + > +AV3DReferenceDisplaysInfo *av_tdrdi_alloc(unsigned int nb_displays, size_t *out_size) > +{ > + struct TestStruct { > + AV3DReferenceDisplaysInfo p; > + AV3DReferenceDisplay b; > + }; > + const size_t entries_offset = offsetof(struct TestStruct, b); > + size_t size = entries_offset; > + AV3DReferenceDisplaysInfo *tdrdi; > + > + if (nb_displays > (SIZE_MAX - size) / sizeof(AV3DReferenceDisplay)) > + return NULL; > + size += sizeof(AV3DReferenceDisplay) * nb_displays; > + > + tdrdi = av_mallocz(size); > + if (!tdrdi) > + return NULL; > + > + tdrdi->num_ref_displays = nb_displays; > + tdrdi->entry_size = sizeof(AV3DReferenceDisplay); > + tdrdi->entries_offset = entries_offset; > + > + if (out_size) > + *out_size = size; > + > + return tdrdi; > +} > diff --git a/libavutil/tdrdi.h b/libavutil/tdrdi.h > new file mode 100644 > index 0000000000..8dcca42c7b > --- /dev/null > +++ b/libavutil/tdrdi.h > @@ -0,0 +1,164 @@ > +/* > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +/** > + * @file > + * @ingroup lavu_video_3d_reference_displays_info > + * Spherical video > + */ > + > +#ifndef AVUTIL_TDRDI_H > +#define AVUTIL_TDRDI_H > + > +#include > +#include > + > +#include "libavutil/avassert.h" > + > +/** > + * @defgroup lavu_video_3d_reference_displays_info 3D Reference Displays Information > + * @ingroup lavu_video > + * > + * The 3D Reference Displays Information describes information about the reference display > + * width(s) and reference viewing distance(s) as well as information about the corresponding > + * reference stereo pair(s). > + * @{ > + */ > + > +#define AV_TDRDI_MAX_NUM_REF_DISPLAY 32 > + > +/** > + * This structure describes information about the reference display width(s) and reference > + * viewing distance(s) as well as information about the corresponding reference stereo pair(s). > + * See section G.14.3.2.3 of ITU-T H.265 for more information. > + * > + * @note The struct must be allocated with av_tdrdi_alloc() and > + * its size is not a part of the public ABI. > + */ > +typedef struct AV3DReferenceDisplaysInfo { > + /** > + * The exponent of the maximum allowable truncation error for > + * {exponent,mantissa}_ref_display_width as given by 2(-prec_ref_display_width). > + */ > + uint8_t prec_ref_display_width; > + > + /** > + * A flag to indicate the presence of reference viewing distance. > + * If false, the values of prec_ref_viewing_dist, exponent_ref_viewing_distance, > + * and mantissa_ref_viewing_distance are undefined. > + */ > + uint8_t ref_viewing_distance_flag; > + > + /** > + * The exponent of the maximum allowable truncation error for > + * {exponent,mantissa}_ref_viewing_distance as given by 2^(-prec_ref_viewing_dist). > + * The value of prec_ref_viewing_dist shall be in the range of 0 to 31, inclusive. > + */ > + uint8_t prec_ref_viewing_dist; > + > + /** > + * The number of reference displays that are signalled in this struct. > + * Allowed range is 1 to 32, inclusive. > + */ > + uint8_t num_ref_displays; > + > + /** > + * Offset in bytes from the beginning of this structure at which the array > + * of reference displays starts. > + */ > + size_t entries_offset; > + > + /** > + * Size of each entry in bytes. May not match sizeof(AV3DReferenceDisplay). > + */ > + size_t entry_size; > +} AV3DReferenceDisplaysInfo; > + > +/** > + * Data structure for single deference display information. > + * It is allocated as a part of AV3DReferenceDisplaysInfo and should be retrieved with > + * av_tdrdi_get_display(). > + * > + * sizeof(AV3DReferenceDisplay) is not a part of the ABI and new fields may be > + * added to it. > +*/ > +typedef struct AV3DReferenceDisplay { > + /** > + * The ViewId of the left view of a stereo pair corresponding to the n-th reference display. > + */ > + uint16_t left_view_id; > + > + /** > + * The ViewId of the left view of a stereo pair corresponding to the n-th reference display. > + */ > + uint16_t right_view_id; > + > + /** > + * The exponent part of the reference display width of the n-th reference display. > + */ > + uint8_t exponent_ref_display_width; > + > + /** > + * The mantissa part of the reference display width of the n-th reference display. > + */ > + uint8_t mantissa_ref_display_width; > + > + /** > + * Tthe exponent part of the reference viewing distance of the n-th reference display. > + */ > + uint8_t exponent_ref_viewing_distance; > + > + /** > + * The mantissa part of the reference viewing distance of the n-th reference display. > + */ > + uint8_t mantissa_ref_viewing_distance; > + > + /** > + * An array of flags to indicates that the information about additional horizontal shift of > + * the left and right views for the n-th reference display is present. > + */ > + uint8_t additional_shift_present_flag; > + > + /** > + * The recommended additional horizontal shift for a stereo pair corresponding to the n-th > + * reference baseline and the n-th reference display. > + */ > + int16_t num_sample_shift; > +} AV3DReferenceDisplay; > + > +static av_always_inline AV3DReferenceDisplay* > +av_tdrdi_get_display(AV3DReferenceDisplaysInfo *tdrdi, unsigned int idx) > +{ > + av_assert0(idx < tdrdi->num_ref_displays); > + return (AV3DReferenceDisplay *)((uint8_t *)tdrdi + tdrdi->entries_offset + > + idx * tdrdi->entry_size); > +} > + > +/** > + * Allocate a AV3DReferenceDisplaysInfo structure and initialize its fields to default > + * values. > + * > + * @return the newly allocated struct or NULL on failure > + */ > +AV3DReferenceDisplaysInfo *av_tdrdi_alloc(unsigned int nb_displays, size_t *size); > + > +/** > + * @} > + */ > + > +#endif /* AVUTIL_TDRDI_H */ I don't like that you add another allocator for this; instead we should add a generic allocator for the frame side-data types. - Andreas _______________________________________________ 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".