IP Library Granted Patent US 12,328,439
Granted Patent B2
US 12,328,439 · App. 18/334,785 · Granted Jun 10, 2025

Image processing method and apparatus, computer device, storage medium and program product for recoding current frame based on scene switching determination

Inventors: Jian Cao (Shenzhen, CN); Hongbin Cao (Shenzhen, CN); Yongcheng Huang (Shenzhen, CN); Sijia Chen (Shenzhen, CN); Jia Zhang (Shenzhen, CN); Xiaoxiang Yang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04N19/40A63F13/355H04N19/105H04N19/109H04N19/11H04N19/124H04N19/136H04N19/142H04N19/172H04N19/182H04N19/184H04N19/463
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 12,328,439
App. No.
18/334,785
Granted
Jun 10, 2025
Kind
B2
Abstract

An image processing method and apparatus, a computer device, a storage medium and a program product, which can be applied to scenes such as image processing, game, and game basic skill. The method includes: encoding a current frame image to obtain an initial encoded image, and obtaining an encoding parameter, the encoding parameter comprising: a parameter indicating whether a scene switch exists in the current frame image; and recoding the current frame image based on a determination, according to the encoding parameter, that the current frame image needs to be recoded to obtain a target encoded image, wherein a data volume of the target encoded image is less than the data volume of the initial encoded image.

Claims (84)

1. An image processing method, performed by a computer device, comprising:

encoding a current frame image to obtain an initial encoded image, and obtaining an encoding parameter, the encoding parameter comprising: a parameter indicating whether a scene switch exists in the current frame image, an image size, a current encoding frame rate and a current encoding bit rate;

determining a size threshold according to the current encoding frame rate and the current encoding bit rate;

determining, based on the scene switch existing in the current frame image and the image size being greater than the size threshold, that the current frame image needs to be recoded; and

recoding the current frame image based on the determination that the current frame image needs to be recoded to obtain a target encoded image,

wherein

a data volume of the target encoded image is less than the data volume of the initial encoded image.

2. The image processing method according to claim 1 , further comprising:

determining, based on the current frame image being an instantaneous decoding refresh (IDR) frame, the encoding parameter of the IDR frame as a reference encoding parameter, and transmitting the IDR frame.

3. The image processing method according to claim 1 , further comprising:

determining the target encoded image as an IDR frame, and transmitting the IDR frame.

4. The image processing method according to claim 1 , wherein the encoding parameter is a ratio of an intra prediction pixel, and

wherein the image processing method further comprises:

determining, based on the ratio of the intra prediction pixel being less than or equal to a preset ratio, that the scene switch does not exist in the current frame image.

5. The image processing method according to claim 1 , wherein the encoding parameter is a ratio of an intra prediction pixel, and

wherein the image processing method further comprises:

determining, based on the ratio of the intra prediction pixel being greater than a preset ratio, that the scene switch exists in the current frame image.

6. The image processing method according to claim 5 , further comprising:

determining, based on no scene switch existing in the current frame image, that the current frame image does not need to be recoded; or,

determining, based on the scene switch existing in the current frame image and the image size being less than the size threshold, that the current frame image does not need to be recoded.

7. The image processing method according to claim 1 , wherein the encoding parameter further comprises an average quantization parameter, and

wherein the recoding comprises:

adjusting the average quantization parameter according to a first adjustment value based on the average quantization parameter being greater than a reference average quantization parameter, the reference average quantization parameter being the average quantization parameter of an IDR frame before the current frame image;

adjusting the average quantization parameter according to a second adjustment value based on the average quantization parameter being less than the reference average quantization parameter, the second adjustment value being greater than the first adjustment value; and

recoding the current frame image according to the adjusted average quantization parameter to obtain the target encoded image.

8. The image processing method according to claim 1 , wherein the encoding parameter comprises an image size and an average quantization parameter, and

wherein the recoding comprises:

adjusting the average quantization parameter according to a first adjustment value based on the image size being less than a reference image size, the reference image size being the image size of an IDR frame before the current frame image;

