CN113055670B - HEVC/H.265-based video coding method and system - Google Patents

HEVC/H.265-based video coding method and system Download PDF

Info

Publication number
CN113055670B
CN113055670B CN202110251124.7A CN202110251124A CN113055670B CN 113055670 B CN113055670 B CN 113055670B CN 202110251124 A CN202110251124 A CN 202110251124A CN 113055670 B CN113055670 B CN 113055670B
Authority
CN
China
Prior art keywords
frame
inter
model
less
depth
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
CN202110251124.7A
Other languages
Chinese (zh)
Other versions
CN113055670A (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.)
Zhejiang Yuhan Technology Co ltd
Original Assignee
Zhejiang Yuhan Technology Co ltd
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 Zhejiang Yuhan Technology Co ltd filed Critical Zhejiang Yuhan Technology Co ltd
Priority to CN202110251124.7A priority Critical patent/CN113055670B/en
Publication of CN113055670A publication Critical patent/CN113055670A/en
Application granted granted Critical
Publication of CN113055670B publication Critical patent/CN113055670B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/567Motion estimation based on rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

The invention discloses a video coding method and a video coding system based on HEVC/H.265, comprising the following steps: acquiring video image data and establishing a virtual background frame; for the CU with the i-th frame depth of l, calculating the inter-frame difference BD of the CU module at the same position as the adjacent frame l Background difference BD of CU module at the same position as virtual background frame l The method comprises the steps of carrying out a first treatment on the surface of the For a CU with an i-th frame depth of l, the BD of 4 sub-block CUs divided by the CU is calculated l+1 、BD l+1 The method comprises the steps of carrying out a first treatment on the surface of the Based on the division depth l and BD l 、BD l Selecting an optimal inter-frame prediction model; BD based on calculation l 、BD l 、BD l+1 、BD l+1 CU partition continuation/termination determination is made. The method and the device can effectively reduce the computation complexity caused by the inter-frame division and the inter-frame coding complexity caused by the calculation selection of the traversal computation rate distortion.

Description

