IP Library Granted Patent US 8,401,076
Granted Patent B2
US 8,401,076 · App. 12/518,955 · Granted Mar 19, 2013

Video rate control for video coding standards

Inventor: Stéphane Coulombe (Brossard, CA)
Assignee: Vantrix Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,401,076
App. No.
12/518,955
Granted
Mar 19, 2013
Kind
B2
Abstract

A method and device for improving rate controlling in video coding of sequences including a series of Inter frames separated by Intra frames, when a decoding delay is considered, comprise for each Inter frame of the series: computing a target frame size, computing a maximum buffer level related to a position of each Inter frame relative to a previous Intra frame and an upcoming Intra frame, and optimizing a transmission buffer level in response to the computed target frame size and the computed maximum buffer level.

Claims (393)

1. A method for rate controlling in video encoding of a video stream, the method comprising:

specifying a maximum bitrate and an average bitrate for the video stream;

calculating an Inter frame size based on a position of the Inter frame relative to an Intra frame so as to ensure that the specified maximum bitrate is not exceeded; and

adjusting the calculated Inter frame size so as to ensure that both the specified maximum bitrate is not exceeded and the specified average bitrate is substantially obtained;

wherein the calculating the Inter frame size comprises calculating an ideal Inter frame size based on the specified maximum bitrate according to the following equation, provided the position of the Inter frame indicates that an Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

2

=

R

MAX

-

B

I

(

F

-

1

)

where B 2 is the ideal Inter frame size, R MAX is the specified maximum bitrate, F is a frame rate, and B 1 is the Intra frame size.

2. The method as defined in claim 1 , further comprising specifying a size of the Intra frame.

3. The method as defined in claim 2 , further comprising estimating quantization parameters of the Intra frame for encoding the Intra frame so as to achieve a specified size of the Intra frame.

4. A method for rate controlling in video encoding of a video stream, the method comprising:

specifying a maximum bitrate and an average bitrate for the video stream;

calculating an Inter frame size based on a position of the Inter frame relative to an Intra frame so as to ensure that the specified maximum bitrate is not exceeded; and

adjusting the calculated Inter frame size so as to ensure that both the specified maximum bitrate is not exceeded and the specified average bitrate is substantially obtained;

wherein the calculating the Inter frame size comprises calculating an ideal Inter frame size based on the specified maximum bitrate according to the following equation, provided the position of the Inter frame indicates that no Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

3

=

R

MAX

F

where B 3 is the ideal Inter frame size, R MAX is the specified maximum bitrate, and F is a frame rate.

5. The method as defined in claim 1 , wherein the calculating the Inter frame size further comprises taking into consideration past encoded frames.

6. The method as defined in claim 5 , wherein the calculating the Inter frame size B PI which takes into consideration past encoded frames comprises using the following equations, when an Intra frame has been encoded within a last-occurred time period:

B

PI

=

max

(

0

,

min

(

B

PI

,

tmp

(

t

)

)

)

with

tmp

(

t

)

=

R

MAX

-

k

=

t

-

(

T

-

N

)

t

-

1

SizeHistory

[

k

]

F

-

(

T

-

N

)

where SizeHistory[k] is a size of an encoded frame k, t is an index of a current frame to encode, T is a period between two Intra frames, and N is a number of frames remaining before the next Intra frame.

7. The method as defined in claim 6 , wherein calculating the Inter frame size B PI which takes into consideration past encoded frames further comprises using the following equations, when an Intra frame needs to be encoded in an upcoming time period:

B

PI

=

max

(

0

,

min

(

B

PI

,

tmp

(

t

)

)

)

with

tmp

(

t

)

=

R

MAX

-

B

I

-

k

=

t

-

(

F

-

N

)

+

1

t

-

1

SizeHistory

[

k

]

N

where B I is the Intra frame size.

8. The method as defined in claim 5 , wherein the calculating the Inter frame size which takes into consideration past encoded frames comprises taking into consideration past Intra frames.

