[FFmpeg-devel] [PATCH 1/2] lavc/hevc: store VPS/SPS/PPS data

Michael Niedermayer michael at niedermayer.cc
Fri Sep 9 03:36:20 EEST 2016


On Thu, Sep 08, 2016 at 04:18:26PM +0200, Matthieu Bouron wrote:
> On Thu, Sep 8, 2016 at 2:28 PM, Michael Niedermayer <michael at niedermayer.cc>
> wrote:
> 
> > On Wed, Sep 07, 2016 at 04:53:53PM +0200, Matthieu Bouron wrote:
> > > From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
> > >
> > > ---
> > >  libavcodec/hevc.h    |  9 +++++++++
> > >  libavcodec/hevc_ps.c | 27 +++++++++++++++++++++++++++
> > >  2 files changed, 36 insertions(+)
> > >
> > > diff --git a/libavcodec/hevc.h b/libavcodec/hevc.h
> > > index be91010..6a3c750 100644
> > > --- a/libavcodec/hevc.h
> > > +++ b/libavcodec/hevc.h
> > > @@ -387,6 +387,9 @@ typedef struct HEVCVPS {
> > >      uint8_t vps_poc_proportional_to_timing_flag;
> > >      int vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1
> > + 1
> > >      int vps_num_hrd_parameters;
> > > +
> > > +    uint8_t data[4096];
> > > +    int data_size;
> > >  } HEVCVPS;
> > >
> > >  typedef struct ScalingList {
> > > @@ -483,6 +486,9 @@ typedef struct HEVCSPS {
> > >      int vshift[3];
> > >
> > >      int qp_bd_offset;
> > > +
> > > +    uint8_t data[4096];
> > > +    int data_size;
> > >  } HEVCSPS;
> > >
> > >  typedef struct HEVCPPS {
> > > @@ -557,6 +563,9 @@ typedef struct HEVCPPS {
> > >      int *tile_pos_rs;       ///< TilePosRS
> > >      int *min_tb_addr_zs;    ///< MinTbAddrZS
> > >      int *min_tb_addr_zs_tab;///< MinTbAddrZS
> > > +
> > > +    uint8_t data[4096];
> > > +    int data_size;
> > >  } HEVCPPS;
> > >
> > >  typedef struct HEVCParamSets {
> > > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
> > > index 83f2ec2..629e454 100644
> > > --- a/libavcodec/hevc_ps.c
> > > +++ b/libavcodec/hevc_ps.c
> > > @@ -408,6 +408,15 @@ int ff_hevc_decode_nal_vps(GetBitContext *gb,
> > AVCodecContext *avctx,
> > >
> > >      av_log(avctx, AV_LOG_DEBUG, "Decoding VPS\n");
> > >
> > > +    vps->data_size = gb->buffer_end - gb->buffer;
> >
> > This theoretically could overflow, data_size is only an int the pointer
> > difference might be larger
> >
> 
> Updated patch attached.
> 
> [...]

>  hevc.h    |    9 +++++++++
>  hevc_ps.c |   36 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
> 74a311a04fc12daab6f9dc4dc228d3e2d574b12f  0001-lavc-hevc-store-VPS-SPS-PPS-data.patch
> From e25cc9920accb43dd4af152358b78160e85d64a2 Mon Sep 17 00:00:00 2001
> From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
> Date: Wed, 7 Sep 2016 11:36:10 +0200
> Subject: [PATCH 1/2] lavc/hevc: store VPS/SPS/PPS data

LGTM

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160909/b5c08307/attachment.sig>


More information about the ffmpeg-devel mailing list