IP Library › Granted Patent US 12,568,236
Granted Patent B2
US 12,568,236 · App. 18/235,131 · Granted Mar 3, 2026

Video compression method and apparatus, computer device, and storage medium

Inventors: Aojie Jiang (Shenzhen, CN); Xianguo Zhang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
H04N19/436H04N19/119H04N19/137H04N19/172H04N19/176H04N19/177H04N19/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,568,236
App. No.
18/235,131
Granted
Mar 3, 2026
Kind
B2
Abstract

A video compression method includes: acquiring a video to be compressed; determining encoding parameters respectively corresponding to a plurality of image frames in the video; and compressing the video based on the encoding parameters respectively corresponding to the plurality of image frames in the video. Determining encoding parameters respectively corresponding to a plurality of image frames in the video includes: for an image frame of a plurality of image frames: performing adaptive mapping on the image frame based on a differential feature of the image frame relative to a corresponding reference frame, to obtain a mapping result; determining a parallel processing condition corresponding to the image frame according to the mapping result; performing, in response to that a hierarchical feature of the image frame satisfies the parallel processing condition, parallel compression analysis on image encoding units in the image frame to obtain an encoding parameter for the image frame.

Claims (85)

1 . A video compression method, performed by a computer device and comprising:

acquiring a video to be compressed;

determining encoding parameters respectively corresponding to a plurality of image frames in the video, comprising: for an image frame of a plurality of image frames:

determining an adaptive mapping parameter and a result limit range, the result limit range being obtained based on a picture group feature of a group of pictures to which the image frame belongs;

performing adaptive mapping on the image frame based on a differential feature of the image frame relative to a corresponding reference frame according to the adaptive mapping parameter, to obtain a differential feature mapping result;

adjusting the differential feature mapping result based on the result limit range to obtain a mapping result within the result limit range;

determining a parallel processing condition corresponding to the image frame according to the mapping result; and

performing, in response to that a hierarchical feature of the image frame satisfies the parallel processing condition, parallel compression analysis on image encoding units in the image frame to obtain an encoding parameter for the image frame, the image encoding units being obtained by performing unit division on the image frame; and

compressing the video based on the encoding parameters respectively corresponding to the plurality of image frames in the video.

2 . The method according to claim 1 , wherein determining the parallel processing condition corresponding to the image frame according to the mapping result comprises:

determining a parallel processing threshold according to the mapping result, and generating the parallel processing condition corresponding to the image frame based on the parallel processing threshold.

3 . The method according to claim 1 , wherein the differential feature comprises a motion feature and a residual feature; the adaptive mapping parameter comprises a motion feature mapping parameter and a residual feature mapping parameter; and

the performing adaptive mapping on the differential feature of the image frame relative to the corresponding reference frame according to the adaptive mapping parameter to obtain a differential feature mapping result comprises:

performing adaptive mapping on the motion feature according to the motion feature mapping parameter to obtain a motion feature mapping result;

performing adaptive mapping on the residual feature according to the residual feature mapping parameter to obtain a residual feature mapping result; and

obtaining the differential feature mapping result based on the motion feature mapping result and the residual feature mapping result.

4 . The method according to claim 1 , wherein the performing, in response to that a hierarchical feature of the image frame satisfies the parallel processing condition, parallel compression analysis on image encoding units in the image frame to obtain an encoding parameter for the image frame comprises:

determining image encoding units in the image frame in response to that an image depth of the image frame is greater than a parallel processing threshold; and

performing parallel compression analysis on the image encoding units by a wavefront parallel processing method, and obtaining an encoding parameter for the image frame according to analysis results respectively corresponding to the image encoding units.

5 . The method according to claim 4 , wherein the image encoding units in the image frame are arranged in rows; and the performing parallel compression analysis on the image encoding units, and obtaining an encoding parameter for the image frame according to analysis results respectively corresponding to the image encoding units comprises:

performing parallel residual analysis on the image encoding units to obtain residual parameters respectively corresponding to the image encoding units;

correcting a residual parameter of a first image encoding unit in response to that a residual parameter of the first image encoding unit in the image encoding units satisfies a residual correction condition, to obtain a corrected residual parameter, the first image encoding unit being a first image encoding unit in one row of the image encoding units;

obtaining an analysis result corresponding to the first image encoding unit based on the corrected residual parameter; and

obtaining an encoding parameter for the image frame according to analysis results respectively corresponding to the image encoding units.

6 . The method according to claim 5 , wherein the correcting a residual parameter of the first image encoding unit in response to that the residual parameter of the first image encoding unit in the image encoding units satisfies a residual correction condition comprises:

adjusting the residual parameter of the first image encoding unit to have a non-zero numerical value in response to that a numerical value of the residual parameter of the first image encoding unit in the image encoding units is zero.