9. The method as defined in claim 1 , wherein the calculating the Inter frame size further comprises limiting the Inter frame size to a maximum size allowed by the specified maximum bitrate.

10. The method as defined in claim 9 , wherein the limiting the Inter frame size B PI comprises using the following equations:

B

PI

=

max

(

0

,

min

(

B

PI

,

tmp

2

(

t

)

)

)

with

tmp

2

(

t

)

=

R

MAX

-

R

margin

-

B

I

-

k

=

t

-

F

+

1

t

-

1

SizeHistory

[

k

]

where R margin is a margin of errors for ensuring that the Inter frame size B PI does not exceed the maximum size allowed by the specified maximum bitrate R MAX , and B I is the Intra frame size.

11. The method as defined in claim 4 , wherein the calculating the Inter frame size further comprises limiting the Inter frame size to a maximum size allowed by the specified maximum bitrate by using the following equation:

B P =max (0,min( B p ,tmp 2( t )))

with B P being the Inter frame size and

tmp

2

(

t

)

=

R

MAX

-

R

margin

-

k

=

t

-

F

t

-

1

SizeHistory

[

k

]

,

where R margin is an error margin between the Inter frame size and the maximum size allowed by the maximum bitrate R MAX , SizeHistory[k] is a size of an encoded frame k, and t is an index of a current frame to encode.

12. The method as defined in claim 1 , wherein the adjusting the calculated Inter frame size comprises calculating an ideal Inter frame size based on the specified average bitrate.

13. The method as defined in claim 12 , wherein the calculating the ideal Inter frame size comprises using the following equation, when the position of the Inter frame indicates that an Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

=

(

R

avg

T

/

F

)

-

B

I

T

-

1

where B is the ideal Inter frame size, R avg is the average bitrate, B I is a size of the Intra frame, T is a period between two Intra frames, and F is a frame rate.

14. The method as defined in claim 12 , wherein the calculating the ideal Inter frame size further comprises using the following equation, when the position of the Inter frame indicates that no Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

a

=

(

R

avg

T

/

F

)

-

B

I

-

(

2

F

-

2

)

B

PI

T

-

(

2

F

-

1

)

where B a is the ideal Inter frame size, R avg is the average bitrate, B I is a size of the Intra frame, B PI is the Inter frame size, T is a period between two Intra frames, and F is a frame rate.

15. The method as defined in claim 1 , wherein the adjusting the calculated Inter frame size comprises taking into consideration past encoded frames.

16. The method as defined in claim 15 , wherein the adjusting the calculated Inter frame size further comprises comparing the calculated Inter frame size with a corresponding encoded frame size.

17. The method as defined in claim 16 , wherein comparing the calculated Inter frame size with a corresponding encoded frame size comprises storing results of the comparison in a variable.

18. The method as defined in claim 17 , wherein storing the results of the comparison comprises updating the variable using the following equation: B extra updated =B extra +B target −B encoded

where B extra is the variable, B extra updated is an updated variable, B target is the calculated Inter frame size, and B encoded is the corresponding encoded frame size.

19. The method as defined in claim 18 , wherein the updating the variable B extra comprises distributing extra bits, usable for encoding future Inter frames, over a next Inter frame size, provided the variable B extra is positive.

20. The method as defined in claim 18 , wherein the updating the variable B extra comprises reducing the calculated Inter frame size for a next Inter frame size provided the variable B extra is negative.

21. The method as defined in claim 18 , wherein the updating the variable B extra comprises dropping an encoded Inter frame provided the variable B extra is below a given threshold.

22. The method as defined in claim 12 , wherein the adjusting the calculated Inter frame size further comprises limiting the Inter frame size to a maximum size allowed by the specified maximum bitrate.

23. The method as defined in claim 1 , further comprising verifying that an encoded frame size is smaller than the adjusted Inter frame size prior to transmission.

