The case against JPEG XL
JPEG XL 常因技术灵活性和作为免版税替代品的身份而受到赞誉。虽然该编解码器在 2023 年曾被 Google 拒用于 Chrome,但最近基于 Rust 的解码器被集成进浏览器后,关于其在 Web 上是否必要的讨论又被重新点燃。尽管设计上有可取之处,但与 AVIF 等现代替代品相比,JPEG XL 在实际用途、效率和性能上仍面临严峻挑战。
从功能需求看,Web 更需要通用的有损压缩来控制带宽并保持视觉质量。 JPEG XL 虽然支持无损模式,但相比 WebP 等替代品带来的性能提升有限,且只在对带宽不敏感的少数场景中有意义。因为 JPEG XL 在有损压缩上并未超越现有竞争者,其"无损更优秀"这一卖点不足以为在浏览器生态中引入新标准这一复杂性提供充分理由。
实测数据也显示,JPEG XL 在速度和单位比特的保真度上不及现代编码器。像 AV1 这样的格式经过多年主观测试和感知优化,在 CVVDP 、 SSIMULACRA2 等指标上持续表现更好。 JPEG XL 的内部设计缺乏方向性预测模式和有效的去块滤波器,对复杂边缘的保留和非摄影内容的处理能力不如 AVIF 。其对样条或补丁等复杂手段的依赖也增加了实现与优化的难度,使其在常见 Web 图像场景中处于明显劣势。
解码时间是另一大问题。尽管支持者强调 JPEG 重新压缩是重要功能,但代价是显著增加的处理时间,效率提升并非"免费"。此外,JPEG XL 允许生成解码代价高昂的文件,可能对低端设备带来安全与性能风险。相比之下,AVIF 在渐进式渲染方面表现更好,能在更短时间内显示可用图像,同时使用更少总带宽。
总体来看,对 JPEG XL 的呼声更多来源于对开发者选择权的诉求与对浏览器厂商集中化的反感,而不是其在 Web 场景下的性能优势。它对于浏览器外的专业创作工作流、摄影与存储仍具吸引力,但并未为 Web 平台提供独特或必须的价值。考虑到 AVIF 生态的成熟和专为 Web 设计的格式带来的明确好处,再增加一种编解码器很可能只会增加不必要的复杂性,而难以显著改善用户体验。
JPEG XL is often praised for its technical flexibility and its status as a royalty-free alternative to established formats. While the codec was initially rejected by Google for Chrome in 2023, the recent integration of a Rust-based decoder into browsers has reignited discussions about its necessity for the Web. Despite the codec's impressive design, it faces significant challenges regarding its practical utility, efficiency, and performance compared to modern alternatives like AVIF.
From a functional standpoint, the Web primarily requires versatile lossy compression to manage bandwidth and maintain visual quality. While JPEG XL offers a lossless mode, its performance gain over alternatives like WebP is marginal and limited to a narrow range of use cases that are not highly sensitive to bandwidth. Because JPEG XL fails to outperform current competitors in lossy compression, its primary selling point of superior lossless performance does not justify the complexity of introducing a new standard to the browser ecosystem.
Empirical data reveals that JPEG XL lags behind modern encoders in both speed and fidelity per bit. Competitive formats like AV1, which benefits from years of subjective human trials and specialized perceptual tuning, consistently produce better results in metrics like CVVDP and SSIMULACRA2. JPEG XL's internal design, which lacks directional prediction modes and effective deblocking filters, makes it fundamentally less capable of handling complex edge preservation and non-photographic content compared to AVIF. The reliance on complex alternatives like splines or patches, which are harder to implement and optimize, leaves JPEG XL at a significant disadvantage for the average Web image.
Decode time represents another major hurdle for the format. While some proponents highlight JPEG recompression as a key feature, the cost is a significant increase in processing time, meaning the efficiency gain is not truly free. Furthermore, JPEG XL allows for the creation of files that are computationally expensive to decode, posing a potential security and performance risk for lower-end devices. In contrast, AVIF has demonstrated superior progressive rendering capabilities, allowing for usable images to be displayed significantly faster while using less total bandwidth.
Ultimately, the argument for JPEG XL often feels rooted more in a desire for greater developer choice and resistance to browser-maker consolidation than in the codec's performance on the Web. While it remains a compelling piece of technology for professional creative workflows, photography, and storage outside of the browser environment, it does not offer a unique or necessary value proposition for the Web platform. Given the maturity of the AVIF ecosystem and the clear benefits of purpose-built Web formats, adding another codec would likely result in unnecessary complexity without a meaningful improvement in user experience.
312 comments • Comments Link
• AVIF 与 JPEG XL 因起源不同而面临不同的采用挑战:AVIF 借助与 AV1 视频硬件共享的基础设施推广,而 JPEG XL 则以出色的多用途能力和对 legacy JPEG 文件的无损迁移路径为卖点。
• 硬件解码支持仍是争议焦点。 AVIF 依赖视频配置文件(通常限定为 4:2:0),这可能导致插图和文字表现欠佳;而 JPEG XL 在质量上更有优势,但软件解码速度相对较慢。
• 关于渐进式解码的讨论凸显了用户体验期望的分歧。 JPEG XL 提供真实且连续的图像细化体验,而 AVIF 则通过分层处理实现类似的视觉效果,这在某些硬件上更高效,但在技术上与渐进式渲染有所不同。
• 无损图像压缩常被视为小众需求,但对医疗影像、高端数码艺术和科学数据等领域仍至关重要,在这些场景中"感知无损"的替代方案往往会引入不可接受的伪影。
• 图像格式解码器的安全性问题不容忽视;像 JPEG XL 这样设计复杂且模块化的格式,理论上可能被资源密集型的"解压炸弹"或复杂的算法预测器利用,造成攻击面。
• 试图开发单一"通用"图像格式非常复杂,因为网络性能(要求小文件体积和快速解码)与归档存储(优先位级无损质量和长期兼容性)之间存在竞争性需求。
• 形象塑造对图像格式的大众采用至关重要。像 JPEG XL 这样的名称能传达清晰的血统和互操作性,而 AVIF 这种来源于视频、技术感强的名称可能让非专业用户感到困惑。
• 浏览器厂商在选择支持格式时需在多方压力中权衡,既要避免给 Web 开发者造成"格式疲劳",又要考虑像 JPEG XL 这样新标准可能带来的技术优势。
• 行业内正转向现代、免版税的标准以取代 HEIF 和传统 JPEG 等受专利限制的旧格式,但鉴于海量现有标准 JPEG 文件的存在,过渡进程仍然缓慢。
• 新编解码器最终是否可行,很大程度上不取决于理论上的压缩效率,而取决于实际部署的可行性,包括许可是否明确、跨平台的硬件加速以及直观的编码工具是否可用。
这场讨论反映了在优化现代 Web 与维护档案完整性之间的深层技术分歧。虽然普遍认为现有格式已显陈旧,但业界在倾向于高效且易于硬件加速的基于视频的格式(如 AVIF)或更通用、更适合存档的标准(如 JPEG XL)之间仍存在较大分歧。归根结底,很难用单一"one-size-fits-all"格式来同时满足实时 Web 传输与长期图像存储等不同用例所需的根本性技术权衡。 • AVIF and JPEG XL face different adoption challenges due to their origins, with AVIF leveraging its shared foundation with AV1 video hardware, while JPEG XL offers superior versatility and a lossless migration path for legacy JPEG files.
• Hardware decoding support remains a contentious issue; AVIF's reliance on video-based profiles (often limited to 4:2:0) risks suboptimal quality for illustrations and text, whereas JPEG XL provides higher-quality support but faces slower software decoding speeds.
• The "progressive decoding" debate highlights a divide in user experience expectations: JPEG XL provides a true, seamless refinement of the image, while AVIF achieves a similar visual goal through layered passes that are more efficient for some hardware but technically distinct from progressive rendering.
• Lossless image compression is frequently dismissed as a niche requirement, yet it remains critical for specific fields like medical imaging, high-end digital art, and scientific data, where "perceptually lossless" alternatives often introduce unacceptable artifacts.
• Security concerns regarding image format decoders are significant, as complex formats with modular design—like JPEG XL—can theoretically be exploited through resource-intensive "decompression bombs" or complex algorithmic predictors.
• Developing a single "universal" image format is complicated by the competing needs of web performance (where small file sizes and fast decoding are paramount) and archival storage (where bit-perfect lossless quality and long-term compatibility are preferred).
• The branding of image formats matters significantly for public adoption; names like JPEG XL communicate a clear lineage and interoperability, whereas technical or video-derived names like AVIF can create confusion for non-expert users.
• Browser vendors balance competing pressures when choosing formats, weighing the desire to avoid "format fatigue" for web developers against the potential technical advantages of new standards like JPEG XL.
• The industry is moving toward modern, royalty-free standards to replace older, patent-encumbered formats like HEIF and legacy JPEG, though the transition remains slow due to the massive existing backlog of standard JPEG files.
• The ultimate viability of a new codec depends less on theoretical efficiency and more on the pragmatics of deployment, including licensing clarity, cross-platform hardware acceleration, and the availability of intuitive encoding tools.
The discussion reflects a deep technical divide between optimizing for the modern web and preserving archival integrity. While there is a consensus that existing formats are outdated, disagreement persists over whether to favor highly efficient, hardware-accelerated video-based formats like AVIF or more versatile, archival-friendly standards like JPEG XL. Ultimately, the industry struggles to reconcile the need for a single "one-size-fits-all" format with the reality that different use cases—such as real-time web delivery versus long-term photography storage—demand fundamentally different technical trade-offs.