Newshot

LZ-RDO 引入 ARM 的 astc-encoder

Translation(model translation, not the source's own text)

LZ-RDO 落地 ARM 的 astc-encoder

问题:ASTC 对 LZ 来说看起来像噪声

工作原理

  • 对图像做低通滤波(高斯,σ = 2.2)。
  • 与原始图像取平方差。这就是局部高频能量。
  • 对该能量做轻微模糊(σ = 1.25)使其扩散。
  • 将其映射为一个随能量平方根衰减的权重。
  • 端点历史:模式、头部和端点比特。
  • 权重历史:权重比特。
  • 原始编码;
  • 受限编码;
  • 端点替换:从历史中取端点,用这些端点计算该块像素的理想权重,并量化。对端点轴对齐的快速检查会跳过不可能的组合。保留最好的几个候选。
  • 权重拼接:将历史中的每个权重条目与每个权重比特数相同的存活端点候选组合。如果两半都来自同一个更早的块,那就是一次长 LZ 匹配。
  • 一次匹配的成本约为 10 + log2(mtf_position + 32) 比特。
  • 如果端点和权重都与同一个更早的块匹配,它们按一次匹配计费。
  • 前两个字节(模式所在处)从自适应直方图计算成本,因此频繁使用的模式成本更低。
  • 端点/权重边界处的不完整字节按字面比特计费。

使用

  • λ 经过调优,使得约 10 的步长就是可见的差异。
  • 漫反射/反照率:20–40 通常即可。
  • 法线贴图:保持低值,约 10 甚至更低,取决于你的质量底线。
  • -rdo-passes 2(-exhaustive 的默认值)能多榨出一点,代价是编码时间实打实的增加。

局限性

  • 仅支持 LDR。原则上没有什么阻止 HDR。
  • 内存中的大小不变。增益只有在磁盘上或传输中经过 LZ 压缩后才会显现。
  • 它会增加编码时间。它旨在与更高质量的预设搭配使用。

结果

Picture
Picture

致谢

作为这个落地团队中 Arm 这一方,我只想说声谢谢,很高兴看到它进入公开的压缩器实现 =)

不客气! :)

发表回复。

归档

January 2025 September 2024 August 2024 November 2021 October 2021 September 2021 April 2021 February 2021 January 2021 December 2020 June 2020 May 2020 April 2020 November 2019 April 2019 August 2018 April 2017 March 2017 January 2017 November 2016 October 2016 September 2016 January 2016 March 2015 August 2013 July 2013 December 2012

分类

All Compression Dxt

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by Lobsters
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