30
RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE Hardware Implementation of the H.264/AVC CABAC Entropy Decoding Core Authors: Eng. Rufino R. Cabrera Álvarez Eng. Osmany Yaunner Núñez Eng. Orlando Landrove Gámez PhD. Glauco Guillén Nieto Havana, September 2015

Hardware Implementation of the H.264/AVC CABAC Entropy ... · H.264/AVC CABAC Entropy Decoding Core. Authors: ... code functions are replaced by CABAC Core IP Modules (VHDL implementation)

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Hardware Implementation of the H.264/AVC CABAC Entropy

Decoding CoreAuthors: Eng. Rufino R. Cabrera Álvarez Eng. Osmany Yaunner Núñez Eng. Orlando Landrove Gámez PhD. Glauco Guillén Nieto

Havana, September 2015

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Introduction

• Cuba is broadcasting the Digital Television Signal

• It does not have a National Solution for this equipment

• LACETEL researchers are designing some IP modules to achieve the Technology Independence

DTMB ModulatorIP Module DTMB

De-ModulatorIP Module

H.264 Decoder

IP Module

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Content

1 Scope: Problematic Situation, Problem, Goal, Hypothesis.

2 Design: CABAC Block Diagram, Design Block Diagram, Design Insertion in embedded system on Virtex-5 board.

3 Results: Time Diagram of each module, Time analysis of final design.

4 Conclusions and Recommendations.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Content

1 Scope: Problematic Situation, Problem, Goal, Hypothesis.

2 Design: CABAC Block Diagram, Design Block Diagram, Design Insertion in embedded system on Virtex-5 board.

3 Results: Time Diagram of each module, Time analysis of final design.

4 Conclusions and Recommendations.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

DDR-2Memory

Problematic Situation

Timer Ctrl UART Ctrl IT Ctrl

Compact Flash

Memory

Data MemoryProgram Memory

FPGA

PowerPC

Embedded PeripheralsVirtex-5 Board

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

DDR-2Memory

Problematic Situation

Timer Ctrl UART Ctrl IT Ctrl

Compact Flash

Memory

Data MemoryProgram Memory

FPGA

PowerPC

Embedded Peripherals

JM18.6H.264

Reference Software

NO REAL TIME

Virtex V Board

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

DDR-2Memory

Problematic Situation

Timer Ctrl UART Ctrl IT Ctrl

Compact Flash

Memory

Data MemoryProgram Memory

FPGA

PowerPC

Embedded Peripherals

JM18.6H.264

Reference Software

NO REAL TIME

JM18.6H.264

Reference Software

Virtex V Board

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Problematic Situation

PowerPC440…

#include "global.h"#include "memalloc.h"#include "biaridecod.h"

…#define B_BITS 10 #define HALF 0x1FE#define QUARTER 0xFF

value CABAC_Decoder (){

…Return Value}

Write_reg (reg0, dir_reg0); Write_reg (reg1, dir_reg1);

…Read_reg (reg4, dir_reg4); Other Peripherals

IP Modules

PLB

BUS

If some code functions are replaced by IP Modules (VHDL implementation) it is possible to decrease the system decoding time.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Goal

PowerPC440…

#include "global.h"#include "memalloc.h"#include "biaridecod.h"

…#define B_BITS 10 #define HALF 0x1FE#define QUARTER 0xFF

value CABAC_Decoder (){

…Return Value}

Write_reg (reg0, dir_reg0); Write_reg (reg1, dir_reg1);

…Write_reg (reg4, dir_reg4); Other Peripherals

IP Module CABAC Core

PLB

BUS

Replace the Arithmetic Binary Decoder code functions by CABAC Core IP Module

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Hypothesis

PowerPC440…

#include "global.h"#include "memalloc.h"#include "biaridecod.h"

…#define B_BITS 10 #define HALF 0x1FE#define QUARTER 0xFF

value CABAC_Decoder (){

…Return Value}

Write_reg (reg0, dir_reg0); Write_reg (reg1, dir_reg1);

…Write_reg (reg4, dir_reg4); Other Peripherals

IP Module CABAC Core

PLB

BUS

If the Arithmetic Binary Decodercode functionsare replaced by CABAC Core IP Modules (VHDL implementation) it is possible to decrease the decoding time by at least 10%.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Content

1 Scope: Problematic Situation, Problem, Goal, Hypothesis.

2 Design: CABAC Block Diagram, Design Block Diagram, Design Insertion in embedded system on Virtex-5 board.

