Intra-frame prediction method, encoder, decoder, and electronic device

WO2024221429A1PCT designated stage expired Publication Date: 2024-10-31SHENZHEN TCL NEW-TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/091703
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2024-10-31

Smart Images

  • Figure CN2023091703_31102024_PF_FP_ABST
    Figure CN2023091703_31102024_PF_FP_ABST
Patent Text Reader

Abstract

An intra-frame prediction based on discrete correlation of pixels. Features of pixels in a subset of reference blocks and feature of pixels in a current block are binarized and converted into binary feature vectors and are compared for difference. The difference is represented by Hamming distances and converted into weights for intra-frame prediction from the pixel chroma values of the subset of reference blocks to pixel chroma values of the current block. The weights implicitly realize the discrete correlation of pixels. A plurality of predicted block of the current block are thus generated based on different sets of reference blocks. One predicted block with the least difference to the chroma component of the current block is selected as the final predicted block for intra-frame prediction.
Need to check novelty before this filing date? Find Prior Art

Description

INTRA-FRAME PREDICTION METHOD, ENCODER, DECODER, AND ELECTRONIC DEVICE

[0001] BACKGROUND OF DISCLOSURE

[0002] 1. Field of Disclosure

[0003] The present disclosure relates to the field of image processing, and more particularly, to an intra-frame prediction method, encoder, decoder, and electronic device.

[0004] 2. Description of Related Art

[0005] In the technical field of image and video compression, an image typically consists of three-color components, a luma component Y and two chroma 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 of a certain component, which can be a square or a rectangle block, but the length of the sides is an integer power of 2 pixels, at a spatial position is accompanied with a unique block of each of the other two components corresponding to the same spatial position. An encoder follows a certain coding order: encoding the luma component first, and the chroma components. In the spatial aspect, the encoding starts from the upper left corner and processes from left to right and then from top to bottom.

[0006] In video codec standards such as Versatile Video Coding (VVC) , intra-frame prediction refers to the method of predicting the current block by using the coded blocks in the same image. When intra-frame prediction is performed 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 in the set. The set of candidate prediction modes may include a combination of the optimal prediction mode (that is, the prediction mode is encoded into the bitstream) , a deriving mode representing an optimal direction from a previously reconstructed block, and some intra-frame prediction modes.Technical Problem

[0007] In the domain of cross-component prediction, there is currently a class of methods called convolutional cross-component prediction. The current convolutional cross-component prediction model needs to solve the linear equation system when calculating the model parameters, which is very time-consuming. The convolutional cross-component prediction is based on linear regression. However, in some situations, image blocks show poor linear correlation. Current cross-component prediction methods do not work efficiently in these situations.

[0008] Hence, an intra-frame prediction method is desirable for enhancing the prediction technique.

[0009] SUMMARY

[0010] An object of the present disclosure is to propose an intra-frame prediction method, encoder, decoder, and electronic device.

[0011] In a first aspect, an embodiment of the invention provides an intra-frame prediction method executable in an electronic device, comprising:

[0012] obtaining, in a video frame, a target block to be encoded and a plurality of reference blocks;

[0013] selecting a subset from the plurality of reference blocks as a reference area;

[0014] calculating a first feature vector of each reference pixel in each reference block within each reference area to obtain first feature vectors of the reference block and calculating a second feature vector of each target pixel in target block to obtain second feature vectors of the target block;

[0015] binarizing the first feature vectors and the second feature vectors based on benchmark values for of all pixels of each reference area;

[0016] deriving Hamming distances between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel;

[0017] generating a weight of each reference pixel in each reference block using a Hamming distance of the reference pixel;

[0018] performing chroma prediction for the target block based on each reference area using weights of the reference area for the target block to obtain a chroma prediction block corresponding to each reference area; and

[0019] selecting, from all chroma prediction blocks, the best candidate.

[0020] In a second aspect, an embodiment of the invention provides an electronic device serving as an image encoder, comprising a processor configured to call and run a computer program stored in a memory, to cause a device in which the chip is installed to execute the disclosed method and any combination of embodiments of the disclosed method.

[0021] In a third aspect, an embodiment of the invention provides an electronic device serving as an image decoder, comprising a processor configured to call and run a computer program stored in a memory, to cause a device in which the chip is installed to execute the disclosed method and any combination of embodiments of the disclosed method.

[0022] In an fifth aspect, an embodiment of the invention provides an image encoder chip to execute the disclosed method and any combination of embodiments of the disclosed method.

[0023] In an sixth aspect, an embodiment of the invention provides an image decoder chip to execute the disclosed method and any combination of embodiments of the disclosed method.

[0024] The disclosed method may be programmed as computer executable instructions stored in non-transitory computer-readable medium. The non-transitory computer-readable medium, when loaded to a computer, directs a processor of the computer to execute the disclosed method.

[0025] The non-transitory computer-readable medium may comprise at least one from a group consisting of: a hard disk, a CD-ROM, an optical storage device, a magnetic storage device, a Read Only Memory, a Programmable Read Only Memory, an Erasable Programmable Read Only Memory, EPROM, an Electrically Erasable Programmable Read Only Memory and a Flash memory.

[0026] The disclosed method may be programmed as a computer program product, that causes a computer to execute the disclosed method.

[0027] The disclosed method may be programmed as a computer program, that causes a computer to execute the disclosed method.Advantageous Effects

[0028] Embodiments of the disclosure provides intra-frame prediction based on discrete correlation of pixels. The intra-frame prediction method realizes cross-component prediction using discrete correlation of pixels. Features of pixels in a subset of reference blocks (i.e., a reference area) and feature of pixels in a current block are binarized and converted into binary feature vectors and are compared for difference. The binary feature vectors reduce computation complexity, time consumption, and power consumption. The difference is represented by Hamming distances and converted into weights for intra-frame prediction from  the pixel chroma values of the subset of reference blocks to pixel chroma values of the current block. The weights implicitly realize the discrete correlation of pixels. A plurality of predicted blocks of the current block are thus generated based on different sets of reference blocks. One predicted block with the least difference to the chroma component of the current block is selected as the final predicted block for intra-frame prediction. A scheme of selecting a set of reference blocks from which the final predicted block is generated is encoded into a bitstream carrying the video frame as a result of the intra-frame prediction. The weights and a residual block are also encoded into the bitstream.BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present disclosure or related art, the following figures will be described in the embodiments are briefly introduced. It is obvious that the drawings are merely some embodiments of the present disclosure, a person having ordinary skill in this field may obtain other figures according to these figures without paying the premise.

[0030] FIG. 1 illustrates a schematic view showing a communication system including electronic devices executing an intra-frame prediction method.

[0031] FIG. 2 illustrates a schematic view showing electronic devices executing an intra-frame prediction method.

[0032] FIG. 3 illustrates a schematic view showing the workflow of the said image and video intra-prediction method at the encoding end or decoding end.

[0033] FIG. 4 illustrates a schematic view showing the workflow of the decoding end.

