Method and electronic device for video decoding

By identifying adjacent blocks of video blocks and their MBIP patterns and converting them into regular intra prediction mode, the complexity and storage requirements of MBIP patterns in hardware/software implementation are solved, and more efficient video encoding and decoding is achieved.

CN118488193BActive Publication Date: 2025-03-18BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410574951.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-04-10
Filing Date
2020-04-09
Publication Date
2025-03-18
Estimated Expiration
2040-04-09

AI Technical Summary

Technical Problem

The existing matrix-based intra-prediction (MBIP) mode faces complex lookup table operations and a large number of storage requirements in hardware/software implementations.

Method used

By identifying adjacent blocks of the current block and their associated MBIP patterns, and determining the corresponding conventional intra prediction mode according to the predefined mathematical relationship between the conventional intra prediction mode and the MBIP mode, inserting it into the list of most likely mode candidates.

Benefits of technology

Simplifies the hardware/software implementation of the MBIP mode, reduces storage requirements, and improves encoding and decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118488193B_ABST
    Figure CN118488193B_ABST
Patent Text Reader

Abstract

A method and an electronic device for video encoding are provided. The electronic device performs a method for updating a most probable mode candidate list for a current block of video data. The electronic device first identifies neighboring blocks located at predefined positions relative to the current block and their associated matrix-based intra-frame prediction modes. Next, the electronic device determines a conventional intra-frame prediction mode corresponding to the matrix-based intra-frame prediction mode for the neighboring block based on a predefined mathematical relationship between the conventional intra-frame prediction mode and the matrix-based intra-frame prediction mode. Finally, the electronic device inserts the conventional intra-frame prediction mode associated with the neighboring block into the most probable mode candidate list according to a predefined order. If the conventional intra-frame prediction mode is signaled in the semantics of the video bitstream including the current block, the video decoder predicts the current block from the reconstructed neighboring blocks according to the conventional intra-frame prediction mode.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention application with application number 202080028123.X, application date April 9, 2020, and title “Video encoding and decoding method and device using improved matrix-based intra-frame prediction encoding and decoding mode”. Technical Field

[0002] The present application relates generally to video data encoding and decoding, and in particular, to methods and systems for video encoding and decoding using a matrix-based intra prediction (MBIP) encoding and decoding mode. Background Art

[0003] Various electronic devices (such as digital televisions, laptop or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc.) support digital video. Electronic devices transmit, receive, encode, decode and / or store digital video data by implementing video compression / decompression standards defined by MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Codec (AVC), High Efficiency Video Codec (HEVC) and General Video Codec (VVC) standards. Video compression typically includes performing spatial (intra-frame) prediction and / or temporal (inter-frame) prediction to reduce or remove the redundancy inherent in video data. For block-based video coding, a video frame is divided into one or more slices, each with multiple video blocks, which may also be referred to as codec tree units (CTUs). Each CTU may contain a codec unit (CU), or may be recursively divided into smaller CUs until a predefined minimum CU size is reached. Each CU (also called a leaf-CU) contains one or more transform units (TUs), and each CU also contains one or more prediction units (PUs). Each CU can be coded in intra mode, inter mode, or IBC mode. Video blocks in an intra-coded (I) slice of a video frame are encoded using spatial predictions of reference samples in neighboring blocks within the same video frame. Video blocks in an inter-coded (P or B) slice of a video frame can use spatial predictions of reference samples in neighboring blocks within the same video frame, or temporal predictions of reference samples in other previous and / or future reference video frames.

[0004] A prediction block for the current video block to be coded is derived based on spatial prediction or temporal prediction of previously coded reference blocks (e.g., neighboring blocks). The process of finding the reference block can be accomplished by a block matching algorithm. The residual data representing the pixel differences between the current block to be coded and the prediction block is called a residual block or prediction error. Inter-coded blocks are coded according to a motion vector and a residual block, which points to a reference block in a reference frame that forms the prediction block. The process of determining a motion vector is generally referred to as motion estimation. Intra-coded blocks are coded according to an intra-prediction mode and a residual block. For further compression, the residual block is transformed from the pixel domain to a transform domain (e.g., frequency domain) to derive residual transform coefficients, which can then be quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, can be scanned to produce a one-dimensional vector of transform coefficients and then entropy encoded into a video bitstream to achieve even greater compression.

[0005] The coded video bitstream is then stored in a computer-readable storage medium (e.g., a flash memory) to be accessed by another electronic device with digital video capabilities or sent directly to the electronic device by wire or wirelessly. The electronic device then performs video decompression (which is the reverse process of the video compression described above), for example, by parsing the coded video bitstream to obtain semantic elements from the bitstream, and reconstructing digital video data from the coded video bitstream to its original format based at least in part on the semantic elements obtained from the bitstream, and the electronic device presents the reconstructed digital video data on a display of the electronic device.

[0006] As digital video quality changes from HD to 4K×2K or even 8K×4K, the amount of video data to be encoded / decoded increases exponentially. How to encode / decode video data more efficiently while maintaining the image quality of the decoded video data is a long-standing challenge.

[0007] For example, conventional intra prediction modes perform angular prediction on the current codec block by directly copying or interpolating with reference to reconstructed pixels from neighboring blocks. As a result, the predicted samples using conventional intra prediction modes have limited freedom of pixel value variation, especially along the prediction direction. In order to further improve the coding efficiency, a matrix-based intra prediction (MBIP) mode is introduced by applying a linear matrix transformation to the reconstructed pixels in the neighboring blocks to predict the samples of the current codec block. However, the current implementation of MBIP poses new challenges to the hardware / software implementation, such as the need for complex lookup table operations between codec blocks using different types of intra prediction methods, and a large amount of space (especially on-chip) is occupied to store the matrix coefficients. Summary of the invention

[0008] The present application describes embodiments related to video data encoding and decoding, and more particularly, the embodiments relate to systems and methods for video encoding and decoding using an improved matrix-based intra prediction (MBIP) codec mode.

[0009] According to a first aspect of the present application, a method for updating a most probable mode candidate list for a current block of video data is performed at an electronic device having one or more processing units and a memory storing a plurality of programs to be executed by the one or more processing units. The method includes: identifying neighboring blocks located at predefined positions relative to the current block and their associated matrix-based intra-frame prediction modes; determining a conventional intra-frame prediction mode corresponding to the matrix-based intra-frame prediction mode for the neighboring block according to a predefined mathematical relationship between the conventional intra-frame prediction mode and the matrix-based intra-frame prediction mode; and inserting the conventional intra-frame prediction mode associated with the neighboring block into the most probable mode candidate list according to a predefined order.

