180 likes | 312 Views
Optimum Bit Allocation and Rate Control for H.264/AVC. Wu Yuan, Shouxun Lin, Yongdong Zhang, Wen Yuan, and Haiyong Luo. CSVT 2006. Outline. Introduction Rate-Distortion Modeling Rate Distortion Optimization Macroblock-Layer Rate Control Experimental Results Comparisons with JVT-G012.
E N D
Optimum Bit Allocation and Rate Control for H.264/AVC Wu Yuan, Shouxun Lin, Yongdong Zhang, Wen Yuan, and Haiyong Luo CSVT 2006
Outline • Introduction • Rate-Distortion Modeling • Rate Distortion Optimization • Macroblock-Layer Rate Control • Experimental Results • Comparisons with JVT-G012
Introduction (1) • H.264/AVC Rate Controller Intra/Inter prediction Residual http://www.pixeltools.com/rate_control_paper.html#bas
MADprev MAD Introduction (2) • The Chicken and Egg Dilemma Rate Control !? QP RDO MAD Solution: Guess! MAD = MADprev + Coding (Intra/Inter mode selection) (Residual calculation)
Rate-Distortion Modeling (1) • Overhead Bit-Rate Prediction • Overhead bits: QP, MV, MB mode, … • Using history • Coding Complexity Prediction • Complexity: Residual (MAD) • Using history • R-D Behavior Prediction • Using overhead bits, residual, and initial QP • Distortion Prediction • Using history Overhead (MV, QP, …) Residual (org - pred) Entropy coding Encoded frame
n-1 n Rate-Distortion Modeling (2) • Overhead Bit-Rate Prediction • JVT-G012: Hi = Hiave • Proposed: Hi = Hiprev
Rate-Distortion Modeling (3) • Coding Complexity Prediction • MAD = MADprev + • Data points are first selected by the spatial and temporal distance, and then removing outliers. n-1 n JVT-G012
Rate-Distortion Modeling (4) • R-D Behavior Prediction • Assumption: DCT coefficients of residual can be approximated by • Distortion (Laplace distribution) * Residual rate Taylor expansion Let /D = 1+x * A. Viterbi and J. Omura, Principles of Digital Comuunicatin and Coding. New York: McGraw-Hill Electrical Engineering Series,1979
QPmax QPave QPmin Rate-Distortion Modeling (5) • R-D Behavior Prediction • Taylor expansion of R(Qstep) atQstepave • Rate of the ith MB: (Rate of residual) Rate of residual Rate of overhead
Rate-Distortion Modeling (6) • Distortion Prediction • Assumption 1: Distortion of DCT coefficients is uniformly distributed • D = 2= |x-y|2/12 (Qstep2/12) • Assumption 2: Qstepi Qstepiprev • Qstepi (Diprev/Qstepiprev) • Di Qstepi2 (Qstepi Diprev/Qstepiprev) Di = iQstepi, where i= Diprev/Qstepiprev (For scalability) Set as 1
Rate Distortion Optimization • Consider Di = iQstepifor theithMB • subject to (Lagrange theory) Rate of the ith MB
Macroblock-Layer Rate Control (3) • Rate Controller • Initialization: QPave = QPstart, QPmin = max(QPave-3, 0), and QPmax = min(QPave+3, 51). Let i = 0 • Optimum Bit Allocation for ith MB: • k = i. • R-D modeling: • Optimum Computations: • k = k+1. If k N, jump to 2). • Compute optimal QPi*: (by linear regression) (by linear regression) (overhead bits) (check if > T when adding with Hk)
Macroblock-Layer Rate Control (4) • Rate Controller • Adjust QPi*: QPi* = max{QPi-1*-1, min{QPi*,QPi-1*+1}}. Then QPi* = max{1,QPave-3, min{51,QPave+3,QPi*}} • Encoding • Update (Reducing blocking effect) (For smoothness)
Experimental Results (1) CIF: Mobile, Paris Rate Prediction Error Ratio: