# US 10,123,017 B2 · Methods and systems for encoding pictures associated with video data

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,123,017 B2
- Document ID: US10123017B2
- Status: Granted
- Kind: B2
- Application number: 14/992,962
- Filed: 2016-01-11
- Published: 2016-05-05
- Granted: 2018-11-06
- Earliest claimed: 2011-10-05
- Assignees: Texas Instruments Incorporated
- Applicants: Texas Instruments Incorporated
- Inventors: Naveen Srinivasamurthy; Soyeb Nagori; Manoj Koul
- Web page: https://patentgrep.com/patent/US10123017B2

## CPC

- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/126: Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
- H04N 19/152: by measuring the fullness of the transmission buffer
- H04N 19/157: Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N 19/172: the region being a picture, frame or field
- H04N 19/124: Quantisation
- H04N 19/149: by estimating the code amount by means of a model, e.g. mathematical model or statistical model
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Several methods and systems for encoding pictures associated with video data are disclosed. In an embodiment, a method includes determining by a processing module, whether a picture is to be encoded based on at least one of a skip assessment associated with the picture and an encoding status of a pre-selected number of pictures preceding the picture in an encoding sequence. The method further includes encoding by the processing module, a plurality of rows of video data associated with the picture upon determining that the picture is to be encoded, wherein the plurality of rows are encoded based on a pre-selected maximum encoded picture size.

## Claims

### Claim 1

A method, comprising:
determining, by at least one processor, to encode a picture, based on at least one of a skip assessment associated with the picture or an encoding status of a pre-selected number of pictures preceding the picture in an encoding sequence; and
encoding, by the at least one processor, a plurality of rows of video data associated with the picture, in response to determining to encode the picture, wherein the plurality of rows are encoded based on a pre-selected maximum encoded picture size, wherein encoding the plurality of rows of video data comprises:
encoding a first set of rows of video data of the picture at a first quantization scale;
dynamically setting a second quantization scale for encoding at least one remaining row of video data of the plurality of rows of video data of the picture, in response to determining that a number of bits associated with the pre-selected maximum encoded picture size is likely to be exceeded by encoding of the at least one remaining row of video data using the first quantization scale, based on a triangular weighting function; and
encoding the one or more remaining rows of video data of the picture at the second quantization scale.

### Claim 2 (depends on 1)

The method of claim 1, wherein the number of bits associated with the pre-selected maximum encoded picture size is configured to be a value from among a plurality of values ranging from 15 times an average number of bits associated with encoded pictures in the encoding sequence to 45 times the average number of bits.

### Claim 3 (depends on 1)

The method of claim 1, wherein the skip assessment is determined based on a pre-defined skip threshold and an occupancy of a hypothetical buffer configured to store encoded pictures from among pictures in the encoding sequence, and, wherein the pre-defined skip threshold corresponds to maximum allowable occupancy of the hypothetical buffer.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining whether the picture is to be encoded comprises:
determining a number of encoded pictures in a set of pictures comprising the picture and the pre-selected number of pictures; and
determining one of encoding of the picture if the number of encoded pictures in the set of pictures is less than a pre-determined number and skipping an encoding of the picture if the skip assessment associated with the picture is positive and if the number of encoded pictures in the set of pictures is greater than or equal to the pre-determined number.

### Claim 5 (depends on 4)

The method of claim 4, wherein a subsequent picture in the encoding sequence is selected for determination of whether to be encoded upon one of the encoding of the plurality of rows of video data associated with the picture and the determination of skipping of encoding of the picture.

### Claim 6 (depends on 1)

The method of claim 1, wherein encoding the plurality of rows of video data further comprises:
tracking a number of bits consumed by encoding the rows of video data of the picture from among the plurality of rows of video data at the first quantization scale.

### Claim 7 (depends on 6)

The method of claim 6, wherein dynamically setting the second quantization scale is performed based on computing a weighted average of products of the number of bits consumed by encoding the rows of video data and the first quantization scale.

### Claim 8 (depends on 7)

The method of claim 7, wherein computing the weighted average is performed based on:
W
n
=
2
⁢
x
n
n
+
1
+
(
n
-
1
)
(
n
+
1
)
⁢
W
n
-
1
wherein,
n is a row number of a row from among the plurality of rows of video data,
Wn is a weighted average computed for row ‘n’,
xn corresponds to a product of bits and quantization scale for row ‘n’,
Wn-1 is a weighted average computed for row ‘n−1’, and
W0=0.

### Claim 9 (depends on 8)

The method of claim 8, wherein dynamically setting the second quantization scale is performed based on:
Qs
new
=
n
*
W
n
*
1
MB
enc
*
(
MB
tot
-
MB
enc
)
(
B
m
⁢
⁢
ax
-
B
enc
)
wherein,
Qsnew is the second quantization scale,
MBenc corresponds to a number of macroblocks in encoded rows of video data,
MBtot corresponds to a total number of macroblocks in the plurality of rows of video data,
Bmax corresponds to the number of bits associated with maximum encoded picture size, and
Benc corresponds to a number of bits associated with macroblocks in encoded rows.

### Claim 10

