CN109862354B - HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution - Google Patents

HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution Download PDF

Info

Publication number
CN109862354B
CN109862354B CN201910119549.5A CN201910119549A CN109862354B CN 109862354 B CN109862354 B CN 109862354B CN 201910119549 A CN201910119549 A CN 201910119549A CN 109862354 B CN109862354 B CN 109862354B
Authority
CN
China
Prior art keywords
residual
coding
frame
depth
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910119549.5A
Other languages
Chinese (zh)
Other versions
CN109862354A (en
Inventor
崔子冠
姜晓鹏
干宗良
唐贵进
刘峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN201910119549.5A priority Critical patent/CN109862354B/en
Publication of CN109862354A publication Critical patent/CN109862354A/en
Application granted granted Critical
Publication of CN109862354B publication Critical patent/CN109862354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an HEVC (high efficiency video coding) rapid Inter-frame depth dividing method based on residual distribution, which comprises the steps of reading in a coding frame under low-delay or random access coding configuration, and calculating residual values of different blocks in a coding unit by taking a 4 x 4 pixel block as a unit after executing an Inter-2 Nx 2N mode; averaging the residual errors of the 4 x 4 pixel blocks to obtain a residual error mean value of the located depth CU; in the frame for performing the residual error statistics, each coding completes a coding tree unit, the CU residual errors of corresponding depths in the prediction process are divided into two types of segmentation and non-segmentation according to the actual depth of the CTU, and the residual error mean value is considered to obey Gaussian distribution according to statistics; in a frame for performing rapid depth decision based on residual errors, taking the mean value of the residual errors after completion of each depth Inter _2 Nx 2N mode as a characteristic, calculating the probability of the residual errors in Gaussian distribution and determining whether the current CU is divided or not according to the probability; the remaining CTUs and subsequent frames are encoded in sequence until the encoding of all frames is complete. The method can greatly reduce the computational complexity of HEVC inter-frame prediction while better maintaining the video coding quality.

Description

HEVC rapid inter-frame depth division method based on residual distribution
Technical Field
The invention relates to the technical field of HEVC video coding, in particular to the technical field of inter-frame prediction and rapid depth division of video coding, and particularly relates to an HEVC rapid inter-frame depth division method based on residual distribution.
Background
The goal of video coding is to achieve optimal output video quality under the limit of the code rate. High Efficiency Video Coding (HEVC), i.e., h.265, is the current internationally latest video coding standard, and by adopting a flexible quadtree partitioning structure and a multi-mode intra-frame and inter-frame prediction technology, the coding efficiency is greatly improved, and compared with the previous generation video coding standard h.264/AVC, the coding efficiency is doubled, but the computational complexity of the encoder is also increased sharply. Statistically, the mode selection of the Coding Tree Unit (CTU) takes more than 2/3 of the entire coding time, and thus is difficult to apply in a practical encoder, especially in real-time.
Disclosure of Invention
The invention aims to provide a residual distribution-based HEVC (high efficiency video coding) rapid inter-frame depth dividing method, which can effectively reduce the inter-frame prediction calculation complexity on the premise of keeping the video coding quality.
In order to achieve the purpose, the invention adopts the technical scheme that:
a High Efficiency Video Coding (HEVC) fast inter-frame depth division method based on residual distribution comprises the following steps:
1) Reading in a current Coding frame in Low Delay (LD, low Delay) or Random access (RA, random access) Coding configuration, if the current Coding frame is an I frame, performing intra-frame prediction Coding on all Coding Tree Units (CTU) and turning to step 8), if the current Coding frame is not the I frame, judging whether the current Coding frame is used for counting residual frames or performing rapid depth division based on residual errors according to frame numbers, if the current Coding frame is used for counting the residual frames, turning to step 2), otherwise, turning to step 6);
2) Performing HEVC standard Inter-frame prediction flow on all Coding tree units judged to be used for counting residual frames, calculating residual values by taking 4 × 4 pixel blocks of a brightness channel as a Unit after the execution of an Inter _2N × 2N mode under the three depths of 0, 1 and 2 is finished, and averaging the residual values of the 4 × 4 pixel blocks contained in a Coding Unit to be used as the residual mean value of the Coding Unit (CU);
3) After all coding tree units in the frame for counting the residual errors are judged to be coded, classifying the residual errors of the coding units obtained in the coding process into two types of segmentation and non-segmentation according to the optimal depth of the coding tree units;
4) Continuously reading in the next frame of the current Group of Pictures (GOP), and returning to the step 1) until all frames in the current Group of Pictures are encoded to obtain residual statistical information;
5) Modeling residual statistical information of all frames judged as statistical residual in the current image group in the step 4) by using Gaussian distribution, and calculating the mean and variance of the residual of the segmented and non-segmented coding units according to the mean of the residual of the coding units at all depths to establish a Gaussian probability density function;
6) For all coding tree units in a coding frame performing fast depth partitioning based on residuals, residual values are calculated in units of 4 × 4 pixel blocks after execution of an Inter _2N × 2N mode of a coding unit having depths of 0, 1, and 2 is completed, and the average of the residual values of the 4 × 4 pixel blocks included in the coding unit is taken as a residual mean value of the coding unit.
7) Calculating the probability of the current coding unit according to a Gaussian distribution probability density function formula by taking the residual error mean value of the current coding unit as a characteristic, and judging whether to directly terminate the division;
8) And continuously coding the residual coding tree unit and the residual coding frames for the coding frames which perform the rapid depth division based on the residual errors until the coding of the frames which perform the statistical residual error distribution again or all the frames of the video sequence is completed.
Further, the step 1) specifically comprises: calculating whether the frame belongs to the frame for carrying out statistical residual distribution according to the frame number of the current coding frame, wherein the calculation formula is as follows:
S=k%(frame_rate+size GOP )
Figure BDA0001971379650000021
wherein the frame is type Indicating the type of frame usage, frame s Representing frames, for statistical residual distribution f Representing frames for performing fast depth partitioning with residual, k representing the current coded frame number, frame _ rate representing the frame rate for coding the video sequence, size GOP The size of the image group in this configuration is indicated.
Further, the step 2) comprises the following steps:
21 Performing HEVC standard Inter-frame prediction process on all coding tree units in the statistical residual frame, namely sequentially performing MERGE mode, SKIP mode, inter _2 Nx 2N mode and non-square prediction unit mode division;
22 When the execution of the Inter _2 nx 2N mode of the coding unit under the three depths of 0, 1 and 2 is completed, the residual pixel brightness channel is divided according to the size of a 4 × 4 pixel block, and the residual value is calculated, wherein the calculation formula is as follows:
Figure BDA0001971379650000031
where resi (p, q) denotes a residual pixel value at the qth column position in the pth row, W CU 、H CU Respectively representing the width and the height of the current CU, and R (x, y) represents a residual value of a 4 x 4 pixel block at the x-th row and y-th column position in a coding unit;
23 Based on R (x, y), the residual mean value of the current coding unit is obtained, and the calculation formula is as follows:
Figure BDA0001971379650000032
wherein H blk And W blk Representing the number of 4 x 4 pixel blocks in the height and width of the current CU, respectively, k representing the current coded frame number, d representing the current CU depth, and i representing the sequence number of the CU at depth d.
Further, the step 3) specifically includes the following steps:
31 After encoding all coding tree units in the statistical residual frame is completed, traversing the real depth of the coding tree unit by taking the coding unit sizes corresponding to the three depths of 0, 1 and 2 as a unit;
32 Dividing the mean value of the residual errors of the coding units obtained in the step 2) into a segmentation residual error and a non-segmentation residual error according to the real depth division, wherein the calculation formula is as follows:
Figure BDA0001971379650000041
wherein d is CU Represents the true depth of the CU, d represents the CU depth at which the prediction was performed,
Figure BDA0001971379650000042
indicating that the sequence number is i at depth dThe mean of the residuals when the cell is divided,
Figure BDA0001971379650000043
denotes the mean of the residuals when the coding unit with sequence number i is not partitioned at depth d, k denotes the current coding frame number, s,
Figure BDA0001971379650000044
Respectively representing a divided coding unit class and a non-divided coding unit class.
Further, the step 5) comprises the following steps:
51 The residual errors are divided into two types of division and non-division according to different depths in the step 4), and the average value of the residual errors is calculated according to the depth and whether the residual errors are divided or not in the frame for counting the distribution of the residual errors in the period, and the calculation formula is as follows:
Figure BDA0001971379650000045
Figure BDA0001971379650000046
where i represents the zigzag sequence number of the CU at depth d, k is the current coding frame number,
Figure BDA0001971379650000047
and
Figure BDA0001971379650000048
respectively representing residual mean values of ith partitioned and non-partitioned CUs at a kth frame depth d, m representing a frame number of a first frame for statistical residual distribution in the update period,
Figure BDA0001971379650000049
and
Figure BDA00019713796500000410
respectively representing the total number of partitioned CUs and the total number of undivided CUs at the actual depth d,
Figure BDA00019713796500000411
and
Figure BDA00019713796500000412
respectively representing residual mean values of the divided CU and the undivided CU at each depth;
52 Based on the residual mean obtained in 51), calculating the variance of all the residuals in the frame used for statistics of residual distribution in the period according to the depth and whether the residuals are divided, and the calculation formula is as follows:
Figure BDA0001971379650000051
Figure BDA0001971379650000052
wherein the content of the first and second substances,
Figure BDA0001971379650000053
and
Figure BDA0001971379650000054
respectively representing the variances of residual errors of the segmentation class CU and the non-segmentation class CU under each depth;
53 Residual error obeys of partition-class CU and non-partition-class CU by modeling residual error distribution using Gaussian distribution
Figure BDA0001971379650000055
The probability calculation formula for the current coding unit being determined as a partition-class coding unit and a non-partition-class CU is as follows:
Figure BDA0001971379650000056
Figure BDA0001971379650000057
wherein s and
Figure BDA0001971379650000058
respectively representing a partitioned CU class and a non-partitioned CU class,
Figure BDA0001971379650000059
represents the residual mean value of the ith CU at the kth frame depth d after the Inter _2 Nx 2N mode,
Figure BDA00019713796500000510
and
Figure BDA00019713796500000511
respectively indicate the probability that the current CU is judged to be a partition class CU and a non-partition class CU.
Further, the step 7) comprises the following steps:
71 If a partition-class coding unit is misjudged as a non-partition-class coding unit, the coding performance is influenced, and the influence becomes smaller as the depth and the QP increase, so that a constraint term is defined to control the partition precision, and the calculation formula is as follows:
Figure BDA00019713796500000512
wherein d represents the depth of the current CU, QP represents the coding quantization parameter of the current coding tree unit, and L is a constraint item for controlling the segmentation precision;
72 Based on the residual error obtained after the execution of the current coding unit depth Inter _2 Nx 2N mode is completed, the probability that the coding unit is determined to be divided and not divided can be obtained by the step 5) respectively
Figure BDA0001971379650000061
And
Figure BDA0001971379650000062
73 According to the calculated probability and the constraint term for controlling the segmentation precision, whether the current coding unit is segmented is finally judged, and the judgment formula is as follows:
Figure BDA0001971379650000063
wherein, CU type Indicates coding unit type, CU s And
Figure BDA0001971379650000064
respectively indicating the type of coding unit as partitioned and non-partitioned.
And 8, continuously coding the residual coding tree unit and the residual coding frames of the coding frames which perform the rapid depth division based on the residual errors until the coding of all the frames which perform the statistical residual error distribution again or the video sequence is finished.
The invention has the following beneficial effects:
(1) The invention fully utilizes the residual information after the execution of the Inter _2 Nx 2N mode, and the residual can directly reflect whether the prediction is accurate or not, so that whether the current CU is further divided or not can be determined according to the prediction residual distribution of the current CU;
(2) The residual error is correspondingly divided into two types of divided CUs and non-divided CUs according to the actual depth of the CTU, whether the CUs are divided or not is accurately determined through Gaussian distribution, and the method has high depth division accuracy;
(3) The invention utilizes a complete GOP video frame to carry out the statistics of key parameters, one GOP comprises the change of prediction residual under the condition of each QP offset, and the execution of prediction decision on subsequent frames is more reasonable.
Drawings
FIG. 1 is an overall flow chart of the present invention.
Fig. 2 is a flow chart of performing a current CU fast depth partition decision according to the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Most of the current HEVC inter-frame prediction fast algorithms are based on the time-space domain correlation of video frames, and predict the depth of a current CTU by using the co-located CTUs of a previous coded frame or the depth partition information of spatial adjacent CTUs of the current frame and the information such as rate distortion cost (RDCost), without considering the prediction condition of a current Coding Unit (CU). The method is based on the distribution of pixel residual errors after preliminary inter-frame prediction as characteristics, determines the probability that the current CU is judged to be a partition type CU and a non-partition type CU according to a Gaussian probability formula, determines whether inter-frame depth division of the CU is stopped in advance, and effectively reduces the calculation complexity of inter-frame coding while keeping the video coding quality.
As shown in fig. 1 and fig. 2, a fast HEVC inter-frame depth partitioning method based on residual distribution includes the following steps:
step 1, reading in a current coding frame under low delay (RA) or random access coding configuration, if the frame is an I frame, performing intra-frame prediction coding on all Coding Tree Units (CTUs), and turning to step 8), if the frame is not an I frame, judging whether the frame is used for counting residual frames or performing rapid depth division based on residual errors according to frame numbers, if the frame is used for counting residual frames, turning to step 2), otherwise, turning to step 6); wherein, whether the frame belongs to the frame for carrying out the statistical residual distribution is calculated according to the frame number of the current coding frame, and the calculation formula is as follows:
S=k%(frame_rate+size GOP )
Figure BDA0001971379650000071
wherein the frame is type Indicating the type of frame usage, frame s Representing frames, for statistical residual distribution f Representing frames for performing fast depth partitioning with residual, k representing the current coded frame number, frame _ rate representing the frame rate for coding the video sequence, size GOP The size of the image group in this configuration is indicated.
Step 2, performing HEVC standard Inter-frame prediction process on all coding tree units judged to be used for counting residual frames, calculating residual values by taking 4 × 4 pixel blocks of a brightness channel as a unit after performing execution of an Inter _2N × 2N mode under the three depths of 0, 1 and 2, and averaging the residual values of the 4 × 4 pixel blocks contained in the coding unit to be used as a residual mean value of the coding unit; the method specifically comprises the following steps:
21 Performing HEVC standard Inter-frame prediction process on all coding tree units in the statistical residual frame, namely sequentially performing MERGE mode, SKIP mode, inter _2 Nx 2N mode and non-square prediction unit mode division;
22 When the execution of the Inter _2N × 2N mode of the coding unit under the three depths of 0, 1, and 2 is completed, the residual pixel luminance channel is divided according to the size of a 4 × 4 pixel block, and the residual value is calculated, where the calculation formula is as follows:
Figure BDA0001971379650000081
where resi (p, q) denotes a residual pixel value at the position of the p-th row and the q-th column, W CU 、H CU Respectively representing the width and the height of the current CU, and R (x, y) represents a residual value of a 4 x 4 pixel block at the position of the x row and the y column in the coding unit;
23 Based on R (x, y), the residual mean of the current coding unit is obtained, and the calculation formula is as follows:
Figure BDA0001971379650000082
wherein H blk And W blk Representing the number of 4 x 4 pixel blocks in the height and width of the current CU, respectively, k representing the current coded frame number, d representing the current CU depth, and i representing the sequence number of the CU at depth d.
Step 3, after all coding tree units in the frame for judging and counting the residual errors are coded, classifying the coding unit residual errors obtained in the coding process into two types of segmentation and non-segmentation according to the optimal depth of a Coding Tree Unit (CTU); the method comprises the following specific steps:
31 After encoding all the coding tree units in the statistical residual frame is completed, firstly traversing the real depth of the Coding Tree Unit (CTU) by taking the coding unit sizes corresponding to the three depths of 0, 1 and 2 as a unit;
32 Dividing the mean value of the residual errors of the coding units obtained in the step 2) into a segmentation residual error and a non-segmentation residual error according to the real depth division, wherein the calculation formula is as follows:
Figure BDA0001971379650000091
wherein d is CU Represents the true depth of the CU, d represents the CU depth at which the prediction was performed,
Figure BDA0001971379650000092
represents the mean of the residuals at the depth d at which the coding unit with sequence number i is partitioned,
Figure BDA0001971379650000093
denotes the mean value of the residual errors when the coding unit with the sequence number i is not divided at the depth d, k denotes the current coding frame number, s,
Figure BDA0001971379650000094
Respectively representing a class of partitioned coding units and a class of non-partitioned coding units.
Step 4, continuously reading in the next frame of the current Group of Pictures (GOP), and returning to the step 1) until all frames in the current Group of Pictures are encoded to obtain residual statistical information;
step 5, modeling all residual statistical information determined as statistical residual frames in the current image group in the step 4) by using Gaussian distribution (the residual distribution is generally regarded as Gaussian distribution), and calculating the mean value and variance of the residuals of the segmented and non-segmented coding units according to the mean value of the residuals of the coding units at all depths to establish a Gaussian probability density function; the method comprises the following specific steps:
51 The residual errors are divided into two types of division and non-division according to different depths in the step 4), and the average value of the residual errors is calculated according to the depth and whether the residual errors are divided or not in the frame for counting the distribution of the residual errors in the period, and the calculation formula is as follows:
Figure BDA0001971379650000095
Figure BDA0001971379650000096
where i represents the zigzag sequence number of the CU at depth d, k is the current coding frame number,
Figure BDA0001971379650000097
and
Figure BDA0001971379650000098
respectively representing residual mean values of ith partitioned and non-partitioned CUs at a kth frame depth d, m representing a frame number of a first frame for statistical residual distribution in the update period,
Figure BDA0001971379650000099
and
Figure BDA00019713796500000910
respectively representing the total number of partitioned CUs and the total number of undivided CUs at the actual depth d,
Figure BDA0001971379650000101
and
Figure BDA0001971379650000102
respectively representing residual mean values of the divided CU and the non-divided CU at each depth;
52 Based on the residual mean obtained in 51), calculating the variance of all the residuals in the frame used for statistics of residual distribution in the period according to the depth and whether the residuals are divided, and the calculation formula is as follows:
Figure BDA0001971379650000103
Figure BDA0001971379650000104
wherein the content of the first and second substances,
Figure BDA0001971379650000105
and
Figure BDA0001971379650000106
respectively representing the variances of residual errors of the partition type CU and the non-partition type CU under each depth;
53 Using a gaussian distribution, the residuals of the partition-class CU and the non-partition-class CU obey
Figure BDA0001971379650000107
The probability calculation formula for the current coding unit being determined as a partition-class coding unit and a non-partition-class CU is as follows:
Figure BDA0001971379650000108
Figure BDA0001971379650000109
wherein s and
Figure BDA00019713796500001013
respectively representing a split CU class and a non-split CU class,
Figure BDA00019713796500001010
represents the residual average value of the ith CU at the kth frame depth d after the Inter _2N multiplied by 2N mode,
Figure BDA00019713796500001011
and
Figure BDA00019713796500001012
respectively indicate the probability that the current CU is judged to be a partition class CU and a non-partition class CU.
And 6, calculating residual values by taking 4 × 4 pixel blocks as a unit after the execution of the Inter _2N × 2N mode of the coding units with the depths of 0, 1 and 2 is finished for all coding tree units in the coding frame which performs the rapid depth division based on the residual, and averaging the residual values of the 4 × 4 pixel blocks contained in the coding units to be used as the residual mean value of the coding units.
Step 7, taking the residual error mean value of the current coding unit as a characteristic, calculating the probability according to a Gaussian distribution probability density function formula, and judging whether to directly terminate the division; if the division is terminated, determining the final depth of the current CU, and turning to the step 8) after the current CU is coded by using the depth; if not, adding 1 to the coding depth of the current CU, and turning to the step 6) to judge whether the next depth is terminated or not until the division is terminated or the maximum depth is reached.
71 If a partition-class coding unit is misjudged as a non-partition-class coding unit, the coding performance is influenced, and the influence becomes smaller as the depth and the QP increase, so that a constraint term is defined to control the partition precision, and the calculation formula is as follows:
Figure BDA0001971379650000111
wherein d represents the depth of the current CU, QP represents the coding quantization parameter of the current coding tree unit, and L is a constraint item for controlling the segmentation precision;
72 Based on the residual error obtained after the execution of the current coding unit depth Inter _2 Nx 2N mode is completed, the probability that the coding unit is determined to be divided and not divided can be obtained by the step 5) respectively
Figure BDA0001971379650000112
And
Figure BDA0001971379650000113
73 According to the calculated probability and the constraint term for controlling the segmentation precision, whether the current coding unit is segmented is finally judged, and the judgment formula is as follows:
Figure BDA0001971379650000114
wherein,CU type Indicates coding unit type, CU s And
Figure BDA0001971379650000115
respectively indicating the type of coding unit as partitioned and non-partitioned.
And 8, continuously coding the residual coding tree unit and the residual coding frames of the coding frames which perform the rapid depth division based on the residual errors until the coding of all the frames which perform the statistical residual error distribution again or the video sequence is completed.
According to the scheme, the fast Inter-frame CU depth division decision is carried out by fully utilizing the residual error after the Inter _2 Nx 2N mode as the characteristic, and the calculation complexity of Inter-frame prediction is effectively reduced while the video coding quality is kept.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, it is possible to make various improvements and modifications without departing from the technical principle of the present invention, and those improvements and modifications should be considered as the protection scope of the present invention.

Claims (5)

1. A HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution is characterized by comprising the following steps of:
1) Reading in a current coding frame under low-delay or random access coding configuration, if the current coding frame is an I frame, performing intra-frame prediction coding on all coding tree units, and turning to step 8), if the current coding frame is not the I frame, judging whether the frame is used for counting residual frames or performing rapid depth division based on residual according to frame numbers, if the current coding frame is used for counting the residual frames, turning to step 2), otherwise, turning to step 6);
2) Performing HEVC standard Inter-frame prediction process on all coding tree units judged to be used for counting residual frames, calculating residual values by taking 4 × 4 pixel blocks of a brightness channel as a unit after performing Inter _2N × 2N mode under the three depths of 0, 1 and 2, and averaging the residual values of the 4 × 4 pixel blocks contained in a coding unit to be used as a residual mean value of the coding unit;
3) After coding of all coding tree units in the frame for counting the residual errors is judged to be completed, the coding unit residual errors obtained in the coding process are classified into two types of segmentation and non-segmentation according to the optimal depth of the coding tree units, and the method specifically comprises the following steps: 31 After encoding all the encoding tree units in the statistical residual frame is completed, firstly traversing the real depth of the encoding tree unit according to the encoding unit sizes corresponding to the three depths of 0, 1 and 2 as a unit;
32 According to the real depth division, dividing the mean value of the residual errors of the coding units obtained in the step 2) into a segmentation residual error and a non-segmentation residual error, wherein the calculation formula is as follows:
Figure FDA0003880118070000011
wherein d is CU Represents the true depth of the CU, d represents the CU depth at which the prediction was performed,
Figure FDA0003880118070000012
represents the mean of the residuals when the coding unit with sequence number i is partitioned at depth d,
Figure FDA0003880118070000013
denotes the mean value of the residual errors when the coding unit with the sequence number i is not divided at the depth d, k denotes the current coding frame number, s,
Figure FDA0003880118070000015
Respectively representing a class of a partitioned coding unit and a class of a non-partitioned coding unit,
Figure FDA0003880118070000014
representing the residual mean value of coding units with sequence numbers i under the depth d of the kth frame, wherein i represents the zigzag sequence number of the CU under the depth d;
4) Continuously reading in the next frame of the current image group, and returning to the step 1) until all frames in the current image group are encoded to obtain residual statistical information;
5) Modeling residual statistical information of all residual frames which are judged to be statistical in the current image group in the step 4) by using Gaussian distribution, and calculating the mean value and variance of the residual of the coding units which are segmented and not segmented according to the mean value of the residual of the coding units at all depths to establish a Gaussian distribution probability density function;
6) Calculating residual values in units of 4 × 4 pixel blocks after execution of Inter _2N × 2N modes of coding units having depths of 0, 1, and 2 is completed for all coding tree units in a coding frame performing fast depth division based on the residual, and averaging the residual values of the 4 × 4 pixel blocks included in the coding units as a residual mean value of the coding units
7) Calculating the probability of the current coding unit according to a Gaussian distribution probability density function formula by taking the residual error mean value of the current coding unit as a characteristic, and judging whether to directly terminate the division;
8) And continuously coding the residual coding tree unit and the residual coding frames for the coding frames which perform the rapid depth division based on the residual until the coding of the frames which perform the statistical residual distribution again or all the frames of the video sequence is completed.
2. The method as claimed in claim 1, wherein the step 1) of determining whether the frame is used for counting residual frames or performing fast depth partition based on residuals according to frame number specifically comprises: calculating whether the frame belongs to the frame for carrying out statistical residual distribution according to the frame number of the current coding frame, wherein the calculation formula is as follows:
S=k%(frame_rate+size GOP )
Figure FDA0003880118070000021
wherein the frame is type Indicating the type of frame usage, frame s Representing frames, for statistical residual distribution f Representing frames for performing fast depth partitioning with residual, k representing the current coded frame number, frame _ rate representing the frame rate for coding the video sequence, size GOP The size of the image group in this configuration is indicated.
3. The method according to claim 1, wherein the step 2) comprises the following steps:
21 Performing HEVC standard Inter-frame prediction process on all coding tree units in the statistical residual frame, namely sequentially performing MERGE mode, SKIP mode, inter _2 Nx 2N mode and non-square prediction unit mode division;
22 When the execution of the Inter _2N × 2N mode of the coding unit under the three depths of 0, 1, and 2 is completed, the residual pixel luminance channel is divided according to the size of a 4 × 4 pixel block, and the residual value is calculated, where the calculation formula is as follows:
Figure FDA0003880118070000031
where resi (p, q) denotes a residual pixel value at the qth column position in the pth row, W CU 、H CU Respectively representing the width and the height of the current CU, and R (x, y) represents a residual value of a 4 x 4 pixel block at the position of the x row and the y column in the coding unit;
23 Based on R (x, y), the residual mean value of the current coding unit is obtained, and the calculation formula is as follows:
Figure FDA0003880118070000032
wherein H blk And W blk Representing the number of 4 x 4 pixel blocks in the height and width, respectively, of the current CU, k representing the current frame number, d representing the current CU depth, and i representing the zigzag sequence number of the CU at depth d.
4. The method of claim 1, wherein the step 5) comprises the following steps:
51 Already dividing the residual errors into two types of division and non-division according to different depths in the step 4), and calculating the average value of the residual errors according to the depths and whether the residual errors are divided in the frames for counting the distribution of the residual errors in the period, wherein the calculation formula is as follows:
Figure FDA0003880118070000041
Figure FDA0003880118070000042
where i represents the zigzag sequence number of the CU at depth d, k is the current coding frame number,
Figure FDA0003880118070000043
and
Figure FDA0003880118070000044
respectively representing residual mean values of ith partitioned and non-partitioned CU at kth frame depth d, m representing frame number of the first frame for statistical residual distribution in the period,
Figure FDA0003880118070000045
and
Figure FDA0003880118070000046
respectively representing the total number of partitioned CUs and the total number of undivided CUs at the actual depth d,
Figure FDA0003880118070000047
and
Figure FDA0003880118070000048
respectively representing the residual mean, size, of the divided and undivided CUs at each depth GOP Indicating the size of the image group in this configuration;
52 Based on the residual mean obtained in 51), calculating the variance of all the residuals in the frame used for statistics of residual distribution in the period according to the depth and whether the residuals are divided, and the calculation formula is as follows:
Figure FDA0003880118070000049
Figure FDA00038801180700000410
wherein, the first and the second end of the pipe are connected with each other,
Figure FDA00038801180700000411
and
Figure FDA00038801180700000412
respectively representing the variances of residual errors of the partition type CU and the non-partition type CU under each depth;
53 Using a gaussian distribution, the residuals of the partition-class CU and the non-partition-class CU obey
Figure FDA00038801180700000413
The probability calculation formula for the current coding unit being determined as a partition-class coding unit and a non-partition-class CU is as follows:
Figure FDA00038801180700000414
Figure FDA00038801180700000415
wherein s and
Figure FDA0003880118070000051
respectively representing a partitioned CU class and a non-partitioned CU class,
Figure FDA0003880118070000052
represents the residual mean value P of the ith CU at the kth frame depth d after the Inter _2 Nx 2N mode s d And
Figure FDA0003880118070000053
respectively indicate the probability that the current CU is judged to be a partition class CU and a non-partition class CU.
5. The method of claim 1, wherein the HEVC fast inter-frame depth partition based on residual distribution is as follows: the step 7) comprises the following steps:
71 If a partition-class coding unit is misjudged as a non-partition-class coding unit, the coding performance is influenced, and the influence becomes smaller as the depth and the QP increase, so that a constraint term is defined to control the partition precision, and the calculation formula is as follows:
Figure FDA0003880118070000054
wherein d represents the depth of the current CU, QP represents the coding quantization parameter of the current coding tree unit, and L is a constraint item for controlling the segmentation precision;
72 Based on the residual error obtained after the execution of the current coding unit depth Inter _2 Nx 2N mode is completed, the probability that the coding unit is determined to be divided and not divided is P according to the step 5) s d And
Figure FDA0003880118070000055
73 According to the calculated probability and the constraint term for controlling the segmentation precision, whether the current coding unit is segmented is finally judged, and the judgment formula is as follows:
Figure FDA0003880118070000056
therein, CU type Indicates coding unit type, CU s And
Figure FDA0003880118070000057
respectively indicating the type of coding unit as partitioned and non-partitioned.
CN201910119549.5A 2019-02-18 2019-02-18 HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution Active CN109862354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910119549.5A CN109862354B (en) 2019-02-18 2019-02-18 HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910119549.5A CN109862354B (en) 2019-02-18 2019-02-18 HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution

Publications (2)

Publication Number Publication Date
CN109862354A CN109862354A (en) 2019-06-07
CN109862354B true CN109862354B (en) 2023-02-10

Family

ID=66898104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910119549.5A Active CN109862354B (en) 2019-02-18 2019-02-18 HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution

Country Status (1)

Country Link
CN (1) CN109862354B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023233A (en) * 2014-06-24 2014-09-03 华侨大学 Fast inter-frame prediction method of HEVC (High Efficiency Video Coding)
CN104796693A (en) * 2015-04-01 2015-07-22 南京邮电大学 Rapid HEVC CU deep partition coding method
CN105430407A (en) * 2015-12-03 2016-03-23 同济大学 Fast inter-frame mode decision methods applied to transcoding from H.264 to HEVC
WO2018192235A1 (en) * 2017-04-21 2018-10-25 腾讯科技(深圳)有限公司 Coding unit depth determination method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023233A (en) * 2014-06-24 2014-09-03 华侨大学 Fast inter-frame prediction method of HEVC (High Efficiency Video Coding)
CN104796693A (en) * 2015-04-01 2015-07-22 南京邮电大学 Rapid HEVC CU deep partition coding method
CN105430407A (en) * 2015-12-03 2016-03-23 同济大学 Fast inter-frame mode decision methods applied to transcoding from H.264 to HEVC
WO2018192235A1 (en) * 2017-04-21 2018-10-25 腾讯科技(深圳)有限公司 Coding unit depth determination method and device

Also Published As

Publication number Publication date
CN109862354A (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN111147867B (en) Multifunctional video coding CU partition rapid decision-making method and storage medium
CN101969561B (en) A kind of intra-frame mode selection method, device and a kind of encoder
CN101309421B (en) Intra-frame prediction mode selection method
CN108174208B (en) Efficient video coding method based on feature classification
CN104601992B (en) SKIP mode quick selecting methods based on Bayesian Smallest Risk decision
CN101877792A (en) Intra mode prediction method and device and coder
CN108989799B (en) Method and device for selecting reference frame of coding unit and electronic equipment
CN103596003B (en) Interframe predication quick mode selecting method for high-performance video coding
CN111246219A (en) Quick dividing method for depth of CU (Central Unit) in VVC (variable valve timing) frame
CN116506608A (en) Chroma intra prediction method and device, and computer storage medium
CN110139101B (en) Frame-level bit distribution method based on lambda domain code rate control
CN115941943A (en) HEVC video coding method
CN102196253B (en) Video coding method and device based on frame type self-adaption selection
CN108881905B (en) Probability-based intra-frame encoder optimization method
CN109862354B (en) HEVC (high efficiency video coding) rapid inter-frame depth division method based on residual distribution
CN1457196A (en) Video encoding method based on prediction time and space domain conerent movement vectors
CN111372079B (en) VVC inter-frame CU deep rapid dividing method
CN114143536B (en) Video coding method of SHVC (scalable video coding) spatial scalable frame
CN111107359A (en) Intra-frame prediction coding unit dividing method suitable for HEVC standard
CN116320436A (en) Decision tree-based VVC (variable valve timing) quick coding method
CN114143537B (en) All-zero block prediction method based on possibility size
CN105208382A (en) Sampling point self-adaptation compensation mode judging method and device
CN112351279B (en) HEVC (high efficiency video coding) -oriented adaptive complexity adjustment system and method
CN114666592A (en) CU block division method, device and medium based on AVS3 encoding history information
CN110035285B (en) Depth prediction method based on motion vector sensitivity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant