Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-20 Thread Nuo Mi
On Sat, Feb 20, 2021 at 2:17 AM Jan Ekström wrote: > On Fri, Feb 19, 2021 at 3:52 PM Nuo Mi wrote: > > > >> > > > >> The current logic is that we are writing an AU, so the first NAL > unit in > > > >> it is necessarily an AU start and subsequent NAL units are not? > > > >> > > > > H.266 AU conta

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-19 Thread Jan Ekström
On Fri, Feb 19, 2021 at 3:52 PM Nuo Mi wrote: > > >> > > >> The current logic is that we are writing an AU, so the first NAL unit in > > >> it is necessarily an AU start and subsequent NAL units are not? > > >> > > > H.266 AU contains one or more PU(3.105). One PU contains one coded > > picture. >

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-19 Thread Nuo Mi
> > > > >> > >> The current logic is that we are writing an AU, so the first NAL unit in > >> it is necessarily an AU start and subsequent NAL units are not? > >> > > H.266 AU contains one or more PU(3.105). One PU contains one coded > picture. > > Only the first NAL unit of an AU needs the zero_by

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-18 Thread Mark Thompson
On 18/02/2021 15:20, Nuo Mi wrote: +return AVERROR(ENOMEM); +} +h266->ph = (H266RawPH*)h266->ph_ref->data; +memcpy(h266->ph, ¤t->sh_picture_header, sizeof(H266RawPH)); This memcpy() is naughty - if that was a ref to a previous picture header then you've

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-18 Thread Mark Thompson
On 18/02/2021 15:14, Nuo Mi wrote: On Thu, Feb 18, 2021 at 8:04 AM Mark Thompson wrote: On 17/02/2021 01:51, Nuo Mi wrote: --- configure |2 + libavcodec/Makefile |1 + libavcodec/cbs.c |6 + libavcodec/cb

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-18 Thread Nuo Mi
> >> > +return AVERROR(ENOMEM); >> > +} >> > +h266->ph = (H266RawPH*)h266->ph_ref->data; >> > +memcpy(h266->ph, ¤t->sh_picture_header, >> sizeof(H266RawPH)); >> >> This memcpy() is naughty - if that was a ref to a previous picture header >> then you've just o

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-18 Thread Nuo Mi
On Thu, Feb 18, 2021 at 8:04 AM Mark Thompson wrote: > On 17/02/2021 01:51, Nuo Mi wrote: > > --- > > configure |2 + > > libavcodec/Makefile |1 + > > libavcodec/cbs.c |6 + > > libavcodec/cbs_h2645.c

Re: [FFmpeg-devel] [PATCH v6 4/9] avcodec: add cbs for h266/vvc

2021-02-17 Thread Mark Thompson
On 17/02/2021 01:51, Nuo Mi wrote: --- configure |2 + libavcodec/Makefile |1 + libavcodec/cbs.c |6 + libavcodec/cbs_h2645.c| 541 - libavcodec/cbs_h266.h | 817 +++ l