From patchwork Tue Apr 5 13:47:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 35213 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp308811pzb; Tue, 5 Apr 2022 06:48:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymdLKZKAx5pe1OMziTDJjHc6LsGtgGDIbdPByoJONzFFQphO3imHs5eNQ/4jQwXe72Q/94 X-Received: by 2002:a17:906:3101:b0:6d6:5b64:906f with SMTP id 1-20020a170906310100b006d65b64906fmr3638254ejx.513.1649166480721; Tue, 05 Apr 2022 06:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649166480; cv=none; d=google.com; s=arc-20160816; b=X/fDqdVF4EDDV9Gew3ow8eh5WqoPuQFbvP/O57aC1by/kZAoojm+BXyCt7tfTGFExD EQDZcsi4fmfnNntMEJmcN1rkOODHakIgnv//j3vrwZ0FyfA7zWWyzRp2dIPxDLpARm56 rF+2n/5zyBTnNoN9eIlMXHEmGzwXugeGDLb0SqPSWi1z/o3jgZMh2aaZYDgIbWADA7sg WFLrDQDHPzBTLlil3tDjgJAevJKUeX07+0/WcLO+gbSbjAbGJ4okdepg1hmxAMTVHFPr A9zgRuZbz0Iv9Oc/zwrqj5X1pUQk/dPEIaUbzfEh7M6+y1WV2ZI7LFPY995sQRA2K70P nTAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=Xyr626iQUyYCZ7UkqdCH+5Ua4rOTHAO7ZY0owp6h0z0=; b=OPGZAuazRV9iFeGFO5x02bytr1RIr0XDwX81qDHAR9ztN1b1dzG1j+3taffjRK66bv a3RZIbIPKzWfw21I6WsJw/cZXTexgdm5WOzcuF5T142znzfgnmRpL+zfeLd7xZWZ22BF eDUcQ353bJhq+1Ao0J86NVF1+z1F3Qss5GW/7JCKIQCDFM5DK0UfZvMnZR40pPzO0ugL AYjRbecMp8SKA5C9n/ZL0cq1ot2CNw5U8OmHryPN5dqNMM7wSQoE20r5q1R2h2DyZ1o+ QsaYYva80XWCcuPwzA3mqxajf20PHKYMEcWF9xnK4JU7KxFRBgOi3RLuA+2FBeMU2rnm 6qDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Gedh2KDF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l9-20020aa7d949000000b00418c2b5bef5si9222219eds.471.2022.04.05.06.48.00; Tue, 05 Apr 2022 06:48:00 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=Gedh2KDF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AEC4968B20E; Tue, 5 Apr 2022 16:47:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D0B168B181 for ; Tue, 5 Apr 2022 16:47:19 +0300 (EEST) Received: by mail-pj1-f43.google.com with SMTP id kw18so5709307pjb.5 for ; Tue, 05 Apr 2022 06:47:19 -0700 (PDT) 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=HKdWzEY7zud1cy3cOd1FNJArkuPu6pApAuj5acwxKuE=; b=Gedh2KDFyf0YKy0ObpyQieLdJMErGotAjRzeLvicX8VzbOvR/JZU7sdhaAOztEnrs0 J63BP1H+xPlZ+bl6Sqq9KEZ9HggwqgvAzAkkswkz8TBK9sPb7yhXoYNO0BrMRmBgYKF9 zJ1Quem6ul1gCuv9BZQKxdDFm2f4n/H2pK02FpKrUA5n03Jt/aSAUNzRfdWqOfqfrmPv MzNHsIVEg03NYN4j0pdEG/aWIORBE7x7XRARWVQbFYVovqUlZQgK6bJ3gF7PYru+KKWc vmOVJFsR/Pa3MvgJ06xy36L3+a/COeWnZZyQvBA3uI6sKI6jfjprCG9F3SKRIn4J7Fkl kE8Q== 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=HKdWzEY7zud1cy3cOd1FNJArkuPu6pApAuj5acwxKuE=; b=GbyBw5SH532XnYg82iE7Iv2ToyiorNywre88ZVnperRguo+ggYhwuMXRA3esqW9iEP MHwaGvg0yhwwbfJpBRSu9SsO1O6Lb13EtgPcshAV39hxyvQok04vGhyYeCLSV1YJaL8s lNq7q3Y52PilbC5r/ke5VlNBgOxNpMjui0pKVEb9a4wQRZbzm3St8Yjn4JAXtoDJP/s3 TekezfkyzInYbT7py0ztS3Zdc3JdSLZ1lmva+CT4jB3bGZo9obX07bzrI2OIwAOw1Alm NkfKY74pHQJsHp5udCLlOz3riMSAroxh6Mutg/Ih9SK5/uzkkiArTv65oPy4wZEiOzTJ 2TMQ== X-Gm-Message-State: AOAM531Re8iKT+Azx4G2yquB5vTLWlEIVFFc/VfdKIVv/eTEzjKhhMmF jmnOc2Jow2uMHlR+ySY008zvyEs8tQMyTg== X-Received: by 2002:a17:90b:4c49:b0:1c7:d6c1:bb0f with SMTP id np9-20020a17090b4c4900b001c7d6c1bb0fmr4192833pjb.230.1649166437293; Tue, 05 Apr 2022 06:47:17 -0700 (PDT) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id c18-20020a056a000ad200b004f0f9696578sm17112705pfl.141.2022.04.05.06.47.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Apr 2022 06:47:17 -0700 (PDT) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 5 Apr 2022 21:47:06 +0800 Message-Id: <1649166427-9667-4-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1649166427-9667-1-git-send-email-lance.lmwang@gmail.com> References: <1648423513-21261-1-git-send-email-lance.lmwang@gmail.com> <1649166427-9667-1-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH v3 4/5] fftools/ffprobe: add support for ambient viewing environment 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HVcxg9Uimlvx From: Limin Wang Signed-off-by: Limin Wang --- fftools/ffprobe.c | 5 +++++ tests/ref/fate/hevc-dv-rpu | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 05c167e..a13b93e 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2605,6 +2605,11 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, AVContentLightMetadata *metadata = (AVContentLightMetadata *)sd->data; print_int("max_content", metadata->MaxCLL); print_int("max_average", metadata->MaxFALL); + } else if (sd->type == AV_FRAME_DATA_AMBIENT_VIEWING_ENV) { + AVAmbientViewingEnv *metadata = (AVAmbientViewingEnv *)sd->data; + print_int("ambient_illuminance", metadata->ambient_illuminance); + print_int("ambient_light_x", metadata->ambient_light_x); + print_int("ambient_light_y", metadata->ambient_light_y); } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) { const AVDictionaryEntry *tag = av_dict_get(sd->metadata, "name", NULL, AV_DICT_MATCH_CASE); if (tag) diff --git a/tests/ref/fate/hevc-dv-rpu b/tests/ref/fate/hevc-dv-rpu index 6879f71..4ad5436 100644 --- a/tests/ref/fate/hevc-dv-rpu +++ b/tests/ref/fate/hevc-dv-rpu @@ -119,6 +119,9 @@ source_diagonal=42 [/SIDE_DATA] [SIDE_DATA] side_data_type=Ambient Viewing Environment +ambient_illuminance=3140000 +ambient_light_x=15635 +ambient_light_y=16450 [/SIDE_DATA] [/FRAME] [FRAME] @@ -239,5 +242,8 @@ source_diagonal=42 [/SIDE_DATA] [SIDE_DATA] side_data_type=Ambient Viewing Environment +ambient_illuminance=3140000 +ambient_light_x=15635 +ambient_light_y=16450 [/SIDE_DATA] [/FRAME]