From patchwork Fri Nov 8 08:55:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manuel Lauss X-Patchwork-Id: 35211 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:2fe5:b0:4a6:1c7:11b7 with SMTP id kw5csp2023807vqb; Fri, 8 Nov 2024 00:55:24 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW9uSEqIpc5SZsIr7qNtF6TfRnoq7dljPoViB2qJ5ijO6l1C21+YgQnrtOMJF4VZGJxUZymjEg4Dk61WqWPmMTd@gmail.com X-Google-Smtp-Source: AGHT+IEk/TmTkclHu7nTdwNm565fFwvHdyascTn7uj0i7sjRuzySXrBvwjUsYruRCwH+rIQH4u1l X-Received: by 2002:a17:907:2d88:b0:a9d:e022:38d8 with SMTP id a640c23a62f3a-a9ef0016b3amr173163666b.51.1731056124150; Fri, 08 Nov 2024 00:55:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731056124; cv=none; d=google.com; s=arc-20240605; b=e9ksf5YqsPi+EUH5sDw5DtEuLmU3Hghuwc9z5jJb92SB3tMAxW/e3BtpD6EVrJSmuL R4fTSYhGpo+Q4o0ocBJnr7JIXpxx5eSAier6Zs2GFXSqeaUNnofeAHBVse6zP0QfZr8z kKEU+WazfCX0wJVpa132E+UuBybGM/ygbDJCqhw4VzNb5r7pOs8cfoBBi7nOt3RYyGzP ytLX9UoPCfLYyRP/bGUQXMlhnzCfcZBNRgSmGCUttfXj9zk2inOC5uG4lG1GsblyBNV7 ZQdqPtHGdLv8oSlS6hkr/I6O6y/FbAeVmVIIPsmfEV7g/R4uPar7f5tgrqTkDTtufiXB y0Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=QopRULIEHqKx1iLlxRla+wZwgYFgR+0BE2LX3tu9lJw=; fh=ylA7vB/iA8muFUzvlzUImw+rp2ODCCq9hl3kedSTahY=; b=JxxLLhIlciCDARf22smokoeZoCTyoxzG1afb55OouPagpQMQRnuwaW81fd6GkZm1Vy ETt4bVxjCZR5IyW+3ug+Pay/lda3su/SU9V2iKUMtM9ZhnHB/O+zKEa6dWQbzAV9hNAr Nz4XL/zJI0r65weT/WelMAJETefOSWavRw9EGWDsCvaDHGEKmOxHfTVwTXJQLpi1MyhD dpPEFo5wkbGjYF5kvg+EtACb/XCFya4T3ejDQVgAC7HocDsBH+RMzQ7j9mmYfTxjeH/q kzLOX6izf7UT+5S0BSaWrgHxX7xaPFxv4cMImlHYGC7uiQipI92pDVRgumSJeVNLRiyU kVww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=hGirYwdl; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTPS id a640c23a62f3a-a9ee0dc2746si198649666b.267.2024.11.08.00.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 00:55:24 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=hGirYwdl; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B8FDF68DD99; Fri, 8 Nov 2024 10:55:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 448A868DBD2 for ; Fri, 8 Nov 2024 10:55:11 +0200 (EET) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4315abed18aso16567535e9.2 for ; Fri, 08 Nov 2024 00:55:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731056110; x=1731660910; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PrzzIGxg/rcgE2T01YLDyeI1u28dOzZBHX6bA2tzV5o=; b=hGirYwdlp2IjxME8cNOBA2PdTWWUQhQSqxpE2C1g46GrF0yXMQSTzH6RuzPAuwlXcv CgtUd/ow0G9xaQ8qxAOJ/bNQnBUKvpSDya1WGQbl1i24LRapBgPX1DGq1Zptpkq5t/uD saqdA2PkuKS4UHBh0qEiKCnvpUTnQwIiLsFvNAGOzRXAVcoVVnUn46NbTUsmiTXUMD5T qKqE5RjawYv8WW1l6knPFEea7EkhtnbnnRpizn6uNHJAeCOnUMfC6lAj9GYbTPpKQ5/F mqmxB6nkRdf03X3aA9wdtz97gs5Pn6ILrHUcAT38FA2fXcxYkemOjmkZqNKWSRApn1Nb bDgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731056110; x=1731660910; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PrzzIGxg/rcgE2T01YLDyeI1u28dOzZBHX6bA2tzV5o=; b=VL7aagZ5vgnRKLvFkP++x3kR1mNMxiS7HF+54kq7Vl+rIuywcOGeCK1Gkx5VUq+1kn hX5Q5vZ3n2XxarQEksgBguYcFN87wa4Ia1XdJfyDkjY9MlQZlYvB7thCauwGVOB0X/Pu wQ9s3912LFtjI5QURUFvxRA84to2eF6ANpYsuPYFJyJgWHa5AyheiZA+NbAiA60Ud2wn Os7BBrPkCwm7R132gEb+OcQU8WavFIBNiWT5TMURd7CpRsVcQHzjMHirSy5Aql/FrNax R6fnyfYdOPqga7ehzPOovPIVnD+zSL3Mz6HxNtbogfuxGP0vBugJbTqS+WpKq/7JaItw RXCg== X-Gm-Message-State: AOJu0YxjKynQbnlZp6UnNdBdymyfcmLx7lDhKCI2YK5jeA+2PVMHoZP7 FfkBsEOPtkDPJgYvcwk5gAT1ywm47kJxeK3a4N/PPr2NY5i3++/W7TG6Tw== X-Received: by 2002:a05:600c:1396:b0:426:6e86:f82 with SMTP id 5b1f17b1804b1-432b7518d6fmr14967995e9.22.1731056110167; Fri, 08 Nov 2024 00:55:10 -0800 (PST) Received: from flagship3.deu.mlau.at (p200300c0270310006fc1140db6601414.dip0.t-ipconnect.de. [2003:c0:2703:1000:6fc1:140d:b660:1414]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381ed987d95sm4002722f8f.44.2024.11.08.00.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 00:55:09 -0800 (PST) From: Manuel Lauss To: ffmpeg-devel@ffmpeg.org Date: Fri, 8 Nov 2024 09:55:02 +0100 Message-ID: <20241108085504.351017-1-manuel.lauss@gmail.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/2] libavcodec/sanm: enhancements 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: Manuel Lauss Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: V2HEPAo+Chgw This set of 2 patches adds support for SMUSH codec47 subcodec1 interpolation table support, and fixes handling of the SMUSH XPAL (delta palette) chunk. Patch 1 aims to reduce the blockyness of quarter-sized keyframes: the codec stream provides data to construct a 256x256 table where the values of 2 adjacent pixels can be used as an index into this table to get a new pixel value to place in between the 2 reference pixels. The current subcodec1 implementation just creates a 2x2 block of the source pixel. Patch 2 fixes the intended fadeout of the scene in the LucasArts Outlaws RAE.SAN (ending) file. Now the there is a proper fadeout and fade-day-to-night transition instead of a sudden black screen. See [1] and [2] for a before and after the patch video. Tested with mpv on all the SAN videos of LucarArts Outlaws and Curse of Monkey Island games (both use SMUSH codec47). [1] http://mlau.at/sanm-before.webm (1,7MB, 40s) [2] http://mlau.at/sanm-after.webm (3,2MB, 61s) Manuel Lauss (2): libavcodec/sanm: add codec47 interpolation table support libavcodec/sanm: fix XPAL handling libavcodec/sanm.c | 136 +++++++++++++++++++++++++++++++++------------- 1 file changed, 97 insertions(+), 39 deletions(-)