IP Library Granted Patent US 11,665,350
Granted Patent B2
US 11,665,350 · App. 16/992,982 · Granted May 30, 2023

Method and apparatus for video encoding and decoding

Inventors: Xinwei Gao (Shenzhen, CN); Xu Nan Mao (Shenzhen, CN); Chen Chen Gu (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LTD
H04N19/132H04N19/105H04N19/172H04N19/188H04N19/30
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 11,665,350
App. No.
16/992,982
Granted
May 30, 2023
Kind
B2
Abstract

A video encoding method, performed by a computer device, includes: obtaining a reference frame corresponding to a current frame from a video input to be encoded; determining a sampling manner corresponding to the current frame; sampling the reference frame based on the sampling manner according to resolution information of the current frame, to obtain a target reference frame corresponding to the reference frame; and encoding the current frame according to the target reference frame.

Claims (72)

1. A method, performed by a computer device, the method comprising:

obtaining a reference frame corresponding to a current frame from a video input to be encoded;

determining a sampling manner corresponding to the current frame;

sampling the reference frame based on the sampling manner, according to resolution information of the current frame, to obtain a target reference frame corresponding to the reference frame; and

encoding the current frame according to the target reference frame,

wherein the obtaining the reference frame corresponding to the current frame to be encoded includes:

obtaining a first reference rule, which includes a relationship between resolution values of the current frame to be encoded and a reference frame; and

obtaining the reference frame corresponding to the current frame to be encoded according to the first reference rule,

wherein, when the first reference rule refers to a case where the resolution values of the current frame to be encoded and the reference frame are different from each other, the obtained first reference rule includes one of the followings: (i) an original-resolution current frame to be encoded is referenced to a downsampled-resolution reference frame; (ii) a downsampled-resolution current frame to be encoded is referenced to an original-resolution reference frame; (iii) an original-resolution current frame to be encoded is referenced to an original-resolution reference frame; and (iv) a downsampled-resolution current frame to be encoded is referenced to a downsampled-resolution reference frame, and

wherein the original-resolution current frame or reference frame has a same resolution of a corresponding input video frame, and the downsampled-resolution current frame or reference frame is obtained by downsampling a corresponding input video frame or reference frame.

2. The method according to claim 1 , wherein the determining the sampling manner comprises:

determining, according to at least one of local hardware information and image feature information of the current frame, a sampling manner for upsampling the reference frame.

3. The method according to claim 1 , wherein the sampling comprises:

based on a resolution indicated by the resolution information of the current frame being greater than a resolution indicated by resolution information of the reference frame, upsampling the reference frame based on the sampling manner according to the resolution information of the current frame, to obtain the target reference frame.

4. The method according to claim 1 , wherein the sampling comprises:

based on a resolution indicated by the resolution information of the current frame being less than a resolution indicated by resolution information of the reference frame, downsampling the reference frame based on the sampling manner according to the resolution information of the current frame, to obtain the target reference frame.

5. The method according to claim 1 , wherein the sampling comprises:

sampling the reference frame based on the sampling manner according to the resolution information of the current frame, to obtain an intermediate reference frame; and

performing sub-pixel interpolation processing on the intermediate reference frame, to obtain the target reference frame.

6. The method according to claim 1 , wherein the sampling comprises:

determining, according to the resolution information of the current frame and resolution information of the reference frame, a sampling ratio corresponding to the sampling of the reference frame; and

sampling the reference frame according to the sampling manner and the sampling ratio, to obtain the target reference frame.

7. The method according to claim 1 , further comprising:

adding, to encoded data corresponding to the reference frame, sampling manner information corresponding to the sampling of the reference frame.

8. The method according to claim 7 , wherein the adding comprises:

adding, to at least one of a sequence header information field, a video frame group header information field, and a frame-level header information field of the encoded data, the sampling manner information corresponding to the sampling of the reference frame.

9. The method according to claim 1 , further comprising:

obtaining an input video frame;

determining a current encoding mode of the current frame, the current encoding mode being selected from a full-resolution mode and a downsampling mode; and

determining the current frame based on the input video frame and according to the current encoding mode.

10. A video decoding method, applied to a computer device, the method comprising:

determining a reference frame corresponding to a current frame from a video input to be decoded;

determining a sampling manner corresponding to the current frame;

sampling the reference frame based on the sampling manner according to resolution information of the current frame, to obtain a target reference frame corresponding to the reference frame; and

decoding the current frame according to the target reference frame,

wherein the determining the reference frame corresponding to the current frame to be encoded includes:

obtaining a first reference rule, which includes a relationship between resolution values of the current frame to be encoded and a reference frame; and

determining the reference frame corresponding to the current frame to be encoded according to the first reference rule,

wherein, when the first reference rule refers to a case where the resolution values of the current frame to be encoded and the reference frame are different from each other, the obtained first reference rule includes one of the followings: (i) an original-resolution current frame to be encoded is referenced to a downsampled-resolution reference frame; (ii) a downsampled-resolution current frame to be encoded is referenced to an original-resolution reference frame; (iii) an original-resolution current frame to be encoded is referenced to an original-resolution reference frame; and (iv) a downsampled-resolution current frame to be encoded is referenced to a downsampled-resolution reference frame, and

wherein the original-resolution current frame or reference frame has a same resolution of a corresponding input video frame, and the downsampled-resolution current frame or reference frame is obtained by downsampling a corresponding input video frame or reference frame.

11. The method according to claim 10 , wherein the determining the sampling manner comprises:

determining, according to at least one of local hardware information and image feature information of the current frame, a sampling manner for upsampling the reference frame.

12. The method according to claim 10 , wherein the sampling comprises:

based on a resolution indicated by the resolution information of the current frame being greater than a resolution indicated by resolution information of the reference frame, upsampling the reference frame based on the sampling manner according to the resolution information of the current frame, to obtain the target reference frame.

13. The method according to claim 10 , wherein the sampling comprises:

based on a resolution indicated by the resolution information of the current frame being less than a resolution indicated by resolution information of the reference frame, downsampling the reference frame based on the sampling manner according to the resolution information of the current frame, to obtain the target reference frame.

14. The method according to claim 10 , wherein the sampling comprises:

sampling the reference frame based on the sampling manner according to the resolution information of the current frame, to obtain an intermediate reference frame; and

performing sub-pixel interpolation processing on the intermediate reference frame, to obtain the target reference frame.

15. The method according to claim 10 , wherein the sampling comprises:

determining, according to the resolution information of the current frame and resolution information of the reference frame, a sampling ratio corresponding to the sampling of the reference frame; and

sampling the reference frame according to the sampling manner and the sampling ratio, to obtain the target reference frame.

16. The method according to claim 10 , wherein the determining the sampling manner comprises:

reading sampling manner information from encoded data corresponding to the reference frame; and

determining, according to the sampling manner information, the sampling manner corresponding to the current frame.

17. The method according to claim 16 , wherein the reading comprises:

reading the sampling manner information from at least one of a sequence header information field, a video frame group header information field, and a frame-level header information field of the encoded data.

18. The method according to claim 10 , further comprising:

obtaining encoded data corresponding to the current frame;

determining a current decoding mode corresponding to the current frame according to current encoding mode information included in the encoded data; and

processing a reconstructed video frame corresponding to the current frame according to the current decoding mode, to obtain a decoded video frame.

19. A video encoding apparatus, comprising:

at least one memory configured to store program code; and

at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:

obtaining code configured to cause at least one of the at least one processor to obtain a reference frame corresponding to a current frame from a video input to be encoded;

determining code configured to cause at least one of the at least one processor to determine a sampling manner corresponding to the current frame;

sampling code configured to cause at least one of the at least one processor to sample the reference frame based on the sampling manner according to resolution information of the current frame, to obtain a target reference frame corresponding to the reference frame; and

encoding code configured to cause at least one of the at least one processor to encode the current frame according to the target reference frame,

wherein the obtaining code is configured to cause at least one of the at least one processor to obtain a first reference rule, which includes a relationship between resolution values of the current frame to be encoded and a reference frame; and obtain the reference frame corresponding to the current frame to be encoded according to the first reference rule,

wherein, when the first reference rule refers to a case where the resolution values of the current frame to be encoded and the reference frame are different from each other, the obtained first reference rule includes one of the followings: (i) an original-resolution current frame to be encoded is referenced to a downsampled-resolution reference frame; (ii) a downsampled-resolution current frame to be encoded is referenced to an original-resolution reference frame; (iii) an original-resolution current frame to be encoded is referenced to an original-resolution reference frame; and (iv) a downsampled-resolution current frame to be encoded is referenced to a downsampled-resolution reference frame, and

wherein the original-resolution current frame or reference frame has a same resolution of a corresponding input video frame, and the downsampled-resolution current frame or reference frame is obtained by downsampling a corresponding input video frame or reference frame.

20. A non-transitory computer-readable storage medium, storing a computer program executable by at least one processor to cause the at least one processor to perform the method according to claim 1 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 13, 2020
From: GAO, XINWEI; MAO, XU NAN; GU, CHEN CHEN
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 053491/0531 →
Priority Claims (1)
CN 201810638012.5 · Jun 20, 2018 · national
Continuity (2)
Continuation PCTCN2019090002 · Jun 4, 2019
Related Publication 20200374524A1 · Nov 26, 2020