WO2020019316A1 - 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质 - Google Patents

帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质 Download PDF

Info

Publication number
WO2020019316A1
WO2020019316A1 PCT/CN2018/097528 CN2018097528W WO2020019316A1 WO 2020019316 A1 WO2020019316 A1 WO 2020019316A1 CN 2018097528 W CN2018097528 W CN 2018097528W WO 2020019316 A1 WO2020019316 A1 WO 2020019316A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction mode
prediction
intra prediction
pipeline stage
coding block
Prior art date
Application number
PCT/CN2018/097528
Other languages
English (en)
French (fr)
Inventor
缪泽翔
郑萧桢
李蔚然
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880017757.8A priority Critical patent/CN110419214A/zh
Priority to PCT/CN2018/097528 priority patent/WO2020019316A1/zh
Publication of WO2020019316A1 publication Critical patent/WO2020019316A1/zh

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
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • Embodiments of the present invention relate to the field of video coding, and in particular, to a method and a device for searching an intra prediction mode, a video coding method and device, and a recording medium.
  • Visual information is one of the most important sources for humans to obtain external information, but the uncompressed raw video data collected by the camera takes up a huge storage space with a resolution of 1920 ⁇ 1080, a video format of yuv420 (8bit), and a frame rate As an example, a video of 30 frames per second and 10 minutes in length is used to store the video without compression, which requires 52.14 Gbytes of storage space. In order to reduce the bandwidth occupied by video storage and transmission, the video data needs to be encoded and compressed.
  • the coded blocks of each size depend on the reconstruction values of neighboring pixels on the left and above to generate prediction values.
  • the prediction value of the image boundary (outside of the coding block) must wait for the coding blocks on the left and above of it to be encoded before it can be performed, so there is a strong dependency that may cause coding delay.
  • the intra prediction algorithm of the high-efficiency video coding standard calculates the prediction mode of each size coded block, as described above, it depends on the reconstruction values of adjacent pixels on the left and above to generate prediction values.
  • the prediction value of each coding block (except the coding block located at the boundary of the image) must wait for the coding blocks on the left and above of it to be encoded first. Because the coding block has a strong dependence on the reconstructed pixels of neighboring coding blocks, the chip cannot implement parallelization within the intra prediction algorithm when implementing the algorithm, resulting in insufficient chip processing speed and efficiency.
  • the present invention is made in response to the above problems, and provides a video encoding method, a video encoding device, and a recording medium, which effectively reduce prediction value calculation resources and time overhead and reduce data dependence on neighboring encoding blocks. This is because in the case of encoding by a chip, a more prominent technical effect can be obtained.
  • a method for searching an intra prediction mode according to a first aspect of the present invention includes:
  • the original pixels of neighboring blocks around the current encoding block are used to generate X first prediction signals of the current encoding block in the X object prediction mode, and obtain all The residuals of the X first prediction signals and the original image values of the coding block are taken as the X first residuals;
  • the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y objects on the least side of the first cost in the object prediction mode are calculated.
  • Prediction mode as an intermediate prediction mode
  • a reconstructed pixel of the neighboring block is used to generate a second prediction signal of the current coding block in the intermediate prediction mode, and the second prediction signal and the obtained prediction signal are obtained. State the residual of the original image value of the current coding block as the second residual; and,
  • the second cost of the intermediate prediction mode is calculated by the second cost calculation method according to the second residual, and the prediction mode with the smallest second cost in the intermediate prediction mode is used as the searched final Prediction model,
  • Y is a natural number smaller than X.
  • a video encoding method includes:
  • the video is encoded using the final prediction mode searched out by the aforementioned intra prediction mode search method.
  • the intra prediction mode search apparatus is configured to perform the foregoing intra prediction mode search method, wherein:
  • the first step and the second step are performed by the N-2 pipeline stage,
  • the third step is performed by the N-1 pipeline stage,
  • the fourth step is performed by the N pipeline stage.
  • An apparatus for searching an intra prediction mode includes: a memory and a processor, where:
  • the memory is used to store program instructions
  • the processor calls the program instruction, and when the program instruction is executed, is used to perform the following operations:
  • the original pixels of neighboring blocks around the current encoding block are used to generate X first prediction signals of the current encoding block in the X object prediction mode, and obtain all The residuals of the X first prediction signals and the original image values of the coding block are taken as the X first residuals;
  • the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y object predictions in which the first cost in the object prediction mode is the smallest one are predicted.
  • Mode as an intermediate prediction mode
  • a reconstructed pixel of the neighboring block is used to generate a second prediction signal of the current coding block in the intermediate prediction mode, and the second prediction signal and the obtained prediction signal are obtained. State the residual of the original image value of the current coding block as the second residual;
  • a second cost of the intermediate prediction mode is calculated by a second cost calculation method according to the second residual, and the prediction mode with the smallest second cost in the intermediate prediction mode is used as the searched final result.
  • Y is a natural number smaller than X.
  • a video encoding device includes the above-mentioned intra prediction mode search device.
  • a recording medium stores a program that causes a computer to execute the intra prediction mode search method as described above.
  • a recording medium stores a program for causing a computer to execute the video encoding method as described above.
  • the prediction value calculation resource and time overhead are reduced, and the original pixel information and Reconstructing pixel information reduces dependence on neighboring coded blocks.
  • Figure 1 shows the current popular hybrid coding framework structure.
  • Fig. 2 shows that the intra prediction mode corresponds to 35 prediction modes.
  • FIG. 3 is a schematic diagram showing an example of division of a 64 ⁇ 64 encoding block.
  • FIG. 4 is a flowchart showing an embodiment of an intra prediction mode search method according to the present invention.
  • FIG. 5 is a frame flowchart illustrating a specific example of the intra prediction mode search method of the present invention.
  • FIG. 6 is a flowchart illustrating a specific example of the intra prediction mode search method according to the present invention.
  • FIG. 7 is a block diagram showing a configuration of an intra prediction mode search device 70 according to the present invention.
  • FIG. 8 is a diagram for explaining an example of a coding block for pipeline processing performed by the intra prediction mode search device 70.
  • FIG. 9 is a timing chart for explaining an example of pipeline processing performed by the intra prediction mode search device 70 based on the framework flowchart shown in FIG. 5.
  • a component when a component is called “fixed to” another component, it may be directly on another component or a centered component may exist. When a component is considered to be “connected” to another component, it can be directly connected to another component or a centered component may exist at the same time.
  • the video encoding is briefly described below.
  • the video encoding process includes the steps of prediction, transform, quantization, and entropy encoding.
  • Figure 1 shows the current popular hybrid encoding framework structure.
  • the prediction includes two types of intra prediction and inter prediction, and the purpose is to remove redundant information of the current image block to be encoded by using prediction block information.
  • Intra prediction uses the information of the frame image to obtain prediction block data, and the process includes dividing the image block to be encoded into several sub-image blocks; then, for each sub-image block, using neighboring pixels around the image block to generate a prediction of the current image block Pixel blocks.
  • Inter prediction uses the information of the reference frame to obtain prediction block data, and the process includes dividing the image block to be encoded into several sub-image blocks; then, for each sub-image block, searching in the reference image for an image that best matches the current sub-image block The block is used as a prediction block.
  • An image frame that uses only the intra prediction mode in encoding is called an I frame, and an image frame that uses both intra prediction and inter prediction is called a P or B frame.
  • the corresponding pixel values of the sub-image block and the predicted block are subtracted to obtain a residual.
  • the residual can use the transformation matrix to remove the correlation of the residual of the image block, that is, remove the redundant information of the image block in order to improve the coding efficiency.
  • the transformation of the data block in the image block usually uses two-dimensional transformation, that is, the data is encoded at the encoding end.
  • the block residual information is multiplied with an NxN transform matrix and its transpose matrix, and the transform coefficients are obtained after multiplication.
  • Transform coefficients can be quantized by quantizing the quantization parameters.
  • the quantized coefficients are entropy coded.
  • the bit stream obtained by entropy coding and the coding mode information after coding such as intra prediction mode, motion vector information, etc. Store or send to the decoder.
  • the entropy-coded bitstream is first obtained and then the entropy decoding is performed to obtain the corresponding residuals.
  • the predicted image block corresponding to the information image block such as the motion vector or intra prediction obtained by the decoding according to the predicted image block and the image block Residual to get the reconstructed value of each pixel in the current sub-image block.
  • Figure 2 shows the 35 prediction modes corresponding to the intra prediction mode: including 33 directional modes and DC and Planar modes.
  • intra prediction is performed for each image block, the neighboring pixel information around the block is used to calculate 35 candidate prediction pixel blocks according to the calculation formula corresponding to the 35 prediction modes, and then from the 35 prediction modes according to the optimization principle Choose the best prediction mode.
  • the basic encoding unit is a 64x64 encoding block.
  • the intra prediction encoding mode it may be further divided into one 64x64 encoding block or four 32x32 encoding blocks, or 16 16x16 encoding blocks, or 64 8x8 coded blocks, or 256 4x4 coded blocks or several blocks of different sizes are combined.
  • FIG. 3 is a schematic diagram showing an example of division of a 64 ⁇ 64 encoding block.
  • the encoding unit with a size of 64x64 on the left is finally divided into one 32x32 encoding block, ten 16x16 encoding blocks, seven 8x8 encoding blocks, and four 4x4 encoding blocks after encoding.
  • a method for searching an intra prediction mode is proposed, which is particularly suitable for encoding and compression processing by a chip. These include:
  • Pipeline stage N Calculate a second cost of the intermediate prediction mode by a second cost calculation method according to the second residual, and use the prediction mode with the smallest second cost in the intermediate prediction mode as the searched final Forecasting mode.
  • X, Y, and Z are natural numbers that satisfy X> Y and X> Z.
  • Y ⁇ Z it is preferable that Y ⁇ Z, but it is not limited to this.
  • FIG. 4 is a flowchart showing an embodiment of an intra prediction mode search method according to the present invention.
  • the object prediction mode refers to a prediction mode that is a search target of the intra prediction mode search method of the present invention.
  • X is 35 prediction modes, including 33 directional modes and DC and Planar modes.
  • it is not limited to this, and may be appropriately determined in accordance with the coding standard and the like to be applied.
  • all prediction modes in the coding standard may not be used as target prediction modes.
  • all prediction modes (for example, 35 prediction modes) in intra prediction may be divided into at least two groups, and one group is selected as the prediction mode.
  • Object prediction mode for example, 35 prediction modes
  • the grouping may be performed according to at least one of an attribute of an object prediction mode, such as a direction or a category, of the object prediction mode.
  • the number of prediction modes in each of the groups may be the same or different.
  • the prediction modes in each group may or may not include the prediction modes in other groups. Taking the 35 prediction modes shown in FIG. 2 as an example, all the 33 direction modes can be divided into a plurality of groups such as 2, 3, 4, 5, 6, 7, and the like in a manner of adjacent numbers. Take three groups as an example, as follows:
  • the groups may be grouped in such a manner that the direction pattern numbers in the groups are not continuous. Take three groups as an example, as follows:
  • each packet may be further included in the DC mode and / or the Planar mode.
  • the selection may be performed randomly, or according to various characteristic indexes of the current coding block.
  • one group is selected as the target prediction mode according to the directivity index of the current coding block in each prediction direction.
  • the directionality index is gradient information (Gradient Information) of the current coding block in each prediction direction.
  • the current coding block is divided into a plurality of regions, and gradient information of the plurality of regions in the prediction direction is determined according to a prediction direction in a group, and a set of prediction modes with a minimum gradient information is selected as all
  • the object prediction mode is described.
  • the coding block can be divided from left to right, right to left, or from top to bottom, and from bottom to top in four-grid, nine-grid, or the like. Randomly divide the area in such a way that it fills the entire area.
  • the divided areas may be adjacent to each other, separated from each other, or overlapped with each other.
  • generating a prediction signal (a first prediction signal) in a prediction mode and obtaining a residual between the prediction signal and the original pixel, etc. may be performed by an existing algorithm or algorithms specified in various video coding standards.
  • the coding block includes NxN pixel blocks, N is a natural number, and the original pixels of neighboring blocks around the current coding block are used to generate a first number of the current coding block in the X object prediction mode.
  • the prediction signal includes generating a prediction signal of a current coding block from reference pixels of a surrounding pixel block of the coding block.
  • the pixel blocks around the coding block may be pixel blocks adjacent to each pixel block in the coding block, or pixel blocks smaller than a predetermined distance, and may be set as required.
  • the first cost of the X object prediction modes is calculated by the first cost calculation method according to the first residual, and the Y object prediction mode with the least one example of the first cost in the object prediction mode is used as the intermediate prediction. mode.
  • X and Y are natural numbers and satisfy X> Y.
  • any existing method capable of calculating the cost of the prediction mode may be used, and may be performed by an existing algorithm or algorithms specified in various video coding standards.
  • the sum of squared or absolute sum of residuals can be used as the cost of the prediction mode.
  • the cost of the prediction mode is calculated based on the transform coefficients obtained by performing a two-dimensional matrix transformation on the residual and the number of bits of the prediction mode.
  • a two-dimensional matrix transformation a discrete sine / cosine transformation or a Hadamard transformation may be used.
  • Y are selected from the X object prediction modes as the intermediate prediction mode, where Y may be any natural number less than X.
  • Y may be any natural number less than X.
  • the value of Y can be a preset value, a value obtained according to factors such as accuracy and / or efficiency, or a value obtained according to hardware conditions and the like.
  • the existing or various video encodings can be used to generate the prediction signal (second prediction signal) in a certain prediction mode and to obtain the residuals between the prediction signal and the original pixel.
  • the algorithm specified in the standard is performed.
  • the original pixels of adjacent blocks are used in the generation of the first prediction signal, and the reconstructed pixels of adjacent blocks are used in the generation of the second prediction signal.
  • the original pixels and Reconstructed pixels also include pixels obtained by padding.
  • at least a part of pixel blocks in adjacent blocks may be filled (Padding), and the filled pixels are used as the original pixels and the The pixels are reconstructed and used to generate the first prediction signal and / or the second prediction signal.
  • various methods such as copying adjacent pixel values, interpolation, and inserting 0 values can be used.
  • the pixel block to be filled is a pixel block at a position where a reconstructed pixel cannot be obtained when the second prediction signal is generated.
  • a second cost of the intermediate prediction mode is calculated according to a second cost calculation method according to the second residual, and a prediction mode with the smallest second cost in the intermediate prediction mode is used as a searched final prediction mode.
  • any existing method capable of calculating the cost of the prediction mode may also be used, and may be performed by an existing algorithm or algorithms specified in various video coding standards.
  • the sum of squared or absolute sum of residuals can be used as the cost of the prediction mode.
  • the cost of the prediction mode is calculated based on the transform coefficients obtained by performing a two-dimensional matrix transformation on the residual and the number of bits of the prediction mode.
  • the second cost calculation method may be the same as or different from the first cost calculation method.
  • the intermediate prediction mode may be further adjusted. Specifically, after using the Y on the least cost side of the target prediction mode as the intermediate prediction mode, the Y intermediate prediction modes may be further compared with at least one of the current coding block.
  • the final prediction modes of neighboring blocks are comprehensively processed to adjust the intermediate prediction modes to Z, where Z is a natural number and satisfies that X is greater than Z.
  • the Z intermediate prediction modes are 5 intermediate prediction modes.
  • the final prediction mode here may be a prediction mode used by at least one neighboring block during inter-coding, and may specifically be the final prediction mode searched by the intra prediction mode search method of the present invention, or may be The final prediction mode obtained by a standard algorithm specified in the video coding standard.
  • the adjacent block is a pixel block in a coding block adjacent to the current coding block, may be a pixel block in a coding block connected to the current coding block, or may be a block that is not related to the current coding block.
  • At least one prediction mode among the Y intermediate prediction modes and at least one final prediction mode of the neighboring block may be used as the intermediate prediction mode.
  • the Y intermediate prediction modes that are discarded are those with the first cost.
  • the reserved intermediate prediction mode is one or more prediction modes that are different from the prediction mode of the neighboring block and that the first cost is the smallest.
  • a final prediction mode of at least one of the neighboring blocks in three directions of a left side, an upper side, and an upper left side of the current coding block is used.
  • FIG. 5 uses FIG. 5 to describe in detail a specific example using the present invention as an example.
  • FIG. 5 is a frame flowchart illustrating a specific example of the intra prediction mode search method of the present invention.
  • the original pixel values of the current coded block are used to filter out 11 prediction modes from a total of 35 prediction modes, and then the predicted values are generated from the original pixel values of neighboring blocks around the current coded block, and further to the 11
  • the prediction residuals corresponding to the prediction mode are respectively subjected to a Hadamard transformation to screen out the five prediction modes with the least cost.
  • the three prediction modes (Most Probable Modes) derived from the neighboring information are combined with the five prediction modes obtained in S501 to select five prediction modes, and the reconstructed pixel values of surrounding neighboring blocks are used to regenerate prediction Pixel values.
  • the prediction residuals corresponding to the five prediction modes reselected in S502 are respectively subjected to a Hadamard transformation to select the final prediction mode with the least cost.
  • FIG. 6 is a flowchart illustrating a specific example of the intra prediction mode search method according to the present invention.
  • the intra mode estimation phase of this specific example includes the stages of preliminary mode determination (Rough mode Decision) S5011, first prediction (Predict1) S5012, and first Hadama mode determination (Had mode Decision1) S5013. Be specific.
  • 11 prediction modes are selected from 35 intra prediction modes (including 33 directional modes and DC and Planar modes). Since no real predicted value is generated in this stage, it will not increase the consumption of computing resources.
  • the 35 intra prediction modes shown in FIG. 2 are divided into 0 °, 45 °, 90 °, and 135 ° for 0 °, 45 °, 90 °, and 135 ° in the prediction direction.
  • the corresponding 4 groups are selected as the target prediction mode according to the directivity index of the current coding block in each prediction direction.
  • each group has 11 modes, and each group contains mode 0 (DC mode) and mode 1 (Planar mode), such as Formulas (3-1) to (3-4) are shown.
  • the above-mentioned directionality index is, for example, gradient information (Gradient Information) of the current coding block in each prediction direction.
  • the current encoding block may be divided into multiple regions, and gradient information of the multiple regions in the prediction direction is determined according to a prediction direction in a group, and a set of prediction modes with a minimum gradient information is selected as all The object prediction mode is described.
  • FIG. 6 is a schematic diagram showing an example of a sub-block division method in this specific example.
  • the current coding block is divided into five equally-sized sub-blocks a, b, c, d, and e in the order of upper left, upper right, lower left, lower right, and center.
  • the mean values of the sub-blocks a, b, c, d, and e are calculated, respectively.
  • use the mean value to obtain the gradient information of the corresponding direction group according to the equations (3-5) to (3-8), and select 11 prediction modes (Index values) in the mode set corresponding to the smallest median value of GI1 to GI4 as the output.
  • preliminary mode determination stage S5011 is included in this specific example, it is not limited to this, and it may be omitted, and 35 prediction modes may be directly used as input to the first prediction S5012 stage described later.
  • the role of this stage is to use the original pixels of neighboring blocks to generate 11 sets (corresponding to the 11 prediction modes output in the preliminary mode determination stage) of the prediction signals of the current encoding block.
  • the practice of this link should be to use the reconstructed pixels of neighboring blocks to generate 35 sets of prediction signals, which will cause the link to wait for the generation of reconstructed pixels and cause delay.
  • the parallelism of calculation can be greatly improved and the calculation complexity can be reduced.
  • a prediction signal of a current coding block is generated from reference pixels of surrounding 4 * N + 1 neighboring blocks during prediction, where N is a natural number.
  • FIG. 7 is a schematic diagram showing an example of the distribution positions of adjacent blocks used in the first prediction when the coding block is 4 ⁇ 4, that is, N is 4.
  • the prediction signal of the current coding block is generated from 4 * N + 1, that is, reference pixels of 17 pixel blocks, on the left, upper left, and upper sides of the coding block.
  • a prediction signal of a current coding block is generated from reference pixels of 17 neighboring blocks.
  • An algorithm for generating a prediction signal of a current coding block by reference pixels of neighboring neighboring blocks is an algorithm specified in an existing video coding standard, and is not described here.
  • the prediction residuals corresponding to the 11 prediction modes are determined as the subsequent first Hadamard mode determination. Phase input.
  • the 11 sets of residuals output from the first prediction stage S5012 are used as input, and the 11 sets of residuals are respectively subjected to a Hadamard transform.
  • the corresponding prediction mode is calculated by combining the absolute value of the transformation coefficients and the number of bits representing the 11 prediction modes.
  • the price Table 1 shows an example of the number of bits corresponding to the 35 patterns.
  • is a weighting coefficient calculated according to a specified algorithm in the existing video encoding method.
  • the smallest 5 corresponding prediction modes are selected as the output from the 11 costs.
  • Hadamard transform has been described as an example in this specific example, the present invention is not limited to this, and may be another two-dimensional matrix transform.
  • the prediction improvement phase of this specific example includes a comprehensive processing (Combine) S5021 and a second prediction (Predict2) S5022. Each phase will be described in detail below.
  • the prediction modes obtained from the neighboring encoding blocks and the five prediction modes obtained during the intra mode estimation stage are comprehensively processed.
  • the prediction modes obtained from the adjacent encoding blocks and the 5 This model is compared and combined, and 5 prediction modes are obtained.
  • the prediction mode obtained from neighboring coding blocks may be a prediction mode selected by the method of the present invention, or three prediction modes derived from neighboring coding blocks according to a standard algorithm in an existing video coding method. (Most Probable Mode (MPM)).
  • MPM Motion Probable Mode
  • 5 modes can be selected from a total of 8 modes selected from the intra mode estimation stage and 3 prediction modes obtained from adjacent coding blocks: first retain 3 Prediction modes obtained from neighboring coding blocks, and then from the prediction modes selected in the 5 intra-mode estimation stages, 2 prediction modes obtained from neighboring coding blocks that are different from the prediction modes obtained at the least cost are selected , Take a total of 5 prediction modes as the output of the comprehensive processing stage.
  • the comprehensive processing stage S5021 is included in this specific example, it is not limited to this, and it may be omitted, and the five prediction modes output from the S5013 stage may be directly used as input to the second prediction S5022 stage described later.
  • the inputs at this stage are the five prediction modes output by S5021, and the reconstructed pixels of neighboring blocks are used to generate the prediction signals of the five groups of currently coded blocks.
  • An algorithm for generating a prediction signal of a current coding block from reconstructed pixels (reference pixels) of neighboring neighboring blocks is a prescribed algorithm in an existing video coding method, and will not be described here.
  • the differences are respectively different from the original pixel values of the current coding block, and the prediction residuals corresponding to the five prediction modes are obtained as the input of the subsequent final mode selection stage.
  • the final mode selection stage of this specific example includes the second Hadama Mode Decision 2 (S5031). Each of these stages will be specifically described below.
  • the five groups of residuals output from the second prediction stage S5022 are used as input.
  • the five groups of residuals are respectively subjected to a Hadamard transform.
  • the absolute value of the transform coefficients and the number of bits representing the five prediction modes are combined to calculate the corresponding prediction mode.
  • the price The cost calculation here adopts the same method as the cost calculation in the first Hadamard mode determination phase S5013.
  • a corresponding prediction mode with the lowest cost is selected from the 5 costs as the finally selected 1 prediction mode.
  • the residual output is entered into subsequent stages such as transform quantization and entropy coding RDO.
  • FIG. 7 is a block diagram showing a configuration of an intra prediction mode search device 70 according to the present invention.
  • the intra-prediction mode searching device 70 of the present invention may be, for example, a chip, including: an N-2 pipeline stage 701, an N-1 pipeline stage 702, and an N pipeline stage 703.
  • steps 401 and 402 are performed by an N-2 pipeline stage
  • step 403 is performed by an N-1 pipeline stage
  • 404 is performed by the N pipeline stage.
  • the N-2 pipeline stage 701, the N-1 pipeline stage 702, and the N pipeline stage 703 work in parallel, so that the N pipeline stage 703 pairs the encoding blocks processed by the N-1 pipeline stage 702.
  • the processing, the N-1 pipeline stage 702 processing of the coding block processed by the N pipeline stage 701, and the N-2 pipeline stage 701 processing of the current coding block are performed in parallel. This will be specifically described below.
  • FIG. 8 is a diagram for explaining an example of a coding block for pipeline processing performed by the intra prediction mode search device 70.
  • the same coding block as the 64 ⁇ 64 coding block in FIG. 3 is exemplified here.
  • the upper left four coding blocks are respectively marked with 0, 1, 2, and 3.
  • FIG. 9 is a timing chart for explaining an example of pipeline processing performed by the intra prediction mode search device 70 based on the framework flowchart shown in FIG. 5.
  • the original pixel values of the current encoding block are used to filter out 11 prediction modes from a total of 35 prediction modes, and then the prediction values are generated from the original pixel values of neighboring blocks around the current encoding block. Furthermore, the five prediction modes with the least cost are screened by performing Hadamard transform on the prediction residuals corresponding to the 11 prediction modes.
  • the three prediction modes (Most, Probable Modes) derived from the neighboring information are combined with the 5 prediction modes selected in the N-2 pipeline stage 701 to select 5 prediction modes, and use the surrounding
  • the reconstructed pixel values of the neighboring blocks of the image are used to regenerate predicted pixel values.
  • the prediction residuals corresponding to the five prediction modes reselected in the N-1 pipeline stage 702 are respectively subjected to a Hadamard transformation to screen the final prediction mode with the least cost.
  • the encoding block 0 is processed by the N-2 pipeline stage 701 (intra mode estimation S501).
  • the N-1 pipeline stage 702 and the N pipeline stage 703 are idle.
  • the N-2 pipeline stage 701 processes the new coded block 1 (intra mode estimation S501), and the N-1 pipeline stage 702 performs the N-2 pipeline process obtained from the N-2 pipeline stage 701.
  • the encoding block 0 processed by the stage 701 is processed (prediction improvement S502).
  • the N pipeline stage 703 is idle.
  • the N-2 pipeline stage 701 processes the new coded block 2 (intra-frame mode estimation S501), and the N-1 pipeline stage 702 processes the N-pipeline stage 701 obtained from the N-2 pipeline stage 701. 2
  • the encoding block 1 processed by the pipeline 701 is processed (prediction improvement S502), and the N-2 pipeline 703 processes the encoding block 0 obtained by the N-1 pipeline 702 and processed by the N-1 pipeline 702 ( The final mode is S503).
  • each pipeline stage performs the above-mentioned processing of S501 to S503 in parallel until the processing is completed for all the coding blocks.
  • the original pixels are introduced into the intra prediction mode to release the key dependency on the search phase, and then the entire intra prediction algorithm is divided into three pipeline stages to improve the parallelism, as shown in the figure As shown in FIG. 9, starting from time t2, each of the N-2 to N pipeline stages 701 to 703 starts processing the coded blocks in parallel, so that the chip processing speed and efficiency can be improved.
  • N-2 pipeline stage 702 does not involve any data dependency, as an optional solution of the present invention, it can be split out. For example, all possible coding blocks in FIG. 8 are processed in advance, and the obtained results are stored. Wait for N-1 pipeline stage 701 to take.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware, or in the form of hardware plus software functional units.
  • the above integrated unit implemented in the form of a software functional unit may be stored in a computer-readable storage medium or memory.
  • the software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute the methods described in the embodiments of the present invention. Some steps.
  • the aforementioned storage media include: U disks, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or compact discs, and other media that can store program codes .

