Intra prediction method, encoder, decoder and electronic device
Patent Information
- Application Number
- CN202380083733.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-04-28
AI Technical Summary
然而,在某些情况下,图像块表现出较差的线性相关性
[0026]公开的实施例提供了基于像素离散相关性的帧内预测方法。该方法通过像素的离散相关性实现跨分量预测。参考块子集(即参考区域)中像素的特征和当前块中像素的特征被二值化并转换为二进制特征向量,然后进行差异比较。二进制特征向量降低了计算复杂度、时间消耗和功耗。差异通过汉明Hamming距离表示,并转换为参考块子集的像素色度值到当前块的像素色度值的帧内预测的权重。这些权重隐含地体现了像素的离散相关性。因此,根据不同的参考块集合生成当前块的多个预测块。选择与当前块色度分量差异最小的一个预测块作为帧内预测的最终预测块。选择生成最终预测块的一组参考块的方案被编码到携带视频帧的比特流中。权重和残差块也被编码到比特流中。
Smart Images

Figure CN120457679B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing, and more specifically, to an intra-frame prediction method, encoder, decoder, and electronic device. Background Technology
[0002] In the field of image and video compression technology, images are typically composed of three color components: a luma component (Y) and two chrominance components (Cb and Cr). Each component is represented as a data matrix. The data matrix for each component is decomposed into blocks associated with specific encoding parameters. Any block for a given component can be a square or rectangle with a side length that is a power of 2, spatially corresponding to a unique block in the corresponding position of the other two components. The encoder encodes the luma component first, then the chrominance components. Spatially, the encoding order starts from the top left corner, proceeding from left to right, and then from top to bottom.
[0003] In video coding standards such as Universal Video Coding (VVC), intra-frame prediction refers to the method of predicting the current block using previously coded blocks in the same frame. When performing intra-frame prediction on the current block, a set of candidate prediction modes is determined for the current block, and intra-frame prediction is performed on the current block based on multiple candidate prediction modes from this set. This set of candidate prediction modes may include combinations of optimal prediction modes (i.e., prediction modes encoded in the bitstream), derived modes representing the optimal prediction direction obtained based on previously reconstructed blocks, and some intra-frame prediction modes.
[0004] Technical issues
[0005] In the field of cross-component prediction, there is currently a method called convolutional cross-component prediction. Current convolutional cross-component prediction methods require solving a system of linear equations when calculating the mode parameters, which is very time-consuming. Convolutional cross-component prediction is based on linear regression. However, in some cases, image patches exhibit poor linear correlation. Existing cross-component prediction methods perform poorly in these situations.
[0006] Therefore, an intra-frame prediction method is desired to enhance prediction techniques. Summary of the Invention
[0007] The purpose of this disclosure is to propose an intra-frame prediction method, encoder, decoder, and electronic device.
[0008] In a first aspect, embodiments of the present invention provide an intra-frame prediction method executable in an electronic device, comprising:
[0009] Obtain a target block to be encoded and multiple reference blocks from a video frame;
[0010] Select a subset of multiple reference blocks as the reference region;
[0011] Calculate the first feature vector of each reference pixel in each reference block within each reference region to obtain the first feature vector of the reference block, and calculate the second feature vector of each target pixel in the target block to obtain the second feature vector of the target block;
[0012] Binarize the first and second feature vectors based on the reference values of each pixel in all reference regions;
[0013] Derive the Hamming distance between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel;
[0014] The weights of each reference pixel in each reference block are generated using the Hamming distance of the reference pixels;
[0015] Chromaticity prediction of the target block is performed based on the weight of each reference region to obtain a chromaticity prediction block corresponding to each reference region; and
[0016] Select the best candidate from all chromaticity prediction blocks.
[0017] In a second aspect, embodiments of the present invention provide an electronic device as an image encoder, comprising a processor for calling and running a computer program stored in memory, such that a device with a chip mounted thereon can perform the disclosed methods and any combination thereof.
[0018] In a third aspect, embodiments of the present invention provide an electronic device as an image decoder, comprising a processor for calling and running a computer program stored in memory, such that a device with a chip mounted thereon can perform the disclosed methods and any combination thereof.
[0019] In a fifth aspect, embodiments of the present invention provide an image encoder chip for performing the disclosed methods and any combination thereof.
[0020] In a sixth aspect, embodiments of the present invention provide an image decoder chip for performing the disclosed methods and any combination thereof.
[0021] The disclosed methods can be programmed as computer-executable instructions stored in a non-volatile computer-readable medium. When loaded onto a computer, the non-volatile computer-readable medium instructs the computer's processor to execute the disclosed methods.
[0022] Non-volatile computer-readable media may include at least one of the following groups: hard disk, CD-ROM, optical storage device, magnetic storage device, read-only memory, programmable read-only memory, erasable programmable read-only memory, EPROM, electrically erasable programmable read-only memory, and flash memory.
[0023] The disclosed method can be programmed as a computer program product to make the computer execute the method.
[0024] The publicly disclosed method can be programmed as a computer program to make the computer execute the method.
[0025] Beneficial effects
[0026] The disclosed embodiments provide an intra-frame prediction method based on pixel discrete correlation. This method achieves cross-component prediction through the discrete correlation of pixels. Features of pixels in a subset of reference blocks (i.e., reference regions) and features of pixels in the current block are binarized and converted into binary feature vectors, then difference comparisons are performed. Binary feature vectors reduce computational complexity, time consumption, and power consumption. The difference is represented by Hamming distance and converted into weights for intra-frame prediction of pixel chroma values from the subset of reference blocks to the pixel chroma values of the current block. These weights implicitly reflect the discrete correlation of pixels. Therefore, multiple prediction blocks for the current block are generated based on different sets of reference blocks. The prediction block with the smallest difference in chroma components from the current block is selected as the final prediction block for intra-frame prediction. The scheme for selecting a set of reference blocks to generate the final prediction block is encoded into a bitstream carrying video frames. Weights and residual blocks are also encoded into the bitstream. Attached Figure Description
[0027] To more clearly illustrate the embodiments or related technologies of this disclosure, the embodiments are briefly described below with reference to the figures. Obviously, these figures are only some embodiments of this disclosure, and those skilled in the art can obtain other figures based on these figures without any additional effort.
[0028] Figure 1 A communication system incorporating an electronic device that performs an intra-frame prediction method is illustrated schematically.
[0029] Figure 2 An electronic device performing an intra-frame prediction method is illustrated schematically.
[0030] Figure 3 This schematically illustrates the workflow of intra-frame prediction methods for images and videos at the encoding or decoding end.
[0031] Figure 4 The workflow of the decoding end is illustrated schematically.
[0032] Figure 5 The diagram illustrates the current block and the reference block that serves as the reference region for the current block.
[0033] Figure 6 The video encoder is illustrated schematically.
[0034] Figure 7The video decoder is illustrated schematically.
[0035] Figure 8 The illustration schematically shows a color image, one block of which is processed as the current block. The color image includes three color components, as well as the neighboring blocks of the current block in the color image.
[0036] Figure 9 The diagram schematically shows the luminance and chrominance components of the current block and its reference block.
[0037] Figure 10 The workflow of an intra-frame prediction method applicable to images or videos is illustrated schematically.
[0038] Figure 11 This schematically illustrates the current block and the different reference block regions used as reference areas.
[0039] Figure 12 The diagram schematically illustrates the pixel being processed as the current pixel and its neighboring pixels, whose spatial coordinates are defined based on the central current pixel.
[0040] Figure 13 The binary representation of the feature vector is illustrated schematically.
[0041] Figure 14 The calculation of the Hamming distance between two binary feature vectors is illustrated schematically.
[0042] Figure 15 A communication system that performs an intra-frame prediction method is illustrated schematically. Detailed Implementation
[0043] The embodiments of this disclosure will be described in detail with reference to the accompanying drawings, illustrating the technical problems, structural features, implementation objectives, and effects. Specifically, the terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and does not limit the scope of this disclosure.
[0044] Current convolutional cross-component prediction models require solving a system of linear equations when calculating model parameters, which is very time-consuming.
[0045] Furthermore, using continuous functions for cross-component prediction in all cases may not be reasonable. Traditional intra-frame prediction methods are not suitable for blocks where colors are not gradients but relatively discretely distributed. Constructing discrete patterns for intra-frame prediction is sometimes more advantageous than using continuous functions.
[0046] Therefore, this invention proposes a method to collect features of luminance component values and corresponding chrominance component values from a reference region, establish a mapping relationship from luminance to chrominance, and obtain chrominance by using the luminance component features of the current block through the mapping relationship.
[0047] Reference Figure 1 A system comprising electronic devices 10a and 10b, a base station (BS) 20a, and a network entity device 30 performs the disclosed methods according to embodiments of the present disclosure. Electronic devices 10a and 10b may be computers, laptops, tablets, mobile phones, AR glasses, or other AR processing devices. Figure 1 This is for illustrative purposes only and is not intended to be limiting; the system may include more electronic devices, base stations, and CN entities. Connections between devices and their components are shown in the diagram with lines and arrows. Electronic device 10a may include processor 11a, memory 12a, transceiver 13a, camera 14a, depth camera 15a, and inertial measurement unit (IMU) 16a. Electronic device 10b may include processor 11b, memory 12b, transceiver 13b, and camera 14b. In some embodiments, each electronic device may include a depth camera for capturing depth images. In some embodiments, each electronic device may include an inertial measurement unit (IMU) for measuring and generating an external odometry measurement of the device. Odometry is an estimate of the device's position over time, utilizing data from motion sensors.
[0048] Each camera 14a and 14b acquires and generates a color space image from the scene. The color space image cameras, such as camera 14a or 14b, are used to acquire a series of input frames, each containing a color space image.
[0049] Base station 20a may include processor 21a, memory 22a, and transceiver 23a. Network entity device 30 may include processor 31, memory 32, and transceiver 33. Each processor 11a, 11b, 21a, and 31 may be used to implement the functions, programs, and / or methods described herein. Processors 11a, 11b, 21a, and 31 may implement various layers of a wireless interface protocol. Memory 12a, 12b, 22a, and 32 respectively store various programs and information for operating connected processors. Transceivers 13a, 13b, 23a, and 33 are connected to connected processors and are capable of transmitting and / or receiving wireless or wired signals. Base station 20a may be an access point, eNB, gNB, or other type of wireless node, and may configure wireless resources for electronic devices 10a and 10b.
[0050] Each processor 11a, 11b, 21a, and 31 may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. Each memory 12a, 12b, 22a, and 32 may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. Each transceiver 13a, 13b, 23a, and 33 may include baseband circuitry and radio frequency (RF) circuitry to process radio frequency signals. When the implementation is in software form, the techniques described herein can perform the above functions through programs, instructions, modules, procedures, functions, entities, etc. Modules can be stored in memory and executed by the processor. Memory can be implemented within the processor or outside the processor and can be communicatively coupled to the processor in various known ways.
[0051] Examples of electronic devices described may include electronic device 10a or electronic device 10b. Electronic device 10a may communicate with electronic device 10b via a direct connection or via base station 20a and / or network device entity 30.
[0052] refer to Figure 2 Electronic device 10a can communicate with electronic device 10b via wired or wireless communication connection. One of electronic devices 10a or 10b can act as an image encoder, and the other can act as an image decoder.
[0053] refer to Figure 3 and Figure 4 This is an example of performing an intra-frame prediction method for electronic devices 10a and 10b.
[0054] An image encoder can be implemented as an intra-frame prediction unit, a chip, an electronic device, or a video coding system. An image decoder can be implemented as an intra-frame prediction unit, a chip, an electronic device, or a video decoding system. The intra-frame prediction unit in the image encoder and / or image decoder performs an intra-frame prediction method.
[0055] The intra-frame prediction unit acquires the target block to be encoded and multiple reference blocks in the video frame, and selects a subset of the multiple reference blocks as the reference region (S301).
[0056] The intra-frame prediction unit calculates a first feature vector for each reference pixel in each reference block within the reference region, thereby obtaining multiple first feature vectors for the reference block, and calculates a second feature vector for each target pixel in the target block, thereby obtaining multiple second feature vectors for the target block (S302). The first and second feature vectors may include luminance component values, gradient values of luminance components, and spatial coordinates of the reference pixel or target pixel (depending on which one applies), and include a set of luminance component values of neighboring pixels around the reference pixel or target pixel.
[0057] The intra-frame prediction unit binarizes multiple first feature vectors and multiple second feature vectors based on the reference values of all pixels in each reference region (S303).
[0058] The intra-frame prediction unit calculates the Hamming distance between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel (S304). The process of calculating the Hamming distance includes calculating the Hamming distance between all reference pixels within the reference region and the target pixel for each target pixel in the target block. In one embodiment, the Hamming distance between the binarized first feature vector and the binarized second feature vector is obtained by performing an XOR operation on the binarized first feature vector and the binarized second feature vector of each reference pixel, and then counting the number of binary 1s in the XOR result. The number of binary 1s in the result is the Hamming distance between the first feature vector and the second feature vector.
[0059] The intra-frame prediction unit uses the Hamming distance of the aforementioned reference pixels to generate the weight of each reference pixel in each reference block (S305).
[0060] By generating the weights of each reference pixel in each reference block using the Hamming distance from the reference pixel to the target pixel to be predicted in the target block, the weights of multiple reference pixels within the reference region relative to the target pixel can be generated.
[0061] By generating weights for multiple reference pixels in the reference region relative to each target pixel in the target block, the weights for multiple reference pixels in the reference region relative to all target pixels in the target block can be generated.
[0062] The generated weights are used to generate predicted chromaticity values for multiple target pixels in the target block based on the chromaticity values of reference pixels in the reference region. The intra-frame prediction unit can generate weights for each reference pixel in each reference block using a monotonically non-increasing function based on the Hamming distance.
[0063] The intra-frame prediction unit performs chroma prediction on the target block based on each reference region and using the weights of the reference regions relative to the target block, to obtain a chroma prediction block corresponding to each reference region. The chroma prediction based on the reference regions includes: generating a predicted chroma value for each target pixel in the target block using a weighted average of the chroma values of multiple reference pixels in the generated reference region, based on the weights of the generated reference regions, thereby forming a prediction block with the predicted chroma values of all target pixels in the target block (S306). The weights of the reference regions are the weights of all reference pixels in the reference regions.
[0064] The intra-prediction unit selects the best candidate block from all chroma prediction blocks (S308). The best candidate block is the best chroma prediction block. The intra-prediction unit performs chroma prediction on the target block based on different subsets (reference regions) of multiple reference blocks to form different prediction blocks of the target block based on different subsets of multiple reference blocks.
[0065] The intra-prediction unit selects one of the different prediction blocks of the target block as the final prediction block. The intra-prediction unit can also select a prediction block from the different prediction blocks of the target block as the final prediction block based on the difference between each prediction block and the target block. When selecting the prediction block with the smallest difference value, the corresponding selection scheme for determining a subset of multiple reference blocks is encoded in the bitstream carrying the video frame. The weights of the reference pixels in the subset of reference blocks used to generate the final prediction block can be encoded in the bitstream carrying the video frame, or they can be left unencoded.
[0066] The intra-frame prediction unit outputs the final predicted block of the target block to the next stage of the encoder or decoder, depending on the application.
[0067] The image encoder performs intra-prediction during the intra-prediction phase and transmits video frames. The image decoder receives video frames and performs intra-prediction during the intra-prediction phase.
[0068] The image decoder acquires the target block to be decoded and multiple reference blocks in the video frame (S401).
[0069] The image decoder uses its internal intra-prediction unit to reproduce the weights of multiple reference pixels in multiple reference blocks. The weights include the weight of each reference pixel in each reference block, which is generated based on the Hamming distance between the reference pixel and the target pixel to be predicted in the target block. These weights can be used to generate the predicted chromaticity value of the target pixel in the target block from the chromaticity values of the reference pixels in multiple reference blocks (S402).
[0070] The image decoder performs chromaticity prediction on the target block based on each reference region in a plurality of reference blocks, wherein the chromaticity prediction based on each reference region includes: generating a predicted chromaticity value for each target pixel in the target block based on the weights of a plurality of reference pixels in the generated reference region, using a weighted average of the chromaticity values of the plurality of reference pixels in the reference region, to form a prediction block with predicted chromaticity values of all target pixels (S403).
[0071] The objective of this invention is to solve the above-mentioned problems.
[0072] Therefore, the present invention relates to an intra-frame prediction method that divides an image into multiple color components and multiple blocks.
[0073] The method of this invention implements the following steps for intra-frame prediction of the uncoded chroma components of the current block. The current block is a block in a video frame that has not yet been encoded. In the description, the current block is called the target block, and the pixels in the target block are called target pixels. The pixels in the reference block are called reference pixels.
[0074] The first step is to sample the luminance component of the reconstructed data of the coded block (i.e., the reference block or reference region) and to sample the luminance component of the current block.
[0075] The second step is to calculate the predicted values of the chromaticity components of the current block that has not yet been encoded from the sampled data.
[0076] In this invention, obtaining the predicted values of the chromaticity components of the current block that has not yet been encoded includes a sampling phase and a prediction phase.
[0077] The first step is the sampling phase, which includes the following steps (1) and (2):
[0078] (1) For each pixel in the reference region of the chromaticity component, the pixel is located at a position in the reference region, and the vector elements of its feature vector contain the following feature values:
[0079] (a) Brightness values of pixels at the same location,
[0080] (b) Brightness values at one or more nearby locations,
[0081] (c) The brightness gradient value of pixels at the same location.
[0082] (d) The coordinates of that location, and
[0083] (e) The square of the luminance value of a pixel at the same location and / or the square of the luminance value of a neighboring pixel at a nearby location.
[0084] If the luminance component is used instead of the downsampling setting, the feature values in (a) will be unavailable, the feature values in (c) will be the luminance values of the nearby locations, and the feature values in (e) will only include the nearby locations.
[0085] (2) For each vector element, a reference value is obtained. This reference value can be the average of the vector element values of all pixels in the reference region of the chromaticity component, or a subset of the maximum value of the vector element values of all pixels in that region. Each vector element of each pixel in the reference region is binarized based on the reference value. Vector elements greater than the reference value are binarized to a Boolean value of 1, and vector elements less than the reference value are binarized to a Boolean value of 0. The feature vector of each pixel in the reference region is binarized into a binary vector with a length equal to the number of vector element types. This binary vector is hereinafter referred to as the binarized feature vector or the binary feature vector.
[0086] The second step is the prediction phase, which includes the following steps (3) and (4) for the chromaticity components of each pixel in the target block:
[0087] (3) For each pixel in the target block of the chroma component, which is located in the reference region, the vector elements of its feature vector contain feature values based on the same scheme in (1). Each vector element of each pixel in the target block is binarized according to the reference value. Vector elements greater than the reference value are binarized to a Boolean value of 1, and vector elements less than the reference value are binarized to a Boolean value of 0. The feature vector of each pixel is binarized into a binary vector with a length equal to the number of vector element types.
[0088] (4) For each feature vector in (2) and each feature vector in (3), calculate the Hamming distance between the feature vectors in (2) and (3) to obtain the Hamming distance of the feature vectors in (2). Convert the Hamming distance into the weights of pixels in the reference region according to a predefined monotonically non-increasing function. Perform chromaticity prediction on the target block based on the reference regions in multiple reference blocks. Chromaticity prediction based on reference regions includes: generating the predicted chromaticity value of each target pixel in the target block using a weighted average of the chromaticity values of multiple reference pixels in the generated reference regions, based on the weights of the generated reference regions, thereby forming a prediction block with the predicted chromaticity values of all target pixels in the target block.
[0089] The set of predicted chromaticity values of all pixels in the target block is called a prediction block. Intra-prediction units can use this scheme to determine a subset of reference blocks among multiple reference blocks. Steps (1) to (4) above are performed for each subset of reference blocks to obtain the prediction block of the target block. Therefore, each prediction block is associated with the subset of reference blocks from which it was obtained. For each prediction block, the sum of absolute differences between the target block and the prediction block is calculated. Among all prediction blocks, the prediction block with the smallest sum of absolute differences is selected as the chosen prediction block.
[0090] After obtaining the predicted chroma values in the selected prediction block, the remaining coding of the current block can follow the current image and video coding standards (e.g., MPEG, H.266 / VVC, etc.).
[0091] To help understand the technical solutions proposed in the embodiments of this application, four basic concepts are briefly introduced first: predictive coding, intra-frame prediction, color image data combination, and cross-component intra-frame prediction.
[0092] In video coding, the main function of predictive coding is to construct the predicted value of the current block using the reconstructed image region (of which at least a portion is used as a reference region). By encoding and transmitting only the difference between the original value and the predicted value of the current block, image data compression is achieved and the amount of data transmitted is reduced.
[0093] The main function of intra-frame prediction is to construct the predicted value of the current block using the current block and its adjacent upper, left, and upper-left pixel units. For example... Figure 5 As shown, the reconstructed neighboring pixels are used to generate the predicted value for each pixel in the current block 101. The neighboring pixels include the pixels in the top row 102, the pixels in the left column 103, and the pixels in the top-left block 104 adjacent to the current block.
[0094] Therefore, when encoding chroma components, once the luminance components of the same image are encoded and reconstructed, they can be used as reference samples for encoding chroma components. When encoding the chroma components of the current block, the chroma component values of the current block can be predicted using the chroma component reconstructed data of adjacent blocks. Furthermore, the luminance component reconstructed data of adjacent blocks can also be used to predict the chroma component values of the current block. In video compression algorithms, the correlation between the luminance components of adjacent blocks can be used to predict the chroma components of the current block; this technique is called chroma prediction. This method is often referred to as cross-component prediction.
[0095] This application provides a video encoding system through its embodiments. For example... Figure 6 As shown, the video coding system 210 consists of multiple modules, including a conversion and quantization unit 2101, an intra-frame estimation unit 2102, an intra-frame prediction unit 2103, a motion compensation unit 2104, a motion estimation unit 2105, an inverse transform and inverse quantization unit 2106, a filter control and analysis unit 2107, a filtering unit 2108, a coding unit 2109, a coded image buffer unit 2110, and a subtractor 2112.
[0096] The original video signal consists of video frames. Each video frame can be divided into video reconstruction blocks by a coding tree unit. For each video frame, subtractor 2112 generates residual pixel information of the residual frame by subtracting the prediction block output by intra-frame prediction unit 2103 or motion compensation unit 2104 from the video frame. The residual pixel information obtained after intra-frame prediction or inter-frame prediction (motion compensation) is transformed by transform and quantization unit 2101. The transformation includes converting the residual pixel information from the pixel domain to the transform domain, and the resulting transform coefficients are quantized to further reduce the bit rate. Intra-frame estimation unit 2102 performs intra-frame estimation, and intra-frame prediction unit 2103 performs intra-frame prediction on the video reconstruction block. The motion estimation process performed by motion estimation unit 2105 is to generate motion vectors that can estimate the motion of the video reconstruction block, and then motion compensation unit 2104 performs motion compensation based on the determined motion vectors. After determining the intra-prediction mode, the intra-prediction unit 2103 provides the selected intra-prediction data to the coding unit 2109, and the motion estimation unit 2105 also sends the calculated motion vector data to the coding unit 2109. The inverse transform and inverse quantization unit 2106 reconstructs the video reconstruction block and reconstructs the residual block in the pixel domain. The filtering unit 2108, under the control of the filtering analysis unit 2107, removes the block artifacts from the reconstructed residual block. The coding unit 2109 adds the reconstructed residual block to the prediction block of the encoded image buffer unit 2110 to generate the reconstructed block. The coding unit 2109 encodes various coding parameters and quantization transform coefficients into a bitstream and outputs the bitstream of the video signal. The encoded image buffer unit 2110 stores the reconstructed block as a reference block for intra-prediction. As video image coding progresses, new reconstructed blocks are continuously generated, and these blocks are stored in the encoded image buffer unit 2110.
[0097] Embodiments of this application provide a video decoding system. For example... Figure 7 As shown, the video decoding system 220 consists of multiple modules, including a decoding unit 2201, an inverse transform and inverse quantization unit 2202, an intra-frame prediction unit 2203, a motion compensation unit 2204, a filtering unit 2205, and a decoded image buffer unit 2206.
[0098] Video encoding system 210 encodes the input signal of video frames to obtain an output bitstream. This bitstream is transmitted to video decoding system 220. Video decoding system 220 receives the bitstream representing the encoding format (i.e., compression format) of the video frames. In video decoding system 220, the bitstream is processed by decoding unit 2201 to obtain decoded transform coefficients. Inverse transform and inverse quantization unit 2202 processes the transform coefficients to generate residual blocks in the pixel domain. Intra-prediction unit 2203 generates intra-prediction blocks for the current video decoded block based on the determined intra-prediction mode and previous decoded block data of the current video frame or image. Motion compensation unit 2204 determines inter-frame prediction information for the current video decoded block and generates inter-prediction blocks by parsing motion vectors and other relevant syntax elements. Finally, the decoded video block is obtained by adding the residual block of inverse transform and inverse quantization unit 2202 to the corresponding prediction block generated by intra-prediction unit 2203 or motion compensation unit 2204. To improve video quality, the decoded video block is filtered by filtering unit 2205 to remove block artifacts. The decoded video block is then stored in the decoded image buffer unit 2206 as a reference block for subsequent intra-frame prediction or motion compensation, as well as for video output, i.e., reproducing and reconstructing the original video signal.
[0099] The embodiments of this application are mainly used in the intra-prediction unit 2103 of the video coding system 210 and the intra-prediction unit 2203 of the video decoding system 220. If better prediction results are obtained in the video coding system 210 through the intra-prediction method provided in this application, the quality of video decoding and reconstruction can also be improved. The video decoding system 220 receives a bitstream indicating video frames, which contains the luminance components of the video frames. The intra-prediction unit 2203 of the video decoding system 220 can obtain the luminance components of the reference block and the current block, and calculate the Hamming difference and weight accordingly. The intra-prediction unit 2203 can perform the same intra-prediction method as the intra-prediction unit 2103. An embodiment of the intra-prediction method will be described in detail below.
[0100] The data structure for a color image is shown below. Figure 8 As shown, a frame of a color image or color video typically consists of three color components: a luma component Y 301 and two chroma components Cb 302 and Cr 303. Each component is represented as a data matrix, which is decomposed into blocks associated with specific coding parameters. For example, a block 304 of the luma component Y, a block 305 of the chroma component Cb, and a block 306 of the chroma component Cr all correspond to spatial location 307 on the color image 300. In video coding, the luma component is typically processed first, followed by the chroma component.
[0101] The luminance component of a color image or video frame has a higher resolution than any chrominance component, with twice the number of pixels in both the vertical and horizontal directions. To facilitate intra-frame prediction, the luminance component is downsampled during intra-frame prediction to match the resolution of the chrominance component, ensuring that all components have the same number of pixels in both the vertical and horizontal directions. This downsampling process ensures that the luminance component can be processed efficiently during intra-frame prediction without affecting the quality of the chrominance component.
[0102] The principle of cross-component intra-frame prediction is to use the reconstructed image region of one color component to predict the image region of another color component in the same image. For example... Figure 9 As shown, block 405 (which can be Cb or Cr) of the current chrominance component is about to be encoded. At this time, the current block 401 of the luminance component Y, which is at the same spatial location as block 405, has already been encoded and reconstructed. Reference blocks 402, 403, and 404, corresponding to the current block 401, are also at the same spatial location as reference blocks 406, 407, and 408, corresponding to the current block 405, and have already been encoded and reconstructed. Reference blocks 406, 407, and 408 may constitute the reference region of the current block 405. The principle of cross-component prediction is to calculate the relationship between the reference blocks 402, 403, and 404 of the luminance component and the reference blocks 406, 407, and 408 of the chrominance component, and apply this relationship to the current block 401 of the luminance component to calculate the predicted value of the chrominance component of the current block 405. Alternatively, a subset of reference blocks 406, 407, and 408 may constitute the reference region of the current block 405.
[0103] Figure 10 This is a schematic diagram of the intra-frame prediction method according to an embodiment of this application. For example... Figure 10 As shown, the method includes steps S501 to S505 performed by the video encoding system 210.
[0104] S501: Determine the reference region of the current block that needs to be encoded or decoded for the chroma components.
[0105] Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) determine a reference region for the current block where chroma components need to be encoded or decoded. The reference region is typically an encoded region adjacent to the current block, which is the region where intra-prediction is performed. For example, as... Figure 11 As shown, the reference region is determined from the adjacent blocks above and to the left of the current block C. For example, all the left blocks (L), top blocks (U), bottom-left blocks (LL), top-right blocks (UR), and top-left blocks (UL) of the current block can be used as reference blocks. The reference region of the current block can be a combination of various reference blocks. For example, the left blocks (L), bottom-left blocks (BL), and top-left blocks (UL) can be selected as reference regions.
[0106] S502: Perform feature extraction on each pixel in the current block and the reference region.
[0107] like Figure 12 As shown, a pixel in the reference region is used as the current pixel and set as the center (C). The spatial coordinates of the current pixel can be set to (0,0). Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) assign coordinates to nearby pixels. Similar to a Cartesian coordinate system, the horizontal axis is represented by a first axis, where moving left from the center (0,0) is considered a negative value, and moving right is considered a positive value. The vertical axis is represented by a second axis, where moving downwards from the center (0,0) is considered a negative value, and moving upwards is considered a positive value.
[0108] The brightness value at coordinates (x, y) can be represented as Y(x, y). To simplify the notation and facilitate referencing surrounding pixels, the eight neighboring pixels adjacent to the current pixel can be identified using directional orientations. Specifically, these eight neighboring pixels can be represented by the following directional letters in these directions: North (N), South (S), West (W), East (E), Northwest (NW), Northeast (NE), Southwest (SW), and Southeast (SE).
[0109] During feature extraction, the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) selects one or more feature values from the following feature types as elements of the feature vector:
[0110] (a) The brightness value of the current pixel.
[0111] (b) The brightness value of one or more neighboring pixels.
[0112] (c) The brightness gradient value of the current pixel.
[0113] (d) The coordinates of the current pixel, and
[0114] (e) The square of the brightness value of the current pixel or its neighboring pixels.
[0115] When calculating the first feature vector, the current pixel is each reference pixel in each reference block; and
[0116] When calculating the second feature vector, the current pixel is each target pixel in the target block.
[0117] For example, eight values can be selected to form an eigenvalue set or eigenvector F in the following way:
[0118] F=[CY(-2,0)Y(2,0)Y(0,-2)Y(0,2)Gx Gy C*C]
[0119] Where C represents the brightness value of the current pixel;
[0120] Gx=|2*W+NW+SW-2*E-NE-SE|, Gy=|2*N+NW+NE-2*S-SW-SE|;
[0121] || represents absolute value; and
[0122] W, NW, SW, E, NE, SE, N, and S represent the brightness values of the neighboring pixels of the current pixel in the W, NW, SW, E, NE, SE, N, and S directions.
[0123] As another example, six numerical eigenvalues can be selected to form an eigenvalue set or eigenvector F, according to the following definition:
[0124] F = [C Gx Gy xy C*C]
[0125] Another example is that ten numerical features can be selected to form a set of features or an eigenvector F.
[0126] F=[CY(-3,0)Y(3,0)Y(0,-3)Y(0,3)Gx Gy xy C*C]
[0127] S503: Binarize the selected features based on the reference region.
[0128] Set a benchmark value for binarization for different types of feature values (i.e., feature vector elements). The benchmark value is defined based on the entire reference region. Calculate a certain type of feature value (i.e., feature vector element) for all pixels within the reference region and use it as the comparison benchmark for that feature value.
[0129] like Figure 13 As shown, each feature value in the feature vector is compared with the corresponding benchmark value and binarized into a binary value.
[0130] For the selected feature vector elements belonging to feature types (a) and (b), the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) uses the average (labeled as Mean) or median of the brightness values of all pixels in the reference region as the reference value.
[0131] For the selected feature vector elements belonging to feature type (c), the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) uses a multiple T of the maximum value of the corresponding gradient of all pixels in the reference region as a reference value (denoted as TGX and TGY). This multiple T is strictly greater than 0 and strictly less than 1.
[0132] For the selected feature vector elements belonging to feature type (d), the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) uses the average of the coordinates of all pixels in the reference region as the reference value (labeled as MX and MY).
[0133] For the selected feature vector elements belonging to feature type (e), the average of the squares of the brightness values of all pixels in the reference region (denoted as Mean MS) is used as the baseline value.
[0134] Once the baseline value is determined, the feature vector is binarized based on whether the value of each vector element is not less than the baseline value. During binarization, vector elements in the feature vector (e.g., the first feature vector and the second feature vector) that are not less than the baseline value are binarized to 1, and vector elements that are less than the baseline value are binarized to 0. Therefore, the feature vector is transformed into a binarized feature vector with the same number of elements, whose element values are either 0 or 1.
[0135] S504: Calculate the predicted values of all pixels in the current block to obtain the predicted block.
[0136] The prediction value of each pixel in the current block is calculated one by one through the following two sub-steps, and the set of prediction values of all pixels forms a prediction block.
[0137] S504-1: Compare the binary feature vector of the reference region with the binary feature vector of the current block, and convert the difference into weights.
[0138] For a binary feature vector of a pixel in the reference region and a binary feature vector of a pixel in the current block, the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) compares these two feature vectors to determine the difference, and repeats the comparison for all pixels in the reference region and the current block one by one. The difference between the two vectors is quantized and used to create weights for pixels in the reference region. The differences between these vectors for all pixels in the reference region and the current block are quantized and used to create weights representing the similarity between the two regions. These weights are used to predict the luma and chroma components of the current block relative to the reference region, thereby efficiently encoding and transmitting video frames. The intra-prediction unit calculates the difference value between the two feature vectors and converts it into weights. The pixels being compared do not need to have the same spatial location. For example, when the reference region contains n pixels and the current block contains m pixels, a total of n*m comparisons are required.
[0139] The method used to calculate this difference is called the Hamming distance, defined as the number of distinct elements in two feature vectors. The Hamming distance can be obtained by performing an XOR operation on the two feature vectors and counting the number of binary 1s in the XOR result. For example... Figure 14 As shown, this example illustrates the case where the Hamming distance is 3. The Hamming distance between two feature vectors is calculated by comparing each element of the two feature vectors and counting the number of distinct elements.
[0140] Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) calculate the Hamming distance between the binary first feature vector of each reference pixel and the binary second feature vector of each target pixel.
[0141] Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) generate weights for reference pixels by calculating the Hamming distance between each reference pixel in each reference block and the target pixel to be predicted, thereby generating weights for reference pixels across multiple reference blocks. These generated weights can be used to generate predicted chroma values for the target pixel in the target block based on the chroma values of the reference pixels in the multiple reference blocks. Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) can convert the Hamming distance into weights for the reference pixels using a monotonically non-increasing function. For example, the Hamming distance is denoted as H, and the weights for the reference pixels are denoted as W. This monotonically non-increasing function can be defined as:
[0142]
[0143] For another example, a monotonically non-increasing function can be defined as:
[0144]
[0145] For another example, a monotonically non-increasing function can be defined as:
[0146] W=2 -H (3)
[0147] Please note that monotonically non-increasing functions are not limited to the formula. For example, a monotonically non-increasing function can be defined as:
[0148] When the Hamming distance of the reference pixel is greater than or equal to a preset value, the weight of the reference pixel is 0; and
[0149] When the Hamming distance of the reference pixel is less than a preset value, the weight of the reference pixel is 1.
[0150] The preset value can be any number other than 3 in formula (1).
[0151] S504-2: Calculate the pixel prediction value of the current block based on the weights mentioned above and the chromaticity values of the pixels in the reference area.
[0152] The weighted average of the pixels in the reference region is used to calculate the predicted value. That is, the corresponding chromaticity component value of each pixel in the reference region is multiplied by its weight to obtain a product, and then the products of all pixels are summed and divided by the sum of all weights to generate the weighted average.
[0153] Specifically, for a reference pixel of a target pixel in the current block, if the sum of the weights is zero, it means that the target pixel cannot be predicted temporarily, and the predicted chroma value of the target pixel is temporarily left blank. Such a pixel is temporarily referred to as a blank pixel in the target block. After completing the calculation of the predicted chroma values of all pixels in the current block, the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) can calculate the average of all predicted chroma values and use this average as the predicted chroma value of the aforementioned blank pixels. More specifically, if all pixels in the current block cannot be predicted, the average of the chroma values of all pixels in the reference region is used as the predicted chroma value of all blank pixels in the current block. Since the weights are zero, the predicted chroma value of the blank pixels in the current block is the average of the chroma values of all pixels in the reference region, rather than a weighted average.
[0154] S505: Execute steps S501-S504 multiple times based on different subsets of reference blocks to generate prediction blocks, calculate the difference between each prediction block and the current block, and select a prediction block as the final prediction block.
[0155] Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) perform chroma prediction on the target block based on different subsets of reference blocks from a plurality of reference blocks to generate different prediction blocks corresponding to the target block for the different subsets of reference blocks. The intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) selects one of the different prediction blocks of the target block as the final prediction block of the target block.
[0156] Intra-prediction unit 2103 outputs the final predicted block of the target block to the next stage in the encoder (e.g., subtractor 2112). Intra-prediction unit 2203 outputs the final predicted block of the target block to the next stage in the decoder (e.g., synthesizer 2212). The selection of one of the different predicted blocks of the target block as the final predicted block may be based on the difference between each predicted block and the target block.
[0157] Multiple reference blocks exist. Intra-prediction units (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) can select a subset of reference blocks to form a reference region. The corresponding procedures are then executed, and finally, the prediction block is calculated. For each different subset of reference blocks, steps S501-S504 are performed to perform chroma prediction, generating the prediction block. Finally, the different prediction blocks are compared with the original data, and the best prediction block is selected.
[0158] When calculating the difference between the predicted block and the current block, the difference can be the sum of absolute errors. Specifically, the intra-prediction unit (e.g., intra-prediction unit 2103 and / or intra-prediction unit 2203) obtains the absolute difference between the predicted value and the original value for each pixel in the current block, and calculates the sum of the absolute errors over all pixels.
[0159] When the prediction block with the smallest difference value is selected, the corresponding selection scheme (i.e., a subset of the reference region) is encoded into the bitstream, and then intra-frame prediction is completed. For example, coding unit 2109 encodes the residual block and the corresponding reference region selection scheme into the bitstream.
[0160] The video decoding system 200 receives and decodes the bitstream to obtain residual blocks, weights, and corresponding selection schemes. When performing intra-prediction on each current block in the bitstream, the intra-prediction unit 2203 uses the corresponding selection scheme to obtain a subset of reference blocks as reference regions, and reconstructs and reproduces the prediction block (i.e., the final prediction block) of the current block using the weights and chroma values of the pixels in the reference regions. The specific details of generating the prediction block of the current block from the weights and chroma values of the pixels in the reference regions are the same as those of the intra-prediction unit 2103. The inverse transform and inverse quantization unit 2202 performs inverse transform and inverse quantization on the encoded residual blocks to generate residual blocks. The synthesizer 2212 synthesizes the final prediction block and the residual blocks to generate a decoded video block. The decoded video block is filtered by the filtering unit 2205 to remove block artifacts. The decoded video block is then stored in the decoded image buffer unit 2206 as a reference block for subsequent intra-prediction or motion compensation, and for video output, i.e., reproduction and reconstruction of the original video signal.
[0161] Figure 15 This is a block diagram of a communication example system 700 according to an embodiment of this disclosure. The embodiments described herein can be implemented by any suitably configured hardware and / or software. Figure 15 The system 700 is shown, including a radio frequency (RF) circuit 710, a baseband circuit 720, a processing unit 730, a storage / memory 740, a display 750, a camera 760, a sensor 770, and an input / output (I / O) interface 780, which are connected to each other as shown in the figure.
[0162] Processing unit 730 may include circuitry, such as one or more single-core or multi-core processors. The processor may include any combination of general-purpose and special-purpose processors, such as graphics processors and application processors. The processor may be connected to storage / memory and configured to execute instructions stored in the storage / memory to support various applications and / or operating systems running on the system.
[0163] The baseband circuit 720 may include circuitry, such as one or more single-core or multi-core processors. These processors may include baseband processors. The baseband circuitry may handle various wireless control functions to communicate with one or more wireless networks via radio frequency circuitry. Wireless control functions may include signal modulation, encoding, decoding, radio frequency offset, etc. In some embodiments, the baseband circuitry may support communication compatible with one or more wireless technologies. For example, in some embodiments, the baseband circuitry may support communication with 5G NR, LTE, Evolved Universal Terrestrial Radio Access Network (EUTRAN) and / or other Wireless Metropolitan Area Networks (WMAN), Wireless Local Area Networks (WLAN), and Wireless Personal Area Networks (WPAN). Embodiments of the baseband circuitry configured to support multiple wireless protocols may be referred to as multi-mode baseband circuitry. In various embodiments, the baseband circuitry 720 may include circuitry that operates with signals not strictly considered to be at baseband frequencies. For example, in some embodiments, the baseband circuitry may include circuitry that operates with signals having an intermediate frequency, which lies between the baseband frequency and the radio frequency.
[0164] The radio frequency (RF) circuit 710 can communicate with a wireless network using modulated electromagnetic radiation via a non-solid-state medium. In various embodiments, the RF circuit may include switches, filters, amplifiers, etc., to facilitate communication with the wireless network. In different embodiments, the RF circuit 710 may include circuitry that operates with signals that are not strictly considered to be radio frequency (RF). For example, in some embodiments, the RF circuitry may include circuitry that operates with signals having an intermediate frequency, which is between the baseband frequency and the RF frequency.
[0165] In various embodiments, the transmit circuitry, control circuitry, or receive circuitry associated with a user equipment (UE), enhanced base station (eNB), or next-generation base station (gNB) may be wholly or partially embodied in one or more radio frequency circuits, baseband circuits, and / or processing units. The term "circuit" as used herein may refer to, constitute, or include application-specific integrated circuits (ASICs), electronic circuits, processors (shared, dedicated, or grouped), and / or memory (shared, dedicated, or grouped) that execute one or more software or firmware programs, combinational logic circuits, and / or other suitable hardware components that provide the aforementioned functionality. In some embodiments, electronic device circuitry may implement or be associated with circuitry functions through one or more software or firmware modules. In some embodiments, some or all components of the baseband circuitry, processing units, and / or memory / storage may be integrated into a single system-on-a-chip (SOC).
[0166] The memory / storage 740 can be used to load and store data and / or instructions, for example, for the system. In one embodiment, the memory / storage may comprise any suitable combination of volatile memory, such as dynamic random access memory (DRAM), and / or non-volatile memory, such as flash memory. In various embodiments, the I / O interface 780 may include one or more user interfaces for user interaction with the system, and / or peripheral component interfaces for peripheral interaction with the system. User interfaces may include, but are not limited to, physical keyboards or pads, touchpads, speakers, microphones, etc. Peripheral component interfaces may include, but are not limited to, non-volatile memory ports, USB ports, audio jacks, and power interfaces.
[0167] In various embodiments, sensor 770 may include one or more sensing devices to determine environmental conditions and / or location information relevant to the system. In some embodiments, the sensor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of, or interact with, baseband and / or radio frequency circuitry to communicate with components of a positioning network, such as Global Positioning System (GPS) satellites. In various embodiments, display 750 may include display devices such as liquid crystal displays and touchscreen displays. In various embodiments, system 700 may be a mobile computing device, such as a laptop computer, tablet computer, netbook, ultrabook, smartphone, etc. In various embodiments, the system may have more or fewer components and / or different architectures. If necessary, the methods described herein may be implemented as a computer program. The computer program may be stored on a storage medium, such as a non-volatile storage medium.
[0168] The implementation of this disclosure is a combination of technologies / processes that can be adopted in 3GPP specifications to create the final product.
[0169] Those skilled in the art will understand that each unit, algorithm, and step described and disclosed in the embodiments of this disclosure is implemented through electronic hardware or a combination of a computer and software. Whether a function operates in hardware or software depends on the application conditions and the design requirements of the technical solution. Those skilled in the art may implement functions in different ways depending on the specific application, but these implementations should not exceed the scope of this disclosure. Those skilled in the art will also understand that the working processes of the systems, devices, and units in the above embodiments can be referred to, as the working processes of the above systems, devices, and units are substantially the same. For ease of description and simplification, these working processes are not described in detail herein.
[0170] The systems, devices, and methods disclosed in the embodiments of this disclosure can be implemented in other ways. The above embodiments are merely examples. The division of units is based solely on logical function, and other divisions may exist in actual implementation. Multiple units or components may be combined or integrated into another system, and certain characteristics may be omitted or skipped. Furthermore, the mutual coupling, direct coupling, or communication coupling discussed is carried out directly or indirectly, electrically, mechanically, or otherwise, through some ports, devices, or units.
[0171] The units that are separate components may or may not be physically separate. The units used for demonstration may or may not be physical units, i.e., they may be concentrated in one place or distributed among multiple network units. The use of these units depends on the purpose of the embodiment. Furthermore, the functional units in each embodiment may be integrated into a processing unit, which may be physically independent units or integrated into a processing unit with two or more units.
[0172] If a software functional unit is implemented, used, and sold as a product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions proposed in this disclosure can be implemented substantially or partially in the form of a software product. Alternatively, a portion of a technical solution advantageous to conventional technology can be implemented in the form of a software product. The software product in the computer is stored in a storage medium and includes multiple commands to enable a computing device (such as a personal computer, server, or network device) to execute all or part of the steps disclosed in the embodiments of this disclosure. The storage medium includes a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a floppy disk, or other media capable of storing program code.
[0173] This disclosure provides an intra-frame prediction method based on pixel discrete correlation. This method achieves cross-component prediction through the discrete correlation of pixels. Features of pixels in the reference region and the current block are binarized and converted into binary feature vectors, then difference comparisons are performed. Binary feature vectors reduce computational complexity, time consumption, and power consumption. The difference is represented by Hamming distance and converted into weights for intra-frame prediction from pixel chroma values in the reference region to pixel chroma values in the current block, which implicitly realize the discrete correlation of pixels. Multiple prediction blocks for the current block are generated based on different sets of reference blocks. The prediction block with the smallest difference in chroma components from the current block is selected as the final intra-frame prediction block. The scheme for selecting the set of reference blocks for generating the final prediction block is encoded into the bitstream carrying the video frame as the result of the intra-frame prediction. Weights and residual blocks are also encoded into the bitstream.
[0174] While this disclosure has been described based on embodiments that are considered most practical and preferred, it should be understood that this disclosure is not limited to the disclosed embodiments, but is intended to cover a variety of arrangements that are made without departing from the broadest interpretation of the appended claims.
Claims
1. An intra-frame prediction method, characterized in that, Applied to image encoders or image decoders, including: Obtain the target block to be encoded and multiple reference blocks from the video frame; Select a subset of the plurality of reference blocks as a reference region; Calculate the first feature vector of each reference pixel in each reference block within each reference region to obtain the first feature vector of the reference block, and calculate the second feature vector of each target pixel in the target block to obtain the second feature vector of the target block; The first feature vector and the second feature vector are binarized based on the reference values of all pixels in each reference region; Calculate the Hamming distance between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel; The weight of each reference pixel in each reference block is generated using the Hamming distance corresponding to each reference pixel; Using the weights of each reference region relative to the target block, chromaticity prediction is performed on the target block based on each reference region to obtain chromaticity prediction blocks corresponding to each reference region; and Select the best candidate block from all chromaticity prediction blocks.
2. The intra-frame prediction method according to claim 1, characterized in that, The weights of the reference pixels in the reference region relative to the target block are generated by using the weights of the Hamming distances of each reference pixel in each generated reference block relative to the target pixel to be predicted in the target block. and The weights of multiple reference pixels in the generated reference region relative to each target pixel in the target block are generated by assigning weights to these reference pixels relative to each target pixel in the target block. The generated weights are used to generate predicted chromaticity values for multiple target pixels in the target block using the chromaticity values of the reference pixels in the reference region.
3. The intra-frame prediction method according to claim 1, characterized in that, Chromaticity prediction based on the reference region includes generating a predicted chromaticity value for each target pixel in the target block using a weighted average of the chromaticity values of the reference pixels in the reference region based on the corresponding weights of the reference region, thereby forming a prediction block with predicted chromaticity values for all target pixels.
4. The intra-frame prediction method according to claim 1, characterized in that, The calculation of the Hamming distance includes calculating the Hamming distance between the target pixel and all reference pixels within the reference region for each target pixel in the target block.
5. The intra-frame prediction method according to claim 1, characterized in that, The Hamming distance is obtained by performing an XOR operation on the binarized first feature vector and the binarized second feature vector of each reference pixel, and calculating the number of binary 1s in the XOR operation result.
6. The intra-frame prediction method according to claim 1, characterized in that, include: Chromaticity prediction of the target block is performed based on reference blocks of different subsets in the reference region to form different predicted blocks of the target block corresponding to different subsets of reference blocks; Select one prediction block from the different prediction blocks of the target block as the final prediction block of the target block; as well as The final predicted block of the target block is output to the next stage of the encoder.
7. The intra-frame prediction method according to claim 6, characterized in that, include: Based on the difference between each predicted block and the target block, a predicted block is selected from the different predicted blocks of the target block as the final predicted block.
8. The intra-frame prediction method according to claim 6, characterized in that, When a prediction block with the smallest difference value is selected, the corresponding selection scheme for determining the subset of reference blocks is encoded in the bitstream carrying the video frames.
9. The intra-frame prediction method according to claim 6, characterized in that, The method further includes: The weight of each reference pixel in each reference block is generated using a monotonically non-increasing function based on the Hamming distance.
10. The intra-frame prediction method according to claim 9, characterized in that, The monotonically non-increasing function is defined as follows: When the Hamming distance of the reference pixel is greater than or equal to a predetermined value, the weight of the reference pixel is zero; and When the Hamming distance of the reference pixel is less than a predetermined value, the weight of the reference pixel is one.
11. The intra-frame prediction method according to claim 9, characterized in that, The monotonically non-increasing function is defined as follows: The weight of the reference pixel is 1 plus the reciprocal of the Hamming distance of the reference pixel.
12. The intra-frame prediction method according to claim 9, characterized in that, The monotonically non-increasing function is defined as follows: The weight of the reference pixel is the reciprocal of a base-2 exponential function, with the exponent being H, where H represents the Hamming distance of the reference pixel.
13. The intra-frame prediction method according to claim 1, characterized in that, Each vector element of the first feature vector and the second feature vector includes one or more of the following feature types: (a) The brightness value of the current pixel. (b) The brightness value of one or more nearby pixels, (c) The brightness gradient value of the current pixel. (d) The coordinates of the current pixel, and (e) The square of the brightness value of the current pixel or a neighboring pixel at a nearby location; When calculating the first feature vector, the current pixel is each reference pixel in each reference block; When calculating the second feature vector, the current pixel is each target pixel in the target block.
14. The intra-frame prediction method according to claim 13, characterized in that, During the binarization process, for the vector elements in the first feature vector and the second feature vector, vector elements not less than the reference value are binarized to 1, and vector elements less than the reference value are binarized to 0.
15. The intra-frame prediction method according to claim 14, characterized in that, For feature vector elements belonging to feature types (a) and (b), the average or median of the brightness values of all pixels within the reference region is set as the reference value.
16. The intra-frame prediction method according to claim 14, characterized in that, For feature vector elements belonging to feature type (c), the reference value is T, which is a multiple of the maximum value of the gradient of all pixels in the reference region.
17. The intra-frame prediction method according to claim 14, characterized in that, For feature vector elements belonging to feature type (d), the average of the corresponding coordinates of all pixels within the reference region is used as the reference value.
18. The intra-frame prediction method according to claim 14, characterized in that, For feature vector elements belonging to feature type (e), the average of the squared brightness values of all pixels within the reference region is used as the reference value.
19. An electronic device, characterized in that, include: A processor for calling and running a computer program stored in memory, causing a device on which the processor is installed to perform the method of any one of claims 1 to 18.
20. An encoding chip, characterized in that, include: A processor for calling and running a computer program stored in memory, causing a device on which the chip is mounted to perform the method of any one of claims 1 to 18.
21. A decoding chip, characterized in that, include: A processor for calling and running a computer program stored in memory, causing a device on which the chip is mounted to perform the method of any one of claims 1 to 18.
22. A computer-readable storage medium, characterized in that, The computer program is stored thereon, which causes the computer to perform the method of any one of claims 1 to 18.
23. A computer program product, characterized in that, Includes a computer program that causes a computer to perform the method of any one of claims 1 to 18.
Citation Information
Patent Citations
Multiple reference intra prediction using variable weights
CN112335240A
Method and apparatus for intra prediction
CN113170100A