[0034] FIG. 5 illustrates a schematic view showing a current block and reference blocks used as reference areas for the current block.

[0035] FIG. 6 illustrates a schematic view showing a video encoder.

[0036] FIG. 7 illustrates a schematic view showing a video decoder.

[0037] FIG. 8 illustrates a schematic view showing a color image with a block in the color image processed as a current block, three color components of the image and blocks collocated with the current block.

[0038] FIG. 9 illustrates a schematic view showing the luma and chroma components of a current block and its reference blocks.

[0039] FIG. 10 illustrates a schematic view showing the workflow of the intra-frame prediction method applicable to images or videos.

[0040] FIG. 11 illustrates a schematic view showing a current block and its different regions of reference blocks used as reference areas.

[0041] FIG. 12 illustrates a schematic view showing a pixel processed as a current pixel and its neighbor pixels with spatial coordinates defined based on the current pixel in the center.

[0042] FIG. 13 illustrates a schematic view showing binarization of a feature vector.

[0043] FIG. 14 illustrates a schematic view showing the calculation of Hamming Distance between two binary feature vectors.

[0044] FIG. 15 illustrates a schematic view of a communication system executing an intra-frame prediction method.DETAILED DESCRIPTION OF EMBODIMENTS

[0045] Embodiments of the disclosure are described in detail with the technical matters, structural features, achieved objects, and effects with reference to the accompanying drawings as follows. Specifically, the terminologies in the embodiments of the present disclosure are merely for describing the purpose of the certain embodiment, but not to limit the disclosure.

[0046] The current convolutional cross-component prediction model needs to solve the linear equation system when calculating the model parameters, which is very time-consuming.

[0047] Additionally, it may not be reasonable to use a continuous function for cross-component prediction in all cases. Traditional intra-frame prediction methods cannot be appropriate for blocks where the colors are not gradients but relatively discrete distributions. Building a discrete model for intra-frame prediction sometimes has advantages over continuous functions.

[0048] Hence, the present invention proposes a way to collect the features of the luma component values and the corresponding chroma component values from the reference area, establish a mapping relationship from luma to chroma, and use the luma component features of the current block to obtain the color from the mapping relationship.

[0049] With reference to FIG. 1, a system including electronic devices 10a and 10b, a base station (BS) 20a, and a network entity device 30 executes the disclosed method according to an embodiment of the present disclosure. The electronic devices 10a and 10b may be computers, laptops, tablets, mobile phones, AR glasses, or other AR processing devices. FIG. 1 is shown for illustrative not limiting, and the system may comprise more electronic devices, BSs, and CN entities. Connections between devices and device components are shown as lines and arrows in the FIGs. The electronic device 10a may include a processor 11a, a memory 12a, a transceiver 13a, a camera 14a, a depth camera 15a, and an inertial measurement unit (IMU) 16a. The electronic device 10b may include a processor 11b, a memory 12b, a transceiver 13b, and a camera 14b. In some embodiments, each electronic device may comprise a depth camera that catches depth images. In some embodiments, each electronic device may comprise an inertial measurement unit (IMU) that measures and generates external odometry of the device. Odometry of a device is an estimation that uses data from motion sensors to estimate the position change of the device over time.

[0050] Each of the cameras 14a and 14b captures and generates color space images from a scene. A color space image camera, such as camera 14a or 14b, is configured to capture a sequence of input frames, wherein each of the input frames comprises a color space image.

[0051] The base station 20a may include a processor 21a, a memory 22a, and a transceiver 23a. The network entity device 30 may include a processor 31, a memory 32, and a transceiver 33. Each of the processors 11a, 11b, 21a, and 31 may be configured to implement proposed functions, procedures and / or methods described in the description. Layers of radio interface protocol may be implemented in the processors 11a, 11b, 21a, and 31. Each of the memory 12a, 12b, 22a, and 32 operatively stores a variety of programs and information to operate a connected processor. Each of the transceivers 13a, 13b, 23a, and 33 is operatively coupled with a connected processor, transmits and / or receives radio signals or wireline signals. The base station 20a may be an access point, eNB, a gNB, or one of other types of radio nodes, and may configure radio resources for the electronic device 10a and electronic device 10b.

[0052] Each of the processors 11a, 11b, 21a, and 31 may include an application-specific integrated circuit (ASIC) , other chipsets, logic circuits and / or data processing devices. Each of the memory 12a, 12b, 22a,  and 32 may include read-only memory (ROM) , a random access memory (RAM) , a flash memory, a memory card, a storage medium and / or other storage devices. Each of the transceivers 13a, 13b, 23a, and 33 may include baseband circuitry and radio frequency (RF) circuitry to process radio frequency signals. When the embodiments are implemented in software, the techniques described herein can be implemented with programs, instructions, modules, procedures, functions, entities and so on, that perform the functions described herein. The modules can be stored in a memory and executed by the processors. The memory can be implemented within a processor or external to the processor, in which those can be communicatively coupled to the processor via various means are known in the art.

[0053] An example of the electronic device in the description may include one of the electronic device 10a or electronic device 10b. The electronic device 10a may communicate with the electronic device 10b through a direct connection or through the base station 20a and / or the network device entity 30.

[0054] With reference to FIG. 2, the electronic device 10a may communicate with the electronic device 10b through a wireline or a wireless communication connection. One of the electronic device 10a or electronic device 10b may serve as an image encoder and the other may serve as an image decoder.

[0055] With reference to FIG. 3 and FIG. 4, the electronic devices 10a and 10b execute an embodiment of an intra-frame prediction method.

[0056] An image encoder may be implemented as an intra-frame prediction unit, a chip, an electronic device, or a video encoding system. An image decoder may be implemented as an intra-frame prediction unit, a chip, an electronic device, or a video decoding system. The intra-frame prediction unit in an image encoder and / or a image decoder performs intra-frame prediction method.

[0057] The intra-frame prediction unit obtains, in a video frame, a target block to be encoded and a plurality of reference blocks and selects a subset from the plurality of reference blocks as a reference area (S301) .

[0058] The intra-frame prediction unit calculates a first feature vector of each reference pixel in each reference block within the reference area to obtain first feature vectors of the reference block and calculates a second feature vector of each target pixel in target block to obtain second feature vectors of the target block (S302) . Either of the first feature vector and the second feature vector comprises a luma component value, gradient values of luma component and spatial coordinates of the reference pixel or the target pixel, whichever applies, and a set of luma component values of neighboring pixels around the reference pixel or the target pixel, whichever applies.

[0059] The intra-frame prediction unit binarizes the first feature vectors and the second feature vectors based on benchmark values of all pixels of each reference area (S303) .

[0060] The intra-frame prediction unit derives Hamming distances between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel (S304) . The deriving Hamming distances comprises deriving, for each target pixel in the target block, the Hamming distance between all the reference pixels in the reference area and the target pixel. In an embodiment, the Hamming distance between the binarized first feature vector and the binarized second feature vector is obtained by an exclusive OR operation on the binarized first feature vector of each reference pixel and the binarized second feature vector and counting a number of binary ones in a result of the exclusive OR operation. The number of binary ones in a result is the derived Hamming distance between the first feature vector and the second feature vector.

