[FFmpeg-devel] [PATCH 1/2] docs/filters: add documentation to all existing OpenCL filters

Gyan Doshi gyandoshi at gmail.com
Thu Aug 2 11:10:04 EEST 2018



On 31-07-2018 08:44 PM, Danil Iashchenko wrote:

> This hinders overall progress on the documentation and filter implementation of my GSoC project and there is not much time left. I suggest putting it on the backburner for the moment and leaving it out until the next patch.

  OK.

> + at item -init_hw_device @var{type}[=@var{name}][:@var{device}[, at var{key=value}...]]

s/type/opencl. This section is specifically opencl.

> + at item planes
> +Set which planes to filter. By default value @code{0xf}, all planes will be processed.

--> "Set which planes to filter. Default value is @code{0xf}, by which 
all planes are processed."

> + at item sizeY
> +Set vertical radius size, if zero it will be same as @code{sizeX}.
> +Range is @code{[1, 1024]} and default value is @code{0}.

--> "Set vertical radius size. Range is @code{[1, 1024]} and default 
value is @code{0}. If zero, @code{sizeX} value will be used."

> + at section convolution_opencl

> + at item 0mode
> + at item 1mode
> + at item 2mode
> + at item 3mode
> +Set matrix mode for each plane. Can be @var{square}, @var{row} or @var{column}.
> +Default is @var{square}.

The opencl filter does not have mode selection options, software one 
does. So I assume only square mode is used. Remove these entries and 
change the docs for the others to remove references to modes.

> + at section overlay_opencl

> + at item x
> +Set the x coordinate of the overlaid video on the main video.
> +By default value is @code{0}.

--> "Default value is @code{0}."

> + at item y
> +Set the x coordinate of the overlaid video on the main video.
> +By default value is @code{0}.

Same.

> +Insert a PNG logo in the top-left corner of the input

What if it's a JPG logo? :) See below.

> + at example
> +-i INPUT -i LOGO -filter_complex "[0:v]hwupload[a], [1:v]format=yuva420p, hwupload[b], [a][b]overlay_opencl, hwdownload" OUTPUT

So the reason, I suspect, you used PNG above is to indicate that pixel 
format conversion may be required. In your earlier patch version, you 
used JPG and no conversion.

So, for OpenCL, which all formats are acceptable without conversion? 
This should be mentioned just below the start of the overall section, 
after the device init part.

> + at section prewitt_opencl

> + at item planes
> +Set which planes will be processed, unprocessed planes will be copied.
> +By default value @code{0xf}, all planes will be processed.

Same as earlier.

> + at section roberts_opencl

> + at item planes
> +Set which planes will be processed, unprocessed planes will be copied.
> +By default value @code{0xf}, all planes will be processed.

Same as earlier.

> + at section sobel_opencl

> + at item planes
> +Set which planes will be processed, unprocessed planes will be copied.
> +By default value @code{0xf}, all planes will be processed.

Same as earlier.

> + at section unsharp_opencl

> + at item luma_msize_x, lx
> +Set the luma matrix horizontal size. It must be an odd integer between
> + at code{3} and @code{23}. The default value is @code{5}.

The source allows for value 1.

> + at item luma_msize_y, ly
 > + at item chroma_msize_x, cx
 > + at item chroma_msize_y, cy

Same.

> + at item luma_amount, la
> +Set the luma effect strength. It must be a floating point number, reasonable
> +values lay between @code{-1.5} and @code{1.5}.

Range missing.

> + at item chroma_amount, ca

Same.


I still had 3 warnings. In your editor, check for trailing whitespaces 
and remove those.


Regards,
Gyan


More information about the ffmpeg-devel mailing list