3 Results: Time Diagram of each module, Time analysis of final design.

4 Conclusions and Recommendations.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

CABAC Block Diagram

De-binarization

ContextModel

Video Pixels

CABAC Decoding process

Binary Arithmetic Decoding engine

.

Termination

Bypass

RegularH.264 Binary code

Bin Value

Bin parameters

Probability Table

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

CABAC Block Diagram

De-binarization

ContextModel

Video Pixels

CABAC Decoding process

H.264 Binary code

Bin Value

Binary Arithmetic Decoding engine

.

Termination

Bypass

Regular

Bin parameters

Probability Table

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Design Block Diagram

if (A == B)

=AB

0/1

{X= A;

}else{X= A+B;

}

AX

+ABY = FindTable[X];

000000011100011010010001101011111111011010100111101111010

Y

Methodology used to design

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Design Insertion in Embedded SystemOffset

(32 bits)

Range (32 bits)

MPS(1 bits)

Start(2 bit)

WR(1 bit)

Shift(5 bits)

State(6 bits)

Two_Bytes(16 bits)

0

1

2

Registers

New_Offset(32 bits)3

New_Range(32 bits)4

New_MPS(1 bits)

End (1 bit)

bin(1 bit)

New_Shift(5 bits)

New_State(6 bits)

Undefined(17 bits)5

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Content

1 Scope: Problematic Situation, Problem, Goal, Hypothesis.

2 Design: CABAC Block Diagram, Design Block Diagram, Design Insertion in embedded system on Virtex-5 board.

3 Results: Time Diagram of each module, Time analysis of final design.

4 Conclusions and Recommendations.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

PowerPC Design

Input

Output

IP module Design

Time Diagram

Results of each module

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

PowerPC Design

Input

Output

Results of each module (Final Decode)

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

IP module Design

Time Diagram

Results of each module (Final Decode)

INPUT

OUTPUT

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

PowerPC Design

Input

Output

Results of each module (Bypass Decode)

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

IP module Design

Time Diagram

Results of each module (Bypass Decode)

INPUT

OUTPUT

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

PowerPC Design

Input

Output

Results of each module (Regular Decode)

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

IP module Design

Time Diagram

Results of each module (Regular Decode)

INPUT

OUTPUT

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Time analysis of final design

Compact Flash

PowerPC440

TIMER

INTC

CABAC CoreDECODER

Virtex-5 FPGAPLB Bus

Compressed Video

Decompressed Video

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Time analysis of final designH.264 Video Resolution Frames Profile

Video_1 176 x 144 3 MainVideo_2 352 x 240 8 HighVideo_3 176 x 144 10 High 4:2:0

Time = 𝒗𝒗𝒗𝒗𝒗𝒗𝒗𝒗𝒗𝒗+𝒎𝒎𝒗𝒗𝒎𝒎_𝒄𝒄𝒄𝒄𝒄𝒄𝒄𝒄∗𝒄𝒄𝒎𝒎𝒕𝒕_𝒄𝒄𝒗𝒗𝒗𝒗𝒕𝒕𝒐𝒐𝒗𝒗𝒄𝒄𝒐𝒐

𝒃𝒃𝒗𝒗𝒃𝒃_𝒐𝒐𝒕𝒕𝒗𝒗𝒄𝒄

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Content

1 Scope: Problematic Situation, Problem, Goal, Hypothesis.

2 Design: CABAC Block Diagram, Block Diagram Design, Design Insertion in embedded system on Viterx V board.

3 Results: Time Diagram of each module, Time analysis of final design.

4 Conclusions and Recommendations.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Conclusions• The CABAC core decoder was designed andembedded into the H.264/AVC decoder system.

• The H.264/AVC decoder temporal performance wasevaluated for different experiments and the resultsshowed that CABAC core decoder designed madepossible to reduce decoding delay.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Recommendations• To implement this IP module with a solution with noaccess to bitstream through read and write softwareinstructions.

• To design all modules with signals 0 to Length-1.• To design the De-binarization block in next time.

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

Hardware Implementation of the H.264/AVC CABAC Entropy

Decoding CoreAuthors: Eng. Rufino R. Cabrera Álvarez Eng. Osmany Yaunner Núñez Eng. Orlando Landrove Gámez PhD. Glauco Guillén Nieto

Havana, September 2015

RESEARCH & DEVELOPMENT TELECOMMUNICATION’S INSTITUTE

www.lacetel.cu