An intra prediction method, device, storage medium and program product
Patent Information
- Application Number
- CN202510339799.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2026-09-22
AI Technical Summary
[0004]但是,同一帧内已编码像素块的像素特征与当前块的像素特征之间可能存在一定差异性,使得不同已编码像素块应用的帧内预测模式对于当前块所需的帧内预测模式的参考价值也存在差异,进而影响对于当前块的帧内预测效果
[0012]本公开实施例公开了基于视频帧中一个当前编码块(即当前块)与周围的其他编码块(即空间邻近块)之间的像素特征相似度,确定像素特征相似度较大的多个空间邻近块,并基于多个空间邻近块中每个空间邻近块应用的帧内预测模式,确定共用同一种帧内预测模式的至少一个空间邻近块,进而通过参考视频帧中应用同一种帧内预测模式的各个空间邻近块的像素个数,选择帧内预测效果最好的几个帧内预测模式对当前块进行帧内预测,得到当前块的预测值。也就是说,在应用OBIC技术预测当前块时,可以先对当前块周围的空间邻近块进行相似性筛选,仅获取经过筛选后的空间邻近块所使用的帧内预测模式,再依此通过构建对应于各个帧内预测模式的像素总数直方图,确定用于当前块的候选帧内预测模式。因此,相较于现有OBIC技术中仅参考像素个数来将像素个数最多的帧内预测模式作为最好的帧内预测模式对当前块进行帧内预测,可以基于现有OBIC技术,在累加计算对应于各个帧内预测模式的像素总数之前,参考了各个空间邻近块与当前块之间的像素特征相似度(即相似度较大的空间邻近块可以作为当前块的参考,而相似度较小的空间邻近块则不作为当前块的参考),可以进一步提高后续对于当前块的帧内预测效果。
Smart Images