Landscapes

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

Abstract

一种帧内预测模式搜索方法,包括:第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成当前编码块在X个对象预测模式下的X个第1预测信号,并求出X个第1预测信号与编码块的原始像值的残差作为X个第1残差;第2步骤,根据第1残差通过第1代价计算方法计算出X个对象预测模式的第1代价,将对象预测模式中第1代价最小一侧的Y个对象预测模式作为中间预测模式;第3步骤,基于中间预测模式,利用相邻块的重建像素生成当前编码块在中间预测模式下的第2预测信号,并求出第2预测信号与当前编码块的原始像值的残差作为第2残差;和,第4步骤,根据第2残差通过第2代价计算方法计算出中间预测模式的第2代价,将中间预测模式中第2代价最小的预测模式作为搜索出的最终预测模式,其中,Y是小于X的自然数。

Description

帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质 技术领域
本发明实施例涉及视频编码领域,尤其涉及一种帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质。
背景技术
视觉信息是人类获取外界信息的最重要来源之一,但是摄像头采集所得未经压缩的原始视频数据占用的存储空间非常巨大,以分辨率为1920×1080、视频格式为yuv420(8bit)、帧率为30帧每秒、时长10分钟的视频为例,在无压缩的情况下存储该视频需要占用52.14G字节的存储空间。为了减少视频存储和传输所占用的带宽,需要对视频数据进行编码压缩处理。
然而在现有技术的编码压缩处理中,进行计算时每个尺寸的编码块均依赖于其左侧及上方的相邻像素重建值用于产生预测值,因此在计算每个编码块(除位于图像边界处的编码块外)的预测值时都必须等待其左侧及上方的编码块先编码完成后才能进行,因此存在很强的依赖性可能会导致编码延迟。
特别是在通过芯片进行编码压缩处理时,这一延迟导致的问题更加显著。具体来说,芯片实现算法时通常将算法步骤分成若干个流水级,每个流水级并行处理不同的数据,该做法可以提升处理速度和提高资源利用率。
然而,由于高效率视频编码标准的帧内预测算法进行计算每个尺寸编码块的预测模式时,如上所述,均依赖于其左侧及上方的相邻像素重建值用于产生预测值,计算每个编码块(除位于图像边界处的编码块外)的预测值前都必须等待其左侧及上方的编码块先编码完成。由于编码块对相邻编码块的重建像素存在很强的依赖性,芯片实现该算法时无法在帧内预测算法内部实现并行化,导致最终实现的芯片处理速度及效率不足。
发明内容
本发明正是针对上述问题提出的,提供一种视频编码方法、视频编码装置以及记录介质,有效降低预测值计算资源和时间开销并降低对相邻编码块的数据依赖性。由其是在以芯片进行编码的情况下,能够取得更为突出的技术效果。
本发明的第一方面的帧内预测模式搜索方法,包括:
第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;
第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一侧的Y个对象预测模式作为中间预测模式;
第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和,
第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,
其中,Y是小于X的自然数。
本发明的第二方面的视频编码方法,包括:
使用上述的帧内预测模式搜索方法搜索出的最终预测模式对视频进行编码。
本发明的第三方面的帧内预测模式搜索装置,用于执行上述的帧内预测模式搜索的方法,其中,
包括:N-2流水级、N-1流水级和N流水级,
所述第1步骤和所述第2步骤由所述N-2流水级执行,
所述第3步骤由所述N-1流水级执行,
所述第4步骤由所述N流水级执行。
本发明的第四方面的帧内预测模式搜索装置,包括:存储器和处理器, 其中,
所述存储器用于存储程序指令;
所述处理器,调用所述程序指令,当程序指令被执行时,用于执行以下操作:
第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;
第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一例的Y个对象预测模式作为中间预测模式;
第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和
第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,
其中,Y是小于X的自然数。
本发明的第五方面的视频编码装置,包括上述的帧内预测模式搜索装置。
本发明的第六方面的记录介质,存储有使计算机执行如上所述的帧内预测模式搜索方法的程序。
本发明的第七方面的记录介质,存储有使计算机执行如上所述的视频编码方法的程序。
根据本发明的一个实施例的方案,通过预分析当前编码块的纹理梯度信息减少时需要搜索的帧内预测模式数目降低预测值计算资源和时间开销,并结合使用相邻块的原始像素信息及重建像素信息降低对相邻编码块的依赖性。
例如,在包含35个预测模式的情况下,对每个编码块至少需进行35 次预测值计算下降至只需对每个编码块进行16次预测值计算,且通过在第一阶段使用相邻像素的原始像素值进行预测值计算,消除了依赖性。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图进行简单介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1表示目前流行的混合编码框架结构。
图2表示帧内预测模式对应35个预测模式。
图3是表示64x64的编码块的划分的一例的示意图。
图4是表示本发明的帧内预测模式搜索方法的实施方式的流程图。
图5是对本发明的帧内预测模式搜索方法的具体例进行说明的框架流程图。
图6是对本发明的帧内预测模式搜索方法的具体例进行详细说明的的流程图。
图7是表示本发明的帧内预测模式搜索装置70的结构框图。
图8是用于说明由帧内预测模式搜索装置70进行的流水级处理的编码块示例的图
图9是用于基于图5所示的框架流程图说明由帧内预测模式搜索装置70进行的流水级处理的一例的时序图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
需要说明的是,当组件被称为“固定于”另一个组件,它可以直接在另一个组件上或者也可以存在居中的组件。当一个组件被认为是“连接”另一个组件,它可以是直接连接到另一个组件或者可能同时存在居中组件。
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。
以下,对视频编码进行简要说明。一般来说,视频编码过程包括预测、变换、量化和熵编码等步骤,图1表示目前流行的混合编码框架结构。其中预测包括帧内预测和帧间预测两种类型,其目的在于利用预测块信息去除当前待编码图像块的冗余信息。
帧内预测利用本帧图像的信息获得预测块数据,其过程包括将待编码图像块划分成若干个子图像块;然后,针对每个子图像块,利用图像块周边的邻近像素生成当前图像块的预测像素块。
帧间预测利用参考帧的信息获得预测块数据,其过程包括将待编码图像块划分成若干个子图像块;然后,针对每个子图像块,在参考图像中搜索与当前子图像块最匹配的图像块作为预测块。
在编码中仅使用帧内预测模式的图像帧被称为I帧,同时使用帧内预测及帧间预测的图像帧被称为P或B帧。使用帧内预测或帧间预测获得预测像素块后,将该子图像块与预测块的相应像素值相减得到残差。
残差可以使用变换矩阵去除图像块的残差的相关性,即去除图像块的冗余信息,以便提高编码效率,图像块中的数据块的变换通常采用二维变换,即在编码端将数据块的残差信息分别与一个NxN的变换矩阵及其转置矩阵相乘,相乘之后得到的是变换系数。变换系数经量化参数量化后可得到量化系数,最后将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息,如帧内预测模式、运动矢量信息等,进行存储或发送到解码端。
在图像的解码端,首先获得熵编码比特流后进行熵解码,得到相应的残差,根据解码得到的运动矢量或帧内预测等信息图像块对应的预测图像块,根据预测图像块与图像块的残差得到当前子图像块中各像素点的重建值。
图2表示帧内预测模式对应的35个预测模式:包括33个方向模式及 DC和Planar模式。在每个图像块进行帧内预测时,分别利用块周围的相邻像素信息按照35个预测模式对应的计算公式算出35个候选的预测像素块,之后再根据最优化原则从35个预测模式中选出最优的预测模式。
作为视频编码的一例,基本编码单位是尺寸为64x64的编码块,帧内预测编码模式下进一步可能划分为1个64x64的编码块或4个32x32的编码块,或者16个16x16的编码块,或者64个8x8的编码块,或者256个4x4的编码块或者若干不同尺寸的块相结合。
图3是表示64x64的编码块的划分的一例的示意图。左侧尺寸为64x64的编码单元在编码后最终划分为1个32x32的编码块、10个16x16的编码块、7个8x8的编码块及4个4x4的编码块。为了得到最优的划分结构,在实际编码时需要首先对所有1+4+16+64+256=341个可能的预测块生成预测像素块的结果,再依次决定最优的结构。由于每个可能的预测块都对应有35种可能的预测模式,因此在编码一个64x64的编码块时需要计算35x341=11935次预测,该种方式对硬件资源及时间的消耗非常巨大。
作为本发明的一个实施方式,提出了一种帧内预测模式搜索方法,特别适于由芯片进行编码压缩处理。其中,包括:
流水级N-2:
基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个对象预测模式第1残差;
根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一例的Y个作为中间预测模式;
流水级N-1:
进一步对所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,
基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;
流水级N:根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式。
其中,X,Y,Z是自然数,满足X>Y且X>Z。另外,优选Y≥Z,但并不限定于此。
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
图4是表示本发明的帧内预测模式搜索方法的实施方式的流程图。
【步骤S401】
基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差。
对象预测模式,是指作为本发明的帧内预测模式搜索方法的搜索对象的预测模式。例如,如图2所示,X为35个预测模式,其中包括33个方向模式及DC和Planar模式。但并不限定于此,可以根据所应用的编码标准等适宜决定。
可选的,也可以不将编码标准中的全部预测模式作为对象预测模式,例如可以将帧内预测的全部预测模式(例如35个预测模式)分为至少2组,选择其中1组作为所述对象预测模式。
作为分组的依据,可以根据所述对象预测模式的对象预测模式的属性、例如方向或种类等的至少一个进行所述分组。每个所述分组中的预测模式的数量可以相同,也可以不同。各个分组中的预测模式可以包含其他分组中的预测模式,也可以不包含。以图2所示的35个预测模式为例,可以将全部的33个方向模式按照序号相邻的方式分成2、3、4、5、6、7等多个组。以分为3个组为例,具体如下:
第1组:2、3、4、5、6、7、8、9、10、11、12
第2组:13、14、15、16、17、18、19、20、21、22、23
第3组:24、25、26、27、28、29、30、31、32、33、34
另外,也可以按照各个组中的方向模式序号不连续的方式进行分组。 以分为3个组为例,具体如下:
第1组:2、5、8、11、14、17、20、23、26、29、32
第2组:3、6、9、12、15、18、21、24、27、30、33
第3组:4、7、10、13、16、19、22、25、28、31、34
在所述预测模式包括方向模式、DC模式(模式1)和Planar模式(模式0)的情况下,可以进一步让每个分组都包括所述DC模式和/或Planar模式。
可选的,作为选择分组的依据,可以随机进行选择、或者根据当前编码块的各种特征指标来进行选择。例如,根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。
可选的,方向性指标是所述当前编码块在各个预测方向上的梯度信息(Gradient Information)。
可选的,将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。作为划分编码块的具体方式,例如可以将编码块以四宫格、九宫格等的方式从左至右、从右至左或从上至下、从下至上依次进行划分,也可以按照尽可能填满整个区域的方式随机划分区域。划分的各个区域可以彼此相邻、彼此相隔或者彼此重叠。
可选的,生成预测模式下的预测信号(第1预测信号)以及求出预测信号与原始像素的残差等,可以通过现有的或者各种视频编码标准中规定的算法进行。
可选的,所述编码块包含NxN个像素块,N是自然数,所述利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的第1预测信号,包括:由所述编码块的周围的像素块的参考像素生成当前编码块的预测信号。这里,所述编码块的周围的像素块,可以是与编码块中的各个像素块相邻的像素块,也可以是小于规定距离的像素块,可以根据需要进行设定。
【步骤S402】
根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模 式的第1代价,将所述对象预测模式中所述第1代价最小一例的Y个对象预测模式作为中间预测模式。其中,X,Y是自然数,满足X>Y。
这里,作为第1代价计算方法,可以使用现有的任何能够计算预测模式的代价的方法,可以通过现有的或者各种视频编码标准中规定的算法进行。作为一例,可以将残差的平方和或绝对值和作为预测模式的代价。作为另外一例,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。作为二维矩阵变换的一例,可以是离散正弦/余弦变换,或者是哈达玛变换。
可选的,根据上述第1代价计算方法计算出的第1代价,从X个对象预测模式中选择Y个作为中间预测模式,其中Y可以为任何小于X的自然数。例如在X为35的情况下,可取2、3、4、5、6、10、15、20、25、30等。这里Y的取值可以是预先设定的数值,也可以是根据精度和/或效率等因素得到的数值,还可以是根据硬件条件等得到的数值。
【步骤S403】
基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差。
这里,与第1预测信号的生成同样,对于生成某个预测模式下的预测信号(第2预测信号)以及求出预测信号与原始像素的残差等,可以通过现有的或者各种视频编码标准中规定的算法进行。
另外,虽然在上述的说明中,描述的是在第1预测信号的生成时使用相邻块的原始像素,在第2预测信号的生成时使用相邻块的重建像素,但这里的原始像素和重建像素,也包括通过填充而得到的像素。例如在生成所述第1预测信号和/或所述第2预测信号时,可以对相邻块中的至少一部分像素块进行填充(Padding),将填充得到的像素作为所述原始像素和所述重建像素而用于生成所述第1预测信号和/或所述第2预测信号。作为填充的方式,可以使用复制相邻像素值、插值、***0值等各种方法。
作为一个具体例,进行所述填充的像素块,是在生成所述第2预测信号时无法获得重建像素的位置上的像素块。例如,对靠近视频图像边角位 置而不实际并不存在的相邻块、或者因编码块的编码顺序等的原因在生成所述第2预测信号时尚未进行过编码而不存在重建像素的相邻块等。
【步骤S404】
根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式。
这里,作为第2代价计算方法,也可以使用现有的任何能够计算预测模式的代价的方法,可以通过现有的或者各种视频编码标准中规定的算法进行。作为一例,可以将残差的平方和或绝对值和作为预测模式的代价。作为另外一例,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。所述第2代价计算方法可以与所述第1代价计算方法相同或者不同。
再有,在上述的步骤S403中,可以进一步对中间预测模式进行调整。具体来说,可以对在将所述对象预测模式中所述第1代价最小一侧的Y个作为中间预测模式后,进一步对所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,其中Z为自然数,满足X大于Z。优选所述Z个中间预测模式为5个中间预测模式。
这里的最终预测模式,可以是至少一个相邻块在帧间编码时使用的预测模式,具体可以是:通过本发明的帧内预测模式搜索方法搜索出的最终预测模式,也可以是例如通过各种视频编码标准中规定的标准算法得到的最终预测模式。
可选的,所述相邻块是临近所述当前编码块的编码块中的像素块,可以是与所述当前编码块相接的编码块中的像素块,也可以是不与所述当前编码块相接而位于其附近的编码块中的像素块。
可选的,所述综合处理中,可以将所述Y个中间预测模式中的至少一个预测模式与至少一个所述相邻块的最终预测模式一起作为所述中间预测模式。
可选的,优选舍弃所述Y个中间预测模式中、与所述相邻块的最终预 测模式不同的至少一部分,而保留全部的所述相邻块的最终预测模式。作为一个方式,舍弃的所述Y个中间预测模式,是第1代价大的那些。换言之,保留的中间预测模式,是与所述相邻块的预测模式不同且所述第1代价最小的一个或多个预测模式。
所述综合处理中使用所述当前编码块的左侧、上侧以及左上侧这3个方向的所述相邻块中的至少一个的最终预测模式。
为了使得本发明的帧内预测模式搜索方法能够更好理解,以下使用图5,以使用本发明的具体例为例进行详细说明。
图5是对本发明的帧内预测模式搜索方法的具体例进行说明的框架流程图。
本具体例的整体技术框架如图5所示,分为大的3个阶段:
【S501】帧内模式预估(Intra mode estimate)
在该阶段,使用当前编码块的原始像素值从总共35个预测模式中筛选出11个预测模式,再通过当前编码块周围的相邻块的原始像素值产生预测值,并进一步通过对11个预测模式对应的预测残差分别进行哈达玛变换来筛选出代价最小的5个预测模式。
【S502】预测改进(Prediction refine)
在该阶段,将由邻近信息推导出的3个预测模式(Most Probable Modes)与S501中筛选得到的5个预测模式结合选出5个预测模式,并用周围的相邻块的重建像素值重新生成预测像素值。
【S503】最终模式选出(Final mode selection)
在该阶段,对在S502重新选出的5个预测模式对应的预测残差分别进行哈达玛变换进行筛选,得到代价最小的最终的预测模式。
图6是对本发明的帧内预测模式搜索方法的具体例进行详细说明的的流程图。
S501帧内模式预估(Intra mode estimate)
本具体例的帧内模式预估阶段中,包括初步模式确定(Rough Mode Decision)S5011、第1预测(Predict1)S5012、第1哈达玛模式确定(Had  Mode Decision1)S5013的阶段,以下对各个阶段进行具体说明。
S5011:初步模式确定
该阶段通过提取当前编码块原始像素值的梯度信息,从35个帧内预测模式(包括33个方向模式及DC和Planar模式)中筛选出11个预测模式。由于该阶段内不进行真正的预测值生成,故不会增加计算资源消耗。
首先将图2所示的35个帧内预测模式,针对预测方向中的0°、45°、90°及135°,将所述全部预测模式分为0°、45°、90°及135°所对应的4组,根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。
具体来说,按照预测方向分为0°、45°、90°及135°共4组,每组各11个模式,每组都包含模式0(DC模式)和模式1(Planar模式),如式(3-1)~(3-4)所示。
0°={0,1,6,7,8,9,10,11,12,13,14}    (3-1)
45°={0,1,2,3,4,5,30,31,32,33,34}    (3-2)
90°={0,1,22,23,24,25,26,27,28,29,30}    (3-3)
135°={0,1,14,15,16,17,18,19,20,21,22}    (3-4)
上述的方向性指标,例如是所述当前编码块在各个预测方向上的梯度信息(Gradient Information)。作为一例,可以将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。
例如,首先对当前编码块划分子块。图6是表示本具体例中的子块的划分方式的一例的示意图。如图6所示,按照左上、右上、左下、右下、中心的顺序,将所述当前编码块分成5个大小相等的子块a、b、c、d、e。从当前编码块取出5个子块。接着,分别计算出子块a、b、c、d、e的均值。再用均值按式(3-5)~(3-8)求出对应方向组的梯度信息,选择对应GI1~GI4中值最小的一个模式集合中的11个预测模式(Index值)作为输出。
GI1=|b-a|+|d-c|----0°   (3-5)
GI2=|c-e|+|e-b|----45°   (3-6)
GI3=|c-a|+|d-b|----90°   (3-7)
GI4=|d-e|+|e-a|----135°   (3-8)
另外,虽然在本具体例中包含了初步模式确定阶段S5011,但并不限定于此,也可将其省略,直接将35个预测模式作为输入进入后述的第1预测S5012阶段。
S5012:第1预测(Predict1)
该阶段的作用是利用周边相邻块的原始像素生成11组(对应初步模式确定阶段输出的11个预测模式)当前编码块的预测信号。按照现有的视频编码标准,该环节的做法应当是用周边相邻块的重建像素生成35组预测信号,这将导致该环节需要等待重建像素的生成从而造成延迟。根据本发明的方案,可大大提高计算并行度及降低计算复杂度。
以包含NxN个像素块的编码块为例,在预测时由周围4*N+1个相邻块的参考像素生成当前编码块的预测信号,这里,N是自然数。图7是表示在将编码块设为4x4即N为4的情况下,第1预测中使用的相邻块的分布位置的一例的示意图。在该例中,由所述编码块的左侧、左上侧和上侧的4*N+1即17个像素块的参考像素生成当前编码块的预测信号。
第1预测的阶段中,由周围17个相邻块的参考像素生成当前编码块的预测信号。
Prediction i,j=f m(NeighbourPixels)i,j=0...N-1,m=0...34(3-9)
式(3-9)描述了一个由相邻块参考像素生成预测像素的过程,式中f m,m=0...34表示可选的35种预测模式对应的35个不同预测算法,由周边相邻块的参考像素生成当前编码块预测信号的算法为现有的视频编码标准中规定算法,在此不展开叙述。
在得到11个预测模式对应的预测像素值后将其分别与当前编码块的原始像素值作差从而得到残差,求得11个预测模式对应的预测残差作为后续的第1哈达玛模式确定阶段的输入。
S5013:第1哈达玛模式确定(Had Mode Decision1)
该阶段以第1预测阶段S5012输出的11组残差为输入,对11组残差 分别进行哈达玛变换,将变换系数的绝对值和与表示11个预测模式的比特数结合计算出对应预测模式的代价。表1表示35个模式对应的比特数的一例。
【表1】
Index Rate
模式0 1bit
模式1 2bit
模式26 3bit
其他模式 5bit
如式(3-10)所示,式中λ为加权系数为按照现有的视频编码方法中的指定算法计算。
cost i=Sum(|Hadamard(Resi i)|)+λ*Rate   (3-10)
在计算得到11个代价后,从11个代价中选择最小的5个对应的预测模式作为输出。
另外,本具体例中虽然以哈达玛变换为例进行了说明,但并不限定于此,也可以是其他二维矩阵变换。
S502预测改进(Prediction refine)
本具体例的预测改进阶段中,包括综合处理(Combine)S5021、第2预测(Predict2)S5022的阶段,以下对各个阶段进行具体说明。
S5021:综合处理
该阶段对从相邻编码块获得的预测模式和帧内模式预估阶段得到的5个预测模式进行综合处理,将从相邻编码块获得的预测模式与帧内模式预估阶段选出的5个模式比较与结合,进一步得出5个预测模式。
这里,从相邻编码块获得的预测模式,可以是通过本发明的方法选出的预测模式,或者是按照现有的视频编码方法中的标准算法从相邻编码块推导出的3个预测模式(Most Probable Mode(MPM))。
作为综合处理的一个可选例,可以从帧内模式预估阶段选出的5个模式和从相邻编码块获得的3个预测模式共计8个模式中再选出5个模式:首先保留3个从相邻编码块获得的预测模式,再从5个帧内模式预估阶段 选出的预测模式中选择与3个从相邻编码块获得的预测模式不相同、且代价最小的2个模式,将共计5个预测模式作为综合处理阶段的输出。
另外,虽然在本具体例中包含了综合处理阶段S5021,但并不限定于此,也可将其省略,直接将S5013阶段输出的5个预测模式作为输入进入后述的第2预测S5022阶段。
S5022:第2预测
该阶段的输入为综合处理S5021输出的5个预测模式,利用周边相邻块的重建像素生成5组当前编码块的预测信号。由周边相邻块的重建像素(参考像素)生成当前编码块预测信号的算法为现有的视频编码方法中的规定算法,在此不展开叙述。
在得到5个预测模式对应的预测像素值后将其分别与当前编码块的原始像素值作差,求得5个预测模式对应的预测残差作为后续最终模式选出阶段的输入。
S503最终模式选出(Final mode selection)
本具体例的最终模式选出阶段中,包括第2哈达玛模式确定(Had Mode Decision2)S5031,以下对各该阶段进行具体说明。
第2哈达玛模式确定
该阶段以第2预测阶段S5022输出的5组残差为输入,对5组残差分别进行哈达玛变换,将变换系数的绝对值和与表示5个预测模式的比特数结合计算出对应预测模式的代价。这里的代价计算,采用与第1哈达玛模式确定阶段S5013中的代价计算相同的方式。另外,也并不限定于此,也可采用不同于第1哈达玛模式确定阶段S5013的其他代价计算方式。
在计算得到5个代价后,从5个代价中选择代价最小的1个对应的预测模式作为最终选择的1个预测模式。在进行视频编码时,将该残差输出进入后续的变换量化及熵编码RDO等阶段。
图7是表示本发明的帧内预测模式搜索装置70的结构框图。本发明的帧内预测模式搜索装置70,例如可以是芯片,包括:N-2流水级701、 N-1流水级702和N流水级703。在用这样的帧内预测模式搜索装置70实现例如图4所示的帧内预测模式搜索方法时,步骤401和步骤402由N-2流水级执行,步骤403由N-1流水级执行,步骤404由N流水级执行。
在帧内预测模式搜索装置70中,N-2流水级701、N-1流水级702和N流水级703并行工作,使得N流水级703对由N-1流水级702处理过的编码块的处理、N-1流水级702对由N流水级701处理过的编码块的处理、和N-2流水级701对当前编码块的处理并行进行。以下进行具体说明。
图8是用于说明由帧内预测模式搜索装置70进行的流水级处理的编码块示例的图。为了便于说明,这里举例与图3的64x64的编码块同样的编码块。其中,对左上的4个编码块分别标注了0、1、2、3。
图9是用于基于图5所示的框架流程图说明由帧内预测模式搜索装置70进行的流水级处理的一例的时序图。
在N-2流水级701,进行与上述S501中的帧内模式预估(Intra mode estimate)同样的处理。
即在N-2流水级701中,使用当前编码块的原始像素值从总共35个预测模式中筛选出11个预测模式,再通过当前编码块周围的相邻块的原始像素值产生预测值,并进一步通过对11个预测模式对应的预测残差分别进行哈达玛变换来筛选出代价最小的5个预测模式。
在N-1流水级702,进行与上述S502中的预测改进(Prediction refine)同样的处理。
即在N-1流水级702中,将由邻近信息推导出的3个预测模式(Most Probable Modes)与N-2流水级701中筛选得到的5个预测模式结合选出5个预测模式,并用周围的相邻块的重建像素值重新生成预测像素值。
在N流水级703,进行与上述S503中的最终模式选出(Final mode selection)同样的处理。
在该阶段,对在N-1流水级702重新选出的5个预测模式对应的预测残差分别进行哈达玛变换进行筛选,得到代价最小的最终的预测模式。
具体来说,在初始时刻t0,由N-2流水级701对编码块0进行处理 (帧内模式预估S501),此时,N-1流水级702和N流水级703为空闲。
接着,在时刻t1,N-2流水级701对新的编码块1进行处理(帧内模式预估S501),N-1流水级702对从N-2流水级701取得的由N-2流水级701处理过的编码块0进行处理(预测改进S502),此时,N流水级703为空闲。
再接下来,在时刻t2,N-2流水级701对新的编码块2进行处理(帧内模式预估S501),N-1流水级702对从N-2流水级701取得的由N-2流水级701处理过的编码块1进行处理(预测改进S502),N-2流水级703对从N-1流水级702取得的由N-1流水级702处理过的编码块0进行处理(最终模式选出S503)。
此后,各个流水级并行进行上述的S501~S503的处理,直到对所有的编码块完成处理。
通过采取分阶段帧内预测模式搜索算法,将原始像素引入帧内预测模式从而对搜索阶段解除关键依赖性,进而实现将整个帧内预测算法划分为三个流水级以提升并行度,从而如图9所示,从时刻t2开始,各个N-2~N的流水级701~703开始并行地对编码块进行处理,因此能够提高芯片处理速度以及效率。
另外,由于N-2流水级702不涉及任何数据依赖,因此作为本发明一个可选的方案,可将其拆分出来,例如预先处理图8中所有可能的编码块,将得到的结果存储起来待N-1流水级701取用。
在本发明所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地 方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质或存储器中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (60)

  1. 一种帧内预测模式搜索方法,包括:
    第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;
    第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一侧的Y个对象预测模式作为中间预测模式;
    第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和,
    第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,
    其中,Y是小于X的自然数。
  2. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    在所述第3步骤中,进一步对所述第2步骤得到的所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,
    其中,Z是小于X的自然数。
  3. 根据权利要求2所述的帧内预测模式搜索方法,其中,
    在所述第3步骤中,所述综合处理中使用所述当前编码块的左侧、上侧以及左上侧这3个方向的所述相邻块中的至少一个的最终预测模式。
  4. 根据权利要求2所述的帧内预测模式搜索方法,其中,
    在所述第3步骤中,所述综合处理中将所述Y个中间预测模式中的至 少一个预测模式与所述相邻块的最终预测模式一起作为所述中间预测模式。
  5. 根据权利要求4所述的帧内预测模式搜索方法,其中,
    所述Y个中间预测模式中的至少一个预测模式,是与所述相邻块的最终预测模式不同且所述第1代价最小一侧的预测模式。
  6. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述X个对象预测模式为35个对象预测模式,所述Y个中间预测模式为5个中间预测模式。
  7. 根据权利要求2所述的帧内预测模式搜索方法,其中,
    所述Z个中间预测模式为5个中间预测模式。
  8. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    在所述第1步骤中,将帧内预测的全部预测模式分为至少2组,选择其中1组作为所述对象预测模式。
  9. 根据权利要求8所述的帧内预测模式搜索方法,其中,
    在所述第1步骤中,根据所述对象预测模式的方向或种类的至少一个进行所述分组。
  10. 根据权利要求9所述的帧内预测模式搜索方法,其中,
    每个所述分组中的预测模式的数量相同。
  11. 根据权利要求8所述的帧内预测模式搜索方法,其中,
    所述预测模式包括方向模式、DC模式和Planar模式,
    每个分组都包括所述DC模式和/或Planar模式。
  12. 根据权利要求8所述的帧内预测模式搜索方法,其中,
    在所述第1步骤中,随机或者根据当前编码块的特征指标来进行选择1组预测模式作为所述对象预测模式。
  13. 根据权利要求8所述的帧内预测模式搜索方法,其中,
    在所述第1步骤中,针对预测方向中的0°、45°、90°及135°,将所述全部预测模式分为0°、45°、90°及135°所对应的4组,
    根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。
  14. 根据权利要求13所述的帧内预测模式搜索方法,其中,
    所述方向性指标是所述当前编码块在各个预测方向上的梯度信息。
  15. 根据权利要求14所述的帧内预测模式搜索方法,其中,
    在所述第1步骤中,将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。
  16. 根据权利要求13所述的帧内预测模式搜索方法,其中,
    在所述第1步骤中,将所述当前编码块按照左上、右上、左下、右下、中心的顺序,分成大小相等的5个子块a、b、c、d、e,分别计算出子块a、b、c、d、e的均值,再用均值按下式求出在0°、45°、90°及135°的梯度信息,
    0°:GI1=|b-a|+|d-c|
    45°:GI2=|c-e|+|e-b|
    90°:GI3=|c-a|+|d-b|
    135°:GI4=|d-e|+|e-a|
    选择GI1~GI4中最小值对应的预测方向的1组预测模式作为所述对象预测模式。
  17. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述相邻块是临近所述当前编码块的编码块中的像素块。
  18. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述原始像素和所述重建像素,包括通过进行填充而得到的像素。
  19. 根据权利要求18所述的帧内预测模式搜索方法,其中,
    进行所述填充的像素块,是在生成所述第2预测信号时无法获得重建像素的位置上的像素块。
  20. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述编码块包含NxN个像素块,N是自然数,
    所述利用所述当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的第1预测信号,包括:由所述编码块的左侧、左上侧和上侧的4*N+1个像素块的参考像素生成当前编码块的预测信号。
  21. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述第1代价计算方法和/或所述第2代价计算方法中,将残差的平方和或绝对值和作为预测模式的代价。
  22. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述第1代价计算方法和/或所述第2代价计算方法中,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。
  23. 根据权利要求21所述的帧内预测模式搜索方法,其中,
    所述二维矩阵变换是离散正弦/余弦变换。
  24. 根据权利要求21所述的帧内预测模式搜索方法,其中,
    所述二维矩阵变换是哈达玛变换。
  25. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述第1代价计算方法与所述第2代价计算方法相同或者不同。
  26. 根据权利要求1所述的帧内预测模式搜索方法,其中,
    所述帧内预测模式搜索方法由包括N-2流水级、N-1流水级和N流水级的芯片执行,
    所述第1步骤和所述第2步骤由N-2流水级执行,
    所述第3步骤由N-1流水级执行,
    所述第4步骤由N流水级执行。
  27. 根据权利要求26所述的帧内预测模式搜索方法,其中,
    所述N-2流水级对所有编码块进行预先处理,并将处理的结果存储起来供所述N-1流水级调用。
  28. 根据权利要求26所述的帧内预测模式搜索方法,其中,
    所述N-2流水级、所述N-1流水级和所述N流水级并行工作,使得所述N流水级对由所述N-1流水级处理过的编码块的处理、所述N-1流水级对由所述N流水级处理过的编码块的处理、和所述N-2流水级对当前编码块的处理并行进行。
  29. 一种视频编码方法,包括:
    使用权利要求1~28的任一项所述的帧内预测模式搜索方法搜索出的最终预测模式对视频进行编码。
  30. 一种帧内预测模式搜索装置,用于执行权利要求1~25的任一项所述的帧内预测模式搜索方法,其中,
    包括:N-2流水级、N-1流水级和N流水级,
    所述第1步骤和所述第2步骤由所述N-2流水级执行,
    所述第3步骤由所述N-1流水级执行,
    所述第4步骤由所述N流水级执行。
  31. 根据权利要求30所述的帧内预测模式搜索方法,其中,
    所述N-2流水级对所有编码块进行预先处理,并将处理的结果存储起来供所述N-1流水级调用。
  32. 根据权利要求30所述的帧内预测模式搜索方法,其中,
    所述N-2流水级、所述N-1流水级和所述N流水级并行工作,使得所述N流水级对由所述N-1流水级处理过的编码块的处理、所述N-1流水级对由所述N流水级处理过的编码块的处理、和所述N-2流水级对当前编码块的处理并行进行。
  33. 一种帧内预测模式搜索装置,包括:存储器和处理器,其中,
    所述存储器用于存储程序指令;
    所述处理器,调用所述程序指令,当程序指令被执行时,用于执行以下操作:
    第1步骤,基于X个对象预测模式,利用当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的X个第1预测信号,并求出所述X个第1预测信号与所述编码块的原始像值的残差作为X个第1残差;
    第2步骤,根据所述第1残差通过第1代价计算方法计算出所述X个对象预测模式的第1代价,将所述对象预测模式中所述第1代价最小一侧的Y个对象预测模式作为中间预测模式;
    第3步骤,基于所述中间预测模式,利用所述相邻块的重建像素生成所述当前编码块在所述中间预测模式下的第2预测信号,并求出所述第2预测信号与所述当前编码块的原始像值的残差作为第2残差;和
    第4步骤,根据所述第2残差通过第2代价计算方法计算出所述中间预测模式的第2代价,将所述中间预测模式中所述第2代价最小的预测模式作为搜索出的最终预测模式,
    其中,Y是小于X的自然数。
  34. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    在所述第3步骤中,进一步对所述第2步骤得到的所述Y个中间预测模式与所述当前编码块的至少一个相邻块的最终预测模式进行综合处理来将所述中间预测模式调整为Z个,
    其中,Z是小于X的自然数。
  35. 根据权利要求34所述的帧内预测模式搜索装置,其中,
    在所述第3步骤中,所述综合处理中使用所述当前编码块的左侧、上侧以及左上侧这3个方向的所述相邻块中的至少一个的最终预测模式。
  36. 根据权利要求34所述的帧内预测模式搜索装置,其中,
    在所述第3步骤中,所述综合处理中,将所述Y个中间预测模式中的至少一个预测模式与所述相邻块的最终预测模式一起作为所述中间预测模式。
  37. 根据权利要求36所述的帧内预测模式搜索装置,其中,
    所述Y个中间预测模式中的至少一个预测模式,是与所述相邻块的最终预测模式不同且所述第1代价最小一侧的预测模式。
  38. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述X个对象预测模式为35个对象预测模式,所述Y个中间预测模式为5个中间预测模式。
  39. 根据权利要求34所述的帧内预测模式搜索装置,其中,
    所述Z个中间预测模式为5个中间预测模式。
  40. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    在所述第1步骤中,将帧内预测的全部预测模式分为至少2组,选择 其中1组作为所述对象预测模式。
  41. 根据权利要求40所述的帧内预测模式搜索装置,其中,
    根据所述对象预测模式的方向或种类的至少一个进行所述分组。
  42. 根据权利要求41所述的帧内预测模式搜索装置,其中,
    每个所述分组中的预测模式的数量相同。
  43. 根据权利要求40所述的帧内预测模式搜索装置,其中,
    所述预测模式包括方向模式、DC模式和Planar模式,
    每个分组都包括所述DC模式和/或Planar模式。
  44. 根据权利要求40所述的帧内预测模式搜索装置,其中,
    在所述第1步骤中,随机或者根据当前编码块的特征指标来进行选择1组预测模式作为所述对象预测模式。
  45. 根据权利要求40所述的帧内预测模式搜索装置,其中,
    在所述第1步骤中,针对预测方向中的0°、45°、90°及135°,将所述全部预测模式分为0°、45°、90°及135°所对应的4组,
    根据所述当前编码块在各个预测方向上的方向性指标来选择其中1组作为所述对象预测模式。
  46. 根据权利要求45所述的帧内预测模式搜索装置,其中,
    所述方向性指标是所述当前编码块在各个预测方向上的梯度信息。
  47. 根据权利要求46所述的帧内预测模式搜索装置,其中,
    在所述第1步骤中,将所述当前编码块分成多个区域,根据分组中的预测方向确定所述多个区域在所述预测方向上的梯度信息,选择梯度信息为最小值的1组预测模式作为所述对象预测模式。
  48. 根据权利要求45所述的帧内预测模式搜索装置,其中,
    在所述第1步骤中,将所述当前编码块按照左上、右上、左下、右下、中心的顺序,分成大小相等的5个子块a、b、c、d、e,分别计算出子块a、b、c、d、e的均值,再用均值按下式求出在0°、45°、90°及135°的梯度信息,
    0°:GI1=|b-a|+|d-c|
    45°:GI2=|c-e|+|e-b|
    90°:GI3=|c-a|+|d-b|
    135°:GI4=|d-e|+|e-a|
    选择GI1~GI4中最小值对应的预测方向的1组预测模式作为所述对象预测模式。
  49. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述相邻块是临近所述当前编码块的编码块中的像素块。
  50. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述原始像素和所述重建像素,包括通过进行填充而得到的像素。
  51. 根据权利要求50所述的帧内预测模式搜索装置,其中,
    进行所述填充的像素块,是在生成所述第2预测信号时无法获得重建像素的位置上的像素块。
  52. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述编码块包含NxN个像素块,N是自然数,
    所述利用所述当前编码块周边的相邻块的原始像素生成所述当前编码块在所述X个对象预测模式下的第1预测信号,包括:由所述编码块的左侧、左上侧和上侧的4*N+1个像素块的参考像素生成当前编码块的预测信号。
  53. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述第1代价计算方法和/或所述第2代价计算方法中,将残差的平方和或绝对值和作为预测模式的代价。
  54. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述第1代价计算方法和/或所述第2代价计算方法中,根据对残差进行二维矩阵变换得到的变换系数和预测模式的比特数来计算预测模式的代价。
  55. 根据权利要求53所述的帧内预测模式搜索装置,其中,
    所述二维矩阵变换是离散正弦/余弦变换。
  56. 根据权利要求53所述的帧内预测模式搜索装置,其中,
    所述二维矩阵变换是哈达玛变换。
  57. 根据权利要求33所述的帧内预测模式搜索装置,其中,
    所述第1代价计算方法与所述第2代价计算方法相同或者不同。
  58. 一种视频编码装置,包括权利要求30~57的任一项所述的帧内预测模式搜索装置。
  59. 一种记录介质,存储有使计算机执行如权利要求1~28所述的帧内预测模式搜索方法的程序。
  60. 一种记录介质,存储有使计算机执行如权利要求29所述的视频编码方法的程序。
