CN109561303B - Prediction method based on video compression - Google Patents

Prediction method based on video compression Download PDF

Info

Publication number
CN109561303B
CN109561303B CN201811260616.7A CN201811260616A CN109561303B CN 109561303 B CN109561303 B CN 109561303B CN 201811260616 A CN201811260616 A CN 201811260616A CN 109561303 B CN109561303 B CN 109561303B
Authority
CN
China
Prior art keywords
predicted
value
pixel
sub
pixel component
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
CN201811260616.7A
Other languages
Chinese (zh)
Other versions
CN109561303A (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.)
GUANGDONG HONGSHI DIGITAL MEDIA Co.,Ltd.
Original Assignee
Guangdong Hongshi Digital Media 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 Guangdong Hongshi Digital Media Co ltd filed Critical Guangdong Hongshi Digital Media Co ltd
Priority to CN201811260616.7A priority Critical patent/CN109561303B/en
Publication of CN109561303A publication Critical patent/CN109561303A/en
Application granted granted Critical
Publication of CN109561303B publication Critical patent/CN109561303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/103Selection of coding mode or of prediction mode
    • 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/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/182Methods 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 a pixel
    • 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/184Methods 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 bits, e.g. of the compressed video stream
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to a prediction method based on video compression, which comprises the following steps: acquiring a first standard deviation and a second standard deviation of an MB to be predicted; acquiring a first residual absolute value sum of the MB to be predicted by utilizing a first prediction residual of the MB to be predicted; acquiring a second residual absolute value sum of the MB to be predicted by using a second prediction residual of the MB to be predicted; acquiring a first residual subjective sum according to the first standard deviation and the first residual absolute value sum; acquiring a second residual subjective sum according to the second standard deviation and the second residual absolute value; and determining a final prediction method of the MB to be predicted according to the first residual subjective sum and the second residual subjective sum. The invention selects a plurality of prediction methods for the image to be compressed, and the image to be compressed selects one prediction method for prediction according to the correlation self-adaptability of the texture, so that the image to be compressed can be predicted by selecting the prediction method in a pertinence manner, and the quality of video compression is greatly improved.

Description