A system, comprising:
at least one processor; and
a memory module comprising:
a non-transitory computer readable storage medium storing a program for execution by the at least one processor, the program including instructions
to:
determine to encode a picture, based on at least one of a skip assessment associated with the picture or an encoding status of a pre-selected number of pictures preceding the picture in an encoding sequence; and
encode a plurality of rows of video data associated with the picture, in response to determining to encode the picture, wherein the plurality of rows are encoded based on a pre-selected maximum encoded picture size, wherein the instructions to encode the plurality of rows of video data comprise instructions to:
encode a first set of rows of video data of the picture at a first quantization scale;
dynamically set a second quantization scale for encoding at least one remaining row of video data of the plurality of rows of video data of the picture, in response to determining that a number of bits associated with the pre-selected maximum encoded picture size is likely to be exceeded by encoding of the at least one remaining row of video data using the first quantization scale, based on a triangular weighting function; and
encode the one or more remaining rows of video data of the picture at the second quantization scale; and
a hypothetical buffer configured to store one or more encoded pictures from among pictures in the encoding sequence.

### Claim 11 (depends on 10)

The system of claim 10, wherein the number of bits associated with the pre-selected maximum encoded picture size is configured to be a value from among a plurality of values ranging from 15 times an average number of bits associated with encoded pictures in the encoding sequence to 45 times the average number of bits.

### Claim 12 (depends on 10)

The system of claim 10, wherein the instructions further comprise instructions to:
determine a number of encoded pictures in a set of pictures comprising the picture and the pre-selected number of pictures; and
determine one of encoding of the picture if the number of encoded pictures in the set of pictures is less than a pre-determined number and skipping an encoding of the picture if the skip assessment associated with the picture is positive and if the number of encoded pictures in the set of pictures is greater than or equal to the pre-determined number, wherein a subsequent picture in the encoding sequence is selected for determination of whether to be encoded upon one of the encoding of the plurality of rows of video data associated with the picture and the determination of skipping of encoding of the picture.

### Claim 13 (depends on 10)

The system of claim 10, wherein the instructions to encode the plurality of rows of video data further comprise instructions to:
track a number of bits consumed by encoding rows of video data of the picture from among the plurality of rows of video data at the first quantization scale.

### Claim 14 (depends on 13)

The system of claim 13, wherein the instructions to dynamically set the second quantization scale comprise instructions to compute adjusted based on a weighted average of products of the number of bits consumed by encoding the rows of video data and the first quantization scale.

### Claim 15 (depends on 14)

The system of claim 14, wherein the instructions to compute the weighted average are performed based on:
W
n
=
2
⁢
x
n
n
+
1
+
(
n
-
1
)
(
n
+
1
)
⁢
W
n
-
1
wherein,
n is a row number of a row from among the plurality of rows of video data,
Wn is a weighted average computed for row ‘n’,
xn corresponds to a product of bits and quantization scale for row ‘n’,
Wn-1 is a weighted average computed for row ‘n−1’, and
W0=0.

### Claim 16 (depends on 15)

The system of claim 15, wherein the instructions to dynamically set the second quantization scale comprise instructions to set the second quantization scale based on:
Qs
new
=
n
*
W
n
*
1
MB
enc
*
(
MB
tot
-
MB
enc
)
(
B
ma
⁢
⁢
x
-
B
enc
)
wherein,
Qsnew is the second quantization scale,
MBenc corresponds to a number of macroblocks in encoded rows of video data,
MBtot corresponds to a total number of macroblocks in the plurality of rows of video data,
Bmax corresponds to the number of bits associated with maximum encoded picture size, and
Benc corresponds to a number of bits associated with macroblocks in encoded rows.

### Claim 17

A non-transitory computer-readable storage medium storing a program for execution by at least one processor, the program including instructions for:
determining to encode a picture based on at least one of a skip assessment associated with the picture or an encoding status of a pre-selected number of pictures preceding the picture in an encoding sequence; and
encoding a plurality of rows of video data associated with the picture, in response to determining to encode the picture, wherein the plurality of rows are encoded based on a pre-selected maximum encoded picture size, wherein the instructions for encoding the plurality of rows of video data comprise instructions for:
encoding a first set of rows of video data of the picture at a first quantization scale;
dynamically setting a second quantization scale for encoding at least one remaining row of video data of the plurality of rows of video data of the picture, in response to determining that a number of bits associated with the pre-selected maximum encoded picture size is likely to be exceeded by encoding of the at least one remaining row of video data using the first quantization scale, based on a triangular weighting function; and
encoding the one or more remaining rows of video data of the picture at the second quantization scale.

### Claim 18 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the number of bits associated with the pre-selected maximum encoded picture size is configured to be a value from among a plurality of values ranging from 15 times an average number of bits associated with encoded pictures in the encoding sequence to 45 times the average number of bits.

### Claim 19 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the instructions for determining whether the picture is to be encoded comprise instructions for:
determining a number of encoded pictures in a set of pictures comprising the picture and the pre-selected number of pictures; and
determining one of encoding of the picture if the number of encoded pictures in the set of pictures is less than a pre-determined number and skipping an encoding of the picture if the skip assessment associated with the picture is positive and if the number of encoded pictures in the set of pictures is greater than or equal to the pre-determined number, wherein a subsequent picture in the encoding sequence is selected for determination of whether to be encoded upon one of the encoding of the plurality of rows of video data associated with the picture and the determination of skipping of encoding of the picture.

### Claim 20 (depends on 17)

The non-transitory computer readable storage medium of claim 17, wherein the instructions for encoding the plurality of rows of video data further comprise instructions for:
tracking a number of bits consumed by encoding rows of video data from among the plurality of rows of video data at the first quantization scale.
