diff options
author | Connor Worley <connorbworley@gmail.com> | 2024-02-08 11:07:09 -0800 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-02-08 20:36:04 +0100 |
commit | 3b6a515c5f8f97c9cc4e2cd7a99e12658813a512 (patch) | |
tree | 536c05fcd6a6c8a0ebe2fef7c68c700f6df76c81 /libavcodec | |
parent | c4e9556cf54609b9182dfb1766d3e2c43299a9d6 (diff) | |
download | ffmpeg-3b6a515c5f8f97c9cc4e2cd7a99e12658813a512.tar.gz |
lavc/dxv: treat DXT5-tagged files as DXT4
DXV files seem to misnomer DXT5 and really encode DXT4 with
premultiplied alpha. At least, this is what Resolume alley does.
To check, encode some input with alpha as "Normal Quality, With Alpha"
in Alley, then decode the output with this change -- results are true
to the original input compared to git-master.
Signed-off-by: Connor Worley <connorbworley@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dxv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index 5923811b29..1e6791e63f 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -1074,7 +1074,8 @@ static int dxv_decode(AVCodecContext *avctx, AVFrame *frame, break; case MKBETAG('D', 'X', 'T', '5'): decompress_tex = dxv_decompress_dxt5; - ctx->tex_funct = ctx->texdsp.dxt5_block; + /* DXV misnomers DXT5, alpha is premultiplied so use DXT4 instead */ + ctx->tex_funct = ctx->texdsp.dxt4_block; ctx->tex_rat = 4; ctx->tex_step = 16; msgcomp = "DXTR5"; |