Modern “next-gen” codecs (AV1, Opus, JPEG XL, etc.) have been engineered to make repeat encoding—or “generations” of encoding—virtually artifact-free. Here’s how they do it:
-
Perceptual Quantization & Rate Control
• Instead of uniform quantization, they use psycho-visual (or psycho-acoustic) models to decide which frequencies or spectral bands you’re unlikely to notice getting coarser.
• Bit-allocation algorithms then spend precious bits where they matter most, so even a second encode “only” reshuffles detail in inaudible/imperceptible ways.
-
Reversible (or Near-Lossless) Signal Transforms
• Modern codecs can switch between a fully lossless mode and a high-efficiency lossy mode. If you choose “lossless” (or a “near-lossless” profile), you get bit-perfect or visually indistinguishable results—even after multiple transcodings.
• JPEG XL, for example, has a “modular” mode that can perfectly reconstruct an original JPEG bitstream.
-
Transcode-in-the-Compressed-Domain (“Smart Transrating”)
• When you’re just changing bitrate or cropping/resizing, many implementations can rewrite the compressed bitstream directly—copying or lightly re-quantizing transform coefficients—without a full decode→encode cycle.
• This avoids a second round of heavy quantization, so generation-to-generation drift is minimal.
-
Advanced Entropy Coding
• Arithmetic / range coding (AV1, Opus) or ANS coding (JPEG XL) pack data extremely tightly—and consistently. More efficient entropy coding means fewer “waste bits” and less quantization overhead in each pass.
-
Overlapped & Variable-Size Transforms
• Block-based codecs used to have hard block boundaries that gave blocking artifacts after repeated recompression. AV1 and JPEG XL use overlapped transforms (lapped or wavelet), variable block sizes, and edge-aware filtering to diffuse those boundary errors.
-
Multi-Layer & Scalability Features
• Many modern codecs support spatial, spectral or quality layers—add or remove layers without re-encoding the rest. E.g. you can strip off a “high-res enhancement layer” from a JPEG XL image or an AV1 stream, and you’ll still have the original base layer intact.
-
Better Tools for In-Place Edits
• Cropping, rotation, trimming or channel-mixing can often be done by adjusting metadata or slice headers rather than re-quantizing pixel data. That means simple edits don’t introduce fresh artifacts.
-
Continuous Refinement & Open-Source Ecosystems
• Unlike older “locked-down” codecs, these formats evolve rapidly in open-source. Everyday contributions keep improving filters, rate-control loops, and psycho-models—so each new version tightens up generation-loss margins even further.
———
In practice, that all means:
• If you open an AV1 video, repackage it at a slightly different bitrate, and close it again—there’s virtually no visible “double-compression” blur.
• Encode an Opus stream at 96 kbps, downmix to mono or change the sampling rate, then upmix or bump bitrate—it still sounds cleaner than MP3 or AAC under the same juggling.
• Load a JPEG XL picture, crop it, save at the same quality factor—or even lossless—and you won’t see fresh ringing or blocking.
Put simply, modern codecs minimize “fresh quantization error” on each pass, rely on smarter transforms & entropy coders, and give you lossless (or nearly-lossless) paths when you need them. The result: generation loss is reduced from painfully obvious to essentially imperceptible.