From patchwork Fri Feb 24 15:52:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Zhili X-Patchwork-Id: 40502 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:5494:b0:bf:7b3a:fd32 with SMTP id i20csp1366687pzk; Fri, 24 Feb 2023 07:52:41 -0800 (PST) X-Google-Smtp-Source: AK7set8Lv1+VDnvIRxE65KvWFbk5HMTvEzYuEtNR9WE4rDrh4/oDSLok/Uq378IQgJanpVDaOC1Q X-Received: by 2002:aa7:c558:0:b0:4af:7dff:7b8d with SMTP id s24-20020aa7c558000000b004af7dff7b8dmr2068384edr.17.1677253961081; Fri, 24 Feb 2023 07:52:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677253961; cv=none; d=google.com; s=arc-20160816; b=rFnM7iPamU6wymlXFVqJfV1Hv+/QrILLwqDwlBDramPgvCi8GSnfx/zAcIWklhlHWd 6lVTmmkbU+epUTzUim1iINCKqbBCa3mohlTvGXiFsO2myHvz/czwD+lUsqTP8Wt8ub6q Yv461ummo7fqtfsq+IhiQDVuYQhS0uBZ2HdQWRZEmQ0DvfO8vNQDNdaX4kUmsqLRhOHd BJc4IPwcBEraKF2cw37XOnKv7fqzSfDe5g9w4GTPqJ015RE93ra0hlqE7Zx8lSl3BnDi inPnBpafzhmJ90GU31J1MQ9uBB42evD3TrpOPKqA7LZn/QzPJBWIvRZMKism/3Jk/u8+ odiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to:date :to:from:message-id:dkim-signature:delivered-to; bh=W99yz5l/M7rTuvDXabSCyD1xH7ygQi6vWj8TNgHunIY=; b=w37p2FbbqnWA0pXdB6++C6znjaOfXGCmOFG3xbgXEipk/S+ldRcU9skvNYjJeCqIDG asXeh1eNPJMC2FNjFeo4q+gP68o96l0mSpFV+EKg4fK9aATH14+PQqnT0TW4TCx15wn2 G+RpAnVBKMfphy+DWh+Bdre57CEgSa0YzIQMucUBOgtsz2pdD0ewBYdzXk6swk2NLqZ4 Wsn4RLPaHBWqQkCAnGlHmmSJKLZ7VmJ7Z0/6womH6PPDvkNWvwMuZK6mKktfHi8M4hfG KqThZBekBOKJtU8ZuYLVR6DlA2VWDAcYarn7czbjn3l0gkCsRTBDlGnxjygXK1hEZRU9 x3hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@foxmail.com header.s=s201512 header.b=Cj794xtW; 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=foxmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ay22-20020a170907901600b008ded956ef67si11596091ejc.790.2023.02.24.07.52.40; Fri, 24 Feb 2023 07:52:41 -0800 (PST) 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=@foxmail.com header.s=s201512 header.b=Cj794xtW; 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=foxmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 29E7E68C13C; Fri, 24 Feb 2023 17:52:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out162-62-57-252.mail.qq.com (out162-62-57-252.mail.qq.com [162.62.57.252]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3EC2A68BFFE for ; Fri, 24 Feb 2023 17:52:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1677253946; bh=Ef33RE8mmgWvcTg2ETVgS6JphryPTdqCXOSAGTpu4Tk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Cj794xtWdZAUSGi0KfS80lp7M5kgGj2DsUJvdua1fs0LsmbAm5d0zVtj4FixEvzOy qPJPJgVYV2QhrnNGuz9AKdRUifYV2TTDDi5NdeSGeCogulExcyuZUrwZBq/Qzdicz/ f7fLMY85VVR/TpOm+2LnrgqCBAG6TFHDKbscGwyM= Received: from localhost.localdomain ([113.118.101.228]) by newxmesmtplogicsvrszc2-1.qq.com (NewEsmtp) with SMTP id D19BEA50; Fri, 24 Feb 2023 23:52:25 +0800 X-QQ-mid: xmsmtpt1677253945ts53dvg98 Message-ID: X-QQ-XMAILINFO: NiAdzfE16ND4wQXUaK5jmP7qSBqp+alIhT8tZssA5I124AvNCKfZ3n9KOv7luh 46Ouk6BSgz69/+L/vI2NveNAnETgFP2DjZfZz5bdbQ2YLCa2/lpazIynVCwUMqZ0hNKMtGy1z7QL otqPMjfX4Gw+stR6o0E9kANwwJ5NVCZ+LLZxPUNj4MOslekjLsB1GS7evOHLLx59gPWKd+0971mo wG4UqL/ptHBX9Hq/ZP0lx2gLO+xAKvkVHxu2x5bJ30kAZ0rMxG6eRwteHXpmrR//W0B6FKJ47zqK 1UmgQyBNuxHwjQXCCOILLu4oYrd6p815vdAn1hXY/DiBDUR3OTKmUm6Pmi570YnOvpZLSXkUrmHi 085F7jLBF6OzcljuYn5JufK/bi49NVXbJE5toESx/FD/qsyM4xhtPWWZj+/pHJ3eMfOJ7L5HqJ49 hUpUMekhp/kRductL/gzvoUyWCwjxdgnHFqqNKxeN99Gu7FTRCHxCcQSUmA8rLKhhbuM4NxVWPbR cr4PTmvU41gWEZ8mXnRbhc1uyC2EF+pRscIv1go4nwaVtnBQmvPApd9JpOyKxPyNwvlTC4augrrS RoQcf7ChqDavcdTfQEQ9LSuInRnks+235UfN4Ff3Cqqp4uYcD7ipPbT9NKVGGVbg54WwfJaZ58gO ZeYLdK6YqjvHKTfNEPHVhlW6gMNp0S9PSJaiWdW7xtX9b5xrIxQkbesLiy2Plavc1qE2u8JAl3UP fn70gDW5Ty4aG2AY+2PbGEd9Y7WSHhm2dAfiduu7hItyE9nBpRBxlezLY22Upjh2ZrGPyGo33/iL 7QaVf7zNZW6Y+H+yRnlnKquqvpZGB9CbNM9XqPRArpPlODrLAz2l/WA7XmXGD/jOHzcobC0Tipa1 yCq1LhoaP8A0ZZYpf9YCKS8mNmgXpeuZ7SOnRy8w3vQxGDsTXu5jWZIKcH9D0Yry/3teYhDsJmXl Wm6n7yYmyOk4AtVpi/LbfhVEOppUuvDCw8OVWQ6k5MYs4S6ZH71ykSiELg11pxNEmvtUXyYDI= From: Zhao Zhili To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Feb 2023 23:52:14 +0800 X-OQ-MSGID: <20230224155222.194400-1-quinkblack@foxmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <8bf59545-b8a1-bd88-f83c-ba0db7ee6f04@gmail.com> References: <8bf59545-b8a1-bd88-f83c-ba0db7ee6f04@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/9] libavutil/hdr_dynamic_vivid_metadata: fix three spline params 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 Cc: Zhao Zhili Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +LHFeAVTZ9oz From: Zhao Zhili There are two group of three_Spline params. Signed-off-by: Zhao Zhili --- doc/APIchanges | 4 ++ libavutil/hdr_dynamic_vivid_metadata.h | 63 +++++++++++++++++++++++++- libavutil/version.h | 3 +- 3 files changed, 68 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 0ba18e8609..4739ef47e9 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09 API changes, most recent first: +2023-02-24 - xxxxxxxxxx - lavu 58.4.100 - hdr_dynamic_vivid_metadata.h + Add two group of three spline params. + Deprecate previous define which only supports one group of params. + -------- 8< --------- FFmpeg 6.0 was cut here -------- 8< --------- 2023-02-16 - 927042b409 - lavf 60.2.100 - avformat.h diff --git a/libavutil/hdr_dynamic_vivid_metadata.h b/libavutil/hdr_dynamic_vivid_metadata.h index a34f83072c..4524a81557 100644 --- a/libavutil/hdr_dynamic_vivid_metadata.h +++ b/libavutil/hdr_dynamic_vivid_metadata.h @@ -24,6 +24,52 @@ #include "frame.h" #include "rational.h" +/** + * HDR Vivid three spline params. + */ +typedef struct AVHDRVivid3SplineParams { + /** + * The mode of three Spline. the value shall be in the range + * of 0 to 3, inclusive. + */ + int th_mode; + + /** + * three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive + * and in multiples of 1.0/255. + * + */ + AVRational th_enable_mb; + + /** + * 3Spline_TH_enable of three Spline. + * The value shall be in the range of 0.0 to 1.0, inclusive. + * and in multiples of 1.0/4095. + */ + AVRational th_enable; + + /** + * 3Spline_TH_Delta1 of three Spline. + * The value shall be in the range of 0.0 to 0.25, inclusive, + * and in multiples of 0.25/1023. + */ + AVRational th_delta1; + + /** + * 3Spline_TH_Delta2 of three Spline. + * The value shall be in the range of 0.0 to 0.25, inclusive, + * and in multiples of 0.25/1023. + */ + AVRational th_delta2; + + /** + * 3Spline_enable_Strength of three Spline. + * The value shall be in the range of 0.0 to 1.0, inclusive, + * and in multiples of 1.0/255. + */ + AVRational enable_strength; +} AVHDRVivid3SplineParams; + /** * Color tone mapping parameters at a processing window in a dynamic metadata for * CUVA 005.1:2021. @@ -122,46 +168,61 @@ typedef struct AVHDRVividColorToneMappingParams { */ int three_Spline_num; +#if FF_API_HDR_VIVID_THREE_SPLINE /** * The mode of three Spline. the value shall be in the range * of 0 to 3, inclusive. + * @deprecated Use three_spline instead */ + attribute_deprecated int three_Spline_TH_mode; /** * three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive * and in multiples of 1.0/255. - * + * @deprecated Use three_spline instead */ + attribute_deprecated AVRational three_Spline_TH_enable_MB; /** * 3Spline_TH_enable of three Spline. * The value shall be in the range of 0.0 to 1.0, inclusive. * and in multiples of 1.0/4095. + * @deprecated Use three_spline instead */ + attribute_deprecated AVRational three_Spline_TH_enable; /** * 3Spline_TH_Delta1 of three Spline. * The value shall be in the range of 0.0 to 0.25, inclusive, * and in multiples of 0.25/1023. + * @deprecated Use three_spline instead */ + attribute_deprecated AVRational three_Spline_TH_Delta1; /** * 3Spline_TH_Delta2 of three Spline. * The value shall be in the range of 0.0 to 0.25, inclusive, * and in multiples of 0.25/1023. + * @deprecated Use three_spline instead */ + attribute_deprecated AVRational three_Spline_TH_Delta2; /** * 3Spline_enable_Strength of three Spline. * The value shall be in the range of 0.0 to 1.0, inclusive, * and in multiples of 1.0/255. + * @deprecated Use three_spline instead */ + attribute_deprecated AVRational three_Spline_enable_Strength; +#endif + + AVHDRVivid3SplineParams three_spline[2]; } AVHDRVividColorToneMappingParams; diff --git a/libavutil/version.h b/libavutil/version.h index 900b798971..a89a0d406f 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 58 -#define LIBAVUTIL_VERSION_MINOR 3 +#define LIBAVUTIL_VERSION_MINOR 4 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -113,6 +113,7 @@ #define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_REORDERED_OPAQUE (LIBAVUTIL_VERSION_MAJOR < 59) #define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59) +#define FF_API_HDR_VIVID_THREE_SPLINE (LIBAVUTIL_VERSION_MAJOR < 59) /** * @}