[0061] The intra-frame prediction unit generates a weight of each reference pixel in each reference block using a Hamming distance of the reference pixel (S305) .

[0062] Through the generating of the weight of each reference pixel in each reference block using a Hamming distance of the reference pixel from the reference pixel to a target pixel to be predicted in the target block, weights of reference pixels in the reference area are generated for the target pixel.

[0063] Through the generating of the weights of reference pixels in the reference area for each target pixels in the target block, weights of reference pixels in the reference area are generated for the all target pixels in the target block.

[0064] The generated weights are applicable for generating predicted chroma values of target pixels in the target block from chroma values of reference pixels in the reference area. The intra-frame prediction unit may use a monotone non-increasing function to generate the weight of each reference pixel in each reference block from the Hamming distance.

[0065] The intra-frame prediction unit performs chroma prediction for the target block based on each reference area using weights of the reference area for the target block to obtain a chroma prediction block corresponding to each reference area, wherein the chroma prediction based on the reference area comprises generating a predicted chroma value of each target pixel in the target block using a weighted average of chroma values of reference pixels in the reference area based on the generated weights of the reference area to form a predicted block having predicted chroma values of all the target pixels of the target block (S306) . The weights of the reference area are weights of all reference pixel in the reference area.

[0066] The intra-frame prediction unit selects, from all chroma prediction blocks, the best candidate (S308) . The best candidate is the best chroma prediction block. The intra-frame prediction unit performs the chroma prediction for the target block based on different subsets of reference blocks (reference area) to form different predicted blocks of the target block from the different subsets of reference blocks.

[0067] The intra-frame prediction unit selects one predicted block from the different predicted blocks of the target block as a final predicted block of the target block. The intra-frame prediction unit may select one predicted block from the different predicted blocks of the target block as the final predicted block based on a difference between each predicted block and the target block. When the predicted block with a minimum difference value is selected, a corresponding selection scheme for determining the subset of reference blocks is encoded in a bitstream carrying the video frame. The weights of reference pixels in a subset of reference blocks from which the final predicted block is generated may be encoded in a bitstream carrying the video frame or not.

[0068] The intra-frame prediction unit outputs the final predicted block of the target block to a next stage in the encoder or the decoder whichever applies.

[0069] The image encoder performs the intra-frame prediction method in intra-frame prediction stage and transmits the video frame. The image decoder receives the video frame and performs the intra-frame prediction method in intra-frame prediction stage.

[0070] The image decoder obtains, in a video frame, a target block to be decoded and a plurality of reference blocks (S401) .

[0071] The image decoder uses the intra-frame prediction unit in the image decoder to reproduce the weights of reference pixels in the plurality of reference blocks, wherein the weights comprise for each  reference pixel in each reference block a weight of each reference pixel in each reference block, the weight of each reference pixel in each reference block is generated based on a Hamming distance from the reference pixel to a target pixel to be predicted in the target block, wherein the weights are applicable for generating predicted chroma values of target pixels in the target block from chroma values of reference pixels in the plurality of reference blocks (S402) .

[0072] The image decoder performs chroma prediction for the target block based on each reference area in the plurality of reference blocks, wherein the chroma prediction based on each reference area comprises generating a predicted chroma value of each target pixel in the target block using a weighted average of chroma values of reference pixels in the reference area based on the generated weights of reference pixels in the reference area to form a predicted block having predicted chroma values of all the target pixels of the target block (S403) .

[0073] An object of the present invention is to address the above-mentioned issues.

[0074] To this end, the object of the present invention relates to an intra-frame prediction method for an image divided into a plurality of color components and a plurality of blocks.

[0075] The method according to the present invention implements the following steps of intra-frame predictions for yet-encoded chroma components of a current block. The current block is a block yet encoded in a video frame. In the description, the current block is referred to as a target block, and pixels in the target block are referred to as target pixels. Pixels in the reference block are referred to as reference pixels.

[0076] -The first step is to sample a luma component of reconstructed data of encoded blocks (i.e., reference blocks or the reference area) and a luma component of the current block.

[0077] -The second step is to calculate predicted values of the chroma component of the yet-encoded current block from the sampled data.

[0078] In the present invention, obtaining the predicted values of the chroma component of the current block that is yet encoded comprises a sampling phase and a prediction phase.

[0079] The first step is the sampling phase and comprises the following steps (1) and (2) :

[0080] (1) . For each pixel of the reference area of the chroma component, the pixel is at a location in the reference area, and a feature vector of the pixel includes the following characteristic values as vector elements:

[0081] (a) . a luma value of the pixel at the same location,

[0082] (b) . one or more luma values at one or more nearby locations,

[0083] (c) . a luma gradient value of the pixel at the same location,

[0084] (d) . coordinates of the location, and

[0085] (e) . a quadratic of the luma value of the pixel at the same and / or a quadratic of the luma value of a neighbor pixel at a nearby location.

[0086] If the luma component is used without the down-sampling setting, the characteristic value in (a) is not available, the characteristic value in (c) will be the luma value of the nearby location, and the characteristic value in (e) will contain only the nearby location.

[0087] (2) For each vector element, a benchmark value is obtained, and the benchmark value may be an average of values of the vector element of all pixels in the reference area of the chroma component, or a fraction of the maximum of values of the vector element of all pixels in the reference area of the chroma component Each vector element of each pixel in the reference area is binarized based on the benchmark value. A vector element greater than the benchmark value of the vector element is binarized into a Boolean 1. A  vector element less than the benchmark value of the vector element is binarized into a Boolean 0. The feature vector of each pixel in the reference area is binarized into a binary vector having a length equal to the number of types of vector elements. The binary vector may be hereinafter called a binarized feature vector or a binary feature vector.

[0088] The second step is the prediction phase and comprises the following steps (3) and (4) for each pixel in the target block of the chroma component:

[0089] (3) . For each pixel of the target block of the chroma component, the pixel is at a location in the reference area, a feature vector of the pixel includes the characteristic values as vector elements based on the same scheme in (1) . Each vector element of each pixel in the target block is binarized based on the benchmark value. A vector element greater than the benchmark value of the vector element is binarized into a Boolean 1. A vector element less than the benchmark value of the vector element is binarized into a Boolean 0. The feature vector of each vector element of each pixel in the target block is binarized into a binary vector having a length equal to the number of types of vector elements.

[0090] (4) For each feature vector in (2) and each feature vector in (3) , a Hamming distance from the feature vector in (2) to the feature vector in (3) is calculated, thus to obtain Hamming distances of the feature vectors in (2) . The Hamming distances are converted into weights for the pixels in the reference area according to a predetermined monotonic non-increasing function. Chroma prediction for the target block is performed based on a reference area among the plurality of reference blocks. The chroma prediction based on a reference area comprises generating a predicted chroma value of each target pixel in the target block using a weighted average of chroma values of reference pixels in the reference area based on the generated weights of the reference area to form a predicted block having predicted chroma values of all the target pixels of the target block.

