Distortion-Complexity Optimization of the H.264/MPEG-4 AVC Encoder using the GBFOS Algorithm Rahul Vanam, Eve Riskin, Sheila Hemami and Richard Ladner University of Washington, Cornell University

Data Compression Conference 2007

1

Problem Raw video Bit rate Encoder Parameters

H.264 Encoder (x264)

Compressed Video at given rate

2

Problem Raw video Bit rate Encoder Parameters Real time application

H.264 Encoder (x264) Fast encoding speed

Compressed Video at given rate

Best quality

3

Problem Raw video Bit rate Encoder Parameters

?

H.264 Encoder (x264) Fast encoding speed

Compressed Video at given rate

Best quality

4

Problem Raw video Bit rate Encoder Parameters

H.264 Encoder (x264)

Compressed Video at given rate

Fast encoding Best quality ? speed Parameters are similar to knobs. As a knob is moved from lower to higher setting: quality improves while speed suffers H.264 Encoder

5

Selecting the Encoder Parameters

Distortion

data point Convex hull

Exhaustive search: – Run the encoder for all possible settings. – Obtain MSE vs. encode time plot – Choose settings on the Distortion-Complexity convex hull – Extremely time consuming!

Complexity

6

Selecting Encoder Parameters • GBFOS-basic and GBFOS-iterative algorithms select good encoder parameter settings with fewer encodings • Based on the GBFOS (Generalized Breiman, Friedman, Olshen and Stone) algorithm • GBFOS Assumption: Distortion and Complexity of parameters are additive/independent (untrue!) 7

Selecting Encoder Parameters • Both algorithms are explained using an example: – Four parameter setting variables: number of reference frames, partition size, sub pixel motion estimation and quantization method – Other settings are constant

8

GBFOS-Basic Algorithm • Obtain D-C plot for each parameter by setting other parameters to their best PSNR option • Choose convex hull points and corresponding parameter settings and slopes

Distortion-complexity plot for Number of Reference frames

9

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

First parameter setting selected

2

Time per frame 10

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

2

Compare slopes Find the parameter with the least slope

Time per frame 11

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

2

Compare slopes Find the parameter with the least slope

Time per frame 12

GBFOS-Basic Algorithm Reference frames frames Reference MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Update the slope and setting of Ref. frames

Trellis MSE

MSE

7

Time per frame

2

Time per frame 13

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

2

Update the slope and setting of Ref. frames We now have the second parameter setting

Time per frame 14

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

Compare the slopes again and find the parameter with least slope

2

Time per frame 15

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Trellis MSE

MSE

4

Time per frame

2

Compare the slopes again and find the parameter with least slope Update the slope and setting of Subme

Time per frame 16

GBFOS-Basic Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Trellis MSE

MSE

4

Time per frame

2

Compare the slopes again and find the parameter with least slope Update the slope and setting of Subme

Time per frame 17

GBFOS-Basic Algorithm Reference frames MSE

1

MSE

Time per frame

Subme MSE

Partition sizes P8x8

Time per frame

Trellis MSE

1

Time per frame

1

The process is repeated to obtain the final parameter setting

Time per frame 18

GBFOS-Iterative Algorithm • More number of encodings • Better performance • Initialization and first iteration same as the GBFOS-Basic Algorithm

19

GBFOS-Iterative Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

First parameter setting selected

2

Time per frame 20

GBFOS-Iterative Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

2

Compare slopes Find the parameter with the least slope

Time per frame 21

GBFOS-Iterative Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

2

Compare slopes Find the parameter with the least slope

Time per frame 22

GBFOS-Iterative Algorithm Reference frames frames Reference MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

16

Time per frame

Subme

Time per frame

Update the slope and setting of Ref. frames

Trellis MSE

MSE

7

Time per frame

2

Time per frame 23

GBFOS-Iterative Algorithm Reference frames frames Reference MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Update the slope and setting of Ref. frames

Trellis MSE

MSE

7

Time per frame

2

Time per frame 24

GBFOS-Iterative Algorithm Reference frames MSE

Partition sizes

MSE P8x8,P4x4,B8x8, I8x8,I4x4

7

Time per frame

Subme

Time per frame

Trellis MSE

MSE

7

Time per frame

2

Update the slope and setting of Ref. frames We now have the second parameter setting

Time per frame 25

GBFOS-Iterative Algorithm Second Iteration Reference frames MSE

Partition sizes

MSE 7

Time per frame

Subme MSE

Time per frame

Trellis MSE

Time per frame

Regenerate the D-C plots for partition size, subme and trellis using Ref. frames = 7 Other parameters are obtained from the previous step

Time per frame 26

GBFOS-Iterative Algorithm Second Iteration Reference frames MSE

MSE 7

Time per frame

Subme MSE

7

Partition sizes P8x8,P4x4,B8x8, I8x8,I4x4

