1 / 17

Computational Complexity Management of a Real-Time H.264/AVC Encoder

Computational Complexity Management of a Real-Time H.264/AVC Encoder. C S Kannangara, I E Richardson, and A J Miller CSVT 2008. Outline. Coding Complexity of H.264/AVC Frame Rate vs. Coding Complexity Objective Architecture Frame Level Control Algorithm

tawana
Download Presentation

Computational Complexity Management of a Real-Time H.264/AVC Encoder

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computational Complexity Management of a Real-Time H.264/AVC Encoder C S Kannangara, I E Richardson, and A J Miller CSVT 2008

  2. Outline • Coding Complexity of H.264/AVC • Frame Rate vs. Coding Complexity • Objective • Architecture • Frame Level Control Algorithm • Per-frame Complexity Control Algorithm • Experimental Results

  3. Coding Complexity of H.264/AVC • Variable block size • Increase 2.5% complexity for each additional mode • Reduce 4~20% bit rate • Hadamard transform • Increase 20% access frequency • CABAC • Increase 25~30% access frequency • Reduce 16% bit-rate • Multiple reference frame • Increase 20% access frequency for each added frame • Reduce 2~14% bit rate J. Ostermann, J. Bormans, P. List, D. Marpe, M. Narroschke, F. Pereira, T. Stockhammer, and T. Wedi, "Video Coding with H.264/AVC: Tools, Performance and Complexity," IEEE Circuits and Systems Magazine, vol. 4, pp. 7-28, 2004.

  4. Frame Rate vs. Coding Complexity • Video encoding over limited computational resources • Reduce frame rate or encoding complexity? • Subjective quality of high activity videos • Subjective quality of low activity videos J. A. F. Ronnie, T. Apteker, Valentin S. Kisimov, and Hanoch Neishlos, "Video Acceptability and Frame Rate," IEEE Multimedia, vol. 2, pp. 32-40, 1995.

  5. Objective • Managed complexity (MC) coder • Maintain a smooth video frame rate • Frame level control algorithm • Calculate total delay • Calculate target encoding time for the next frame • Drop the frame if coding delay is too high • Per-frame complexity control algorithm • Lagrangian cost • Complexity control

  6. Architecture

  7. Frame Level Control Algorithm (1/2) • Timing scenario of the buffer • Encoding delay • Total_Delayn = Tnst – Tlast + Tf(Buffer_level-1) Tf + Tf(B-1) (drop frames in this situation) F1 F2 F3 F4 F5 T1enc T2enc T3enc T1st T2st T3st T4st T1 T2 T3 T4 T5 Tf Tf Tf Tf F1 F2 F2 F3 F3 F3 F4 F4 F5 T3st – T3 T4st – T5 + Tf The last input frame time The maximum buffer size

  8. Frame Level Control Algorithm (2/2) • Target encoding time for the next frame • Total_Delayn+k=Total_Delayn+k-1–Tf+Tn+k-1target • Total_Delayn+k=Total_Delayn–kTf+Tntarget +Tn+1target +…+Tn+k-1target • Assume Total_Delayn+k = 0 • (Tntarget+Tn+1target+…+Tn+k-1target)/k = Tf –Total_Delayn/k • Assume TntargetTn+1target…Tn+k-1target • Tntarget = Tf –Total_Delayn/k • Max Total_Delayn Min Tntarget = 0 • 0 = Tf - TfB/k  k = B • Tntarget = Tf – [Tnst – Tlast + Tf(Buffer_level-1) ]/B Delay due to Fn+k-1 Tn+k-1target Tn+k-1st Tlast Tf

  9. Per-frame Complexity Control Algorithm (1/3) • Encode Fn within time Tntarget • Lagrangian cost (code or skip a MB) • Code a MB • Jcode = Dcode + rRcode + cCcode • Skip a MB • Jskip = Dskip (MV=0 without residual) • Jskip < Jcode ? skip : coding • r • r  Aexp(BQP) • A=7.410-8F+5.210-5B=-3.710-5F+0.3 • F = (Avg. MSE per MB)  (Avg. bits per MB) Set to 1 Detail

  10. Per-frame Complexity Control Algorithm (2/3) • r(RD control) • D(xi,Mi)=FiR-1(Xi,Mi)  • F = (1/N)Fi  r  Aexp(BQP) • A=7.410-8F+5.210-5 • B=-3.710-5F+0.3 • (by linear regression) Foreman(275-325) Foreman(100-150) Carephone(100-150) C.S. Kannangara, I.E.G. Richardson, M. Bystrom, J.R. Solera, Y. Zhao, A. MacLennan and R. Cooney, “ Low Complexity Skip Prediction for H.264 Through Lagrangian Cost Estimation” , IEEE Trans. Circuits and Systems for Video Tech., vol. 16, no. 2, pp. 202- 208, February 2006.

  11. Per-frame Complexity Control Algorithm (3/3) • c (Complexity control) • cn = cn-1 + cn • cn = • c2= 0.2(1-)2(T1enc – T2enc) • c1= 0 • Limitation: • -2  cn 1 (handling Non-stationary behaviour) • Similar number of drop MBs between successive frames • cn Limitc (limiting the number of drop MBs) • Drop frames rather than drop MBs Actual encoding time Target percentage of saved coding time C. S. Kannangara and I. E. G. Richardson, "Computational Control of an H.264 Encoder through Lagrangian Cost Function Estimation", VLBV 2005, Sardinia, Italy, September 2005.

  12. Experimental Results (1/6) • Environment • JM 7.4 • Baseline Profile • One reference frame, IPPP… • RDO disabled • Start at 15fps frame rate • Multiple processing threads • Proposed algorithm • Encoding process

  13. Experimental Results (2/6) • Initial environment

  14. Experimental Results (3/6)

  15. Experimental Results (4/6)

  16. Experimental Results (5/6)

  17. Experimental Results (6/6)

More Related