[0091] A collection of predicted chroma values of all pixels in the target block may be called a predicted block. The intra-frame prediction unit may use a scheme to determine the subset of reference blocks among the plurality of reference blocks. The above steps (1) to (4) are performed for each subset of reference blocks to obtain predicted blocks for the target block. Thus, each predicted block is associated with a subset of reference blocks from which the predicted block is obtained. For each predicted block, the sum of absolute differences between the target block and the predicted block is calculated. Among the predicted blocks, one predicted block with the smallest sum of absolute differences is determined as the selected predicted block.

[0092] After the predicted chroma value in the selected predicted block is obtained, the remaining coding of the current block can follow the current image and video codec standards (e.g., MPEG, H. 266 / VVC, etc. ) .

[0093] To help comprehend the technical solutions proposed in the embodiments of this application, let's start by briefly introducing four fundamental concepts: predictive coding, intra-frame prediction, color image data composition, and cross-component intra-frame prediction.

[0094] In video coding, the main function of predictive coding is to use the reconstructed image area (of which at least one portion is used as reference area) to construct the predicted value of the current block, and only encode and transmit the difference between the original value and the predicted value of the current block achieve the purpose of image data compression and reduce the amount of transmitted data.

[0095] The main function of the intra-frame prediction is to use the current block and adjacent upper pixel units, left pixel units, and left upper pixel units to construct a predicted value of the current block. As shown  in FIG. 5, reconstructed adjacent pixels around the current block 101 are used to generate predicted value of each pixel of the current block 101. The adjacent pixels include the pixels in the upper rows 102, the pixels in the left columns 103, and the pixels in the upper left block 104, adjacent to the current block.

[0096] Therefore, when encoding the chroma components, after the encoding of the luma components in the same image has been completed, and the reconstructed data is ready, which can be used as a reference sample when encoding the chroma components. When encoding the current block of the chroma component, the chroma component values of the current block can be predicted using the reconstructed data of the chroma component values from the nearby blocks. Additionally, the chroma component values of the current block can also be predicted using the reconstructed data of the luma component values from the nearby blocks. In video compression algorithms, the correlation between the luma components of neighboring blocks can be leveraged to predict the chroma component of the current block, a technique known as chroma prediction. The approach is often referred to as cross-component prediction.

[0097] The embodiment of the present application provides a video encoding system. As shown in FIG. 6, a video encoding system 210 is composed of multiple modules including transform and quantization unit 2101, intra-frame estimation unit 2102, intra-frame prediction unit 2103, motion compensation unit 2104, motion estimation unit 2105, an inverse transformation and inverse quantization unit 2106, a filter control analysis unit 2107, a filtering unit 2108, an encoding unit 2109, an encoded image buffer unit 2110, and a subtractor 2112.

[0098] Original video signals comprise video frames. Each video frame can be divided into video reconstruction blocks by a coding tree unit. For each of the video frames, the subtractor 2112 generates residual pixel information of a residual frame by subtracting the video frame by predicted blocks output by the intra-frame prediction unit 2103 or the motion compensation unit 2104. The residual pixel information obtained after intra-frame prediction or inter-frame prediction (motion compensation) , is transformed by the transformation and quantization unit 2101. The transformation includes transforming the residual pixel information from the pixel domain to a transform domain, and the resulting transform coefficients are quantized to further reduce the bit rate. The intra-frame estimation unit 2102 performs intra-frame estimation, and the intra-frame prediction unit 2103 performs intra-frame prediction on the video reconstruction blocks. Motion estimation performed by the motion estimation unit 2105 is a process of generating a motion vector that can estimate the motion of the video reconstruction block, and then motion compensation is performed by the motion compensation unit 2104 based on the determined motion vector. After determining an intra-frame prediction mode, the intra-frame prediction unit 2103 provides selected intra-frame predicted data to the encoding unit 2109, and the motion estimation unit 2105 also sends calculated motion vector data to the encoding unit 2109. The inverse transform and inverse quantization unit 2106 reconstructs the video reconstruction blocks and reconstructs a residual block in the pixel domain, and the filtering unit 2108 is controlled by the filter analysis unit 2107 to remove the blocking artifacts in the reconstructed residual block, and the encoding unit 2109 adds the reconstructed residual block to the predicted block of the encoded image buffer unit 2110 to generate a reconstructed block. The encoding unit 2109 is used for encoding various encoding parameters and quantized transform coefficients (quantized transform coefficients) into bitstream, and outputs the bitstream of the video signals. The encoded image buffer unit 2110 is used for storing reconstructed blocks as the reference blocks for intra-frame prediction. As the video image encoding progresses, new reconstructed blocks are continuously generated, and these blocks will be stored in the  encoded image buffer unit 2110.

[0099] The embodiment of the present application provides a video decoding system. As shown in FIG. 7, the video decoding system 220 is composed of multiple modules comprising 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.

[0100] The input signals of video frames are encoded by the video encoding system 210 to obtain an output bitstream. The video encoding system 210 transmits the bitstream to the video decoding system 220. The video decoding system 220 receives the bitstream representing the video frames in an encoded format (i.e., in a compressed format) . In the video decoding system 220, the bitstream is processed by the decoding unit 2201 to obtain decoded transform coefficients. The inverse transform and inverse quantization unit 2202 process the transform coefficients to generate a residual block in the pixel domain. The intra-frame prediction unit 2203 is operable to generate an intra-frame predicted block for a current video decoding block based on a determined intra-frame prediction mode and data from previously decoded blocks of the current video frame or picture. The motion compensation unit 2204 determines the inter-frame prediction information for the current video decoding block and generates an inter-frame predicted block by parsing the motion vector and other associated syntax elements. Finally, the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 2202 and the corresponding predicted block generated by the intra-frame prediction unit 2203 or the motion compensation unit 2204. In order to improve video quality, the decoded video blocks are filtered through the filtering unit 2205 to remove blocking artifacts. The decoded video block is then stored in the decoded image buffer unit 2206 as the reference block for subsequent intra-prediction or motion compensation, and for video output, i.e., to reproduce and reconstruct the original video signals.

[0101] The embodiments of the present application are mainly used for the intra-frame prediction unit 2103 of the video encoding system 210 and the intra-frame prediction unit 2203 of the video decoding system 220. If a better prediction effect can be obtained in the video encoding system 210 through the intra-frame prediction method provided by the embodiments of the present application, then the quality of video decoding and reconstruction can also be improved. The video decoding system 220 receives the bitstream representing the video frames. The bitstream includes the luma component of the video frame. The intra-frame prediction unit 2203 of the video decoding system 220 can thus obtain the luma component of the reference blocks and the luma component of the current block and calculate the Hamming difference and the weights accordingly. The intra-frame prediction unit 2203 can perform the same intra-frame prediction method as the intra-frame prediction unit 2103. An embodiment of the intra-frame prediction method is detailed in the following.