[0010] According to a second aspect of the present application, an electronic device includes one or more processing units, a memory, and a plurality of programs stored in the memory. When the programs are executed by the one or more processing units, the electronic device performs the method of updating the most probable mode candidate list for a current block of video data as described above.

[0011] According to a third aspect of the present application, a non-transitory computer-readable storage medium stores a plurality of programs for execution by an electronic device having one or more processing units. When these programs are executed by the one or more processing units, the electronic device executes the method of updating the most probable mode candidate list for the current block of video data as described above.

[0012] According to a fourth aspect of the present application, a method for predicting a current block of video data using matrix-based intra-frame prediction is performed at an electronic device, the electronic device having one or more processing units and a memory storing multiple programs to be executed by the one or more processing units. The method includes: identifying one or more neighboring blocks relative to the current block; selecting a matrix-based intra-frame prediction mode for predicting the current block from multiple matrix-based intra-frame prediction modes; retrieving coefficients of a matrix and a bias vector corresponding to the selected matrix-based intra-frame prediction mode from a storage device; and performing matrix-based intra-frame prediction on the identified one or more neighboring blocks using the coefficients of the retrieved matrix and bias vector.

[0013] According to a fifth aspect of the present application, an electronic device includes one or more processing units, a memory, and a plurality of programs stored in the memory. When the programs are executed by the one or more processing units, the electronic device performs the method of predicting a current block of video data using matrix-based intra-frame prediction as described above.

[0014] According to a sixth aspect of the present application, a non-transitory computer-readable storage medium stores a plurality of programs for execution by an electronic device having one or more processing units. When these programs are executed by one or more processing units, the electronic device performs the method of predicting a current block of video data using matrix-based intra-frame prediction as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of the specification, illustrate the described embodiments and together with the description serve to explain the basic principles. Like reference numerals designate corresponding parts.

[0016] Figure 1 is a block diagram illustrating an exemplary video encoding and decoding system according to some embodiments of the present disclosure.

[0017] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0018] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0019] FIG. 4A to FIG. 4D is a block diagram illustrating how to recursively quadtree partition a frame into multiple video blocks of different sizes according to some embodiments of the present disclosure.

[0020] Figure 5A is a block diagram illustrating 67 candidate intra prediction modes for predicting a current codec block based on reconstructed neighboring blocks according to some embodiments of the present disclosure.

[0021] Figure 5B is a block diagram illustrating exemplary positions of five reconstructed neighboring blocks of a current coding block according to some embodiments of the present disclosure.

[0022] Fig. 6A and Figure 6B is a block diagram illustrating two matrix-based intra prediction schemes for codec blocks of different sizes according to some embodiments of the present disclosure.

[0023] Figure 7is a flow chart illustrating an exemplary process by which a video codec implements a technique for generating a Most Probable Mode (MPM) candidate list according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0024] Reference will now be made in detail to specific embodiments, examples of which are illustrated in the accompanying drawings. In the following detailed description, numerous non-limiting specific details are set forth to aid in understanding the subject matter presented herein. However, it will be apparent to one of ordinary skill in the art that various alternatives may be used without departing from the scope of the claims, and that the subject matter may be practiced without these specific details. For example, it will be apparent to one of ordinary skill in the art that the subject matter presented herein may be implemented on many types of electronic devices having digital video capabilities.

[0025] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown in , system 10 includes a source device 12 that generates and encodes video data to be later decoded by a destination device 14. Source device 12 and destination device 14 may include any of a wide variety of electronic devices, including desktop or laptop computers, tablet computers, smart phones, set-top boxes, digital televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some implementations, source device 12 and destination device 14 are equipped with wireless communication capabilities.

[0026] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium that enables the source device 12 to send the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated according to a communication standard (such as a wireless communication protocol) and sent to the target device 14. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network (such as a local area network, a wide area network, or a global network, such as the Internet). The communication medium may include a router, a switch, a base station, or any other equipment that may be beneficial to facilitate communication from the source device 12 to the target device 14.

[0027] In some other embodiments, the encoded video data may be sent from the output interface 22 to the storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a DVD, a CD-ROM, a flash memory, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In another example, the storage device 32 may correspond to a file server or another intermediate storage device that can hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and sending the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), an FTP server, a network attached storage (NAS) device, or a local disk drive. The target device 14 can access the encoded video data through any standard data connection suitable for accessing the encoded video data stored on the file server, including a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, cable modem, etc.), or a combination of both wireless channels and wired connections. The transmission of the encoded video data from the storage device 32 can be a streaming transmission, a download transmission, or a combination of both.

[0028] like Figure 1 As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as or a combination of such sources: a video capture device (e.g., a camera), a video archive containing previously captured video, a video feed interface for receiving video from a video content provider, and / or a computer graphics system for generating computer graphics data as source video. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in the present application may be generally applicable to video encoding and decoding, and may be applied to wireless applications and / or wired applications.

[0029] The captured, pre-captured or computer-generated video may be encoded by the video encoder 20. The encoded video data may be sent directly to the target device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device 32 for later access by the target device 14 or other devices for decoding and / or playback. The output interface 22 may further include a modem and / or a transmitter.

[0030] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various semantic elements generated by video encoder 20 for use by video decoder 30 in decoding the video data. Such semantic elements may be included in the encoded video data sent on the communication medium, stored on the storage medium, or stored on a file server.

[0031] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0032] The video encoder 20 and the video decoder 30 may operate according to a proprietary standard or an industry standard (such as VVC, HEVC, MPEG-4, Part 10, Advanced Video Codec AVC) or an extension of such a standard. It should be understood that the present application is not limited to a specific video codec / decoding standard and may be applicable to other video codec / decoding standards. It is generally believed that the video encoder 20 of the source device 12 may be configured to encode video data according to any of these current standards or future standards. Similarly, it is also generally believed that the video decoder 30 of the target device 14 may be configured to decode video data according to any of these current standards or future standards.

[0033] The video encoder 20 and the video decoder 30 may each be implemented as any of a variety of suitable encoder circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When implemented partially in software, the electronic device may store instructions for the software in a suitable non-transitory computer-readable medium, and use one or more processors to execute the instructions in the hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in a corresponding device.