PCT/CN2018/097528 2018-07-27 2018-07-27 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质 WO2020019316A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880017757.8A CN110419214A (zh) 2018-07-27 2018-07-27 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质
PCT/CN2018/097528 WO2020019316A1 (zh) 2018-07-27 2018-07-27 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/097528 WO2020019316A1 (zh) 2018-07-27 2018-07-27 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质

Publications (1)

Publication Number Publication Date
WO2020019316A1 true WO2020019316A1 (zh) 2020-01-30

Family

ID=68357869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097528 WO2020019316A1 (zh) 2018-07-27 2018-07-27 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质

Country Status (2)

Country Link
CN (1) CN110419214A (zh)
WO (1) WO2020019316A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110881125B (zh) * 2019-12-10 2021-10-29 中国科学院深圳先进技术研究院 帧内预测方法、视频编码、解码方法及相关设备
CN112087634B (zh) * 2020-08-11 2022-03-08 北京博雅慧视智能技术研究院有限公司 一种最佳角度判定方法和***
WO2022061563A1 (zh) * 2020-09-23 2022-03-31 深圳市大疆创新科技有限公司 视频编码方法、装置及计算机可读存储介质
CN117837142A (zh) * 2021-10-27 2024-04-05 深圳市大疆创新科技有限公司 视频编码方法、装置和计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060165171A1 (en) * 2005-01-25 2006-07-27 Samsung Electronics Co., Ltd. Method of effectively predicting multi-layer based video frame, and video coding method and apparatus using the same
CN102077598A (zh) * 2008-04-30 2011-05-25 豪威科技有限公司 用于视频编码器中的计算有效的帧内模式预测的设备和方法
CN103327325A (zh) * 2013-05-13 2013-09-25 西安电子科技大学 基于hevc标准的帧内预测模式快速自适应选择方法
CN104796701A (zh) * 2015-03-27 2015-07-22 北京君正集成电路股份有限公司 基于hevc的预测模式确定方法及装置
CN106028047A (zh) * 2016-05-24 2016-10-12 西安电子科技大学 一种基于Hadamard变换的帧内预测的快速模式选择和PU划分的方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080779A1 (en) * 2005-01-25 2006-08-03 Samsung Electronics Co., Ltd. Method of effectively predicting multi-layer based video frame, and video coding method and apparatus using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060165171A1 (en) * 2005-01-25 2006-07-27 Samsung Electronics Co., Ltd. Method of effectively predicting multi-layer based video frame, and video coding method and apparatus using the same
CN102077598A (zh) * 2008-04-30 2011-05-25 豪威科技有限公司 用于视频编码器中的计算有效的帧内模式预测的设备和方法
CN103327325A (zh) * 2013-05-13 2013-09-25 西安电子科技大学 基于hevc标准的帧内预测模式快速自适应选择方法
CN104796701A (zh) * 2015-03-27 2015-07-22 北京君正集成电路股份有限公司 基于hevc的预测模式确定方法及装置
CN106028047A (zh) * 2016-05-24 2016-10-12 西安电子科技大学 一种基于Hadamard变换的帧内预测的快速模式选择和PU划分的方法