[0102] The data structure of a color image is illustrated in the following. As shown in FIG. 8, in a color image or a frame of a color video, the image or the frame usually consists of three color components, namely a luma component Y 301 and two chroma components Cb 302 and Cr 303. Each component is represented as a data matrix. The data matrix for each component is decomposed into blocks associated with specific encoding 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 positions 307 on a color image 300. In video encoding, the luma component is usually processed first, and then the chroma components are processed.

[0103] The luma component of a color image or a video frame has a higher resolution than any chroma component, with twice the number of pixels in both vertical and horizontal directions. In order to facilitate intra-frame prediction, the luma component is down-sampled to match the resolution of the chroma components in a process of intra-frame prediction, resulting in an equal number of pixels in both vertical and horizontal directions for all components. This down-sampling process ensures that the luma component can be efficiently processed during intra-frame prediction without compromising the quality of the chroma components.

[0104] The principle of cross-component intra-frame prediction is to use a reconstructed image area of one color component to predict an image area of another color component within the same image. As shown in FIG. 9, the current block 405 of any chroma component (which can be Cb or Cr) is about to be encoded, and at this time the current block 401 of the luma component Y corresponding to the same spatial position as current block 405 has been encoded and reconstructed. The reference blocks 402, 403, and 404 corresponding to current block 401 also correspond to the same spatial positions as the reference blocks 406, 407, and 408 corresponding to current block 405, and have been coded and reconstructed. The reference blocks 406, 407, and 408 may constitute a reference area 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 luma component and the reference blocks 406, 407, and 408 of the chroma component, and apply it to the current block 401 of the luma component to calculate a predicted value of the chroma component of the current block 405. Alternatively, a subset of the reference blocks 406, 407, and 408 may constitute a reference area of the current block 405.

[0105] FIG. 10 is a schematic diagram showing the intra-frame prediction method of an embodiment of the present application. As shown in FIG. 10, the method includes the following steps S501 to S505 executed by the video encoding system 210.

[0106] S501: Determining a reference area for the current block of the chroma component that needs to be encoded or decoded.

[0107] The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) determines a reference area for the current block of the chroma component that needs to be encoded or decoded. The reference area is usually an area within a range that has been coded and adjacent to where the current block is located, and the current block is an area where intra-frame prediction is required. For example, as shown in FIG. 11, the reference area is determined from adjacent blocks above and to the left of the current block C. For example, all the left block (L) , upper block (U) , lower left block (LL) , upper right block (UR) , and upper left block (UL) adjacent to the current block can be reference blocks of the current block. A reference area of the current block may be one of various combinations of the reference blocks. For example, the left block (L) , the lower left block (BL) , and the upper left block (UL) are selected as the reference area.

[0108] S502: Performing feature extraction on each pixel in the current block and the reference area.

[0109] As shown in FIG. 12, a pixel in the reference area is used as the current pixel and set as the center (C) , and spatial coordinates of the current pixel can be set as (0, 0) . The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) assigns coordinates to nearby pixels. Similar to Cartesian coordinates, the horizontal axis is represented by a first axis, movement towards the left from the center (0, 0) is considered as negative, while movement towards the right from the center  (0, 0) is deemed as positive. The vertical axis is represented by a second axis, movement in a downward direction from the center (0, 0) is considered as negative, while movement in an upward direction from the center (0, 0) is deemed as positive.

[0110] A luma value at a coordinate (x, y) can be denoted as Y (x, y) . To simplify the notation and make it easier to refer to the surrounding pixels, the eight neighboring pixels adjacent to the current pixel can be identified using cardinal directions. Specifically, the eight neighboring pixels in these directions can be represented by the following azimuth letters: North (N) , South (S) , West (W) , East (E) , Northwest (NW) , Northeast (NE) , Southwest (SW) , and Southeast (SE) .

[0111] When extracting features, the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) selects one or more characteristic values of the following feature types as elements of the feature vector:

[0112] (a) . a luma value of the current pixel,

[0113] (b) . one or more luma values of one or more nearby pixels,

[0114] (c) . a luma gradient value of the current pixel,

[0115] (d) . coordinates of the current pixel, and

[0116] (e) . the square of a luma value of the current pixel or a neighbor pixel at a nearby location.

[0117] wherein in calculating the first feature vectors, the current pixel is each reference pixel in each reference block; and

[0118] in calculating the second feature vectors, the current pixel is each target pixel in target block.

[0119] For example, eight values can be extracted to form a characteristic value set or a feature vector F in the following manner: F = [C  Y (-2, 0)  Y (2, 0)  Y (0, -2)  Y (0, 2)  Gx  Gy  C*C ]

[0120] Where C denotes a luma value of the current pixel;

[0121] Gx=|2*W+NW+SW-2*E-NE-SE|, Gy=|2*N+NW+NE-2*S-SW-SE|;

[0122] | | denotes absolute value; and

[0123] W, NW, SW, E, NE, SE, N, and S denote luma values of neighbor pixels of the current pixel in W, NW, SW, E, NE, SE, N, and S directions.

[0124] As another example, six numerical characteristic values can be extracted to form an characteristic value set or a feature vector F according to the definition: F = [C Gx Gy x y C*C ]

[0125] As another example, ten numerical characteristic values can be extracted to form a characteristic value set or a feature vector F according to the definition: F = [C Y (-3, 0) Y (3, 0) Y (0, -3) Y (0, 3) Gx Gy x y C*C ]

[0126] S503: Performing binarization on the extracted features with reference to the reference area.

[0127] Benchmark values are set for different types of character value (i.e., a feature vector element) for the binarization. The benchmark values are defined based on the reference area as a whole, a certain type of character value (i.e., a feature vector element) of all pixels in the whole reference area is calculated and used as a comparison benchmark for this type of character value (i.e., a feature vector element) .

[0128] As shown in FIG. 13, each characteristic value in the feature vector is compared with a corresponding benchmark value and binarized into a binary value.

[0129] For the extracted feature vector elements belonging to the feature types (a) and (b) , the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) uses the average value (marked as Mean) or a median of the luma values of all pixels within the reference area as the benchmark value.

[0130] For the extracted feature vector elements belonging to the feature type (c) , the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) uses a multiple T of the maximum value of a corresponding gradient of all pixels in the reference area as the benchmark value (denoted as TGX and TGY) . This multiple T is strictly greater than 0 and strictly less than 1.

[0131] For the extracted feature vector elements belonging to the feature type (d) , the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) uses the average value of corresponding coordinates of all pixels within the reference area as the benchmark value (dented as MX and MY) ;

[0132] For the extracted feature vector elements belonging to the feature type (e) , an average of squared luma values of all pixels that fall within the reference area (denoted as Mean MS) is used as the benchmark value.

[0133] After the benchmark value is determined, each vector element in the feature vector is binarized according to whether the vector element value is not less than the benchmark value. During the binarizing, among vector elements in the feature vectors (e.g., the first feature vectors and the second feature vectors) , a vector element not less than the benchmark value is binarized into binary 1, and a vector element less than the benchmark value is binarized into binary 0. Thus, a feature vector is converted into a binarized feature vector with the same number of elements, but the element value is 0 or 1.

