[FFmpeg-cvslog] [ffmpeg] branch release/8.0 updated. 15cb74fc68 vulkan_vp9: Read segment and lf data from cbs

ffmpeg-git at ffmpeg.org ffmpeg-git at ffmpeg.org
Thu Aug 21 22:43:12 EEST 2025


The branch, release/8.0 has been updated
       via  15cb74fc681e159bfab3c5cf320775761aa38e3c (commit)
       via  9ddd245b09e8e51037ae78b2782e193b024eaccb (commit)
       via  c1a7f4040af7a70d4edcdfd9a0f23d5bf033e234 (commit)
       via  17f4cc0992c3cea5129503d722bd1d9ed8d3cffd (commit)
       via  eeff85f15d558e48ce7b2fa462db28627dd46afe (commit)
      from  bc88c1d62e4b8f585a01e38044c9671836ae4ab5 (commit)


- Log -----------------------------------------------------------------
commit 15cb74fc681e159bfab3c5cf320775761aa38e3c
Author:     Benjamin Cheng <ben at bcheng.me>
AuthorDate: Tue Aug 19 10:07:01 2025 -0400
Commit:     Lynne <dev at lynne.ee>
CommitDate: Fri Aug 22 04:42:30 2025 +0900

    vulkan_vp9: Read segment and lf data from cbs
    
    The previous change 26a2a76346 broke Vulkan decoding because the lf and
    segmentation values contained within VP9RawFrameHeader can no longer be
    updated.
    
    Read the propogated values from the CBS instead.
    
    (cherry picked from commit 7bfaa6d662f1f5eb000b0fae8288b07440464bff)

diff --git a/libavcodec/vulkan_vp9.c b/libavcodec/vulkan_vp9.c
index f8ce73dc90..7b852a29a5 100644
--- a/libavcodec/vulkan_vp9.c
+++ b/libavcodec/vulkan_vp9.c
@@ -16,7 +16,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "vp9shared.h"
+#include "vp9dec.h"
 
 #include "vulkan_decode.h"
 
