From patchwork Thu May 30 13:08:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitrii Ovchinnikov X-Patchwork-Id: 49399 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:5c1:0:b0:460:55fa:d5ed with SMTP id 184csp306535vqf; Thu, 30 May 2024 06:20:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXUfLSbf+oAexrsMngdPI4NDFEOh63KScL5MbCDGnD9t/gsVYX/XtA98ohKyFYKNaTe29w5dgAa9Nsa7r2PQsNUcAcmvo0ztag2dg== X-Google-Smtp-Source: AGHT+IFynsE85vKkoLucqfOdVa/UekimNsfDgd4+kEhynh+cTxlp4Dby+OS6aNZXRRGwTvs7GJ9y X-Received: by 2002:a17:906:5a82:b0:a62:2cac:b78e with SMTP id a640c23a62f3a-a65f091c765mr163810766b.6.1717075210852; Thu, 30 May 2024 06:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717075210; cv=none; d=google.com; s=arc-20160816; b=VCjhneQLvj4NFYLqqXNTEkZrvBT5LFQzWKx3sR8kKJS0nVOhMh7qvq+DJeAA0BhWzL /zUIE40unH1y5HeSQl8YhMRDM3Gcqj7xgEtKrG3t9AvhvaZSQZEPcMFhh58Ovsy8XuB9 4yQH/qmr6XuuLObzbygXwHg1Zqah3AcGjfKMz8EFkZnhuRvtJxPqCIiB0b9qXb46fdTg 6tkCfqyrHsm3BAHaykDjpFuV3iK8Lue+TfCU8EDPGqu3T2IxK240R+jQiEyAcLnFwjZV 0FtlEj1pd0//lPjmYmhPvXlyQ6g6A1Picl9JzpnEg0k/foaL4ZKyvZ0PQn2gG5bwv1S9 4iug== 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=0EFNH2QP6E+RWjupEwv8iaETxKjG/hxZ8ajmeTVdfH4=; fh=l8BBgSaHK1qPkRTUMT3LasR23D+FgYCLMIPW5YpagSs=; b=zT6pQrRf+esHZoDVqZTQAQ5txWfotZFimOOALEwn7pEWUEo5G3tex/HXlmq1g1e7KE edyXCHxZOxnfVi1CXDcEbTnh8yittoqZxdLl8HEtnts42P5nb2HvsqR64u8Shp8fsPut amMEpCEtKljcPIstsCPyTsEVf1KDYz44cwICsfspIp8tqtZaMSfVZCguwlxpKE0EJGx5 kdTpnb2TI3Gmo9lHx2KNG79duXJTwY3/UwTmmKpkNAOQCKQWi1oyisbRadxgDeJ7IcZq XbbWqY7yqLCPnD/Ei4915eW+HCdzLYhwtRpEDJB7EfzyyP/zqPz389zvl7I8DjvPJy43 XM3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=TCdvQ2zN; 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 a640c23a62f3a-a6534fb3497si190116766b.205.2024.05.30.06.20.09; Thu, 30 May 2024 06:20:10 -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=20230601 header.b=TCdvQ2zN; 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 2328368D288; Thu, 30 May 2024 16:09:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BB8268D4D0 for ; Thu, 30 May 2024 16:09:02 +0300 (EEST) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4212a3e82b6so962545e9.0 for ; Thu, 30 May 2024 06:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717074541; x=1717679341; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vKdKfV2pwxycCOWpvaB4HL4BpKT/V9Q6ezsM3EPbySA=; b=TCdvQ2zNACcK7y0i9PtUMjAwJjAnLjaRKDHnext0YWzih4kDnRB2b5/YL/yQWxE/YY m+eGnKOUfBUsIooqf+5X+8V20lqv9g9HmSnxV7sADi+7mVc1KFeTAAscrK/RYoTCKKYI M33hfnouV4HdOk1/8KuYgNHFsNep5YnCYuKF7x+b4JDL7YKBU2uC+xBA1DjVvWcy8BN3 3XgXJ+1ha1thkGfnMwEQADV8F+Wudwfiz3/SIDA86Bhu8URYfC+Cx8vLfyQ+xUF7P1Gk YwWUk/kZIMW+ijXo6r0BJb25UxgPQZi3OcagsJ2neynRzrYpnkQDzaJ5XweA4irlXzZ+ zdHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717074541; x=1717679341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vKdKfV2pwxycCOWpvaB4HL4BpKT/V9Q6ezsM3EPbySA=; b=lVM0HzBP6bLSgYlseuMXjcg1YS2QLHOyyVhgEkeH+k++0KtI8p9zIY8WnDkG4nFQif gj9JM4D04uYMxQlAY5RbWniKatRdFAdUMuaUcexhOrbKX49qcoAClLbd2Z7thDk3VIme coJOT6ufiJ81K68UAPYiga7h1wFmWVlloopqg96Yh1gFfLEBSRgjwPax9ckM9XSllrzH rq1Ko7IXTOeAWo6TIIanrYop/XHLo0CnAXIbkgsO5uut1JRSyQKOf9sS3Mqfj3rNx98I 5C1kXbMh90/oGrTLaOFn9RV0z1hx5wPiAyNpoqra4hFOMDa8skOL1Z0N4dTRiUcAAfju 9uIQ== X-Gm-Message-State: AOJu0YxbVQXQXJUs2NQd4Ryn19SpCaisoq1NX5oa9vet9n77cgslksur f/o8edU9eLpI7b5MHFUkq30HSL7UhbIE6c3noRZrE5mXNzfwvjoDHsLwXu4yo1e1YTyAaT51Tw= = X-Received: by 2002:adf:f1c3:0:b0:34d:93c1:c7d8 with SMTP id ffacd0b85a97d-35dc7e1d141mr1715407f8f.4.1717074541198; Thu, 30 May 2024 06:09:01 -0700 (PDT) Received: from localhost.localdomain ([87.116.134.204]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3557dcf03c2sm17710671f8f.96.2024.05.30.06.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 06:09:00 -0700 (PDT) From: Dmitrii Ovchinnikov To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 May 2024 15:08:26 +0200 Message-ID: <20240530130826.374-10-ovchinnikov.dmitrii@gmail.com> X-Mailer: git-send-email 2.45.1.windows.1 In-Reply-To: <20240530130826.374-1-ovchinnikov.dmitrii@gmail.com> References: <20240530130826.374-1-ovchinnikov.dmitrii@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/10, v3] doc/filters: Add documentation for AMF filters 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: Evgeny Pavlov Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Pi3uVl14XHze From: Evgeny Pavlov Signed-off-by: Evgeny Pavlov --- doc/filters.texi | 238 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index f5bf475d13..78e87ff5f7 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -22791,6 +22791,76 @@ input upscaled using bicubic upscaling with proper scale factor. To get full functionality (such as async execution), please use the @ref{dnn_processing} filter. +@anchor{sr_amf} +@section sr_amf + +Upscale (size increasing) for the input video using AMD Advanced Media Framework library for hardware acceleration. +Use advanced algorithms for upscaling with higher output quality. +Setting the output width and height works in the same way as for the @ref{scale} filter. + +The filter accepts the following options: +@table @option +@item w +@item h +Set the output video dimension expression. Default value is the input dimension. + +Allows for the same expressions as the @ref{scale} filter. + +@item algorithm +Sets the algorithm used for scaling: + +@table @var +@item bilinear +Bilinear + +@item bicubic +Bicubic + +@item sr1-0 +Video SR1.0 +This is a default value + +@item point +Point + +@item sr1-1 +Video SR1.1 + +@end table + +@item sharpness +Control hq scaler sharpening. The value is a float in the range of [0.0, 2.0] + +@item format +Controls the output pixel format. By default, or if none is specified, the input +pixel format is used. + +@item keep-ratio +Force the scaler to keep the aspect ratio of the input image when the output size has a different aspect ratio. +Default value is false. + +@item fill +Specifies whether the output image outside the region of interest, +which does not fill the entire output surface should be filled with a solid color. + +@end table + +@subsection Examples + +@itemize +@item +Scale input to 720p, keeping aspect ratio and ensuring the output is yuv420p. +@example +sr_amf=-2:720:format=yuv420p +@end example + +@item +Upscale to 4K with algorithm video SR1.1. +@example +sr_amf=4096:2160:algorithm=sr1-1 +@end example +@end itemize + @section ssim Obtain the SSIM (Structural SImilarity Metric) between two input videos. @@ -25528,6 +25598,174 @@ Example: ffmpeg -i ref.mpg -vf vmafmotion -f null - @end example +@anchor{vpp_amf} +@section vpp_amf + +Scale (resize) and convert colorspace, transfer characteristics or color primaries for the input video, using AMD Advanced Media Framework library for hardware acceleration. +Setting the output width and height works in the same way as for the @ref{scale} filter. + +The filter accepts the following options: +@table @option +@item w +@item h +Set the output video dimension expression. Default value is the input dimension. + +Allows for the same expressions as the @ref{scale} filter. + +@item scale_type +Sets the algorithm used for scaling: + +@table @var +@item bilinear +Bilinear + +This is the default. + +@item bicubic +Bicubic + +@end table + +@item format +Controls the output pixel format. By default, or if none is specified, the input +pixel format is used. + + +@item force_original_aspect_ratio +@item force_divisible_by +Work the same as the identical @ref{scale} filter options. + +@anchor{color_profile} +@item color_profile +Specify all color properties at once. + +The accepted values are: +@table @samp +@item bt601 +BT.601 + +@item bt709 +BT.709 + +@item bt2020 +BT.2020 + +@end table + +@anchor{trc} +@item trc +Specify output transfer characteristics. + +The accepted values are: +@table @samp +@item bt709 +BT.709 + +@item gamma22 +Constant gamma of 2.2 + +@item gamma28 +Constant gamma of 2.8 + +@item smpte170m +SMPTE-170M + +@item smpte240m +SMPTE-240M + +@item linear +Linear + +@item log +LOG + +@item log-sqrt +LOG_SQRT + +@item iec61966-2-4 +iec61966-2-4 + +@item bt1361-ecg +BT1361_ECG + +@item iec61966-2-1 +iec61966-2-1 + +@item bt2020-10 +BT.2020 for 10-bits content + +@item bt2020-12 +BT.2020 for 12-bits content + +@item smpte2084 +SMPTE2084 + +@item smpte428 +SMPTE428 + +@item arib-std-b67 +ARIB_STD_B67 + +@end table + +@anchor{primaries} +@item primaries +Specify output color primaries. + +The accepted values are: +@table @samp +@item bt709 +BT.709 + +@item bt470m +BT.470M + +@item bt470bg +BT.470BG or BT.601-6 625 + +@item smpte170m +SMPTE-170M or BT.601-6 525 + +@item smpte240m +SMPTE-240M + +@item film +film + +@item bt2020 +BT.2020 + +@item smpte428 +SMPTE-428 + +@item smpte431 +SMPTE-431 + +@item smpte432 +SMPTE-432 + +@item jedec-p22 +JEDEC P22 phosphors + +@end table +@end table + +@subsection Examples + +@itemize +@item +Scale input to 720p, keeping aspect ratio and ensuring the output is yuv420p. +@example +vpp_amf=-2:720:format=yuv420p +@end example + +@item +Upscale to 4K and change color profile to bt2020. +@example +vpp_amf=4096:2160:color_profile=bt2020 +@end example +@end itemize + @anchor{vstack} @section vstack Stack input videos vertically.