From: Lynne <dev@lynne.ee>
To: ffmpeg-devel@ffmpeg.org
Cc: Lynne <dev@lynne.ee>
Subject: [FFmpeg-devel] [PATCH 2/6] vulkan_decode: only create sequence params in end_frame
Date: Mon, 31 Mar 2025 04:37:38 +0200
Message-ID: <20250331023753.285499-2-dev@lynne.ee> (raw)
In-Reply-To: <20250331023753.285499-1-dev@lynne.ee>
We tried to create sequence params in both start_frame and end_frame.
This was redundant.
Just always create them in end_frame.
---
libavcodec/vulkan_av1.c | 8 --------
libavcodec/vulkan_h264.c | 9 ---------
libavcodec/vulkan_hevc.c | 9 ---------
3 files changed, 26 deletions(-)
diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
index 13df24a44b..115db8badb 100644
--- a/libavcodec/vulkan_av1.c
+++ b/libavcodec/vulkan_av1.c
@@ -254,7 +254,6 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
AV1DecContext *s = avctx->priv_data;
const AV1Frame *pic = &s->cur_frame;
FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data;
- FFVulkanDecodeShared *ctx = dec->shared_ctx;
AV1VulkanDecodePicture *ap = pic->hwaccel_picture_private;
FFVulkanDecodePicture *vp = &ap->vp;
@@ -269,13 +268,6 @@ static int vk_av1_start_frame(AVCodecContext *avctx,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ };
- if (!dec->session_params &&
- !(ctx->s.extensions & FF_VK_EXT_VIDEO_MAINTENANCE_2)) {
- err = vk_av1_create_params(avctx, &dec->session_params, ap);
- if (err < 0)
- return err;
- }
-
if (!ap->frame_id_set) {
unsigned slot_idx = 0;
for (unsigned i = 0; i < 32; i++) {
diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c
index af37e0800b..d950c6948f 100644
--- a/libavcodec/vulkan_h264.c
+++ b/libavcodec/vulkan_h264.c
@@ -366,20 +366,11 @@ static int vk_h264_start_frame(AVCodecContext *avctx,
int err;
int dpb_slot_index = 0;
H264Context *h = avctx->priv_data;
- FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data;
- FFVulkanDecodeShared *ctx = dec->shared_ctx;
H264Picture *pic = h->cur_pic_ptr;
H264VulkanDecodePicture *hp = pic->hwaccel_picture_private;
FFVulkanDecodePicture *vp = &hp->vp;
- if (!dec->session_params &&
- !(ctx->s.extensions & FF_VK_EXT_VIDEO_MAINTENANCE_2)) {
- err = vk_h264_create_params(avctx, &dec->session_params);
- if (err < 0)
- return err;
- }
-
/* Fill in main slot */
dpb_slot_index = 0;
for (unsigned slot = 0; slot < H264_MAX_PICTURE_COUNT; slot++) {
diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c
index e95f554756..bc43591e19 100644
--- a/libavcodec/vulkan_hevc.c
+++ b/libavcodec/vulkan_hevc.c
@@ -716,8 +716,6 @@ static int vk_hevc_start_frame(AVCodecContext *avctx,
int err;
HEVCContext *h = avctx->priv_data;
HEVCLayerContext *l = &h->layers[h->cur_layer];
- FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data;
- FFVulkanDecodeShared *ctx = dec->shared_ctx;
HEVCFrame *pic = h->cur_frame;
HEVCVulkanDecodePicture *hp = pic->hwaccel_picture_private;
@@ -726,13 +724,6 @@ static int vk_hevc_start_frame(AVCodecContext *avctx,
const HEVCSPS *sps = pps->sps;
int nb_refs = 0;
- if (!dec->session_params &&
- !(ctx->s.extensions & FF_VK_EXT_VIDEO_MAINTENANCE_2)) {
- err = vk_hevc_create_params(avctx, &dec->session_params);
- if (err < 0)
- return err;
- }
-
hp->h265pic = (StdVideoDecodeH265PictureInfo) {
.flags = (StdVideoDecodeH265PictureInfoFlags) {
.IrapPicFlag = IS_IRAP(h),
--
2.49.0
_______________________________________________
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".
next prev parent reply other threads:[~2025-03-31 2:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 2:37 [FFmpeg-devel] [PATCH 1/6] vulkan_decode: generalize handling of slice offsets/nb Lynne
2025-03-31 2:37 ` Lynne [this message]
2025-03-31 2:37 ` [FFmpeg-devel] [PATCH 3/6] vulkan_decode: move temporary Vulkan structs into each codec Lynne
2025-03-31 2:37 ` [FFmpeg-devel] [PATCH 4/6] vulkan_decode: add a generic start_frame function Lynne
2025-03-31 2:37 ` [FFmpeg-devel] [PATCH 5/6] vulkan_h264: make all temporary structs temporary Lynne
2025-03-31 2:37 ` [FFmpeg-devel] [PATCH 6/6] vulkan_hevc: " Lynne
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=20250331023753.285499-2-dev@lynne.ee \
--to=dev@lynne.ee \
--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