7 . The method according to claim 1 , wherein the compressing the video based on the encoding parameters respectively corresponding to the image frames in the video comprises:

compressing the corresponding image frames by a non-wavefront parallel processing method based on the encoding parameters respectively corresponding to the plurality of image frames, to obtain encoding results respectively corresponding to the plurality of image frames; and

compressing the video based on the encoding results respectively corresponding to the plurality of image frames.

8 . The method according to claim 1 , further comprising: for an image frame of a plurality of image frames:

determining image size information of the image frame; and

performing, in response to that the image size information and a compression resource satisfy a parallel initiation condition, the operation of performing adaptive mapping on the image frame in the video based on a differential feature of the image frame relative to a corresponding reference frame.

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

compressing the video by a parallel method in response to that the image size information and the compression resource do not satisfy the parallel initiation condition, the parallel method comprising at least one of: slice-level parallelism, tile-level parallelism, or frame-level parallelism.

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

determining a group of pictures to which the image frame belongs in the video;

determining a hierarchical feature of the image frame and a reference frame corresponding to the image frame based on the group of pictures; and

performing differential analysis on the image frame and the reference frame to obtain a differential feature of the image frame relative to the reference frame.

11 . The method according to claim 10 , wherein the determining a hierarchical feature of the image frame and a reference frame corresponding to the image frame based on the group of pictures comprises:

determining a picture group feature of the group of pictures; and

determining a hierarchical feature of the image frame and a reference frame corresponding to the image frame based on a picture group reference relationship in the picture group feature.

12 . The method according to claim 10 , wherein the performing differential analysis on the image frame and the reference frame to obtain a differential feature of the image frame relative to the reference frame comprises:

determining matching image blocks respectively corresponding to original image blocks in the image frame from the reference frame;

obtaining motion information respectively corresponding to the original image blocks according to positions of the original image blocks and positions of the corresponding matching image blocks; and

obtaining a motion feature of the image frame relative to the reference frame based on the motion information respectively corresponding to original image blocks.

13 . The method according to claim 12 , wherein the motion information comprises first displacements of the original image blocks in the image frame in an image width direction, and second displacements of the original image blocks in the image frame in an image height direction; and the obtaining a motion feature of the image frame relative to the reference frame based on the motion information respectively corresponding to the original image blocks comprises:

performing summation on the first displacements of the original image blocks, and obtaining a first displacement ratio based on a ratio of the obtained first displacement sum to an image width of the image frame;

performing summation on the second displacements of the original image blocks, and obtaining a second displacement ratio based on a ratio of the obtained second displacement sum to an image height of the image frame;

obtaining an intermediate motion feature according to a ratio of a displacement ratio sum of the first displacement ratio and the second displacement ratio to a quantity of original image blocks; and

obtaining a motion feature of the image frame relative to the reference frame according to a ratio of the intermediate motion feature to an image distance, the image distance comprising a distance between the reference frame and the image frame.

14 . The method according to claim 8 , wherein the performing differential analysis on the image frame and the reference frame to obtain a differential feature of the image frame relative to the reference frame comprises:

determining matching image blocks respectively corresponding to original image blocks in the image frame from the reference frame;

obtaining residual information respectively corresponding to the original image blocks according to pixels of the original image blocks and pixels of the corresponding matching image blocks; and

obtaining a residual feature of the image frame relative to the reference frame based on the residual information respectively corresponding to the original image blocks and a quantity of original image blocks.

15 . The method according to claim 14 , wherein the residual information comprises pixel residual absolute values of the original image blocks, and a pixel residual absolute value of an original image block is obtained according to pixel differences between the pixels in the original image block and a corresponding matching image block; and the obtaining a residual feature of the image frame relative to the reference frame based on the residual information respectively corresponding to the original image blocks and a quantity of original image blocks comprises:

performing summation on the pixel residual absolute values of the original image blocks to obtain a sum of absolute differences of residuals; and

obtaining a residual feature of the image frame relative to the reference frame according to a ratio of the sum of absolute differences of residuals to the quantity of original image blocks.

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

performing, in response to that the hierarchical feature of the image frame does not satisfy the parallel processing condition, compression analysis on the image frame by a non-wavefront parallel processing method to obtain an encoding parameter for the image frame.

17 . A video compression apparatus, comprising:

at least one memory and at least one processor, the at least one memory storing a computer-readable instruction that, when executed by the at least one processor, implements:

acquiring a video to be compressed;

determining encoding parameters respectively corresponding to a plurality of image frames in the video, comprising: for an image frame of a plurality of image frames:

determining an adaptive mapping parameter and a result limit range, the result limit range being obtained based on a picture group feature of a group of pictures to which the image frame belongs;

