[FFmpeg-devel] [PATCH] vulkan_av1: Set force_integer_mv on intra frames

Mark Thompson sw at jkqxz.net
Sat Apr 27 16:40:51 EEST 2024


The flag in CBS is the value read from the bitstream (as required for
passthrough), but the specification overrides that by setting it
immediately after reading if the frame is intra.
---
This is already done for DXVA and VDPAU.  Also wondering whether this should be done for VAAPI?

 libavcodec/vulkan_av1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vulkan_av1.c b/libavcodec/vulkan_av1.c
index 25ab4ecc70..694e643954 100644
--- a/libavcodec/vulkan_av1.c
+++ b/libavcodec/vulkan_av1.c
@@ -435,7 +435,7 @@ static int vk_av1_start_frame(AVCodecContext          *avctx,
             .render_and_frame_size_different = frame_header->render_and_frame_size_different,
             .allow_screen_content_tools = frame_header->allow_screen_content_tools,
             .is_filter_switchable = frame_header->is_filter_switchable,
-            .force_integer_mv = frame_header->force_integer_mv,
+            .force_integer_mv = frame_header->force_integer_mv || !(frame_header->frame_type & 1),
             .frame_size_override_flag = frame_header->frame_size_override_flag,
             .buffer_removal_time_present_flag = frame_header->buffer_removal_time_present_flag,
             .allow_intrabc = frame_header->allow_intrabc,
-- 
2.43.0


More information about the ffmpeg-devel mailing list