# US 2018/0027248 A1 · Image encoding method and encoder

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

- Number: US 2018/0027248 A1
- Document ID: US20180027248A1
- Status: Published application
- Kind: A1
- Application number: 15/720,627
- Filed: 2017-09-29
- Published: 2018-01-25
- Earliest claimed: 2015-03-31
- Assignees: Sz Dji Technology Co., Ltd.
- Applicants: Sz Dji Technology Co., Ltd.
- Inventors: Xiaohu YANG; Liangping ZHANG; Zhongqian YOU
- Web page: https://patentgrep.com/patent/US20180027248A1

## CPC

- H04N 19/20: using video object coding
- H04N 19/107: between spatial and temporal predictive coding, e.g. picture refresh
- H04N 19/124: Quantisation
- H04N 19/146: Data rate or code amount at the encoder output
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/174: the region being a slice, e.g. a line of blocks or a group of blocks
- H04N 19/177: the unit being a group of pictures [GOP]
- H04N 19/194: involving only two passes
- H04N 19/40: using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
- H04N 19/507: using conditional replenishment
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

An image encoding method includes determining N P-frames from a sequence of images, determining a source refreshing region in each one of the P-frames, obtaining reconstructed images corresponding to the source refreshing regions by performing a first encoding on the source refreshing regions, obtaining updated P-frames by updating the source refreshing regions with the reconstructed images, and performing a second encoding on the updated P-frames.

## Claims

### Claim 1

An image encoding method comprising:
determining N P-frames from a sequence of images,
determining a source refreshing region in each one of the P-frames;
obtaining reconstructed images corresponding to the source refreshing regions by performing a first encoding on the source refreshing regions;
obtaining updated P-frames by updating the source refreshing regions with the reconstructed images; and
performing a second encoding on the updated P-frames.

### Claim 2 (depends on 1)

The method of claim 1, wherein:
each of the updated P-frames includes a new refreshing region and a source region separated from the new refreshing region, the new refreshing region corresponding to the reconstructed image corresponding to the updated P-frame, and
performing the second encoding on the updated P-frames includes:
performing the second encoding on the new refreshing regions according to an I-frame encoding mode;
performing the second encoding on the source regions according to a P-frame encoding mode.

### Claim 3 (depends on 2)

The method of claim 2, wherein performing the second encoding on the source regions according to the P-frame encoding mode includes:
if the source regions includes an unrefreshed region, performing the second encoding on the unrefreshed region according to the P-frame encoding mode;
if the source region includes a refreshed region, performing the second encoding on the refreshed region according to the P-frame encoding mode; or
if the source region includes an unrefreshed region and a refreshed region, performing the second encoding on the unrefreshed region and the refreshed region, respectively, according to the P-frame encoding mode.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the N P-frames are consecutive N P-frames including P1, P2, . . . , PN, and the first encoding and the second encoding axe performed on the P-frames in an order of P1, P2, . . . , PN from left to right;
obtaining the reconstructed images corresponding to the source refreshing regions by performing the first encoding on the source refreshing regions of the P-frames includes:
for each one of the P-frames, performing the first encoding on the corresponding source refreshing region to obtain the corresponding reconstructed image by referring to the new refreshing region of a previous P-frame on which the second encoding has been performed; and
obtaining the updated P-frames by updating the source refreshing regions with the reconstructed images includes:
on basis of each one of a plurality of macro blocks included in the reconstructed images, assigning values to parameter values corresponding to each macro block in the source refreshing regions by taking parameter values corresponding to the reconstructed image as reference, so as to update the source refreshing regions with the reconstructed images and to obtain the new refreshing regions, thereby forming the updated P-frames.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
performing the first encoding and the second encoding successively on the P-frames.

### Claim 6 (depends on 5)

The method of claim 5, wherein:
each one of the P-frames includes a plurality of macro blocks, and
performing the first encoding and the second encoding successively on the P-frames includes:
on basis of the macro blocks, successively refreshing the N P-frames in order for rows of macro blocks from top to bottom or for columns of macro blocks from left to right until refreshing of an I-frame of the sequence of images corresponding to the P-frames is completed, wherein when one of the P-frames is refreshed, a P-frame immediately preceding the one of the P-frames and a P-frame immediately following the one of the P-frames overlap at boundaries thereof or do not overlap with each other.

### Claim 6 (depends on 1)

