From patchwork Thu Mar 2 13:19:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: yizhuo liu X-Patchwork-Id: 40566 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:d046:b0:cd:afd7:272c with SMTP id hv6csp4557168pzb; Thu, 2 Mar 2023 05:19:41 -0800 (PST) X-Google-Smtp-Source: AK7set8noHIDnLESOUtztG3pKgC8714QNsZ3QdLMtmc2XL10R1kpMWp07cGCw6NRf1eziJzdY8IR X-Received: by 2002:a17:906:714e:b0:8b2:8876:6a3c with SMTP id z14-20020a170906714e00b008b288766a3cmr11463029ejj.29.1677763181499; Thu, 02 Mar 2023 05:19:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677763181; cv=none; d=google.com; s=arc-20160816; b=EJoPrh4setew3fAMd0mAcGLOFe8Y9mP/w3vqj0geHErqZAnx3z0K6A5h9bw+RMk9Ml K6m++te5gI6mghdo3qd3ixJNuY0fxovucT1PS6rBd9aM5Un9hoPVgoF5XWsjBBOItFwU ZqRoDIOJd1nMdMEVGD/Lla9OWpbfKH7aRGYAlWN7NBUCcdpiJORtbre9Nm2uVZhKolAk sqfc3tfeP0D1FsnW9dtGXQjVJU6yUxu18KEzFGju8QsAVmCKVCcycokdro5SOYKi43+S x0GfiyDkZsJdW2SyZq2jvvm0725tVC04Dudqg433tbSmTp6broAmihIkRES8ZszzURfs bgbA== 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=TkhZMAHctBApfJSkJgjzyHj1AXgKS+pCa5GJOm507IQ=; b=Vk6W+Iz7F64aLMNBzDZQQKsjvjhTO/MrKWKAhtN4otzplmYTFhv8I6vow0FHg/tRxk mEBJOLKZPjVcr/AHm2oGQPvplIEdC5DGtBMaGWmzkxHcXND/sY8yKjsg86zuqQEixpOK LfZp6oGSjdDJOtSgHcbPK/Bu93hxuTZJaV6Smf4nhBNyJPcbfnJcYTMMTcMJAVoADoKb Dc4KtwrU3jSkdoXDUKMqLyP4o41e6dWLdyQphvBS6s0y5o1xVP4/GIoOERsmYCnZ0ONP F3Do5eoHPjGciPoYiGNkbuaHXl8uZ4K7ets9NzKtZ0ue4yo2hBF55et4jGwdCI5SXteb zctg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=AXxnTspQ; 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 lh2-20020a170906f8c200b008e0bd541c4fsi15670672ejb.883.2023.03.02.05.19.40; Thu, 02 Mar 2023 05:19: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=@gmail.com header.s=20210112 header.b=AXxnTspQ; 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 2EE7A68AC5A; Thu, 2 Mar 2023 15:19:37 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6E236800AA for ; Thu, 2 Mar 2023 15:19:30 +0200 (EET) Received: by mail-pl1-f182.google.com with SMTP id a2so7054288plm.4 for ; Thu, 02 Mar 2023 05:19:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677763168; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=69rIIk1t1uguvWyA/LY0mJAYeiqhf2Br6wpT46cm2ko=; b=AXxnTspQ54dE79eop3vWLA32DSVvkGsoWqgk4xcFm5Jxz0QZ8irnOeqTaNd3sw11QW Q2Fumitf5lao45OEIPAn4yFufltcE6bbDIy4MqdUH92O8S21syn7K9gY28f+YuV92P1y Wqvgo3KA1MAkCndoiefzfCPgn2KC4Z86NqpBjdftf++9s/TjccrIBrjjGP6s6QWwvF2q PwXDqXkrPBDs6RWpSyHayyjcYgz2Xq75c2IJje7EKZw5xJLawvQmDNsDfJ0eZIbFfCv/ yU7gLOKBiIQSDexAjWn7g7Fyw4imty7TmoHRn4UnWeo8n0uSVg25EavVjYX1mnmFLNPj X0Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677763168; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=69rIIk1t1uguvWyA/LY0mJAYeiqhf2Br6wpT46cm2ko=; b=rjws4hakrYJvCatbvliFyE8/E9UvPDJWEl7yxafaSXGJwOSXp3WHP3Sh7y4b93MbwK F2xHT3dO2DxXVwo5Jx5ylzKlBdKGv2RXC1FmN6sDN3zov0t2dPgz429Q7pqkTRZSvXdp cV8l2f4NDVs+OtswF8OMEXLGu8/8bTncu630G+ZnjcjyMzzO0i/j11JqeL9ofaFIdzqw FFtDobWwBLXloMIba6uKpnhyYk64F3jj8HGUvSSbJhy3djFCX9G+otEGCbrE52v+Kxwz hmwiMnVGgrtF20SqJQou6sVcwUGtVimxIvHoyHzZN3YwOu75oqxz+/s19uDhF/IhAsb2 lVVQ== X-Gm-Message-State: AO0yUKXwBcOSINKZROtmSVY6/7p75NlMm5Wwu5kLZgk6B6eL2zzPpTBV UzSaLJCcMREynE0RPZFvJ5dR8oRPZjc= X-Received: by 2002:a17:902:c20d:b0:19e:6969:b142 with SMTP id 13-20020a170902c20d00b0019e6969b142mr2603564pll.3.1677763168075; Thu, 02 Mar 2023 05:19:28 -0800 (PST) Received: from localhost.localdomain ([111.108.111.133]) by smtp.gmail.com with ESMTPSA id l10-20020a170902eb0a00b0019ce470b9fesm10461422plb.140.2023.03.02.05.19.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2023 05:19:27 -0800 (PST) From: liuyizhuo To: ffmpeg-devel@ffmpeg.org Date: Thu, 2 Mar 2023 21:19:18 +0800 Message-Id: <20230302131918.52113-1-yizhuo.liu753@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libavfilter/vf_signalstats.c: add new hsl(Hue, Saturation, Lightness) for filter signalstats v2 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: wangwei1237@gmail.com, "yizhuo.liu753@gmail.com" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: yNdGsl4rAbYs From: "yizhuo.liu753@gmail.com" --- libavfilter/vf_signalstats.c | 219 +++++++++++++++++- .../fate/filter-metadata-signalstats-yuv420p | 2 +- .../filter-metadata-signalstats-yuv420p10 | 2 +- 3 files changed, 220 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index b4d1029296..c6c505ec30 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -2,6 +2,8 @@ * Copyright (c) 2010 Mark Heath mjpeg0 @ silicontrip dot org * Copyright (c) 2014 Clément Bœsch * Copyright (c) 2014 Dave Rice @dericed + * Copyright (c) 2022 Wang Wei + * Copyright (c) 2022 Liu yizhuo * * This file is part of FFmpeg. * @@ -18,6 +20,11 @@ * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * +* @file + * Add Calculate the HSL color space information. + * HSL is a color space that is more perceptually uniform than RGB : + * https://en.wikipedia.org/wiki/HSL_and_HSV */ #include "libavutil/intreadwrite.h" @@ -25,6 +32,7 @@ #include "libavutil/pixdesc.h" #include "filters.h" #include "internal.h" +#include "libswscale/swscale.h" enum FilterMode { FILTER_NONE = -1, @@ -36,6 +44,8 @@ enum FilterMode { typedef struct SignalstatsContext { const AVClass *class; + int lumah; // height of luma plane + int lumaw; // width of luma plane int chromah; // height of chroma plane int chromaw; // width of chroma plane int hsub; // horizontal subsampling @@ -56,6 +66,11 @@ typedef struct SignalstatsContext { AVFrame *frame_sat; AVFrame *frame_hue; + AVFrame *frame_rgb; + + int *hsl_h; + int *hsl_s; + int *hsl_l; } SignalstatsContext; typedef struct ThreadData { @@ -65,9 +80,21 @@ typedef struct ThreadData { typedef struct ThreadDataHueSatMetrics { const AVFrame *src; - AVFrame *dst_sat, *dst_hue; + AVFrame *dst_sat, *dst_hue, *dst_h, *dst_s, *dst_l; } ThreadDataHueSatMetrics; +typedef struct ThreadDataHSLMetrics { + const AVFrame *src; + int *dst_h, *dst_s, *dst_l; +} ThreadDataHSLMetrics; + +typedef float num; + +static const float EPSILON = 1e-9; + +/** @brief Equal of A and B */ +#define EQ(A,B) ((fabs((A) - (B)) < EPSILON) ? 1 : 0) + #define OFFSET(x) offsetof(SignalstatsContext, x) #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM @@ -110,11 +137,15 @@ static av_cold void uninit(AVFilterContext *ctx) av_frame_free(&s->frame_prev); av_frame_free(&s->frame_sat); av_frame_free(&s->frame_hue); + av_frame_free(&s->frame_rgb); av_freep(&s->jobs_rets); av_freep(&s->histy); av_freep(&s->histu); av_freep(&s->histv); av_freep(&s->histsat); + av_freep(&s->hsl_h); + av_freep(&s->hsl_s); + av_freep(&s->hsl_l); } // TODO: add more @@ -151,6 +182,23 @@ static AVFrame *alloc_frame(enum AVPixelFormat pixfmt, int w, int h) return frame; } +static int config_input(AVFilterLink *inlink) +{ + // Video input data avilable + AVFilterContext *ctx = inlink->dst; + SignalstatsContext *s = ctx->priv; + + // free previous buffers in case they are allocated already + av_frame_free(&s->frame_rgb); + s->frame_rgb = alloc_frame(AV_PIX_FMT_RGB24, inlink->w, inlink->h); + + if (!s->frame_rgb) { + return AVERROR(ENOMEM); + } + + return 0; +} + static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; @@ -172,12 +220,22 @@ static int config_output(AVFilterLink *outlink) outlink->w = inlink->w; outlink->h = inlink->h; + s->lumaw = inlink->w; + s->lumah = inlink->h; + s->chromaw = AV_CEIL_RSHIFT(inlink->w, s->hsub); s->chromah = AV_CEIL_RSHIFT(inlink->h, s->vsub); s->fs = inlink->w * inlink->h; s->cfs = s->chromaw * s->chromah; + s->hsl_h = av_malloc_array(s->lumah, sizeof(*s->hsl_h)); + s->hsl_s = av_malloc_array(s->lumah, sizeof(*s->hsl_s)); + s->hsl_l = av_malloc_array(s->lumah, sizeof(*s->hsl_l)); + if (!s->hsl_h || !s->hsl_s || !s->hsl_l) { + return AVERROR(ENOMEM); + } + s->nb_jobs = FFMAX(1, FFMIN(inlink->h, ff_filter_get_nb_threads(ctx))); s->jobs_rets = av_malloc_array(s->nb_jobs, sizeof(*s->jobs_rets)); if (!s->jobs_rets) @@ -455,6 +513,110 @@ static const struct { {NULL} }; +static void YUV2RGB(const AVFrame* src, enum AVPixelFormat dstFormat, AVFrame* dst) +{ + int width = src->width; + int height = src->height; + + struct SwsContext* conversion = NULL; + conversion = sws_getContext(width, + height, + (enum AVPixelFormat)src->format, + width, + height, + dstFormat, + SWS_FAST_BILINEAR, + NULL, + NULL, + NULL); + sws_scale(conversion, (const uint8_t * const *)src->data, src->linesize, 0, height, dst->data, dst->linesize); + sws_freeContext(conversion); +} + +/** + * @brief Convert an sRGB color to Hue-Saturation-Lightness (HSL) + * + * @param H, S, L pointers to hold the result + * @param R, G, B the input sRGB values scaled in [0,1] + * + * This routine transforms from sRGB to the double hexcone HSL color space + * The sRGB values are assumed to be between 0 and 1. The outputs are + * H = hexagonal hue angle (0 <= H < 360), + * S = { C/(2L) if L <= 1/2 (0 <= S <= 1), + * { C/(2 - 2L) if L > 1/2 + * L = (max(R',G',B') + min(R',G',B'))/2 (0 <= L <= 1), + * where C = max(R',G',B') - min(R',G',B'). + * + * Wikipedia: http://en.wikipedia.org/wiki/HSL_and_HSV + */ +static void RGB2HSL(num *H, num *S, num *L, num R, num G, num B) +{ + num Max = FFMAX3(R, G, B); + num Min = FFMIN3(R, G, B); + num C = Max - Min; + + *L = (Max + Min) / 2; + + if (C > 0) { + if (EQ(Max, R)) { + *H = (G - B) / C; + + if (G < B) { + *H += 6; + } + } else if (EQ(Max, G)) { + *H = 2 + (B - R) / C; + } else { + *H = 4 + (R - G) / C; + } + + *H *= 60; + *S = (*L <= 0.5) ? (C/(2*(*L))) : (C/(2 - 2*(*L))); + } else { + *H = *S = 0; + } +} + +static int compute_hsl(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) +{ + int i, j; + num H, S, L; + ThreadDataHSLMetrics *td = arg; + const SignalstatsContext *s = ctx->priv; + const AVFrame *src = td->src; + int *dst_h = td->dst_h; + int *dst_s = td->dst_s; + int *dst_l = td->dst_l; + + const int slice_start = (s->lumah * jobnr ) / nb_jobs; + const int slice_end = (s->lumah * (jobnr+1)) / nb_jobs; + + const int lsz_src = src->linesize[0]; + const uint8_t *p_src = src->data[0] + slice_start * lsz_src; + + for (j = slice_start; j < slice_end; j++) { + int line_h = 0, line_s = 0, line_l = 0; + for (i = 0; i < s->lumaw; i++) { + const uint8_t rgbr = p_src[3 * i]; + const uint8_t rgbg = p_src[3 * i + 1]; + const uint8_t rgbb = p_src[3 * i + 2]; + + RGB2HSL(&H, &S, &L, 1.0 * rgbr / 255, 1.0 * rgbg / 255, 1.0 * rgbb / 255); + line_h += (uint16_t)(H + 0.5); + line_s += (uint8_t)(S * 100 + 0.5); + line_l += (uint8_t)(L * 100 + 0.5); + } + + dst_h[j] = line_h / s->lumaw; + dst_s[j] = line_s / s->lumaw; + dst_l[j] = line_l / s->lumaw; + + p_src += lsz_src; + } + + return 0; +} + static int compute_sat_hue_metrics8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) { int i, j; @@ -562,6 +724,7 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in) int accy, accu, accv; int accsat, acchue = 0; int medhue, maxhue; + int avgh = 0, avgs = 0, avgl = 0; int toty = 0, totu = 0, totv = 0, totsat=0; int tothue = 0; int dify = 0, difu = 0, difv = 0; @@ -604,6 +767,28 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in) ff_filter_execute(ctx, compute_sat_hue_metrics8, &td_huesat, NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx))); + // Calculate HSL information. + YUV2RGB(in, AV_PIX_FMT_RGB24, s->frame_rgb); + ThreadDataHSLMetrics td_hsl = { + .src = s->frame_rgb, + .dst_h = s->hsl_h, + .dst_s = s->hsl_s, + .dst_l = s->hsl_l, + }; + ff_filter_execute(ctx, compute_hsl, &td_hsl, + NULL, FFMIN(link->h, ff_filter_get_nb_threads(ctx))); + + int sumh = 0, sums = 0, suml = 0; + for (j = 0; j < s->lumah; j++) { + sumh += s->hsl_h[j]; + sums += s->hsl_s[j]; + suml += s->hsl_l[j]; + } + + avgh = sumh / s->lumah; + avgs = sums / s->lumah; + avgl = suml / s->lumah; + // Calculate luma histogram and difference with previous frame or field. memset(s->histy, 0, s->maxsize * sizeof(*s->histy)); for (j = 0; j < link->h; j++) { @@ -746,6 +931,10 @@ static int filter_frame8(AVFilterLink *link, AVFrame *in) SET_META("HUEMED", "%d", medhue); SET_META("HUEAVG", "%g", 1.0 * tothue / s->cfs); + SET_META("HAVG", "%d", avgh); + SET_META("SAVG", "%d", avgs); + SET_META("LAVG", "%d", avgl); + SET_META("YDIF", "%g", 1.0 * dify / s->fs); SET_META("UDIF", "%g", 1.0 * difu / s->cfs); SET_META("VDIF", "%g", 1.0 * difv / s->cfs); @@ -793,6 +982,7 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in) int accy, accu, accv; int accsat, acchue = 0; int medhue, maxhue; + int avgh = 0, avgs = 0, avgl = 0; int64_t toty = 0, totu = 0, totv = 0, totsat=0; int64_t tothue = 0; int64_t dify = 0, difu = 0, difv = 0; @@ -835,6 +1025,28 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in) ff_filter_execute(ctx, compute_sat_hue_metrics16, &td_huesat, NULL, FFMIN(s->chromah, ff_filter_get_nb_threads(ctx))); + // Calculate HSL information. + YUV2RGB(in, AV_PIX_FMT_RGB24, s->frame_rgb); + ThreadDataHSLMetrics td_hsl = { + .src = s->frame_rgb, + .dst_h = s->hsl_h, + .dst_s = s->hsl_s, + .dst_l = s->hsl_l, + }; + ff_filter_execute(ctx, compute_hsl, &td_hsl, + NULL, FFMIN(link->h, ff_filter_get_nb_threads(ctx))); + + int sumh = 0, sums = 0, suml = 0; + for (j = 0; j < s->lumah; j++) { + sumh += s->hsl_h[j]; + sums += s->hsl_s[j]; + suml += s->hsl_l[j]; + } + + avgh = sumh / s->lumah; + avgs = sums / s->lumah; + avgl = suml / s->lumah; + // Calculate luma histogram and difference with previous frame or field. memset(s->histy, 0, s->maxsize * sizeof(*s->histy)); for (j = 0; j < link->h; j++) { @@ -976,6 +1188,10 @@ static int filter_frame16(AVFilterLink *link, AVFrame *in) SET_META("UDIF", "%g", 1.0 * difu / s->cfs); SET_META("VDIF", "%g", 1.0 * difv / s->cfs); + SET_META("HAVG", "%d", avgh); + SET_META("SAVG", "%d", avgs); + SET_META("LAVG", "%d", avgl); + SET_META("YBITDEPTH", "%d", compute_bit_depth(masky)); SET_META("UBITDEPTH", "%d", compute_bit_depth(masku)); SET_META("VBITDEPTH", "%d", compute_bit_depth(maskv)); @@ -1009,6 +1225,7 @@ static const AVFilterPad signalstats_inputs[] = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_input, .filter_frame = filter_frame, }, }; diff --git a/tests/ref/fate/filter-metadata-signalstats-yuv420p b/tests/ref/fate/filter-metadata-signalstats-yuv420p index a42acc8f2b..695a93dedc 100644 --- a/tests/ref/fate/filter-metadata-signalstats-yuv420p +++ b/tests/ref/fate/filter-metadata-signalstats-yuv420p @@ -1 +1 @@ -pts=0|tag:lavfi.signalstats.UBITDEPTH=1|tag:lavfi.signalstats.YMIN=235|tag:lavfi.signalstats.YLOW=235|tag:lavfi.signalstats.YAVG=235|tag:lavfi.signalstats.YHIGH=235|tag:lavfi.signalstats.YMAX=235|tag:lavfi.signalstats.UMIN=128|tag:lavfi.signalstats.ULOW=128|tag:lavfi.signalstats.UAVG=128|tag:lavfi.signalstats.UHIGH=128|tag:lavfi.signalstats.UMAX=128|tag:lavfi.signalstats.VMIN=128|tag:lavfi.signalstats.VLOW=128|tag:lavfi.signalstats.VAVG=128|tag:lavfi.signalstats.VHIGH=128|tag:lavfi.signalstats.VMAX=128|tag:lavfi.signalstats.SATMIN=0|tag:lavfi.signalstats.SATLOW=0|tag:lavfi.signalstats.SATAVG=0|tag:lavfi.signalstats.SATHIGH=0|tag:lavfi.signalstats.SATMAX=0|tag:lavfi.signalstats.HUEMED=180|tag:lavfi.signalstats.HUEAVG=180|tag:lavfi.signalstats.YDIF=0|tag:lavfi.signalstats.UDIF=0|tag:lavfi.signalstats.VDIF=0|tag:lavfi.signalstats.YBITDEPTH=6|tag:lavfi.signalstats.VBITDEPTH=1 +pts=0|tag:lavfi.signalstats.UBITDEPTH=1|tag:lavfi.signalstats.YMIN=235|tag:lavfi.signalstats.YLOW=235|tag:lavfi.signalstats.YAVG=235|tag:lavfi.signalstats.YHIGH=235|tag:lavfi.signalstats.YMAX=235|tag:lavfi.signalstats.UMIN=128|tag:lavfi.signalstats.ULOW=128|tag:lavfi.signalstats.UAVG=128|tag:lavfi.signalstats.UHIGH=128|tag:lavfi.signalstats.UMAX=128|tag:lavfi.signalstats.VMIN=128|tag:lavfi.signalstats.VLOW=128|tag:lavfi.signalstats.VAVG=128|tag:lavfi.signalstats.VHIGH=128|tag:lavfi.signalstats.VMAX=128|tag:lavfi.signalstats.SATMIN=0|tag:lavfi.signalstats.SATLOW=0|tag:lavfi.signalstats.SATAVG=0|tag:lavfi.signalstats.SATHIGH=0|tag:lavfi.signalstats.SATMAX=0|tag:lavfi.signalstats.HUEMED=180|tag:lavfi.signalstats.HUEAVG=180|tag:lavfi.signalstats.HAVG=0|tag:lavfi.signalstats.SAVG=0|tag:lavfi.signalstats.LAVG=99|tag:lavfi.signalstats.YDIF=0|tag:lavfi.signalstats.UDIF=0|tag:lavfi.signalstats.VDIF=0|tag:lavfi.signalstats.YBITDEPTH=6|tag:lavfi.signalstats.VBITDEPTH=1 \ No newline at end of file diff --git a/tests/ref/fate/filter-metadata-signalstats-yuv420p10 b/tests/ref/fate/filter-metadata-signalstats-yuv420p10 index 1e5afd0820..7245a61fff 100644 --- a/tests/ref/fate/filter-metadata-signalstats-yuv420p10 +++ b/tests/ref/fate/filter-metadata-signalstats-yuv420p10 @@ -1 +1 @@ -pts=0|tag:lavfi.signalstats.UBITDEPTH=2|tag:lavfi.signalstats.YMIN=943|tag:lavfi.signalstats.YLOW=943|tag:lavfi.signalstats.YAVG=943|tag:lavfi.signalstats.YHIGH=943|tag:lavfi.signalstats.YMAX=943|tag:lavfi.signalstats.UMIN=514|tag:lavfi.signalstats.ULOW=514|tag:lavfi.signalstats.UAVG=514|tag:lavfi.signalstats.UHIGH=514|tag:lavfi.signalstats.UMAX=514|tag:lavfi.signalstats.VMIN=514|tag:lavfi.signalstats.VLOW=514|tag:lavfi.signalstats.VAVG=514|tag:lavfi.signalstats.VHIGH=514|tag:lavfi.signalstats.VMAX=514|tag:lavfi.signalstats.SATMIN=2|tag:lavfi.signalstats.SATLOW=2|tag:lavfi.signalstats.SATAVG=2|tag:lavfi.signalstats.SATHIGH=2|tag:lavfi.signalstats.SATMAX=2|tag:lavfi.signalstats.HUEMED=225|tag:lavfi.signalstats.HUEAVG=225|tag:lavfi.signalstats.YDIF=0|tag:lavfi.signalstats.UDIF=0|tag:lavfi.signalstats.VDIF=0|tag:lavfi.signalstats.YBITDEPTH=8|tag:lavfi.signalstats.VBITDEPTH=2 +pts=0|tag:lavfi.signalstats.UBITDEPTH=2|tag:lavfi.signalstats.YMIN=943|tag:lavfi.signalstats.YLOW=943|tag:lavfi.signalstats.YAVG=943|tag:lavfi.signalstats.YHIGH=943|tag:lavfi.signalstats.YMAX=943|tag:lavfi.signalstats.UMIN=514|tag:lavfi.signalstats.ULOW=514|tag:lavfi.signalstats.UAVG=514|tag:lavfi.signalstats.UHIGH=514|tag:lavfi.signalstats.UMAX=514|tag:lavfi.signalstats.VMIN=514|tag:lavfi.signalstats.VLOW=514|tag:lavfi.signalstats.VAVG=514|tag:lavfi.signalstats.VHIGH=514|tag:lavfi.signalstats.VMAX=514|tag:lavfi.signalstats.SATMIN=2|tag:lavfi.signalstats.SATLOW=2|tag:lavfi.signalstats.SATAVG=2|tag:lavfi.signalstats.SATHIGH=2|tag:lavfi.signalstats.SATMAX=2|tag:lavfi.signalstats.HUEMED=225|tag:lavfi.signalstats.HUEAVG=225|tag:lavfi.signalstats.YDIF=0|tag:lavfi.signalstats.UDIF=0|tag:lavfi.signalstats.VDIF=0|tag:lavfi.signalstats.HAVG=300|tag:lavfi.signalstats.SAVG=100|tag:lavfi.signalstats.LAVG=100|tag:lavfi.signalstats.YBITDEPTH=8|tag:lavfi.signalstats.VBITDEPTH=2 \ No newline at end of file