Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/hevc_ps: Make ff_hevc_parse_ps static
Date: Tue, 26 Mar 2024 06:27:51 +0100
Message-ID: <GV1P250MB07373D90914C65F1F8EDC4E68F352@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB0737280B14FF3E29DF31B3B48F352@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>

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 --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,
-- 
2.40.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".

  parent reply	other threads:[~2024-03-26  5:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26  5:26 [FFmpeg-devel] [PATCH 1/3] avcodec/Makefile: Remove redundant dependencies on hevc_data.o Andreas Rheinhardt
2024-03-26  5:27 ` [FFmpeg-devel] [PATCH 2/3] avcodec/qsvenc_hevc: Switch to cbs_h265 to create missing VPS Andreas Rheinhardt
2024-03-26  5:27 ` Andreas Rheinhardt [this message]
2024-03-28  7:44 ` [FFmpeg-devel] [PATCH 1/3] avcodec/Makefile: Remove redundant dependencies on hevc_data.o Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GV1P250MB07373D90914C65F1F8EDC4E68F352@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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