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 5BDB241158 for ; Mon, 14 Feb 2022 23:45:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 119D468B1E7; Tue, 15 Feb 2022 01:44:38 +0200 (EET) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A892568B1BC for ; Tue, 15 Feb 2022 01:44:30 +0200 (EET) Received: by mail-pf1-f175.google.com with SMTP id l19so26103290pfu.2 for ; Mon, 14 Feb 2022 15:44:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CaQDlR9nQ1W2t574aByN1KEC6oiPebq2pwUK9q6vsMM=; b=FncOwkXZsVPU641X3LevsH4NWnxhkSw3WTsI8Med4DnAMBsLBTbp+C4RdMeDW6c6VL ddd6mUK+Cbu7C6G/fsyyGEKg6qoVpMUoNnU+E3jwVo/jMyN3YWtEA8HLV0vwnb7rmJi5 vne8753gRY2bxc32PpuBswB0qong0RZwejWNSiPRuhQGc3oItEKlXAwCoAS2K6R75F7B pPxTGnuoVIoWWHHuxwkRhkf0pzabLEEX8zVehN72TPpg5xiN3ogbdqcVVji7EMsfaaGR dSG/FEMYROw0KrzImxL5+cK6Ol+kbH9pRQsrjXedcagKiCxbomp6N4zL38wqMXrqlKFu z3xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CaQDlR9nQ1W2t574aByN1KEC6oiPebq2pwUK9q6vsMM=; b=AtneJe10HcyXpgAmBElSfbieRjK7rzJiTB/UaPshV4v+NWdIZFmxmhLLDFXacongN/ FYIcv+PEK2xFLLmeqF4dZfFEpli1bfG8xVKwiNnJKygc2hTjLEpwx1vBBUvLQgsSt1zu uKTj8Q5j5ORyWgvWABygzdvKDvAEikZg/kMYl2X9qSCv1Mige/jz9UPowiGcAz+esNva C2C+MkxsUFepEepi/WZ2B46mEA6EJXAsMeIQTyc41xBLFafaawCxhp5/3LXX993+xcr6 YCtb9EedkoX59/V84mojJhzd4zGM32W61eGcu0Z4dcNLjw+oNQi3c5W49Is1CBpM/DXm wChA== X-Gm-Message-State: AOAM530Qulfxxm0FgSrPK9JRvLMCLv/V7r7FNu7faP3sg7wqB7n5TyE1 CE9Ae+MHPLAUnuDGyoftzEM1tg2GH6E= X-Google-Smtp-Source: ABdhPJwwODVfyw7ilcOW/10jWJRQ0nheUkSX/GKBSJ5OkeKEjmFe2aJfYUjRimeUK9xDZp9pVUz5Uw== X-Received: by 2002:a05:6a00:22d1:: with SMTP id f17mr1142778pfj.13.1644882268839; Mon, 14 Feb 2022 15:44:28 -0800 (PST) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id mi7sm492304pjb.21.2022.02.14.15.44.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Feb 2022 15:44:28 -0800 (PST) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 15 Feb 2022 07:44:20 +0800 Message-Id: <1644882260-8559-4-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1644882260-8559-1-git-send-email-lance.lmwang@gmail.com> References: <1644882260-8559-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH 4/4] fftool/ffprobe: support for CUVA HDR Vivid metadata 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: Limin Wang MIME-Version: 1.0 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: From: Limin Wang Signed-off-by: Limin Wang --- fftools/ffprobe.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 8a8e3de..0e8f1d5 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -38,6 +38,7 @@ #include "libavutil/hash.h" #include "libavutil/hdr_dynamic_metadata.h" #include "libavutil/mastering_display_metadata.h" +#include "libavutil/hdr_dynamic_vivid_metadata.h" #include "libavutil/dovi_meta.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" @@ -2118,6 +2119,72 @@ static void print_dynamic_hdr10_plus(WriterContext *w, const AVDynamicHDRPlus *m } } +static void print_dynamic_hdr_vivid(WriterContext *w, const AVDynamicHDRVivid *metadata) +{ + if (!metadata) + return; + print_int("system_start_code", metadata->system_start_code); + print_int("num_windows", metadata->num_windows); + + for (int n = 0; n < metadata->num_windows; n++) { + const AVHDRVividColorTransformParams *params = &metadata->params[n]; + + print_q("minimum_maxrgb", params->minimum_maxrgb, '/'); + print_q("average_maxrgb", params->average_maxrgb, '/'); + print_q("variance_maxrgb", params->variance_maxrgb, '/'); + print_q("maximum_maxrgb", params->maximum_maxrgb, '/'); + } + + for (int n = 0; n < metadata->num_windows; n++) { + const AVHDRVividColorTransformParams *params = &metadata->params[n]; + + print_int("tone_mapping_mode_flag", params->tone_mapping_mode_flag); + print_int("tone_mapping_param_num", params->tone_mapping_param_num); + if (params->tone_mapping_mode_flag) { + for (int i = 0; i < params->tone_mapping_param_num; i++) { + const AVHDRVividColorToneMappingParams *tm_params = ¶ms->tm_params[i]; + + print_q("targeted_system_display_maximum_luminance", + tm_params->targeted_system_display_maximum_luminance, '/'); + if (tm_params->base_enable_flag) { + print_q("base_param_m_p", tm_params->base_param_m_p, '/'); + print_q("base_param_m_m", tm_params->base_param_m_m, '/'); + print_q("base_param_m_a", tm_params->base_param_m_a, '/'); + print_q("base_param_m_b", tm_params->base_param_m_b, '/'); + print_q("base_param_m_n", tm_params->base_param_m_n, '/'); + + print_int("base_param_k1", tm_params->base_param_k1); + print_int("base_param_k2", tm_params->base_param_k2); + print_int("base_param_k3", tm_params->base_param_k3); + print_int("base_param_Delta_enable_mode", + tm_params->base_param_Delta_enable_mode); + print_q("base_param_Delta", tm_params->base_param_Delta, '/'); + } + if (tm_params->three_Spline_flag) { + print_int("3Spline_num", tm_params->three_Spline_num); + print_int("3Spline_TH_mode", tm_params->three_Spline_TH_mode); + + for (int j = 0; j < tm_params->three_Spline_num; j++) { + print_q("3Spline_TH_enable_MB", tm_params->three_Spline_TH_enable_MB, '/'); + print_q("3Spline_TH", tm_params->three_Spline_TH, '/'); + print_q("3Spline_TH_Delta1", tm_params->three_Spline_TH_Delta1, '/'); + print_q("3Spline_TH_Delta2", tm_params->three_Spline_TH_Delta2, '/'); + print_q("3Spline_enable_Strength", tm_params->three_Spline_enable_Strength, '/'); + } + } + } + } + + print_int("color_saturation_mapping_flag", params->color_saturation_mapping_flag); + if (params->color_saturation_mapping_flag) { + print_int("color_saturation_num", params->color_saturation_num); + for (int i = 0; i < params->color_saturation_num; i++) { + print_q("color_saturation_gain", params->color_saturation_gain[i], '/'); + } + } + } +} + static void print_pkt_side_data(WriterContext *w, AVCodecParameters *par, const AVPacketSideData *side_data, @@ -2537,6 +2604,9 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, print_int("size", sd->size); } else if (sd->type == AV_FRAME_DATA_DOVI_METADATA) { print_dovi_metadata(w, (const AVDOVIMetadata *)sd->data); + } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_VIVID) { + AVDynamicHDRVivid *metadata = (AVDynamicHDRVivid *)sd->data; + print_dynamic_hdr_vivid(w, metadata); } writer_print_section_footer(w); } -- 1.8.3.1 _______________________________________________ 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".