[0134] S504: Calculating predicted values for all pixels of the current block to obtain a predicted block. Through the following two sub-steps, the predicted value of each pixel of the current block is calculated one by one, and the entire collection of the predicted values of all pixels of the current block forms the predicted block.

[0135] S504-1: Comparing the binary feature vectors of the reference area with the binary feature vectors of the current block and converting the difference into a weight.

[0136] For a binarized feature vector of a pixel in the reference area and a binarized feature vector of a pixel in the current block, the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) compares the two feature vectors to determine difference and reiterates such comparing for all pixels in the reference area and all pixels in the current block one by one. The difference between these two vectors is quantified and used to create a weight of the pixel in the reference area. The differences between these vectors of all pixels in the reference area and all pixels in the current block are then quantified and used to create weights that represent the degree of similarity between the two areas. This weight is used to predict the luma and chroma components of the current block relative to the reference area, which can then be used to efficiently encode and transmit the video frame. The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) calculates the difference value between the two feature vectors and converts the difference into a weight. Compared pixels are not required to have the same spatial position. For example, in a case where the reference area includes n pixels, and the current block contains m pixels, totally n*m comparisons are required.

[0137] The method used to calculate this difference value is called Hamming Distance, which is defined as the number of different elements of the two feature vectors. The Hamming distance can be obtained by an exclusive OR operation on the two feature vectors and counting a number of binary ones in a result of the exclusive OR operation. As shown in FIG. 14, an example shows Hamming distance of 3. When calculating the Hamming distance of two feature vectors, it is obtained by comparing every vector element of the two feature vectors and counting the number of different elements.

[0138] The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) derives Hamming distances between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel.

[0139] The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) generates a weight of each reference pixel in each reference block using its Hamming distance to a target pixel to be predicted to generate weights of reference pixels in the plurality of reference blocks. The generated weights are applicable for generating predicted chroma values of target pixels in the target block from chroma values of reference pixels in the plurality of reference blocks. The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) may utilize a monotone non-increasing function to convert the Hamming distance into weights of reference pixels. For example, a Hamming distance is denoted as H, and a weight of a reference pixel is denoted as W. The monotone non-increasing function may be defined as:

[0140] As another example, the monotone non-increasing function may be defined as:

[0141] As another example, the monotone non-increasing function may be defined as: W=2-H       (3)

[0142] Note that the monotone non-increasing function is not limited to the formulas. For example, the monotone non-increasing function may be defined as:

[0143] the weight of the reference pixel is zero when the Hamming distance of the reference pixel is greater than or equal to a predetermined value; and

[0144] the weight of the reference pixel is one when the Hamming distance of the reference pixel is less than a predetermined value.

[0145] The predetermined value may be a number other than 3 in the formula (1) .

[0146] S504-2: Calculating the predicted value of pixels of the current block according to the weights and the chroma values of pixels in the reference area.

[0147] The weighted average of pixels in the reference area is used to calculate the predicted value. That is, the value of the corresponding chroma component of each pixel in the reference area is multiplied by the weight to output products, and the sum of the products for all pixels is divided by the sum of all weights to generate the weighted average.

[0148] In particular, for reference pixels 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, and such pixels in the target block is temporarily referred to as blank pixels. After calculation of the predicted chroma values of all pixels in the current block is completed, the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) may calculate the average value of all predicted chroma values and use the average value as the predicted chroma value of the aforementioned blank pixels. More specifically, if all pixels of the current block are unpredictable, the average value of the chroma values of all pixels within the reference area is used as the prediction value of the predicted chroma values of all the blank pixels of the current block. Because the weights are zeros, the predicted chroma values of blank pixels of the current block are the average value of the chroma values of all pixels within the reference area rather than a weighted average.

[0149] S505: Executing multiple runs of the steps S501-S504 based on different subsets of reference blocks to generate predicted blocks, calculating for each predicted block the difference with the current block, and selecting one predicted block as the final predicted block.

[0150] The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) performs the chroma prediction for the target block based on different subsets of reference blocks in the plurality of reference blocks to form different predicted blocks of the target block from the different subsets of reference blocks. The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) selects one predicted block from the different predicted blocks of the target block as a final predicted block of the target block.

[0151] The intra-frame prediction unit 2103 outputs the final predicted block of the target block to a next stage (e.g., the subtractor 2112) in the encoder. The intra-frame prediction unit 2203 outputs the final predicted block of the target block to a next stage (e.g., the synthesizer 2212) in the decoder. The selecting one predicted block from the different predicted blocks of the target block as the final predicted block may be based on a difference between each predicted block and the target block.

[0152] There are multiple reference blocks. The intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) may take a subset of reference blocks to form the reference area. Then go through the process, and finally calculate a predicted block. For each of the different subsets of reference blocks, the steps S501-S504 for chroma prediction are performed to generate a predicted block. Finally, different predicted blocks are compared with the original data, and the optimal predicted block is selected.

[0153] In calculating the difference between the predicted block and the current block, the difference may be a sum of absolute errors. Specifically, the intra-frame prediction unit (e.g., intra-frame prediction unit 2103 and / or intra-frame prediction unit 2203) obtains the absolute value of the difference between the corresponding predicted value and the original value of each pixel in the current block, and calculates the sum of the absolute errors on all pixels.

[0154] When the predicted block with the smallest difference value is selected, a corresponding selection scheme for determining the reference area (i.e., the subset of reference blocks) is encoded into the bitstream, and then the intra-frame prediction is completed. For example, the encoding unit 2109 encodes a residual block and the corresponding selection scheme for determining the reference area into the bitstream.

[0155] The video decoding system 200 receives the bitstream and decodes the bitstream to obtain the residual block, the weights, and the corresponding selection scheme. In performing intra-frame prediction  for each current block in the video frame of the bitstream, the intra-frame prediction unit 2203 uses the corresponding selection scheme to obtain the subset of reference blocks as the reference area and use the weights and chroma values of pixels in the reference area to reconstruct and reproduce the predicted block (i.e., the final predicted block) of the current block. The details of generating the predicted block of the current block from the weights and chroma values of pixels in the reference area are the same as the intra-frame prediction unit 2103. The inverse transform and inverse quantization unit 2202 perform inverse transform and inverse quantization on the encoded residual block to generate the residual block. The synthesizer 2212 synthesizes the final predicted block and the residual block to generate decoded video block. The decoded video blocks are filtered through the filtering unit 2205 to remove blocking artifacts. The decoded video block is then stored in the decoded image buffer unit 2206 as the reference block for subsequent intra-prediction or motion compensation, and for video output, i.e., to reproduce and reconstruct the original video signals.