Time per frame

Trellis MSE

Time per frame

2

Regenerate the D-C plots for partition size, subme and trellis using Ref. frames = 7 Other parameters are obtained from the previous step

Time per frame 27

GBFOS-Iterative Algorithm Second Iteration Reference frames MSE

MSE 7

Time per frame

Subme MSE

7

Partition sizes P8x8,P4x4,B8x8, I8x8,I4x4

Time per frame

Trellis

Find the parameter with the least slope and update its slope and setting

MSE

Time per frame

2

Time per frame 28

GBFOS-Iterative Algorithm Second Iteration Reference frames MSE

MSE P8x8,P4x4,I8x8,I4x4

7

Time per frame

Subme MSE

Partition sizes

7

Time per frame

Trellis

Find the parameter with the least slope and update its slope and setting

MSE

Time per frame

2

Time per frame 29

GBFOS-Iterative Algorithm Second Iteration Reference frames MSE

MSE P8x8,P4x4,I8x8,I4x4

7

Time per frame

Subme MSE

Partition sizes

7

Time per frame

Trellis MSE

Time per frame

2

Find the parameter with the least slope and update its slope and setting We now have the new parameter setting

Time per frame 30

GBFOS-Iterative Algorithm Final Iteration Reference frames MSE

1

MSE

Time per frame

Subme MSE

1

Partition sizes P8x8

Time per frame

Trellis MSE

Time per frame

1

The process is repeated till we obtain the final parameter setting

Time per frame 31

Results • In our test, we use 3 data sets – ASL-1 (10 QCIF files), ASL-2 (10 320x240 files) and Standard (15 QCIF files) and 3 bitrates – 30, 150 and 300 kb/s • Four variable encoding parameters: number of reference frames (16 options), Partition sizes (10 options), Sub-pixel motion estimation (7 options) and trellis (3 options)

32

Results • If n1,...,nM are M parameter options, then the number of encodings per video sequence for M Convex hull: (product) ∏ ni i=1

GBFOS-basic:

1- M+



M n i=1 i

(sum!)

• In our example, the number of encodings for Convex hull = 3360 (constant) GBFOS - basic = 33 (constant) ≈ 1% Convex hull GBFOS - iterative = 268 (maximum) ≈ 8% of Convex hull

33

Results • Maximum PSNR difference with respect to convex hull for: GBFOS-basic = 0.707 dB GBFOS-iterative = 0.575 dB PSNR vs. encoding time for x264 encoder 37.6 37.4

PSNR (dB)

37.2 37 36.8 36.6 36.4

Convex hull GBFOS-iterative GBFOS-basic

36.2 36 35.8 0

0.01

0.02

0.03

0.04

0.05

Average Encoding time per frame (seconds)

34

Results • Robustness test done using 3 different (data set, training set) pairs at 3 different bitrates • Max PSNR difference between either GBFOS algorithms and convex hull points < 0.55 dB 46.2

PSNR (dB)

46 45.8 45.6 45.4 Convex hull of test data GBFOS-iterative GBFOS-basic

45.2 45 0

0.02

0.04

0.06

0.08

0.1

Average Encoding time per frame (seconds)

35

Application • Video cell phones have limited processing speed • Finding convex hull points is infeasible! • GBFOS algorithms can be used for finding closeto-optimal encoder settings • Goal: Real-time communication of American Sign Language videos over the GPRS network

http://www.cs.washington.edu/research/MobileASL/index.html

36

Conclusion • Proposed two fast algorithms: GBFOS-basic and GBFOS-iterative for choosing encoder parameter settings • GBFOS-basic and GBFOS-iterative algorithms take 1% and 8% of encodings required for obtaining the D-C convex hull points • For same test and training data: Max PSNR difference for both algorithms < 0.71 dB • For different test and training data: Max PSNR difference for both algorithms < 0.55 dB 37

Thanks! • To National Science Foundation • To Anna Cavender, Neva Cherniavsky and Loren Merritt

38

Distortion-Complexity Optimization of the H.264/MPEG-4 AVC ...

36. Application. • Video cell phones have limited processing speed. • Finding convex hull points is infeasible! • GBFOS algorithms can be used for finding close-.

320KB Sizes 0 Downloads 198 Views

Recommend Documents

Motion Estimation Optimization for H.264/AVC Using Source Image ...
For uniform linear motion, x0(t)=at/T and y0(t)=bt/T, in which a/T and b/T represent the ...... and Telephone Corporation in 1990, where he had been undertaking ...

THROUGHPUT OPTIMIZATION OF THE CIPHER ...
primitive IP in the system, such as common block ciphers, and not a special .... access and read the security system's memory (RAM) to reveal our keys and ...

The H.264/AVC Advanced Video Coding Standard: Overview and ...
Three basic feature sets called profiles were established to address these .... At a basic overview level, the coding structure of this standard is similar to that of all ...