Also Published As

Publication number Publication date
CN110419214A (zh) 2019-11-05

Similar Documents

Publication Publication Date Title
KR102026855B1 (ko) 다중 참조를 허용하는 비디오 코덱에서 모션 벡터를 예측하는 방법, 및 그 방법을 이용한 모션 벡터 부호화/복호화 장치
WO2020019316A1 (zh) 帧内预测模式搜索方法及装置、视频编码方法及装置以及记录介质
WO2018010492A1 (zh) 视频编码中帧内预测模式的快速决策方法
CN104735452B (zh) 通过使用大变换单元对图像进行编码和解码的方法和设备
CN104244007B (zh) 一种图像编码方法和装置及解码方法和装置
CN104067619B (zh) 视频解码器、视频解码方法以及视频解码程序的记录介质
CN103248895B (zh) 一种用于hevc帧内编码的快速模式估计方法
CN109792519A (zh) 基于帧内预测模式的图像处理方法及其装置
WO2014190468A1 (en) Video encoder for images
CN108777794B (zh) 图像的编码方法和装置、存储介质、电子装置
KR20060043435A (ko) 비디오 코딩시 정수 변환 행렬 선택 방법 및 관련 정수 변환 방법
CN103533355B (zh) 一种hevc快速编码方法
CN103414895A (zh) 一种适用于hevc标准的编码器帧内预测装置及方法
CN102740077A (zh) 基于h.264/avc标准的帧内预测模式选择方法
CN104883566A (zh) 一种适用于hevc标准的帧内预测块大小划分的快速算法
CN104702959A (zh) 一种视频编码的帧内预测方法及***
JP6962193B2 (ja) 動画像符号化装置、動画像符号化方法および動画像符号化プログラムを記憶する記録媒体
CN109889838A (zh) 一种基于roi区域的hevc快速编码方法
CN109168000B (zh) 一种基于rc预测的hevc帧内预测快速算法
CN104602026B (zh) 一种适用于hevc标准下编码器中全复用的重建环路结构
CN102420989A (zh) 帧内预测方法和装置
CN113055670B (zh) 一种基于hevc/h.265的视频编码的方法及***
WO2023070388A1 (zh) 视频编码方法、装置和计算机可读存储介质
KR20120023234A (ko) 동영상 부호화를 위한 움직임 추정 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18927578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18927578

Country of ref document: EP

Kind code of ref document: A1