@@ -109,7 +109,9 @@ static int vk_vp9_start_frame(AVCodecContext          *avctx,
 {
     int err;
     int ref_count = 0;
-    const VP9SharedContext *s = avctx->priv_data;
+    const VP9Context *priv = avctx->priv_data;
+    const CodedBitstreamVP9Context *vp9 = priv->cbc->priv_data;
+    const VP9SharedContext *s = &priv->s;
     uint32_t frame_id_alloc_mask = 0;
 
     const VP9Frame *pic = &s->frames[CUR_FRAME];
@@ -182,15 +184,14 @@ static int vk_vp9_start_frame(AVCodecContext          *avctx,
         .update_mode_delta = 0x0,
     };
 
-    for (int i = 0; i < 2; i++)
-        ap->loop_filter.update_mode_delta |= pic->frame_header->update_mode_delta[i];
-
     for (int i = 0; i < STD_VIDEO_VP9_MAX_REF_FRAMES; i++) {
-        ap->loop_filter.loop_filter_ref_deltas[i] = pic->frame_header->loop_filter_ref_deltas[i];
+        ap->loop_filter.loop_filter_ref_deltas[i] = vp9->loop_filter_ref_deltas[i];
         ap->loop_filter.update_ref_delta |= pic->frame_header->update_ref_delta[i];
     }
-    for (int i = 0; i < STD_VIDEO_VP9_LOOP_FILTER_ADJUSTMENTS; i++)
-        ap->loop_filter.loop_filter_mode_deltas[i] = pic->frame_header->loop_filter_mode_deltas[i];
+    for (int i = 0; i < STD_VIDEO_VP9_LOOP_FILTER_ADJUSTMENTS; i++) {
+        ap->loop_filter.loop_filter_mode_deltas[i] = vp9->loop_filter_mode_deltas[i];
+        ap->loop_filter.update_mode_delta |= pic->frame_header->update_mode_delta[i];
+    }
 
     ap->segmentation = (StdVideoVP9Segmentation) {
         .flags = (StdVideoVP9SegmentationFlags) {
@@ -202,16 +203,16 @@ static int vk_vp9_start_frame(AVCodecContext          *avctx,
     };
 
     for (int i = 0; i < STD_VIDEO_VP9_MAX_SEGMENTATION_TREE_PROBS; i++)
-        ap->segmentation.segmentation_tree_probs[i] = pic->frame_header->segmentation_tree_probs[i];
+        ap->segmentation.segmentation_tree_probs[i] = vp9->segmentation_tree_probs[i];
     for (int i = 0; i < STD_VIDEO_VP9_MAX_SEGMENTATION_PRED_PROB; i++)
-        ap->segmentation.segmentation_pred_prob[i] = pic->frame_header->segmentation_pred_prob[i];
+        ap->segmentation.segmentation_pred_prob[i] = vp9->segmentation_pred_prob[i];
     for (int i = 0; i < STD_VIDEO_VP9_MAX_SEGMENTS; i++) {
         ap->segmentation.FeatureEnabled[i] = 0x0;
         for (int j = 0; j < STD_VIDEO_VP9_SEG_LVL_MAX; j++) {
-            ap->segmentation.FeatureEnabled[i] |= pic->frame_header->feature_enabled[i][j] << j;
-            ap->segmentation.FeatureData[i][j] = pic->frame_header->feature_sign[i][j] ?
-                                                 -pic->frame_header->feature_value[i][j] :
-                                                 +pic->frame_header->feature_value[i][j];
+            ap->segmentation.FeatureEnabled[i] |= vp9->feature_enabled[i][j] << j;
+            ap->segmentation.FeatureData[i][j] = vp9->feature_sign[i][j] ?
+                                                 -vp9->feature_value[i][j] :
+                                                 +vp9->feature_value[i][j];
         }
     }
 

commit 9ddd245b09e8e51037ae78b2782e193b024eaccb
Author:     vytskalt <vytskalt at protonmail.com>
AuthorDate: Tue Aug 19 17:14:15 2025 +0300
Commit:     Lynne <dev at lynne.ee>
CommitDate: Fri Aug 22 04:42:30 2025 +0900

    hwcontext_vulkan: transfer EXCLUSIVE images to correct queue families
    
    (cherry picked from commit a6b5a382dd7ecdd27c5d0ebba688e1db409d18fd)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 77efa58db9..857dae2883 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2466,7 +2466,7 @@ static int prepare_frame(AVHWFramesContext *hwfc, FFVkExecPool *ectx,
     VkImageMemoryBarrier2 img_bar[AV_NUM_DATA_POINTERS];
     int nb_img_bar = 0;
 
-    uint32_t dst_qf = VK_QUEUE_FAMILY_IGNORED;
+    uint32_t dst_qf = p->nb_img_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->img_qfs[0];
     VkImageLayout new_layout;
     VkAccessFlags2 new_access;
     VkPipelineStageFlagBits2 src_stage = VK_PIPELINE_STAGE_2_NONE;
@@ -4548,7 +4548,7 @@ static int vulkan_transfer_frame(AVHWFramesContext *hwfc,
                                  VK_ACCESS_TRANSFER_READ_BIT,
                         upload ? VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL :
                                  VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
-                        VK_QUEUE_FAMILY_IGNORED);
+                        p->nb_img_qfs > 1 ? VK_QUEUE_FAMILY_IGNORED : p->img_qfs[0]);
 
     vk->CmdPipelineBarrier2(cmd_buf, &(VkDependencyInfo) {
             .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,

commit c1a7f4040af7a70d4edcdfd9a0f23d5bf033e234
Author:     Lynne <dev at lynne.ee>
AuthorDate: Wed Aug 20 22:05:38 2025 +0900
Commit:     Lynne <dev at lynne.ee>
CommitDate: Fri Aug 22 04:42:30 2025 +0900

    lavfi/bwdif_vulkan: fix typo in temp_diff assignment
    
    Thanks to Niklas Haas for pointing this out.
    
    (cherry picked from commit 451e6bed436ada70a761a90f1d08f1fa505020fd)

diff --git a/libavfilter/vulkan/bwdif.comp b/libavfilter/vulkan/bwdif.comp
index 5c988f472e..5152464823 100644
--- a/libavfilter/vulkan/bwdif.comp
+++ b/libavfilter/vulkan/bwdif.comp
@@ -47,7 +47,7 @@ vec4 process_line(vec4 prev2[5], vec4 prev1[2], vec4 cur[4], vec4 next1[2], vec4
    vec4 temp_diff[3];
    temp_diff[0] = abs(prev2[2] - next2[2]);
    temp_diff[1] = (abs(prev1[0] - fc) + abs(prev1[1] - fe)) / 2;
-   temp_diff[1] = (abs(next1[0] - fc) + abs(next1[1] - fe)) / 2;
+   temp_diff[2] = (abs(next1[0] - fc) + abs(next1[1] - fe)) / 2;
    vec4 diff = max(temp_diff[0] / 2, max(temp_diff[1], temp_diff[2]));
    bvec4 diff_mask = equal(diff, vec4(0));
 

commit 17f4cc0992c3cea5129503d722bd1d9ed8d3cffd
Author:     Kacper Michajłow <kasper93 at gmail.com>
AuthorDate: Sat Aug 9 00:43:50 2025 +0200
Commit:     Lynne <dev at lynne.ee>
CommitDate: Fri Aug 22 04:42:30 2025 +0900

    avcodec/vulkan_encode_av1: use CODEC_PIXFMTS to define pix_fmts
    
    Fixes deprecation warnings.
    
    Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
    (cherry picked from commit b7a3c426ea118de9c3b6314408d4d37a562239a6)

diff --git a/libavcodec/vulkan_encode_av1.c b/libavcodec/vulkan_encode_av1.c
index d8a1097158..840092cf6d 100644
--- a/libavcodec/vulkan_encode_av1.c
+++ b/libavcodec/vulkan_encode_av1.c
@@ -1394,10 +1394,7 @@ const FFCodec ff_av1_vulkan_encoder = {
                       AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .defaults       = vulkan_encode_av1_defaults,
-    .p.pix_fmts = (const enum AVPixelFormat[]) {
-        AV_PIX_FMT_VULKAN,
-        AV_PIX_FMT_NONE,
-    },
+    CODEC_PIXFMTS(AV_PIX_FMT_VULKAN),
     .hw_configs     = ff_vulkan_encode_hw_configs,
     .p.wrapper_name = "vulkan",
 };

commit eeff85f15d558e48ce7b2fa462db28627dd46afe
Author:     Niklas Haas <git at haasn.dev>
AuthorDate: Tue Aug 5 23:13:39 2025 +0200
Commit:     Lynne <dev at lynne.ee>
CommitDate: Fri Aug 22 04:42:30 2025 +0900

    avutil/hwcontext_vulkan: also re-query dprops in device_init()
    
    This can be unset if using an externally provided device, as in this case
    device_create() never gets called.
    
    (cherry picked from commit 881224b21324e5f0c43569928cf96f0e92a686e2)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index c8e1b7e576..77efa58db9 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1868,6 +1868,8 @@ static int vulkan_device_init(AVHWDeviceContext *ctx)
     p->props.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2;
     p->props.pNext = &p->hprops;
     p->hprops.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT;
+    p->hprops.pNext = &p->dprops;
+    p->dprops.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES;
 
     vk->GetPhysicalDeviceProperties2(hwctx->phys_dev, &p->props);
     av_log(ctx, AV_LOG_VERBOSE, "Using device: %s\n",

-----------------------------------------------------------------------

Summary of changes:
 libavcodec/vulkan_encode_av1.c |  5 +----
 libavcodec/vulkan_vp9.c        | 29 +++++++++++++++--------------
 libavfilter/vulkan/bwdif.comp  |  2 +-
 libavutil/hwcontext_vulkan.c   |  6 ++++--
 4 files changed, 21 insertions(+), 21 deletions(-)


hooks/post-receive
-- 



More information about the ffmpeg-cvslog mailing list