[0034] Figure 2is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described herein. The video encoder 20 may perform intra-frame prediction codec and inter-frame prediction codec for video blocks within a video frame. Intra-frame prediction codecs rely on spatial prediction to reduce or remove spatial redundancy in video data within a given video frame or picture. Inter-frame prediction codecs rely on temporal prediction to reduce or remove temporal redundancy in video data within adjacent video frames or pictures of a video sequence.

[0035] like Figure 2 As shown in FIG. 1 , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a segmentation unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A deblocking filter (not shown) may be located between the adder 62 and the DPB 64 to filter the block boundaries to remove block effects from the reconstructed video. In addition to the deblocking filter, a loop filter (not shown) may also be used to filter the output of the adder 62. The video encoder 20 may take the form of a fixed or programmable hardware unit, or may be dispersed in one or more of the fixed or programmable hardware units shown.

[0036] Video data memory 40 may store video data to be encoded by components of video encoder 20. The video data in video data memory 40 may be obtained, for example, from video source 18. DPB 64 is a buffer that stores reference video data for use by video encoder 20 (e.g., in intra-frame or inter-frame prediction codec mode) when encoding video data. Video data memory 40 and DPB 64 may be formed by any of a variety of memory devices. In various examples, video data memory 40 may be on-chip with other components of video encoder 20, or off-chip relative to those components.

[0037] like Figure 2As shown in , after receiving the video data, the segmentation unit 45 within the prediction processing unit 41 segments the video data into video blocks. This segmentation may also include segmenting the video frame into slices, tiles, or other larger codec units (CUs) according to a predefined partitioning structure associated with the video data (such as a quadtree structure). The video frame may be divided into a plurality of video blocks (or a set of video blocks referred to as tiles). The prediction processing unit 41 may select one of a plurality of possible prediction codec modes for the current video block based on error results (e.g., codec rate and distortion level), such as one of one or more inter-frame prediction codec modes in a plurality of intra-frame prediction codec modes. The prediction processing unit 41 may provide the resulting intra-frame prediction codec block or inter-frame prediction codec block to the adder 50 to generate a residual block, and to the adder 62 to reconstruct the coding block for subsequent use as part of a reference frame. The prediction processing unit 41 also provides semantic elements (such as motion vectors, intra-frame mode indicators, segmentation information, and other such semantic information) to the entropy coding unit 56.

[0038] To select an appropriate intra-prediction codec mode for the current video block, intra-prediction processing unit 46 within prediction processing unit 41 may perform intra-prediction codec of the current video block relative to one or more neighboring blocks in the same frame as the current block to be coded to provide spatial prediction. Motion estimation unit 42 and motion compensation unit 44 within prediction processing unit 41 may perform inter-prediction codec of the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. Video encoder 20 may perform multiple codec passes, for example, to select an appropriate codec mode for each block of video data.

[0039] In some embodiments, motion estimation unit 42 determines the inter-prediction mode for the current video frame by generating a motion vector according to a predetermined pattern within a sequence of video frames, the motion vector indicating the displacement of a prediction unit (PU) of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by motion estimation unit 42 is the process of generating motion vectors, which estimate the motion of video blocks. The motion vector may, for example, indicate the displacement of a PU of a video block within a current video frame or picture relative to a prediction block within a reference frame (or other codec unit), the prediction block being relative to a current block being encoded within the current frame (or other codec unit). The predetermined pattern may designate video frames in the sequence as P frames or B frames. Intra BC unit 48 may determine vectors (e.g., block vectors) for intra BC encoding in a manner similar to the determination of motion vectors by motion estimation unit 42 for inter prediction, or may utilize motion estimation unit 42 to determine block vectors.

[0040] A prediction block is a block of a reference frame that is considered to closely match the PU of the video block to be coded in terms of pixel differences, which may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate values ​​for sub-integer pixel positions of the reference frame stored in the DPB 64. For example, the video encoder 20 may interpolate values ​​for quarter-pixel positions, eighth-pixel positions, or other fractional pixel positions of the reference frame. Thus, the motion estimation unit 42 may perform a motion search relative to the full pixel positions and the fractional pixel positions, and output a motion vector with fractional pixel precision.

[0041] Motion estimation unit 42 calculates a motion vector for a PU of a video block in an inter-prediction codec frame by comparing the position of the PU with the position of a prediction block of a reference frame selected from a first reference frame list (list 0) or a second reference frame list (list 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0042] Motion compensation performed by motion compensation unit 44 may involve extracting or generating a prediction block based on the motion vector determined by motion estimation unit 42. Upon receiving the motion vector for the PU of the current video block, motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, retrieve the prediction block from DPB 64, and forward the prediction block to adder 50. Adder 50 then forms a residual video block of pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by motion compensation unit 44 from the pixel values ​​of the current video block being encoded and decoded. The pixel difference values ​​forming the residual video block may include a luma difference component or a chroma difference component or both. Motion compensation unit 44 may also generate semantic elements associated with the video block of the video frame for use by video decoder 30 when decoding the video block of the video frame. The semantic elements may include, for example, semantic elements defining a motion vector for identifying a prediction block, any flag indicating a prediction mode, or any other semantic information described herein. Note that motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are described separately for conceptual purposes.

[0043] In some embodiments, the intra BC unit 48 may generate vectors and extract prediction blocks in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but these prediction blocks are in the same frame as the current block being encoded and decoded, and these vectors are referred to as block vectors rather than motion vectors. Specifically, the intra BC unit 48 may determine the intra prediction mode to be used to encode the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test their performance through rate-distortion analysis. Next, the intra BC unit 48 may select a suitable intra prediction mode to use from among the various tested intra prediction modes, and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate rate-distortion values ​​for various tested intra prediction modes using rate-distortion analysis, and select an intra prediction mode with the best rate-distortion characteristics from among the tested modes as a suitable intra prediction mode to use. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original uncoded block that was encoded to produce the coded block, and the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate ratios from the distortions and rates for the various coded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0044] In other examples, intra BC unit 48 may use, in whole or in part, motion estimation unit 42 and motion compensation unit 44 to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by sum of absolute differences (SAD), sum of square differences (SSD), or other difference metrics, and identification of the prediction block may include calculating values ​​for sub-integer pixel positions.

[0045] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from a different frame according to inter-frame prediction, video encoder 20 can form pixel difference values ​​by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being decoded, thereby forming a residual video block. The pixel difference values ​​forming the residual video block may include both luma component differences and chroma component differences.

