[FFmpeg-devel] [PATCH 4/6] lavc: Add coded bitstream read/write support for VP9

James Almer jamrial at gmail.com
Tue May 1 20:33:48 EEST 2018


On 4/30/2018 8:26 PM, Mark Thompson wrote:
> ---
> Main change since last time is including the array subscripts.  Constants are also cleaned up a bit, but stay in the cbs header (vp9.h could probably be taken over for this purpose, but currently it's an unnamespaced header used by the decoder so I haven't touched it).
> 
> 
>  configure                            |   2 +
>  doc/bitstream_filters.texi           |   2 +-
>  libavcodec/Makefile                  |   1 +
>  libavcodec/cbs.c                     |   6 +
>  libavcodec/cbs.h                     |   1 +
>  libavcodec/cbs_internal.h            |   1 +
>  libavcodec/cbs_vp9.c                 | 679 +++++++++++++++++++++++++++++++++++
>  libavcodec/cbs_vp9.h                 | 201 +++++++++++
>  libavcodec/cbs_vp9_syntax_template.c | 390 ++++++++++++++++++++
>  9 files changed, 1282 insertions(+), 1 deletion(-)
>  create mode 100644 libavcodec/cbs_vp9.c
>  create mode 100644 libavcodec/cbs_vp9.h
>  create mode 100644 libavcodec/cbs_vp9_syntax_template.c

LGTM. No apparent data copy on any of the read methods which is very
promising for the AV1 implementation.
Only CodedBitstreamType->write_unit() still seems a tad sub-optimal with
the temp write_buffer, especially in this module where unlike
mpeg2/h2645 you memcpy the data twice.

Can't really comment on the actual bitstream parsing code, but
trace_headers_bsf doesn't complain about any of the samples i tried.


More information about the ffmpeg-devel mailing list