[FFmpeg-devel] [PATCH v2 4/7] lavc/hevc_ps: Add slice parse support for HEVC SCC extension

Haihao Xiang haihao.xiang at intel.com
Thu Sep 10 09:42:42 EEST 2020


From: Linjie Fu <linjie.fu at intel.com>

Signed-off-by: Linjie Fu <linjie.justin.fu at gmail.com>
---
 libavcodec/hevcdec.c | 6 ++++++
 libavcodec/hevcdec.h | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index b77df8d89f..cbfcf492a0 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -806,6 +806,12 @@ static int hls_slice_header(HEVCContext *s)
             sh->slice_cr_qp_offset = 0;
         }
 
+        if (s->ps.pps->pps_slice_act_qp_offsets_present_flag) {
+            sh->slice_act_y_qp_offset  = get_se_golomb(gb);
+            sh->slice_act_cb_qp_offset = get_se_golomb(gb);
+            sh->slice_act_cr_qp_offset = get_se_golomb(gb);
+        }
+
         if (s->ps.pps->chroma_qp_offset_list_enabled_flag)
             sh->cu_chroma_qp_offset_enabled_flag = get_bits1(gb);
         else
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index 39c5c7f89f..6e22e044dd 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -292,6 +292,10 @@ typedef struct SliceHeader {
     int slice_cb_qp_offset;
     int slice_cr_qp_offset;
 
+    int slice_act_y_qp_offset;
+    int slice_act_cb_qp_offset;
+    int slice_act_cr_qp_offset;
+
     uint8_t cu_chroma_qp_offset_enabled_flag;
 
     int beta_offset;    ///< beta_offset_div2 * 2
-- 
2.25.1



More information about the ffmpeg-devel mailing list