[0046] As an alternative to the inter-frame prediction performed by the motion estimation unit 42 and the motion compensation unit 44 or the intra-frame block copy prediction performed by the intra BC unit 48 as described above, the intra-frame prediction processing unit 46 may perform intra-frame prediction on the current video block. Specifically, the intra-frame prediction processing unit 46 may determine an intra-frame prediction mode for encoding the current block. To do so, the intra-frame prediction processing unit 46 may use various intra-frame prediction modes to encode the current block, for example, during a separate encoding pass, and the intra-frame prediction processing unit 46 (or the mode selection unit in some examples) may select a suitable intra-frame prediction mode to use from the tested intra-frame prediction modes. The intra-frame prediction processing unit 46 may provide information indicating the intra-frame prediction mode selected for the block to the entropy coding unit 56. The entropy coding unit 56 may encode the information indicating the selected intra-frame prediction mode in the bitstream.

[0047] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more transform units (TUs) and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform, such as a discrete cosine transform (DCT) or a conceptually similar transform.

[0048] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0049] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), semantic-based context adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding method or technique. The encoded bitstream may then be sent to video decoder 30, or archived in storage device 32 for later transmission to or retrieval by video decoder 30. Entropy coding unit 56 may also entropy encode motion vectors and other semantic elements for the current video frame being encoded or decoded.

[0050] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain for use in generating reference blocks for predicting other video blocks. As noted above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0051] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0052] Figure 3 30 is a block diagram showing an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above combined Figure 2 The encoding process described with respect to video encoder 20 is generally the reciprocal decoding process. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, while intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0053] In some examples, units of the video decoder 30 may be tasked to perform embodiments of the present application. In addition, in some examples, embodiments of the present disclosure may be dispersed in one or more of the multiple units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).

[0054] The video data memory 79 may store video data, such as an encoded video bitstream, to be decoded by other components of the video decoder 30. The video data stored in the video data memory 79 may be obtained, for example, from the storage device 32, from a local video source (such as a camera), via a wired or wireless network communication of video data, or by accessing a physical data storage medium (e.g., a flash drive or hard drive). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. A decoded picture buffer (DPB) 92 of the video decoder 30 stores reference video data for use by the video decoder 30 when decoding video data (e.g., in an intra-frame or inter-frame prediction codec mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are illustrative. Figure 3 9 as two different components of video decoder 30. However, it will be apparent to those skilled in the art that video data memory 79 and DPB 92 may be provided by the same memory device or separate memory devices. In some examples, video data memory 79 may be on-chip with other components of video decoder 30, or off-chip relative to those components.

[0055] During the decoding process, the video decoder 30 receives an encoded video bitstream, which represents video blocks of an encoded video frame and associated semantic elements. The video decoder 30 may receive the semantic elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantization coefficients, motion vectors or intra-frame prediction mode indicators, and other semantic elements. The entropy decoding unit 80 then forwards the motion vectors and other semantic elements to the prediction processing unit 81.

[0056] When a video frame is encoded and decoded as an intra-frame prediction codec (I) frame or is encoded and decoded for intra-frame codec prediction blocks in other types of frames, the intra-frame prediction unit 84 of the prediction processing unit 81 can generate prediction data for the video block of the current video frame based on the intra-frame prediction mode notified by the signal and the reference data from the previously decoded block of the current frame.

[0057] When the video frame is encoded and decoded as an inter-frame prediction codec (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks for the video block of the current video frame based on the motion vector and other semantic elements received from the entropy decoding unit 80. Each prediction block in the prediction block can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists, list 0 and list 1, based on the reference frames stored in the DPB 92 using a default construction technique.

[0058] In some examples, when a video block is encoded and decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other semantic elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block as defined by video encoder 20.

[0059] The motion compensation unit 82 and / or the intra BC unit 85 determine prediction information for a video block of the current video frame by parsing the motion vector and other semantic elements, and then use the prediction information to generate a prediction block for the current video block being decoded. For example, the motion compensation unit 82 uses some of the received semantic elements to determine a prediction mode (e.g., intra prediction or inter prediction) for encoding and decoding a video block of a video frame, an inter prediction frame type (e.g., B or P), construction information for one or more reference frame lists in a reference frame list for a frame, motion vectors for each inter prediction coded video block of a frame, inter prediction states for each inter prediction coded video block of a frame, and other information for decoding a video block in the current video frame.

[0060] Similarly, the intra BC unit 85 may use some of the received semantic elements, such as flags, to determine whether the current video block is predicted using intra BC mode, construction information of which video blocks of the frame are within the reconstruction region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding video blocks in the current video frame.

[0061] Motion compensation unit 82 may also perform interpolation using interpolation filters as used by video encoder 20 during encoding of the video block to calculate interpolated values ​​for sub-integer pixels of a reference block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use these interpolation filters to produce the prediction block.

[0062] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0063] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other semantic elements, the adder 90 reconstructs the decoded video block for the current video block by adding the residual block from the inverse transform processing unit 88 to the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter (not shown) may be located between the adder 90 and the DPB 92 to further process the decoded video block. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 may also store the decoded video for later presentation on a display device (such as, Figure 1 on a display device 34).

[0064] In a typical video encoding and decoding process, a video sequence usually includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other cases, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0065] like Figure 4A As shown in , the video encoder 20 (or more specifically the segmentation unit 45) generates an encoded representation of a frame by first segmenting the frame into a set of codec tree units (CTUs). A video frame may include an integer number of CTUs sequentially ordered in a raster scan order from left to right and from top to bottom. Each CTU is the largest logical codec unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, one of 128×128, 64×64, 32×32, and 16×16. It should be noted, however, that the present application is not necessarily limited to a particular size. As Figure 4BAs shown in , each CTU may include one codec tree block (CTB) of luma samples, two corresponding codec tree blocks of chroma samples, and semantic elements for encoding and decoding the samples of the codec tree blocks. The semantic elements describe the properties of different types of units of codec blocks of pixels and how the video sequence can be reconstructed at the video decoder 30, including inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vectors and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single codec tree block and semantic elements for encoding and decoding the samples of the codec tree block. The codec tree block may be an N×N block of samples.