performing adaptive mapping on the image frame based on a differential feature of the image frame relative to a corresponding reference frame according to the adaptive mapping parameter, to obtain a differential feature mapping result;

adjusting the differential feature mapping result based on the result limit range to obtain a mapping result within the result limit range;

determining a parallel processing condition corresponding to the image frame according to the mapping result; and

performing, in response to that a hierarchical feature of the image frame satisfies the parallel processing condition, parallel compression analysis on image encoding units in the image frame to obtain an encoding parameter for the image frame, the image encoding units being obtained by performing unit division on the image frame; and

compressing the video based on the encoding parameters respectively corresponding to the plurality of image frames in the video.

18 . The apparatus according to claim 17 , wherein determining the parallel processing condition corresponding to the image frame according to the mapping result comprises:

determining a parallel processing threshold according to the mapping result, and generating the parallel processing condition corresponding to the image frame based on the parallel processing threshold.

19 . The apparatus according to claim 17 , wherein the differential feature comprises a motion feature and a residual feature; the adaptive mapping parameter comprises a motion feature mapping parameter and a residual feature mapping parameter; and

the performing adaptive mapping on the differential feature of the image frame relative to the corresponding reference frame according to the adaptive mapping parameter to obtain a differential feature mapping result comprises:

performing adaptive mapping on the motion feature according to the motion feature mapping parameter to obtain a motion feature mapping result;

performing adaptive mapping on the residual feature according to the residual feature mapping parameter to obtain a residual feature mapping result; and

obtaining the differential feature mapping result based on the motion feature mapping result and the residual feature mapping result.

20 . A non-transitory computer-readable storage medium, storing a computer-readable instruction that, when executed by at least one processor, causing the at least one processor to perform:

acquiring a video to be compressed;

determining encoding parameters respectively corresponding to a plurality of image frames in the video, comprising: for an image frame of a plurality of image frames:

determining an adaptive mapping parameter and a result limit range, the result limit range being obtained based on a picture group feature of a group of pictures to which the image frame belongs;

performing adaptive mapping on the image frame based on a differential feature of the image frame relative to a corresponding reference frame according to the adaptive mapping parameter, to obtain a differential feature mapping result;

adjusting the differential feature mapping result based on the result limit range to obtain a mapping result within the result limit range;

determining a parallel processing condition corresponding to the image frame according to the mapping result; and

performing, in response to that a hierarchical feature of the image frame satisfies the parallel processing condition, parallel compression analysis on image encoding units in the image frame to obtain an encoding parameter for the image frame, the image encoding units being obtained by performing unit division on the image frame; and

compressing the video based on the encoding parameters respectively corresponding to the plurality of image frames in the video.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 17, 2023
From: JIANG, AOJIE; ZHANG, XIANGUO
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 064625/0438 →
Priority Claims (1)
CN 202111327815.7 · Nov 10, 2021 · national
Continuity (2)
Continuation PCTCN2022119175 · Sep 16, 2022
Related Publication 20230396787A1 · Dec 7, 2023
References Cited (22)
US 10827178B2 · Nellore · 2020 [cited by examiner]
US 20140086306A1 · Esenlik · 2014 [cited by examiner]
US 20140247875A1 · Hattori · 2014 [cited by examiner]
US 20140341276A1 · Lee · 2014 [cited by examiner]
US 20150103927A1 · Hannuksela · 2015 [cited by examiner]
US 20160191922A1 · Chao et al. · 2016 [cited by applicant]
US 20160301942A1 · Qiu · 2016 [cited by examiner]
US 20170118466A1 · Nakagami · 2017 [cited by examiner]
US 20170310983A1 · Gudumasu et al. · 2017 [cited by applicant]
US 20190082178A1 · Kim et al. · 2019 [cited by applicant]
US 20190342560A1 · Schierl et al. · 2019 [cited by applicant]
US 20220201311A1 · Zhang · 2022 [cited by examiner]
US 20240155141A1 · Schierl et al. · 2024 [cited by applicant]
CN 103702126A · 2014 [cited by applicant]
CN 103974081A · 2014 [cited by applicant]
CN 104620584A · 2015 [cited by applicant]
CN 105847871A · 2016 [cited by applicant]
CN 109076216A · 2018 [cited by applicant]
WO 2018155983A1 · 2018 [cited by applicant]
The World Intellectual Property Organization (WIPO) International Search Report and Written Opinion for PCT/CN2022/119175 Dec. 5, 2022 13 Pages (including translation). [cited by applicant]
The European Patent Office (EPO) The Extended European Search Report for Application No. 22891638.3 Jan. 27, 2025 10 Pages. [cited by applicant]
China National Intellectual Property Administration (CNIPA) Office Action 1 for Application No. 202111327815.7 Mar. 21, 2025 9 Pages (including translation). [cited by applicant]