This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit ccc57378b37d9129396a037df02c83a877d8eef0
Author:     David Rosca <[email protected]>
AuthorDate: Mon Jul 20 15:45:52 2026 +0200
Commit:     Lynne <[email protected]>
CommitDate: Tue Jul 21 04:25:45 2026 +0000

    avcodec/vulkan_encode_av1: fix level and tier option handling
    
    Copy opts.level into avctx->level (matching H.264/H.265 encoders),
    so the -level command line option is actually used. Also initialize
    enc->seq_tier from opts.tier so the -tier option takes effect.
    
    The -level option values (0-23) already match the StdVideoAV1Level
    enum directly, so assign avctx->level to seq_level_idx without going
    through ff_vk_av1_level_to_vk() which expects AV1 spec-style level
    numbers (20, 21, 30, ...).
    
    Co-Authored-By: Claude Opus 4
---
 libavcodec/vulkan_encode_av1.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vulkan_encode_av1.c b/libavcodec/vulkan_encode_av1.c
index 994fc33cc1..bb6a1ae04d 100644
--- a/libavcodec/vulkan_encode_av1.c
+++ b/libavcodec/vulkan_encode_av1.c
@@ -724,6 +724,8 @@ static av_cold int init_sequence_headers(AVCodecContext 
*avctx)
     if (!desc)
         return AVERROR(EINVAL);
 
+    enc->seq_tier = enc->common.opts.tier;
+
     if (avctx->level == AV_LEVEL_UNKNOWN) {
         const AV1LevelDescriptor *level;
         float framerate = 0.0;
@@ -745,7 +747,7 @@ static av_cold int init_sequence_headers(AVCodecContext 
*avctx)
             enc->seq_tier = 1;
         }
     } else {
-        enc->seq_level_idx = ff_vk_av1_level_to_vk(avctx->level);
+        enc->seq_level_idx = avctx->level;
     }
 
     seq_obu->header.obu_type = AV1_OBU_SEQUENCE_HEADER;
@@ -1229,6 +1231,8 @@ static av_cold int vulkan_encode_av1_init(AVCodecContext 
*avctx)
 
     if (avctx->profile == AV_PROFILE_UNKNOWN)
         avctx->profile = enc->common.opts.profile;
+    if (avctx->level == AV_LEVEL_UNKNOWN)
+        avctx->level = enc->common.opts.level;
 
     enc->caps = (VkVideoEncodeAV1CapabilitiesKHR) {
         .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR,

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to