[0066] To achieve better performance, the video encoder 20 may recursively perform tree partitioning, such as binary tree partitioning, quadtree partitioning, or a combination of both, on the codec tree block of the CTU and divide the CTU into smaller codec units (CUs). Figure 4C As depicted in , a 64×64 CTU 400 is first divided into four smaller CUs, each CU having a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four 16×16 CUs by block size. Two 16×16 CUs 430 and CU 440 are each further divided into four 8×8 CUs by block size. Figure 4D Describes a quadtree data structure that shows Figure 4C As the final result of the partitioning process of the CTU 400 depicted in , each leaf node of the quadtree corresponds to a CU of a corresponding size ranging from 32×32 to 8×8. Figure 4B In the CTU depicted in FIG, each CU may include a codec block (CB) of luma samples and two corresponding codec blocks of chroma samples of the same size frame, and semantic elements for encoding and decoding the samples of the codec block. In a monochrome picture or a picture with three separate color planes, a CU may include a single codec block and a semantic structure for encoding and decoding the samples of the codec block.

[0067] In some embodiments, the video encoder 20 may further partition the codec block of the CU into one or more M×N prediction blocks (PBs). A prediction block is a rectangular (square or non-square) block of samples to which the same prediction (inter-frame prediction or intra-frame prediction) is applied. The prediction unit (PU) of the CU may include a prediction block of luma samples, two corresponding prediction blocks of chroma samples, and semantic elements for predicting the prediction blocks. In a monochrome picture or a picture with three separate color planes, the PU may include a single prediction block and a semantic structure for predicting the prediction block. The video encoder 20 may generate a predicted luma block, a predicted Cb block, and a predicted Cr block for the luma prediction block, Cb prediction block, and Cr prediction block of each PU of the CU.

[0068] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0069] After the video encoder 20 generates the predicted luma block, the predicted Cb block, and the predicted Cr block for one or more PUs of a CU, the video encoder 20 may generate a luma residual block for the CU by subtracting the predicted luma block of the CU from the original luma codec block of the CU, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma codec block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block for the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb codec block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr codec block of the CU.

[0070] In addition, if Figure 4C As shown in , the video encoder 20 may decompose the luma residual block, Cb residual block, and Cr residual block of a CU into one or more luma transform blocks, Cb transform blocks, and Cr transform blocks using quadtree partitioning. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A transform unit (TU) of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and semantic elements for transforming the transform block samples. Therefore, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a semantic structure for transforming the samples of the transform block.

[0071] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block for the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block for the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block for the TU.

[0072] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to a process in which transform coefficients are quantized to potentially reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode a semantic element indicating the quantized transform coefficient. For example, the video encoder 20 may perform context adaptive binary arithmetic coding (CABAC) on the semantic element indicating the quantized transform coefficient. Finally, the video encoder 20 may output a bitstream including a sequence of bits forming a representation of a coded frame and associated data, and the bitstream is stored in the storage device 32 or sent to the target device 14.

[0073] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain semantic elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the semantic elements obtained from the bitstream. The process of reconstructing video data is generally the inverse of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the codec block of the current CU by adding samples of a prediction block for the PU of the current CU to corresponding samples of a transform block of the TU of the current CU. After reconstructing the codec block for each CU of the frame, the video decoder 30 may reconstruct the frame.

[0074] As mentioned above, video codecs mainly use two modes, namely intra-frame prediction (or intra-frame prediction) and inter-frame prediction (or inter-frame prediction) to achieve video compression. It should be noted that IBC can be regarded as intra-frame prediction or a third mode. Between the two modes, inter-frame prediction contributes more to codec efficiency than intra-frame prediction because motion vectors are used to predict the current video block from the reference video block.

[0075] Figure 5Ais a block diagram showing 67 conventional intra-frame prediction modes for predicting the current codec block based on reconstructed neighboring blocks according to some embodiments of the present disclosure. These 67 conventional intra-frame prediction modes include 65 angle modes (shown as mode indexes 2 to 33 are "horizontal mode sets", and mode indexes 34 to 66 are "vertical mode sets") plus two non-angle modes, referred to as "plane mode" (mode index 0) and "DC mode" (mode index 1), collectively referred to as "non-angle mode sets". Embodiments of the present disclosure are applied to any number of angle modes for intra-frame prediction. For example, the number of modes can be 35 as used in HEVC or some other number of modes greater than 35. Although embodiments can be applied to intra-frame prediction mode encoding and decoding of only a few selected color components (such as luminance components or chrominance components), it will be apparent to those of ordinary skill in the art that they can be applied to all available color components (luminance and two chrominances) or any other combination.

[0076] According to some embodiments of the present disclosure, a video codec (such as the video encoder 20 or the video decoder 30) may check three or more neighboring blocks in a group of neighboring blocks to identify an intra-prediction mode, thereby generating a most probable mode (MPM) candidate list for a current block. If the neighboring block is encoded and decoded using an intra-prediction mode, the video codec may add the intra-prediction mode used to encode and decode the neighboring block to the MPM candidate list for the current block. The positions of the neighboring blocks checked by the video codec may be fixed relative to the current block.

[0077] Figure 5B is a block diagram showing exemplary positions of five reconstructed neighboring blocks of a current codec block according to some embodiments of the present disclosure. For example, the positions of the five neighboring blocks may include a left (L) block, an upper (A) block, a lower left (BL) block, an upper right (AR) block, and / or an upper left (AL) block. Other positions of the neighboring blocks may also be used. The order in which intra-frame prediction modes from neighboring blocks are added to the MPM candidate list may depend on many factors, such as the current block size, whether the block has a certain shape (such as a rectangle or a square), or based on contextual information (such as the size or shape of the neighboring block and the type or frequency of the intra-frame prediction mode of the neighboring block). Note that Figure 5B The five neighboring positions in are provided as examples, but fewer or more neighboring blocks may be considered when constructing the MPM candidate list using an embodiment.

[0078] In general, a video codec may generate an MPM candidate list from different MPM types. The different types include, but are not limited to, neighbor-based intra-frame prediction modes, derived intra-frame prediction modes, and default intra-frame prediction modes. A neighbor-based intra-frame prediction mode refers to an intra-frame prediction mode used for a neighboring block. A default intra-frame prediction mode refers to a constant intra-frame prediction mode that does not change with neighboring blocks. (Multiple) default intra-frame prediction modes may be one of a plane mode, a DC mode, a horizontal mode, or a vertical mode. A derived intra-frame prediction mode refers to an intra-frame prediction mode derived from a neighbor-based intra-frame prediction mode or a default intra-frame prediction mode. The derived intra-frame prediction mode may not be the actual intra-frame prediction mode of a neighboring block. It may be an intra-frame prediction mode derived from the actual intra-frame prediction mode of a neighboring block or derived in some other way. For example, a derived intra-frame prediction mode may be a neighbor-based intra-frame prediction mode ±1, ±2, etc. A derived intra-frame prediction mode may also be generated by another existing derived intra-frame prediction mode.

