outline introduction introduction fast inter prediction mode decision for h.264 – –pre-encoding...

26
Outline Outline Introduction Introduction Fast Inter Prediction Mode D ecision for H.264 – Pre-encoding An Efficient Inter Mode Deci sion Approach for H.264 Vide o Coding

Post on 19-Dec-2015

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

OutlineOutline

IntroductionIntroduction Fast Inter Prediction Mode Decision f

or H.264– Pre-encoding

An Efficient Inter Mode Decision Approach for H.264 Video Coding

Page 2: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

IntroductionIntroduction

The H.264 shows significant performance gain over contemporary video coding standards.

The performance improvement is at the expense of computational complexity increment.

During the encoding, the encoder examine all modes to achieve the best prediction.

Mode selection results in significant performance improvement as well as heavy computational load at the encoder.

Page 3: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Inter mode selectionInter mode selection

Page 4: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Fast Inter Prediction Mode Decision for H.264

Dongdong Zhu, Qionghai Dai and Rong DingTsinghua University, Beijing

ICME 2004ICME 2004

Page 5: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Fast Inter Mode Decision

Down Sampling

Originalimage

Smallimages

Small refimages

Pre- Encoding

Modes

Motionvectors

Encoding with original

image

Ref. image

Output

Page 6: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Down SamplingDown Sampling

Down sample the original image to a small image of 1/2 low resolution

Extend to a multiple of 16 by using pixels on the edge, if the width or height of the small image is not a multiple of 16

Page 7: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Pre-EncodingPre-Encoding

Pre-encode on 8x8 block level– do not use 16x16, 16x8 and 8x16 blocks in

pre-encoding Search range should be scaled to 1/2

of the original one Store the top 2 best modes

– In case of the best prediction mode mismatch between pre-encoding and real encoding

Page 8: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

EncodingEncoding

Modes obtained from pre-encoding

Candidate modesMacro block mode

8x8 sub-partition

mode

SKIP/DIRECT

SKIP/DIRECT, 16x16

I16x16 I16x16

I4x4 I4x4, I16x16

P 8x8

DIRCECT DERICT, 16x168x8 8x8, 16x16

8x4 8x4, 16x8

4x8 4x8, 8x16

4x4 Following

Page 9: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

EncodingEncoding

By By edge direction histogram ( Histo(K) ) for horizontal and vertical direction

K = 1 for horizontal direction, 2 for vertical direction and 3 for other.

Page 10: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Edge direction histogram

Page 11: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Early terminationEarly termination

S1S1 :: vector (0,0) and MVs of neighbor blocks

S2S2 :: the MVs obtained from pre-encoding Firstly, early termination test is performed

on S2. – For each initial motion vector in S2, SAD is calc

ulated and min SAD is gotten as: SADmin = min ( SAD(Vi) ), Vi=(yi,xi ) S2

If SADmin is smaller than a threshold T1, terminate the motion estimation

Page 12: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

ResultResult

Page 13: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

ResultResult

Mobile

Page 14: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

ResultResult

Foreman

Page 15: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

ConclusionConclusion

Pre-encoding process can reduce Pre-encoding process can reduce 50% of encoding time with PSNR 50% of encoding time with PSNR decrease less than 0.2db.decrease less than 0.2db.

Page 16: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

An Efficient Inter Mode Decision Approach for H.264 Video Coding

Xuan Jing and Lap-Pui ChauNanyang Technological University,Singapore

ICME 2004ICME 2004

Page 17: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Efficient inter mode decision The main concept is to use large bloc

ks for homogeneous areas and small blocks for areas containing complex motions.

Page 18: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Efficient inter mode decision The amplitudes in a MB are small, it i

s most likely that this MB belongs to a homogeneous region and using only larger block sizes .

Otherwise, this MB may contain complex motions and using more block types .

Page 19: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Efficient inter mode decision We first subtract the current frame by its pr

evious frame. The sum of absolute difference for the curr

ent MB can be calculated using.

Page 20: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Efficient inter mode decision Step 1:

– (current frame - previous frame) and calculate the SAD for the current MB

Step 2: – If SAD<TH go to step 3; – Otherwise go to step 4;

Step 3: – mode decision using 16×16, 16×8, 8×16 bloc

k types. Step 4:

– mode decision using all 7 block types 16×16, 168, 8××16, 8×8, 8×4, 4×8 and 4×4.

Page 21: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Simulation resultSimulation result

Page 22: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Simulation resultSimulation result

Page 23: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Simulation resultSimulation result

Page 24: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Simulation resultSimulation result

Page 25: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

Simulation resultSimulation result

Page 26: Outline Introduction Introduction Fast Inter Prediction Mode Decision for H.264 – –Pre-encoding An Efficient Inter Mode Decision Approach for H.264 Video

ConclusionConclusion

On average, the proposed scheme achieved 0.2% bitrate saving at the cost of 0.04 dB PSNR drop.

On On averagely about 36% computations are saved.