Prediction method based on video compression
Technical Field
The invention relates to the technical field of video compression, in particular to a prediction method based on video compression.
Background
Video processing technology is being developed with the video being converted from analog to digital. With the increasingly strict requirements of people on definition, fluency and real-time degree of video images, the method becomes a good technique. Meanwhile, the development of video processing technology is also promoted due to the prosperity of the current peripheral industries such as the Internet, display equipment and the like. The video processing technology can be subdivided into branch subjects such as an image enhancement technology, a video compression and decompression technology, a digital video broadcasting technology and the like, and is applied to various industries such as communication, home and personal entertainment, security, medical treatment, military and the like. Among them, video compression techniques are especially appreciated by professionals.
Heretofore, there are many standards for image compression, including still JPEG, JPEG2000, moving M-JPEG, MPEG1, MPEG2, MPEG4, H.261, H.263, WMV-HD, VC1, etc., and recently popular H.264, and AVS of domestic proprietary intellectual property, etc. From the h.264 standard, intra directional predictive coding is the dominant technique for video intra block coding.
However, when the texture of the image to be compressed in the video is complex, the existing prediction method is limited by limited information, and the correlation between textures cannot be fully utilized to effectively predict the image to be compressed, thereby affecting the quality of video compression.
Disclosure of Invention
Therefore, in order to solve the technical defects and shortcomings of the prior art, the invention provides a prediction method based on video compression.
Specifically, an embodiment of the present invention provides a prediction method based on video compression, including:
acquiring a first standard deviation and a second standard deviation of an MB to be predicted;
acquiring a first residual absolute value sum of the MB to be predicted by utilizing a first prediction residual of the MB to be predicted;
acquiring a second residual absolute value sum of the MB to be predicted by using a second prediction residual of the MB to be predicted;
acquiring a first residual subjective sum according to the first standard deviation and the first residual absolute value sum;
acquiring a second residual subjective sum according to the second standard deviation and the first residual absolute value sum;
and determining a final prediction method of the MB to be predicted according to the first residual subjective sum and the second residual subjective sum.
In one embodiment of the present invention, obtaining the first standard deviation and the second standard deviation of the MB to be predicted includes:
obtaining a first prediction residual and a first average residual of the MB to be predicted;
determining the first standard deviation from the first prediction residual and the first average residual;
obtaining a second prediction residual and a second average residual of the MB to be predicted;
determining the second standard deviation from the second prediction residual and the second average residual.
In an embodiment of the present invention, obtaining a sum of absolute values of a first residual of the MB to be predicted by using the first prediction residual of the MB to be predicted includes:
determining that a current pixel of the MB to be predicted has K pixel components, wherein K is a natural number greater than zero;
obtaining a first weighted gradient value of the pixel component;
acquiring a second weighted gradient value of the pixel component through the first weighted gradient value;
determining a reference pixel value for the pixel component from the second weighted gradient value;
obtaining a first prediction residual by subtracting the pixel value of the pixel component from the reference pixel value;
and acquiring a first residual absolute value sum of the MB to be predicted according to the first prediction residual.
In one embodiment of the present invention, obtaining a first weighted gradient value for the pixel component comprises:
determining N texture direction gradient values of the pixel component through the surrounding components of the pixel component, wherein N is a natural number greater than zero;
and weighting the texture direction gradient value of each pixel component by using a first weighting coefficient to obtain a first weighted gradient value of each pixel component.
In one embodiment of the present invention, obtaining a second weighted gradient value of the pixel component from the first weighted gradient value includes:
selecting the minimum value of the first weighted gradient value;
and carrying out weighting processing on the minimum value of the first weighting gradient value of each pixel component by using a second weighting coefficient to obtain a second weighting gradient value of each pixel component.
In one embodiment of the present invention, determining the reference pixel value of the pixel component by the second weighted gradient value includes:
determining a reference direction of the pixel component by a minimum value of the second weighted gradient value;
and carrying out weighting processing on the component pixel values in the reference direction by using a third weighting coefficient to obtain the reference pixel values of the pixel components.
In an embodiment of the present invention, obtaining a sum of absolute values of a second residual of the MB to be predicted by using the second prediction residual of the MB to be predicted includes:
partitioning the MB to be predicted into a plurality of sub-MBs to be predicted by utilizing a quadtree method;
respectively obtaining a prediction residual error and a first bit number of the MB to be predicted and a prediction residual error and a second bit number of the sub-MB to be predicted;
determining a second prediction residual of the MB to be predicted according to the prediction residual and the first bit number of the MB to be predicted and the prediction residual and the second bit number of the sub-MB to be predicted;
and judging whether the to-be-predicted sub MB is continuously divided, if so, continuously dividing the to-be-predicted sub MB according to a quadtree algorithm, otherwise, ending the division of the to-be-predicted sub MB, and obtaining a second residual absolute value sum of the to-be-predicted MB through a second prediction residual of the to-be-predicted sub MB.
In an embodiment of the present invention, the obtaining a prediction residual and a first number of bits of the MB to be predicted and a prediction residual and a second number of bits of the sub-MB to be predicted respectively includes:
subtracting the minimum value of the pixel component values in the MB to be predicted from all the pixel component values in the MB to be predicted respectively to obtain prediction residuals corresponding to all the pixel components in the MB to be predicted;
determining the first bit number by using a first minimum bit number of the MB to be predicted, a data bit depth of the MB to be predicted and the number of pixel components of the MB to be predicted;
subtracting the minimum value of the pixel component values in the sub-MB to be predicted from all the pixel component values in the sub-MB to be predicted respectively to obtain prediction residuals corresponding to all the pixel components in the sub-MB to be predicted;
and determining the second bit number by using the second minimum bit number of the sub-MB to be predicted, the data bit depth of the sub-MB to be predicted and the number of pixel components of the sub-MB to be predicted.
In an embodiment of the present invention, determining a second prediction residual of the MB to be predicted according to the prediction residual and the first number of bits of the MB to be predicted and the prediction residual and the second number of bits of the sub-MB to be predicted includes:
determining a first weighted value of the MB to be predicted according to the prediction residual error and the first bit number of the MB to be predicted;
determining a second weighted value of the MB to be predicted according to the prediction residual error and a second bit number of the sub-MB to be predicted;
judging the first weighted value and the second weighted value;
if the first weighted value is larger than the second weighted value, continuing to divide the sub-MB to be predicted;
and if the first weighted value is smaller than the second weighted value, selecting the prediction residual of the sub MB to be predicted as a second prediction residual of the MB to be predicted.
In an embodiment of the present invention, a method for determining a final prediction of the MB to be predicted according to the first residual subjective sum and the second residual subjective sum includes:
and selecting the minimum value of the first residual subjective sum and the second residual subjective sum, and determining the final prediction method of the MB to be predicted according to the minimum value.
Based on this, the invention has the following advantages:
the invention selects a plurality of prediction methods for predicting the image to be compressed, and the image to be compressed can be predicted by selecting one prediction method according to the correlation self-adaptability of the texture, so that the image to be compressed can be predicted by pertinently selecting the prediction method, the quality of video compression is greatly improved, and the theoretical limit entropy can be further reduced by selecting the optimal prediction method for prediction.
Other aspects and features of the present invention will become apparent from the following detailed description, which proceeds with reference to the accompanying drawings. It is to be understood, however, that the drawings are designed solely for purposes of illustration and not as a definition of the limits of the invention, for which reference should be made to the appended claims. It should be further understood that the drawings are not necessarily drawn to scale and that, unless otherwise indicated, they are merely intended to conceptually illustrate the structures and procedures described herein.
Drawings
The following detailed description of embodiments of the invention will be made with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a prediction method based on video compression according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an algorithm principle of an adaptive direction prediction method for pixel-level multi-component reference according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a reference pixel location according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating gradient value calculation according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating an algorithm of another adaptive direction prediction method for pixel-level multi-component reference according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a quadtree-based segmentation method according to an embodiment of the present invention;
FIG. 7 is a diagram illustrating a partitioning method of a macroblock to be predicted according to an embodiment of the present invention;
fig. 8 is a schematic diagram of another partition method of a macroblock to be predicted according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart of a prediction method based on video compression according to an embodiment of the present invention. The prediction method comprises the following steps:
step 1, obtaining a first standard deviation and a second standard deviation of an MB to be predicted;
step 2, obtaining a first residual absolute value sum of the MB to be predicted by utilizing a first prediction residual of the MB to be predicted;
step 3, acquiring the absolute value sum of a second residual error of the MB to be predicted by using the second prediction residual error of the MB to be predicted;
step 4, obtaining a first residual subjective sum according to the first standard deviation and the first residual absolute value sum;
step 5, obtaining a second residual subjective sum according to the second standard deviation and the second residual absolute value;
and 6, determining a final prediction method of the MB to be predicted according to the first residual subjective sum and the second residual subjective sum.
Specifically, in order to better explain the prediction method based on video compression, the present embodiment will describe the prediction method in detail:
and S1, setting the size of the MB to be predicted to be m × n, wherein m and n are natural numbers larger than zero.
S2, predicting the MB to be predicted according to the pixel-level multi-component reference self-adaptive direction prediction method, and calculating the first residual absolute value and SAD of the MB to be predicted according to the residual absolute value and a calculation formula1Sum of absolute value of first residual and SAD1The obtained sum of absolute values of all first prediction residuals in the MB to be predicted is as follows:
Figure GDA0002529342620000071
the adaptive direction prediction method of pixel-level multi-component reference comprises the following steps that SAD is the sum of absolute values of residuals, ABS is the absolute value, Res is the prediction residual, k is the serial number corresponding to the prediction method, andcorresponding to k being 1, calculating a first residual absolute value SAD1Corresponding to all the first prediction residuals of the MB to be predicted.
S3, predicting the MB to be predicted according to the video compression prediction method based on the quadtree, and calculating the second residual absolute value and SAD of the MB to be predicted according to the residual absolute value and a calculation formula2First residual absolute value SAD2And k corresponding to the video compression prediction method based on the quadtree is 2.
S4, calculating a first standard deviation E corresponding to the pixel-level multi-component reference adaptive direction prediction method by using a standard deviation calculation formula1Second standard deviation E corresponding to video compression prediction method based on quadtree2Wherein, the standard deviation calculation formula is as follows:
Figure GDA0002529342620000081
Figure GDA0002529342620000082
wherein, E is a standard deviation, ABS is an absolute value, Res is a prediction residual, AVE is an average residual, k is a serial number corresponding to the prediction method, and the value of k is 1 and 2, when k is 1, the adaptive direction prediction method of pixel level multi-component reference is correspondingly adopted, and when k is 2, the video compression prediction method based on the quadtree is correspondingly adopted. Calculating a first standard deviation E1Corresponding to the first prediction residual, calculating a second standard deviation E2The second prediction residual corresponds to.
Step 5, finally according to SAD1、SAD2、E1And E2In the case of (1), the weight coefficient a is configured by scene3And a4Calculating the SUBD (SuBD) according to a SUBD (residual difference, residual subjective sum) calculation formula, wherein the adaptive direction prediction method of the pixel-level multi-component reference corresponds to the SUBD1Video compression prediction method based on quadtreeSUBD2
SUBDk=a1×SADk+a2×Ek
Wherein, a1And a2The prediction mode is a prediction mode, wherein the prediction mode is a prediction mode, and k is a serial number corresponding to the prediction mode, wherein the adaptive direction prediction method corresponds to pixel-level multi-component reference when k is 1, and the video compression prediction method based on the quadtree corresponds to when k is 2.
Comparison of SUBD1And SUBD2Selecting the prediction method corresponding to the smallest SUBD as a final prediction method, and using the prediction residual of the final prediction method as a final prediction residual; and transmitting the prediction residual error and the additional zone bit of the final prediction method in a code stream, wherein the additional zone bit is a serial number corresponding to the final prediction method, the adaptive direction prediction method corresponds to pixel-level multi-component reference when the additional zone bit is 1, and the video compression prediction method based on the quad-tree corresponds to when the additional zone bit is k is 2.
When the texture of the image to be compressed is complex, the image to be compressed is respectively predicted by two prediction methods, the optimal prediction method is selected from the two prediction methods as the final prediction method according to the prediction result, the theoretical limit entropy can be further reduced, the selection of the prediction method is carried out according to the texture characteristics of the image to be compressed, the adaptivity of the prediction method is improved, the compression quality of the image to be compressed with complex texture is improved, and the prediction effect is improved.
The invention selects two prediction methods for predicting the image to be compressed, and the image to be compressed can be predicted by selecting one prediction method according to the correlation self-adaptability of the texture, so that the image to be compressed can be predicted by pertinently selecting the prediction method, the quality of video compression is greatly improved, and the theoretical limit entropy can be further reduced by selecting the optimal prediction method for prediction.
Example two
Referring to fig. 2 and fig. 3, fig. 2 is a schematic diagram illustrating an algorithm principle of an adaptive direction prediction method for pixel-level multi-component reference according to an embodiment of the present invention, and fig. 3 is a schematic diagram illustrating a reference pixel position according to an embodiment of the present invention. The present embodiment describes in detail an adaptive direction prediction method for pixel-level multi-component reference proposed by the present invention on the basis of the above embodiments, where the prediction method includes the following steps:
s1, defining the size of the MB to be predicted as m × n, wherein m and n are natural numbers larger than zero;
s2, defining that a current pixel of the MB to be predicted has K pixel components, wherein K is a natural number greater than zero, and the K pixel components are respectively a pixel component 1 and a pixel component 2 … …;
s3, determining N texture direction gradient values G1-GN of each pixel component through the surrounding pixel components of each pixel component for each pixel component of the current pixel, wherein N is a natural number larger than zero;
preferably, the surrounding components of each pixel component may or may not be adjacent to the pixel component; as shown in fig. 3, Cur represents the current pixel component, and the surrounding pixel component may be GHIK or ABCDEFJ.
S4, weighting the N texture direction gradient values G1-GN of each pixel component (G1-GN represent the size of the texture direction gradient value and the direction of the texture direction gradient value), and obtaining a first weighted gradient value BG after weighting the N texture direction gradient values, wherein the calculation formula of the first weighted gradient value BG is as follows:
BGi=w1*G1+w2*G2+…+wN*GN(i=1…K)
w1 and w2 … wN are first weighting coefficients, and w1 and w2 … wN can be the same or different; correspondingly, BG1 is the first weighted gradient value of pixel component 1, BG2 is the first weighted gradient value of pixel component 2, and so on, BGK is the first weighted gradient value of pixel component K.
In one embodiment, w1, w2 … wN may be fixed values set in advance. Further, and when configuring the relative sizes of w1, w2 … wN, a priori experience may be considered. For example, as it is known from past experience that the direction of the gradient value G1 may be more suitable for the actual situation of the image to be predicted, w1 may be configured with a value more suitable for the actual situation of the image to be predicted (e.g., w1 may be configured to be small) to increase the weight in the direction of the gradient value G1. Of course, w1 and w2 … wN may be adaptive, that is, the relative sizes of w1 and w2 … wN may be flexibly adjusted according to the actual situation of the early prediction process, specifically, w1+ w2+ … + wN is 1.
Preferably, the first weighted gradient value BG may be represented by an absolute value of a pixel value difference of the corresponding pixel component, but is not limited thereto.
Preferably, a plurality of groups of values w1 and w2 … wN are selected to obtain a plurality of first weighted gradient values, and the first weighted gradient value BG is the minimum value to obtain the optimal value BGbst of the first weighted gradient value of each pixel component.
S5, weighting the optimal value BGbst of the first weighted gradient values of the K pixel components to obtain a second weighted gradient value BG ″ obtained by weighting the optimal value of the first weighted gradient value, where a calculation formula of the second weighted gradient value BG ″ is as follows:
BG"i=t1*BGbst1+t2*BGbst2+…+tK*BGbstK(i=1…K)
wherein t1 and t2 … tK are second weighting coefficients, and t1 and t2 … tK may be the same or different; BGbst1 is the optimal value of the first weighted gradient value of the pixel component 1, BGbst2 is the optimal value of the first weighted gradient value of the pixel component 2, and so on, BGbstK is the optimal value of the first weighted gradient value of the pixel component K, BG "1 is the second weighted gradient value of the pixel component 1, BG"2 is the second weighted gradient value of the pixel component 2, and so on, BG "K is the second weighted gradient value of the pixel component K, and the optimal value BG" bst of the second weighted gradient value BG "of each pixel component is determined.
Preferably, the weighting coefficients t1, t2, and t3 are set to obtain the optimal value BGbst of the second weighted gradient value for each pixel component in accordance with the relationship of each pixel component to the optimal value BGbst corresponding to the first weighted gradient value.
Preferably, the weighting coefficient value BGbst, which is the optimal value of the first weighting gradient value at the current pixel component, is the largest, the weighting coefficient value BGbst, which is the optimal value of the first weighting gradient value at other pixel components having increasing distances from the current pixel component, is gradually decreased, the sum of the weighting coefficient values is 1, and in particular, t1+ t2+ t3 is 1.
Preferably, the second weighted gradient value BG "takes the minimum value, and the optimal value BG" bst of the second weighted gradient value of each pixel component can be obtained.
The direction corresponding to the optimal value BG "bst of the second weighted gradient value is the reference direction Dir of the pixel component.
S6, performing weighting processing on the pixel values of all available pixel components in the reference direction of each pixel component to obtain a reference pixel value Ref of each pixel component, where a calculation formula of the reference pixel value Ref is as follows:
Refi=r1*cpt1+r2*cpt2+…+rN*cptN(i=1…K)
wherein r1 and r2 … rN are third weighting coefficients, and r1 and r2 … rN may be the same or different; cpt 1-cptN are the pixel values of the N available pixel components in the reference direction of each pixel component; ref1 is the reference pixel value for pixel component 1, Ref2 is the reference pixel value for pixel component 2, and so on, and RefK is the reference pixel value for pixel component K.
S7, subtracting the corresponding reference pixel value from the pixel value of the current pixel component to obtain a first prediction residual Dif of the current pixel component; the formula is as follows:
Difi=Curcpti-Refi(i=1…K)
wherein, cutcpt 1 is the pixel value of pixel component 1, cutcpt 2 is the pixel value of pixel component 2, and so on, and cutcptk is the pixel value of pixel component K; dif1 is the prediction residual for pixel component 1, Dif2 is the prediction residual for pixel component 2, and so on, DifK is the prediction residual for pixel component K.
And S8, repeating S3-S7 for the rest components of the current pixel, and obtaining the first prediction residual errors of all the pixel components of the current pixel.
Preferably, the multiple components can be processed in parallel or in series, specifically according to the requirements of application specification scenarios.
According to the embodiment, the plurality of pixel components of the current pixel are weighted, so that the prediction direction of the current pixel component can be more reasonably determined, and particularly, when the texture is more complex, a better correction effect on the prediction direction can be achieved. The method can balance texture prediction directions among a plurality of adjacent pixels of the pixel component, reduce the possibility of misjudgment of single pixel component prediction, and finally further reduce the theoretical limit entropy of prediction. Compared with the time length and low efficiency of serial component processing, the parallel processing can improve the processing speed by times, and is beneficial to the hardware realization of the prediction algorithm.
EXAMPLE III
Referring to fig. 4 and 5, fig. 4 is a schematic diagram illustrating a gradient value calculation according to an embodiment of the present invention; fig. 5 is a schematic diagram illustrating an algorithm principle of another adaptive direction prediction method for pixel-level multi-component reference according to an embodiment of the present invention. The present embodiment describes, by way of example, the adaptive direction prediction method for pixel-level multi-component reference proposed by the present invention on the basis of the above embodiments. In this embodiment, the pixel of the current pixel is divided into Y, U, V three components, and the specific steps are as follows:
s1, defining the size of the MB to be predicted as m × n, wherein m and n are natural numbers larger than zero;
s2, defining that the current pixel of the MB to be predicted has three pixel components, namely a pixel component Y, a pixel component U and a pixel component V;
s3, determining 3 texture direction gradient values G1, G2 and G3 for each pixel component through surrounding components of each pixel component for three pixel components of the current pixel;
preferably, for the pixel component Y, the pixel component U, and the pixel component V, respectively, as shown in fig. 4, ABS (K-H) is 45 degrees texture direction gradient value, ABS (K-G) is 90 degrees texture direction gradient value, ABS (K-F) is 135 degrees texture direction gradient value, and ABS (K-J) is 180 degrees texture direction gradient value, wherein ABS is absolute value operation.
S4, weighting the 3 texture direction gradient values G1, G2 and G3 of the pixel component Y, the pixel component U and the pixel component V to respectively obtain a first weighted gradient value BG of each pixel component, and searching the minimum value BGmin of the first weighted gradient value of each pixel component as the optimal value of the first weighted gradient value.
S5, carrying out weighting processing on the minimum gradient value of the first weighting gradient values of the 3 pixel components to obtain a second weighting gradient value BG 'after weighting processing on the optimal value of the first weighting gradient value, and finding out the minimum value BG' min of the second weighting gradient value as the optimal value BG 'bst of the second weighting gradient value BG'. The weighting is calculated as follows:
BG"minY=0.5*BGminY+0.7*BGminU+0.7*BGminV
BG"minU=0.5*BGminY+0.3*BGminU+0.4*BGminV
BG"minY=0.5*BGminY+0.4*BGminU+0.3*BGminV
BG ' minY is the minimum value of the second weighting gradient value of the pixel component Y, BG ' minU is the minimum value of the second weighting gradient value of the pixel component U, BG ' minV is the minimum value of the second weighting gradient value of the pixel component V, BGminY is the minimum value of the first weighting gradient value of the pixel component Y, BGminU is the minimum value of the first weighting gradient value of the pixel component U, and BGminV is the minimum value of the first weighting gradient value of the pixel component V.
The BG "min direction is the reference direction Dir of the current pixel component, i.e. DirY is the reference direction of the pixel component Y, DirU is the reference direction of the pixel component U, and DirV is the reference direction of the pixel component V.
S5, weighting the pixel values of the two components in the reference direction of the three pixel components, i.e., the pixel component Y, the pixel component U, and the pixel component V, to obtain reference pixel values Ref of the three components, i.e., the reference pixel values Ref are calculated as follows:
RefY=r1*cpt1+r2*cpt2
RefU=r1*cpt1+r2*cpt2
RefV=r1*cpt1+r2*cpt2
wherein, RefY is a reference pixel value of the pixel component Y, RefU is a reference pixel value of the pixel component U, RefV is a reference pixel value of the pixel component V, cpt1, cpt2 are component pixel values of each reference direction, and r1 and r2 are third weighting coefficients.
Preferably, for any pixel component, if it is 45 degrees reference, then the reference pixel value REF is 0.8 × I + 0.2E; if the reference pixel value is 90 degrees, the reference pixel value is 0.8 × H + 0.2C; if the reference pixel value is 135 degrees, the reference pixel value is 0.8 × G + 0.2A; if it is 180 degrees reference, then the reference pixel value is 0.8 × K + 0.2J.
S36, subtracting the corresponding reference pixel value from the pixel value of the current pixel component to obtain a first prediction residual Res of the current pixel component, where the first prediction residual Res has the following calculation formula:
ResY=CurcptY-RefY
ResU=CurcptU-RefU
ResV=CurcptV-RefV
wherein, cutpty is a pixel value of the pixel component Y, cutptu is a pixel value of the pixel component U, and cutptv is a pixel value of the pixel component V; ResY is the first prediction residual of pixel component Y, ResU is the first prediction residual of pixel component U, and ResV is the first prediction residual of pixel component V.
According to the invention, the prediction direction of the current pixel component can be more reasonably determined by carrying out multidirectional gradient weighting processing on R, G, B three pixel components, and especially when the texture is complex, a better correction effect on the prediction direction can be achieved. The method can balance texture prediction directions among three pixel components at the same position R, G, B, reduce the possibility of misjudgment of single pixel component prediction, and finally further reduce the theoretical limit entropy of prediction. Compared with the time length and low efficiency of serial component processing, the parallel processing can improve the processing speed by times, and is beneficial to the hardware realization of the prediction algorithm.
Example four
Referring to fig. 6 to 8, fig. 6 is a schematic diagram of a quadtree-based partition method according to an embodiment of the present invention, fig. 7 is a schematic diagram of a partition method of a macroblock to be predicted according to an embodiment of the present invention, and fig. 8 is a schematic diagram of another partition method of a macroblock to be predicted according to an embodiment of the present invention. The present embodiment provides a detailed description of the video compression prediction method based on the quadtree proposed in the present invention on the basis of the above embodiments.
Video may generally comprise a series of pictures, each of which may be divided or partitioned into predetermined regions, such as frames or MBs. When an area of video is divided into MBs, the divided MBs may be classified into intra MBs or inter MBs according to an encoding method. An intra MB refers to an MB encoded by an intra prediction encoding method. The intra prediction encoding method predicts pixels of an MB to be predicted by using pixels of a reconstructed block previously subjected to encoding and decoding in a current picture in which current encoding is performed to generate a prediction MB, and then encodes a difference value between the pixels of the MB to be predicted and the pixels of the MB to be predicted.
In the present invention, as shown in fig. 6, the encoding target may be a 64 × 64 standard image MB, a 16 × 16 standard image MB, or an image macroblock having a smaller or larger size standard. For example, the MB to be predicted is recursively divided according to a quadtree algorithm, and each MB to be predicted is divided into four sub-MBs to be predicted with the same size. Whether each sub MB to be predicted is divided again is judged by a preset algorithm.
Assuming that the MB to be predicted is in a 64 × 64 specification, the MB to be predicted with 64 × 64 is located at the first layer as a root node. When the node is judged to be continuously divided by a preset algorithm, the node is divided into 4 sub-MBs to be predicted with the size of 32 multiplied by 32, and a second layer is formed. Judging that the sub MB to be predicted at the upper right of the second layer and the sub MB to be predicted at the lower left of the second layer do not need to be continuously divided through a preset algorithm, judging that the sub MB to be predicted at the upper left of the second layer and the sub MB to be predicted at the lower right of the second layer need to be continuously divided, dividing the sub MB to be predicted at the upper left of the second layer into 4 sub MB to be predicted with the size of 16 multiplied by 16, dividing the sub MB to be predicted at the lower right of the second layer into 4 sub MB to be predicted with the size of 16 multiplied by 16, forming a third layer, and recursing sequentially until reaching the Nth layer. As shown in fig. 7, the final partition of the MB to be predicted with the 64 × 64 standard is shown.
The prediction method of the embodiment comprises the following steps:
s1, the MB to be predicted is divided according to the quadtree algorithm, as shown in fig. 8, the sub-MBs to be predicted after the MB to be predicted is divided are the first sub-MB to be predicted, the second sub-MB to be predicted, the third sub-MB to be predicted, and the fourth sub-MB to be predicted, respectively.
S2, obtaining a first bit number of an MB to be predicted and a prediction residual according to an original MB to be predicted, specifically, calculating a difference between a maximum value of a pixel component in the MB to be predicted and a minimum value of the pixel component in the MB to be predicted, to obtain a first minimum bit number representing the difference, and calculating a first bit number of the MB to be predicted according to the first minimum bit number and a data bit depth of the MB to be predicted, where the first bit number of the MB to be predicted satisfies the following formula:
MBIT1=M*BIT_MIN1+2*BITDETH
where MBIT1 is the first BIT number of the MB to be predicted, BIT _ MIN1 is the first minimum BIT number, BITDEPTH is the data BIT depth of the MB to be predicted, and M is the number of pixel components in the MB to be predicted.
And respectively subtracting the minimum value of all pixel component values in the MB to be predicted from all pixel component values in the MB to be predicted to obtain the prediction residual error corresponding to all pixel components in the MB to be predicted.
S3, obtaining a second bit number and a prediction residual corresponding to each sub-MB to be predicted according to each divided sub-MB to be predicted, specifically, calculating a second difference between the maximum value of the pixel component in the first sub-MB to be predicted and the minimum value of the pixel component in the first sub-MB to be predicted, to obtain a second minimum bit number representing the first sub-MB to be predicted;
calculating a third difference value between the maximum value of the pixel component in the second to-be-predicted sub-MB and the minimum value of the pixel component in the second to-be-predicted sub-MB to obtain a third minimum bit number representing the second to-be-predicted sub-MB; calculating a fourth difference value between the maximum value of the pixel component in the third to-be-predicted sub-MB and the minimum value of the pixel component in the third to-be-predicted sub-MB to obtain a fourth minimum bit number representing the third to-be-predicted sub-MB; calculating a fifth difference value between the maximum value of the pixel component in the fourth to-be-predicted sub-MB and the minimum value of the pixel component in the fourth to-be-predicted sub-MB to obtain a fifth minimum bit number representing the fourth to-be-predicted sub-MB; and calculating according to the second minimum bit number, the third minimum bit number, the fourth minimum bit number, the fifth minimum bit number and the data bit depth of the MB to be predicted to obtain a second bit number, wherein the second bit number satisfies the following formula:
MBIT2 ═ N1 × BIT _ MIN2+ N2 × BIT _ MIN3+ N3 × BIT _ MIN4+ N4 × BIT _ MIN5+2 × bittree where MBIT2 is the second number of BITs, BIT _ MIN2 is the second minimum number of BITs, BIT _ MIN3 is the third minimum number of BITs, BIT _ MIN4 is the fourth minimum number of BITs, BIT _ MIN5 is the fifth minimum number of BITs, bitcepth is the data BIT depth of the MB to be predicted, N1 is the number of pixel components in the first MB to be predicted, N2 is the number of pixel components in the second MB to be predicted, N3 is the number of pixel components in the third MB to be predicted, and N4 is the number of pixel components in the fourth MB to be predicted.
And respectively subtracting the minimum value of all pixel component values in the first to-be-predicted sub-MB from all pixel component values in the first to-be-predicted sub-MB, subtracting the minimum value of all pixel component values in the second to-be-predicted sub-MB from all pixel component values in the second to-be-predicted sub-MB, subtracting the minimum value of all pixel component values in the third to-be-predicted sub-MB from all pixel component values in the third to-be-predicted sub-MB, and subtracting the minimum value of all pixel component values in the fourth to-be-predicted sub-MB from all pixel component values in the fourth to-be-predicted sub-MB to obtain a second prediction residual error corresponding to all pixel components in all the divided to-be-predicted sub-MB.
S4, judging whether the MB to be predicted is continuously divided according to the first bit number, the prediction residual error of the MB to be predicted, the second bit number and the prediction residual error of the sub-MB to be predicted; if yes, jumping to step 1, and respectively executing step 1-step 4 to partition each sub MB to be predicted according to a recursive algorithm; if not, the partition of the sub MB to be predicted is ended.
Specifically, a first reconstruction value of the MB to be predicted is obtained according to the prediction residual of the MB to be predicted, an absolute value of a difference between the first reconstruction value and a pixel value of the MB to be predicted is obtained, a first reconstruction difference value is obtained, and the first reconstruction difference value and the first bit number are weighted to obtain a first weighted value of the MB to be predicted, where the first weighted value satisfies the following formula:
RDO1=a1*MBIT1+b1*RES1
wherein RDO1 is the first additionThe weight value is MBIT1 is the first bit number, RES1 is the first reconstruction difference value, a1And b1Are weighting coefficients.
a1And b1The value of (a) may be a predetermined fixed value, and further, a1+b11, preferably, a1May be selected to be 0.5, b1May be selected to be 0.5, a1And b1The size can be flexibly adjusted.
The reconstructed pixel component refers to a pixel component obtained by decompressing and reconstructing a compressed image, and a pixel value of the reconstructed pixel component is generally referred to as a reconstruction value. Further, the reconstructed pixel component can be obtained according to the prediction residual, that is, the reference value (the minimum value of each macroblock pixel component) is added to the prediction residual to obtain the reconstructed pixel component.
Obtaining a second reconstruction value of the sub-MB to be predicted after being divided according to the second prediction residual error, solving an absolute value of a difference between the second reconstruction value and a pixel value of the sub-MB to be predicted after being divided to obtain a second reconstruction difference value, and weighting the second reconstruction difference value and a second bit number to obtain a second weighted value of the sub-MB to be predicted after being divided, wherein the second weighted value satisfies the following formula:
RDO2=a2*MBIT2+b2*RES2
where RDO2 is the second weight value, MBIT2 is the second bit number, RES2 is the second reconstruction difference value, a2And b2Are weighting coefficients.
a2And b2The value of (a) may be a predetermined fixed value, and further, a2+b21, preferably, a2May be selected to be 0.5, b2May be selected to be 0.5, a2And b2The size can be flexibly adjusted.
And comparing the first weighted value with the second weighted value, if the first weighted value is larger than the second weighted value, dividing the sub-MB to be predicted according to a quadtree algorithm, and respectively executing the step 1 to the step 4 to judge whether to continue dividing, namely judging whether to perform third dividing and fourth dividing till Nth dividing according to a recursive algorithm. Otherwise, if the first weighted value is smaller than the second weighted value, the MB to be predicted is not divided.
And S5, outputting the prediction residual error of each sub MB to be predicted and the minimum value in the pixel components under the final partition level of the MB to be predicted, and taking the prediction residual error of the sub MB to be predicted under the final partition level as a second prediction residual error.
The video compression prediction method based on the quadtree judges whether to continue to divide or not according to the bit number and the prediction residual of the MB to be predicted and the bit and the prediction residual of the sub-MB to be predicted, and the MB to be predicted can be divided in a targeted manner, so that when the texture of an image to be compressed is complex, the final division level can be determined according to the correlation of the texture, the prediction can be performed through the division manner, the compression efficiency can be improved, the subjective picture quality can be improved, the prediction method has good effect and high processing efficiency for the complex texture image processing, and the theoretical limit entropy can be reduced.
In summary, the present invention is described in detail by applying specific examples, and the description of the above embodiments is only used to help understanding the method of the present invention and its core idea; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention, and the scope of the present invention should be subject to the appended claims.