24. The method as defined in claim 1 , further comprising storing encoder state variables before encoding a frame and restoring the encoder state variables after an encoded frame has been dropped.

25. The method as defined in claim 1 , further comprising dropping encoded frames, which frame size results in exceeding the specified maximum bitrate.

26. The method as defined in claim 25 , further comprising dropping encoded frames, which frame size results in exceeding the specified average bitrate.

27. The method as defined in claim 26 , further comprising re-encoding the encoded frames, which frame size results in exceeding the specified average and maximum bitrates, with different encoding parameters.

28. A device for rate controlling in video encoding of a video stream, the device comprising:

a memory, storing computer readable instructions for execution by a processor, causing the processor to:

specify a maximum bitrate and an average bitrate for the video stream;

calculate an Inter frame size based on a position of the Inter frame relative to an Intra frame so as to ensure that the specified maximum bitrate is not exceeded; and

adjust the calculated Inter frame size so as to ensure that both the specified maximum bitrate is not exceeded and the specified average bitrate is substantially obtained;

wherein the processor is further configured to calculate an ideal Inter frame size based on the specified maximum bitrate according to the following equation, provided the position of the Inter frame indicates that an Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

2

=

R

MAX

-

B

I

(

F

-

1

)

where B 2 is the ideal Inter frame size, R MAX is the specified maximum bitrate F is a frame rate, and B I is the Intra frame size.

29. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to predict an Intra frame size and quantizing parameters of the Intra frame.

30. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to validate that an encoded frame size is smaller than the adjusted Inter frame size, prior to transmission.

31. The device as defined in claim 28 , further comprising a circular buffer for storing transmitted frames.

32. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to store encoder state variables before encoding a frame, and to restore the encoder state variables after an encoded frame has been dropped.

33. The device of claim 28 , wherein the processor is further configured to adjust the calculated Inter frame size so as to ensure that the specified average bitrate is substantially obtained.

34. The device of claim 28 , wherein the computer readable instructions further cause the processor to take into consideration past encoded frames, when calculating the Inter frame size.

35. The device as defined in claim 34 , wherein the computer readable instructions further cause the processor to take into consideration past Intra frames.

36. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to limit the Inter frame size to a maximum size allowed by the specified maximum bitrate, when calculating the Inter frame size.

37. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to take into consideration past encoded frames, when adjusting the calculated Inter frame size.

38. The device as defined in claim 37 , wherein the computer readable instructions further cause the processor to compare the calculated Inter frame size with a corresponding encoded frame size, and to store results of the comparison in a variable.

39. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to perform one of the following:

distribute extra bits, usable for encoding future Inter frames, over a next Inter frame size;

reduce the calculated Inter frame size for a next Inter frame size; and

drop an encoded Inter frame.

40. The device as defined in claim 12 , wherein the computer readable instructions further cause the processor to limit the Inter frame size to a maximum size allowed by the specified maximum bitrate, when adjusting the calculated Inter frame size.

41. The device as defined in claim 28 , wherein the computer readable instructions further cause the processor to drop encoded frames, which frame size results in exceeding the specified maximum bitrate.

42. The device as defined in claim 41 , wherein the computer readable instructions further cause the processor to drop encoded frames, which frame size results in exceeding the specified average bitrate.

43. The device as defined in claim 42 , wherein the computer readable instructions further cause the processor to re-encode the encoded frames, which frame size results in exceeding the specified average and maximum bitrates, with different encoding parameters.

44. An encoder for video coding of a video stream, comprising:

a processor;

a device for rate controlling in the video coding, comprising:

a memory, storing computer readable instructions for execution by a processor, causing the processor to:

specify a maximum bitrate and an average bitrate for the video stream;

calculate an Inter frame size based on a position of the Inter frame relative to an Intra frame so as to ensure that the specified maximum bitrate is not exceeded; and

adjust the calculated Inter frame size so as to ensure that both the specified maximum bitrate is not exceeded and the specified average bitrate is substantially obtained;

