Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/hevc_ps: Constify VPS, SPS pointers when parsing PPS
@ 2023-06-29 23:36 Andreas Rheinhardt
  0 siblings, 0 replies; only message in thread
From: Andreas Rheinhardt @ 2023-06-29 23:36 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/hevc_ps.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index d7930d3ac3..4c4c1e2c17 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -725,7 +725,8 @@ static void set_default_scaling_list_data(ScalingList *sl)
     memcpy(sl->sl[3][5], default_scaling_list_inter, 64);
 }
 
-static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingList *sl, HEVCSPS *sps)
+static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx,
+                             ScalingList *sl, const HEVCSPS *sps)
 {
     uint8_t scaling_list_pred_mode_flag;
     uint8_t scaling_list_dc_coef[2][6];
@@ -1412,7 +1413,7 @@ static int colour_mapping_table(GetBitContext *gb, AVCodecContext *avctx, HEVCPP
 }
 
 static int pps_multilayer_extension(GetBitContext *gb, AVCodecContext *avctx,
-                                    HEVCPPS *pps, HEVCSPS *sps, HEVCVPS *vps)
+                                    HEVCPPS *pps, const HEVCSPS *sps, const HEVCVPS *vps)
 {
     pps->poc_reset_info_present_flag = get_bits1(gb);
     pps->pps_infer_scaling_list_flag = get_bits1(gb);
@@ -1483,7 +1484,7 @@ static void delta_dlt(GetBitContext *gb, HEVCPPS *pps)
 }
 
 static int pps_3d_extension(GetBitContext *gb, AVCodecContext *avctx,
-                            HEVCPPS *pps, HEVCSPS *sps)
+                            HEVCPPS *pps, const HEVCSPS *sps)
 {
     unsigned int pps_depth_layers_minus1;
 
@@ -1507,7 +1508,7 @@ static int pps_3d_extension(GetBitContext *gb, AVCodecContext *avctx,
 }
 
 static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx,
-                                HEVCPPS *pps, HEVCSPS *sps)
+                                HEVCPPS *pps, const HEVCSPS *sps)
 {
     if (pps->transform_skip_enabled_flag) {
         pps->log2_max_transform_skip_block_size = get_ue_golomb_31(gb) + 2;
@@ -1547,7 +1548,7 @@ static int pps_range_extensions(GetBitContext *gb, AVCodecContext *avctx,
 }
 
 static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx,
-                             HEVCPPS *pps, HEVCSPS *sps)
+                             HEVCPPS *pps, const HEVCSPS *sps)
 {
     int num_comps, ret;
 
@@ -1599,7 +1600,7 @@ static int pps_scc_extension(GetBitContext *gb, AVCodecContext *avctx,
 }
 
 static inline int setup_pps(AVCodecContext *avctx, GetBitContext *gb,
-                            HEVCPPS *pps, HEVCSPS *sps)
+                            HEVCPPS *pps, const HEVCSPS *sps)
 {
     int log2_diff;
     int pic_area_in_ctbs;
@@ -1733,8 +1734,8 @@ static inline int setup_pps(AVCodecContext *avctx, GetBitContext *gb,
 int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx,
                            HEVCParamSets *ps)
 {
-    HEVCSPS      *sps = NULL;
-    HEVCVPS      *vps = NULL;
+    const HEVCSPS *sps = NULL;
+    const HEVCVPS *vps = NULL;
     int i, ret = 0;
     unsigned int pps_id = 0;
     ptrdiff_t nal_size;
-- 
2.34.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-29 23:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 23:36 [FFmpeg-devel] [PATCH] avcodec/hevc_ps: Constify VPS, SPS pointers when parsing PPS Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git