From patchwork Fri Dec 10 10:32:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Wang X-Patchwork-Id: 32255 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp1588052iog; Fri, 10 Dec 2021 02:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCUsQ/drmel0jRcOGfY5Je2fC+g1jtDQrvAG+pFwVcXDdkmFgbH6H9jKWBR9gM/El5fceU X-Received: by 2002:aa7:dd56:: with SMTP id o22mr37517639edw.73.1639132450084; Fri, 10 Dec 2021 02:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639132450; cv=none; d=google.com; s=arc-20160816; b=zPfzxSVHpNFIEBf7xAgrZxf3epA0kdzzWtkJFbhd5lpAPBvxUuGTks4cQiQbmSUdZm JgypIYpT6ocHxAipzyslITbGXMwJppzSo5VOQmWbALYa5YlrxjQJvVhM0w7A6trzCwmN uWt6ti9gaOg8CbxPZBJVVWRbvwqeY3CT09F2mcsTBzI1YLmdUyylZJbAFp96SZJyC+3q ZzzSN2MlYUqU++HBMfZAHjPTvmZbqPDoDk1I/Z0llbafQTVlKp8j+YpHnh/MHb7zetBA eSDINuprFfdo+zOZ7A5A3s5vgPxlKaG3o8jHEdo/4acJNrWNZndzEFQMayCon+urHRTg zuPg== 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=AS5FoLS6L/TTP41DS2TOqElcpGE5TMpBJBDOSBVenPs=; b=oJJSJi92vf91eiOZ0PldGj5YkgEiOXsa8rQW+rE5PKFlfkbjYcKkaSsJEgig2Sm5+2 tqVl6JBFkYtx+BRo4CCYJMa3VGx+NqEbvNjkZ+6QRD2WY0ibuzm/5vjKEi9lwqVFCxeA Jeig9bPmhiiMhz+FVzoZ8RdcYSmyvu4ssGAbKAaDYMwQDm4cTP6zfqLpOWQ0r1C4uQla nVBASoiV7EPP3hHhzXZxPzbPaCxFFOIrzTLCvs4WRZ7VLGihL31rKcBBh8EJFGMQLvDh y+700eVcrPZXksk57LP3eIBTergbvkvWsF0tq1B6SjK2dgv9WKUJOVPGj9PxVhuHoyl1 LYpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=cHkenqFO; 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 yc17si3550648ejb.18.2021.12.10.02.34.09; Fri, 10 Dec 2021 02:34:10 -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=cHkenqFO; 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 D899B68AE10; Fri, 10 Dec 2021 12:34:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 344E268ACE5 for ; Fri, 10 Dec 2021 12:33:59 +0200 (EET) Received: by mail-pl1-f181.google.com with SMTP id b11so5973505pld.12 for ; Fri, 10 Dec 2021 02:33:59 -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=Ml1uffkiUw1o1qnNzWTS7aMxaiTShQ+fXhAfW9pdQlo=; b=cHkenqFOvl7KP1Ld/O/vdA5AH92grBGD5cTNB3uG2rgEiOY0YQiLlWnmLBY9TGlmqX rvCkDBPX5vPbTADHpPoNCnqyMnRgZfRWk6T3KrKnJQnQ0AFN9BSh6wZ/u2ILFMVqhMfJ Fdnqi2z782Qqn9GIgkEM16254N9TbeRzZR+/efPtedkmaYktgWO6ueU7Pniym/ATjXZW RXMsLjvpQ0LfiO3Wj5vDj3gfuWvgPN8cWfO6gU4wKzkEabGYPBiCPCScT8o9zgbTGoTG XSe/EZTYf7ErdQTS9NXddGpwprgZQKf7iRKJAgJEw+nylA9UF39uM6sCD7e+1O7F47w2 KOQQ== 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=Ml1uffkiUw1o1qnNzWTS7aMxaiTShQ+fXhAfW9pdQlo=; b=U0Y7AYaspual9eSMgtQ9Z7m91chqx4rZ8et54W8V7P6BXQHkOvQQR4neEQAitmojzk KhXHmojpOOwp0xlQvEsS9KGe32cghWvdOpkACaLWsPQKcNUjIL/+NtaqT5qVtFBOvPc+ bCm0ftniR7g2uotD3WQBsvah8meznpT8+jXLNcD+E1n4TE0w5F8L4bIBWODmBwKvqEQu KX3i8XVoAsYPsy1eyezn2GBe4BzikL7UOEKkhvCxkilczuk1eRFz7TB9iw7hW7E7KhOr UyQBb+ddNR9Qoi6uF6zlWP5vF8ONzXeuyl21feTd4qcDpP5zxKLol1akIjrNrrYASOv+ a/hw== X-Gm-Message-State: AOAM5316FVCtBjsOJy8Ft5tB7l8SWmXD8hitpDGYTPLd5pkYFDNyaK4Z ojsbLww4dzCvHrwItjxeF09W4eZJO8Q= X-Received: by 2002:a17:90b:4b04:: with SMTP id lx4mr22765405pjb.11.1639132436614; Fri, 10 Dec 2021 02:33:56 -0800 (PST) Received: from vpn2.localdomain ([161.117.202.209]) by smtp.gmail.com with ESMTPSA id v11sm3056854pfu.184.2021.12.10.02.33.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Dec 2021 02:33:56 -0800 (PST) From: lance.lmwang@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Fri, 10 Dec 2021 18:32:20 +0800 Message-Id: <1639132340-17692-1-git-send-email-lance.lmwang@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1639012783-32766-2-git-send-email-lance.lmwang@gmail.com> References: <1639012783-32766-2-git-send-email-lance.lmwang@gmail.com> Subject: [FFmpeg-devel] [PATCH v3 2/6] avfilter/af_astats: improve options descriptions 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: /sH1fgIfVq45 From: Limin Wang Signed-off-by: Limin Wang --- doc/filters.texi | 7 ++++--- libavfilter/af_astats.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 8eff460..e5059f2 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2886,16 +2886,17 @@ this @code{lavfi.astats.Overall.Peak_count}. For description what each key means read below. @item reset -Set number of frame after which stats are going to be recalculated. +Set the number of frames over which cumulative stats are calculated before +being reset Default is disabled. @item measure_perchannel -Select the entries which need to be measured per channel. The metadata keys can +Select the parameters which are measured per channel. The metadata keys can be used as flags, default is @option{all} which measures everything. @option{none} disables all per channel measurement. @item measure_overall -Select the entries which need to be measured overall. The metadata keys can +Select the parameters which are measured overall. The metadata keys can be used as flags, default is @option{all} which measures everything. @option{none} disables all overall measurement. diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index d0810b5..6c79257 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -114,8 +114,8 @@ typedef struct AudioStatsContext { static const AVOption astats_options[] = { { "length", "set the window length", OFFSET(time_constant), AV_OPT_TYPE_DOUBLE, {.dbl=.05}, 0, 10, FLAGS }, { "metadata", "inject metadata in the filtergraph", OFFSET(metadata), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS }, - { "reset", "recalculate stats after this many frames", OFFSET(reset_count), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS }, - { "measure_perchannel", "only measure_perchannel these per-channel statistics", OFFSET(measure_perchannel), AV_OPT_TYPE_FLAGS, {.i64=MEASURE_ALL}, 0, UINT_MAX, FLAGS, "measure" }, + { "reset", "Set the number of frames over which cumulative stats are calculated before being reset", OFFSET(reset_count), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS }, + { "measure_perchannel", "Select the parameters which are measured per channel", OFFSET(measure_perchannel), AV_OPT_TYPE_FLAGS, {.i64=MEASURE_ALL}, 0, UINT_MAX, FLAGS, "measure" }, { "none" , "", 0, AV_OPT_TYPE_CONST, {.i64=MEASURE_NONE }, 0, 0, FLAGS, "measure" }, { "all" , "", 0, AV_OPT_TYPE_CONST, {.i64=MEASURE_ALL }, 0, 0, FLAGS, "measure" }, { "DC_offset" , "", 0, AV_OPT_TYPE_CONST, {.i64=MEASURE_DC_OFFSET }, 0, 0, FLAGS, "measure" }, @@ -143,7 +143,7 @@ static const AVOption astats_options[] = { { "Number_of_NaNs" , "", 0, AV_OPT_TYPE_CONST, {.i64=MEASURE_NUMBER_OF_NANS }, 0, 0, FLAGS, "measure" }, { "Number_of_Infs" , "", 0, AV_OPT_TYPE_CONST, {.i64=MEASURE_NUMBER_OF_INFS }, 0, 0, FLAGS, "measure" }, { "Number_of_denormals" , "", 0, AV_OPT_TYPE_CONST, {.i64=MEASURE_NUMBER_OF_DENORMALS }, 0, 0, FLAGS, "measure" }, - { "measure_overall", "only measure_perchannel these overall statistics", OFFSET(measure_overall), AV_OPT_TYPE_FLAGS, {.i64=MEASURE_ALL}, 0, UINT_MAX, FLAGS, "measure" }, + { "measure_overall", "Select the parameters which are measured overall", OFFSET(measure_overall), AV_OPT_TYPE_FLAGS, {.i64=MEASURE_ALL}, 0, UINT_MAX, FLAGS, "measure" }, { NULL } };