summaryrefslogtreecommitdiffstats
path: root/libavcodec/dds.c
diff options
context:
space:
mode:
authorConnor Worley <[email protected]>2024-02-14 21:44:38 -0800
committerAnton Khirnov <[email protected]>2024-02-18 07:30:01 +0100
commit1487f6198c87dc8a31d185ecda9ddf00a59c6c53 (patch)
treeacf44df0eee4964831c3d352f45b9ae63d0bf845 /libavcodec/dds.c
parent0895ef0d6d6406ee6cd158fc4d47d80f201b8e9c (diff)
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 <[email protected]> Signed-off-by: Anton Khirnov <[email protected]>
Diffstat (limited to 'libavcodec/dds.c')
-rw-r--r--libavcodec/dds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dds.c b/libavcodec/dds.c
index 67e2325a2a..89cf225f25 100644
--- a/libavcodec/dds.c
+++ b/libavcodec/dds.c
@@ -636,6 +636,8 @@ static int dds_decode(AVCodecContext *avctx, AVFrame *frame,
ctx->dec.tex_data.in = gbc->buffer;
ctx->dec.frame_data.out = frame->data[0];
ctx->dec.stride = frame->linesize[0];
+ ctx->dec.width = avctx->coded_width;
+ ctx->dec.height = avctx->coded_height;
ff_texturedsp_exec_decompress_threads(avctx, &ctx->dec);
} else if (!ctx->paletted && ctx->bpp == 4 && avctx->pix_fmt == AV_PIX_FMT_PAL8) {
uint8_t *dst = frame->data[0];