aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vbnenc.c
diff options
context:
space:
mode:
authorConnor Worley <connorbworley@gmail.com>2024-02-14 21:44:38 -0800
committerAnton Khirnov <anton@khirnov.net>2024-02-18 07:30:01 +0100
commit1487f6198c87dc8a31d185ecda9ddf00a59c6c53 (patch)
treeacf44df0eee4964831c3d352f45b9ae63d0bf845 /libavcodec/vbnenc.c
parent0895ef0d6d6406ee6cd158fc4d47d80f201b8e9c (diff)
downloadffmpeg-1487f6198c87dc8a31d185ecda9ddf00a59c6c53.tar.gz
lavc/texturedsp: require explicitly-set frame dimensions
This change decouples the frame dimensions from avctx, which is useful for DXV decoding, and fixes incorrect behavior in the existing implementation. Tested with `make fate THREADS=7` and `make fate THREADS=7 THREAD_TYPE=slice`. Signed-off-by: Connor Worley <connorbworley@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/vbnenc.c')
-rw-r--r--libavcodec/vbnenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vbnenc.c b/libavcodec/vbnenc.c
index 13412b6e37..55e436b5e5 100644
--- a/libavcodec/vbnenc.c
+++ b/libavcodec/vbnenc.c
@@ -114,6 +114,8 @@ static int vbn_encode(AVCodecContext *avctx, AVPacket *pkt,
ctx->enc.frame_data.in = (frame->height - 1) * frame->linesize[0] + frame->data[0];
ctx->enc.stride = -frame->linesize[0];
ctx->enc.tex_data.out = pkt->data + VBN_HEADER_SIZE;
+ ctx->enc.width = avctx->width;
+ ctx->enc.height = avctx->height;
ff_texturedsp_exec_compress_threads(avctx, &ctx->enc);
} else {
const uint8_t *flipped = frame->data[0] + frame->linesize[0] * (frame->height - 1);