diff mbox series

[FFmpeg-devel,3/3] avcodec/hevc_ps: Make ff_hevc_parse_ps static

Message ID GV1P250MB07373D90914C65F1F8EDC4E68F352@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,1/3] avcodec/Makefile: Remove redundant dependencies on hevc_data.o | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt March 26, 2024, 5:27 a.m. UTC
It is only used here since its other caller (qsvenc_hevc.c)
has been switched to cbs_h265.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/hevc_ps.c | 14 +++++++-------
 libavcodec/hevc_ps.h | 13 -------------
 2 files changed, 7 insertions(+), 20 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index cbef3ef4cd..4e2c36b448 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -866,9 +866,9 @@  static int map_pixel_format(AVCodecContext *avctx, HEVCSPS *sps)
     return 0;
 }
 
-int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
-                      int apply_defdispwin, const HEVCVPS * const *vps_list,
-                      AVCodecContext *avctx)
+static int hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
+                          int apply_defdispwin, const HEVCVPS * const *vps_list,
+                          AVCodecContext *avctx)
 {
     HEVCWindow *ow;
     int ret = 0;
@@ -879,7 +879,7 @@  int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
 
     sps->vps_id = get_bits(gb, 4);
 
-    if (vps_list && !vps_list[sps->vps_id]) {
+    if (!vps_list[sps->vps_id]) {
         av_log(avctx, AV_LOG_ERROR, "VPS %d does not exist\n",
                sps->vps_id);
         return AVERROR_INVALIDDATA;
@@ -1307,9 +1307,9 @@  int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,
     }
     memcpy(sps->data, gb->buffer, sps->data_size);
 
-    ret = ff_hevc_parse_sps(sps, gb, &sps_id,
-                            apply_defdispwin,
-                            ps->vps_list, avctx);
+    ret = hevc_parse_sps(sps, gb, &sps_id,
+                         apply_defdispwin,
+                         ps->vps_list, avctx);
     if (ret < 0) {
         ff_refstruct_unref(&sps);
         return ret;
diff --git a/libavcodec/hevc_ps.h b/libavcodec/hevc_ps.h
index cc75aeb8d3..82fa5bf820 100644
--- a/libavcodec/hevc_ps.h
+++ b/libavcodec/hevc_ps.h
@@ -447,19 +447,6 @@  typedef struct HEVCParamSets {
     const HEVCPPS *pps;
 } HEVCParamSets;
 
-/**
- * Parse the SPS from the bitstream into the provided HEVCSPS struct.
- *
- * @param sps_id the SPS id will be written here
- * @param apply_defdispwin if set 1, the default display window from the VUI
- *                         will be applied to the video dimensions
- * @param vps_list if non-NULL, this function will validate that the SPS refers
- *                 to an existing VPS
- */
-int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
-                      int apply_defdispwin, const HEVCVPS * const *vps_list,
-                      AVCodecContext *avctx);
-
 int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx,
                            HEVCParamSets *ps);
 int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx,