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 330384840A for ; Fri, 2 Feb 2024 00:34:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CF46268D0EF; Fri, 2 Feb 2024 02:34:23 +0200 (EET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B164068D0B4 for ; Fri, 2 Feb 2024 02:34:17 +0200 (EET) Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-2906773c7e9so1145952a91.1 for ; Thu, 01 Feb 2024 16:34:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706834055; x=1707438855; 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=PSoaAlIR3ISy1byVH/YZP/1drpU0hjmwxNRRUWtdAivU/QAWcg+6z5RJ/vZFfDqYsx NY1EUePAPBMK0CzIkDA5pm8yp/lY1ba0l936SGPz0vQ0TNCL70mkEP+QqS7jf5y2QNc+ NTdkCzg4Lj+EYc1Oujd8cmnF++agZydN71FTgBNoS0kPlQOgqvF0fBN/WkhmRhEdUbyy GmHV0wE8U0RB1EnkDp6MZVqnoFYCmj7lHQcym8AigHyrRB42kDlSLTrCkLAyfhp33ZtA eedT/TmwUk8/YMhJxWnW6W3iFyBOzxiQAW6hnS4PANjqJiiAqpF3Xo8PB27JXF8AofNc jpKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706834055; x=1707438855; 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=g/bgH8XiXSYFqXADoSI8ZNU36sE4V5XeRn0ZD1BS5iVFTXjMr4kgNPuvUL/mCAuC4h ZroRGhIotNEbZ9ZC6oP6PEY9Y0RMD+kOKwXF9BjGqL1NJFrckMSv6hPG6gW7MnhHHUBa 0LPLJJV9RZEmsDnDcE7ghguB1mGuakNTGmOSLYYo8XSXKVaVxM5klI1APNiuHY850aAt IIUOy7qTYHxyjX1U7bl4ZLuJp8W5ArQxUwrag8bqRoPlyxY/jmMk+Urg75xqvDSOLRta lEVKNAAqRwqMu/cSjq/m4ziqJAKT+6X4clbxHjlZnuSFuQXJy6D5GSRhW5opnuMWp0I9 ElDA== X-Gm-Message-State: AOJu0YyOWfMPDCdwkjp84SF8EB75DCvwsDAJ4ZB+OVkFKVFEDHxONPWD nImjB85FT1YuN6mRs7UHwaTWSYkJsdXr885tP1ZV05YxIozoMvxY9wlJqAa7 X-Google-Smtp-Source: AGHT+IFaMCFNz975QjHsCsZnq+aTJBATFQlH1kDiGQjwZ+qZqskuI+6hN4L2EOg4Vg3Bm38getLT1Q== X-Received: by 2002:a17:90a:d196:b0:296:2f9f:8969 with SMTP id fu22-20020a17090ad19600b002962f9f8969mr1623220pjb.48.1706834055016; Thu, 01 Feb 2024 16:34:15 -0800 (PST) Received: from localhost ([2607:fb10:7301::1]) by smtp.gmail.com with UTF8SMTPSA id se8-20020a17090b518800b00295bc312ceasm443627pjb.34.2024.02.01.16.34.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 16:34:14 -0800 (PST) From: Connor Worley To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 Feb 2024 16:34:00 -0800 Message-Id: <20240202003400.30850-2-connorbworley@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240202003400.30850-1-connorbworley@gmail.com> References: <20240202003400.30850-1-connorbworley@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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".