The method of claim 1, wherein:
each one of the P-frames includes N regions,
an (N−m)th region of an mth P-frame is identical to an (N−m)th region of an (m−1)th P-frame, 2≦m≦N, and
the new refreshing region of the mth region is obtained by referring to new refreshing regions of a 1st part to an (N−2)th part of the (m−1)th P-frame.

### Claim 8 (depends on 1)

The method of claim 1, wherein performing the first encoding on the source refreshing regions of the P-frames according to the P-frame encoding mode includes:
performing the first encoding on each of the source refreshing regions using a quantization parameter QP according to the P-frames, and
recording the QP using a first quantization FirstQ, the QP being obtained by adjusting a bit rate required in transmitting the P-frames.

### Claim 9

An encoder comprising:
a processing circuit configured to determine N P-frames from a sequence of images, and determine a source refreshing region in each one of the P-frames; and
an encoding circuit configured to obtain reconstructed images corresponding to the source refreshing regions by performing a first encoding on the source refreshing regions, wherein N is a positive integer;
wherein:
the processing circuit is further configured to obtain updated P-frames by updating the source refreshing regions with the reconstructed images; and
the encoding circuit is further configured to perform a second encoding on the updated P-frames.

### Claim 10 (depends on 9)

The encoder of claim 9, wherein:
each of the updated P-frames includes a new refreshing region and a source region separated from the new refreshing region, the new refreshing region corresponding to the reconstructed image corresponding to the updated P-frame; and
the encoding circuit is further configured to:
perform the second encoding on the new refreshing regions according to an I-frame encoding mode; and
perform the second encoding on the source regions according to a P-frame encoding mode.

### Claim 11 (depends on 10)

The encoder of claim 10, wherein the encoding circuit is further configured to:
if the source region includes an unrefreshed region, perform the second encoding on the unrefreshed region according to the P-frame encoding mode;
if the source region includes a refreshed region, perform the second encoding on the refreshed region according to the P-frame encoding mode; or
if the source region includes an unrefreshed region and a refreshed region, perform the second encoding on the unrefreshed region and the refreshed region, respectively, according to the P-frame encoding mode.

### Claim 12 (depends on 9)

The encoder of claims 9, wherein:
the N P-frames are consecutive N P-frames including P1, P2, . . . , PN, and the first encoding and the second encoding are performed on the P-frames in an encoding order of P1, P2, . . . , PN from left to right;
the encoding circuit is further configured to:
for each one of the P-frames, perform the first encoding on the corresponding source refreshing region to obtain the corresponding reconstructed image by referring to the new refreshing region of a previous P-frame on which the second encoding has been performed; and
the processing circuit is further configured to:
on basis of each one of a plurality of macro blocks included in the reconstructed images, assigning values to parameter values corresponding to each macro block in the source refreshing regions by taking parameter values corresponding to the reconstructed image as reference, so as to update the source refreshing regions with the reconstructed images and to obtain the new refreshing regions, thereby forming the updated P-frames.

### Claim 13 (depends on 9)

The encoder of claim 9, wherein the encoding circuit is further configured to perform the first encoding and the second encoding successively on the P-frames.

### Claim 14 (depends on 13)

The encoder of claim 13, wherein
each one of the P-frames includes a plurality of macro blocks, and
the encoding circuit is further configured to:
on basis of the macro blocks, successively refresh the N P-frames in order for rows of macro blocks from top to bottom or for columns of macro blocks from left to right until refreshing of an I-frame of the sequence of images corresponding to the P-frames is completed, wherein when one of the P-frames is refreshed, a P-frame immediately preceding the one of the P-frames and a P-frame immediately following the one of the P-frames overlap at boundaries thereof or do not overlap with each other.

### Claim 15 (depends on 9)

The encoder of claim 9, wherein:
each one of the P-frames includes N regions,
an (N−m)th region of an mth P-frame is identical to an (N−m)th region of an (m−1)th P-frame, 2≦m≦N, and
the new refreshing-region of the mth region is obtained by referring to new refreshing regions of a 1st part to an (N−2)th part of the (m−1)th P-frame.

### Claim 16 (depends on 9)

The encoder of claim 9, wherein the encoding circuit is further configured to:
perform the first encoding on each of the source refreshing regions using a quantization parameter QP according to the P-frames, and
record the QP using a first quantization FirstQ, the QP being obtained by adjusting a bit rate required for transmitting the P-frames.
