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 296274840A for ; Fri, 2 Feb 2024 01:11:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 598CC68D0DD; Fri, 2 Feb 2024 03:11:06 +0200 (EET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7292F68CEE5 for ; Fri, 2 Feb 2024 03:11:00 +0200 (EET) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1d71cb97937so14890725ad.3 for ; Thu, 01 Feb 2024 17:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706836258; x=1707441058; 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=C0ZCdtkvMWEHSAdsAXdSjUxrWPVwTaG2F1OHVQHm90Y=; b=iLdATA5kYMb1iwE1kiGZAPsytsPiy4j+7CyM2Rsw8ERaLlZKJBFSjT3wogFUXl6ZTN CwTX681iS6e57s7/IWeUFkZWv4WWt94xozL3nLPxIqerCjPXO/H5XcKqHE3cKxlSsSVU V8mUCb8kYd5KNdZECDxtoTZBlkXwy+s3qyFRhnE3fHYzKV/QxeFEmaFOzBvrU53JWHRu aJrmRih38uV5bGIRoNEf5grt37HnkV+kR1xxGkWCq2kA4fTq1q9GYo87HH9y4Y/x4hiS RAtQbn/1JG/L0j80VyBU6iREgVl3XvR5B/HC6WGusEjbHzjqI2MY+Mckx3Hsl1NBsSP+ bxnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706836258; x=1707441058; 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=C0ZCdtkvMWEHSAdsAXdSjUxrWPVwTaG2F1OHVQHm90Y=; b=hG8qq+7PVVXYaHA/5+/Xs5KDxTIqiQCo6oJE1oLl5CFBBPF3My43PsHh1LTViIqKgn V8OmQSr7Tf/6o/rH2JEAbcU/0bOUmuZmk5Z3xBe8wS5j12/w2y7MUbOvpSJTkvLbwYlB vr2RqdY+i5uldot02fjM3hhi3uvPZNNoYOASwfqjwK34+PsTTwCQxnlsxinxCij95mj/ 4xl29biyu+SIi9tVcd6tS72LUNxvvZYAl5ie/5xEeSq7r9BXU/TofHOt4yINcryzKT/S 0prYAAg9PyU7pb4wVy5xGOjmukHdYtdHGYlcYl6wWbedn+BG0WfjaFLJvhLq9BxhY1QB NnCw== X-Gm-Message-State: AOJu0YyNvcML+kcmpRGUhr9Qj+hUkIZFdNdyoqwUjx9CGwg4LwmrvRno vRxVotTkETen17CbnBa7xJk7suAkgYIw+pX7O4od8D5m1T2edps9bU+Z4R5Z X-Google-Smtp-Source: AGHT+IEEW1YZEzRqk35SvHCywoTH50rPzA/UMf6/cG9/ldvKU/Y8V56hcCEFz/rvp+n6DFoikdWPhw== X-Received: by 2002:a17:903:40cc:b0:1d9:8b7:52b3 with SMTP id t12-20020a17090340cc00b001d908b752b3mr8755839pld.10.1706836257934; Thu, 01 Feb 2024 17:10:57 -0800 (PST) Received: from localhost ([2607:fb10:7301::1]) by smtp.gmail.com with UTF8SMTPSA id q5-20020a170902c9c500b001d8a94d10dfsm422085pld.282.2024.02.01.17.10.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 17:10:57 -0800 (PST) From: Connor Worley To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Feb 2024 17:10:51 -0800 Message-Id: <20240202011051.46786-2-connorbworley@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240202011051.46786-1-connorbworley@gmail.com> References: <20240202011051.46786-1-connorbworley@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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".