[FFmpeg-devel] [PATCH] avcodec/h264_parser: export sei recovery frame count as side data

Michael Niedermayer michaelni at gmx.at
Thu May 15 22:05:43 CEST 2014


On Thu, May 15, 2014 at 03:14:10PM +0900, Yusuke Nakamura wrote:
> 2014-05-15 6:17 GMT+09:00 Michael Niedermayer <michaelni at gmx.at>:
> 
> > TODO: split between API addition and h264 parser change
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavcodec/avcodec.h     |   13 +++++++++++++
> >  libavcodec/h264_parser.c |    2 ++
> >  libavcodec/parser.c      |    1 +
> >  libavformat/utils.c      |    6 ++++++
> >  4 files changed, 22 insertions(+)
> >
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index 9a24c96..61176be 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -1115,6 +1115,12 @@ enum AVPacketSideDataType {
> >       * side data includes updated metadata which appeared in the stream.
> >       */
> >      AV_PKT_DATA_METADATA_UPDATE,
> > +
> > +    AV_PKT_DATA_DECODER_RECOVERY,
> > +    /**
> > +     * signed LE 32bit integer specifying the number of codec specific
> > units
> > +     * (frames(h264) or POC(HEVC)) until the decoder output is clear or
> > artifacts
> > +     */
> >  };
> >
> >  typedef struct AVPacketSideData {
> > @@ -4263,6 +4269,13 @@ typedef struct AVCodecParserContext {
> >       * For example, this corresponds to H.264 PicOrderCnt.
> >       */
> >      int output_picture_number;
> > +
> > +    /**
> > +     * Number of frames or POC units until decoding is practically clear
> > of artifacts.
> > +     * The exact unit depends on the video standard, H.264 stores frame
> > count,
> > +     * HEVC, POC.
> > +     */
> > +    int recovery_frame_cnt;
> >  } AVCodecParserContext;
> >
> >
> Wrong.
> H.264/AVC doesn't store frame count.
> frame_num is not always increased monotonously.
> If picture is disposable, frame_num of that picture won't be increased.
> Disposable pictures are useless for recovery.

yes, that wording was fail on my side
fixed

will post a new revission in a moment with these corrections

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140515/80ea0b44/attachment.asc>


More information about the ffmpeg-devel mailing list