Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: nowrep via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: nowrep <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] cbs_vp9: Always update loop filter and segmentation from current frame (PR #20367)
Message-ID: <175645825368.25.5286796109693880533@463a07221176> (raw)

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

                 reply	other threads:[~2025-08-29  9:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=175645825368.25.5286796109693880533@463a07221176 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@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