Figure CN122802694A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video coding technology, and in particular to an intra-frame prediction method, apparatus, storage medium, and program product. Background Technology
[0002] In recent years, with the increase in video data volume, the demand for video encoding and decoding has also increased. For example, the encoding efficiency of each coding block in a video frame.
[0003] Currently, in the process of encoding coded blocks in a video frame (i.e., intra-frame coding), the occurrence-based intra coding (OBIC) intra-frame prediction method can be used to predict the pixel value of the current block by utilizing the coded pixel blocks in the same frame that use other intra-frame prediction modes.
[0004] However, there may be differences between the pixel features of previously encoded pixel blocks within the same frame and the pixel features of the current block. This means that the intra-prediction modes applied to different previously encoded pixel blocks may have different reference values for the intra-prediction mode required for the current block, thus affecting the intra-prediction performance of the current block. Therefore, how to select an accurate intra-prediction mode for the current block by referring to the intra-prediction modes applied to different previously encoded pixel blocks within the same frame, in order to improve the intra-prediction performance of the current block, has become a pressing technical problem to be solved. Summary of the Invention
[0005] This disclosure provides an intra-frame prediction method, apparatus, storage medium, and program product, which can select an accurate intra-frame prediction mode for the current block by referring to the intra-frame prediction modes applied to coded pixel blocks similar to the current block within the same frame, thereby improving the intra-frame prediction performance of the current block.
[0006] On the one hand, an intra-frame prediction method is provided, the method comprising: determining at least one target spatial neighbor block similar to the current block; determining quantitative indicators of each of a plurality of candidate intra-frame prediction modes based on the number of pixels of the at least one target spatial neighbor block and the applied intra-frame prediction mode; determining at least one target intra-frame prediction mode of the current block from the plurality of candidate intra-frame prediction modes based on the quantitative indicators of each of the plurality of candidate intra-frame prediction modes; and performing intra-frame prediction on the current block based on the at least one target intra-frame prediction mode.
[0007] On the other hand, an intra-frame prediction apparatus is provided, the apparatus comprising: a processing module.
[0008] The processing module is configured to determine at least one target spatial neighboring block similar to the current block; the processing module is further configured to determine quantitative indicators of multiple candidate intra-prediction modes based on the number of pixels of the at least one target spatial neighboring block and the applied intra-prediction mode; the processing module is further configured to determine at least one target intra-prediction mode of the current block from the multiple candidate intra-prediction modes based on the quantitative indicators of the multiple candidate intra-prediction modes; the processing module is further configured to perform intra-prediction on the current block based on the at least one target intra-prediction mode.
[0009] In another aspect, an intra-frame prediction apparatus is provided, comprising: a memory and a processor. The memory and the processor are coupled. The memory is used to store a computer program. When the processor executes the computer program, it implements the intra-frame prediction method of any of the above embodiments.
[0010] In another aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, which, when executed by a processor, implement the intra-frame prediction method of any of the above embodiments.
[0011] In another aspect, a computer program product is provided, which includes computer program instructions that, when executed, implement the intra-frame prediction method of any of the above embodiments.
[0012] This disclosure discloses a method for determining multiple spatial neighbor blocks with high pixel feature similarity based on the pixel feature similarity between a current coding block (i.e., the current block) and surrounding other coding blocks (i.e., spatial neighbor blocks) in a video frame. Based on the intra-prediction mode applied to each of these spatial neighbor blocks, at least one spatial neighbor block sharing the same intra-prediction mode is determined. Then, by referencing the number of pixels in each spatial neighbor block applying the same intra-prediction mode in the video frame, the best-performing intra-prediction modes are selected to perform intra-prediction on the current block, resulting in a predicted value for the current block. In other words, when using OBIC technology to predict the current block, the spatial neighbor blocks surrounding the current block can first be filtered for similarity, obtaining only the intra-prediction modes used by the filtered spatial neighbor blocks. Then, by constructing a histogram of the total number of pixels corresponding to each intra-prediction mode, candidate intra-prediction modes for the current block are determined. Therefore, compared to the existing OBIC technology which only considers the number of pixels to select the intra-prediction mode with the most pixels as the best intra-prediction mode for the current block, this new OBIC technology can, before accumulating the total number of pixels corresponding to each intra-prediction mode, refer to the pixel feature similarity between each spatial neighboring block and the current block (i.e., spatial neighboring blocks with higher similarity can be used as references for the current block, while spatial neighboring blocks with lower similarity are not used as references for the current block), which can further improve the subsequent intra-prediction effect for the current block. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.
[0014] Figure 1 A schematic diagram illustrating a framework process for video encoding provided for some embodiments of this disclosure;
[0015] Figure 2 A schematic diagram of a video encoding and decoding framework provided for some embodiments of this disclosure;
[0016] Figure 3 A schematic diagram of spatial neighbor block sampling points for generating an OBIC pixel utilization histogram, provided for some embodiments of this disclosure;
[0017] Figure 4 A pixel-level utilization histogram corresponding to each intra-frame prediction mode in the spatial neighbor blocks of the current coding block is provided for some embodiments of this disclosure;
[0018] Figure 5A schematic diagram of a system architecture provided for some embodiments of this disclosure;
[0019] Figure 6 A flowchart illustrating an intra-frame prediction method provided in some embodiments of this disclosure;
[0020] Figure 7 A schematic diagram of spatial neighboring block sampling points adjacent to the current block is provided for some embodiments of this disclosure;
[0021] Figure 8 A schematic diagram illustrating a reconstruction region guide based on candidate BV provided for some embodiments of this disclosure;
[0022] Figure 9 A schematic diagram illustrating spatial neighbor block filtering based on target BV guidance, provided for some embodiments of this disclosure;
[0023] Figure 10 A schematic diagram illustrating the distance between a target spatial neighboring block and the current block, provided for some embodiments of this disclosure;
[0024] Figure 11 This is another schematic diagram illustrating the distance between a target space neighboring block and the current block, provided for some embodiments of this disclosure;
[0025] Figure 12 A schematic diagram illustrating an example of a video coding framework provided in some embodiments of this disclosure;
[0026] Figure 13 A schematic diagram illustrating a novel OBIC technology application process provided for some embodiments of this disclosure;
[0027] Figure 14 A schematic diagram of the structure of an intra-frame prediction device provided for some embodiments of this disclosure. Figure 1 ;
[0028] Figure 15 A schematic diagram of the structure of an intra-frame prediction device provided for some embodiments of this disclosure. Figure 2 . Detailed Implementation
[0029] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0030] It should be noted that, in this disclosure, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0031] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0032] In the description of this disclosure, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "more than one" means two or more.
[0033] In recent years, with the increase in video data volume, the demand for video encoding and decoding has also increased. For example, the encoding efficiency of each coding block (such as coding unit (CU)) in a video frame.
[0034] Currently, in the process of encoding coded blocks in video frames (i.e., intra-frame coding), the method is usually based on intra-frame prediction, which uses the already encoded neighboring pixels in the same frame to predict the pixel value of the current coded block (i.e., the current block).
[0035] For example, such as Figure 1 The diagram illustrates the framework of video coding, specifically a block-based hybrid video coding and decoding framework. The original YUV (luminance, blue difference, and red difference) is compressed into video through several key modules: prediction, transform, quantization, entropy coding, bitrate control, and post-processing. Video compression primarily addresses temporal and spatial redundancy. The block-based hybrid video coding framework can be described as follows:
[0036] (1) First, divide the current block according to several partitioning types;
[0037] (2) Prediction is made based on the results of the partitioning, mainly involving intra-frame prediction and inter-frame prediction, which are respectively for removing spatial redundancy and temporal redundancy.
[0038] (3) For the reconstructed image obtained by prediction, it is compared with the original image and the difference is processed. The residual is further reduced by transformation and quantization, and then binary encoded by entropy coding.
[0039] (4) Finally, the block effect, ringing effect and other distortion problems are eliminated by post-processing modules such as deblocking filter (DBF), sample adaptive offset (SAO), and adaptive loop filter (ALF).
[0040] For example, such as Figure 2 The diagram illustrates the framework of video encoding and decoding, representing the current video encoding and decoding framework of video encoding standards. The overall framework flow at the decoding end can be summarized as follows:
[0041] (1) First, decode the encoded binary code stream;
[0042] (2) Then, the decoded result is dequantized and inverse transformed;
[0043] (3) For the prediction results obtained according to the prediction mode (such as motion compensation, intra-frame prediction), add them to the residual results after inverse quantization and inverse transformation to obtain the reconstructed image;
[0044] (4) Finally, DBF, SAO, ALF and other operations are used to post-process the reconstructed image, and the processed image is stored in the decoded image buffer and the video signal is output.
[0045] It should be noted that, currently, whether it is the latest audio-video coding standard (AVS) 4 which is still in the exploratory stage, or H.267, versatile video coding (VVC), etc., they all use this block-based hybrid video coding framework.
[0046] Furthermore, in the error concealment mechanism (ECM), occurrence-based intra coding (OBIC) is used for intra prediction. Its basic principle is to first calculate the number of pixels using each intra prediction mode (IPM) in the spatially neighboring blocks, and then generate a histogram of the total number of pixels corresponding to each IPM by summing them. This allows for comparison and selection of several IPMs applied to the largest number of pixels as candidates. Finally, the prediction values obtained from these candidate IPMs are weighted and used as the prediction value for the current coding block. In short, OBIC derives the intra prediction value for the current coding block based on the pixel-level utilization of each IPM in the spatially neighboring blocks.
[0047] The implementation of OBIC technology can include two steps: candidate intra-frame prediction mode derivation and current coded block prediction value generation. Its main contents are summarized as follows:
[0048] (1) Obtain spatial reference information and construct a statistical histogram: By examining the intra-prediction modes of spatially adjacent and non-spatial blocks, the number of pixels using each mode is summarized into a histogram of occurrences (HoC). For example, for a reference block of size W*H, when its intra-coding mode IPM is index (idx), the pixel-level utilization (histogram) of this mode is calculated by accumulating the values as shown in Formula 1:
[0049] histogram[idx] = W × H (Formula 1)
[0050] For example, such as Figure 3 As shown, this diagram illustrates the spatial neighbor block sampling points used to generate the OBIC pixel utilization histogram. Specifically, around the current CU, the available CUs (i.e., spatial neighbor blocks) where the sampling points are located are obtained from sampling points in the spatially neighboring region (e.g., sampling points 14-31 with different numbers). Available spatial neighbor blocks refer to coded units that have already been reconstructed.
[0051] It can be observed that the initial OBIC technology only obtains the neighboring CUs around the current coding block by sampling points with an approximately uniform distribution, and performs statistical analysis on their intra-frame angle prediction patterns and CU size (i.e. the number of pixels contained).
[0052] like Figure 4As shown, it displays a pixel-level utilization histogram of the spatial neighbor blocks of the current coding block corresponding to each intra-prediction mode. Multiple coordinate points on the horizontal axis correspond to different intra-prediction modes, and multiple coordinate points on the vertical axis correspond to the number of pixels present (or occurring) for each intra-prediction mode.
[0053] (2) Obtaining candidate intra-frame prediction modes for OBIC prediction: After obtaining the complete HoC based on the total number of pixels in step (1), select the 5 intra-frame angle mode indices with the highest amplitudes (corresponding to the above candidate intra-frame prediction modes) according to the histogram amplitude sorting. If there are fewer than 5 angle mode indices with non-zero amplitudes, only the intra-frame angle mode indices with non-zero amplitudes are obtained. That is, at most 5 intra-frame angle prediction mode indices can be obtained based on the HoC. In addition to the angle modes obtained from the HoC, Planar mode or non-angle prediction modes based on block vector (BV) will also be used for OBIC prediction.
[0054] (3) Generation of prediction values for the current coding block: After obtaining all intra-prediction modes for OBIC prediction through step (2), intra-prediction values corresponding to each mode can be generated. Then, all the obtained intra-prediction values are fused using a weighted calculation method to finally generate the intra-prediction value for the current coding block. Among them, the fusion weight of the prediction values obtained by the intra-angle mode obtained through HoC is calculated based on the pixel amplitude ratio of the intra-angle prediction mode used, that is, the fusion weight is related to the pixel-level utilization rate of the angle mode.
[0055] However, due to the differences between the pixel values and pixel value variation patterns in spatial neighbor blocks and the current coding block, the intra-frame prediction mode used by the spatial neighbor blocks may not be able to obtain accurate prediction results when applied to the generation of prediction values for the current coding block.
[0056] Therefore, how to select an accurate intra-prediction mode for the current block by referring to the intra-prediction modes applied by different coded pixel blocks within the same frame, so as to improve the intra-prediction performance of the current block, has become a technical problem that urgently needs to be solved.
[0057] To address the aforementioned technical problems, this disclosure provides an intra-frame prediction method applicable to intra-frame pixel encoding and decoding scenarios. Based on the pixel feature similarity between a current coding block (i.e., the current block) and surrounding coding blocks (i.e., spatially neighboring blocks) in a video frame, multiple spatially neighboring blocks with high pixel feature similarity are identified. Then, based on the intra-frame prediction mode applied to each of these spatially neighboring blocks, at least one spatially neighboring block sharing the same intra-frame prediction mode is determined. Finally, by referencing the number of pixels in each spatially neighboring block applying the same intra-frame prediction mode in the video frame, the few intra-frame prediction modes with the best intra-frame prediction performance are selected to perform intra-frame prediction on the current block, thereby obtaining the predicted value for the current block.
[0058] In other words, when applying OBIC technology to predict the current block, the spatial neighboring blocks around the current block can be filtered for similarity first. Only the intra-prediction modes used by the filtered spatial neighboring blocks are obtained. Then, by constructing a histogram of the total number of pixels corresponding to each intra-prediction mode, candidate intra-prediction modes for the current block are determined. Therefore, compared to the existing OBIC technology that only considers the number of pixels to select the intra-prediction mode with the most pixels as the best intra-prediction mode for the current block, this technology, based on the existing OBIC technology, considers the pixel feature similarity between each spatial neighboring block and the current block before accumulating the total number of pixels corresponding to each intra-prediction mode (i.e., spatial neighboring blocks with higher similarity can be used as references for the current block, while spatial neighboring blocks with lower similarity are not used as references for the current block), which can further improve the subsequent intra-prediction effect for the current block.
[0059] The implementation environment of the embodiments of this disclosure is described below.
[0060] like Figure 5 The diagram shown is a schematic of a system architecture provided in an embodiment of this disclosure. The intra-frame prediction device (such as electronic device 500) may include: a partitioning module 501 and a prediction module 502.
[0061] The partitioning module 501 can divide all pixels within a video frame into blocks, resulting in multiple coding blocks. The prediction module 502 can perform intra-frame prediction for each coding block to obtain the predicted value for each coding block.
[0062] In addition, the prediction module 502 can also perform intra-frame prediction on the current block (i.e., any coded block in the video frame) based on OBIC technology to determine the predicted value of the current block.
[0063] In this embodiment of the disclosure, during the intra-frame prediction of the current block by the prediction module 502 based on OBIC technology, the prediction module 502 can not only refer to the number of pixels of the spatial neighboring blocks of the current block, but also refer to the pixel feature similarity between the current block and the spatial neighboring blocks (that is, spatial neighboring blocks with greater similarity can be used as references for the current block, while spatial neighboring blocks with less similarity are not used as references for the current block).
[0064] Optionally, the electronic device 500 can be the encoding end in the video encoding and decoding process. That is, the electronic device 500 can determine the intra-frame prediction mode of each coded block of the video frame through the partitioning module 501 and the prediction module 502 in the process of rate-distortion optimization (RDO) decision.
[0065] Alternatively, the electronic device 500 can be the decoding end in the video encoding and decoding process. That is, the electronic device 500 can determine the intra-frame prediction mode of each coding block of the video frame through the partitioning module 501 and the prediction module 502 during the decoding process of the video frame.
[0066] It should be noted that electronic device 500 can be a terminal, or electronic device 500 can be a server.
[0067] The server can be a single physical server, or a server cluster consisting of multiple servers. Alternatively, the server cluster can be a distributed cluster. Alternatively, the server can be a cloud server. This disclosure does not limit the specific implementation of the server.
[0068] A terminal can be a device with wireless transceiver capabilities. Terminals can be mobile phones, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminals, augmented reality (AR) terminals, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical care, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on. The embodiments of this disclosure do not limit the application scenarios. A terminal may also be referred to as a user, user equipment (UE), A-IoT device, access terminal, UE unit, UE station, mobile station, mobile station, remote station, transmitter, remote terminal, mobile device, UE terminal, wireless communication device, UE agent, or UE device, etc., and the embodiments of this disclosure do not limit this to these terms.
[0069] It should be noted that, Figure 5 This is just an example framework diagram. Figure 5 The number of modules included, and the names of each module, are unlimited, except for... Figure 5 In addition to the modules shown, electronic devices may also include other modules, such as input modules and output modules.
[0070] The application scenarios of the embodiments disclosed herein are not limited. The system architecture and business scenarios described in the embodiments of this disclosure are for the purpose of more clearly illustrating the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of this disclosure. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this disclosure are also applicable to similar technical problems.
[0071] Figure 6 A flowchart illustrating an intra-frame prediction method is shown, as follows: Figure 6 As shown, the intra-frame prediction method may include:
[0072] S601. Determine at least one target spatial neighboring block that is similar to the current block.
[0073] The current block can be a coded block in a video frame that requires intra-frame prediction.
[0074] As one possible implementation, the intra-frame prediction device can determine the coded blocks (i.e., reconstructed spatial neighbor blocks) around the current block that have already undergone intra-frame prediction in the video frame where the current block is located, and determine the similarity between each spatial neighbor block and the current block by comparing the pixel value difference between the first region around each spatial neighbor block that has undergone intra-frame prediction and the second region around the current block that has undergone intra-frame prediction. Then, based on the similarity corresponding to each spatial neighbor block, all spatial neighbor blocks whose corresponding similarity is greater than a preset similarity threshold (i.e., spatial neighbor blocks similar to the current block) are taken as target spatial neighbor blocks to obtain at least one target spatial neighbor block.
[0075] The first region corresponding to the spatial neighboring block and the second region corresponding to the current block are both preset in shape and size, and the relative positions of the first region and the corresponding spatial neighboring block, as well as the relative positions of the second region and the current block, are also preset.
[0076] For example, the first region is a rectangular region with a size of 12*4 directly above the corresponding spatial neighboring block, and the second region is a rectangular region with a size of 12*4 directly above the current block.
[0077] It should be noted that the spatial neighboring blocks around the current block can be determined by sampling point location.
[0078] In other words, the intra-frame prediction device can first determine multiple sampling points in the reconstructed region located around the current block, and then use the portion of the region covered by one or more sampling points as the spatial neighboring block of the current block.
[0079] For example, in conjunction with the above Figure 3 The diagram shown illustrates spatial neighbor block sampling points, taking the spatial neighbor block adjacent to the current block as an example. Figure 7 As shown, it illustrates a schematic diagram of spatial neighboring block sampling points adjacent to the current block, including: sampling point A located directly above the current block (above, A), sampling point AL located above the current block (above-left, AL), sampling point AR located above the current block (above-right, AR), sampling point L located to the left of the current block (left, L), and sampling point BL located below the current block (below-left, BL).
[0080] In some embodiments, the intra-frame prediction apparatus may determine at least one target block vector of the current block and, based on the at least one target block vector, determine at least one target spatial neighbor block.
[0081] The target block vector can be the block vector of the first spatial neighboring block around the current block that has applied the intra prediction mode based on BV for reference block copying. The intra prediction mode based on BV for reference block copying can be the intra template matching prediction (IntraTMP) mode or the intrablock copy (IBC) mode, etc.
[0082] As one possible implementation, during the process of determining at least one target BV of the current block by the intra-prediction device, the intra-prediction device can traverse the spatial neighboring blocks that are adjacent to or not adjacent to the current block. If a spatial neighboring block around the current block applies an intra-prediction mode that performs reference block copying based on BV, the intra-prediction device can use the BV of this spatial neighboring block as the BV of the current block to obtain at least one target BV of the current block.
[0083] In this context, the BV of the spatially neighboring block (i.e., the initial BV) is translated onto the current block to become the target BV of the current block. That is, the starting and ending positions of the initial BV and the target BV change synchronously through the translation operation.
[0084] Furthermore, in this embodiment, the starting points of the initial BV and the target BV in their respective coding blocks may be the same or different. For example, the starting point of the initial BV may be located at the top-left pixel of a spatially adjacent block, and the starting point of the target BV obtained by translating the initial BV may also be located at the top-left pixel of the current block. As another example, the starting point of the initial BV may be located at the center pixel of a spatially adjacent block, while the starting point of the target BV obtained by translating the initial BV may be located at the bottom-right pixel of the current block.
[0085] As another possible implementation, during the process of the intra-prediction device determining at least one target BV of the current block, the intra-prediction device can determine the template loss of each candidate block vector in the candidate block vector list, and determine at least one target block vector from the candidate block vector list based on the template loss of each candidate block vector in the candidate block vector list.
[0086] The target block vector is the candidate block vector with the smaller template loss in the candidate block vector list.
[0087] For example, if the target block vector is the top N candidate block vectors with the smallest template loss in the candidate block vector list, then in the process of the intra-prediction device determining at least one target block vector from the candidate block vector list based on the template loss of each candidate block vector in the candidate block vector list, the intra-prediction device can determine the top N candidate block vectors with the smallest template loss in the candidate block vector list as the target block vectors to obtain at least one target block vector.
[0088] For example, if the target block vector is a candidate block vector in the candidate block vector list whose template loss is less than a preset threshold, then in the process of the intra-frame prediction device determining at least one target block vector from the candidate block vector list based on the template loss of each candidate block vector in the candidate block vector list, the intra-frame prediction device can determine the candidate block vector in the candidate block vector list whose template loss is less than the preset threshold as the target block vector, so as to obtain at least one target block vector.
[0089] In this embodiment of the disclosure, the template loss of the candidate block vector is the pixel value error between the first template region of the current block and the second template region of the reconstructed region indicated by the candidate block vector.
[0090] For example, the reconstructed region indicated by the candidate BV is a region determined by taking the end position of the candidate BV as the top left vertex of the region and referring to the shape and size of the current block.
[0091] In other words, the shape and size of the reconstructed region indicated by the candidate BV are the same as the shape and size of the current block, and the upper left corner of the reconstructed region indicated by the candidate BV is the end position of this candidate BV.
[0092] Furthermore, the first template region may include a first rectangular region located directly above the current block, a second rectangular region located to the upper left of the current block, and a third rectangular region located to the left of the current block. The length of the first rectangular region is the same as the length of the current block, and the width of the third rectangular region is the same as the length of the current block. Simultaneously, the width of the first rectangular region is the same as the width of the second rectangular region, and the length of the third rectangular region is the same as the length of the second rectangular region. The width and length of the first and third rectangular regions can be the same preset value or two different preset values. Thus, the first template region can partially enclose the current block using the first, second, and third rectangular regions.
[0093] Moreover, the size and shape of the first template area are the same as those of the second template area.
[0094] For example, such as Figure 8 As shown, it illustrates a schematic diagram of reconstruction region guidance based on candidate BVs. The intra-frame prediction device can determine a template region (i.e., a second template region) formed by the end position of a candidate BV of the current block, based on the shape and size of the template region of the current block (i.e., the first template region), and use the area enclosed by the second template region as the candidate region indicated by this candidate BV.
[0095] It should be noted that the template loss between the first template region and the second template region can be calculated using metrics such as the sum of absolute transformed difference (SATD), the sum of absolute differences (SAD), or the mean removed sum of absolute difference (MRSAD) of the pixel values in these two template regions.
[0096] Furthermore, the candidate block vector list selected by the intra-prediction device can be pre-stored by the intra-prediction device. Alternatively, the candidate block vector list selected by the intra-prediction device can be composed of the BVs of spatially neighboring blocks around the current block that have applied the intra-prediction mode based on BV for reference block replication. Or, the candidate block vector list selected by the intra-prediction device can be composed of the BVs corresponding to a third template region with a smaller template loss than the first template region, obtained by the intra-prediction device after searching and matching the surrounding reconstructed regions based on the first template region of the current block.
[0097] Optionally, taking the candidate block vector list as an example, which is composed of the BV corresponding to the third template region obtained by the intra-prediction device after searching and matching the reconstructed region, in the process of the intra-prediction device determining at least one target block vector of the current block, the intra-prediction device can determine at least one target block vector from the reconstructed region around the current block based on the template loss requirement.
[0098] In this context, the template loss between the third template region corresponding to each candidate block vector in the candidate block vector list and the first template region of the current block all meet the template loss requirements. That is, the intra-frame prediction device uses all candidate block vectors in the candidate block vector list as the target block vector of the current block, thereby obtaining at least one target block vector.
[0099] It should be noted that the template loss requirements described above are not limited in the embodiments of this disclosure. For example, the template loss requirement may be that the template loss between the third template region and the first template region is less than a preset threshold. Another example is that the template loss requirement may be that the distance between the third template region and the first template region is less than a preset distance threshold, and the template loss between the third template region and the first template region is less than a preset threshold. Yet another example is that the template loss requirement may be that the third template region is located in the BV direction of a spatially adjacent block around the current block, and the template loss between the third template region and the first template region is less than a preset threshold.
[0100] In the embodiments of this disclosure, during the process of determining at least one target spatial neighbor block based on at least one target block vector, the intra-frame prediction device can determine the reconstruction region indicated by each target BV based on the position information of the current block and at least one target BV, and determine the spatial neighbor block that has an overlapping part with the reconstruction region indicated by the target BV as the target spatial neighbor block, so as to obtain at least one target spatial neighbor block.
[0101] For example, in conjunction with the above Figure 8 The diagram showing the reconstruction area is as follows. Figure 9 The diagram shown illustrates the spatial neighbor block filtering based on the target BV. If spatial neighbor block ①, spatial neighbor block ②, spatial neighbor block ③, and spatial neighbor block ④ all overlap with the reconstructed region indicated by the target BV, then spatial neighbor block ①, spatial neighbor block ②, spatial neighbor block ③, and spatial neighbor block ④ are all selected target spatial neighbor blocks similar to the current block.
[0102] Optionally, the intra-frame prediction device can stitch together the reconstructed regions indicated by all target BVs to obtain a total target reconstructed region. Then, the intra-frame prediction device can identify spatially neighboring blocks that overlap with the target reconstructed region as target spatially neighboring blocks, thereby obtaining at least one target spatially neighboring block.
[0103] S602. Based on the number of pixels in at least one target spatial neighboring block and the applied intra-prediction mode, determine the quantitative indicators of each of the multiple candidate intra-prediction modes.
[0104] In a video frame, each coded block can be intra-predicted by different intra-prediction modes. That is, each coded block in a video frame that has completed intra-prediction can correspond to a different intra-prediction mode.
[0105] For example, multiple coded blocks that have completed intra-frame prediction in a video frame may include: coded block A, coded block B, and coded block C. Here, coded block A is intra-frame prediction performed by intra-frame prediction mode 1, coded block B is intra-frame prediction performed by intra-frame prediction mode 2, and coded block C is intra-frame prediction performed by intra-frame prediction mode 3.
[0106] It should be noted that the intra-prediction mode applied to the coding block is not limited in the embodiments of this disclosure. For example, the intra-prediction mode can be a direct current (DC) mode. Another example is a planar mode. Yet another example is an angle prediction mode (i.e., an intra-angle prediction mode).
[0107] In this embodiment of the disclosure, a spatial neighbor block of the current block may correspond to one or more intra-prediction modes, and an intra-prediction mode may correspond to at least one spatial neighbor block. That is, multiple spatial neighbor blocks of the current block are each intra-predictioned by one or more intra-prediction modes, and each intra-prediction mode corresponds to one or more spatial neighbor blocks.
[0108] For example, the multiple spatial neighbor blocks of the current block may include: spatial neighbor block A, spatial neighbor block B, and spatial neighbor block C. Among them, spatial neighbor block A and spatial neighbor block B are both intra-prediction performed by intra-prediction mode 1, and spatial neighbor block C is intra-prediction performed by intra-prediction mode 1 and intra-prediction mode 2. In this case, intra-prediction mode 1 corresponds to spatial neighbor block A, spatial neighbor block B, and spatial neighbor block C, and intra-prediction mode 2 corresponds to spatial neighbor block C.
[0109] It should be noted that the process by which the intra-prediction device obtains the number of pixels in at least one target spatial neighboring block and the intra-prediction mode applied can be referred to the above-mentioned OBIC technology for the process of dividing the coding block, the statistical process of the number of pixels in the coding block, and the identification of the intra-prediction mode applied to the coded block, which will not be repeated here.
[0110] As one possible implementation, in the process of determining the quantitative indicators of multiple candidate intra-prediction modes based on the number of pixels in at least one target spatial neighbor block and the applied intra-prediction mode, the intra-prediction device can determine the target spatial neighbor block corresponding to the candidate intra-prediction mode based on the intra-prediction mode applied to at least one target spatial neighbor block, and determine the quantitative indicators of the candidate intra-prediction mode based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-prediction mode, so as to obtain the quantitative indicators of multiple candidate intra-prediction modes.
[0111] It should be noted that the intra-prediction device can first perform statistics on the intra-prediction modes applied to each target spatial neighbor block based on at least one target spatial neighbor block. After eliminating duplicate first intra-prediction modes, multiple different second intra-prediction modes can be obtained, and each second intra-prediction mode can be used as a candidate intra-prediction mode to obtain multiple candidate intra-prediction modes.
[0112] Subsequently, for each candidate intra-prediction mode, the intra-prediction device can count at least one target spatial neighbor block in which the candidate intra-prediction mode has been applied, thereby determining the target spatial neighbor block corresponding to each candidate intra-prediction mode.
[0113] Next, for each candidate intra-prediction mode, the intra-prediction device can determine the quantitative index of the candidate intra-prediction mode based on the number of pixels in one or more target spatial neighboring blocks corresponding to the candidate intra-prediction mode, thereby obtaining the quantitative index of each of the multiple candidate intra-prediction modes.
[0114] The quantitative metrics for candidate intra-frame prediction modes may include the sum of the number of pixels in each target spatial neighboring block corresponding to the candidate intra-frame prediction mode.
[0115] For example, in conjunction with the above example, multiple candidate intra-prediction modes may include intra-prediction mode 1 and intra-prediction mode 2. If the number of pixels in spatial neighbor block A is 12, the number of pixels in spatial neighbor block B is 16, and the number of pixels in spatial neighbor block C is 24, then the quantitative index of intra-prediction mode 1 can be 52, and the quantitative index of intra-prediction mode 2 can be 24.
[0116] In some embodiments, during the process of determining the quantitative index of a candidate intra-prediction mode based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-prediction mode, the intra-prediction device may determine the quantitative index of the candidate intra-prediction mode based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-prediction mode and the weighting coefficient.
[0117] The quantitative metrics for candidate intra-frame prediction modes may include the weighted sum of the number of pixels in each target spatial neighboring block corresponding to the candidate intra-frame prediction mode.
[0118] It should be noted that the weighting coefficients of the target spatial neighbor blocks can be determined according to at least one of the following 3.1 and 3.2:
[0119] 3.1 Distance between the target space's neighboring blocks and the current block;
[0120] 3.2. The overlap ratio of neighboring blocks in the target space.
[0121] Among them, the overlap ratio of the target spatial neighboring blocks is used to characterize the area ratio or pixel ratio between the overlapping part and the target spatial neighboring blocks. The overlapping part is the overlapping part of the target spatial neighboring blocks and the reconstructed area indicated by all target block vectors.
[0122] In some embodiments, taking the distance between the target spatial neighbor block and the current block as shown in 3.1 as an example, the distance between the target spatial neighbor block and the current block can be the distance between the preset pixel position in the target spatial neighbor block and the preset pixel position in the current block (i.e., the distance between the preset pixel positions in the two coding blocks).
[0123] It should be noted that, in this embodiment of the disclosure, the preset pixel position can be any of the following positions (1)-(6):
[0124] (1) The position of the top left pixel of the coded block;
[0125] (2) The position of the upper right pixel of the coded block;
[0126] (3) The position of the bottom left pixel of the coded block;
[0127] (4) The position of the bottom right pixel of the coded block;
[0128] (5) The position of the center pixel of the encoded block;
[0129] (6) The position of any pixel in the coded block.
[0130] For example, taking the position of the top-left pixel of the encoding block as a preset pixel position, such as... Figure 10 As shown, it illustrates the distance between the target spatial neighbor block and the current block. The pixel distance between the top-left corner pixel of the target spatial neighbor block and the top-left corner pixel of the current coding block is denoted as the distance from the target spatial neighbor block to the current block. That is, the distances between the current block A and the target spatial neighbor blocks B, C, and D can be distance 1, distance 2, and distance 3, respectively.
[0131] Optionally, the preset pixel position in the target space neighboring block is the same as the preset pixel position in the current block, or the preset pixel position in the target space neighboring block is a different position from the preset pixel position in the current block.
[0132] For example, if the preset pixel position in the target spatial neighboring block is the same as the preset pixel position in the current block, then the distance between the current block and the target spatial neighboring block can be as described above. Figure 10 As shown.
[0133] Similarly, taking two positions where the preset pixel position in the target space's neighboring block is different from the preset pixel position in the current block as an example, then... Figure 11 As shown, the distances between the current block A and the target space neighboring blocks B, C, and D can be distances of 4, 5, and 6, respectively.
[0134] It should be noted that in this embodiment, the weighting coefficient is negatively correlated with the distance, and this embodiment does not limit the calculation method of the distance between the current block and the target space neighboring blocks.
[0135] As one possible implementation, the distance between the preset pixel position in the target space neighboring block and the preset pixel position in the current block can satisfy at least one of the following (1)-(2):
[0136] (1) The straight-line distance between two preset pixel positions;
[0137] (2) The sum of the horizontal and vertical deviations between the positions of two preset pixels.
[0138] For example, taking the straight-line distance (i.e., Euclidean distance) between two preset pixel positions as an example, combined with the above... Figure 10 Let the Cartesian pixel coordinates of the top-left corner pixel of the target block and the top-left corner pixel of the current block in the current image be A(x1,y1) and B(x2,y2) respectively (in pixels). Then the pixel distance between the two pixels can be expressed as shown in Formula 2:
[0139]
[0140] Similarly, assuming that the sum of the horizontal and vertical pixel offset distances (i.e., the sum of the horizontal and vertical deviations between two preset pixel positions) is taken as the distance between pixels, then the distance between two pixels can be expressed as shown in Formula 3:
[0141] |AB|=|x1-x2|+|y1-y2| Formula 3.
[0142] In this embodiment of the disclosure, the quantitative index is positively correlated with the number of pixels in the target spatial neighboring block and negatively correlated with the distance between the spatial neighboring block and the current block.
[0143] In other words, the larger the number of pixels applied by the intra-prediction mode, the wider the scope of application of the intra-prediction mode. Furthermore, there may be correlation between nearby coding blocks, so the intra-prediction mode applied by neighboring coding blocks may also be applicable to the current block.
[0144] It should be noted that the present invention does not limit the calculation process of the number of pixels in spatial neighboring blocks, the distance between spatial neighboring blocks, and the quantitative indicators of candidate intra-frame prediction modes.
[0145] For example, the quantitative metric for a candidate intra-frame prediction mode can be the sum of the product of the number of pixels in all target spatial neighbor blocks corresponding to the candidate intra-frame prediction mode and the distances corresponding to each target spatial neighbor block after passing through the inverse function (or exponential decay function, inverse function of logarithmic function, Gaussian function, etc.).
[0146] For example, taking a reciprocal function with a numerator of 1 as an example, all target spatial neighbor blocks corresponding to the candidate intra-frame prediction mode can include: spatial neighbor block A, spatial neighbor block B, and spatial neighbor block C. Among them, the number of pixels in spatial neighbor block A can be 32, the number of pixels in spatial neighbor block B can be 40, and the number of pixels in spatial neighbor block C can be 24. Furthermore, the distance between spatial neighbor block A and the current block is 8, the distance between spatial neighbor block B and the current block is 10, and the distance between spatial neighbor block C and the current block is 2. Then, the quantitative index of the candidate intra-frame prediction mode can be...
[0147]
[0148] As one possible implementation, during the process of determining the quantitative index of the candidate intra-prediction mode based on the distance between the target spatial neighbor block and the current block corresponding to the candidate intra-prediction mode, and the number of pixels in the target spatial neighbor block, the intra-prediction device can determine the distance weight (i.e., weighting coefficient) of each target spatial neighbor block according to the distance between each target spatial neighbor block and the current block corresponding to the candidate intra-prediction mode. The distance weight is negatively correlated with the distance between the target spatial neighbor block and the current block. Then, for each target spatial neighbor block, the intra-prediction device can multiply the number of pixels in the target spatial neighbor block by the corresponding distance weight to determine the weighted number of pixels in the target spatial neighbor block, and sum the weighted number of pixels of all target spatial neighbor blocks corresponding to the candidate intra-prediction mode to determine the quantitative index of the candidate intra-prediction mode.
[0149] In other words, when counting the number of pixels in a video frame that use the same intra-prediction mode, the weight of the number of pixels in each spatial neighboring block is increased or decreased by referring to the distance between the spatial neighboring block of each pixel and the current block.
[0150] The distance weights of the target spatial neighbor blocks satisfy any one of the following (a)-(c):
[0151] (a) The distance weight of the target space neighboring block is equal to the reciprocal of the distance between the target space neighboring block and the current block / the quantized distance;
[0152] (b) The distance weight of the target space neighboring block is equal to the distance between the target space neighboring block and the current block / the reciprocal of the logarithm of the quantized distance with a preset value as the base;
[0153] (c) The distance weight of the target space neighboring block is equal to the distance between the target space neighboring block and the current block / the preset weight corresponding to the preset distance interval in which the quantization distance is located.
[0154] For example, taking the relationship between distance and distance weight corresponding to (a) above as an example, and combining with the above example, the distance weight of spatially neighboring block A is: The weighted number of pixels in spatial neighbor block A is The distance weight of spatial neighbor block B is The weighted number of pixels in spatial neighbor block B is The distance weight of spatial neighbor block C is The weighted number of pixels in spatial neighbor block C is
[0155] For example, taking the relationship between distance and distance weight corresponding to (c) above as an example, if the preset distance intervals include: interval [0,5], interval [6,8] and interval [8.5,11), and the preset weight corresponding to interval [0,5] is 0.3, the preset weight corresponding to interval [6,8] is 0.2, and the preset weight corresponding to interval [8.5,11) is 0.1, then in conjunction with the above example, the distance weight of spatial neighbor block A is 0.2, and the weighted number of pixels of spatial neighbor block A is 32×0.2=6.4; the distance weight of spatial neighbor block B is 0.1, and the weighted number of pixels of spatial neighbor block B is 40×0.1=4; the distance weight of spatial neighbor block C is 0.3, and the weighted number of pixels of spatial neighbor block C is 24×0.3=7.2.
[0156] In other embodiments, the overlap ratio of the target spatial neighboring blocks shown in 3.2 is used as a weighting coefficient, and the weighting coefficient is positively correlated with the overlap ratio of the target spatial neighboring blocks.
[0157] In other words, the greater the overlap ratio of the target spatial neighboring blocks, the greater the similarity of pixel features between the target spatial neighboring blocks and the current block, which in turn indicates that the intra-frame prediction mode applied to the target spatial neighboring blocks may also be applicable to the current block.
[0158] It should be noted that there may be overlaps between the reconstructed regions indicated by some of the target BVs, or the reconstructed regions indicated by different target BVs may not overlap.
[0159] As one possible implementation, taking the example that there may be overlap between the reconstructed regions indicated by some of the target BVs in all target BVs, the intra-frame prediction device can stitch together the reconstructed regions indicated by all target BVs to obtain a total target reconstructed region. Then, the intra-frame prediction device can determine the overlapping portion in each target spatial neighbor block that overlaps with the target reconstructed region, and further determine the overlap ratio of each target spatial neighbor block based on the overlapping portion corresponding to each target spatial neighbor block.
[0160] For example, taking the overlap ratio as a measure of area ratio, at least one target BV may include BV1 and BV2, and there is an overlap between the reconstructed region A indicated by BV1 and the reconstructed region B indicated by BV2. Reconstructed region A and reconstructed region B can be stitched together to obtain a reconstructed region C. If the multiple target spatial neighbor blocks corresponding to the candidate intra-frame prediction mode include spatial neighbor block A and spatial neighbor block B, and the area of the overlap 1 between spatial neighbor block A and reconstructed region C accounts for 0.2% of the total area of spatial neighbor block A, and the area of the overlap 2 between spatial neighbor block B and reconstructed region C accounts for 0.8% of the total area of spatial neighbor block B, then the overlap ratio of spatial neighbor block A can be 0.2%, and the overlap ratio of spatial neighbor block B can be 0.8%.
[0161] As another possible implementation, taking the example that the reconstructed regions indicated by different target BVs do not overlap, when a target spatial neighbor block overlaps with the reconstructed regions indicated by multiple target BVs, the overlap ratio of the target spatial neighbor block can be calculated with reference to the proportional weights corresponding to different target BVs.
[0162] For example, in conjunction with the above example, there is no overlap between the reconstructed region A indicated by BV1 and the reconstructed region B indicated by BV2. In spatial neighbor block A, there is only overlapping portion 1 that overlaps with reconstructed region A, while in spatial neighbor block B, there are overlapping portions 2 that overlap with reconstructed region A and 3 that overlap with reconstructed region B. If the proportional weight corresponding to BV1 is 1.1, the proportional weight corresponding to BV2 is 0.8, and the area of overlapping portion 1 accounts for 0.2% of the total area of spatial neighbor block A, the area of overlapping portion 2 accounts for 0.3% of the total area of spatial neighbor block B, and the area of overlapping portion 3 accounts for 0.5% of the total area of spatial neighbor block B, then the overlap ratio of spatial neighbor block A can be 0.2 × 1.1 = 0.22, and the overlap ratio of spatial neighbor block B can be 0.3 × 1.1 + 0.5 × 0.8 = 0.73.
[0163] The proportional weight corresponding to the target BV can be negatively correlated with the template loss corresponding to the target BV, that is, the smaller the template loss, the larger the proportional weight corresponding to the target BV.
[0164] Similarly, the overlap ratio used to characterize the proportion of pixels can also be referenced in the above example, and will not be repeated here.
[0165] It should be noted that the algorithm logic for determining the weighting coefficient based on the overlap ratio of neighboring blocks in the target space can refer to the process described above for determining the weighting coefficient based on the distance between neighboring blocks in the target space and the current block, and will not be repeated here.
[0166] In other embodiments, the weighting coefficients may be composed of 3.1 and 3.2 above.
[0167] For example, the weighting coefficient can be equal to the weighted sum of the distances and overlap ratios of the target space's neighboring blocks.
[0168] For example, the weighting coefficient can be equal to the weighted product of the distance and overlap ratio of the neighboring blocks in the target space.
[0169] S603. Based on the quantitative indicators of each of the multiple candidate intra-prediction modes, determine at least one target intra-prediction mode from the multiple candidate intra-prediction modes.
[0170] It should be noted that, in this embodiment of the disclosure, the quantitative index of the target intra-prediction mode is greater than the quantitative index of other candidate intra-prediction modes among the multiple candidate intra-prediction modes, or the target intra-prediction mode is a candidate intra-prediction mode among the multiple candidate intra-prediction modes whose quantitative index is greater than a preset index threshold.
[0171] S604. Perform intra-frame prediction on the current block based on at least one target intra-frame prediction mode.
[0172] Understandably, based on the pixel feature similarity between a current coding block (i.e., the current block) and its surrounding other coding blocks (i.e., spatially neighboring blocks) in a video frame, multiple spatially neighboring blocks with high pixel feature similarity are identified. Then, based on the intra-prediction mode applied to each of these spatially neighboring blocks, at least one spatially neighboring block sharing the same intra-prediction mode is determined. Finally, by referencing the number of pixels in each spatially neighboring block applying the same intra-prediction mode in the video frame, the few intra-prediction modes with the best intra-prediction performance are selected to perform intra-prediction on the current block, obtaining the predicted value for the current block. In other words, when using OBIC technology to predict the current block, the spatially neighboring blocks surrounding the current block can first be filtered for similarity, obtaining only the intra-prediction modes used by the filtered spatially neighboring blocks. Then, by constructing a histogram of the total number of pixels corresponding to each intra-prediction mode, candidate intra-prediction modes for the current block are determined. Therefore, compared to the existing OBIC technology which only considers the number of pixels to select the intra-prediction mode with the most pixels as the best intra-prediction mode for the current block, this new OBIC technology can, before accumulating the total number of pixels corresponding to each intra-prediction mode, refer to the pixel feature similarity between each spatial neighboring block and the current block (i.e., spatial neighboring blocks with higher similarity can be used as references for the current block, while spatial neighboring blocks with lower similarity are not used as references for the current block), which can further improve the subsequent intra-prediction effect for the current block.
[0173] In some embodiments, the intra-frame prediction device in the above embodiments can be an encoding end (or a device within the encoding end). The intra-frame prediction device can determine the true value of each coded block (including the current block) in the video frame before encoding / decoding. After the intra-frame prediction device performs intra-frame prediction on the current block based on at least one target intra-frame prediction mode (i.e., S604), the intra-frame prediction device can determine the predicted value of the current block. Next, the intra-frame prediction device can determine the error between the predicted value of the current block and its true value, and if the error is less than a preset error threshold, determine that the current block is suitable for encoding / decoding based on the new OBIC technology provided in the embodiments of this disclosure. Subsequently, the intra-frame prediction device can instruct the decoding end to perform decoding operations such as intra-frame prediction on the current block by sending first indication information and / or second indication information to the decoding end in the bitstream.
[0174] The first indication information is used to indicate whether the current block is based on at least one target spatial neighboring block that is similar to the current block when using OBIC mode; the second indication information is used to indicate the scheme for determining the target spatial neighboring block.
[0175] In other words, during the encoding stage, the method for determining the most suitable intra-prediction mode for the current block can be known in advance, and this method can be carried over to the decoding end when sending video frames.
[0176] It should be noted that the embodiments disclosed herein do not limit the transmission method of the first indication information and / or the second indication information. For example, the indication information may be carried by the video frame in which the current block is located (i.e., the indication information is contained in the information at the video frame level, and there is a correspondence between the indication information and the current block). Another example is that the indication information may be carried by the current block (i.e., the indication information is contained in the information at the coding block level).
[0177] Optionally, the second indication information may include: the method of obtaining the target BV.
[0178] In other words, the encoding end can use instruction information to ensure that the acquisition method of the target BV is synchronized with that of the decoding end.
[0179] The intra-frame prediction method provided in this disclosure will be described below with reference to specific examples.
[0180] like Figure 12As shown, this illustrates the location of the optimization stage within the overall video coding framework; the dashed boxes indicate the stages in the video coding framework where optimization is performed according to the embodiments of this disclosure. When determining the optimal intra-prediction mode using RDO (Recursive Decision) for intra-frame prediction, the prediction performance of different intra-frame prediction modes is compared, including decoder-side intramode derivation (DIMD), template-based intramode derivation (TIMD), OBIC, IntraTMP, etc., to determine the optimal intra-frame prediction mode through conventional RDO decisions in video coding.
[0181] The steps of the OBIC mode include:
[0182] Step a: Filter and determine the surrounding target space neighboring blocks.
[0183] Step b: Calculate the IPM of neighboring blocks in the target space and generate a histogram of IPM usage.
[0184] Step c: Select several candidate IPMs with the highest number of application pixels.
[0185] Step d: Obtain the predicted value of the current block based on the candidate IPM and the weighted fusion method.
[0186] As can be seen, after identifying the intra-angle prediction modes used by the spatial neighboring blocks of the current coding block (i.e., the current block), the embodiments of this disclosure can filter out one or more spatial neighboring blocks that are more related to the current coding block based on the similarity of the content or pixel data of the spatial neighboring blocks and the current coding block. In this way, the intra-angle prediction modes used by them and the total number of pixels corresponding to each prediction mode when applied can be counted, and a pixel-level utilization histogram corresponding to each intra-angle prediction mode can be generated.
[0187] In other words, when using OBIC technology to statistically analyze various intra-frame prediction modes used in surrounding spatial neighbor blocks, the similarity of the content or pixel data of the spatial neighbor blocks with the current coding block is first considered. This allows for the selection of spatial neighbor blocks to be statistically analyzed, improving the relevance of reference information and further enhancing the prediction effect.
[0188] In the embodiments of this disclosure, during RDO decision-making, the new OBIC mode proposed in this disclosure can replace the initial OBIC mode, that is, only the intra-angle prediction mode of the selected spatial neighbor blocks and their corresponding block size are statistically analyzed.
[0189] Alternatively, the new OBIC mode proposed in this embodiment can be used as another intra-prediction mode on par with the initial OBIC mode to compete with the initial OBIC mode. That is, the new OBIC mode proposed in this embodiment can be used as a prediction mode on par with the initial OBIC mode to participate in the RDO decision to select the optimal intra-prediction mode for the current coding block.
[0190] Alternatively, the new OBIC mode proposed in this embodiment can also be used as a sub-mode of the initial OBIC mode, that is, the new OBIC mode proposed in this embodiment can be selected only under certain limiting conditions, provided that the initial OBIC mode is applied.
[0191] In this embodiment, the above-mentioned limiting conditions are not limited. For example, the limiting condition may be that the new OBIC mode proposed in this embodiment is selected when the number of target BVs around the current block is large. Another example is that the limiting condition may be that the new OBIC mode proposed in this embodiment is selected when the number of BVs with smaller template losses around the current block is large.
[0192] It should be noted that the embodiments of this disclosure do not limit the application relevance of the new OBIC mode proposed in the embodiments of this disclosure to the initial OBIC mode. The association between the new OBIC mode proposed in the embodiments of this disclosure and the initial OBIC mode can be determined according to the actual application scenario.
[0193] In this embodiment of the disclosure, the new OBIC mode proposed in this embodiment is used as an alternative to the initial OBIC mode.
[0194] For example, to select one or more spatially neighboring blocks that are relatively relevant to the current coding block, preferably, this can be achieved through the following steps and implementation scheme:
[0195] Step 1: For the current coding block, select one or more target BVs with smaller template loss using the following optional schemes;
[0196] Option 1: Traverse the spatially neighboring blocks (both adjacent and non-adjacent) of the current coding block (CU). If they use intra-prediction modes based on BV (Block Value) for reference block copying, such as IntraTMP or IBC, add their BV to the intra-BV candidate list of the current coding block. After obtaining the BV candidate list, each BV in the candidate list can guide to a specific reconstructed region corresponding to the current coding block, as described above. Figure 8As shown, the difference in pixel values between the current coding block template region and the reconstructed pixel block template region can be calculated, denoted as the template loss. By arranging the template losses corresponding to all candidate BVs, one or more target BVs with smaller template losses can be selected.
[0197] Option 2: Without relying on the BV used in spatially neighboring blocks that are adjacent or not adjacent to the current coding block, one or more target BVs with smaller template loss can be searched directly in the reconstructed area around the current coding block based on the template region of the current coding block and the template loss index.
[0198] Option 3: Based on Option 1, search for one or more BVs with smaller template loss in each target BV direction to obtain more target BVs.
[0199] Step Two: Since a smaller template loss means that the pixel data of two template regions are more similar, the reconstructed region pointed to by the BV selected based on the principle of smaller template loss can be considered to be more similar to the current coding block. Therefore, one or more reconstructed regions pointed to by BV with smaller template loss can be used as a reference for filtering spatial neighbor blocks. That is, only spatial neighbor blocks that overlap with the reconstructed regions pointed to by the above BV are applied to the statistical analysis of OBIC mode to construct a pixel-level utilization histogram for intra-frame angle prediction mode. As described above. Figure 9 As shown, if we assume that only one target BV is used to guide a reconstructed region, and spatial neighbor blocks ① to ④ overlap with the reconstructed region guided by that BV, then neighbor blocks ① to ④ can be considered to have passed the screening. On the other hand, if we assume that two or more candidate BVs are used to guide two or more reconstructed regions, then spatial neighbor blocks that overlap with any of the reconstructed regions can be considered to have passed the screening.
[0200] For step two, the following optional implementation strategies can also be included:
[0201] Optionally, if a spatial neighbor block overlaps with two or more reconstructed regions, the intra-frame angle prediction mode used by the spatial neighbor block and the number of pixels it contains only need to be counted once.
[0202] Optionally, when counting the number of pixels corresponding to each intra-frame angle prediction mode, the number of pixels to be accumulated in the spatial neighbor block can be weighted according to the ratio of the overlapping area or the ratio of the number of overlapping pixels between the spatial neighbor block and all reconstructed regions guided by one or more BVs. Specifically, the weight setting in the weighting process can be either the overlapping area ratio or the overlapping pixel ratio.
[0203] Optionally, after spatially neighboring blocks are selected from the reconstructed region based on BV guidance, the number of pixels contained in the spatially neighboring blocks can be weighted according to the distance between the spatially neighboring blocks and the current coding block, and then a pixel-level utilization histogram for intra-frame angle prediction mode can be constructed by accumulating the weights. Figure 9 As shown, compared to the selected spatial neighbor block ①, spatial neighbor block ④ is closer to the current coding block. Therefore, when counting the number of pixels contained in the spatial neighbor blocks in a weighted manner, the weight value corresponding to spatial neighbor block ④ should be higher than the weight value corresponding to spatial neighbor block ①.
[0204] After generating a pixel-level utilization histogram for intra-frame angle prediction modes, one or more intra-frame angle prediction modes with higher amplitude (total number of pixels accumulated) can be selected from the histogram as candidate intra-frame angle prediction modes for predicting the current coding block.
[0205] After obtaining the candidate intra-frame prediction values for the current coding block using one or more of the aforementioned candidate intra-frame angle prediction modes, Planar mode, or BV-based prediction modes, a conventional weighted fusion method is used to fuse multiple candidate intra-frame prediction values together to obtain the final intra-frame prediction value for the current coding block. In the conventional weighted fusion process, the weight value corresponding to a specific candidate intra-frame angle prediction mode can be derived based on the proportion of its corresponding histogram magnitude in the sum of the histogram magnitudes of all candidate intra-frame angle prediction modes.
[0206] To more intuitively describe the optimizations of the embodiments of this disclosure, Figure 13 This disclosure presents a new OBIC technology application flow optimized according to embodiments thereof, applied to a device for encoding video (i.e., an encoding end). The input of this device is a source video image, and the output is a video image bitstream or a media file. In intra-frame prediction during video encoding, when using the OBIC mode to predict the current coding block, this disclosure proposes that when statistically analyzing the various intra-frame prediction modes used in surrounding spatial neighbor blocks, the similarity of content or pixel data between the spatial neighbor blocks and the current coding block is first considered, thereby filtering the spatial neighbor blocks to be statistically analyzed. For one or more spatial neighbor blocks that are relatively relevant to the current coding block, the intra-frame angle prediction modes used by them and the total number of pixels (or weighted total number of pixels) corresponding to the application of each prediction mode can be statistically analyzed, generating a pixel-level usage histogram for each intra-frame angle prediction mode. Based on this histogram, one or more candidate intra-frame angle prediction modes can be selected during encoding prediction, and the intra-frame prediction value of the current coding block can be obtained through prediction value fusion.
[0207] The dashed boxes (i.e., steps 1, 2, and 5) indicate the optimization steps in the OBIC technology of this disclosure embodiment, and the specific steps include:
[0208] Step 1: Construct a candidate list of BVs and select one or more BVs with smaller template loss.
[0209] In other words, select one or more BVs with smaller template loss for the current coding block.
[0210] In order to determine the similarity of the content or pixel data of spatial neighboring blocks with the current coding block, one or more BVs with smaller template loss can be selected for the current coding block.
[0211] Preferably, BV selection can be achieved through the following optional schemes:
[0212] Option 1: Traverse the intra-prediction modes of spatially neighboring blocks to obtain a BV candidate list, and sort them by template loss.
[0213] In other words, the system iterates through spatially neighboring blocks (both adjacent and non-adjacent) of the current coding block (CU). If these blocks use intra-prediction modes such as IntraTMP or IBC that perform reference block copying based on BV, their BVs are added to the intra-BV candidate list of the current coding block. After obtaining the BV candidate list, each BV in the list can guide to a specific reconstruction region corresponding to the current coding block. This allows the calculation of the pixel value difference between the current coding block template region and the reconstructed pixel template region, denoted as the template loss. By sorting the template losses corresponding to all candidate BVs, one or more BVs with smaller template losses can be selected.
[0214] Option 2: Directly search for BV in the surrounding reconstructed areas based on the template region and template loss index of the current block.
[0215] In other words, without relying on the BVs used in adjacent or non-adjacent spatial neighboring blocks of the current coding block, one or more BVs with smaller template loss can be searched directly in the reconstructed region around the current coding block based on the template region of the current coding block and the template loss index.
[0216] Option 3: Combining the BV selection methods of Option 1 and Option 2.
[0217] In other words, based on Scheme 1, we search for one or more BVs with smaller template losses in each target BV direction, thereby obtaining more target BVs.
[0218] Step 2: Filter the target spatial neighbor blocks for OBIC statistics based on the reconstruction area guided by BV.
[0219] Since a smaller template loss means that the pixel data of two template regions are more similar, the reconstructed region pointed to by the BV selected based on the principle of smaller template loss can be considered to be more similar to the current coding block. Therefore, the reconstructed regions pointed to by one or more BVs with smaller template loss can be used as a reference for selecting spatial neighbor blocks. That is, only the target spatial neighbor blocks that overlap with any of the reconstructed regions pointed to by one or more BVs are applied to the statistical analysis of the OBIC mode to construct a pixel-level utilization histogram for the intra-frame angle prediction mode.
[0220] Optionally, if a target spatial neighbor block overlaps with two or more reconstructed regions, the intra-frame angle prediction mode used by the target spatial neighbor block and the number of pixels it contains only need to be counted once.
[0221] Optionally, when counting the number of pixels corresponding to each intra-frame angle prediction mode, the number of pixels to be accumulated in the target spatial neighbor block can be weighted according to the ratio of the overlapping area or the ratio of the number of overlapping pixels between the target spatial neighbor block and all reconstructed regions guided by one or more BVs. Specifically, the weight setting in the weighting process can be the overlapping area ratio or the overlapping pixel ratio.
[0222] Optionally, after the target spatial neighbor block is selected from the reconstructed region based on the BV guide, the number of pixels contained in the target spatial neighbor block can be weighted according to the distance between the target spatial neighbor block and the current coding block, and then a pixel-level utilization histogram for the intra-frame angle prediction mode can be constructed in an accumulative manner.
[0223] Step 3: Check the intra-frame angle prediction mode of the target spatial neighboring blocks after filtering.
[0224] Among them, the intra-angle prediction modes of the target spatial neighboring blocks include the intra-angle prediction modes directly used during intra-frame prediction, as well as all intra-angle prediction modes used in modes such as DIMD, TIMD, Spatial Geometric Partitioning Mode (SGPM), and OBIC. They also include virtual intra-angle prediction modes corresponding to modes such as Extrapolation-based Intra Prediction (EIP), IntraTMP, and Matrix-based Intra Prediction (MIP).
[0225] Step 4: Statistically analyze the intra-frame angle prediction patterns of the target spatial neighbor blocks after filtering and the number of pixels they contain.
[0226] In order to select one or more of the most commonly used intra-angle prediction modes in the target spatial neighbor block based on statistical data, after determining the intra-angle prediction mode used by a specific spatial neighbor block, it is necessary to simultaneously record the intra-angle prediction mode (such as index number) and the number of pixels contained in the spatial neighbor block (i.e., block width * block height) or the weighted number of pixels (i.e., weight x block width x block height). The weight setting can be referred to the description in step 2 above.
[0227] Step 5: Perform weighted processing on the pixel values contained in the neighboring blocks of the target space.
[0228] Step 6: Generate pixel-level utilization histograms corresponding to each intra-frame angle prediction mode.
[0229] By accumulating the total number of pixels or weighted total number of pixels in the target space neighboring blocks corresponding to each intra-frame angle prediction mode, a pixel-level utilization histogram (HoC) can be generated for each intra-frame angle prediction mode.
[0230] Step 7: Select one or more candidate IPMs with higher amplitudes from the histogram and fuse them to derive the intra-prediction value of the current block;
[0231] After generating a pixel-level utilization histogram for intra-frame angle prediction modes, one or more intra-frame angle prediction modes with higher amplitude (total number of pixels) can be selected from the histogram as candidate intra-frame angle prediction modes for predicting the current coding block.
[0232] After obtaining the candidate intra-frame prediction values of the current coding block using one or more of the above candidate intra-frame angle prediction modes, Planar mode, or BV-based prediction modes, the multiple candidate intra-frame prediction values are then fused together using a conventional weighted fusion method to serve as the final intra-frame prediction value of the current coding block.
[0233] In the conventional weighted fusion process, the weight value corresponding to a specific candidate intra-frame angle prediction mode can be derived from the proportion of its corresponding histogram magnitude in the sum of the histogram magnitudes of all candidate intra-frame angle prediction modes.
[0234] At the encoding end, after step 7, the following steps A and B can be executed:
[0235] Step A: Compare the intra-prediction values obtained from different intra-prediction modes, and use RDO decision to determine the optimal intra-prediction mode;
[0236] By comparing the prediction performance of different intra-prediction modes, including DIMD, TIMD, OBIC, and IntraTMP modes, the optimal intra-prediction mode is determined through conventional RDO decisions in video coding. Furthermore, after the RDO decision, the final intra-prediction value of the current coding block is obtained from the optimal intra-prediction mode.
[0237] Step B: When the optimal intra-prediction mode for RDO decision is OBIC mode, write the indication information of using OBIC mode or the indication information of using BV-guided OBIC mode into the bitstream.
[0238] In other embodiments, the intra-prediction device in the above embodiments can be a decoding end (or a device in the decoding end), and the intra-prediction device can determine the intra-prediction mode required for the current block based on the new OBIC technology provided in the embodiments of this disclosure.
[0239] As one possible implementation, during the process of the intra-frame prediction device determining at least one target spatial neighboring block similar to the current block (i.e., S601), the intra-frame prediction device may determine whether the video frame carries first indication information and / or second indication information (or whether the current block contains first indication information and / or second indication information, or whether first indication information and / or second indication information is received from the encoding end), and if the video frame carries first indication information and the first indication information indicates that the current block is based on at least one target spatial neighboring block similar to the current block when using OBIC mode, the device determines at least one target spatial neighboring block similar to the current block in response to the first indication information carried in the video frame (i.e., S601).
[0240] In the process of determining at least one target spatial neighboring block similar to the current block at the decoding end, if the video frame carries second indication information, the decoding end can determine at least one target spatial neighboring block in response to the scheme for determining the target spatial neighboring block indicated by the second indication information.
[0241] Alternatively, if the video frame does not carry the second indication information, the decoder can determine at least one target spatial neighbor block based on the default scheme (or a scheme pre-agreed with the encoder).
[0242] As another possible implementation, if the first indication information carried in the video frame indicates that the current block is not based on at least one target spatial neighboring block similar to the current block when using OBIC mode, the encoder can respond to the first indication information carried in the video frame to determine the spatial neighboring blocks around the current block through the initial OBIC mode.
[0243] In other words, the decoding end can use the presence or absence of a first indication information and / or a second indication information for the current block in the video frame as an incentive for the current block to trigger the new OBIC technology provided in this disclosure embodiment.
[0244] The intra-frame prediction method provided in this disclosure will be described below with reference to specific examples.
[0245] For example, the intra-frame prediction method provided in this disclosure can be applied to a device for decoding video (i.e., a decoding end), the input of which is a video image bitstream or a media file, and the output is a decoded video image to be displayed.
[0246] In this embodiment, when decoding a video image, if the identification information (i.e., the aforementioned first indication information and / or second indication information) specifies the use of the OBIC mode for intra-frame prediction of the current block, this disclosure proposes that when statistically analyzing the various intra-frame prediction modes used in surrounding spatial neighboring blocks, the similarity of content or pixel data between the spatial neighboring blocks and the current block is first considered, thereby filtering the spatial neighboring blocks to be statistically analyzed. For one or more spatial neighboring blocks that are relatively related to the current block, the intra-frame angle prediction modes used by them and the total number of pixels (or weighted total number of pixels) corresponding to the application of each prediction mode can be statistically analyzed to generate a pixel-level usage histogram for each intra-frame angle prediction mode. Based on this histogram, one or more candidate intra-frame angle prediction modes can be selected during encoding prediction, and the intra-frame prediction value of the current block can be obtained through prediction value fusion, thereby successfully decoding the current block. Specific steps include:
[0247] Step A: Obtain and parse the bitstream.
[0248] The decoding end (i.e., the decoding node) acquires the code stream to be decoded, parses the code stream to be decoded, and determines whether the intra-prediction mode used by the current block is OBIC mode through the identification information.
[0249] Step B: When the intra-prediction mode specified by the identification information is the BV-guided OBIC mode, select one or more BVs with smaller template loss for the current coding block.
[0250] In order to determine the similarity of the content or pixel data of spatial neighboring blocks with the current block, one or more BVs with smaller template loss can be selected for the current block.
[0251] Preferably, BV selection can be achieved through the following optional schemes:
[0252] Option 1: Traverse the spatially neighboring blocks (both adjacent and non-adjacent) of the current block (CU). If they use intra-prediction modes such as IntraTMP or IBC that copy reference blocks based on BV, add their BVs to the intra-BV candidate list of the current block. After obtaining the BV candidate list, each BV in the list can guide to a certain reconstruction region corresponding to the current block, thereby calculating the difference in pixel values between the current block template region and the reconstructed pixel template region, denoted as the template loss. By sorting the template losses corresponding to all candidate BVs, one or more BVs with smaller template losses can be selected.
[0253] Option 2: Without relying on the BV used in adjacent or non-adjacent spatial neighboring blocks, one or more BVs with smaller template loss can be searched directly in the reconstructed area around the current block based on the template region of the current block and the template loss index.
[0254] Option 3: Based on Option 1, search for one or more BVs with smaller template loss in each target BV direction to obtain more target BVs.
[0255] Step C: Filter the target spatial neighbor blocks for OBIC statistics based on the reconstructed area guided by BV.
[0256] Since a smaller template loss means that the pixel data of two template regions are more similar, the reconstructed region guided by the BV selected based on the principle of smaller template loss can be considered to be more similar to the current block. Therefore, the reconstructed regions guided by one or more BVs with smaller template loss can be used as a reference for selecting target spatial neighbor blocks. That is, only target spatial neighbor blocks that overlap with the reconstructed regions guided by one or more BVs are applied to the statistical analysis of OBIC mode to construct a pixel-level utilization histogram for intra-frame angle prediction mode.
[0257] Optionally, if a target spatial neighbor block overlaps with two or more reconstructed regions, the intra-frame angle prediction mode used by the target spatial neighbor block and the number of pixels it contains only need to be counted once.
[0258] Optionally, when counting the number of pixels corresponding to each intra-frame angle prediction mode, the number of pixels to be accumulated in the target spatial neighbor block can be weighted according to the ratio of the overlapping area or the ratio of the number of overlapping pixels between the target spatial neighbor block and all reconstructed regions guided by one or more BVs. Specifically, the weight setting in the weighting process can be either the overlapping area ratio or the overlapping pixel ratio.
[0259] Optionally, after the target spatial neighbor block is selected from the reconstructed region based on the BV guide, the number of pixels contained in the target spatial neighbor block can be weighted according to the distance between the target spatial neighbor block and the current coding block, and then a pixel-level utilization histogram for the intra-frame angle prediction mode can be constructed in an accumulative manner.
[0260] Step D: Check the intra-frame angle prediction mode of the filtered target spatial neighbor blocks.
[0261] Among them, the intra-angle prediction mode of the target space neighboring block includes the intra-angle prediction mode directly used during intra-frame prediction, as well as all intra-angle prediction modes used in DIMD, TIMD, SGPM, OBIC and other modes, and the virtual intra-angle prediction mode corresponding to EIP, IntraTMP, MIP and other modes.
[0262] Step E: Statistically analyze the intra-frame angle prediction patterns of the target spatial neighbor blocks after filtering and the number of pixels they contain.
[0263] In order to select one or more of the most commonly used intra-angle prediction modes in the target spatial neighbor block based on statistical data, after determining the intra-angle prediction mode used by a specific spatial neighbor block, it is necessary to simultaneously record the intra-angle prediction mode (such as index number) and the number of pixels contained in the spatial neighbor block (i.e., block width x block height) or the weighted number of pixels (i.e., weight x block width x block height). The weight setting can be referred to the description in step C above.
[0264] Step F: Generate pixel-level utilization histograms for each intra-frame angle prediction mode.
[0265] In this process, by accumulating the total number of pixels or the weighted total number of pixels in the target space neighboring blocks corresponding to each intra-frame angle prediction mode, a pixel-level utilization histogram (HoC) can be generated for each intra-frame angle prediction mode.
[0266] Step G: Select one or more intra-frame angle prediction modes with higher amplitudes from the histogram and fuse them to derive the intra-frame prediction value of the current block.
[0267] In this process, after generating a pixel-level utilization histogram for intra-frame angle prediction modes, one or more intra-frame angle prediction modes with higher amplitude (total number of pixels) can be selected from the histogram as candidate intra-frame angle prediction modes for predicting the current block.
[0268] After obtaining the candidate intra-frame prediction values for the current block using one or more of the above candidate intra-frame angle prediction modes, Planar mode, or BV-based prediction modes, the multiple candidate intra-frame prediction values are then fused together using a conventional weighted fusion method to serve as the final intra-frame prediction value for the current block, i.e., the decoded data for the current block.
[0269] In the conventional weighted fusion process, the weight value corresponding to a specific candidate intra-frame angle prediction mode can be derived from the proportion of its corresponding histogram magnitude in the sum of the histogram magnitudes of all candidate intra-frame angle prediction modes.
[0270] Furthermore, in image encoding and decoding, when applying the OBIC mode to perform intra-frame prediction on the current coding block, in order to generate more accurate intra-frame prediction values through the OBIC mode more flexibly, this disclosure provides an example of identification information in the bitstream indicating the application of the OBIC mode, wherein the syntax structure and semantic information can correspond to a combination of various situations described in this disclosure.
[0271] For example, the identification information used in the bitstream to indicate the application of OBIC mode is given in the CU.
[0272] It should be noted that the identification information in the CU used to indicate the application of OBIC mode, which is given in the embodiments of this disclosure, can also be given in other parameter sets (e.g., sequence parameter set (SPS), picture parameter set (PPS)), or header information (e.g., picture header (PH), slice header (SH)), or coding tree unit (CTU).
[0273] Furthermore, the identification information used to indicate the application of OBIC mode can exist independently in a certain information set, such as in the description information of CU, CTU, SH, PH, PPS or SPS, or it can exist separately in two or three information sets and achieve the complete application of OBIC mode through mutual reference.
[0274] When identifying parameter information used to indicate the application of OBIC mode in CU information, the organization of the example identification information syntax can be shown in Table 1.
[0275] Table 1. Examples of identification information indicating OBIC mode application.
[0276]
[0277]
[0278] The semantic examples of the identification information in Table 1 are as follows:
[0279] pred_mode_obic_flag: When the value is 1, it indicates that the CU uses OBIC mode for intra-frame prediction; when the value is 0, it indicates that the CU does not use OBIC mode for intra-frame prediction.
[0280] bvg_obic_flag (i.e., the first indication information): When the value is equal to 1, it indicates that when the CU uses OBIC mode, it filters the spatial neighbor blocks to be statistically analyzed based on the BV-guided method, and then generates a pixel-level utilization histogram corresponding to each intra-frame angle prediction mode for one or more spatial neighbor blocks that are closely related to the current block. When the value is equal to 0, it indicates that when the CU uses OBIC mode, it does not use the BV-guided method to filter spatial neighbor blocks, that is, it directly uses the initial OBIC mode to count the total number of pixels corresponding to each intra-frame angle prediction mode applied in the spatial neighbor blocks, and generates a pixel-level utilization histogram for each intra-frame angle prediction mode.
[0281] bvg_obic_type (i.e., the second indicator information): When the CU uses the OBIC mode with BV booting, it indicates the BV acquisition method for this CU. The BV acquisition method includes, but is not limited to, the following:
[0282] Option 1: Traverse the spatially neighboring blocks (both adjacent and non-adjacent) of the current block (CU). If they use intra-prediction modes such as IntraTMP or IBC that copy reference blocks based on BV, add their BVs to the intra-BV candidate list of the current block. After obtaining the BV candidate list, each BV in the list can guide to a certain reconstruction region corresponding to the current block, thereby calculating the difference in pixel values between the current block template region and the reconstructed pixel template region, denoted as the template loss. By sorting the template losses corresponding to all candidate BVs, one or more BVs with smaller template losses can be selected.
[0283] Option 2: Without relying on the BV used in adjacent or non-adjacent spatial neighboring blocks, one or more BVs with smaller template loss can be searched directly in the reconstructed area around the current block based on the template region of the current block and the template loss index.
[0284] Option 3: Based on Option 1, search for one or more BVs with smaller template loss in each target BV direction to obtain more target BVs.
[0285] In summary, when deriving the prediction value of the current block based on the intra / inter-frame prediction mode of spatial neighboring blocks, the embodiments of this disclosure propose that when statistically analyzing the various intra / inter-frame prediction modes used in the surrounding spatial neighboring blocks, the similarity of the content or pixel data of the spatial neighboring blocks and the current coding block should be considered first, so as to filter the spatial neighboring blocks to be statistically analyzed, so as to improve the prediction accuracy by referring to more relevant neighboring information.
[0286] Furthermore, in order to determine the similarity of content or pixel data between spatially neighboring blocks and the current coding block, this disclosure proposes first constructing a candidate list of BVs for the current coding block, and then selecting one or more BVs with smaller losses through template loss calculation. The candidate list of BVs constructed for the current coding block can be derived from spatially neighboring blocks, or it can be obtained by searching the neighboring region based on the template of the current coding block.
[0287] Furthermore, since a smaller template loss means that the pixel data of two template regions are more similar, the reconstructed region pointed to by the BV selected based on the principle of smaller template loss can be considered to be more similar to the current block. Therefore, this embodiment proposes to use the reconstructed regions pointed to by one or more BVs with smaller template loss as a reference for screening spatial neighbor blocks. That is, only spatial neighbor blocks that overlap with the reconstructed regions pointed to by the aforementioned BVs are applied to statistical analysis to construct a pixel-level utilization histogram for intra-frame angle prediction modes. Based on the histogram, one or more candidate intra-frame angle prediction modes with higher amplitudes can be selected to predict the current coding block, and the final prediction value of the current coding block can be obtained through conventional fusion.
[0288] It is understood that, in order to achieve the above-mentioned functions, the intra-frame prediction device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments of this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0289] This disclosure embodiment can divide the intra-frame prediction device into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each functional module according to each function.
[0290] Figure 14 This is a schematic diagram of the structure of an intra-frame prediction device provided in an embodiment of this disclosure. Figure 1 The above can be executed. Figure 6 The intra-frame prediction method shown. For example... Figure 14 As shown, the intra-frame prediction device 1400 includes: a processing module 1401.
[0291] Processing module 1401 is configured to determine at least one target spatial neighboring block similar to the current block; processing module 1401 is further configured to determine quantitative indicators of each of a plurality of candidate intra-prediction modes based on the number of pixels of the at least one target spatial neighboring block and the applied intra-prediction mode; processing module 1401 is further configured to determine at least one target intra-prediction mode of the current block from the plurality of candidate intra-prediction modes based on the quantitative indicators of each of the plurality of candidate intra-prediction modes; processing module 1401 is further configured to perform intra-prediction on the current block based on at least one target intra-prediction mode.
[0292] In some embodiments, the processing module 1401 is specifically configured to determine at least one target block vector of the current block; the processing module 1401 is also configured to determine at least one target spatial neighbor block based on the at least one target block vector.
[0293] In some embodiments, the processing module 1401 is specifically used to determine the template loss of each candidate block vector in the candidate block vector list; the processing module 1401 is also used to determine at least one target block vector from the candidate block vector list based on the template loss of each candidate block vector in the candidate block vector list.
[0294] In some embodiments, the processing module 1401 is specifically used to determine the top N candidate block vectors with the smallest template loss in the candidate block vector list as target block vectors based on the template loss of each candidate block vector in the candidate block vector list; or, the processing module 1401 is specifically used to determine the candidate block vectors with template loss less than a preset threshold in the candidate block vector list as target block vectors based on the template loss of each candidate block vector in the candidate block vector list.
[0295] In some embodiments, the processing module 1401 is specifically configured to determine at least one target block vector from the reconstructed region surrounding the current block based on template loss requirements.
[0296] In some embodiments, the processing module 1401 is specifically configured to determine the reconstruction region indicated by each target block vector based on the location information of the current block and at least one target block vector; the processing module 1401 is further configured to determine the spatial neighboring blocks that have overlapping portions with the reconstruction regions indicated by the target block vectors as target spatial neighboring blocks.
[0297] In some embodiments, the processing module 1401 is specifically used to determine the target spatial neighbor block corresponding to the candidate intra-prediction mode based on the intra-prediction mode applied to at least one target spatial neighbor block; the processing module 1401 is also used to determine the quantitative index of the candidate intra-prediction mode based on the number of pixels of the target spatial neighbor block corresponding to the candidate intra-prediction mode.
[0298] In some embodiments, the quantitative metrics for the candidate intra-prediction mode include the sum of the number of pixels in each target spatial neighboring block corresponding to the candidate intra-prediction mode.
[0299] In some embodiments, the processing module 1401 is specifically used to determine a quantitative index of the candidate intra-prediction mode based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-prediction mode and the weighting coefficient. The quantitative index of the candidate intra-prediction mode includes: the weighted sum of the number of pixels in each target spatial neighbor block corresponding to the candidate intra-prediction mode.
[0300] The weighting coefficients of the target spatial neighbor blocks are determined according to at least one of the following:
[0301] The distance between the target space's neighboring blocks and the current block;
[0302] The overlap ratio of the target spatial neighboring blocks is used to characterize the area ratio or pixel ratio between the overlapping part and the target spatial neighboring blocks. The overlapping part is the overlap between the target spatial neighboring blocks and the reconstructed regions indicated by all target block vectors.
[0303] In some embodiments, the weighting coefficient is positively correlated with the overlap ratio of neighboring blocks in the target space; and / or, the weighting coefficient is negatively correlated with the distance.
[0304] In some embodiments, the intra-frame prediction device 1400 is applied at the encoding end, and the intra-frame prediction device may further include a transmission module 1402. The transmission module 1402 is used to transmit first indication information and / or second indication information in the bitstream;
[0305] The first indication information is used to indicate whether the current block is based on at least one target spatial neighbor block similar to the current block when using the utilization-based intra-coding OBIC mode;
[0306] The second instruction information is used to indicate the scheme for determining the target spatial neighboring block.
[0307] In some embodiments, the intra-frame prediction device 1400 is applied at the decoding end, and the intra-frame prediction device may further include a receiving module 1403. The receiving module 1403 is used to receive first indication information and / or second indication information in the bitstream;
[0308] The first indication information is used to indicate whether the current block is based on at least one target spatial neighbor block similar to the current block when using the utilization-based intra-coding OBIC mode;
[0309] The second instruction information is used to indicate the scheme for determining the target spatial neighboring block.
[0310] In implementing the functions of the integrated modules described above in hardware, this disclosure provides another possible structural illustration of the intra-frame prediction device involved in the above embodiments. Figure 2 .like Figure 15 As shown, the intra-frame prediction device 1500 includes: a processor 1502 and a bus 1504. Optionally, the intra-frame prediction device may also include a memory 1501; optionally, the intra-frame prediction device may also include a communication interface 1503.
[0311] Processor 1502 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1502 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1502 may also be a combination of functions implementing computation, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0312] The communication interface 1503 is used to connect to other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0313] The memory 1501 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0314] As one possible implementation, the memory 1501 can exist independently of the processor 1502. The memory 1501 can be connected to the processor 1502 via a bus 1504 and is used to store instructions or program code. When the processor 1502 calls and executes the instructions or program code stored in the memory 1501, it can implement the intra-frame prediction method provided in the embodiments of this disclosure.
[0315] In another possible implementation, the memory 1501 can also be integrated with the processor 1502.
[0316] The 1504 bus can be an extended industry standard architecture (EISA) bus, etc. The 1504 bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 15 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0317] Some embodiments of this disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a computer, cause the computer to perform the intra-frame prediction method as described in any of the above embodiments.
[0318] Exemplary examples of computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical discs (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). The various computer-readable storage media described in this disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0319] This disclosure provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the intra-frame prediction method described in any of the above embodiments.
[0320] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. An intra-frame prediction method, characterized in that, include: Identify at least one target spatial neighbor block that is similar to the current block; Based on the number of pixels in the at least one target spatial neighbor block and the applied intra-prediction mode, quantitative indicators for each of the multiple candidate intra-prediction modes are determined. Based on the quantitative indicators of each of the multiple candidate intra-prediction modes, at least one target intra-prediction mode for the current block is determined from the multiple candidate intra-prediction modes. Intra-frame prediction is performed on the current block based on the at least one target intra-frame prediction mode.
2. The method according to claim 1, characterized in that, Determining at least one target spatial neighboring block similar to the current block includes: Determine at least one target block vector for the current block; Based on the at least one target block vector, determine the at least one target spatial neighbor block.
3. The method according to claim 2, characterized in that, Determining at least one target block vector for the current block includes: Determine the template loss for each candidate block vector in the candidate block vector list; Based on the template loss of each candidate block vector in the candidate block vector list, the at least one target block vector is determined from the candidate block vector list.
4. The method according to claim 3, characterized in that, Determining the at least one target block vector from the candidate block vector list based on the template loss of each candidate block vector in the candidate block vector list includes: Based on the template loss of each candidate block vector in the candidate block vector list, the top N candidate block vectors with the smallest template loss in the candidate block vector list are determined as the target block vector; or... Based on the template loss of each candidate block vector in the candidate block vector list, the candidate block vectors whose template loss is less than a preset threshold are determined as the target block vectors.
5. The method according to claim 2, characterized in that, Determining at least one target block vector for the current block includes: Based on the template loss requirement, the at least one target block vector is determined from the reconstructed region surrounding the current block.
6. The method according to claim 2, characterized in that, The step of determining the at least one target spatial neighbor block based on the at least one target block vector includes: Based on the location information of the current block and the at least one target block vector, the reconstruction area indicated by each target block vector is determined; Spatial neighbor blocks that overlap with the reconstructed region indicated by the target block vector are identified as the target spatial neighbor blocks.
7. The method according to claim 1, characterized in that, The determination of quantitative indicators for each of the multiple candidate intra-prediction modes based on the number of pixels in the at least one target spatial neighbor block and the applied intra-prediction mode includes: Based on the intra-prediction mode applied to the at least one target spatial neighbor block, determine the target spatial neighbor block corresponding to the candidate intra-prediction mode; The quantitative index of the candidate intra-prediction mode is determined based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-prediction mode.
8. The method according to claim 7, characterized in that, The quantitative indicators of the candidate intra-frame prediction mode include: the sum of the number of pixels in each of the target spatial neighbor blocks corresponding to the candidate intra-frame prediction mode.
9. The method according to claim 7, characterized in that, The step of determining the quantitative index of the candidate intra-frame prediction mode based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-frame prediction mode includes: Based on the number of pixels in the target spatial neighbor block corresponding to the candidate intra-prediction mode and the weighting coefficient, a quantitative index of the candidate intra-prediction mode is determined. The quantitative index of the candidate intra-prediction mode includes: the weighted sum of the number of pixels in each target spatial neighbor block corresponding to the candidate intra-prediction mode. The weighting coefficients of the target spatial neighbor blocks are determined according to at least one of the following: The distance between the target space neighboring blocks and the current block; The overlap ratio of the target spatial neighboring blocks is used to characterize the area ratio or pixel ratio between the overlapping part and the target spatial neighboring blocks. The overlapping part is the overlap between the target spatial neighboring blocks and the reconstructed regions indicated by all target block vectors.
10. The method according to claim 9, characterized in that, The weighting coefficient is positively correlated with the overlap ratio of the target spatial neighboring blocks; and / or, the weighting coefficient is negatively correlated with the distance.
11. The method according to any one of claims 1-10, characterized in that, The method is applied to the encoding end, and the method further includes: Send the first indication information and / or the second indication information in the bitstream; Wherein, the first indication information is used to indicate whether the current block is based on at least one target spatial neighbor block similar to the current block when using the usage-based intra-coding OBIC mode; The second indication information is used to indicate the scheme for determining the target spatial neighboring block.
12. The method according to any one of claims 1-10, characterized in that, The method is applied at the decoding end, and the method further includes: Receive the first indication information and / or the second indication information in the bit stream; Wherein, the first indication information is used to indicate whether the current block is based on at least one target spatial neighbor block similar to the current block when using the usage-based intra-coding OBIC mode; The second indication information is used to indicate the scheme for determining the target spatial neighboring block.
13. An intra-frame prediction device, characterized in that, include: Memory and processor; Memory and processor are coupled; The memory is used to store instructions that can be executed by the processor; When the processor executes the instructions, it performs the method as described in any one of claims 1-12.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-12.
15. A computer program product, characterized in that, The computer program product includes computer program instructions that, when executed, implement the method as described in any one of claims 1-12.