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/vc1dec.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/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b9ca38d20d..7ee014d4b6 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1087,7 +1087,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, if (v->field_mode && buf_start_second_field) { // decode first field s->picture_structure = PICT_BOTTOM_FIELD - v->tff; - ret = hwaccel->start_frame(avctx, buf_start, + ret = hwaccel->start_frame(avctx, avpkt->buf, buf_start, buf_start_second_field - buf_start); if (ret < 0) goto err; @@ -1142,7 +1142,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, } v->s.cur_pic.ptr->f->pict_type = v->s.pict_type; - ret = hwaccel->start_frame(avctx, buf_start_second_field, + ret = hwaccel->start_frame(avctx, avpkt->buf, buf_start_second_field, (buf + buf_size) - buf_start_second_field); if (ret < 0) goto err; @@ -1185,7 +1185,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, AVFrame *pict, goto err; } else { s->picture_structure = PICT_FRAME; - ret = hwaccel->start_frame(avctx, buf_start, + ret = hwaccel->start_frame(avctx, avpkt->buf, buf_start, (buf + buf_size) - buf_start); if (ret < 0) goto err; |