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>
This commit is contained in:
Connor Worley 2024-02-14 21:44:38 -08:00 committed by Anton Khirnov
parent 0895ef0d6d
commit 1487f6198c
9 changed files with 25 additions and 11 deletions

View file

@ -323,6 +323,8 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame,
ctx->dec[t].frame_data.out = frame->data[0];
ctx->dec[t].stride = frame->linesize[0];
ctx->dec[t].width = avctx->coded_width;
ctx->dec[t].height = avctx->coded_height;
ff_texturedsp_exec_decompress_threads(avctx, &ctx->dec[t]);
}