Claims (7)

1. A prediction method based on video compression, comprising:
acquiring a first standard deviation and a second standard deviation of an MB to be predicted;
acquiring a first residual absolute value sum of the MB to be predicted by utilizing a first prediction residual of the MB to be predicted;
acquiring a second residual absolute value sum of the MB to be predicted by using a second prediction residual of the MB to be predicted;
acquiring a first residual subjective sum according to the first standard deviation and the first residual absolute value sum;
acquiring a second residual subjective sum according to the second standard deviation and the second residual absolute value;
determining a final prediction method of the MB to be predicted according to the first residual subjective sum and the second residual subjective sum; wherein the content of the first and second substances,
obtaining a first standard deviation and a second standard deviation of the MB to be predicted, including:
obtaining a first prediction residual and a first average residual of the MB to be predicted; determining the first standard deviation from the first prediction residual and the first average residual;
obtaining a second prediction residual and a second average residual of the MB to be predicted; determining the second standard deviation from the second prediction residual and the second average residual;
the standard deviation calculation formula is as follows:
Figure FDA0002687732550000011
Figure FDA0002687732550000012
wherein E is a standard deviation, ABS is an absolute value, Res is a prediction residual, AVE is an average residual, k is a serial number corresponding to the prediction method, and the value of k is 1 and 2, when k is 1, the adaptive direction prediction method of pixel-level multi-component reference is correspondingly adopted, and when k is 2, the video compression prediction method based on the quadtree is correspondingly adopted; calculating a first standard deviation E1Corresponding to the first prediction residual, calculating a second standard deviation E2Corresponding to the first prediction residual error, and m and n are natural numbers larger than zero;
the method for calculating the first prediction residual error comprises the following steps:
determining that a current pixel of the MB to be predicted has K pixel components, wherein K is a natural number greater than zero;
obtaining a first weighted gradient value of the pixel component;
acquiring a second weighted gradient value of the pixel component through the first weighted gradient value;
determining a reference pixel value for the pixel component from the second weighted gradient value;
obtaining a first prediction residual by subtracting the pixel value of the pixel component from the reference pixel value; wherein the content of the first and second substances,
the calculation formula of the first weighted gradient value BG is as follows:
BGi=w1*G1+w2*G2+…+wN*GN(i=1…K)
wherein w1 and w2 … wN are first weighting coefficients; correspondingly, BG1 is the first weighted gradient value of pixel component 1, BG2 is the first weighted gradient value of pixel component 2, and so on, BGK is the first weighted gradient value of pixel component K; G1-GN are gradient values of N texture directions of each pixel component;
selecting multiple groups of values w1 and w2 … wN to obtain multiple first weighted gradient values, wherein the first weighted gradient value BG is the minimum value, and the optimal value BGbst of the first weighted gradient value of each pixel component can be obtained;
the second weighted gradient value BG "is calculated as follows:
BG"i=t1*BGbst1+t2*BGbst2+…+tK*BGbstK(i=1…K)
wherein t1 and t2 … tK are second weighting coefficients; BGbst1 is the optimal value of the first weighted gradient value of the pixel component 1, BGbst2 is the optimal value of the first weighted gradient value of the pixel component 2, and so on, BGbstK is the optimal value of the first weighted gradient value of the pixel component K;
selecting multiple groups of values t1 and t2 … tK to obtain multiple second weighted gradient values, wherein the second weighted gradient value BG 'takes the minimum value, and the optimal value BG' bst of the second weighted gradient value of each pixel component can be obtained;
the method for calculating the second prediction residual error comprises the following steps:
determining a first weighted value of the MB to be predicted according to the prediction residual error and the first bit number of the MB to be predicted; the prediction residual of the MB to be predicted is obtained by respectively subtracting the minimum value of all pixel component values in the MB to be predicted from all pixel component values in the MB to be predicted;
determining a second weighted value of the MB to be predicted according to the prediction residual error and the second bit number of the sub-MB to be predicted; the prediction residual of the sub-MB to be predicted is the minimum value obtained by subtracting all pixel component values in the sub-MB to be predicted from all pixel component values in the sub-MB to be predicted respectively;
judging the first weighted value and the second weighted value;
if the first weighted value is larger than the second weighted value, continuing to divide the sub-MB to be predicted;
if the first weighted value is smaller than the second weighted value, selecting the prediction residual of the sub-MB to be predicted as a second prediction residual of the MB to be predicted; wherein the content of the first and second substances,
the first number of bits satisfies the following equation:
MBIT1=M*BIT_MIN1+2*BITDETH
wherein, MBIT1 is the first BIT number of the MB to be predicted, BIT _ MIN1 is the first minimum BIT number, BITDEPTH is the data BIT depth of the MB to be predicted, and M is the number of pixel components in the MB to be predicted; the minimum bit number is the difference between the maximum value of the pixel component in the MB to be predicted and the minimum value of the pixel component in the MB to be predicted;
obtaining a first reconstruction value of the MB to be predicted according to the prediction residual error of the MB to be predicted, and solving an absolute value of the difference between the first reconstruction value and the pixel value of the MB to be predicted to obtain a first reconstruction difference value;
weighting the first reconstruction difference value and the first bit number to obtain a first weighted value of the MB to be predicted;
the first weighting value satisfies the following equation:
RDO1=a1*MBIT1+b1*RES1
the RDO1 is a first weighted value, the MBIT1 is a first bit number, the RES1 is a first reconstruction difference value, and a1 and b1 are weighting coefficients; the values of a1 and b1 are preset fixed values, a1+ b1 is 1, a1 is 0.5, and b1 is 0.5;
the second number of bits satisfies the following equation:
MBIT 2N 1 BIT _ MIN2+ N2 BIT _ MIN3+ N3 BIT _ MIN4+ N4 BIT _ MIN5+2 BIT.
MBIT2 is a second BIT number, BIT _ MIN2 is a second minimum BIT number, BIT _ MIN3 is a third minimum BIT number, BIT _ MIN4 is a fourth minimum BIT number, BIT _ MIN5 is a fifth minimum BIT number, BITDEPTH is the data BIT depth of the MB to be predicted, N1 is the number of pixel components in the first sub-MB to be predicted, N2 is the number of pixel components in the second sub-MB to be predicted, N3 is the number of pixel components in the third sub-MB to be predicted, and N4 is the number of pixel components in the fourth sub-MB to be predicted;
obtaining a second reconstruction value of the sub-MB to be predicted after being segmented according to the second prediction residual error, solving an absolute value of a difference between the second reconstruction value and a pixel value of the sub-MB to be predicted after being segmented to obtain a second reconstruction difference value, and weighting the second reconstruction difference value and a second bit number to obtain a second weighted value of the sub-MB to be predicted after being segmented;
the second weighting value satisfies the following formula:
RDO2=a2*MBIT2+b2*RES2
the RDO2 is a second weighted value, the MBIT2 is a second bit number, the RES2 is a second reconstruction difference value, and a2 and b2 are weighting coefficients;
the residual subjective sum is obtained by the following steps:
SUBDk=a1×SADk+a2×Ek
wherein, a3A4 is a weight coefficient, SAD is the sum of absolute differences of residuals, E is a standard deviation, and k is a serial number corresponding to a prediction mode, wherein k is 1 corresponding to a self-adaptive direction prediction method of pixel-level multi-component reference, and k is 2 corresponding to a video compression prediction method based on a quadtree;
comparison of SUBD1And SUBD2And selecting the prediction method corresponding to the smallest SUBD as the final prediction method.
2. The method of claim 1, wherein obtaining a first residual absolute value sum of the MB to be predicted by using the first prediction residual of the MB to be predicted comprises:
determining that a current pixel of the MB to be predicted has K pixel components, wherein K is a natural number greater than zero;
obtaining a first weighted gradient value of the pixel component;
acquiring a second weighted gradient value of the pixel component through the first weighted gradient value;
determining a reference pixel value for the pixel component from the second weighted gradient value;
obtaining a first prediction residual by subtracting the pixel value of the pixel component from the reference pixel value;
and acquiring a first residual absolute value sum of the MB to be predicted according to the first prediction residual.
3. The method of claim 2, wherein obtaining the first weighted gradient value for the pixel component comprises:
determining N texture direction gradient values of the pixel component through the surrounding components of the pixel component, wherein N is a natural number greater than zero;
and weighting the texture direction gradient value of each pixel component by using a first weighting coefficient to obtain a first weighted gradient value of each pixel component.
4. The method of claim 2, wherein determining the reference pixel value for the pixel component from the second weighted gradient value comprises:
determining a reference direction of the pixel component by a minimum value of the second weighted gradient value;
weighting the component pixel values in the reference direction by using a third weighting coefficient to obtain reference pixel values of the pixel components; wherein the content of the first and second substances,
the step of determining the reference direction of the pixel component by the minimum value of the second weighted gradient value includes:
taking the minimum value of the second weighted gradient values BG 'to obtain the optimal value BG' bst of the second weighted gradient value of each pixel component,
the direction corresponding to the optimal value BG "bst of the second weighted gradient value is the reference direction of the pixel component.
5. The method of claim 1, wherein obtaining the sum of absolute values of the second residual of the MB to be predicted by using the second prediction residual of the MB to be predicted comprises:
partitioning the MB to be predicted into a plurality of sub-MBs to be predicted by utilizing a quadtree method;
respectively obtaining a prediction residual error and a first bit number of the MB to be predicted and a prediction residual error and a second bit number of the sub-MB to be predicted;
determining a second prediction residual of the MB to be predicted according to the prediction residual and the first bit number of the MB to be predicted and the prediction residual and the second bit number of the sub-MB to be predicted;
judging whether the to-be-predicted sub MB is continuously divided, if so, continuously dividing the to-be-predicted sub MB according to a quadtree algorithm, otherwise, ending the division of the to-be-predicted sub MB, and obtaining a second residual absolute value sum of the to-be-predicted MB through a second prediction residual of the to-be-predicted sub MB; wherein the content of the first and second substances,
the calculation formula of the first bit number MBIT1 of the MB to be predicted is:
MBIT1=M*BIT_MIN1+2*BITDETH,
BIT _ MIN1 is the first minimum BIT number, BITDEPTH is the data BIT depth of the MB to be predicted, and M is the number of pixel components in the MB to be predicted;
the calculation formula of the second bit number MBIT2 of the MB to be predicted is:
MBIT2=N1*BIT_MIN2+N2*BIT_MIN3+N3*BIT_MIN4+N4*BIT_MIN5+2*BITDETH
BIT _ MIN2 is the second minimum BIT number, BIT _ MIN3 is the third minimum BIT number, BIT _ MIN4 is the fourth minimum BIT number, BIT _ MIN5 is the fifth minimum BIT number, bittemp is the data BIT depth of the MB to be predicted, N1 is the number of pixel components in the first sub-MB to be predicted, N2 is the number of pixel components in the second sub-MB to be predicted, N3 is the number of pixel components in the third sub-MB to be predicted, and N4 is the number of pixel components in the fourth sub-MB to be predicted;
subtracting the minimum value of the pixel component values in the MB to be predicted from all the pixel component values in the MB to be predicted respectively to obtain prediction residuals corresponding to all the pixel components in the MB to be predicted; wherein the content of the first and second substances,
the first minimum bit number is a difference value between a maximum value of a pixel component in the MB to be predicted and a minimum value of the pixel component in the MB to be predicted;
the second minimum bit number is a difference value between a maximum value of a pixel component in the first to-be-predicted sub-MB and a minimum value of the pixel component in the first to-be-predicted sub-MB;
the third minimum bit number is a difference value between a maximum value of a pixel component in the second to-be-predicted sub-MB and a minimum value of the pixel component in the second to-be-predicted sub-MB;
the fourth minimum bit number is a difference value between a maximum value of a pixel component in the third to-be-predicted sub-MB and a minimum value of the pixel component in the third to-be-predicted sub-MB;
the fifth minimum bit number is a difference value between a maximum value of a pixel component in the fourth to-be-predicted sub MB and a minimum value of the pixel component in the fourth to-be-predicted sub MB.
6. The method of claim 5, wherein obtaining the prediction residual and the first number of bits of the MB to be predicted and the prediction residual and the second number of bits of the sub-MB to be predicted respectively comprises:
subtracting the minimum value of the pixel component values in the MB to be predicted from all the pixel component values in the MB to be predicted respectively to obtain prediction residuals corresponding to all the pixel components in the MB to be predicted;
determining the first bit number by using a first minimum bit number of the MB to be predicted, a data bit depth of the MB to be predicted and the number of pixel components of the MB to be predicted;
subtracting the minimum value of the pixel component values in the sub-MB to be predicted from all the pixel component values in the sub-MB to be predicted respectively to obtain prediction residuals corresponding to all the pixel components in the sub-MB to be predicted;
determining a second bit number by using the second minimum bit number of the sub-MB to be predicted, the data bit depth of the sub-MB to be predicted and the number of pixel components of the sub-MB to be predicted; wherein the content of the first and second substances,
obtaining the first minimum bit number by the difference value between the maximum value of the pixel component in the MB to be predicted and the minimum value of the pixel component in the MB to be predicted; and obtaining a second minimum bit number by a second difference value between the maximum value of the pixel component in the first to-be-predicted sub-MB and the minimum value of the pixel component in the first to-be-predicted sub-MB.
7. The method according to claim 1, wherein determining a final prediction method for the MB to be predicted according to the first residual subjective sum and the second residual subjective sum comprises:
and selecting the minimum value of the first residual subjective sum and the second residual subjective sum, and determining the final prediction method of the MB to be predicted according to the minimum value.
CN201811260616.7A 2018-10-26 2018-10-26 Prediction method based on video compression Active CN109561303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811260616.7A CN109561303B (en) 2018-10-26 2018-10-26 Prediction method based on video compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811260616.7A CN109561303B (en) 2018-10-26 2018-10-26 Prediction method based on video compression