Modeling the dynamics of ant colony optimization
Computer Science Group, Catholic University of Eichstätt-Ingolstadt, D- ... describe the algorithm behavior as a combination of situations with different degrees ..... found solution π ∈ Pn (if the best found quality was found by several ants, on

THROUGHPUT OPTIMIZATION OF THE CIPHER ...
digital signatures, MACs are computed and verified with the ... MACs are used in public key digital .... access and read the security system's memory (RAM) to.

AVC-AnnualReport-Final 12-23-15.pdf
Assabet Valley Regional. Technical High School. Berlin/Boylston Region. Berlin. Boylston. Grafton. Hudson. Marlborough. Maynard. Millbury. Nashoba Region.

Modification in the AVC for promotion.PDF
Railway Board and federations. decided to add. list for (Goods) under ... serving regular non-ministerial employees in Operating and ... C/: Mediu Centre/NFIR.

The H.264/AVC Advanced Video Coding Standard: Overview and ...
Since the early 1990s, when the technology was in its infancy, international ...... amendment, primarily to address the expressed needs of some 3G wireless ...

OPTIMIZATION OF INTENSITY-MODULATED RADIOTHERAPY ...
NTCPs based on EUD formalism with corresponding ob- Fig. 1. (a) Sample DVH used for EUD calculation. (b) EUD for the. DVH in (a) as a function of parameter a. Tumors generally have. large negative values of a, whereas critical element normal struc- t

AVC AnnualReport-2016-r18.pdf-revised.pdf
programs: AVCAS. Consultation Services. Evolution. Family Success Partnership. Professional Development. REACH. SOAR. Transportation Services. MISSION.

Simulation and Optimization of the Effect of Work ...
as switching speed in digital integrated circuit applica- tions. One of the ... Figure 3 shows the 3D view of conduction band dia- gram at work function 4.5 eV.

OPTIMIZATION OF INTENSITY-MODULATED RADIOTHERAPY ...
deviates from EUD0. For a tumor, the subscore attains a. small value when the equivalent uniform dose falls sig- nificantly below EUD0. Similarly, for a normal ...

A Model for the Optimization of the Maintenance Support ... - IJRIT
Embedded System Technology (Dept. of ECE). SRM University ... The proposed model uses a PIC microcontroller for interfacing purposes. An ultrasonic sensor ...

A Model for the Optimization of the Maintenance Support ... - IJRIT
measurements includes LIDAR, SODAR, radar, AUV, and remote satellite sensing. Because of the previous factors, one of the biggest difficulties with offshore wind farms is the ability to predict loads. Despite high capital cost and the cost of operati

A Quality-Controllable Encryption for H.264/AVC Video Coding
of multimedia data usually grabs most networking bandwidth and computing .... Slices are categorized into three types: I (Intra) slice, P (Predictive) slice, and.

The Power of Recourse in Online Optimization
data. This situation can be modeled with a min-max approach: we choose our ...... processing a job in Bi together with a job in Ai on the same machine for each i .... at any intermediate iteration, the instance admits a large number of optimal ...

Read PDF The Art of SEO: Mastering Search Engine Optimization ...
Read PDF The Art of SEO: Mastering Search Engine Optimization .... theory and inner workings of search enginesUnderstand the role of social media, user.

On the Optimization Landscape of Tensor ...
Dec 3, 2016 - †Princeton University, Computer Science Department. ..... The determinant itself by definition is a high-degree polynomials over the entries, and ...

On the Hardness of Optimization in Power-Law ... - Semantic Scholar
Given a graph, we will refer to two types of sequences of integers: y-degree sequences and d-degree sequences. The first type lists the number of vertices with a certain degree (i.e., the degree distribution) and the latter lists the degrees of the v

The Framework of User-Centric Optimization in ... - Semantic Scholar
utilities to the user. If a large but useless image appears early in the HTML file, it will take up most ..... 2 Choices of Utility Functions and Their Optimal Schedules.

optimization of nuclear fuel reloading by the ...
Feb 22, 2001 - process in a nuclear reactor and allows to quantify the efficiency of the assemblies ... The power distribution is defined as the energy released ..... holm alternative there exists a solution of (23) if and only if the following con-.

Evolutionary algorithms for the optimization of ...
composed of two phases. Firstly, a general production ... mined in each year, while the second phase is to determine the ore amount to be ... cash flow-in at year t. Ot cash flow-out at year t r discount rate. T life of the mine. Cash flow-in at year

genetic algorithms applied to the optimization of ...
Systems, The University of Michigan, 1975. [6] Goldberg, D., Genetic Algorithms in Search,. Optimization and Machine Learning, Addison-Wesley. Publishing Company, 1989. [7] Huang, W., Lam, H., Using genetic algorithms to optimize controller parameter