[0156] FIG. 15 is a block diagram of an example system 700 for communication according to an embodiment of the present disclosure. Embodiments described herein may be implemented into the system using any suitably configured hardware and / or software. FIG. 15 illustrates the system 700 including a radio frequency (RF) circuitry 710, a baseband circuitry 720, a processing unit 730, a memory / storage 740, a display 750, a camera 760, a sensor 770, and an input / output (I / O) interface 780, coupled with each other as illustrated.

[0157] The processing unit 730 may include circuitry, such as, but not limited to, one or more single-core or multi-core processors. The processors may include any combination of general-purpose processors and dedicated processors, such as graphics processors and application processors. The processors may be coupled with the memory / storage and configured to execute instructions stored in the memory / storage to enable various applications and / or operating systems running on the system.

[0158] The baseband circuitry 720 may include circuitry, such as, but not limited to, one or more single-core or multi-core processors. The processors may include a baseband processor. The baseband circuitry may handle various radio control functions that enable communication with one or more radio networks via the RF circuitry. The radio control functions may include, but are not limited to, signal modulation, encoding, decoding, radio frequency shifting, etc. In some embodiments, the baseband circuitry may provide for communication compatible with one or more radio technologies. For example, in some embodiments, the baseband circuitry may support communication with 5G NR, LTE, an evolved universal terrestrial radio access network (EUTRAN) and / or other wireless metropolitan area networks (WMAN) , a wireless local area network (WLAN) , a wireless personal area network (WPAN) . Embodiments in which the baseband circuitry is configured to support radio communications of more than one wireless protocol may be referred to as multi-mode baseband circuitry. In various embodiments, the baseband circuitry 720 may include circuitry to operate with signals that are not strictly considered as being in a baseband frequency. For example, in some embodiments, baseband circuitry may include circuitry to operate with signals having an intermediate frequency, which is between a baseband frequency and a radio frequency.

[0159] The RF circuitry 710 may enable communication with wireless networks using modulated electromagnetic radiation through a non-solid medium. In various embodiments, the RF circuitry may include switches, filters, amplifiers, etc. to facilitate communication with the wireless network. In various embodiments, the RF circuitry 710 may include circuitry to operate with signals that are not strictly  considered as being in a radio frequency. For example, in some embodiments, RF circuitry may include circuitry to operate with signals having an intermediate frequency, which is between a baseband frequency and a radio frequency.

[0160] In various embodiments, the transmitter circuitry, control circuitry, or receiver circuitry discussed above with respect to the UE, eNB, or gNB may be embodied in whole or in part in one or more of the RF circuitries, the baseband circuitry, and / or the processing unit. As used herein, “circuitry” may refer to, be part of, or include an Application Specific Integrated Circuit (ASIC) , an electronic circuit, a processor (shared, dedicated, or group) , and / or memory (shared, dedicated, or group) that execute one or more software or firmware programs, a combinational logic circuit, and / or other suitable hardware components that provide the described functionality. In some embodiments, the electronic device circuitry may be implemented in, or functions associated with the circuitry may be implemented by, one or more software or firmware modules. In some embodiments, some or all of the constituent components of the baseband circuitry, the processing unit, and / or the memory / storage may be implemented together on a system on a chip (SOC) .

[0161] The memory / storage 740 may be used to load and store data and / or instructions, for example, for the system. The memory / storage for one embodiment may include any combination of suitable 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 designed to enable user interaction with the system and / or peripheral component interfaces designed to enable peripheral component interaction with the system. User interfaces may include, but are not limited to a physical keyboard or keypad, a touchpad, a speaker, a microphone, etc. Peripheral component interfaces may include, but are not limited to, a non-volatile memory port, a universal serial bus (USB) port, an audio jack, and a power supply interface.

[0162] In various embodiments, the sensor 770 may include one or more sensing devices to determine environmental conditions and / or location information related to the system. In some embodiments, the sensors may include, but are not limited to, a gyro 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, the baseband circuitry and / or RF circuitry to communicate with components of a positioning network, e.g., a global positioning system (GPS) satellite. In various embodiments, the display 750 may include a display, such as a liquid crystal display and a touch screen display. In various embodiments, the system 700 may be a mobile computing device such as, but not limited to, a laptop computing device, a tablet computing device, a netbook, an ultrabook, a smartphone, etc. In various embodiments, the system may have more or less components, and / or different architectures. Where appropriate, 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-transitory storage medium.

[0163] The embodiment of the present disclosure is a combination of techniques / processes that may be adopted in 3GPP specification to create an end product.

[0164] A person having ordinary skill in the art understands that each of the units, algorithms, and steps described and disclosed in the embodiments of the present disclosure are realized using electronic hardware or combinations of software for computers and electronic hardware. Whether the functions run in hardware or software depends on the condition of the application and design requirement for a technical plan. A person having ordinary skill in the art may use different ways to realize the function for each specific  application while such realizations should not go beyond the scope of the present disclosure. It is understood by a person having ordinary skill in the art that he / she may refer to the working processes of the system, device, and unit in the above-mentioned embodiment since the working processes of the above-mentioned system, device, and unit are basically the same. For easy description and simplicity, these working processes will not be detailed.

[0165] It is understood that the disclosed system, device, and method in the embodiments of the present disclosure may be realized in other ways. The above-mentioned embodiments are exemplary only. The division of the units is merely based on logical functions while other divisions exist in realization. It is possible that a plurality of units or components are combined or integrated into another system. It is also possible that some characteristics are omitted or skipped. On the other hand, the displayed or discussed mutual coupling, direct coupling, or communicative coupling operate through some ports, devices, or units whether indirectly or communicatively by ways of electrical, mechanical, or other kinds of forms.

[0166] The units as separating components for explanation are or are not physically separated. The units for display are or are not physical units, that is, located in one place or distributed on a plurality of network units. Some or all of the units are used according to the purposes of the embodiments. Moreover, each of the functional units in each of the embodiments may be integrated into one processing unit, physically independent, or integrated into one processing unit with two or more than two units.

[0167] If the software function unit is realized and used and sold as a product, it may be stored in a readable storage medium in a computer. Based on this understanding, the technical plan proposed by the present disclosure may be essentially or partially realized as the form of a software product. Or, one part of the technical plan beneficial to the conventional technology may be realized as the form of a software product. The software product in the computer is stored in a storage medium, including a plurality of commands for a computational device (such as a personal computer, a server, or a network device) to run all or some of the steps disclosed by the embodiments of the present disclosure. The storage medium includes a USB disk, a mobile hard disk, a read-only memory (ROM) , a random-access memory (RAM) , a floppy disk, or other kinds of media capable of storing program codes.

[0168] Embodiments of the disclosure provide intra-frame prediction based on discrete correlation of pixels. The intra-frame prediction method realizes cross-component prediction using a discrete correlation of pixels. Features of pixels in a reference area and features of pixels in a current block are binarized and converted into binary feature vectors and are compared for the difference. The binary feature vectors reduce computation complexity, time consumption, and power consumption. The difference is represented by Hamming distances and converted into weights for intra-frame prediction from the pixel chroma values of the reference area to pixel chroma values of the current block. The weights implicitly realize the discrete correlation of pixels. A plurality of predicted blocks of the current block are thus generated based on different sets of reference blocks. One predicted block with the least difference to the chroma component of the current block is selected as the final predicted block for intra-frame prediction. A scheme of selecting a set of reference blocks from which the final predicted block is generated is encoded into a bitstream carrying the video frame as a result of the intra-frame prediction. The weights and a residual block are also encoded into the bitstream.

[0169] While the present disclosure has been described in connection with what is considered the most practical and preferred embodiments, it is understood that the present disclosure is not limited to the  disclosed embodiments but is intended to cover various arrangements made without departing from the scope of the broadest interpretation of the appended claims.

Claims

1.An intra-frame prediction method for execution by an image encoder or an image decoder, comprising:obtaining, in a video frame, a target block to be encoded and a plurality of reference blocks;selecting a subset from the plurality of reference blocks as a reference area;calculating a first feature vector of each reference pixel in each reference block within each reference area to obtain first feature vectors of the reference block and calculating a second feature vector of each target pixel in target block to obtain second feature vectors of the target block;binarizing the first feature vectors and the second feature vectors based on benchmark values of all pixels of each reference area;deriving Hamming distances between the binarized first feature vector of each reference pixel and the binarized second feature vector of each target pixel;generating a weight of each reference pixel in each reference block using a Hamming distance of the reference pixel;performing chroma prediction for the target block based on each reference area using weights of the reference area for the target block to obtain a chroma prediction block corresponding to each reference area; andselecting, from all chroma prediction blocks, the best candidate.2.The intra-frame prediction method of claim 1, wherein through the generating of the weight of each reference pixel in each reference block using a Hamming distance of the reference pixel from the reference pixel to a target pixel to be predicted in the target block, weights of reference pixels in the reference area are generated for the target pixel; andthrough the generating of the weights of reference pixels in the reference area for each target pixels in the target block, weights of reference pixels in the reference area are generated for the all target pixels in the target block;wherein the generated weights are applicable for generating predicted chroma values of target pixels in the target block from chroma values of reference pixels in the reference area.3.The intra-frame prediction method of claim 1, wherein the chroma prediction based on the reference area comprises generating a predicted chroma value of each target pixel in the target block using a weighted average of chroma values of reference pixels in the reference area based on the generated weights of the reference area to form a predicted block having predicted chroma values of all the target pixels of the target block.4.The intra-frame prediction method of claim 1, wherein the deriving Hamming distances comprises deriving, for each target pixel in the target block, the Hamming distance between all the reference pixels in the reference area and the target pixel.5.The intra-frame prediction method of claim 1, wherein the Hamming distance is obtained by an exclusive OR operation on the binarized first feature vector of each reference pixel and the binarized second feature vector and counting a number of binary ones in a result of the exclusive OR operation.6.The intra-frame prediction method of claim 1, further comprising:performing the chroma prediction for the target block based on different subsets of reference blocks in the reference area to form different predicted blocks of the target block from the different subsets of reference blocks;selecting one predicted block from the different predicted blocks of the target block as a final predicted block of the target block; andoutputting the final predicted block of the target block to a next stage in the encoder.7.The intra-frame prediction method of claim 6, further comprising:selecting one predicted block from the different predicted blocks of the target block as the final predicted block based on a difference between each predicted block and the target block.8.The intra-frame prediction method of claim 6, wherein when the predicted block with a minimum difference value is selected, a corresponding selection scheme for determining the subset of reference blocks is encoded in a bitstream carrying the video frame.9.The intra-frame prediction method of claim 6, further comprising:using a monotone non-increasing function to generate the weight of each reference pixel in each reference block from the Hamming distance.10.The intra-frame prediction method of claim 9, wherein the monotone non-increasing function is defined as:the weight of the reference pixel is zero when the Hamming distance of the reference pixel is greater than or equal to a predetermined value; andthe weight of the reference pixel is one when the Hamming distance of the reference pixel is less than a predetermined value.11.The intra-frame prediction method of claim 9, wherein the monotone non-increasing function is defined as:the weight of the reference pixel is a reciprocal of one plus the Hamming distance of the reference pixel.12.The intra-frame prediction method of claim 9, wherein the monotone non-increasing function is defined as:the weight of the reference pixel is a reciprocal of an exponential function of base two raised to the power H, wherein H represents the Hamming distance of the reference pixel.13.The intra-frame prediction method of claim 1, wherein each of the first feature vector and the second feature vector comprises one or more vector elements of the following feature types:(a) . a luma value of a current pixel,(b) . one or more luma values of one or more nearby pixels,(c) . a luma gradient value of the current pixel,(d) . a coordinate of the current pixel, and(e) . a square of a luma value of the current pixel or a neighbor pixel at a nearby location;wherein in calculating the first feature vectors, the current pixel is each reference pixel in each reference block;in calculating the second feature vectors, the current pixel is each target pixel in target block.14.The intra-frame prediction method of claim 13, wherein during the binarizing, among vector elements in the first feature vectors and the second feature vectors, a vector element not less than the benchmark value is binarized into binary 1, and a vector element less than the benchmark value is binarized into binary 0.15.The intra-frame prediction method of claim 14, wherein for feature vector elements belonging to the feature types (a) and (b) , an average value or a median of the luma values of all pixels within a reference area is set as the benchmark value.16.The intra-frame prediction method of claim 14, wherein for feature vector elements belonging to the feature type (c) , a multiple T of the maximum value of a corresponding gradient of all pixels in the reference area is used as the benchmark value.17.The intra-frame prediction method of claim 14, wherein for feature vector elements belonging to the feature type (d) , average values of corresponding coordinates of all pixels within a reference area are used as the benchmark value.18.The intra-frame prediction method of claim 14, wherein for feature vector elements belonging to the feature type (e) , an average of squared luma values of all pixels that fall within a reference area is used as the benchmark value.19.An electronic device comprising:a processor configured to call and run a computer program stored in a memory, to cause a device in which the processor is installed to execute the method of any of claims 1 to 18.20.An encoder chip, comprising:a processor, configured to call and run a computer program stored in a memory, to cause a device in which the chip is installed to execute the method of any of claims 1 to 18.21.An decoder chip, comprising:a processor, configured to call and run a computer program stored in a memory, to cause a device in which the chip is installed to execute the method of any of claims 1 to 18.22.A computer-readable storage medium, in which a computer program is stored, wherein the computer program causes a computer to execute the method of any of claims 1 to 18.23.A computer program product, comprising a computer program, wherein the computer program causes a computer to execute the method of any of claims 1 to 18.24.A computer program, wherein the computer program causes a computer to execute the method of any of claims 1 to 18.

Citation Information

Patent Citations

  • Image coding method, image decoding method and related device

    CN113497937A

  • Method and Apparatus for Comparing Two Blocks of Pixels

    US20150296207A1

  • Method and apparatus for video coding

    US20190349592A1

  • Image encoding device, image decoding device, and program

    US20210014501A1

  • Chroma samples from luma samples prediction for video coding

    US20220191526A1