# US 2022/0295071 A1 · Video encoding method, video decoding method, and corresponding apparatus

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

- Number: US 2022/0295071 A1
- Document ID: US20220295071A1
- Status: Published application
- Kind: A1
- Application number: 17/830,062
- Filed: 2022-06-01
- Published: 2022-09-15
- Earliest claimed: 2019-12-02
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jun JI; Changcai LAI
- Web page: https://patentgrep.com/patent/US20220295071A1

## 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/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- H04N 19/137: Motion inside a coding unit, e.g. average field, frame or block difference
- H04N 19/172: the region being a picture, frame or field
- H04N 19/31: in the temporal domain
- H04N 19/33: in the spatial domain
- H04N 19/513: Processing of motion vectors
- H04N 19/587: involving temporal sub-sampling or interpolation, e.g. decimation or subsequent interpolation of pictures in a video sequence
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

This application provides a video encoding/decoding method, a corresponding video encoding/decoding apparatus. The video encoding method includes: obtaining a to-be-encoded video; encoding the to-be-encoded video to obtain a first bitstream and a second bitstream, where the first bitstream is a bitstream obtained by performing frame skipping and encoding on the to-be-encoded video, the second bitstream is a bitstream obtained by encoding video frames in a second frame sequence by using video frames in a first frame sequence as key frames, the first frame sequence includes video frames obtained by downsampling video frames in the to-be-encoded video that are encoded into the first bitstream, and the second frame sequence includes video frames obtained by downsampling video frames in the to-be-encoded video that are not encoded into the first bitstream; and outputting the first bitstream and the second bitstream. The technical solutions provided in this application help improve video image prediction accuracy.

## Claims

### Claim 1

A video encoding device, comprising:
one or more processors; and
a non-transitory computer-readable storage medium coupled to the one or more processors and storing instructions, which when executed by the one or more processors, cause the video coding device to perform operations, the operations comprising:
obtaining a to-be-encoded video;
encoding the to-be-encoded video to obtain a first bitstream and a second bitstream, wherein the first bitstream is a bitstream obtained by performing frame skipping and encoding on the to-be-encoded video, the second bitstream is a bitstream obtained by encoding video frames in a second frame sequence by using video frames in a first frame sequence as key frames, the first frame sequence comprises video frames obtained by downsampling video frames in the to-be-encoded video that are encoded into the first bitstream, and the second frame sequence comprises video frames obtained by downsampling video frames in the to-be-encoded video that are not encoded into the first bitstream; and
outputting the first bitstream and the second bitstream.

### Claim 2 (depends on 1)

The video encoding device of claim 1, wherein the encoding the to-be-encoded video to obtain a first bitstream and a second bitstream comprises:
performing frame skipping and encoding on the to-be-encoded video to obtain the first bitstream;
reconstructing the first bitstream to obtain a third frame sequence;
downsampling video frames in the third frame sequence to obtain the first frame sequence;
downsampling the video frames in the to-be-encoded video that are not encoded into the first bitstream, to obtain the second frame sequence; and
encoding the video frames in the second frame sequence by using the video frames in the first frame sequence as the key frames, to obtain the second bitstream.

### Claim 3

A video decoding device, comprising:
one or more processors; and
a non-transitory computer-readable storage medium coupled to the one or more processors and storing instructions, which when executed by the one or more processors, cause the video coding device to perform operations, the operations comprising:
obtaining a first bitstream and a second bitstream, wherein the first bitstream is a bitstream obtained by performing frame skipping and encoding on a source video, the second bitstream is a bitstream obtained by encoding video frames in a second frame sequence by using video frames in a first frame sequence as key frames, the first frame sequence comprises video frames obtained by downsampling video frames in the source video that are encoded into the first bitstream, and the second frame sequence comprises video frames obtained by downsampling video frames in the source video that are not encoded into the first bitstream; and
determining a target video based on the first bitstream and the second bitstream, wherein the target video comprises content expressed in the source video.

### Claim 4 (depends on 3)

