Abstract
This paper presents an optimization method for H.264/AVC intra-frame encoding that prioritizes Constant Perceptual Quality (CPQ). By iteratively adjusting quantization parameters (QP) based on the Structural Similarity (SSIM) index, the proposed scheme achieves more uniform visual quality across frames. Experimental results demonstrate that this approach significantly reduces quality variance and improves rate-distortion performance compared to standard fixed-QP methods, offering a practical solution for high-quality video archival and on-demand services.
Introduction
In video compression, the Quantization Parameter (QP) is the primary lever for balancing file size against image quality. Standard encoders, such as H.264/AVC, typically employ a "fixed-QP" approach for intra-frames (I-frames), applying a uniform level of compression across all blocks. However, this method fails to account for the non-uniform nature of human visual perception; we are more sensitive to artifacts in certain textures than others.
Furthermore, because blocks in an I-frame are spatially dependent due to intra-prediction, finding a mathematically optimal bit allocation is computationally prohibitive. This paper introduces a practical, iterative bit allocation scheme that prioritizes "Constant Perceptual Quality" (CPQ) within individual I-frames to improve both immediate visual consistency and the compression efficiency of subsequent predictive frames.
Methodology
The proposed system moves away from block-level optimization to a more manageable unit called the Group of Macro Blocks (GOMB)—a 4x4 grid of macroblocks. This structure reduces computational complexity while allowing for localized quality control.
The core of the approach is the CPQ Algorithm, an iterative feedback loop. As shown in Figure 1, the process begins with an initial encoding. The system then measures the perceptual quality of each GOMB using the Structural Similarity (SSIM) index. If a GOMB’s quality deviates from a target threshold ($Q_T$), the algorithm adjusts the QP for those specific blocks and re-encodes.
To efficiently reach a specific bit budget or quality target, the authors utilize an adaptive-step search to find the ideal $Q_T$. While SSIM drives the internal optimization, Multi-scale SSIM (MS-SSIM) is used for final evaluation due to its high correlation with human subjective judgment.
Experimental Results
The researchers evaluated the CPQ method using standard video benchmarks, including CIF (e.g., bus, foreman) and 720P (e.g., parkjoy) sequences. The results consistently showed that the CPQ method outperforms fixed-QP encoding across various content types.
Key findings include:
- Reduced Quality Variance: The CPQ method reduced the standard deviation of quality across GOMBs by 45% to 60% on average, leading to a more uniform viewing experience.
- Improved Rate-Distortion: As illustrated in Figure 5, the proposed method provides higher perceptual quality (MS-SSIM) at the same bitrate compared to fixed-QP.
- Bit Savings: The method achieved average bit savings of 4% to 9%, reaching up to 24% in specific cases like the container sequence.
Discussion and Insights
A critical insight from this work is the "Anchor Effect." Because P-frames use the I-frame as a reference, a perceptually superior I-frame reduces residual error for the entire Group of Pictures (GOP). By forcing every part of the frame to have a similar SSIM score, the algorithm naturally allocates more bits to complex textures and fewer to resilient structures, aligning with human preference for visual consistency.
While the iterative nature of the algorithm currently limits its use in real-time applications, its performance gains make it highly suitable for offline video-on-demand or archival storage. Future work may involve adapting these principles to newer standards like HEVC or VVC.
Summary updated