From patchwork Fri Aug 9 02:28:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 14352 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 44673449934 for ; Fri, 9 Aug 2019 05:36:37 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 11BB768A101; Fri, 9 Aug 2019 05:36:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EF79C68A101 for ; Fri, 9 Aug 2019 05:36:29 +0300 (EEST) Received: by mail-pl1-f194.google.com with SMTP id w24so44341179plp.2 for ; Thu, 08 Aug 2019 19:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=35LJ5R7ZPY9q4/dnQlbOFP4MbEerFB3XAtVOUbGKuLk=; b=QVO/yzcPzsRHgDIyOtrICfsX51de/G3IrCObZnUniSXrVcC7NgNmqp03aS7see++9f w+Xk7Yd2Epf9FwUO4/Jv9mFin6Dt8G16Qagt/hLoq5R+UgrDQylqRGjGLYIWW6c56psr CcgBdTrj80lKkTIiMdRV6FSC25nNf3QWNwwXkn/lrZEBiyDh8kHOsWnRqNwk0ermKp0h 29kSgjSgOB7pChBTcm822BhZZpGNB/vM8j4kcx9puzHIVUZBgQLY+IZoTBXi3ztDMTqy 2qFsvT0MLOfr3IFHre5bTvPQFc6AgMjYgnYYsZqG33Clvj84RpVb9rPO4HKEsgrT4iFH +UZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=35LJ5R7ZPY9q4/dnQlbOFP4MbEerFB3XAtVOUbGKuLk=; b=gbE8K7wD3l658Bn71/YF018Yh7JLzgY8xJyyeGGbqccPHpTMXa493+jiCEMrnD45zQ ezYQNIEbAfcAB8XeUgYK9QNeYkwHM4339cgr/kBXikh+PrUDZxQjTzY+AGXJ1mOIeQLV hqeMrWq2Y6YnzIFTCIjYf4aXWsLBCOavUFteoc8hEkQQyWU37Ko40eT4m6y8kcnkXC3+ bwhrreSAcMS/5Ots3HGJVCknnAV7BpkkS0YmLGqTXzHMnrE0Sab0ICiXXwWQwkfDizbJ nl/NQ+iHMFxrQpC2Q99cb6bsgEwXSNyLG6kML4EHj0Ibh13QKXoIUNcb7ZxYyxUft1C3 FKAQ== X-Gm-Message-State: APjAAAUYrL3Jpf814U3royE1n1RBfYUXTBNnvcZCPDwUB9hAZ0qnEtjQ 9ic+xsNwyB5gOp+RPhQQbvsrPz1m X-Google-Smtp-Source: APXvYqwSuaue7mEjLE+nwrWpz95Tugv4TGQhSxkSGICXjLzDMmC9+uzrGFtejUnYTIJ6yq4cG5e9Hw== X-Received: by 2002:a17:902:b48f:: with SMTP id y15mr17192199plr.268.1565317701111; Thu, 08 Aug 2019 19:28:21 -0700 (PDT) Received: from vpn.localdomain ([47.90.99.151]) by smtp.gmail.com with ESMTPSA id s15sm99621875pfd.183.2019.08.08.19.28.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Aug 2019 19:28:20 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Aug 2019 10:28:02 +0800 Message-Id: <20190809022802.9740-1-lance.lmwang@gmail.com> X-Mailer: git-send-email 2.9.5 Subject: [FFmpeg-devel] [PATCH v1] avfilter/showinfo: support Content Light Level information X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Limin Wang show real information instead of the unknown side data type message for HDR10 stream Signed-off-by: Limin Wang --- libavfilter/vf_showinfo.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 9fa322e404..3c13f11524 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -160,6 +160,15 @@ static void dump_mastering_display(AVFilterContext *ctx, AVFrameSideData *sd) av_q2d(mastering_display->min_luminance), av_q2d(mastering_display->max_luminance)); } +static void dump_content_light_metadata(AVFilterContext *ctx, AVFrameSideData *sd) +{ + AVContentLightMetadata* metadata = (AVContentLightMetadata*)sd->data; + + av_log(ctx, AV_LOG_INFO, "Content Light Level information: " + "MaxCLL=%d, MaxFALL=%d", + metadata->MaxCLL, metadata->MaxFALL); +} + static void dump_color_property(AVFilterContext *ctx, AVFrame *frame) { const char *color_range_str = av_color_range_name(frame->color_range); @@ -301,6 +310,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) case AV_FRAME_DATA_MASTERING_DISPLAY_METADATA: dump_mastering_display(ctx, sd); break; + case AV_FRAME_DATA_CONTENT_LIGHT_LEVEL: + dump_content_light_metadata(ctx, sd); + break; default: av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)", sd->type, sd->size);