HEVC/H.265-based video coding method and system
Technical Field
The invention relates to the technical field of video coding, in particular to a method and a system for video coding based on HEVC/H.265.
Background
The video file is made up of successive image frames, each frame being a still image. Due to the persistence of vision effect of the human eye, a continuous video presentation is seen when a sequence of image frames is played at a certain rate. Because of the extremely high similarity between adjacent frames, in order to facilitate storage and transmission, the original video needs to be encoded and compressed to remove redundancy in spatial and temporal dimensions. The image video coding compression technology is a precondition that a computer carries out video processing, the data bandwidth after the video signal is digitized is very high, and is usually more than 20 Mbps; the video coding technique is typically used to reduce the data bandwidth to 1-10Mbps, so that the video signal can be stored in a computer and processed accordingly.
As shown in fig. 1, the video coding process is mainly divided into four steps of prediction, transformation, quantization, and entropy coding, wherein the prediction is mainly divided into intra-frame prediction and inter-frame prediction.
The intra-frame prediction of video coding refers to that the correlation of the video space domain is utilized, and the current pixel block is predicted by using the pixel block coded by the current image, so as to achieve the purpose of removing the video space domain redundancy.
Inter prediction is used to reduce temporal redundancy by performing predictive coding using correlation between adjacent frames, i.e., the current picture to be coded uses other coded and reconstructed pictures as reference frames, and the current block to be coded searches for similar blocks in the reference frames as predictors. When the current Block to be coded is predicted, the current Block to be coded may be divided into smaller Prediction Blocks (PB), and the Prediction blocks are used as basic units to search the most matched Prediction values, so that the size between the Prediction values and the actual values of the current Block to be coded is reduced as much as possible, the number of coding bits is reduced, and the compression rate is improved.
In order to meet the compression of high-definition video, the MPEG and ISO/IEC video coding expert groups establish a video coding cooperation group, and a new generation of high-performance video coding standard HEVC/H.265 is formulated. The goal of doubling the H.265 coding efficiency compared to the previous H.264/AVC standard has been essentially achieved.
However, due to the use of the quadtree structure and larger Coding Units (CUs) in the coding structure, the computational complexity of the encoder is significantly increased, and the coding time is difficult to meet the real-time requirement. In order to improve compression efficiency, the h.265 encoder has a more flexible block division; as shown in fig. 2, in h.265, each frame image is first sequentially divided into LCUs (largest coding units) of 64×64 size in order, coding depths range from 0 to 3 from the LCUs, and each CU (coding unit) can be recursively divided into CUs of 4 depths (64×64, 32×32, 16×16,8×8) to constitute a quadtree coding structure.
In the process of h.265 inter coding, a CU at each coding depth has its corresponding PU (prediction unit) partition mode for motion estimation and motion compensation. As shown in fig. 3, for a CU at a certain depth l, the inter prediction modes include SKIP, merge, rectangular motion partition (Square, inter2n×2n, inter n×2n), symmetric motion partition (SMP, inter2n× N, interN ×2n), asymmetric motion partition (AMP, inter2n×nu, inter2n×nd, inter nl×2n, inter nr×2n), and intra modes (intra 2n×2n, intra n×n).
At the same perceived quality, the bitrate of HEVC/H.265 is reduced by 50% compared with that of H.264, but the coding complexity is also increased. The HEVC video coding standard adopts a more flexible coding structure, and a series of new technologies are newly added. In the new technologies, links such as recursive quadtree partitioning, prediction mode rate distortion cost minimization selection and the like greatly promote the computational complexity of an encoder, and seriously prevent popularization and application of HEVC/H.265 video coding standards; wherein:
1. in the inter-frame coding process, the H.265 adopts a quadtree division structure to improve the coding performance, the size of a Coding Unit (CU) is changed from 16×16 of the H.264 to 8×8 to 64×64, and the complexity of the whole inter-frame coding process is increased; meanwhile, in the CU partitioning process, in order to determine the quadtree structure of the CU, the depth l needs to be completely traversed from 0 to 3, and 4 is calculated in total 0 +4 1 +4 2 +4 3 =85 recursive divisions, the computation is complex.
2. In the process of inter-frame prediction, H.265 traverses all inter-frame prediction modes according to a flow, selects a prediction mode with the minimum coding cost as an optimal prediction mode, and obtains the optimal symmetrical prediction mode before the asymmetric mode prediction, wherein the traversing sequence of inter-frame prediction dividing modes is a symmetrical mode first and an asymmetrical mode second. I.e. according to SKIP, merge, 2n×2N, N × N, N ×2n, 2n×n, 2n×nu, 2n×nd, nl×2N, nR ×2n. Therefore, the minimum number of times of the inter-frame prediction mode is 1+4+16+256×6=1662, and the maximum number of times of the inter-frame prediction mode is 1+4+16+256×8=2216, so that the calculation complexity of the inter-frame prediction mode selection in the whole video coding process is extremely high.
In summary, the inter-frame prediction process of HEVC introduces a lot of computational complexity, and how to effectively reduce the computation load of the encoder is a problem to be solved at present.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a method and a system for video coding based on HEVC/H.265.
The invention discloses a video coding method based on HEVC/H.265, which comprises the following steps:
acquiring video image data and establishing a virtual background frame;
for the CU with the i-th frame depth of l, calculating the inter-frame difference BD of the CU module at the same position as the adjacent frame l Background difference BD of CU module at the same position as virtual background frame l ’;
For a CU with an i-th frame depth of l, the BD of 4 sub-block CUs divided by the CU is calculated l+1 、BD l+1 ’;
If BD is l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l ' if the current depth l is the optimal depth, carrying out subsequent inter-frame prediction;
in the inter prediction process:
if l=0 and BD l 、BD l If the'.ltoreq.T3, selecting the SKIP model as an optimal inter-frame prediction model;
if l=0 and T3 < BD l 、BD l ' T4 or l=1 and BD l 、BD l ' T4 is less than or equal to; traversing the 2N multiplied by 2N inter-frame prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model;
if BD is l 、BD l ' is not less than T5, traversing the inter-frame prediction models except the AMP prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model; wherein T3 is less than T4 and less than T5.
As a further improvement of the present invention, the method for establishing a virtual background frame includes:
taking the previous H frame of the original video as a sample, carrying out data statistics on each pixel point of each frame, wherein the value interval of the pixel points is 0-255;
and selecting the median of the pixel values of the pixel points at the positions of each frame as the pixel value of the virtual background frame, thereby establishing the virtual background frame.
As a further improvement of the present invention,
the inter-frame difference BD l The calculation formula of (2) is as follows:
the inter-frame difference BD l The' calculation formula is:
wherein f i (x, y) represents the pixel value of (x, y) in the coordinate of the CU in the ith frame in the sequence video, f i-1 (x, y) represents the pixel value of (x, y) at the co-located CU coordinate in the immediately preceding frame, f B (x, y) represents the pixel value of (x, y) in the co-located CU in the background frame, N is the side length of the CU block, M d Is a coding index, M d =2 l ,l∈[0,3]。
As a further improvement of the present invention, there is also included:
if not meeting BD l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l And under the' condition, continuing to divide until the division depth reaches l=3, and ending.
As a further improvement of the invention, the values of T1 and T2 are 8-15 percent.
As a further improvement of the present invention, there is also included:
if l=0 and BD l 、BD l ' is less than or equal to T3, l=0 and T3 is less than BD l 、BD l ' is less than or equal to T4, l=1 and BD l 、BD l ’≤T4,BD l 、BD l And if the condition that'. Gtoreq.T5 is not satisfied, traversing all the inter-frame prediction models, and selecting the model with the minimum rate-distortion cost as the optimal inter-frame prediction model.
As a further improvement of the invention, the value of T3 is 1% -3%, the value of T4 is 5% -15%, and the value of T5 is more than 30%.
The invention also discloses a video coding system based on HEVC/H.265, comprising:
the creation module is used for acquiring video image data and creating a virtual background frame;
a calculating module for calculating the inter-frame difference BD of the ith frame depth of the CU with the l depth and the adjacent frame co-located CU module l Background difference BD of CU module at the same position as virtual background frame l ' BD of 4 sub-Block CUs divided by the CU l+1 、BD l+1 ’;
The division judging module is used for:
when BD (BD) l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l When' the current depth l is taken as the optimal depth, the subsequent inter-frame prediction is carried out;
when BD is not satisfied l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l Continuing dividing until the dividing depth reaches l=3 under the' condition, and ending;
an inter-frame prediction judging module, configured to:
when l=0 and BD l 、BD l When the' -T3 is less than or equal to, selecting the SKIP model as an optimal inter-frame prediction model;
when l=0 and T3 < BD l 、BD l When T4 is'.ltoreq.T4, or l=1 and BD l 、BD l When the' -T4 is not more than the threshold, traversing the 2N multiplied by 2N inter-frame prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model;
when BD (BD) l 、BD l When' > T5 is not less than, traversing the inter-frame prediction models except the AMP prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model; wherein T3 is more than T4 and less than T5;
when l=0 and BD l 、BD l ' is less than or equal to T3, l=0 and T3 is less than BD l 、BD l ' is less than or equal to T4, l=1 and BD l 、BD l ’≤T4,BD l 、BD l And traversing all the inter-frame prediction models when the condition that'. Is not more than or equal to T5 is not satisfied, and selecting the model with the minimum rate-distortion cost as the optimal inter-frame prediction model.
As a further development of the invention, in the calculation module,
the inter-frame difference BD l The calculation formula of (2) is as follows:
the inter-frame difference BD l The' calculation formula is:
wherein f i (x, y) represents the pixel value of (x, y) in the coordinate of the CU in the ith frame in the sequence video, f i-1 (x, y) represents the pixel value of (x, y) at the co-located CU coordinate in the immediately preceding frame, f B (x, y) represents the pixel value of (x, y) in the co-located CU in the background frame, N is the side length of the CU block, M d Is a coding index, M d =2 l ,l∈[0,3]。
As a further improvement of the invention, the values of T1 and T2 are 8-15%, the value of T3 is 1-3%, the value of T4 is 5-15%, and the value of T5 is more than 30%.
Compared with the prior art, the invention has the beneficial effects that:
in order to reduce the calculated amount of the division between frames, the invention utilizes the specificity of the monitoring video to determine whether the CU continues to be divided by calculating the difference between the coding frame and the adjacent frame and background frame thereof, thereby determining the coding depth value l of the CU and reducing the complexity of the quadtree division;
in order to reduce a large amount of calculation amount generated by traversing circulation in the process of selecting a prediction mode, the method combines the difference values of the coded frame, the adjacent frames and the background frames under the current depth, reasonably distributes the motion area of the coded frame, skips unnecessary inter-frame prediction models, further selects an optimal inter-frame prediction model through rate distortion calculation, and reduces the calculation amount caused by traversing all the model rate distortion cost calculation.
Drawings
FIG. 1 is a flow chart of a prior art video encoding;
FIG. 2 is a block diagram of an inter-frame partition quadtree;
FIG. 3 is a PU inter prediction model;
fig. 4 is a flow chart of a method of HEVC/h.265 based video coding as disclosed in one embodiment of the present invention;
fig. 5 is a block diagram of a system for HEVC/h.265 based video coding in accordance with one embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention is described in further detail below with reference to the attached drawing figures:
in order to improve the coding performance of the encoder and better support high-resolution video coding, the HEVC video coding standard adopts a more flexible coding structure, and a series of new technologies are newly added. In the new technologies, links such as recursive quadtree partitioning, prediction mode rate distortion cost minimization selection and the like greatly promote the computational complexity of an encoder, and seriously prevent popularization and application of HEVC video coding standards. In the four-way tree division link, in order to improve the video coding compression effect, the minimum size of a coding unit is further subdivided into 8×8 from 16×16 of the original H.264, and the whole inter-frame coding complexity is increased. In addition, the motion estimation and transformation unit is required to traverse sub-loops in the optimal inter-frame prediction mode selection process, the process traverses the transformation unit for each search point and calculates rate distortion cost when searching for motion vectors, a mode with the minimum rate distortion cost is selected as an optimal prediction model, and the computation amount of the inter-frame coding process is greatly improved in the traversing loop computation process. Therefore, further optimization of the inter-quadtree partitioning process and inter-prediction model selection by algorithms becomes key to reducing video coding complexity.
In order to reduce the calculation amount of the inter-frame division, the invention utilizes the specificity of the monitoring video (the motion characteristic of the adjacent frames of the video image and the difference between the adjacent frames and the background frames in background modeling) to determine whether the CU continues to divide or not by calculating the difference between the coding frame and the adjacent frames and the background frames, thereby determining the coding depth value l, l E [0,3] of the CU and reducing the four-way tree division complexity.
In order to reduce a large amount of calculation amount generated by traversing circulation in the process of selecting a prediction mode, the method combines the difference values of the coded frame, the adjacent frames and the background frames under the current depth, reasonably distributes the motion area of the coded frame, skips unnecessary inter-frame prediction models, further selects an optimal inter-frame prediction model through rate distortion calculation, and reduces the calculation amount caused by traversing all the model rate distortion cost calculation.
Specific:
as shown in fig. 4, the present invention provides a method for video coding based on HEVC/h.265, comprising:
step 1, obtaining video image data and establishing a virtual background frame;
specific:
the monitoring video image data has specificity: the background is relatively fixed, the scene change is small, the motion content is relatively little, and the like; the invention establishes the virtual background frame by utilizing the specificity of the virtual background frame; the method for establishing the virtual background frame specifically comprises the following steps: taking the previous H frame of the original video as a sample, carrying out data statistics on each pixel point of each frame, wherein the value interval of the pixel points is 0-255; and selecting the median of the pixel values of the pixel points at the positions of each frame as the pixel value of the virtual background frame, thereby establishing the virtual background frame.
Step 2, the initial CU partition depth l=0, and for the CU with the i-th frame depth l, the inter-frame difference BD between the CU and the adjacent frame position CU module is calculated l Background difference BD of CU module at the same position as virtual background frame l ’;
Specific:
inter-frame difference BD l The calculation formula of (2) is as follows:
inter-frame difference BD l The' calculation formula is:
wherein f i (x, y) represents the pixel value of (x, y) in the coordinate of the CU in the ith frame in the sequence video, f i-1 (x, y) represents the pixel value of (x, y) at the co-located CU coordinate in the immediately preceding frame, f B (x, y) represents the pixel value of (x, y) in the co-located CU in the background frame, N is the side length of the CU block, M d Is a coding index, is related to the coding depth l, M d =2 l ,l∈[0,3];BD l 、BD l ' reflects the gap between the data values in the residual, BD l 、BD l The smaller the' value, the smaller the CU motion and texture variation representing the position between adjacent frames; in general, BD is the lower the degree of difference from the background frame and from neighboring frames l 、BD l The smaller the' value, the more uniform the representative residual distribution, and the less likely it is to continue partitioning down.
Step 3, for the CU with the i-th frame depth of l, calculating BD of 4 sub-block CUs divided by the CU l+1 、BD l+1 ’;
Specific:
BD l+1 、BD l+1 ' the calculation formula is identical to BD l 、BD l 'consistent'.
Step 4,BD based on calculation l 、BD l ’、BD l+1 、BD l+1 ' make CU partition continuation/termination determination; the method specifically comprises the following steps:
if BD is l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l If the partition is ended, the current depth l is the optimal depth, and the current CU is adopted to continuously conduct inter-frame prediction and inter-frame coding rhythm downwards;
if not meeting BD l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l If' condition, continuing dividing until the dividing depth reaches l=3, and ending; that is, if the above condition is not satisfied, it is further determined whether l=3 is satisfied, and if satisfied, the division depth reaches l=3, and the process is terminated; if not, dividing the depth l+1, and continuing the judgment;
furthermore, the values of T1 and T2 are 8-15%, and the values can be adjusted according to different video conditions and QP values.
After the inter-frame division model of the CU is determined, all models of inter-frame prediction need to be traversed, and 11 PU modes corresponding to each CU exist, if the traversing range of the PU modes corresponding to the current CU can be reduced, the selection process of the inter-frame modes can be accelerated; to this end, the invention continues on the basis of step 4 with:
step 5, based on the division depth l and BD l 、BD l ' selection of an optimal inter prediction model, specifically, includes:
if l=0 and BD l 、BD l ' is less than or equal to T3, which indicates that the difference between the current LCU and the background frame as well as the adjacent frames is basically consistent, and the current LCU can directly jump out to continue dividing, and then the SKIP model is selected as the optimal inter-frame prediction model;
if l=0 and T3 < BD l 、BD l ' T4 or l=1 and BD l 、BD l ' T4 is less than or equal to; the integral motion of the video frame is relatively gentle; traversing the 2N x 2N inter-prediction model (SKIP, merge, inter2N x 2N, intra 2N x 2N) and selecting the model with the minimum rate-distortion cost as the optimal inter-prediction model;
if BD is l 、BD l ' is not less than T5, which indicates that the motion of the whole video is relatively complex, traversing the rest inter-frame prediction models except the AMP prediction model, and selecting the model with the minimum rate-distortion cost as the optimal inter-frame prediction model;
if l=0 and BD l 、BD l ' is less than or equal to T3, l=0 and T3 is less than BD l 、BD l ' is less than or equal to T4, l=1 and BD l 、BD l ’≤T4,BD l 、BD l If the condition that'. Gtoreq.T5 is not satisfied, traversing all inter-frame prediction models, and selecting the model with the minimum rate-distortion cost as an optimal inter-frame prediction model;
further, T3 is less than T4 and less than T5, the value of T3 is 1% -3%, the value of T4 is 5% -15%, and the value of T5 is more than 30%.
As shown in fig. 5, the present invention provides a system for HEVC/h.265-based video coding, comprising:
the creation module is used for realizing the step 1;
the calculation module is used for realizing the steps 2 and 3;
the division judging module is used for realizing the step 4;
and an inter-frame prediction judging module for implementing the step 5.
The invention has the advantages that:
the invention utilizes the characteristic that the background scene of the video of the monitoring video is relatively fixed, and calculates the inter-frame difference BD of the current CU and the 4 sub CU modules l And background frame difference value BD l ' determine the trend of the partitioning down instead of the traditional traversal loop. The algorithm can effectively reduce the computational complexity caused by the inter-frame division.
The invention obtains the inter-frame difference degree under different depths and the inter-frame prediction model proportion under the background difference degree value through a large amount of data speculation to infer the inter-frame prediction model, skips over some unnecessary inter-frame prediction models, reduces the calculated amount caused by traversing calculation rate distortion calculation selection, and reduces the inter-frame coding complexity. Examples:
the experimental environment adopted in the test is Windows Server 2008R2, the processor is Intel E5-2620 CPU@2.1GHz, the single processor is 8 cores, and the RAM is 32GB.
By comparing three types of video highway traffic monitoring videos, cell monitoring videos and office monitoring videos as experimental contents, comparing video compression software Hnew after designing an algorithm with HM12.0 in an H.265 sequence, and comparing the algorithm performance with a PSNR (peak signal to noise ratio, a parameter for objectively evaluating video coding quality) and a time variation ratio delta T (delta T= (T) HM -T new) /T HM X 100%) of the two parameters were compared.
The new algorithm sets the relevant parameters as t1=12%, t2=12%, t3=2%, t4=5% and t5=30% respectively, and performs calculation comparison. The results are shown in Table 1:
TABLE 1
As can be seen from table 1, in the case that the video quality is almost unchanged (PSNR is reduced by only 0.06dB on average), the video coding time is greatly saved (average Δt=30.5%), which indicates that the algorithm codes the monitoring video under the conditions of improving the CU partition rate and selecting the PU prediction model, and can reduce the video coding time consumption under the condition of effectively ensuring the coding quality.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method of HEVC/h.265-based video coding, comprising:
acquiring video image data and establishing a virtual background frame; the method for establishing the virtual background frame comprises the following steps: taking the previous H frame of the original video as a sample, carrying out data statistics on each pixel point of each frame, wherein the value interval of the pixel points is 0-255; selecting the median of the pixel values of the pixel points at the positions of each frame as the pixel value of the virtual background frame, thereby establishing the virtual background frame;
for the CU with the i-th frame depth of l, calculating the inter-frame difference BD of the CU module at the same position as the adjacent frame l Background difference BD of CU module at the same position as virtual background frame l ’;
For a CU with an i-th frame depth of l, the BD of 4 sub-block CUs divided by the CU is calculated l+1 、BD l+1 ’;
If BD is l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l ' if the current depth l is the optimal depth, carrying out subsequent inter-frame prediction;
in the inter prediction process:
if l=0 and BD l And BD (BD) l If the'.ltoreq.T3, selecting the SKIP model as an optimal inter-frame prediction model;
if l=0 and T3 < BD l And BD (BD) l ' T4 or l=1 and BD l And BD (BD) l ' T4 is less than or equal to; traversing the 2N multiplied by 2N inter-frame prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model;
if BD is l And BD (BD) l ' is not less than T5, traversing the inter-frame prediction models except the AMP prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model; wherein T3 is less than T4 and less than T5.
2. The method of claim 1, wherein,
the inter-frame difference BD l The calculation formula of (2) is as follows:
the inter-frame difference BD l The' calculation formula is:
wherein f i (x, y) represents the pixel value of (x, y) in the coordinate in the CU of the ith frame in the sequence video, f i-1 (x, y) represents the pixel value of (x, y) at the co-located CU coordinate in the immediately preceding frame, f B (x, y) represents the pixel value of (x, y) in the co-located CU in the background frame, N is the side length of the CU block, M d Is a coding index, M d =2 l ,l∈[0,3]。
3. The method as recited in claim 1, further comprising:
if not meeting BD l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l And under the' condition, continuing to divide until the division depth reaches l=3, and ending.
4. A method according to claim 1 or 3, wherein T1, T2 has a value of 8% to 15%.
5. The method as recited in claim 1, further comprising:
if l=0 and BD l And BD (BD) l ' is less than or equal to T3, l=0 and T3 is less than BD l And BD (BD) l ' is less than or equal to T4, l=1 and BD l And BD (BD) l ’≤T4,BD l And BD (BD) l And if the condition that'. Gtoreq.T5 is not satisfied, traversing all the inter-frame prediction models, and selecting the model with the minimum rate-distortion cost as the optimal inter-frame prediction model.
6. The method of claim 1 or 5, wherein T3 has a value of 1% to 3%, T4 has a value of 5% to 15%, and T5 has a value of 30% or more.
7. A system for HEVC/h.265-based video coding, comprising:
the creation module is used for acquiring video image data and creating a virtual background frame; the method for establishing the virtual background frame comprises the following steps: taking the previous H frame of the original video as a sample, carrying out data statistics on each pixel point of each frame, wherein the value interval of the pixel points is 0-255; selecting the median of the pixel values of the pixel points at the positions of each frame as the pixel value of the virtual background frame, thereby establishing the virtual background frame;
a calculating module for calculating the inter-frame difference BD of the ith frame depth of the CU with the l depth and the adjacent frame co-located CU module l Background difference BD of CU module at the same position as virtual background frame l ' BD of 4 sub-Block CUs divided by the CU l+1 、BD l+1 ’;
The division judging module is used for:
when BD (BD) l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l When' the current depth l is taken as the optimal depth, the subsequent inter-frame prediction is carried out;
when BD is not satisfied l ≤T1、BD l ' T2 and BD l+1 ≤BD l 、BD l+1 ’≤BD l Continuing dividing until the dividing depth reaches l=3 under the' condition, and ending;
an inter-frame prediction judging module, configured to:
when l=0 and BD l And BD (BD) l When the' -T3 is less than or equal to, selecting the SKIP model as an optimal inter-frame prediction model;
when l=0 and T3 < BD l And BD (BD) l When T4 is'.ltoreq.T4, or l=1 and BD l And BD (BD) l When the' -T4 is not more than the threshold, traversing the 2N multiplied by 2N inter-frame prediction model, and selecting the model with the minimum rate distortion cost as the optimal inter-frame prediction model;
when BD (BD) l And BD (BD) l When' > T5 is not less than, traversing inter-frame prediction models except the AMP prediction model, and selecting a model with the minimum rate-distortion cost as the optimal inter-frame pre-prediction modelMeasuring a model; wherein T3 is more than T4 and less than T5;
when l=0 and BD l And BD (BD) l ' is less than or equal to T3, l=0 and T3 is less than BD l And BD (BD) l ' is less than or equal to T4, l=1 and BD l And BD (BD) l ’≤T4,BD l And BD (BD) l And traversing all the inter-frame prediction models when the condition that'. Is not more than or equal to T5 is not satisfied, and selecting the model with the minimum rate-distortion cost as the optimal inter-frame prediction model.
8. The system of claim 7, wherein, in the computing module,
the inter-frame difference BD l The calculation formula of (2) is as follows:
the inter-frame difference BD l The' calculation formula is:
wherein f i (x, y) represents the pixel value of (x, y) in the coordinate in the CU of the ith frame in the sequence video, f i-1 (x, y) represents the pixel value of (x, y) at the co-located CU coordinate in the immediately preceding frame, f B (x, y) represents the pixel value of (x, y) in the co-located CU in the background frame, N is the side length of the CU block, M d Is a coding index, M d =2 l ,l∈[0,3]。
9. The system of claim 7, wherein T1 and T2 have values of 8% to 15%, T3 has a value of 1% to 3%, T4 has a value of 5% to 15%, and T5 has a value of 30% or more.
CN202110251124.7A 2021-03-08 2021-03-08 HEVC/H.265-based video coding method and system Active CN113055670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110251124.7A CN113055670B (en) 2021-03-08 2021-03-08 HEVC/H.265-based video coding method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110251124.7A CN113055670B (en) 2021-03-08 2021-03-08 HEVC/H.265-based video coding method and system