adjusting the average quantization parameter according to a second adjustment value based on the image size being greater than the reference image size, the second adjustment value being greater than the first adjustment value; and

recoding the current frame image according to the adjusted average quantization parameter to obtain the target encoded image.

9. The image processing method according to claim 1 , wherein the encoding parameter comprises an average quantization parameter and an image size, and

wherein the recoding comprises:

adjusting the average quantization parameter according to a first adjustment value based on the average quantization parameter being greater than a reference average quantization parameter and the image size being less than a reference image size, the reference average quantization parameter being the average quantization parameter of an IDR frame before the current frame image, and the reference image size being determined according to the image size of the IDR frame before the current frame image;

adjusting the average quantization parameter according to a second adjustment value based on the average quantization parameter being less than the reference average quantization parameter; or adjusting the average quantization parameter according to the second adjustment value based on the average quantization parameter being greater than the reference average quantization parameter and the image size being greater than the reference image size, the second adjustment value being greater than the first adjustment value; and

recoding the current frame image according to the adjusted average quantization parameter to obtain the target encoded image.

10. The image processing method according to claim 1 , further comprising:

transmitting, through a cloud gaming client, a capability request to a terminal, the capability request being a request for encoding and decoding capability information of the terminal;

receiving the encoding and decoding capability information transmitted by the terminal through the cloud gaming client; and

determining a target encoding and decoding configuration and a target encoding and decoding policy according to the encoding and decoding capability information, a game run by the terminal, and network communication information; wherein

the encoding the current frame image comprises:

encoding the current frame image according to the target encoding and decoding configuration and the target encoding and decoding policy.

11. An image processing 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:

first encoding code configured to cause the at least one processor to:

encode a current frame image to obtain an initial encoded image, and obtain an encoding parameter, the encoding parameter comprises: a parameter for indicating whether a scene switch exists in the current frame image, an image size, a current encoding frame rate and a current encoding bit rate,

determine a size threshold according to the current encoding frame rate and the current encoding bit rate, and

determine, based on that the scene switch existing in the current frame image and the image size being greater than the size threshold, that the current frame image needs to be recoded; and

second encoding code configured to cause the at least one processor to recode the current frame image based on the determination that the current frame image needs to be recoded to obtain a target encoded image,

wherein a data volume of the target encoded image is less than the data volume of the initial encoded image.

12. The image processing apparatus according to claim 11 , wherein the program code further comprises:

first determining code configured to cause the at least one processor to determine, based on the current frame image being an instantaneous decoding refresh (IDR) frame, the encoding parameter of the IDR frame as a reference encoding parameter, and transmitting the IDR frame.

13. The image processing apparatus according to claim 11 , wherein the program code further comprises:

second determining code configured to cause the at least one processor to determine the target encoded image as an IDR frame, and transmitting the IDR frame.

14. The image processing apparatus according to claim 12 , wherein the encoding parameter is a ratio of an intra prediction pixel, and

wherein the first determining code is further configured to cause the at least one processor to:

determine, based on the ratio of the intra prediction pixel being less than or equal to a preset ratio, that a scene switch exists in the current frame image.

15. The image processing apparatus according to claim 12 , wherein the encoding parameter is a ratio of an intra prediction pixel, and

wherein the first determining code is further configured to cause the at least one processor to:

determine, based on the ratio of the intra prediction pixel being greater than a preset ratio, that a scene switch exists in the current frame image.

16. The image processing apparatus according to claim 15 , wherein the first determining code is further configured to cause the at least one processor to:

determine, based on no scene switch existing in the current frame image, that the current frame image does not need to be recoded; or,

determine, based on the scene switch existing in the current frame image and the image size is-being less than the size threshold, that the current frame image does not need to be recoded.

17. The image processing apparatus according to claim 11 , wherein the encoding parameter further comprises an average quantization parameter, and

wherein the second encoding code is further configured to cause the at least one processor to:

adjust the average quantization parameter according to a first adjustment value based on the average quantization parameter being greater than a reference average quantization parameter, the reference average quantization parameter being the average quantization parameter of an IDR frame before the current frame image,

adjust the average quantization parameter according to a second adjustment value based on the average quantization parameter being less than the reference average quantization parameter, the second adjustment value being greater than the first adjustment value, and

recode the current frame image according to the adjusted average quantization parameter to obtain the target encoded image.

18. The image processing apparatus according to claim 11 , wherein the encoding parameter comprises an image size and an average quantization parameter, and

wherein the second encoding code is further configured to cause the at least one processor to:

adjust the average quantization parameter according to a first adjustment value based on the image size being less than a reference image size, the reference image size being the image size of an IDR frame before the current frame image,

adjust the average quantization parameter according to a second adjustment value based on the image size being greater than the reference image size, the second adjustment value being greater than the first adjustment value, and

recode the current frame image according to the adjusted average quantization parameter to obtain the target encoded image.

19. The image processing apparatus according to claim 11 , wherein the encoding parameter comprises an average quantization parameter and an image size, and

wherein the second encoding code is further configured to cause the at least one processor to:

adjust the average quantization parameter according to a first adjustment value based on the average quantization parameter being greater than a reference average quantization parameter and the image size being less than a reference image size, the reference average quantization parameter being the average quantization parameter of an IDR frame before the current frame image, and the reference image size being determined according to the image size of the IDR frame before the current frame image,

adjust the average quantization parameter according to a second adjustment value based on the average quantization parameter being less than the reference average quantization parameter; or adjusting the average quantization parameter according to the second adjustment value based on the average quantization parameter being greater than the reference average quantization parameter and the image size being greater than the reference image size, the second adjustment value being greater than the first adjustment value, and

recode the current frame image according to the adjusted average quantization parameter to obtain the target encoded image.

20. A non-transitory computer-readable storage medium storing computer code that when executed by at least one processor causes the at least one processor to:

encode a current frame image to obtain an initial encoded image, and obtaining an encoding parameter, the encoding parameter comprising: a parameter indicating whether a scene switch exists in the current frame image, an image size, a current encoding frame rate and a current encoding bit rate;

determine a size threshold according to the current encoding frame rate and the current encoding bit rate;

determine, based on the scene switch existing in the current frame image and the image size being greater than the size threshold, that the current frame image needs to be recode; and

recode the current frame image based on the determination that the current frame image needs to be recoded to obtain a target encoded image, wherein

a data volume of the target encoded image is less than the data volume of the initial encoded image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 14, 2023
From: CAO, JIAN; CAO, HONGBIN; HUANG, YONGCHENG; CHEN, SIJIA; ZHANG, JIA; YANG, XIAOXIANG
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 063950/0303 →
Priority Claims (1)
CN 202210101718.4 · Jan 27, 2022 · national
Continuity (2)
Continuation PCTCN2022135663 · Nov 30, 2022
Related Publication 20230388526A1 · Nov 30, 2023
References Cited (12)
US 8879623B2 · Lee · 2014 [cited by examiner]
US 20110051809A1 · Lee · 2011 [cited by examiner]
US 20210099713A1 · Cerny · 2021 [cited by examiner]
US 20210185318A1 · Zhu · 2021 [cited by examiner]
US 20220226736A1 · Hsiung · 2022 [cited by examiner]
CN 101677398A · 2010 [cited by applicant]
CN 108924611A · 2018 [cited by applicant]
CN 109561310A · 2019 [cited by applicant]
CN 110933430A · 2020 [cited by applicant]
CN 111698505A · 2020 [cited by applicant]
International Search Report of PCT/CN2022/135663 dated Feb. 13, 2023 [PCT/ISA/210]. [cited by applicant]
Written Opinion of PCT/CN2022/135663 dated Feb. 13, 2023 [PCT/ISA/237]. [cited by applicant]
Cited By (1)
US 12,725,621