[0079] The video codec may add the intra-prediction mode to the MPM candidate list according to the intra-prediction mode type. For example, the video codec may first add a neighbor-based intra-prediction mode, then add a derived intra-prediction mode when the number of neighbor-based intra-prediction modes is less than N, and then add a default intra-prediction mode when the total number of neighbor-based intra-prediction modes and derived intra-prediction modes is still less than N. In another embodiment, the video codec may add different types of intra-prediction modes in an interlaced manner. For example, the video codec may add one or more default intra-prediction modes after a certain number of neighbor-based intra-prediction modes are added to the list. Alternatively, the video codec may add two neighbor-based intra-prediction modes, two default intra-prediction modes, and then add more neighbor-based intra-prediction modes.

[0080] Only unique neighbor-based intra prediction modes will be added to the MPM candidate list. For example, if one of the neighboring blocks has the same intra prediction mode that has already been added to the MPM candidate list, such a mode is not added to the list again. The position of the neighboring blocks can be represented by a sub-block size (e.g., 4×4), meaning that it is the granularity at which the intra prediction mode information is stored. In another example, the intra prediction mode information may be specified per pixel or for larger blocks (such as 8×8). If the chroma components are subsampled compared to the luma components (such as in a 4:2:0 color format), the chroma component sub-block positions can be smaller, such as 2×2, which may correspond to luma 4×4.

[0081] In some embodiments, depending on the neighboring block size, Figure 5BMultiple positions of the neighboring blocks depicted in may belong to the same CU. For example, if the neighboring block is 16×16 and the block currently being encoded is 8×8, the top left position and the left position may belong to the same 16×16 neighboring block, where the intra prediction mode information will be the same for those positions.

[0082] The number M of neighboring positions may be equal to the MPM candidate list size N, but may be smaller or larger. In one example, the number M may be smaller than N to allocate some space to include other types of intra-frame prediction modes (e.g., derived intra-frame prediction modes or default intra-frame prediction modes) into the MPM candidate list. The number of positions may depend on the characteristics of the current block and / or neighboring blocks, such as block size, whether the block is square or rectangular, whether the rectangular block is a horizontally oriented rectangular block (width greater than height) or a vertically oriented rectangular block (width less than height), the ratio between height and width, and the ratio between the larger and smaller values ​​of the height and width. The number of positions may also depend on the prediction mode of the neighboring blocks (e.g., intra-frame or inter-frame).

[0083] When a block is encoded and decoded using an intra-prediction mode, a video encoder (e.g., video encoder 20) may generate an MPM candidate list for the block. A video decoder (e.g., video decoder 30) may generate the same MPM candidate list as determined by the video encoder by implementing the same MPM candidate list generation process implemented by the video encoder. Since the video encoder and the video decoder generate the same MPM candidate list, the video encoder may signal the intra-prediction mode to the video decoder by signaling an index value corresponding to a particular candidate in the MPM candidate list. Unless explicitly stated to the contrary, the MPM candidate list generation implementation described herein may be performed by a video encoder or a video decoder.

[0084] In addition to the aforementioned conventional intra prediction modes, a plurality of MBIP modes have been proposed for performing intra prediction on a current block from neighboring blocks by applying a linear matrix transform to reconstructed pixels of the neighboring blocks. Fig. 6A and Figure 6B is a block diagram illustrating two matrix-based intra prediction schemes for codec blocks of different sizes according to an embodiment of the present disclosure.

[0085] First, the reconstructed pixels from the upper and left neighboring blocks are filtered and optionally downsampled. Figure 6B For the 8×8 codec block depicted in , 8 pixels from the upper neighboring block and the left neighboring block, respectively, are downsampled by a factor of 2 to derive 4 downsampled pixels from each side. Similarly, for Fig. 6AIn the depicted 4×4 codec block, 4 pixels from the upper neighboring block and the left neighboring block, respectively, are downsampled by a factor of 2 to derive 2 downsampled pixels from each side.

[0086] Next, the downsampled pixels are rearranged into a one-dimensional vector, matrix multiplication is performed on the one-dimensional vector with a predefined matrix, and then a bias offset vector is added. After the matrix multiplication and bias offset, the result is rearranged back into a two-dimensional array to form a matrixed two-dimensional result. Depending on the current block size, the matrixed two-dimensional result may be in the sub-sampled domain. For example, if the matrixed two-dimensional result has a size of 4×4, it is considered to be in the sub-sampled domain if the current block size is 8×8 (see, e.g., Figure 6B ), and if the current block size is 4×4 it is considered not to be in the sub-sampled domain (see, e.g., Fig. 6A ).

[0087] Finally, for Figure 6B In the scenario depicted in , the two-dimensional result of the matrix transformation is upsampled / interpolated to form the prediction value for the current codec block. Fig. 6A In the scenario depicted in , the two-dimensional result after matrix transformation already has a size of 4×4 and does not need to be upsampled / interpolated to form a prediction value for the current codec block. It is worth noting that Fig. 6A and Figure 6B The examples provided in are illustrative implementations.

[0088] Although MBIP overcomes some of the problems associated with conventional intra prediction modes, it still introduces some new challenges to the design and implementation of new codec standards. For example, 67 MBIP modes require 67 coefficient matrices and 67 bias offset vectors. Assuming that each matrix / vector coefficient is a 10-bit precision number, it will take almost 8K bytes of memory space to store these values. This may increase the physical size and power usage of chip-based implementations of MBIP.

[0089] In some embodiments, instead of using 10 bits of precision for each coefficient in the MBIP matrix and the bias offset vector, lower precision is used to save the memory space required to store these coefficients. For example, 9 bits or even 8 bits of precision are used for each coefficient in the MBIP matrix and the bias offset vector to save at least 10% of the memory space.

[0090] In some embodiments, different precisions may be used for coefficients in the MBIP matrix and the bias offset vector, respectively, because the codec efficiency obtained from MBIP is not as sensitive to the precision of the bias offset vector as it is to the precision of the MBIP matrix. For example, 10-bit precision may still be used for coefficients in the MBIP matrix, while lower precision (e.g., 9 bits or less) is used for coefficients in the bias offset vector. In addition, it is possible to skip the bias offset vector entirely. In other words, if the quality of the reconstructed pixels is satisfactory, MBIP only performs matrix multiplication on the pixels of the adjacent blocks and skips the addition of the bias vector to save more memory space.

