diff mbox series

[FFmpeg-devel] lavc/dxv: assume DXV2 files use premultiplied alpha

Message ID 20240211114157.64551-1-connorbworley@gmail.com
State Accepted
Commit a4f019e44ed6c48975109ac34f54e04caffeab86
Headers show
Series [FFmpeg-devel] lavc/dxv: assume DXV2 files use premultiplied alpha | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Connor Worley Feb. 11, 2024, 11:41 a.m. UTC
I generated a DXV2 file with an interesting alpha channel using
Adobe Media Encoder 2015 and compared decoding it using Resolume Alley
and ffmpeg. Similarly to DXV3 files, Alley expects premultiplied alpha
and ffmpeg matches its decoding more closely when it does the same.

Reference file: https://connorworley.com/dxv2-dxt5.mov

Existing FATE tests for DXV2 files do not cover this change.

Signed-off-by: Connor Worley <connorbworley@gmail.com>
 libavcodec/dxv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 82c493f1de..2eca14c129 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -923,7 +923,7 @@  static int dxv_decode(AVCodecContext *avctx, AVFrame *frame,
             tag = DXV_FMT_DXT5;
             msgtext = "DXT5";
-            texdsp_ctx.tex_funct = ctx->texdsp.dxt5_block;
+            texdsp_ctx.tex_funct = ctx->texdsp.dxt4_block;
             texdsp_ctx.tex_ratio = 16;
             texdsp_ctx.raw_ratio = 16;
         } else if (old_type & 0x20 || version_major == 1) {