diff options
author | Lynne <dev@lynne.ee> | 2025-03-13 16:26:40 +0000 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2025-03-17 08:51:23 +0100 |
commit | caff29dbb18feeb87cb00fc4c33d20cf01667be0 (patch) | |
tree | e99f15bb25ccf6961daf31ca082ed17320085c2f /libavcodec/videotoolbox.c | |
parent | 23eb499b282ab1952461872ddea008adc7f95413 (diff) | |
download | ffmpeg-caff29dbb18feeb87cb00fc4c33d20cf01667be0.tar.gz |
FFHWAccel: add buffer_ref argument to start_frame
This commit adds a reference to the buffer as an argument to
start_frame, and adapts all existing code.
This allows for asynchronous hardware accelerators to skip
copying packet data by referencing it.
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r-- | libavcodec/videotoolbox.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index a606c29ded..7c88555e0c 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -415,6 +415,7 @@ CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx) } int ff_videotoolbox_h264_start_frame(AVCodecContext *avctx, + const AVBufferRef *buffer_ref, const uint8_t *buffer, uint32_t size) { @@ -1084,6 +1085,7 @@ static int videotoolbox_h264_end_frame(AVCodecContext *avctx) } static int videotoolbox_hevc_start_frame(AVCodecContext *avctx, + const AVBufferRef *buffer_ref, const uint8_t *buffer, uint32_t size) { @@ -1127,6 +1129,7 @@ static int videotoolbox_hevc_end_frame(AVCodecContext *avctx) } static int videotoolbox_mpeg_start_frame(AVCodecContext *avctx, + const AVBufferRef *buffer_ref, const uint8_t *buffer, uint32_t size) { @@ -1151,8 +1154,9 @@ static int videotoolbox_mpeg_end_frame(AVCodecContext *avctx) } static int videotoolbox_prores_start_frame(AVCodecContext *avctx, - const uint8_t *buffer, - uint32_t size) + const AVBufferRef *buffer_ref, + const uint8_t *buffer, + uint32_t size) { return 0; } |