[0091] In some other embodiments, only the MBIP matrix and bias vector corresponding to the minimum block size are stored in the memory, while other MBIP matrices and bias offset vectors corresponding to larger block sizes are upsampled and / or interpolated from those MBIP matrices and bias offset vectors of the minimum size. For example, only the matrices and bias offset vectors defined for a 4×4 block are saved. When the MBIP mode is applied to an 8×8 or 16×16 block, the MBIP matrix and bias offset defined for the 4×4 block are correspondingly upsampled and / or interpolated (e.g., bilinear interpolation) to the size defined for the 8×8 or 16×16 block, and then used to predict the current block.

[0092] As above combined Fig. 6A and Figure 6B As noted, filtering and downsampling operations are applied to reconstructed pixels from neighboring blocks, which requires additional logic and thus physical space for the codec implementation.

[0093] In some embodiments, a 3-tap intraframe smoothing filter is used in the filtering and / or downsampling process in MBIP mode, and the 3-tap intraframe smoothing filter is applied to the reconstructed pixels of the adjacent blocks in the conventional intraframe prediction mode. In some other embodiments, no filtering operation is performed on the reconstructed pixels of the adjacent blocks before downsampling. In other words, downsampling is performed directly on the reconstructed pixels from the adjacent blocks without any filtering operation performed in advance.

[0094] The coding efficiency of the intra mode depends not only on the number of angle coding modes, but also on the range of reconstructed samples that can be accessed. In some embodiments, reconstructed pixels from the upper right (AR) block, the upper left (AL) block, and the lower left (BL) block are also used in the filtering and downsampling process in the MBIP mode to obtain better coding efficiency. In addition, when the current block is coded and decoded using the MBIP mode, different numbers of reconstructed pixels from the adjacent blocks can be used from the upper adjacent block (A) and from the left adjacent block (L), respectively. For example, if the aspect ratio of the current block is non-square (e.g., a vertical rectangle), in the MBIP mode, more adjacent reconstructed pixels can be used from the left adjacent block (L) along the longer side of the current block than from the shorter side of the current block. In some cases, when the aspect ratio of the current block exceeds a certain threshold (e.g., 3 to 1), only the reconstructed pixels from the adjacent blocks along the longer side of the current block are used in the MBIP mode, and the reconstructed pixels from the adjacent blocks along the shorter side of the current block are not used at all.

[0095] Matrix multiplication is a computationally expensive operation. There are certain situations where MBIP mode is disabled because the benefits associated with MBIP are not justified when compared to the complexity associated with MBIP, e.g.

[0096] If the width of the current block is four times the height of the current block;

[0097] If the height of the current codec block is four times the width of the current block;

[0098] If the width or height of the current block is greater than 64; and

[0099] If the current block is a chroma block.

[0100] When this happens, a conventional intra prediction mode can be used to predict the current block that meets one of the above situations, and an MPM candidate list is generated for the current block accordingly as described above. Figure 5B If one of the five neighboring blocks of the current block depicted in , such MBIP mode needs to be converted into a corresponding conventional intra prediction mode in order to be considered for predicting the current block.

[0101] Figure 7 1 is a flowchart illustrating an exemplary process according to some embodiments of the present disclosure, by which a video codec implements a technique for generating a most probable mode (MPM) candidate list. As described above, this video codec may be the video encoder 20 or the video decoder 30. For illustrative purposes, the present disclosure uses the video encoder 20 as an example below.

