1 / 32

Homogeneity and Distortion-Based Intra Mode Decision Architecture for H.264/AVC

Homogeneity and Distortion-Based Intra Mode Decision Architecture for H.264/AVC. Guilherme Corrêa 1 , Cláudio Diniz 1 , Daniel Palomino 2 , Roger Porto 2 , Luciano Agostini 2 , Sergio Bampi 1 {grcorrea, cmdiniz, bampi}@inf.ufrgs.br , {danielp.ifm, rogerecp, agostini}@ufpel.edu.br

gaius
Download Presentation

Homogeneity and Distortion-Based Intra Mode Decision Architecture for H.264/AVC

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. Homogeneity and Distortion-Based Intra Mode Decision Architecture for H.264/AVC Guilherme Corrêa1, Cláudio Diniz1, Daniel Palomino2, Roger Porto2, Luciano Agostini2, Sergio Bampi1 {grcorrea, cmdiniz, bampi}@inf.ufrgs.br , {danielp.ifm, rogerecp, agostini}@ufpel.edu.br ¹Informatics Institute – PPGC Federal University of Rio Grande do Sul (UFRGS), Porto Alegre, Brazil 2 Group of Architectures and Integrated Circuits (GACI) Federal University of Pelotas, Pelotas, Brazil ICECS 2010

  2. Outline Introduction Mode Decision in H.264/AVC Fast Mode Decision Developed Architectures Conclusions

  3. Introduction • H.264/AVC: State-of-the-art video coding standard • Predictions performed according to a set of encoding modes • The choice of the best mode is essential for the encoder performance • H.264/AVC reference software applies the RDO (Rate-Distortion Optmization) technique • Encodes for all modes • Compares the costs of all modes in order to choose the best one

  4. H.264/AVCEncoder Q Current Frame (original) T Entropy Coding - Inter-Frame Prediction Motion Estimation Reference Frame Motion Compensation Mode Decision Intra-Frame Prediction Current Frame(reconstructed) T-1 Q-1 Filter +

  5. Intra4x4Modes M M M M M M M M M A A A A A A A A A B B B B B B B B B C C C C C C C C C D D D D D D D D D E E E E E E E E E F F F F F F F F F G G G G G G G G G H H H H H H H H H I I I I I I I I I J J J J J J J J J Average (A..D, I..L) K K K K K K K K K 0 1 2 L L L L L L L L L 3 4 5 6 7 8

  6. Intra16x16andChrominanceModes Vertical Horizontal H H V V DC Plane H H Average (H + V) V V

  7. Outline Introduction Mode Decision in H.264/AVC Fast Mode Decision Developed Architectures Conclusions

  8. EncodingProcess Bit rate (R) Intra/Inter Prediction Residual Generation T/Q EntropyCoding Best Mode Mode Decision DistortionCalculation Add to Prediction T-1/Q-1 Distortion (D) Prediction occurs according to the modes In the RDO technique, the encoding process is fully applied once for each mode Prohibitive number of calculations

  9. ModeDecision(RDO) Bit rate Distortion Lagrange Multiplier Rate-Distortion Cost (J) computed for all modes Optimal results, but high complexity!

  10. Outline Introduction Mode Decision in H.264/AVC Fast Mode Decision Developed Architectures Conclusions

  11. FastIntraModeDecision • Divided in four steps: • Best blocksizedecision (luma) • Best Intra 4x4 Modedecision (luma) • Best Intra 16x16 Modedecision (luma) • Best Intra 8x8 Modedecision (chroma) • Decision (1) is basedonthemacroblock’sheterogeneitylevel • Decision (2), (3) and (4) are basedondistortion

  12. FastIntra Mode Decision Luminance Decision 1: Heterogeneity Yes No Decision 3:Distortion Decision 2:Distortion Mode 0 Mode 0 Mode 1 Mode 2 Mode 3 Mode 1 Mode 2 Mode 4 Mode 5 Mode 6 Mode7 Mode 8 Mode 3 Chrominance Decision 4:Distortion Mode 0 Mode 1 Mode 2 Mode 3

  13. Best Intra 4x4 and Intra 16x16 Modes • Based on the distortion between the original and the predicted blocks • Simulations to evaluate the impact of this decision: • Only I frames • 100 CIF frames • 8 video sequences • Only 4x4 (or only 16x16 blocks) • SAD, SATD and SSD

  14. Best Intra 4x4 and Intra 16x16 Modes

  15. Best Block Size Decision • Heterogeneous regions  small blocks • Homogeneous regions  large blocks • (LEE, 2009): • The higher the amount of details of an image, the higher tends to be the residual variation • The higher the residual variation, the higher tends to be the amplitude of low-frequency components in the transformed block

  16. Best BlockSize Decision • DCT Transform • Applied over the macroblock (16x16) • Y = AXAT • 256 elements, but... • Cosine function is symmetric and repeats after each 2π • Reductions to the first trigonometric quadrant led to just 16 elements!

  17. Best BlockSize Decision A matrix (integer approximation) after factorization:

  18. Best BlockSize Decision • (LEE, 2009): coefficients in the first line and in the first column of the MB (except DC) are enough to detect heterogeneity • Simulations to find the best H threshold between I4MB and I16MB • Best result: 2800

  19. Intra Mode Decision Results

  20. Reduction in the # ofCalculations • RDO Intra Mode Decision: 148 full encodings • Proposed Intra Mode Decision: 1 full encoding (add distortion and heterogeneity calculation to the process). • Reduction of 148 times in the number of iterations in the encoding process!

  21. ComparisonwithRelated Works

  22. Outline Introduction Mode Decision in H.264/AVC Fast Mode Decision Developed Architectures Conclusions

  23. SAD Architecture Orig(0) - abs Pred(0) + Orig(1) - abs Pred(1) + Orig(2) - abs Pred(2) + Orig(3) - abs Pred(3) + + SAD Orig(4) - abs Pred(4) + Orig(5) - abs Pred(5) + Orig(6) - abs Pred(6) + Orig(7) - abs Pred(7)

  24. HeterogeneityCalc. Architecture

  25. Heterogeneity Calc. Architecture

  26. HeterogeneityCalc.Architecture INPUT Partial DCT 16x16 256 SELECTOR 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 MS MS MS MS MS MS MS MS MS MS MS MS MS MS MS MS ADDER´S TREE CONTROL 12 OUTPUT BUFFER 24 OUTPUT

  27. IntraMode Decision Architecture Original block SAD 1 Prediction 1 SAD 2 Prediction 2 SAD 3 COMPARE Prediction 3 SAD 4 Prediction 4 Best I4MB SAD 5 Prediction 5 Decision SAD 6 Prediction 6 SAD 7 Prediction 7 SAD 8 Best intramode(s) Prediction 8 SAD 9 Prediction 9 Original block Prediction 1 Prediction 2 Best I16MB Prediction 3 SAD 1 COMPARE Prediction 4 SAD 2 Partial DCT 16x16 Best block size SAD 3 Original block SAD 4

  28. SynthesisResults FPGA Device: XilinxVirtex-5 XC5VLX110T-3

  29. Outline Introduction Mode Decision in H.264/AVC Fast Mode Decision Developed Architectures Conclusions

  30. Conclusions • Independent heuristics for Intra Mode Decision were proposed • Comparison with RDO technique: • Reduction of 148 times in the number of encoding iterations • Bit-rate increase (4% in average) • 0.30 dB PSNR drop • Best results compared with related works • Architectures are capable of processing HD 1080p videos in real time

  31. Homogeneity and Distortion-Based Intra Mode Decision Architecture for H.264/AVC Thankyou! Questions? Guilherme Corrêa1, Cláudio Diniz1, Daniel Palomino2, Roger Porto2, Luciano Agostini2, Sergio Bampi1 {grcorrea, cmdiniz, bampi}@inf.ufrgs.br , {danielp.ifm, rogerecp, agostini}@ufpel.edu.br ¹Informatics Institute – PPGC Federal University of Rio Grande do Sul (UFRGS), Porto Alegre, Brazil 2 Group of Architectures and Integrated Circuits (GACI) Federal University of Pelotas, Pelotas, Brazil ICECS 2010

  32. Best Block Size Decision π/2 π/4 325π/32 = 5π/32 27π/32 π/8 π/16 π/32 π 0 37π/32 59π/32 3π/2 Homogeneity and Distortion-Based Intra Mode Decision Architecture for H.264/AVC • Matrix A calculation generates 256 different elements • Cosine function is symmetric and repeats after each 2π • First quadrant reductions • Example: • Line 13, column 12

More Related