diff mbox

[FFmpeg-devel,1/2] avcodec/hevc_ps: extract SPS fields required for hvcC construction

Message ID 20170927010810.66990-1-ffmpeg@tmm1.net
State Accepted
Commit c32077c0ee1bcc8e00f5a9a151d540adac33ea8c
Headers show

Commit Message

Aman Karmani Sept. 27, 2017, 1:08 a.m. UTC
From: Aman Gupta <aman@tmm1.net>

---
 libavcodec/hevc_ps.c | 3 ++-
 libavcodec/hevc_ps.h | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Sept. 27, 2017, 4:05 p.m. UTC | #1
On Tue, Sep 26, 2017 at 06:08:09PM -0700, Aman Gupta wrote:
> From: Aman Gupta <aman@tmm1.net>
> 
> ---
>  libavcodec/hevc_ps.c | 3 ++-
>  libavcodec/hevc_ps.h | 2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)

LGTM

thx

[...]
Aman Karmani Sept. 28, 2017, 11:55 p.m. UTC | #2
On Wed, Sep 27, 2017 at 9:05 AM, Michael Niedermayer <michael@niedermayer.cc
> wrote:

> On Tue, Sep 26, 2017 at 06:08:09PM -0700, Aman Gupta wrote:
> > From: Aman Gupta <aman@tmm1.net>
> >
> > ---
> >  libavcodec/hevc_ps.c | 3 ++-
> >  libavcodec/hevc_ps.h | 2 ++
> >  2 files changed, 4 insertions(+), 1 deletion(-)
>
> LGTM
>

applied


>
> thx
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker.
> User
> questions about the command line tools should be sent to the ffmpeg-user
> ML.
> And questions about how to use libav* should be sent to the libav-user ML.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
>
diff mbox

Patch

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 500fee03d8..902917d4dd 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -893,7 +893,7 @@  int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
         return AVERROR_INVALIDDATA;
     }
 
-    skip_bits1(gb); // temporal_id_nesting_flag
+    sps->temporal_id_nesting_flag = get_bits(gb, 1);
 
     if ((ret = parse_ptl(gb, avctx, &sps->ptl, sps->max_sub_layers)) < 0)
         return ret;
@@ -956,6 +956,7 @@  int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
                sps->bit_depth, bit_depth_chroma);
         return AVERROR_INVALIDDATA;
     }
+    sps->bit_depth_chroma = bit_depth_chroma;
 
     ret = map_pixel_format(avctx, sps);
     if (ret < 0)
diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h
index 4e6c3bc849..76f8eb31e6 100644
--- a/libavcodec/hevc_ps.h
+++ b/libavcodec/hevc_ps.h
@@ -232,6 +232,7 @@  typedef struct HEVCSPS {
     HEVCWindow pic_conf_win;
 
     int bit_depth;
+    int bit_depth_chroma;
     int pixel_shift;
     enum AVPixelFormat pix_fmt;
 
@@ -244,6 +245,7 @@  typedef struct HEVCSPS {
         int num_reorder_pics;
         int max_latency_increase;
     } temporal_layer[HEVC_MAX_SUB_LAYERS];
+    uint8_t temporal_id_nesting_flag;
 
     VUI vui;
     PTL ptl;