[FFmpeg-devel] [PATCH] avcodec: Add dv marker bsf

Tobias Rapp t.rapp at noa-archive.com
Tue Mar 8 10:49:14 EET 2022


On 08/03/2022 00:17, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>   doc/bitstream_filters.texi       |  15 ++++
>   libavcodec/Makefile              |   1 +
>   libavcodec/bitstream_filters.c   |   1 +
>   libavcodec/dv_error_marker_bsf.c | 117 +++++++++++++++++++++++++++++++
>   4 files changed, 134 insertions(+)
>   create mode 100644 libavcodec/dv_error_marker_bsf.c
> 
> diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
> index a0092878c8..6a882ade97 100644
> --- a/doc/bitstream_filters.texi
> +++ b/doc/bitstream_filters.texi
> @@ -132,6 +132,21 @@ the header stored in extradata to the key packets:
>   ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
>   @end example
>   
> + at section dv_error_marker
> +
> +Blocks in DV which are marked as damaged are replaced by blocks of the specified color.
> +
> + at table @option
> + at item color
> +The color to replace damaged blocks by
> + at item sta
> +The error status to replace. If -1 then the stamask is used. -1 is the default.
> + at item stamask
> +A 16 bit mask which specifies which of the 16 possible error status values are
> +to be replaced by colored blocks. 0xFFFE is the default which replaces all non 0
> +error status values.
> + at end table
> +
>   @section eac3_core
> [...]
In my opinion it would be more user-friendly to use a single "status" 
option of AV_OPT_TYPE_FLAGS with "s0" ... "s15" constants, instead of 
the "sta"/"stamask" option pair. Maybe there also could be constants for 
hard errors (STA = 0111 / 1111) and error concealment types A/B/C to 
make the option value readable.

Also it would be nice to add the link to S314M documentation pages also 
in the option documentation.

Regards,
Tobias



More information about the ffmpeg-devel mailing list