From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4271149395 for ; Thu, 8 Feb 2024 19:07:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 610ED68D17E; Thu, 8 Feb 2024 21:07:36 +0200 (EET) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 93A6568C8B4 for ; Thu, 8 Feb 2024 21:07:30 +0200 (EET) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6e0311797c5so127725b3a.2 for ; Thu, 08 Feb 2024 11:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707419248; x=1708024048; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LZ9ZFzhpUw9VO+iQpXw3IxIuzgjNhi8NKuS+B14FuQc=; b=L1TQlo0aRRS7vPNCjs7TMio2hS91ZDvCm9cRx+4h6V7Hr1Rv1mZFmUV+ES7/QH2sQN fYZCBvkiVb/Vk+BvJLgHucDb4biypb7BCib63cWWhAWe6VD1fVOnutZQ6u4FAl7xQhuS KU4KEqMZM35rrg/NTkos1PDHSdqTcrA7QlLcSQ2UOgn7duhjXKWC2wm4Kr2TqsRrcXiH ZoLi4MayyjD/eq6P4pav7HoDRj8IWfS+I6XgvefzST86uJbdv8PhzTgAJHzwKfdweU5A 0GdaVTGDR/HiZ16zfQMs7zVzUHH0U0t2VK5mVVH9nOJtkJN5P44tqMu74iQDlU5lp/Kv fHow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707419248; x=1708024048; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LZ9ZFzhpUw9VO+iQpXw3IxIuzgjNhi8NKuS+B14FuQc=; b=YJhXmm/WBjppIS2IzN5xY+6FGF7jtXeGZfk3dBIclBeyoNDSe9leJ17CbTFDu6X0IO RsB6ZBMFfKTM6PKs467gUpe0NX88/S+gGtb4p8htIuHGYfo9s8wRakmRd/+LM73dMR3k Ecx1+2pUC4BrLusTNXibqtPRQ1VD6+d3Bs3zEoste39TyLHwaHg/Ax2pPxeHAZmEqzk+ rFB9MdYqNgxKNaiHuBof0Bl40bhdFc3kXZfCGV9EYTUckx5N2CYd2ohsqL0o+G2rImvv Iw0PgCnLT0fTW3lbEhdui211YI8qxTS6/P+9th4/jQ/UhYD2ZV1PxY6IaB/6RFOa+aD/ 1lLg== X-Gm-Message-State: AOJu0YzSTqmUJYPhrP7CiGjs1PTNZRV+Ly3kIp4HKT6Gxw9K/wRn39uj Fe7KWiOscPPMcxR6CO7y2RlGlzMCj3/IBTgepOewXFkmR34Jh+SD4TSeTpCP31c= X-Google-Smtp-Source: AGHT+IGZEEfrwOGdZRKK9O1bktRbGrXecsXJjwDwtBP/0A75+TiIWaHdMfuEoKkXpoP7EqvtAtf/nQ== X-Received: by 2002:a05:6a00:8e06:b0:6df:e229:8f16 with SMTP id io6-20020a056a008e0600b006dfe2298f16mr187202pfb.17.1707419247782; Thu, 08 Feb 2024 11:07:27 -0800 (PST) Received: from localhost ([2601:647:4600:84e0:acc2:74e7:bab:f386]) by smtp.gmail.com with UTF8SMTPSA id k16-20020aa788d0000000b006e0651ec05csm88491pff.43.2024.02.08.11.07.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Feb 2024 11:07:27 -0800 (PST) From: Connor Worley To: ffmpeg-devel@ffmpeg.org Date: Thu, 8 Feb 2024 11:07:09 -0800 Message-Id: <20240208190709.38110-2-connorbworley@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240208190709.38110-1-connorbworley@gmail.com> References: <20240208190709.38110-1-connorbworley@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 2/2] lavc/dxv: treat DXT5-tagged files as DXT4 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Connor Worley Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 --- libavcodec/dxv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"; -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".