[FFmpeg-devel] [PATCH 3/4] doc/filters: add tonemap_opencl document.

Ruiling Song ruiling.song at intel.com
Mon Oct 29 07:18:01 EET 2018


Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
 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
 
+ at 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
 
+ at section tonemap_opencl
+
+Perform HDR(PQ/HLG) to SDR conversion with tone-mapping.
+
+It accepts the following parameters:
+
+ at table @option
+ at item tonemap
+Specify the tone-mapping operator to be used. Same as tonemap option in @ref{tonemap}.
+
+ at item param
+Tune the tone mapping algorithm. same as param option in @ref{tonemap}.
+
+ at 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.
+
+ at 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.
+
+ at item format
+Specify the output pixel format.
+
+Currently supported formats are:
+ at table @var
+ at item p010
+ at item nv12
+ at end table
+
+ at item range, r
+Set the output color range.
+
+Possible values are:
+ at table @var
+ at item tv/mpeg
+ at item pc/jpeg
+ at end table
+
+Default is same as input.
+
+ at item primaries, p
+Set the output color primaries.
+
+Possible values are:
+ at table @var
+ at item bt709
+ at item bt2020
+ at end table
+
+Default is same as input.
+
+ at item transfer, t
+Set the output transfer characteristics.
+
+Possible values are:
+ at table @var
+ at item bt709
+ at item bt2020
+ at end table
+
+Default is bt709.
+
+ at item matrix, m
+Set the output colorspace matrix.
+
+Possible value are:
+ at table @var
+ at item bt709
+ at item bt2020
+ at end table
+
+Default is same as input.
+
+ at end table
+
+ at subsection Example
+
+ at itemize
+ at item
+Convert HDR(PQ/HLG) video to bt2020-transfer-characteristic p010 format using linear operator.
+ at example
+-i INPUT -vf "format=p010,hwupload,tonemap_opencl=t=bt2020:tonemap=linear:format=p010,hwdownload,format=p010" OUTPUT
+ at end example
+ at end itemize
+
 @section unsharp_opencl
 
 Sharpen or blur the input video.
-- 
2.7.4



More information about the ffmpeg-devel mailing list