[0102] It is assumed that the video encoder 20 will process a current block of video data to be encoded. After determining that the current block will use a conventional intra-frame prediction mode (e.g., Figure 5A After the video encoder 20 has predicted one of the 67 modes depicted in Figure 5B . The video encoder 20 first identifies (710) neighboring blocks at predefined positions relative to the current block and their associated matrix-based intra prediction modes. Assuming that the left neighboring block L is identified, the video encoder 20 determines that the left neighboring block L is reconstructed according to one of the MBIP modes. However, since the MBIP mode has been disabled for the current block, the video encoder 20 needs to determine what conventional intra prediction mode will be associated with the left neighboring block L when generating the MPM candidate list.

[0103] In some embodiments, the video encoder 20 determines (730) a conventional intra prediction mode corresponding to an MBIP mode for the left neighboring block L based on a predefined mathematical relationship between the conventional intra prediction mode and the matrix-based intra prediction mode. For example, the video encoder 20 may assign (730-1) a constant value (e.g., planar mode 0) to the left neighboring block L regardless of the actual MBIP mode used to predict the left neighboring block L. In other words, when the video encoder 20 considers a neighboring block for updating the MPM candidate list for the current block, a constant value corresponding to one of the conventional intra prediction modes is used to represent the neighboring block.

[0104] In some embodiments, the MBIP modes are designed so that there are specific MBIP modes that target block content that favors a DC intra prediction mode, a plane intra prediction mode, and / or a directional intra prediction mode, respectively. For example, an MBIP mode (e.g., mode 0) is selected to target block content that favors plane prediction, an MBIP mode (e.g., mode 1) is selected to target block content that favors DC prediction; and multiple MBIP modes (with values ​​greater than 1) are selected to target block content that favors angular prediction with different directions. As a result, the mapping between MBIP modes and conventional intra prediction modes becomes direct.

[0105] For example, suppose the MBIP intra prediction mode is defined as Mode MBIP And the conventional intra prediction mode is defined as Mode INTRA (According to VVC, it ranges from 0 to 66), when the total number of MBIP modes is also 67, there is a one-to-one mapping between the regular intra prediction mode and the MBIP mode as follows:

[0106] Mapping of conventional intra prediction mode to MBIP mode;

[0107] Setting Mode MBIP =Mode INTRA

[0108] Mapping MBIP mode to regular intra prediction mode:

[0109] Setting Mode INTRA =Mode MBIP

[0110] In other words, when the total number of regular intra-frame prediction modes is the same as the total number of matrix-based intra-frame prediction modes, the predefined mathematical relationship between the regular intra-frame prediction mode and the matrix-based intra-frame prediction mode is defined as the regular intra-frame prediction mode having the same value as the value of the matrix-based intra-frame prediction mode (730-3).

[0111] When the total number of MBIP modes is 35, the following mapping logic is used for mode conversion:

[0112] Mapping of conventional intra prediction mode to MBIP mode:

[0113] If Mode INTRA With a value less than 2, set Mode MBIP =Mode INTRA ;

[0114] Otherwise, set Mode MBIP =(Mode INTRA -34) / 2+18.

[0115] Mapping MBIP mode to regular intra prediction mode:

[0116] If Mode MBIP With a value less than 2, set Mode INTRA =Mode MBIP ;

[0117] Otherwise, set Mode INTRA =(Mode MBIP -18)x 2+34.

[0118] Similarly, when the total number of MBIP modes is 19, the following mapping logic is used for mode conversion.

[0119] Mapping of conventional intra prediction mode to MBIP mode:

[0120] If Mode INTRA With a value less than 2, set Mode MBIP =Mode INTRA ;

[0121] Otherwise, set Mode MBIP =(Mode INTRA -34) / 4+10.

[0122] Mapping MBIP mode to regular intra prediction mode:

[0123] If Mode MBIP With a value less than 2, set Mode INTRA =Mode MBIP ;

[0124] Otherwise, set Mode INTRA =(Mode MBIP -10)x 4+34.

[0125] When the total number of MBIP modes is 11, the following mapping logic is used for mode conversion:

[0126] Mapping of conventional intra prediction mode to MBIP mode:

[0127] If Mode INTRA With a value less than 2, set Mode MBIP =Mode INTRA ;

[0128] Otherwise, set Mode MBIP =(Mode INTRA -34) / 8+6.

[0129] Mapping MBIP mode to regular intra prediction mode:

[0130] If Mode MBIP With a value less than 2, set Mode INTRA =Mode MBIP ;

[0131] Otherwise, set Mode INTRA =(Mode MBIP -6)x 8+34.

[0132] In other words, when the total number of conventional intra prediction modes is greater than the total number of matrix-based intra prediction modes, the predefined mathematical relationship between the conventional intra prediction modes and the matrix-based intra prediction modes is defined as two categories: (i) non-angular intra prediction modes (less than mode 2) and (ii) angular intra prediction modes (equal to or greater than mode 2) (730-5). However, it should be noted that in all these cases, when the MBIP mode is enabled together with the conventional intra prediction mode, there is no need to store any mapping table for MPM list generation.

[0133] After determining the conventional intra prediction mode, the video encoder 20 performs the following operations according to the above description in conjunction with Figure 5B The conventional intra prediction modes associated with the neighboring blocks are inserted (750) into the most probable mode candidate list in the predefined order described.

[0134] In some embodiments, position-dependent intra prediction combination (PDPC) is applied to prediction samples formed by conventional intra prediction to improve intra prediction codec efficiency. The codec gain of PDPC comes from the improved quality of the prediction values ​​generated from the combination of intra prediction samples and reconstructed pixels from neighboring blocks. PDPC can be performed on top of MBIP mode. In other words, the PDPC operation is performed on the prediction value of the current block formed by MBIP. Of course, such an operation increases the computational complexity of the encoding / decoding operation and should be used at selective locations where the benefits exceed the costs.

[0135] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted through a computer-readable medium as one or more instructions or codes, and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium or a communication medium, wherein the computer-readable storage medium corresponds to a tangible medium (such as a data storage medium), and the communication medium includes any medium that facilitates the transfer of a computer program (e.g., according to a communication protocol) from one place to another. In this way, a computer-readable medium may generally correspond to (1) a non-temporary tangible computer-readable storage medium or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the embodiments described in the present application. A computer program product may include a computer-readable medium.

[0136] The terms used in the description of the embodiments herein are only used for the purpose of describing specific embodiments, and are not intended to limit the scope of the claims. As used in the description of the embodiments and the appended claims, the singular forms "a", "an" and "the" are intended to also include plural forms, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any one and all possible combinations of one or more of the associated listed items. It will be further understood that the terms "including" and / or "including ... " when used in this specification, specify the presence of stated features, elements and / or components, but do not exclude the presence or addition of one or more other features, elements, components and / or their groups.

[0137] It will also be understood that although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, the first electrode may be referred to as the second electrode, and similarly, the second electrode may be referred to as the first electrode without departing from the scope of the embodiment. The first electrode and the second electrode are both electrodes, but they are not the same electrode.

[0138] The description of the present application has been presented for the purpose of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. With the benefit of the teachings presented in the foregoing description and the associated drawings, many modifications, variations and alternative embodiments will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to best explain the principles of the invention, the practical application, and to enable other persons skilled in the art to understand the invention for various embodiments, and to best utilize the basic principles and various embodiments with various modifications suitable for the intended specific use. Therefore, it will be understood that the scope of the claims is not limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the appended claims.

Claims

1. A method for video decoding, comprising: obtaining a bitstream comprising a plurality of video blocks; identifying neighboring blocks located at predefined positions relative to a current block of the plurality of video blocks and their associated matrix-based intra prediction modes; determining a conventional intra prediction mode corresponding to the matrix-based intra prediction mode of the neighboring block based on a predefined mathematical relationship between a plurality of matrix-based intra prediction modes and corresponding conventional intra prediction modes; deriving a candidate intra prediction mode based on the determined conventional intra prediction mode; and The derived candidate intra prediction modes are inserted into the mode candidate list according to a predefined order.

2. The method of claim 1, wherein the predefined mathematical relationship is defined such that the corresponding conventional intra prediction mode is a constant value for each matrix-based intra prediction mode. The method of claim 2 , wherein the constant value is equal to 0 and corresponds to a planar mode.

4. The method of claim 1 , wherein identifying the neighboring blocks comprises: A plurality of neighboring blocks including the neighboring block are identified. The method of claim 4 , wherein the number of the plurality of neighboring blocks is smaller than the size of the mode candidate list. The method of claim 4 , wherein the plurality of adjacent blocks include a left block and an upper block.

7. The method of claim 1, wherein each matrix-based intra prediction mode has an associated matrix and offset vector.

8. The method of claim 1, further comprising: An index value corresponding to a specific candidate in the pattern candidate list is obtained.

9. An electronic device comprising: one or more processing units; a memory coupled to the one or more processing units; as well as A plurality of programs are stored in the memory, and when the plurality of programs are executed by the one or more processing units, the electronic device executes the method for video decoding as described in any one of claims 1-8.

10. A non-temporary computer-readable storage medium storing a plurality of programs for execution by an electronic device having one or more processing units, wherein the plurality of programs, when processed by the one or more processing units, causes the electronic device to execute the method for video decoding as described in any one of claims 1-8 and store a bit stream to be decoded according to the method for video decoding as described in any one of claims 1-8.

11. A method for storing a bit stream, comprising: The bit stream decoded by the method for video decoding according to any one of claims 1 to 8 is stored in a non-transitory computer-readable storage medium.