mbox series

[FFmpeg-devel,v7,00/11] Add support for H266/VVC

Message ID 20230321150124.21999-1-thomas.ff@spin-digital.com
Headers show
Series Add support for H266/VVC | expand

Message

Thomas Siedel March 21, 2023, 3:01 p.m. UTC
This patch set adds H266/VVC support.
This includes parsing, muxing, demuxing, decoding and encoding.
Decoding is done using the external library VVdeC
(https://github.com/fraunhoferhhi/vvdec.git) and can be enabled with
--enable-libvvdec.
Encoding is done using the external library VVenC
(https://github.com/fraunhoferhhi/vvenc.git) and can be enabled with
--enable-libvvenc.

For conformance testing, the following JVET bitstreams can be used:
https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/
DVB test streams can be found here:
https://dvb.org/specifications/verification-validation/vvc-test-content/ 
All JVET conformance bitstreams that are supported by VVdeC can be decoded. 
Pallete mode and multi-layer streams are unsupported.
The DVB MP4 and TS reference files can be decoded as well.

Changes since v6:

general:
- bugfix in movenc.c mov_write_vvcc_tag - set array_completness for vvc1
  not vvi1
- h266.c add VVC_DCI_NUT for array_completness as well
- libvvdec.c add support for FF_PROFILE_VVC_MAIN_10_444
- cbs_h265.c fix parse mp4/vvcc header properly

PATCH 2/11
  - cbs_h266_syntax_template: bugfix usage of AV_CEIL_RSHIFT() 
    (h266_ceil was replaced by AV_CEIL_RSHIFT(a,b) in v6, but 'b' must
be log2 )
  - cbs_h266_syntax_template: bugfix tile parsing
  - cbs_h265.c fix parsing of vvcc box in mp4 header properly

PATCH 6/11
  - h266.c::vvcc_array_add_nal_unit() array_completeness fix (add
    VVC_DCI_NUT)

PATCH 7/11
  - movenc.c::mov_write_vvcc_tag() array_completeness must be set for
    vvc1 not vvi1

PATCH 8/11
  - libvvdec.c bugfix add support for AV_PIX_FMT_GRAY8,
    AV_PIX_FMT_GRAY10
  - libvvdec.c add support for FF_PROFILE_VVC_MAIN_10_444 (yuv422p,
    yuv444p, yuv422p10, yuv444p10)
  - libvvdec.c remove double check for correct pix_fmt in
    ff_vvdec_decode_frame (already checked in ff_vvdec_set_pix_fmt)
  - h266_parse_extradata.c small bugfix (num_sublayers was parsed twice,
    now only at correct position) + cleanup

PATCH 9/11
  - configure fetch master due to changes for libvpx

PATCH 11/11
  - increase LIBAVCODEC_VERSION_MINOR to 7 


Nuo Mi (4):
  avcodec: add enum types for H266/VVC
  avcodec: add cbs for H266/VVC
  avcodec: add bitstream parser for H266/VVC
  avcodec: add h266_metadata_bsf support for H266/VVC

Thomas Siedel (7):
  avcodec: add MP4 to annexb support for H266/VVC
  avformat: add demuxer and probe support for H266/VVC
  avformat: add muxer support for H266/VVC
  avcodec: add external decoder libvvdec for H266/VVC
  avcodec: add external encoder libvvenc for H266/VVC
  avformat: add ts stream types for H266/VVC
  avcodec: increase minor version for H266/VVC

 configure                             |   16 +-
 libavcodec/Makefile                   |    6 +
 libavcodec/allcodecs.c                |    2 +
 libavcodec/bitstream_filters.c        |    2 +
 libavcodec/cbs.c                      |    6 +
 libavcodec/cbs_h2645.c                |  435 +++-
 libavcodec/cbs_h266.h                 |  793 +++++++
 libavcodec/cbs_h266_syntax_template.c | 3116 +++++++++++++++++++++++++
 libavcodec/cbs_internal.h             |    1 +
 libavcodec/cbs_sei.c                  |   29 +
 libavcodec/h2645_parse.c              |   71 +-
 libavcodec/h266.h                     |  142 ++
 libavcodec/h266_metadata_bsf.c        |  147 ++
 libavcodec/h266_mp4toannexb_bsf.c     |  329 +++
 libavcodec/h266_paramset.c            | 1005 ++++++++
 libavcodec/h266_paramset.h            |  307 +++
 libavcodec/h266_parse_extradata.c     |  246 ++
 libavcodec/h266_parse_extradata.h     |   36 +
 libavcodec/h266_parser.c              |  601 +++++
 libavcodec/libvvdec.c                 |  563 +++++
 libavcodec/libvvenc.c                 |  469 ++++
 libavcodec/parsers.c                  |    1 +
 libavcodec/version.h                  |    2 +-
 libavformat/Makefile                  |    8 +-
 libavformat/allformats.c              |    2 +
 libavformat/demux.c                   |    7 +-
 libavformat/h266.c                    |  998 ++++++++
 libavformat/h266.h                    |   99 +
 libavformat/h266dec.c                 |   61 +
 libavformat/isom.c                    |    1 +
 libavformat/isom_tags.c               |    3 +
 libavformat/mov.c                     |    6 +
 libavformat/movenc.c                  |   41 +-
 libavformat/mpeg.c                    |    3 +
 libavformat/mpeg.h                    |    1 +
 libavformat/mpegts.c                  |    2 +
 libavformat/mpegts.h                  |    1 +
 libavformat/mpegtsenc.c               |   65 +
 libavformat/rawenc.c                  |   23 +
 39 files changed, 9634 insertions(+), 12 deletions(-)
 create mode 100644 libavcodec/cbs_h266.h
 create mode 100644 libavcodec/cbs_h266_syntax_template.c
 create mode 100644 libavcodec/h266.h
 create mode 100644 libavcodec/h266_metadata_bsf.c
 create mode 100644 libavcodec/h266_mp4toannexb_bsf.c
 create mode 100644 libavcodec/h266_paramset.c
 create mode 100644 libavcodec/h266_paramset.h
 create mode 100644 libavcodec/h266_parse_extradata.c
 create mode 100644 libavcodec/h266_parse_extradata.h
 create mode 100644 libavcodec/h266_parser.c
 create mode 100644 libavcodec/libvvdec.c
 create mode 100644 libavcodec/libvvenc.c
 create mode 100644 libavformat/h266.c
 create mode 100644 libavformat/h266.h
 create mode 100644 libavformat/h266dec.c

Comments

James Almer June 29, 2023, 5:38 p.m. UTC | #1
On 3/21/2023 12:01 PM, Thomas Siedel wrote:
> This patch set adds H266/VVC support.
> This includes parsing, muxing, demuxing, decoding and encoding.
> Decoding is done using the external library VVdeC
> (https://github.com/fraunhoferhhi/vvdec.git) and can be enabled with
> --enable-libvvdec.
> Encoding is done using the external library VVenC
> (https://github.com/fraunhoferhhi/vvenc.git) and can be enabled with
> --enable-libvvenc.
> 
> For conformance testing, the following JVET bitstreams can be used:
> https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/
> DVB test streams can be found here:
> https://dvb.org/specifications/verification-validation/vvc-test-content/
> All JVET conformance bitstreams that are supported by VVdeC can be decoded.
> Pallete mode and multi-layer streams are unsupported.
> The DVB MP4 and TS reference files can be decoded as well.

I have pushed patches 1 to 6, and the raw muxer part of 7. Will look at 
the ISOBMFF and ts stuff better later, as well as the encoder wrapper.
Nuo Mi July 1, 2023, 11:24 a.m. UTC | #2
On Fri, Jun 30, 2023 at 1:39 AM James Almer <jamrial@gmail.com> wrote:

> On 3/21/2023 12:01 PM, Thomas Siedel wrote:
> > This patch set adds H266/VVC support.
> > This includes parsing, muxing, demuxing, decoding and encoding.
> > Decoding is done using the external library VVdeC
> > (https://github.com/fraunhoferhhi/vvdec.git) and can be enabled with
> > --enable-libvvdec.
> > Encoding is done using the external library VVenC
> > (https://github.com/fraunhoferhhi/vvenc.git) and can be enabled with
> > --enable-libvvenc.
> >
> > For conformance testing, the following JVET bitstreams can be used:
> >
> https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/
> > DVB test streams can be found here:
> > https://dvb.org/specifications/verification-validation/vvc-test-content/
> > All JVET conformance bitstreams that are supported by VVdeC can be
> decoded.
> > Pallete mode and multi-layer streams are unsupported.
> > The DVB MP4 and TS reference files can be decoded as well.
>
> I have pushed patches 1 to 6, and the raw muxer part of 7. Will look at
> the ISOBMFF and ts stuff better later, as well as the encoder wrapper.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
Great! Really appreciate it.
I'll send the native decoder v2 very soon.
Thomas Siedel July 3, 2023, 3:22 p.m. UTC | #3
On Thu, 29 Jun 2023 at 19:39, James Almer <jamrial@gmail.com> wrote:

> On 3/21/2023 12:01 PM, Thomas Siedel wrote:
> > This patch set adds H266/VVC support.
> > This includes parsing, muxing, demuxing, decoding and encoding.
> > Decoding is done using the external library VVdeC
> > (https://github.com/fraunhoferhhi/vvdec.git) and can be enabled with
> > --enable-libvvdec.
> > Encoding is done using the external library VVenC
> > (https://github.com/fraunhoferhhi/vvenc.git) and can be enabled with
> > --enable-libvvenc.
> >
> > For conformance testing, the following JVET bitstreams can be used:
> >
> https://www.itu.int/wftp3/av-arch/jvet-site/bitstream_exchange/VVC/draft_conformance/draft6/
> > DVB test streams can be found here:
> > https://dvb.org/specifications/verification-validation/vvc-test-content/
> > All JVET conformance bitstreams that are supported by VVdeC can be
> decoded.
> > Pallete mode and multi-layer streams are unsupported.
> > The DVB MP4 and TS reference files can be decoded as well.
>
> I have pushed patches 1 to 6, and the raw muxer part of 7. Will look at
> the ISOBMFF and ts stuff better later, as well as the encoder wrapper.
>

That is great, thank you for pushing the patches.