Publications (2)

Publication Number Publication Date
CN109561303A CN109561303A (en) 2019-04-02
CN109561303B true CN109561303B (en) 2020-12-15

Family

ID=65865385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811260616.7A Active CN109561303B (en) 2018-10-26 2018-10-26 Prediction method based on video compression

Country Status (1)

Country Link
CN (1) CN109561303B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281434A (en) * 2010-06-10 2011-12-14 ***通信集团公司 Video compression method and equipment
CN102595135A (en) * 2012-02-24 2012-07-18 中国科学技术大学 Method and device for scalable video coding
CN102917197A (en) * 2011-08-04 2013-02-06 想象技术有限公司 External vectors in a motion estimation system
CN103517069A (en) * 2013-09-25 2014-01-15 北京航空航天大学 HEVC intra-frame prediction quick mode selection method based on texture analysis
CN106034235A (en) * 2015-03-11 2016-10-19 杭州海康威视数字技术股份有限公司 Method for calculating coding distortion degree and coding mode control and system thereof
CN107509076A (en) * 2017-08-25 2017-12-22 中国软件与技术服务股份有限公司 A kind of Encoding Optimization towards ultra high-definition video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013028121A1 (en) * 2011-08-25 2013-02-28 Telefonaktiebolaget L M Ericsson (Publ) Depth map encoding and decoding

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281434A (en) * 2010-06-10 2011-12-14 ***通信集团公司 Video compression method and equipment
CN102917197A (en) * 2011-08-04 2013-02-06 想象技术有限公司 External vectors in a motion estimation system
CN102595135A (en) * 2012-02-24 2012-07-18 中国科学技术大学 Method and device for scalable video coding
CN103517069A (en) * 2013-09-25 2014-01-15 北京航空航天大学 HEVC intra-frame prediction quick mode selection method based on texture analysis
CN106034235A (en) * 2015-03-11 2016-10-19 杭州海康威视数字技术股份有限公司 Method for calculating coding distortion degree and coding mode control and system thereof
CN107509076A (en) * 2017-08-25 2017-12-22 中国软件与技术服务股份有限公司 A kind of Encoding Optimization towards ultra high-definition video

