From patchwork Tue Feb 27 13:43:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 46567 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51b:b0:19e:cdac:8cce with SMTP id gm27csp1998146pzb; Tue, 27 Feb 2024 05:43:28 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXXmnW4xMfZnBMFaPIHhmBCOeM5iXWIoGHzcRg+j79F11NmNAJWjxKV+wedR4nPiD5EQkbfFchgFzc4LSfM3Mk+wa7nP9HPDFNh1Q== X-Google-Smtp-Source: AGHT+IFclYgKrfBP4nqoeNdwZnz/L5e1gMNsHbugYpGfqEO/5KRsWJH3Y5HUZsNzGqTxWH+B3D2T X-Received: by 2002:a17:907:1c25:b0:a43:bf24:6f7e with SMTP id nc37-20020a1709071c2500b00a43bf246f7emr1289561ejc.15.1709041408279; Tue, 27 Feb 2024 05:43:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709041408; cv=none; d=google.com; s=arc-20160816; b=NdFID+KGEASX14YFQE2EIZoctNfLBVI6ivPPHEi+qXxPfIK9TZyGwm4O71Yog4yaYI zGX5y6Y3jeEjv4zkwPoubuTfgLdvU56jFPCWVTfabiyPocj5Ue15glcgj2y8ld3vSLJD hYuX2vjbcPCTW+vFbKGr44x/sEmBJ9oe0/5gjig12VxKZQ7B9MqdJWl96cJiMiyv6pYg tVgmBgfGJGqlC217zjxa0lC4EUJmNw+VKMrQLgaG1p/O48pusXuON37kv7mDVe9Uv74U Crw0Y8FDDWqCpLQI+pNrrO4DOqAvOGmreD+6AM/KCl/MSyN+hCU3UsQwy67ypiR+sVI3 YnSA== 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:message-id:date:to:from :dkim-signature:delivered-to; bh=r7VGPZUlghH7a+7NbT+OKJF1N2+nRmUiFPSpjRbHhpQ=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=fNO/QyUXXPAsqqfbr5PobpWjHR0qWjnhUmGo+23wdtlQZRi+7v9VD/MngTM5iz7+C+ W36ByiIAB0Mw50SMPzwCHUNOQnvEAx2r7PrJBuNUTtB/K6INo616OYdZu2zMTp1kAPPW tszr9ieROV3AiIm9LIAv0X1vXJkFf0npccS7L1N/EfNN5rs1VLWK/ibaSJVSJ/O+OhHL H2JPYAGwrMOzqKZHU8tgc2eZ9n6pYqVfg9Jole6yqtCfx0X12xfPmUsblWUly2Aufl/v GGMi15buIrx18zZCOQ0rpxEFyAmbmmpAfKLzhEzGoA7SP8V6+YtAadKJT5mewdS8F8Ml WpJw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=ZXGETmr8; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bj19-20020a170906b05300b00a3eb0a46e52si744768ejb.724.2024.02.27.05.43.27; Tue, 27 Feb 2024 05:43:28 -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=@haasn.xyz header.s=mail header.b=ZXGETmr8; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1EC9968C81A; Tue, 27 Feb 2024 15:43:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C699E68C81A for ; Tue, 27 Feb 2024 15:43:17 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1709041396; bh=pgvev/w1o09dDvgzpVnYza+K8qMZWypTAgiJ5h3MBY4=; h=From:To:Cc:Subject:Date:From; b=ZXGETmr8+NmTUF7kXL68gQg6oEm8WcahysChJqgRg2q+v89XOa/7RTOmISEz5IcjS 9H49JMVau3hgaka1oGDQsmT7nBkRPwKtbaA4nHugcMqteI7PbyxtGTyYCIEbWzmE7f GabJJZz2cSlLruzfg5itzp2NlTr6v6v8rF3caEtY= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 56D88434A2; Tue, 27 Feb 2024 14:43:16 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Feb 2024 14:43:12 +0100 Message-ID: <20240227134313.46097-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_showinfo: add AVFilmGrainAOMParams support 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: BkUnwFF3Zgsb From: Niklas Haas For my own testing purposes. --- libavfilter/vf_showinfo.c | 42 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 309de28df91..830170363bc 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -462,8 +462,46 @@ static void dump_sei_film_grain_params_metadata(AVFilterContext *ctx, const AVFr switch (fgp->type) { case AV_FILM_GRAIN_PARAMS_NONE: - case AV_FILM_GRAIN_PARAMS_AV1: - return; + break; + case AV_FILM_GRAIN_PARAMS_AV1: { + const AVFilmGrainAOMParams *aom = &fgp->codec.aom; + const int num_ar_coeffs_y = 2 * aom->ar_coeff_lag * (aom->ar_coeff_lag + 1); + const int num_ar_coeffs_uv = num_ar_coeffs_y + !!aom->num_y_points; + av_log(ctx, AV_LOG_INFO, "y_points={ "); + for (int i = 0; i < aom->num_y_points; i++) + av_log(ctx, AV_LOG_INFO, "{%d, %d} ", aom->y_points[i][0], aom->y_points[i][1]); + av_log(ctx, AV_LOG_INFO, "}; chroma_scaling_from_luma=%d; ", aom->chroma_scaling_from_luma); + for (int uv = 0; uv < 2; uv++) { + av_log(ctx, AV_LOG_INFO, "uv_points[%d]={ ", uv); + for (int i = 0; i < aom->num_uv_points[uv]; i++) + av_log(ctx, AV_LOG_INFO, "{%d %d} ", aom->uv_points[uv][i][0], aom->uv_points[uv][i][1]); + av_log(ctx, AV_LOG_INFO, "}; "); + } + av_log(ctx, AV_LOG_INFO, "scaling_shift=%d; ", aom->scaling_shift); + av_log(ctx, AV_LOG_INFO, "ar_coeff_lag=%d; ", aom->ar_coeff_lag); + if (num_ar_coeffs_y) { + av_log(ctx, AV_LOG_INFO, "ar_coeffs_y={ "); + for (int i = 0; i < num_ar_coeffs_y; i++) + av_log(ctx, AV_LOG_INFO, "%d ", aom->ar_coeffs_y[i]); + av_log(ctx, AV_LOG_INFO, "}; "); + } + for (int uv = 0; num_ar_coeffs_uv && uv < 2; uv++) { + av_log(ctx, AV_LOG_INFO, "ar_coeffs_uv[%d]={ ", uv); + for (int i = 0; i < num_ar_coeffs_uv; i++) + av_log(ctx, AV_LOG_INFO, "%d ", aom->ar_coeffs_uv[uv][i]); + av_log(ctx, AV_LOG_INFO, "}; "); + } + av_log(ctx, AV_LOG_INFO, "ar_coeff_shift=%d; ", aom->ar_coeff_shift); + av_log(ctx, AV_LOG_INFO, "grain_scale_shift=%d; ", aom->grain_scale_shift); + for (int uv = 0; uv < 2; uv++) { + av_log(ctx, AV_LOG_INFO, "uv_mult[%d] = %d; ", uv, aom->uv_mult[uv]); + av_log(ctx, AV_LOG_INFO, "uv_mult_luma[%d] = %d; ", uv, aom->uv_mult_luma[uv]); + av_log(ctx, AV_LOG_INFO, "uv_offset[%d] = %d; ", uv, aom->uv_offset[uv]); + } + av_log(ctx, AV_LOG_INFO, "overlap_flag=%d; ", aom->overlap_flag); + av_log(ctx, AV_LOG_INFO, "limit_output_range=%d; ", aom->limit_output_range); + break; + } case AV_FILM_GRAIN_PARAMS_H274: { const AVFilmGrainH274Params *h274 = &fgp->codec.h274; const char *color_range_str = av_color_range_name(h274->color_range); From patchwork Tue Feb 27 13:43:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 46568 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c51b:b0:19e:cdac:8cce with SMTP id gm27csp1998227pzb; Tue, 27 Feb 2024 05:43:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWr0vEBW0plaDPrblXrzSc6emGQYYiC/MLVBqOebqD5SrPl5orb1zn/0VjkPuPH0+0eLUTimrkIe6KwLKOgzcf7FOsQXwZG4QcAGQ== X-Google-Smtp-Source: AGHT+IGV4ZzOqKMW2rCIWBNTgCyANb71Lc7H0iiX0XD2q16idYgnkonCSqrlfnub6I5KVvN5fLSQ X-Received: by 2002:a17:906:34cb:b0:a3f:7e1:5166 with SMTP id h11-20020a17090634cb00b00a3f07e15166mr6399263ejb.10.1709041416950; Tue, 27 Feb 2024 05:43:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709041416; cv=none; d=google.com; s=arc-20160816; b=g09AFbPXQvleylLj6GcnoYlkFZffY7+sm6zBjAo2NESf56iKLTHJICJcdUlaZdQMRZ NTxU0Ut2gGDsEcmnxj6x2xsJSMjIKhn/fy8h+Jo57RVT/qsvS0DhIXt70eeIlYSojZqF Ahrf0bOofAL0T3Clrry40NHo3qj2B2+VI5Mgf8+jwbJy6L5uF2b4fVPyEJIR2s1XchcY tAEbtScwBCUpEvyT/9KcZ+zN3Izz8S3cmirKYYi4BLjNc7r8pWf3uZZs8wihS7VHGWG9 6epVP/9Z7pTj1Zw99fO0+20eGz/FH/RzksPMefPdLxOFbYVgKG1zkcrBtB0F9H/LGgyU TjPA== 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 :message-id:date:to:from:dkim-signature:delivered-to; bh=nGwYZz5VKFJNiqFoFC/EO8Ywm819VyRDDH1OXSSxQl8=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=ztxix3Wlr91RAYC85uuLND5FkJfyHrfp/mW58zhAT52vPOJ4ftj885sGdcMvJWVpGm SX/5F3qqJ1dMQnHksu4pgw2iZhs1+2oKuwCcyn0tYsGaz26a1p11ijwItTDo+zavKuPY 4WXdDlNY8y3ir2NMnq0tqLOHFdL436vKxKCeXPWlytGf1uhYzdeuQySX7XZYyA0A7CKE yJoum81+IzMKzgmleDvc7RXwcI+wC545ySLMtygks1srOzIF1QphKyVP06vlc9LY4UHK wGwH1CVirU1/i6xznDWPuc/1kPlsQX9wFvDS/9LOJppv/250Wx+4wJugzzZv3JKDe7Xz SYRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=NFOtZq4i; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hh1-20020a170906a94100b00a3f02c29a14si702063ejb.948.2024.02.27.05.43.36; Tue, 27 Feb 2024 05:43:36 -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=@haasn.xyz header.s=mail header.b=NFOtZq4i; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F368668CB9F; Tue, 27 Feb 2024 15:43:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA06D68C91D for ; Tue, 27 Feb 2024 15:43:17 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1709041396; bh=w21xlG/687bdIvjxPiamxXT7oU98cUWczZE7AnhY290=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NFOtZq4iAFU31xbm5DmLR9vpasbE8qhj9UvtanSAwvbkF8Rprqf91rPwES1zZbvdI M04aHVfVFJLvH7SFfDzRMGeQb+dOr/gEC6IkQrF7GfHz5ceq3msGxMk73fhnAySKLp FfTQnOugy41Hm2r3D+jPK6t0ARnsEXJm+gmibxZg= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 9D7B143504; Tue, 27 Feb 2024 14:43:16 +0100 (CET) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Feb 2024 14:43:13 +0100 Message-ID: <20240227134313.46097-2-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240227134313.46097-1-ffmpeg@haasn.xyz> References: <20240227134313.46097-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] fftools/ffprobe: add AVFilmGrainParams printing 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: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: awpO7V2LzOSw From: Niklas Haas So we can add a FATE test for this. --- fftools/ffprobe.c | 118 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index ea225f14ab7..a2e02604dc5 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -39,6 +39,7 @@ #include "libavutil/bprint.h" #include "libavutil/channel_layout.h" #include "libavutil/display.h" +#include "libavutil/film_grain_params.h" #include "libavutil/hash.h" #include "libavutil/hdr_dynamic_metadata.h" #include "libavutil/mastering_display_metadata.h" @@ -2331,6 +2332,120 @@ static void print_ambient_viewing_environment(WriterContext *w, print_q("ambient_light_y", env->ambient_light_y, '/'); } +static void print_film_grain_params(WriterContext *w, + const AVFilmGrainParams *fgp) +{ + AVBPrint pbuf; + if (!fgp) + return; + + av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED); + + switch (fgp->type) { + case AV_FILM_GRAIN_PARAMS_NONE: + print_str("type", "none"); + break; + case AV_FILM_GRAIN_PARAMS_AV1: { + const AVFilmGrainAOMParams *aom = &fgp->codec.aom; + const int num_ar_coeffs_y = 2 * aom->ar_coeff_lag * (aom->ar_coeff_lag + 1); + const int num_ar_coeffs_uv = num_ar_coeffs_y + !!aom->num_y_points; + print_str("type", "av1"); + print_fmt("seed", "%"PRIu64, fgp->seed); + print_int("chroma_scaling_from_luma", aom->chroma_scaling_from_luma); + print_int("scaling_shift", aom->scaling_shift); + print_int("ar_coeff_lag", aom->ar_coeff_lag); + print_int("ar_coeff_shift", aom->ar_coeff_shift); + print_int("grain_scale_shift", aom->grain_scale_shift); + print_int("overlap_flag", aom->overlap_flag); + print_int("limit_output_range", aom->limit_output_range); + + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST); + + if (aom->num_y_points) { + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_COMPONENT); + + print_list_fmt("y_points_value", "%"PRIu8, aom->num_y_points, 1, aom->y_points[idx][0]); + print_list_fmt("y_points_scaling", "%"PRIu8, aom->num_y_points, 1, aom->y_points[idx][1]); + print_list_fmt("ar_coeffs_y", "%"PRId8, num_ar_coeffs_y, 1, aom->ar_coeffs_y[idx]); + + // SECTION_ID_FRAME_SIDE_DATA_COMPONENT + writer_print_section_footer(w); + } + + for (int uv = 0; uv < 2; uv++) { + if (!aom->num_uv_points[uv] && !aom->chroma_scaling_from_luma) + continue; + + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_COMPONENT); + + print_list_fmt("uv_points_value", "%"PRIu8, aom->num_uv_points[uv], 1, aom->uv_points[uv][idx][0]); + print_list_fmt("uv_points_scaling", "%"PRIu8, aom->num_uv_points[uv], 1, aom->uv_points[uv][idx][1]); + print_list_fmt("ar_coeffs_uv", "%"PRId8, num_ar_coeffs_uv, 1, aom->ar_coeffs_uv[uv][idx]); + print_int("uv_mult", aom->uv_mult[uv]); + print_int("uv_mult_luma", aom->uv_mult_luma[uv]); + print_int("uv_offset", aom->uv_offset[uv]); + + // SECTION_ID_FRAME_SIDE_DATA_COMPONENT + writer_print_section_footer(w); + } + + // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST + writer_print_section_footer(w); + break; + } + case AV_FILM_GRAIN_PARAMS_H274: { + const AVFilmGrainH274Params *h274 = &fgp->codec.h274; + const char *color_range_str = av_color_range_name(h274->color_range); + const char *color_primaries_str = av_color_primaries_name(h274->color_primaries); + const char *color_trc_str = av_color_transfer_name(h274->color_trc); + const char *color_space_str = av_color_space_name(h274->color_space); + print_str("type", "h274"); + print_fmt("seed", "%"PRIu64, fgp->seed); + print_int("model_id", h274->model_id); + print_str("color_range", color_range_str ? color_range_str : "unknown"); + print_str("color_primaries", color_primaries_str ? color_primaries_str : "unknown"); + print_str("color_trc", color_trc_str ? color_trc_str : "unknown"); + print_str("color_space", color_space_str ? color_space_str : "unknown"); + print_int("blending_mode_id", h274->blending_mode_id); + print_int("log2_scale_factor", h274->log2_scale_factor); + + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST); + + for (int c = 0; c < 3; c++) { + if (!h274->component_model_present[c]) + continue; + + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_COMPONENT); + print_int(c ? "bit_depth_chroma" : "bit_depth_luma", c ? h274->bit_depth_chroma : h274->bit_depth_luma); + + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST); + for (int i = 0; i < h274->num_intensity_intervals[c]; i++) { + + writer_print_section_header(w, NULL, SECTION_ID_FRAME_SIDE_DATA_PIECE); + print_int("intensity_interval_lower_bound", h274->intensity_interval_lower_bound[c][i]); + print_int("intensity_interval_upper_bound", h274->intensity_interval_upper_bound[c][i]); + print_list_fmt("comp_model_value", "%"PRId16, h274->num_model_values[c], 1, h274->comp_model_value[c][i][idx]); + + // SECTION_ID_FRAME_SIDE_DATA_PIECE + writer_print_section_footer(w); + } + + // SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST + writer_print_section_footer(w); + + // SECTION_ID_FRAME_SIDE_DATA_COMPONENT + writer_print_section_footer(w); + } + + // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST + writer_print_section_footer(w); + break; + } + } + + av_bprint_finalize(&pbuf, NULL); +} + static void print_pkt_side_data(WriterContext *w, AVCodecParameters *par, const AVPacketSideData *sd, @@ -2704,6 +2819,9 @@ static void print_frame_side_data(WriterContext *w, print_dynamic_hdr_vivid(w, metadata); } else if (sd->type == AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT) { print_ambient_viewing_environment(w, (const AVAmbientViewingEnvironment *)sd->data); + } else if (sd->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS) { + AVFilmGrainParams *fgp = (AVFilmGrainParams *)sd->data; + print_film_grain_params(w, fgp); } writer_print_section_footer(w); }