The video decoding device of claim 3, wherein the determining a target video based on the first bitstream and the second bitstream comprises:
decoding the first bitstream to obtain a third frame sequence;
downsampling video frames in the third frame sequence to obtain the first frame sequence;
decoding the second bitstream by using the video frames in the first frame sequence as the key frames, to obtain the second frame sequence; and
determining the target video based on the second frame sequence and the third frame sequence.

### Claim 5 (depends on 4)

The video decoding device of claim 4, wherein the determining the target video based on the second frame sequence and the third frame sequence comprises:
determining an initial motion vector field of a to-be-processed frame in the second frame sequence based on the to-be-processed frame;
upsampling the initial motion vector field to obtain a to-be-processed motion vector field of the to-be-processed frame; and
determining a to-be-interpolated frame based on a reference frame in the third frame sequence, wherein the target video comprises the to-be-interpolated frame.

### Claim 6 (depends on 5)

The video decoding device of claim 5, wherein the determining a to-be-interpolated frame based on a reference frame in the third frame sequence comprises:
performing a bilinear interpolation operation based on the to-be-processed motion vector field and the reference frame in the third frame sequence to obtain the to-be-interpolated frame.

### Claim 7 (depends on 5)

The video decoding device of claim 5, wherein the operations further comprises:
determining illumination change information between the to-be-processed frame and a sampled video frame based on the to-be-processed frame and the sampled video frame, wherein the sampled video frame is in the first frame sequence and is obtained by downsampling the reference frame; and
the determining a to-be-interpolated frame based on a reference frame in the third frame sequence comprises:
determining the to-be-interpolated frame based on the illumination change information, the to-be-processed motion vector field, and the reference frame.

### Claim 8 (depends on 7)

The video decoding device of claim 7, wherein the determining the to-be-interpolated frame based on the illumination change information, the to-be-processed motion vector field, and the reference frame comprises:
performing illumination change processing on the reference frame based on the illumination change information to obtain a target reference frame; and
determining the to-be-interpolated frame based on the to-be-processed motion vector field and the target reference frame.

### Claim 9 (depends on 5)

The video decoding device of claim 5, wherein the operations further comprise:
determining scene switching information between the to-be-processed frame and a sampled video frame based on the to-be-processed frame and the sampled video frame, wherein the sampled video frame is in the first frame sequence and is obtained by sampling the reference frame; and
the determining a to-be-interpolated frame based on a reference frame in the third frame sequence comprises:
determining the to-be-interpolated frame based on the scene switching information, the to-be-processed motion vector field, and the reference frame.

### Claim 10 (depends on 9)

The video decoding device of claim 9, wherein the reference frame comprises a forward reference frame and a backward reference frame, and the sampled video frame comprises a forward sampled video frame and a backward sampled video frame; and
the determining the to-be-interpolated frame based on the scene switching information, the to-be-processed motion vector field, and the reference frame comprises:
when it is determined, based on the scene switching information, that a mode of switching from the to-be-processed frame to the forward sampled video frame is a hard switching mode, determining the to-be-interpolated frame based on the to-be-processed motion vector field and the backward reference frame; and
when it is determined, based on the scene switching information, that a mode of switching from the to-be-processed frame to the backward sampled video frame is a hard switching mode, determining the to-be-interpolated frame based on the to-be-processed motion vector field and the forward reference frame.

### Claim 11 (depends on 9)

The video decoding device of claim 9, wherein the determining the to-be-interpolated frame based on the scene switching information, the to-be-processed motion vector field, and the reference frame comprises:
when it is determined, based on the scene switching information, that a mode of switching from the to-be-processed frame to the reference frame is a fade-in/fade-out mode, determining the to-be-interpolated frame based on the to-be-processed motion vector field, a preset luminance coefficient, and the reference frame.

### Claim 12