Also Published As

Publication number Publication date
CN109561303A (en) 2019-04-02

Similar Documents

Publication Publication Date Title
JP5752809B2 (en) Perform smoothing operations adaptively
CN110741640B (en) Optical flow estimation for motion compensated prediction in video coding
JP4555758B2 (en) Coding mode selection method for intra prediction in video compression
CN111066326A (en) Machine learning video processing system and method
JP6807987B2 (en) Image coding device, moving image decoding device, moving image coding data and recording medium
US20100166073A1 (en) Multiple-Candidate Motion Estimation With Advanced Spatial Filtering of Differential Motion Vectors
KR101621358B1 (en) Hevc encoding device and method for deciding intra prediction mode for the same
JPH08322052A (en) Method and apparatus for predicting and coding video information
US20150208094A1 (en) Apparatus and method for determining dct size based on transform depth
CN111193924B (en) Method and device for determining video code rate, computer equipment and storage medium
JP6348742B2 (en) Inter-picture prediction method and device, and corresponding encoding method and apparatus
Shi et al. Adaptive direction search algorithms based on motion correlation for block motion estimation
CN113507609B (en) Interframe image parallel coding method based on time-space domain prediction
JP4806172B2 (en) Apparatus and method for compressing digital source images
CN109547788B (en) Image compression method, equipment and image transmission system
CN109413421B (en) Video encoding method, video encoding apparatus, video decoding method, and video decoding apparatus
CN109561303B (en) Prediction method based on video compression
CN111107344A (en) Video image coding method and device
TWI698118B (en) Image interpolation method and image encoding method
CN109510995B (en) Prediction method based on video compression
CN109587481B (en) Video encoding method and apparatus
CN109413435B (en) Prediction method based on video compression
CN109660793B (en) Prediction method for bandwidth compression
CN109495739B (en) Image encoding method and apparatus thereof
CN109361924B (en) Image coding method and 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
TA01 Transfer of patent application right

Effective date of registration: 20201127

Address after: No. 02, 1701, No. 17, Zhujiang West Road, Tianhe District, Guangzhou City, Guangdong Province

Applicant after: GUANGDONG HONGSHI DIGITAL MEDIA Co.,Ltd.

Address before: 710065 No. 86 Leading Times Square (Block B), No. 2, Building No. 1, Unit 22, Room 12202, No. 51, High-tech Road, Xi'an High-tech Zone, Shaanxi Province

Applicant before: Xi'an Cresun Innovation Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant