ffmpeg | branch: master | Lynne <d...@lynne.ee> | Fri Mar 14 12:44:24 2025 
+0100| [d3d2e254ebc2a9bee849605336467f6b2a60f36d] | committer: Lynne

av1dec: update hwaccel decode_params on AV1_OBU_SEQUENCE_HEADER

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3d2e254ebc2a9bee849605336467f6b2a60f36d
---

 libavcodec/av1dec.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index ed504ace85..e6aabe42fb 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)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

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

Reply via email to