A non-transitory computer-readable storage medium storing a computer program, which when executed by a processor, cause the processor to perform operations, the operations comprising:
obtaining a first bitstream and a second bitstream, wherein the first bitstream is a bitstream obtained by performing frame skipping and encoding on a source video, the second bitstream is a bitstream obtained by encoding video frames in a second frame sequence by using video frames in a first frame sequence as key frames, the first frame sequence comprises video frames obtained by downsampling video frames in the source video that are encoded into the first bitstream, and the second frame sequence comprises video frames obtained by downsampling video frames in the source video that are not encoded into the first bitstream; and
determining a target video based on the first bitstream and the second bitstream, wherein the target video comprises content expressed in the source video.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the determining a target video based on the first bitstream and the second bitstream comprises:
decoding the first bitstream to obtain a third frame sequence;
downsampling video frames in the third frame sequence to obtain the first frame sequence;
decoding the second bitstream by using the video frames in the first frame sequence as the key frames, to obtain the second frame sequence; and
determining the target video based on the second frame sequence and the third frame sequence.

### Claim 14 (depends on 13)

The non-transitory computer-readable storage medium of claim 13, wherein the determining the target video based on the second frame sequence and the third frame sequence comprises:
determining an initial motion vector field of a to-be-processed frame in the second frame sequence based on the to-be-processed frame;
upsampling the initial motion vector field to obtain a to-be-processed motion vector field of the to-be-processed frame; and
determining a to-be-interpolated frame based on a reference frame in the third frame sequence, wherein the target video comprises the to-be-interpolated frame.

### Claim 15 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein the determining a to-be-interpolated frame based on a reference frame in the third frame sequence comprises:
performing a bilinear interpolation operation based on the to-be-processed motion vector field and the reference frame in the third frame sequence to obtain the to-be-interpolated frame.

### Claim 16 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein the operations further comprise:
determining illumination change information between the to-be-processed frame and a sampled video frame based on the to-be-processed frame and the sampled video frame, wherein the sampled video frame is in the first frame sequence and is obtained by downsampling the reference frame; and
the determining a to-be-interpolated frame based on a reference frame in the third frame sequence comprises:
determining the to-be-interpolated frame based on the illumination change information, the to-be-processed motion vector field, and the reference frame.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the determining the to-be-interpolated frame based on the illumination change information, the to-be-processed motion vector field, and the reference frame comprises:
performing illumination change processing on the reference frame based on the illumination change information to obtain a target reference frame; and
determining the to-be-interpolated frame based on the to-be-processed motion vector field and the target reference frame.

### Claim 18 (depends on 14)

The non-transitory computer-readable storage medium of claim 14, wherein the operations further comprise:
determining scene switching information between the to-be-processed frame and a sampled video frame based on the to-be-processed frame and the sampled video frame, wherein the sampled video frame is in the first frame sequence and is obtained by sampling the reference frame; and
the determining a to-be-interpolated frame based on a reference frame in the third frame sequence comprises:
determining the to-be-interpolated frame based on the scene switching information, the to-be-processed motion vector field, and the reference frame.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the reference frame comprises a forward reference frame and a backward reference frame, and the sampled video frame comprises a forward sampled video frame and a backward sampled video frame; and
the determining the to-be-interpolated frame based on the scene switching information, the to-be-processed motion vector field, and the reference frame comprises:
when it is determined, based on the scene switching information, that a mode of switching from the to-be-processed frame to the forward sampled video frame is a hard switching mode, determining the to-be-interpolated frame based on the to-be-processed motion vector field and the backward reference frame; and
when it is determined, based on the scene switching information, that a mode of switching from the to-be-processed frame to the backward sampled video frame is a hard switching mode, determining the to-be-interpolated frame based on the to-be-processed motion vector field and the forward reference frame.

### Claim 20 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein the determining the to-be-interpolated frame based on the scene switching information, the to-be-processed motion vector field, and the reference frame comprises:
when it is determined, based on the scene switching information, that a mode of switching from the to-be-processed frame to the reference frame is a fade-in/fade-out mode, determining the to-be-interpolated frame based on the to-be-processed motion vector field, a preset luminance coefficient, and the reference frame.
