From patchwork Mon Oct 29 05:18:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruiling Song X-Patchwork-Id: 10829 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 4F3C644DD2C for ; Mon, 29 Oct 2018 07:20:39 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BCF3668A276; Mon, 29 Oct 2018 07:20:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 536106882C3 for ; Mon, 29 Oct 2018 07:20:02 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Oct 2018 22:20:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,438,1534834800"; d="scan'208";a="276433745" Received: from ruiling-skl2.sh.intel.com ([10.239.160.154]) by fmsmga006.fm.intel.com with ESMTP; 28 Oct 2018 22:20:29 -0700 From: Ruiling Song To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Oct 2018 13:18:01 +0800 Message-Id: <1540790282-29764-3-git-send-email-ruiling.song@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540790282-29764-1-git-send-email-ruiling.song@intel.com> References: <1540790282-29764-1-git-send-email-ruiling.song@intel.com> Subject: [FFmpeg-devel] [PATCH 3/4] doc/filters: add tonemap_opencl document. 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: Ruiling Song MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Ruiling Song --- doc/filters.texi | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 83df460..f884ba4 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -16387,6 +16387,7 @@ tmix=frames=3:weights="-1 2 -1":scale=1 @end example @end itemize +@anchor{tonemap} @section tonemap Tone map colors from different dynamic ranges. @@ -18440,6 +18441,101 @@ Apply sobel operator with scale set to 2 and delta set to 10 @end example @end itemize +@section tonemap_opencl + +Perform HDR(PQ/HLG) to SDR conversion with tone-mapping. + +It accepts the following parameters: + +@table @option +@item tonemap +Specify the tone-mapping operator to be used. Same as tonemap option in @ref{tonemap}. + +@item param +Tune the tone mapping algorithm. same as param option in @ref{tonemap}. + +@item desat +Apply desaturation for highlights that exceed this level of brightness. The +higher the parameter, the more color information will be preserved. This +setting helps prevent unnaturally blown-out colors for super-highlights, by +(smoothly) turning into white instead. This makes images feel more natural, +at the cost of reducing information about out-of-range colors. + +The default value is 0.5, and the algorithm here is a little different from +the cpu version tonemap currently. A setting of 0.0 disables this option. + +@item threshold +The tonemapping algorithm parameters is fine-tuned per each scene. And a threshold +is used to detect whether the scene has changed or not. If the distance beween +the current frame average brightness and the current running average exceeds +a threshold value, we would re-calculate scene average and peak brightness. +The default value is 0.2. + +@item format +Specify the output pixel format. + +Currently supported formats are: +@table @var +@item p010 +@item nv12 +@end table + +@item range, r +Set the output color range. + +Possible values are: +@table @var +@item tv/mpeg +@item pc/jpeg +@end table + +Default is same as input. + +@item primaries, p +Set the output color primaries. + +Possible values are: +@table @var +@item bt709 +@item bt2020 +@end table + +Default is same as input. + +@item transfer, t +Set the output transfer characteristics. + +Possible values are: +@table @var +@item bt709 +@item bt2020 +@end table + +Default is bt709. + +@item matrix, m +Set the output colorspace matrix. + +Possible value are: +@table @var +@item bt709 +@item bt2020 +@end table + +Default is same as input. + +@end table + +@subsection Example + +@itemize +@item +Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010 format using linear operator. +@example +-i INPUT -vf "format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010" OUTPUT +@end example +@end itemize + @section unsharp_opencl Sharpen or blur the input video.