wherein the processor is further configured to calculate an ideal Inter frame size based on the specified maximum bitrate according to the following equation, provided the position of the Inter frame indicates that an Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

2

=

R

MAX

-

B

I

(

F

-

1

)

where B 2 is the ideal Inter frame size, R MAX is the specified maximum bitrate, F is a frame rate, and B I is the Intra frame size.

45. A device for rate controlling in video encoding of a video stream, the device comprising:

a memory, storing computer readable instructions for execution by a processor, causing the processor to:

specify a maximum bitrate and an average bitrate for the video stream;

calculate an Inter frame size based on a position of the Inter frame relative to an Intra frame so as to ensure that the specified maximum bitrate is not exceeded; and

adjust the calculated Inter frame size so as to ensure that both the specified maximum bitrate is not exceeded and the specified average bitrate is substantially obtained;

wherein the calculating the Inter frame size comprises calculating an ideal Inter frame size based on the specified maximum bitrate according to the following equation, provided the position of the Inter frame indicates that no Intra frame has been encoded during a last-occurred time period or is going to be encoded during an upcoming time period:

B

3

=

R

MAX

F

where B 3 is the ideal Inter frame size, R MAX is the specified maximum bitrate, and F is a frame rate.

Assignments (10)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 1, 2021
From: VANTRIX CORPORATION
To: MASIMO CORPORATION
Reel/Frame 057394/0452 →
CHANGE OF COMPANY ADDRESS Recorded Nov 26, 2019
From: VANTRIX CORPORATION
To: VANTRIX CORPORATION
Reel/Frame 051136/0148 →
RELEASE OF SECURITY INTEREST Recorded Mar 21, 2017
From: NXT CAPITAL LLC
To: VANTRIX CORPORATION
Reel/Frame 042050/0722 →
CHANGE OF ADDRESS Recorded Feb 24, 2017
From: VANTRIX CORPORATION
To: VANTRIX CORPORATION
Reel/Frame 041808/0788 →
RELEASE OF SECURITY INTEREST Recorded Jun 14, 2013
From: WF FUND III LIMITED PARTNERSHIP, C.O.B. WELLINGTON FINANCIAL FUND III AND WELLINGTON FINANCIAL LP
To: VANTRIX CORPORATION
Reel/Frame 030615/0063 →
SECURITY AGREEMENT Recorded Mar 20, 2013
From: VANTRIX CORPORATION
To: NXT CAPITAL, LLC, ITS SUCCESSORS AND ASSIGNS
Reel/Frame 030053/0824 →
SECURITY AGREEMENT Recorded Mar 7, 2011
From: VANTRIX CORPORATION
To: WF FUND III LIMITED PARTNERSHIP, C.O.B. WELLINGTON FINANCIAL FUND III AND WELLINGTON FINANCIAL LP
Reel/Frame 025907/0804 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME,ADDRESS AND EXECUTION DATE PREVIOUSLY RECORDED ON REEL 023064 FRAME 0877. ASSIGNOR(S) HEREBY CONFIRMS THE CORRECTION FROM "VANTRIX CORP., 1425 BLVD ..." TO "ECOLE ... AT 1100 RUE ..."; AND EXECUTION DATE FROM 07/31/2008 TO 02/17/2010. Recorded Jul 26, 2010
From: COULOMBE, STEPHANE
To: ECOLE DE TECHNOLOGIE SUPERIEURE
Reel/Frame 024742/0867 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 26, 2010
From: ECOLE DE TECHNOLOGIE SUPERIEURE
To: VANTRIX CORPORATION
Reel/Frame 024742/0895 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 6, 2009
From: COULOMBE, STEPHANE
To: VANTRIX CORPORATION
Reel/Frame 023064/0877 →
Continuity (2)
Provisional Application 60874250 · Dec 12, 2006
Related Publication 20100080292A1 · Apr 1, 2010