CN109547783B - Video compression method based on intra-frame prediction and equipment thereof - Google Patents
Video compression method based on intra-frame prediction and equipment thereof Download PDFInfo
- Publication number
- CN109547783B CN109547783B CN201811260507.5A CN201811260507A CN109547783B CN 109547783 B CN109547783 B CN 109547783B CN 201811260507 A CN201811260507 A CN 201811260507A CN 109547783 B CN109547783 B CN 109547783B
- Authority
- CN
- China
- Prior art keywords
- image block
- intra
- pixel
- current image
- prediction mode
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000006835 compression Effects 0.000 title claims abstract description 31
- 238000007906 compression Methods 0.000 title claims abstract description 31
- 238000005070 sampling Methods 0.000 claims description 43
- 230000011218 segmentation Effects 0.000 claims description 23
- 230000005540 biological transmission Effects 0.000 claims description 4
- 238000000354 decomposition reaction Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 21
- 239000000126 substance Substances 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods 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/103—Selection of coding mode or of prediction mode
- H04N19/11—Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention relates to a video compression method and device based on intra-frame prediction, which comprises the steps of collecting image frames in an input video; decomposing the image frame into a plurality of image blocks; acquiring texture information of a current image block according to the pixel value depth of the image frame; selecting an estimated intra-frame prediction mode of the current image block according to the texture information; and predicting the current image block according to the predicted intra-frame prediction mode to obtain a prediction residual error. The present invention selects one intra prediction mode among a plurality of intra prediction modes as an intra prediction mode for use in image prediction of a current image block. The encoding method does not need to poll each prediction mode, predicts an optimal mode, reduces a large amount of calculation, and further improves the encoding compression rate of the video image.
Description
Technical Field
The present invention relates to the field of compression technologies, and in particular, to a video compression method and apparatus based on intra prediction.
Background
With the continuous development of science and technology, the daily life of people is greatly changed by information technology and computer internet respectively. Nowadays, people mainly obtain information from multimedia information, and the multimedia information is centered on video. Colorful video contents are generated every moment, and the video quantity is exponentially and explosively increased. According to YouTube statistics, the video volume uploaded by a user every minute reaches more than 300 hours; according to Bell laboratory prediction, the audio and video data flow accounts for 80% of the newly added flow in 2020, and various indications show that the video data becomes big data in big data, and people are in a multimedia era surrounded by massive audio and video data. In order to save storage space and reduce transmission bandwidth occupancy, video compression coding processing is generally required.
Video pictures can be compression coded because of the redundancy in the picture data. The purpose of compression coding is to reduce the number of bits required to represent image data by removing these data redundancies. The video compression coding technology mainly comprises four parts, including: the device comprises a prediction module, a quantization module, a code control module and an entropy coding module. The prediction module is used as an important module for predicting the current pixel value according to the information of the adjacent pixels by utilizing the spatial redundancy existing between the adjacent pixels.
With the increasing of video image data, how to select an optimal prediction mode for a current image block according to image information so as to improve the efficiency of compression coding becomes an urgent problem to be solved.
Disclosure of Invention
Therefore, to solve the technical defects and shortcomings of the prior art, the present invention provides a video compression method based on intra-frame prediction and an apparatus thereof.
Specifically, an embodiment of the present invention provides a video compression method based on intra prediction, including:
collecting image frames in an input video;
decomposing the image frame into a plurality of image blocks;
acquiring texture information of a current image block according to the pixel value depth of the image frame;
selecting an estimated intra-frame prediction mode of the current image block according to the texture information;
and predicting the current image block according to the predicted intra-frame prediction mode to obtain a prediction residual error.
In an embodiment of the present invention, obtaining texture information of a current image block according to a depth of a pixel value of the image frame includes:
calculating the pixel component gradient of the current image block according to the pixel value depth of the image frame;
and determining the texture information of the current image block according to the pixel component gradient.
In an embodiment of the present invention, before selecting the prediction intra prediction mode of the current image block according to the texture information, the method further includes:
preselecting a plurality of intra-frame prediction modes as an intra-frame prediction mode set; the intra-frame prediction mode set comprises an intra-frame prediction mode based on pixel component inflection point sampling, an intra-frame prediction mode based on a multi-search window and an intra-frame prediction mode based on self-adaptive segmentation.
In an embodiment of the present invention, predicting the current image block according to the predicted intra prediction mode to obtain a predicted residual includes:
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on pixel component inflection point sampling, predicting the current image block by using the intra-frame prediction mode based on pixel component inflection point sampling to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on multiple search windows, predicting the current image block by using the intra-frame prediction mode based on the multiple search windows to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is the intra-frame prediction mode based on the self-adaptive segmentation, the intra-frame prediction mode based on the self-adaptive segmentation is utilized to predict the current image block to obtain the prediction residual of each pixel component in the current image block.
In an embodiment of the present invention, after predicting the current image block according to the predicted intra prediction mode to obtain a prediction residual, the method further includes:
and transmitting the prediction residual of each pixel component in the current image block and the index mark of the prediction intra-frame prediction mode corresponding to the current image block into a code stream.
Another embodiment of the present invention provides an intra prediction based video compression apparatus, including:
the acquisition module is used for acquiring image frames in the input video;
the decomposition module is used for decomposing the image frame into a plurality of image blocks;
the acquisition module is used for acquiring texture information of the current image block according to the pixel value depth of the image frame;
the selection module is used for selecting the pre-estimated intra-frame prediction mode of the current image block according to the texture information;
and the intra-frame prediction module is used for predicting the current image block according to the pre-estimated intra-frame prediction mode to obtain a prediction residual error.
In an embodiment of the present invention, the obtaining module is specifically configured to:
calculating the pixel component gradient of the current image block according to the pixel value depth of the image frame;
and determining the texture information of the current image block according to the pixel component gradient.
In one embodiment of the present invention, the system further comprises a preselection module, configured to preselect a plurality of intra prediction modes as an intra prediction mode set; the intra-frame prediction mode set comprises an intra-frame prediction mode based on pixel component inflection point sampling, an intra-frame prediction mode based on a multi-search window and an intra-frame prediction mode based on self-adaptive segmentation.
In an embodiment of the present invention, the intra prediction module is specifically configured to:
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on pixel component inflection point sampling, predicting the current image block by using the intra-frame prediction mode based on pixel component inflection point sampling to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on multiple search windows, predicting the current image block by using the intra-frame prediction mode based on the multiple search windows to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is the intra-frame prediction mode based on the self-adaptive segmentation, utilizing the self-based prediction mode
Predicting the current image block in an intra-frame prediction mode adaptive to segmentation to obtain each image block in the current image block
Prediction residual of pixel components
In an embodiment of the present invention, the image processing apparatus further includes a transmission module, configured to transmit the prediction residual of each pixel component in the current image block and the index flag of the predicted intra prediction mode corresponding to the current image block to a code stream.
Based on this, the invention has the following advantages:
the present invention selects one intra prediction mode among a plurality of intra prediction modes as an intra prediction mode for use by a current image block in image prediction. The encoding method does not need to poll each prediction mode, predicts an optimal mode, reduces a large amount of calculation, and further improves the encoding compression rate of the video image.
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 flowchart illustrating a video compression method based on intra prediction according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an acquisition of a pixel component inflection point according to an embodiment of the present invention;
fig. 3(a) and fig. 3(b) are a schematic diagram of a pixel index and a schematic diagram of a reconstructed pixel search number of a horizontal stripe prediction search window according to an embodiment of the present invention;
fig. 4(a) and fig. 4(b) are a schematic diagram of a pixel index and a schematic diagram of a reconstructed pixel search number of a vertical stripe prediction search window according to an embodiment of the present invention;
fig. 5(a) and fig. 5(b) are a schematic diagram of pixel index and a schematic diagram of reconstructed pixel search number of a rectangular prediction search window according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a method for predicting position sub-weights in a search window according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a segmentation provided by an embodiment of the present invention;
fig. 8 is a schematic diagram of an intra prediction based video compression apparatus 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 flowchart illustrating a video compression method based on intra prediction according to an embodiment of the present invention; the present embodiment describes a video compression method based on intra prediction in detail, which includes the following steps:
the video is a continuous image frame sequence, and before compression coding, the video usually acquires image frames in the input video, and compression coding is performed on each image frame.
in order to improve the compression encoding accuracy of an image frame, the image frame is usually decomposed into a plurality of image blocks and processed, that is, the image is compression-encoded in units of image blocks. Each image block may be a block having the same size or a block having a different size. Each image block comprises a plurality of pixels, each pixel comprising a plurality of pixel components. The multiple pixel components of each pixel are usually subjected to a separation process, that is, in a logic process, each image frame defaults to only contain one pixel component, for example, the pixel has three pixel components RGB, and three pixel components in the pixel are separated, and each image frame defaults to only contain an R pixel component, or only contain a G pixel component, or only contain a B pixel component. Only the R pixel component or the G pixel component or the B pixel component in the image is encoded at each encoding. The general encoding mode encodes only one pixel component in an image frame at a time, unless otherwise specified.
the method comprises the steps of obtaining the pixel value depth of pixel components in an image frame, obtaining the pixel value size of each pixel component, calculating the pixel value difference value of every two adjacent pixel components in a current image block, and obtaining the pixel component gradient of each current image block according to the pixel value difference value of every two adjacent pixel components. The specific calculation formula is as follows:
wherein, Grad represents the gradient of the pixel component of each current image block, i represents the position index of the pixel component in the current image block, P represents the pixel value of the pixel component in the current image block, and ABS represents absolute value operation. When the value of i is 0, the value represents the pixel component with the position index of 0, i.e. the first pixel component of the first row, and at this time, P is seti-1Is taken as P0I.e. Pi-Pi-1=P0-P0Furthermore, the processing method of the first pixel component of other lines is the same.
Specifically, the maximum pixel value difference of two pixel components in the current image block is determined according to the pixel value depth of each pixel component in the current image block; for example, if the depth of the pixel value of each pixel component is 9, the range of the pixel value of each pixel component is 0 to 511, and the maximum difference of the pixel values of two pixel components in the current image block is 511, the range of the difference of the pixel values of two pixel components in the current image block is 0 to 511. Setting gradient grading according to the maximum pixel value difference value of two pixel components in the current image block, wherein the gradient grading can be divided into a plurality of grade intervals, and each grade interval can be equal or unequal; preferably, the first threshold and the second threshold are set, and the first threshold and the second threshold can be manually set according to requirements. Classifying the pixel value difference range interval smaller than a first threshold value into a first level interval; classifying the pixel value difference range interval which is larger than the first threshold and smaller than the second threshold into a second level interval; and classifying the pixel value difference range interval which is larger than the second threshold and smaller than the maximum pixel value difference into a third level interval. Calculating the pixel component gradient of the current image block according to a formula, and judging the level interval where the pixel component gradient of the current image block is located; and determining the texture information of the current image block according to the level interval of the pixel component gradient of the current image block. Specifically, if the pixel component gradient of the current image block is in the first-level interval, the texture information of the current image block is simple texture information; if the pixel component gradient of the current image block is in the second-level interval, the texture information of the current image block is general texture information; and if the pixel component gradient of the current image block is in the third level interval, the texture information of the current image block is complex texture information.
the intra-frame prediction mode set comprises an intra-frame prediction mode based on pixel component inflection point sampling, an intra-frame prediction mode based on a multi-search window and an intra-frame prediction mode based on self-adaptive segmentation.
Preferably, the intra-frame prediction mode set may include a plurality of intra-frame prediction modes, and the number of intra-frame prediction modes may be set according to user requirements.
Furthermore, the intra-frame prediction mode based on pixel component inflection point sampling is suitable for general complexity texture information, the intra-frame prediction mode based on multiple search windows is suitable for complexity texture information, and the intra-frame prediction mode based on self-adaptive segmentation is suitable for simple complexity texture information.
if the texture information is simple texture information, selecting an intra-frame prediction mode based on self-adaptive segmentation suitable for the simple complexity texture information as an estimated intra-frame prediction mode of the current image block;
if the texture information is general texture information, selecting an intra-frame prediction mode which is suitable for general complexity texture information and is based on pixel component inflection point sampling as an estimated intra-frame prediction mode of the current image block;
and if the texture information is complex texture information, selecting an intra-frame prediction mode based on multiple search windows and suitable for the complex texture information as an estimated intra-frame prediction mode of the current image block.
if the predicted intra-frame prediction mode is the intra-frame prediction mode based on pixel component inflection point sampling, predicting the current image block by using the intra-frame prediction mode based on pixel component inflection point sampling to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is the multi-search-window-based intra-frame prediction mode, predicting the current image block by using the multi-search-window-based intra-frame prediction mode to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is the intra-frame prediction mode based on the self-adaptive segmentation, the intra-frame prediction mode based on the self-adaptive segmentation is utilized to predict the current image block to obtain the prediction residual error of each pixel component in the current image block.
And 7, transmitting the prediction residual of each pixel component in the current image block and the index mark of the pre-estimated intra prediction mode corresponding to the current image block into a code stream.
In the embodiment, one of the multiple preset intra-frame prediction modes is selected as the prediction mode of the current image block during compression coding. The compression method does not need to poll each intra-frame prediction mode, reduces a large amount of calculation, and further improves the coding compression rate of the video image.
Example two
In this embodiment, on the basis of the above embodiments, the intra prediction method based on pixel component inflection point sampling proposed by the present invention is described in detail. The method comprises the following steps:
Acquiring the size of an image block m × n, namely m × n pixel components in the image block, wherein m is more than or equal to 1, and n is more than or equal to 1;
in the present embodiment, the size of the image block is 16 × 1 pixel components, and the same applies to other image blocks with different sizes. As shown in fig. 2, fig. 2 is a schematic diagram illustrating an obtaining of a pixel component inflection point according to an embodiment of the present invention; the pixel values of 16 × 1 pixel components in the image block are set to 12, 14, 15, 18, 20, 23, 15, 10, 4, 0, 2, 4, 5, and 6 in order from left to right.
step 201, detecting texture gradual change of the image block according to the texture correlation existing in the image block, determining texture gradual change points of the image block, and setting the texture gradual change points of the image block as pixel value inflection points of pixel components.
Specifically, the pixel value of the current pixel component in the current image block is subtracted from the pixel value of the adjacent pixel component in the current image block, as shown in fig. 2, the pixel value of the current pixel component in the current image block is subtracted from the pixel value of the previous pixel component in the current image block, and the pixel residual value of the current image block is solved. The pixel residual values at the corresponding positions in the current image block are 12, 2, 1, 3, 2, 3, -8, -5, -6, -4, 2, 0, 2, 1, 0 and 1 from left to right in sequence.
Step 202, setting the last value of consecutive positive values or consecutive negative values in the pixel component residual values as a pixel value inflection point of the pixel component, wherein the value of the pixel component residual value 0 is not set as the pixel value inflection point.
Step 203, setting the position corresponding to the current pixel component corresponding to the pixel value inflection point of the pixel component as a sampling point, and setting the points at the first and last positions in the current pixel component as sampling points.
Preferably, as shown in fig. 2, the pixel value inflection points in the obtained pixel component residual values are 3 and-4, and the current pixel components 23 and 0 and the first and last pixel components corresponding to the pixel value inflection point 3 and the pixel value inflection point-4 are set as sampling points. The pixel components 12, 23, 0, and 6 corresponding to the original point form 4 sampling points.
And 3, predicting the sampling point in the current image block and the image block right above the sampling point. The prediction modes are 135-degree prediction, 45-degree prediction and 90-degree prediction. The method comprises the steps of respectively predicting a sampling point in a current image block and a 45-degree pixel component point, a 90-degree pixel component point and a 135-degree pixel component point corresponding to the sampling point in an adjacent image block right above the current image block, and solving a prediction residual error and a Sum of Absolute Differences (SAD) of the residual error. Specifically, the sampling point in the current image block and the 45-degree pixel component point, the 90-degree pixel component point and the 135-degree pixel component point corresponding to the sampling point in the adjacent image block right above the current image block may be subtracted, respectively, to obtain a prediction residual error; and respectively taking absolute values of the prediction residuals of each sampling point under each prediction mode, and adding the absolute values to obtain the sum of absolute values of the residuals. And finally, selecting a prediction mode with the minimum SAD as a sampling point prediction mode of the current image block to obtain a prediction residual error of the prediction mode.
Resi=(sample1-sample0)*(i+1)/(num+1)
sample0 and sample1 in the formula are pixel component reconstruction values of consecutive sample points of the current image block, i is an index of a non-sample point, and num is the number of the non-sample points.
Further, the pixel component reconstruction value may refer to a pixel component value reconstructed by the decoding end of the compressed encoded image block.
Further, when the size of the image block is 8 × 2 pixel components, that is, the current image block has two rows and eight columns of pixel components, the pixel components in the first row and the second row are sequentially arranged from left to right according to sequence numbers from 0 to 8, and each sequence number position corresponds to one pixel component in each row.
And acquiring a final sampling mode and a final prediction residual of a first row of pixel components of the current image block according to the modes of the step 2 to the step 4, and continuously repeating the step 2 to the step 4 to acquire a final sampling mode and a final prediction residual of a second row of pixel components of the current image block, wherein the prediction residual of second row sampling points can be predicted according to the second row sampling points and a point at a vertical position in an adjacent current image block right above the current image block, and can also be predicted according to the second row sampling points and a point at a vertical position in the first row of the current image block.
When a compressed image with a general and complex texture is processed by the intra-frame prediction mode adopted in the embodiment, the prediction residual is obtained by self-adapting the texture characteristics of the current image block according to the gradient principle of the texture for the current image block at the boundary of the texture of the image to be compressed and encoded, so that the problem that the correlation between the peripheral image block and the current image block is poor and a small prediction residual cannot be obtained is avoided, the precision of the prediction residual can be improved, the theoretical limit entropy is further reduced, and the bandwidth compression ratio is increased.
EXAMPLE III
In this embodiment, based on the above embodiments, the intra prediction method based on multiple search windows proposed by the present invention is described in detail. The method comprises the following steps:
101. a plurality of predicted search windows is determined.
Referring to fig. 3 to 5, fig. 3 to 5 are schematic diagrams of pixel indexes and numbers of reconstructed pixels of three prediction search windows according to an embodiment of the present invention. Fig. 3(a) and fig. 3(b) are a schematic diagram of a pixel index and a schematic diagram of a reconstructed pixel search number of a horizontal stripe prediction search window according to an embodiment of the present invention; fig. 4(a) and fig. 4(b) are a schematic diagram of a pixel index and a schematic diagram of a reconstructed pixel search number of a vertical stripe prediction search window according to an embodiment of the present invention; fig. 5(a) and fig. 5(b) are a schematic diagram of pixel index and a schematic diagram of reconstructed pixel search number of a rectangular prediction search window according to an embodiment of the present invention. The present embodiment refers to the multiple pixel components of each pixel in the image block, that is, when processing each pixel component of one pixel component in each image block, the corresponding pixel component in the G category and the B category is referred to when processing each pixel component of the R category in the pixel, for example, each pixel has three pixel components RGB.
In the video image pixel region, use CijRepresenting the currently encoded pixel, PijRepresenting the encoded reconstructed pixels. Where ij is the position index of the current encoded pixel or reconstructed pixel. A plurality of sliding windows are set as the prediction search windows, and the shapes of the prediction search windows can be horizontal strips, vertical strips, L-shaped, cross-shaped, T-shaped, rectangular and the like. Predicting the size of the search window according toThe texture characteristics of the frequency image and the demand of the prediction precision are determined, a smaller prediction search window can be set for the video image with thinner texture or higher demand of the prediction precision, and a larger prediction search window can be set for the video image with thicker texture or lower demand of the prediction precision.
With reference to fig. 3 to 5, in the embodiment of the present invention, a plurality of prediction search windows with the same size and different shapes are set, for example, a first prediction search window, a second prediction search window, and a third prediction search window, respectively. The first prediction search window is a horizontal bar prediction search window, the window is in the shape of a horizontal bar, the second prediction search window is a vertical bar prediction search window, the window is in the shape of a vertical bar, the third prediction search window is a rectangular prediction search window, and the window is in the shape of a rectangle. The three prediction search windows are the same in size and each contain K pixels. Preferably, the plurality of prediction search windows each contain 8 pixels. E.g. in a first prediction search window, i.e. a horizontal stripe prediction search window, the currently encoded pixel CijAt the rightmost position, the other positions in the first prediction search window are encoded K-1 reconstructed pixels Pi-1,j、Pi-2,j、Pi-3,j、Pi-4,j、Pi-5,j、Pi-6,j、Pi-7,j(ii) a Within a second prediction search window, the vertical slice prediction search window, the currently encoded pixel CijAt the lowest position, and the other positions in the second prediction search window are the encoded K-1 reconstructed pixels Pi,j-1、Pi,j-2、Pi,j-3、Pi,j-4、Pi,j-5、Pi,j-6、Pi,j-7(ii) a Within a third, rectangular prediction search window, the currently encoded pixel CijAt the lower right corner, and the other positions in the third prediction search window are encoded K-1 reconstructed pixels Pi-1,j、Pi-2,j、Pi-3,j、Pi,j-1、Pi-1,j-1、Pi-2,j-1、Pi-3,j-1. At the current coding pixel CijWhen coding, according to the first prediction search window and the second prediction search window respectivelyAnd the reconstruction values NewData (P) of K-1 reconstructed pixels in the third prediction search window to predict the current coding pixel CijReconstructed value of (C) NewDataij) Three reconstructed values NewData1 (C) are obtainedij)、NewData2(Cij)、NewData3(Cij) Wherein NewData1 (C)ij) For the current coded pixel C calculated in the first prediction search windowijFirst reconstructed value of (a), NewData2 (C)ij) For the current coded pixel C calculated in the second prediction search windowijSecond reconstructed value of (1), NewData3 (C)ij) For the current coded pixel C calculated in the third prediction search windowijAnd (3) a third reconstructed value.
In the embodiment of the invention, in each prediction search window, the current coding pixel C is predicted according to the reconstruction values of K-1 reconstruction pixelsijWhen the reconstruction value is obtained, sequentially numbering K-1 reconstruction pixels in the prediction search window into 0, 1, 2, K0、P1、P2、...Pk...、PK-2A sequential search is performed. For example, the first prediction search window of the embodiment of the present invention includes 7 reconstructed pixels arranged along the horizontal direction, the 7 reconstructed pixels are numbered from left to right, the number is from 0 to 6, and the 6 reconstructed pixels P are numbered0、P1、P2、P3、P4、P5、P6From the reconstructed pixel P numbered 00The search is started until the reconstructed pixel P with number 6 is searched6Looking for the currently encoded pixel CijThe first prediction residual is calculated. The second prediction search window contains 7 reconstruction pixels which are arranged along the vertical direction, the 7 reconstruction pixels are numbered from top to bottom, the number is from 0 to 6, and the 6 reconstruction pixels P are numbered0、P1、P2、P3、P4、P5、P6From the reconstructed pixel P numbered 00The search is started until the reconstructed pixel P with number 6 is searched6Looking for the currently encoded pixel CijAnd calculating a second prediction residual. The third prediction search window contains 7 weightsThe reconstruction pixels are arranged in a 4 x 2 matrix, 7 reconstruction pixels are numbered from 0 to 6, and 6 reconstruction pixels P are numbered0、P1、P2、P3、P4、P5、P6From the reconstructed pixel P numbered 00The search is started until the reconstructed pixel P with number 6 is searched6Looking for the currently encoded pixel CijAnd calculating a third prediction residual. Calculating the current coding pixel C in a plurality of prediction search windows respectivelyijThe method of predicting a plurality of residuals is described as follows.
102. Determining a currently encoded pixel CijN kinds of pixel components.
Setting a currently encoded pixel CijComprising N pixel components ofWherein N is a natural number greater than 1,representing the currently encoded pixel CijThe nth pixel component of (1). For example, the currently encoded pixel CijMay comprise 3 pixel components rgbb, or 4 pixel components rgbw, or 3 pixel components lpa B, or 3 pixel components YUV, or 4 pixel components cemyk.
103. Computing a currently encoded pixel C within a plurality of prediction search windowsijA plurality of weights Wij. The plurality of weights includes a first weight, a second weight, and a third weight. Current coded pixel C calculated within a first predictive search window, such as a horizontal stripe predictive search windowijWeight W ofijFor the first weight, the current coded pixel C is calculated in a second prediction search window, such as a vertical slice prediction search windowijWeight W ofijFor the second weight, the current coded pixel C calculated in a third prediction search window, e.g. a rectangular prediction search windowijWeight W ofijIs the third weight. In particular, the current coded pixel C is calculated within each prediction windowijWeight W ofijThe method of (1) is as follows:
within the prediction search window, corresponding to K-1 encoded reconstructed pixels P0、P1、P2、...Pk...、PK-2Weight WijComprising K-1 sub-weights, i.e.
Wij={Wij、0,Wij、1,Wij、2,...Wij、k...,Wij、K-2}
Wherein, Wij、kFor the currently coded pixel CijCorresponding to the encoded reconstructed pixel PkSub-weights of (c). Sub-weight Wij、kFor the currently coded pixel CijOf N pixel componentsRelative reconstructed pixel PkOf N pixel componentsN component weight ofThe result of the weighted summation is
Wherein the content of the first and second substances,for the currently coded pixel CijOf the nth pixel componentRelative reconstructed pixel PkOf the nth pixel componentThe weight of the component(s) of (c),are component weighted values and satisfyIn one embodiment of the present invention,is taken asIn another embodiment of the invention, the pixel components are based onRespectively with N kinds of pixel componentsIs determined according to the distance, the closer the distance is, the corresponding distance isThe larger; in yet another embodiment of the invention, the determination is empirically determinedThe value of (a).
In the embodiment of the invention, the current coding pixel CijWeight W ofijFrom the currently coded pixel CijDiff weight DIF ofijAnd (4) determining. Corresponding to K-1 encoded reconstructed pixels P0、P1、P2、...Pk...、PK-2Difference degree weight DIFijWith K-1 diff sub-weights DIFij、kI.e. by
DIFij={DIFij、0,DIFij、1,DIFij、2,...DIFij、k...,DIFij、K-2}
In one embodiment, the method for determining the weight comprises the following steps:
1031. calculating the currently encoded pixel CijPixel component ofComponent disparity weighting with respect to pixel components of reconstructed pixelsEach pixel componentComponent difference degree weight ofWith K-1 component difference degree sub-weightsNamely, it is
Wherein the component difference degree sub-weightAccording to the current coding pixel CijPixel component ofAnd a reconstructed pixel PkPixel component ofIs determined.
Preferably, in the embodiment of the present invention, the component difference degree sub-weightAs pixel componentsOriginal value ofAnd reconstructing the pixel componentsIs a reconstructed value ofOf the absolute value of the difference, i.e.
1032. Calculating the currently encoded pixel CijWith respect to each reconstructed pixel PkSub-weight W ofij、k. Currently encoded pixel CijRelative reconstructed pixel PkSub-weight W ofij、kFor the currently coded pixel CijOf one pixel componentRelative reconstructed pixel PkOf N pixel componentsN component difference degree sub-weightsWeighted summation, i.e.
Wherein the content of the first and second substances,for the currently coded pixel CijOf the nth pixel componentRelative reconstructed pixel PkOf the nth pixel componentComponent difference degree sub-weight of,Are component weighted values and satisfyIn one embodiment of the present invention,is taken asIn another embodiment of the invention, the pixel components are based onRespectively with N kinds of pixel componentsIs determined according to the distance, the closer the distance is, the corresponding distance isThe larger; in yet another embodiment of the invention, the determination is empirically determinedThe value of (a).
1033. Calculating the currently encoded pixel CijWeight W ofij. Then the weight is
104. According to a plurality of weights WijDetermining a currently encoded pixel CijAnd calculating a plurality of prediction residuals. The plurality of reference pixels include, for example, a first reference pixel, a second reference pixel, and a third reference pixel; the plurality of prediction residuals includes, for example, a first prediction residual, a second prediction residual, and a third prediction residual. Specifically, the current is determined according to the first weightEncoded pixel CijCalculating to obtain a first prediction residual error; determining the current coding pixel C according to the second weightijCalculating to obtain a second prediction residual error; determining the current coding pixel C according to the third weightijAnd calculating to obtain a third prediction residual. Specifically, the method for calculating each prediction residual includes the following steps:
1041. according to weight WijDetermining a currently encoded pixel CijReference pixel P ofs. In particular, the slave weight W is calculated according to an optimal algorithmijK-1 sub-weights W ofij、kSelecting an optimal value, and reconstructing a pixel P corresponding to the optimal valuesAs the currently encoded pixel CijThe reference pixel of (2). The optimum value determining algorithm is, for example, a minimum weight determining algorithm, i.e. from the weight Wij={Wij、0,Wij、1,Wij、2,...Wij、k...,Wij、K-2Selecting the minimum value of the sub-weights, such as W, from K-1 sub-weights ofij、sCorresponding reconstructed pixel PsTo reconstruct the pixel PsAs the currently encoded pixel CijThe reference pixel of (2).
1042. Calculating the currently encoded pixel CijPrediction residual RES ofij. In particular, according to the reference pixel, i.e. PsReconstructed value of (N)s) Encoding a pixel C with the current pixelijOriginal value of (C) OldDataij) Calculating the currently encoded pixel CijRelative reference pixel PsPrediction residual RES ofijIs a
Wherein the content of the first and second substances, for the currently coded pixel CijN type of pixelMeasurement ofRelative reference pixel PsOf the nth pixel componentThe prediction residual of (2).
Through the steps 101-104, the current coding pixel C is found in a plurality of prediction search windowsijAnd calculating to obtain a plurality of prediction residuals. For example, finding the currently encoded pixel C within a first predictive search windowijFirst reference pixel Ps1And calculating to obtain a first prediction residual RESij1(ii) a Finding the currently encoded pixel C within the second prediction search windowijSecond reference pixel Ps2And calculating to obtain a second prediction residual RESij2(ii) a Finding the currently encoded pixel C within the third predictive search windowijThird reference pixel Ps3And calculating to obtain a third prediction residual RESij3。
105. Comparing the plurality of prediction residuals to determine an optimal prediction residual RESij_PerfAnd corresponding optimal reference pixel Ps_Perf. In a plurality of prediction residuals, e.g. a first prediction residual RESij1Second prediction residual RESij2Third prediction residual RESij3Determining the minimum prediction residual according to the minimum algorithm, and taking the minimum prediction residual as the current coding pixel CijIs best predicted residual RESij_PerfTaking the reference pixel corresponding to the minimum prediction residual as the current coding pixel CijIs optimized to the reference pixel Ps_Perf. To this end, the prediction residual for each pixel component of the currently encoded pixel may be found.
In a particular embodiment, unlike the previous embodiment, step 103 calculates the current coded pixel C within a plurality of prediction search windowsijA plurality of weights WijTime, weight WijDIF weighted by the disparity of the currently coded pixelijAnd location weight POSijAnd (4) jointly determining. Corresponding to K-1 encoded reconstructed pixels P0、P1、P2、...Pk...、PK-2Difference degree weight DIFijWith K-1 diff sub-weights DIFij、kLocation weighted POSijWith K-1 position sub-weights POSij、kI.e. by
DIFij={DIFij、0,DIFij、1,DIFij、2,...DIFij、k...,DIFij、K-2}
POSij={POSij、0,POSij、1,POSij、2,...POSij、k...,POSij、K-2}
In one embodiment, another method for determining weights comprises the steps of:
1034. computing pixel components for a currently encoded pixelComponent disparity weighting with respect to pixel components of reconstructed pixelsEach pixel componentComponent difference degree weight ofWith K-1 component difference degree sub-weightsNamely, it is
Wherein the component difference degree sub-weightAccording to the current coding pixel CijPixel component ofAnd a reconstructed pixel PkPixel component ofIs determined.
Preferably, in the embodiment of the present invention, the component difference degree sub-weightAs pixel componentsOriginal value ofAnd reconstructing the pixel componentsIs a reconstructed value ofOf the absolute value of the difference, i.e.
1035. Computing pixel components for a currently encoded pixelComponent position weighting of pixel components relative to reconstructed pixelsEach pixel componentComponent position weight ofWith K-1 component positions sub-weightsNamely, it is
Wherein the component position sub-weightsAccording to the current coding pixel CijAnd a reconstructed pixel PkIs determined.
Referring to fig. 6, fig. 6 is a schematic diagram of predicting position sub-weights in a search window according to an embodiment of the present invention. In the embodiment of the invention, the pixel C is coded by the currentijAnd a reconstructed pixel PkThe number of pixels in a space is used as the component position sub-weight DIFijn、k. Corresponding to K-1 reconstructed pixels P in the prediction search window0、P1、P2、...Pk...、PK-2E.g. with the currently coded pixel CijAdjacent reconstructed pixel P6And CijIf the number of interval pixels is 0, determining the sub-weight of the corresponding component position asReconstruction pixel P5And CijIf the number of interval pixels is 1, determining the sub-weight of the corresponding component position asSimilarly, corresponding to 7 reconstructed pixels P0、P1、P2、P3、P4、P5、P6The 7 component position sub-weights of (1):
1036. computing pixel components for a currently encoded pixelComponent weight of (2)Each pixel componentComponent weight of (2)With K-1 component sub-weightsNamely, it is
Wherein the component sub-weights areWherein the content of the first and second substances,andrespectively a difference weighted value and a position weighted value, and satisfiesIn one embodiment of the invention, takeIn another embodiment of the invention, according toIs determined to correspond toThe value of (a) is,the larger, theThe smaller; according toIs determined by the size ofThe value of (a) is,the larger, theThe smaller. In a further embodiment of the present invention,andis determined from empirical values.
1037. Calculating the currently encoded pixel CijWith respect to each reconstructed pixel PkSub-weight W ofij、k. Currently encoded pixel CijRelative reconstructed pixel PkSub-weight W ofij、kFor the currently coded pixel CijOf N pixel componentsRelative reconstructed pixel PkN kinds of imagesComponent of elementN component sub-weightsWeighted summation, i.e.
Wherein the content of the first and second substances,are component weighted values and satisfyIn one embodiment of the present invention,is taken asIn another embodiment of the invention, the pixel components are based onRespectively with N kinds of pixel componentsIs determined according to the distance, the closer the distance is, the corresponding distance isThe larger; in yet another embodiment of the invention, the determination is empirically determinedThe value of (a).
1038. Calculating the currently encoded pixel CijThe weight of (1) is then
In one embodiment, after step 105, further comprising:
106. outputting the optimal reference pixel P of the current coding pixels_PerfPosition information of (2) and optimal prediction residual RESij_Perf. Optimal reference pixel Ps_PerfMay be the optimal reference pixel Ps_PerfThe position index ij or the number s.
In summary, in the intra prediction method according to the embodiment of the present invention, a plurality of reference pixels are found by using prediction search windows with various shapes, and a plurality of prediction residuals are obtained by calculation, and an optimal prediction residual is selected from the plurality of prediction residuals. For complex texture images, the prediction effect is better, and the theoretical limit entropy is reduced.
Example four
In this embodiment, based on the above embodiments, the intra prediction method based on adaptive partitioning proposed by the present invention is described in detail. The method comprises the following steps:
s1, determining the division mode of the image block, wherein the division mode comprises horizontal division, vertical division and non-division; referring to fig. 7, fig. 7 is a schematic diagram of a partition according to an embodiment of the present invention; the invention adopts a scheme of sequentially dividing from top to bottom, the block size is divided from large to small, and the division mode of each image block is determined one by one.
S2, respectively calculating the bit number of the image block under each division mode;
s3, taking the division mode corresponding to the minimum value of the bit number of the image block as the current division mode of the image block;
s4, calculating a prediction residual error of the image block in the current division mode;
s5, when the current division mode is judged to be horizontal division or vertical division, respectively executing the step S1 on the two image blocks divided under the current division mode;
s6, when the current division mode is judged to be non-division, ending the division of the image block
And the prediction residual is obtained by respectively subtracting the minimum value of the pixel components in the image block from each pixel component.
In the embodiment, the prediction is performed through the correlation among the pixel component values of the current region, the algorithm is used for comparing the compressed data amount of the three conditions of horizontal division, vertical division and non-division, and the corresponding optimal division mode is selected for residual prediction, so that the difference between the initial image block and the predicted image block is minimized, the compression efficiency is improved, the subjective picture quality is improved, and when a simple texture image is processed, the prediction effect is good, the processing efficiency is high, and the theoretical limit entropy can be reduced.
In one embodiment, the step S2 includes:
s201, referring to fig. 7, dividing an image block into an upper image block 11 and a lower image block 12 by using a horizontal division manner, where the upper image block 11 and the lower image block 12 respectively include N pixel components;
s202, obtaining the maximum value of the pixel component of the upper image block and the minimum value of the pixel component of the upper image block in the pixel component of the upper image block;
s203, calculating the difference value between the maximum value of the pixel component of the upper image block and the minimum value of the pixel component of the upper image block, and obtaining the minimum bit number of the upper image block representing the difference value;
if the prediction residual of the upper image block needs to be determined, the minimum value of the pixel components of the upper image block is subtracted from the N pixel components of the upper image block respectively to obtain the prediction residual of all the pixel components of the upper image block.
S204, obtaining the maximum value of the lower image block pixel component and the minimum value of the lower image block pixel component in the lower image block pixel component;
s205, calculating the difference value between the maximum value of the pixel components of the lower image block and the minimum value of the pixel components of the lower image block, and obtaining the minimum bit number of the lower image block representing the difference value;
s206, obtaining the number of bits of the image block in a horizontal division mode according to the minimum number of bits of the upper image block and the minimum number of bits of the lower image block, wherein the number of bits of the image block in the horizontal division mode is as follows:
SEGud=N*BIT_MINup+N*BIT_MINdown+2*BITDEPTH,
wherein BIT _ MINup is the minimum BIT number of the upper image block, N × BIT _ minwindow is the minimum BIT number of the lower image block, and BITDEPTH is the BIT depth of the original pixel component data.
If the prediction residual of the upper image block needs to be determined, the minimum value of the pixel components of the upper image block is subtracted from the N pixel components of the upper image block respectively to obtain the prediction residual of all the pixel components of the upper image block.
And finally outputting the N prediction residual data of the upper and lower image blocks, the original pixel value of the minimum value of the pixel components in the upper and lower image blocks and the division mode if the horizontal division mode is the optimal mode.
In one embodiment, the step S2 includes:
s211, dividing an image block into a left image block 21 and a right image block 22 by adopting a vertical division mode and referring to FIG. 7, wherein the left image block and the right image block respectively comprise N pixel components;
s212, obtaining the maximum value of the pixel component of the left image block and the minimum value of the pixel component of the left image block in the pixel components of the left image block;
s213, calculating the difference value between the maximum value of the pixel component of the left image block and the minimum value of the pixel component of the left image block, and obtaining the minimum bit number of the left image block representing the difference value;
if the prediction residual of the left image block needs to be determined, the minimum value of the pixel components of the left image block is subtracted from the N pixel components of the left image block respectively to obtain the prediction residual of all the pixel components of the left image block.
S214, obtaining the maximum value of the pixel component of the right image block and the minimum value of the pixel component of the right image block in the pixel component of the right image block;
s215, calculating the difference value between the maximum value of the pixel components of the right image block and the minimum value of the pixel components of the right image block, and obtaining the minimum bit number of the right image block representing the difference value;
s216, obtaining the number of bits of the image block in a vertical division mode according to the minimum number of bits of the left image block and the minimum number of bits of the right image block, wherein the number of bits of the image block is as follows:
SEGlr=N*BIT_MINleft+N*BIT_MINright+2*BITDEPTH,
wherein, BIT _ MINleft is the minimum BIT number of the left image block, N × BIT _ MINright is the minimum BIT number of the right image block, and BITDEPTH is the BIT depth of the original pixel component data.
And if the prediction residual of the right image block needs to be determined, respectively subtracting the minimum value of the pixel components of the right image block from the N pixel components of the right image block to obtain the prediction residual of all the pixel components of the right image block.
And finally outputting the N prediction residual data of the left and right image blocks, the original pixel value of the minimum value of the pixel components in the left and right image blocks and the division mode if the vertical division mode is the optimal mode.
In one embodiment, the step S2 includes:
s221, adopting a non-division mode, referring to FIG. 7, wherein an image block 01 comprises 2N pixel components;
s222, obtaining the maximum value of the pixel component of the image block and the minimum value of the pixel component of the image block;
s223, calculating the difference value between the maximum value of the pixel component of the image block and the minimum value of the pixel component of the image block to obtain the minimum bit number of the image block representing the difference value;
s224, according to the least bit number of the image block, the bit number of the image block under the non-division mode is obtained as follows:
SUB-SEG=2N*BIT_MIN+BITDEPTH,
wherein, BIT _ MIN is the minimum BIT number of the image block, and BITDEPTH is the BIT depth of the original pixel component data.
If the prediction residual of the image block needs to be determined, respectively subtracting the minimum value of the pixel components of the image block from the 2N pixel components of the image block to obtain the prediction residual of all the pixel components of the image block.
And if the non-division mode is the optimal mode, finally outputting 2N prediction residual data of the image block, the original pixel value of the minimum value of the pixel components in the image block and the division mode.
EXAMPLE five
The present embodiment describes the video compression apparatus based on intra-frame prediction in detail based on the above-mentioned embodiment, as shown in fig. 8, fig. 8 is a schematic diagram of a video compression apparatus based on intra-frame prediction according to an embodiment of the present invention; the apparatus comprises:
the acquisition module 31 is used for acquiring image frames in an input video;
a decomposition module 32 for decomposing the image frame into a plurality of image blocks;
the obtaining module 33 is configured to obtain texture information of a current image block according to a depth of a pixel value of the image frame;
a selecting module 35, configured to select an intra prediction mode of the current image block according to the texture information;
and the intra-frame prediction module 36 is configured to predict the current image block according to the predicted intra-frame prediction mode to obtain a prediction residual.
Wherein the obtaining module is specifically configured to: calculating the pixel component gradient of the current image block according to the pixel value depth of the image frame; and determining the texture information of the current image block according to the pixel component gradient.
The system further comprises a preselection module 34, which is used for preselecting a plurality of intra-frame prediction modes as an intra-frame prediction mode set; the intra-frame prediction mode set comprises an intra-frame prediction mode based on pixel component inflection point sampling, an intra-frame prediction mode based on a multi-search window and an intra-frame prediction mode based on self-adaptive segmentation.
Wherein the intra prediction module is specifically configured to: if the predicted intra-frame prediction mode is an intra-frame prediction mode based on pixel component inflection point sampling, predicting the current image block by using the intra-frame prediction mode based on pixel component inflection point sampling to obtain a prediction residual error of each pixel component in the current image block; if the predicted intra-frame prediction mode is an intra-frame prediction mode based on multiple search windows, predicting the current image block by using the intra-frame prediction mode based on the multiple search windows to obtain a prediction residual error of each pixel component in the current image block; if the predicted intra-frame prediction mode is the intra-frame prediction mode based on the self-adaptive segmentation, the intra-frame prediction mode based on the self-adaptive segmentation is utilized to predict the current image block to obtain the prediction residual of each pixel component in the current image block.
The device also comprises a transmission module used for transmitting the prediction residual of each pixel component in the current image block and the index mark of the prediction intra-frame prediction mode corresponding to the current image block into a code stream.
In summary, the present invention has been explained by using specific examples, and the above description of the embodiments is only used to help understanding the method and the core idea of the present invention; 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 (6)
1. A method for video compression based on intra prediction, comprising:
collecting image frames in an input video;
decomposing the image frame into a plurality of image blocks;
acquiring texture information of a current image block according to the pixel value depth of the image frame;
preselecting a plurality of intra-frame prediction modes as an intra-frame prediction mode set; the intra-frame prediction mode set comprises an intra-frame prediction mode based on pixel component inflection point sampling, an intra-frame prediction mode based on a multi-search window and an intra-frame prediction mode based on self-adaptive segmentation;
selecting an estimated intra-frame prediction mode of the current image block according to the texture information;
predicting the current image block according to the predicted intra-frame prediction mode to obtain a prediction residual error,
acquiring texture information of the current image block according to the pixel value depth of the image frame, wherein the texture information comprises:
calculating the pixel component gradient of the current image block according to the pixel value depth of the image frame, wherein the pixel value depth of the pixel component in the image frame is obtained to obtain the pixel value size of each pixel component, the pixel value difference value of every two adjacent pixel components in the current image block is calculated, and the pixel component gradient of every current image block is obtained according to the pixel value difference value of every two adjacent pixel components;
determining texture information of the current image block according to the pixel component gradient of the image block, wherein the texture information comprises the steps of determining the maximum pixel value difference of two pixel components in the current image block according to the pixel value depth of each pixel component in the current image block, setting three level intervals related to gradient grading according to the maximum pixel value difference of the two pixel components in the current image block and a preset first threshold and a preset second threshold, calculating the pixel component gradient of the current image block, judging the level interval where the pixel component gradient of the current image block is located, and determining that the texture information of the current image block belongs to simple texture information, general texture information or complex texture information according to the level interval where the pixel component gradient of the current image block is located; wherein the first threshold is less than the second threshold;
selecting an estimated intra-frame prediction mode of the current image block according to the texture information, wherein the method comprises the following steps: if the texture information is simple texture information, selecting an intra-frame prediction mode based on self-adaptive segmentation suitable for the simple complexity texture information as an estimated intra-frame prediction mode of the current image block; if the texture information is general texture information, selecting an intra-frame prediction mode which is suitable for general complexity texture information and is based on pixel component inflection point sampling as an estimated intra-frame prediction mode of the current image block; and if the texture information is complex texture information, selecting an intra-frame prediction mode based on multiple search windows and suitable for the complex texture information as an estimated intra-frame prediction mode of the current image block.
2. The method of claim 1, wherein predicting the current image block according to the predicted intra prediction mode to obtain a prediction residual comprises:
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on pixel component inflection point sampling, predicting the current image block by using the intra-frame prediction mode based on pixel component inflection point sampling to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on multiple search windows, predicting the current image block by using the intra-frame prediction mode based on the multiple search windows to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is the intra-frame prediction mode based on the self-adaptive segmentation, the intra-frame prediction mode based on the self-adaptive segmentation is utilized to predict the current image block to obtain the prediction residual of each pixel component in the current image block.
3. The method of claim 1, wherein after predicting the current image block according to the predicted intra prediction mode to obtain a prediction residual, the method further comprises:
and transmitting the prediction residual of each pixel component in the current image block and the index mark of the prediction intra-frame prediction mode corresponding to the current image block into a code stream.
4. An intra prediction based video compression apparatus, comprising:
the acquisition module is used for acquiring image frames in the input video;
the decomposition module is used for decomposing the image frame into a plurality of image blocks;
the acquisition module is used for acquiring texture information of the current image block according to the pixel value depth of the image frame;
the preselection module is used for preselecting a plurality of intra-frame prediction modes as an intra-frame prediction mode set; the intra-frame prediction mode set comprises an intra-frame prediction mode based on pixel component inflection point sampling, an intra-frame prediction mode based on a multi-search window and an intra-frame prediction mode based on self-adaptive segmentation;
the selection module is used for selecting the pre-estimated intra-frame prediction mode of the current image block according to the texture information;
the intra-frame prediction module is used for predicting the current image block according to the pre-estimated intra-frame prediction mode to obtain a prediction residual error;
the acquisition module is specifically configured to:
calculating the pixel component gradient of the current image block according to the pixel value depth of the image frame, wherein the pixel value depth of the pixel component in the image frame is obtained to obtain the pixel value size of each pixel component, the pixel value difference value of every two adjacent pixel components in the current image block is calculated, and the pixel component gradient of every current image block is obtained according to the pixel value difference value of every two adjacent pixel components;
determining texture information of the current image block according to the pixel component gradient, wherein the texture information comprises the steps of determining the maximum pixel value difference of two pixel components in the current image block according to the pixel value depth of each pixel component in the current image block, setting three level intervals related to gradient grading according to the maximum pixel value difference of the two pixel components in the current image block and a preset first threshold and a preset second threshold, calculating the pixel component gradient of the current image block, judging the level interval where the pixel component gradient of the current image block is located, and determining that the texture information of the current image block belongs to simple texture information, general texture information or complex texture information according to the level interval where the pixel component gradient of the current image block is located; wherein the first threshold is less than the second threshold;
the selection module is specifically configured to: if the texture information is simple texture information, selecting an intra-frame prediction mode based on self-adaptive segmentation suitable for the simple complexity texture information as an estimated intra-frame prediction mode of the current image block; if the texture information is general texture information, selecting an intra-frame prediction mode which is suitable for general complexity texture information and is based on pixel component inflection point sampling as an estimated intra-frame prediction mode of the current image block; and if the texture information is complex texture information, selecting an intra-frame prediction mode based on multiple search windows and suitable for the complex texture information as an estimated intra-frame prediction mode of the current image block.
5. The apparatus of claim 4, wherein the intra-prediction module is specifically configured to:
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on pixel component inflection point sampling, predicting the current image block by using the intra-frame prediction mode based on pixel component inflection point sampling to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is an intra-frame prediction mode based on multiple search windows, predicting the current image block by using the intra-frame prediction mode based on the multiple search windows to obtain a prediction residual error of each pixel component in the current image block;
if the predicted intra-frame prediction mode is the intra-frame prediction mode based on the self-adaptive segmentation, the intra-frame prediction mode based on the self-adaptive segmentation is utilized to predict the current image block to obtain the prediction residual of each pixel component in the current image block.
6. The apparatus of claim 4, further comprising a transmission module, configured to transmit the prediction residual of each pixel component in the current image block and the index flag of the predicted intra prediction mode corresponding to the current image block into a code stream.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811260507.5A CN109547783B (en) | 2018-10-26 | 2018-10-26 | Video compression method based on intra-frame prediction and equipment thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811260507.5A CN109547783B (en) | 2018-10-26 | 2018-10-26 | Video compression method based on intra-frame prediction and equipment thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109547783A CN109547783A (en) | 2019-03-29 |
CN109547783B true CN109547783B (en) | 2021-01-19 |
Family
ID=65845723
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811260507.5A Expired - Fee Related CN109547783B (en) | 2018-10-26 | 2018-10-26 | Video compression method based on intra-frame prediction and equipment thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109547783B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022061563A1 (en) * | 2020-09-23 | 2022-03-31 | 深圳市大疆创新科技有限公司 | Video coding method and device, and computer readable storage medium |
CN112929705B (en) * | 2021-02-02 | 2022-04-22 | 腾讯科技(深圳)有限公司 | Texture compression and decompression method and device, computer equipment and storage medium |
CN113301347B (en) * | 2021-05-08 | 2023-05-05 | 广东工业大学 | HEVC high definition video coding optimization method |
CN113365059B (en) * | 2021-08-09 | 2021-11-12 | 江苏势通生物科技有限公司 | Image redundancy removing method, image redundancy removing device, storage medium and apparatus |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101959067A (en) * | 2010-09-26 | 2011-01-26 | 北京大学 | Decision method and system in rapid coding mode based on epipolar constraint |
CN102598113A (en) * | 2009-06-30 | 2012-07-18 | 安芯美特控股有限公司 | Method circuit and system for matching an object or person present within two or more images |
CN103024383A (en) * | 2012-12-14 | 2013-04-03 | 北京工业大学 | Intra-frame lossless compression coding method based on HEVC (high efficiency video coding) frame |
CN103873862A (en) * | 2014-02-28 | 2014-06-18 | 北京师范大学 | Method and system for intra-frame quick coding |
CN105120292A (en) * | 2015-09-09 | 2015-12-02 | 厦门大学 | Video coding intra-frame prediction method based on image texture features |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014168445A1 (en) * | 2013-04-11 | 2014-10-16 | 엘지전자 주식회사 | Video signal processing method and device |
CN105611287A (en) * | 2015-12-29 | 2016-05-25 | 上海大学 | Low-complexity depth video and multiview video encoding method |
CN107071416B (en) * | 2017-01-06 | 2020-04-07 | 华南理工大学 | HEVC intra-frame prediction mode rapid selection method |
-
2018
- 2018-10-26 CN CN201811260507.5A patent/CN109547783B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102598113A (en) * | 2009-06-30 | 2012-07-18 | 安芯美特控股有限公司 | Method circuit and system for matching an object or person present within two or more images |
CN101959067A (en) * | 2010-09-26 | 2011-01-26 | 北京大学 | Decision method and system in rapid coding mode based on epipolar constraint |
CN103024383A (en) * | 2012-12-14 | 2013-04-03 | 北京工业大学 | Intra-frame lossless compression coding method based on HEVC (high efficiency video coding) frame |
CN103873862A (en) * | 2014-02-28 | 2014-06-18 | 北京师范大学 | Method and system for intra-frame quick coding |
CN105120292A (en) * | 2015-09-09 | 2015-12-02 | 厦门大学 | Video coding intra-frame prediction method based on image texture features |
Also Published As
Publication number | Publication date |
---|---|
CN109547783A (en) | 2019-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109547783B (en) | Video compression method based on intra-frame prediction and equipment thereof | |
CN104735452B (en) | By the method and apparatus using big converter unit image to be encoded and decodes | |
KR102148660B1 (en) | New planar prediction mode | |
CN105847792B (en) | Dynamic image encoding device and image encoding method | |
CN104581163B (en) | Method and apparatus for encoding and decoding image by using large transformation unit | |
CN102231835B (en) | Image decoding device and method | |
CN104469362B (en) | For the method that motion vector is decoded | |
TWI519142B (en) | Method and apparatus for video encoding with bit depth control for fixed point transformation, method and apparatus for video decoding with bit depth control for fixed point transform | |
CN103380620B (en) | Picture coding device and method for encoding images | |
CN103782596A (en) | Prediction method and apparatus for chroma component of image using luma component of image | |
CN103583045A (en) | Image processing device and image processing method | |
CN106851308A (en) | Digital image sequence coding method and Abitstream decoding method | |
CN102265611A (en) | Localized in-loop filtering with multiple filters in hybrid video coding | |
CN107046644A (en) | Dynamic image encoding device and moving image decoding apparatus | |
CN103392341A (en) | Method and device for encoding intra prediction mode for image prediction unit, and method and device for decoding intra prediction mode for image prediction unit | |
CN102939753A (en) | Method and apparatus for encoding video by compensating for pixel value according to pixel groups, and method and apparatus for decoding video by the same | |
CN102754440B (en) | Method for encoding images, picture coding device and camera system | |
CN116033149A (en) | Method and device for predicting video image component and computer storage medium | |
CN109413421B (en) | Video encoding method, video encoding apparatus, video decoding method, and video decoding apparatus | |
CN109547781B (en) | Compression method and device based on image prediction | |
CN109587481B (en) | Video encoding method and apparatus | |
CN109495739B (en) | Image encoding method and apparatus thereof | |
CN109379592B (en) | Image encoding method and apparatus thereof | |
CN109600612B (en) | Method and apparatus for image encoding | |
CN111107349A (en) | Self-adaptive texture prediction method in video coding |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210105 Address after: 325800 No.264, jiadiyuan village, Qianku Town, Cangnan County, Wenzhou City, Zhejiang Province Applicant after: Chen Deqian Address before: 710065 Xi'an new hi tech Zone, Shaanxi, No. 86 Gaoxin Road, No. second, 1 units, 22 stories, 12202 rooms, 51, B block. Applicant before: XI'AN CREATION KEJI Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210119 |