Publications (2)

Publication Number Publication Date
CN113055670A CN113055670A (en) 2021-06-29
CN113055670B true CN113055670B (en) 2024-03-19

Family

ID=76510256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110251124.7A Active CN113055670B (en) 2021-03-08 2021-03-08 HEVC/H.265-based video coding method and system

Country Status (1)

Country Link
CN (1) CN113055670B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277447A (en) * 2008-04-15 2008-10-01 北京航空航天大学 Method for rapidly predicting frame space of aerophotographic traffic video
CN105847793A (en) * 2015-01-16 2016-08-10 杭州海康威视数字技术股份有限公司 Video coding method and device and video decoding method and device
CN110992288A (en) * 2019-12-06 2020-04-10 武汉科技大学 Video image blind denoising method used in mine shaft environment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6061150B2 (en) * 2011-03-18 2017-01-18 ソニー株式会社 Image processing apparatus, image processing method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277447A (en) * 2008-04-15 2008-10-01 北京航空航天大学 Method for rapidly predicting frame space of aerophotographic traffic video
CN105847793A (en) * 2015-01-16 2016-08-10 杭州海康威视数字技术股份有限公司 Video coding method and device and video decoding method and device
CN110992288A (en) * 2019-12-06 2020-04-10 武汉科技大学 Video image blind denoising method used in mine shaft environment

Also Published As

Publication number Publication date
CN113055670A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
CN109688414B (en) VVC intra-frame coding unit candidate prediction mode reduction and block division early termination method
JP5054826B2 (en) Coding mode determination method and apparatus using spatio-temporal complexity
KR102323427B1 (en) Method and Apparatus for image encoding
CN108989802B (en) HEVC video stream quality estimation method and system by utilizing inter-frame relation
KR19990067723A (en) Dynamically determining group of picture size during encoding of video sequence
JP2004514351A (en) Video coding method using block matching processing
US7881374B2 (en) Method and apparatus for 3-D subband video coding
KR100305485B1 (en) Video encoding method, system and computer program product for optimizing center of picture quality
JP4417054B2 (en) Motion estimation method and apparatus referring to discrete cosine transform coefficient
KR20030086076A (en) Filtering method for removing block artifacts and/or ringing noise and apparatus therefor
CN110351552B (en) Fast coding method in video coding
Chun et al. An adaptive perceptual quantization algorithm for video coding
KR20050043511A (en) Method for encording moving picture using fast motion estimation algorithm, and apparatus for the same
CN109889838B (en) HEVC (high efficiency video coding) rapid coding method based on ROI (region of interest)
CN113163199B (en) H265-based video rapid prediction method, rapid coding method and system
CN113055670B (en) HEVC/H.265-based video coding method and system
Wang et al. Overview of the second generation avs video coding standard (avs2)
Ma et al. A fast background model based surveillance video coding in HEVC
JP5598199B2 (en) Video encoding device
CN114827616A (en) Compressed video quality enhancement method based on space-time information balance
CN111246218B (en) CU segmentation prediction and mode decision texture coding method based on JND model
KR100584422B1 (en) Method and device for compressing image data
An et al. Low-complexity motion estimation for H. 264/AVC through perceptual video coding.
CN100469141C (en) Motion estimating method for video data compression
JP2614661B2 (en) High efficiency image coding device

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
CB02 Change of applicant information

Guo jiahuodiqu after: Zhong Guo

Address after: Room 201, 2nd Floor, Building 1, No. 3 Liansheng Road, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 310023

Applicant after: Zhejiang Yuhan Technology Co.,Ltd.

Address before: 310000 room 1312, block B, building 3, Chuangxin Times Square, Yuhang District, Hangzhou City, Zhejiang Province

Applicant before: Hangzhou Yuhan Technology Co.,Ltd.

Guo jiahuodiqu before: Zhong Guo

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant