Previously, the callback was only called on init. This makes it
get called on every frame.

We should switch to VK_KHR_video_maintenance2 and provide all params
upfront, but almost nothing supports it yet.
---
 libavcodec/av1dec.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index baa9dea0f7..ed00278ed3 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -1329,6 +1329,15 @@ static int av1_receive_frame_internal(AVCodecContext 
*avctx, AVFrame *frame)
 
             s->pix_fmt = AV_PIX_FMT_NONE;
 
+            if (FF_HW_HAS_CB(avctx, decode_params)) {
+                ret = FF_HW_CALL(avctx, decode_params, AV1_OBU_SEQUENCE_HEADER,
+                                 s->seq_data_ref->data, s->seq_data_ref->size);
+                if (ret < 0) {
+                    av_log(avctx, AV_LOG_ERROR, "HW accel decode params 
fail.\n");
+                    return ret;
+                }
+            }
+
             break;
         case AV1_OBU_REDUNDANT_FRAME_HEADER:
             if (s->raw_frame_header)
-- 
2.47.2
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to