* [FFmpeg-devel] [PATCH] cbs_vp9: Always update loop filter and segmentation from current frame (PR #20367)
@ 2025-08-29 9:05 nowrep via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: nowrep via ffmpeg-devel @ 2025-08-29 9:05 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: nowrep
PR #20367 opened by nowrep
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20367
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20367.patch
Fixes decoding vp90-2-09-aq2, vp90-2-15-segkey_adpq, vp90-2-15-segkey
and vp90-2-22-svc_1280x720_1 with Vulkan hwaccel.
Fixes: 26a2a76346 ("cbs_vp9: Fix VP9 passthrough")
>From 810afefb2e404bb3fa5c6f5d7c28e6c05c4928c1 Mon Sep 17 00:00:00 2001
From: David Rosca <nowrep@gmail.com>
Date: Fri, 29 Aug 2025 10:58:00 +0200
Subject: [PATCH] cbs_vp9: Always update loop filter and segmentation from
current frame
Fixes decoding vp90-2-09-aq2, vp90-2-15-segkey_adpq, vp90-2-15-segkey
and vp90-2-22-svc_1280x720_1 with Vulkan hwaccel.
Fixes: 26a2a76346 ("cbs_vp9: Fix VP9 passthrough")
---
libavcodec/cbs_vp9_syntax_template.c | 56 ++++++++++++++--------------
1 file changed, 27 insertions(+), 29 deletions(-)
diff --git a/libavcodec/cbs_vp9_syntax_template.c b/libavcodec/cbs_vp9_syntax_template.c
index 9d01debb6d..0669cbed0c 100644
--- a/libavcodec/cbs_vp9_syntax_template.c
+++ b/libavcodec/cbs_vp9_syntax_template.c
@@ -392,39 +392,37 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
memset(vp9->feature_enabled, 0, sizeof(vp9->feature_enabled));
memset(vp9->feature_value, 0, sizeof(vp9->feature_value));
memset(vp9->feature_sign, 0, sizeof(vp9->feature_sign));
+ }
- } else {
- // Modify previous state based on updates in this frame.
-
- if (current->loop_filter_delta_update) {
- for (i = 0; i < 4; i++) {
- if (current->update_ref_delta[i])
- vp9->loop_filter_ref_deltas[i] =
- current->loop_filter_ref_deltas[i];
- }
- for (i = 0; i < 2; i++) {
- if (current->update_mode_delta[i])
- vp9->loop_filter_mode_deltas[i] =
- current->loop_filter_mode_deltas[i];
- }
+ // Modify previous state based on updates in this frame.
+ if (current->loop_filter_delta_update) {
+ for (i = 0; i < 4; i++) {
+ if (current->update_ref_delta[i])
+ vp9->loop_filter_ref_deltas[i] =
+ current->loop_filter_ref_deltas[i];
}
+ for (i = 0; i < 2; i++) {
+ if (current->update_mode_delta[i])
+ vp9->loop_filter_mode_deltas[i] =
+ current->loop_filter_mode_deltas[i];
+ }
+ }
- if (current->segmentation_update_data) {
- memcpy(vp9->feature_enabled, current->feature_enabled,
- sizeof(vp9->feature_enabled));
- memcpy(vp9->feature_value, current->feature_value,
- sizeof(vp9->feature_value));
- memcpy(vp9->feature_sign, current->feature_sign,
- sizeof(vp9->feature_sign));
+ if (current->segmentation_update_data) {
+ memcpy(vp9->feature_enabled, current->feature_enabled,
+ sizeof(vp9->feature_enabled));
+ memcpy(vp9->feature_value, current->feature_value,
+ sizeof(vp9->feature_value));
+ memcpy(vp9->feature_sign, current->feature_sign,
+ sizeof(vp9->feature_sign));
- if (current->segmentation_update_map) {
- memcpy(vp9->segmentation_tree_probs,
- current->segmentation_tree_probs,
- sizeof(vp9->segmentation_tree_probs));
- memcpy(vp9->segmentation_pred_prob,
- current->segmentation_pred_prob,
- sizeof(vp9->segmentation_pred_prob));
- }
+ if (current->segmentation_update_map) {
+ memcpy(vp9->segmentation_tree_probs,
+ current->segmentation_tree_probs,
+ sizeof(vp9->segmentation_tree_probs));
+ memcpy(vp9->segmentation_pred_prob,
+ current->segmentation_pred_prob,
+ sizeof(vp9->segmentation_pred_prob));
}
}
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-29 9:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-29 9:05 [FFmpeg-devel] [PATCH] cbs_vp9: Always update loop filter and segmentation from current frame (PR #20367) nowrep via ffmpeg-devel
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