Method and apparatus for encoding or decoding video data having intra prediction mode mapping

Through wide-angle intra prediction mode mapping technology, the intra prediction mode is adjusted according to the aspect ratio of the chroma block, which solves the problem of low encoding efficiency of non-square blocks in the prior art, and improves the compression performance of video encoding and the encoding quality of chroma blocks.

CN114208167BActive Publication Date: 2025-07-08HFI INNOVATION INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080055398.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-08-06
Filing Date
2020-08-03
Publication Date
2025-07-08
Estimated Expiration
2040-08-03

AI Technical Summary

Technical Problem

现有的视频编解码标准在处理非方型块时,帧内预测模式映射效率较低,难以有效提升编码效率。

Method used

Wide angle intra prediction mode mapping (WAIP) technology is used to selectively map the brightness mode to the corrected intra prediction mode based on the width to height ratio of the current chromaticity block, and a suitable intra prediction sub is derived through the direct mode (DM) and WAIP mode mapping programs.

Benefits of technology

The intra prediction efficiency of non-square blocks is improved, and the compression performance of video encoding is enhanced, especially in the 4:2:2 color format, which improves the encoding quality of chroma blocks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114208167B_ABST
    Figure CN114208167B_ABST
Patent Text Reader

Abstract

A video processing method in a video encoder or decoder, comprising: receiving input data of a current chrominance block in a current picture encoded or decoded in a 4:2:2 color format; determining a luminance mode of a luminance block corresponding to the current chrominance block; mapping the luminance mode to a mapped intra mode of the current chrominance block; selectively replacing the mapped intra mode with a wide-angle intra prediction mapping based on a width-to-height ratio of the current chrominance block; after the wide-angle intra prediction mapping, deriving an intra predictor according to the mapped intra mode; and encoding or decoding the current chrominance block according to the intra predictor. When the luminance mode is mode 61, the mapped intra mode is mode 57, and when the luminance mode is mode 57, the mapped intra mode is mode 55.
Need to check novelty before this filing date? Find Prior Art

Description

[0001]

Cross - reference to related applications

[0002] This invention claims priority to U.S. Provisional Patent Application No. 62 / 883,149, filed on June 8, 2019, with the title "Intra prediction mode mapping for different block ratios". The content of the above - mentioned U.S. Provisional Patent Application is incorporated herein by reference in its entirety.

Technical Field

[0003] This invention relates to encoding or decoding video data by means of intra - prediction. In particular, this invention relates to encoding and decoding video data with intra - prediction derived from intra - prediction mode mapping.

Background Art

[0004] High Efficiency Video Coding (HEVC) is a new generation of international video coding standard developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is a transform coding architecture based on a hybrid block-based motion compensated Discrete Cosine Transform (DCT). The basic unit of compression in HEVC (referred to as the coding unit, CU) is a 2Nx2N square block, and each CU can be recursively divided into four smaller CUs until a predetermined minimum size is reached. Each CU includes one, two, or four Prediction Units (PUs). In HEVC, each PU is coded or decoded by intra prediction or inter prediction. For each PU coded by inter prediction, one or two temporal reconstructed reference pictures are used to generate a motion compensated predictor. There are three different inter prediction modes in HEVC, including Skip, Merge, and Advanced Motion Vector Prediction (AMVP) modes. Intra prediction is useful for generating an initial picture or periodically inserting an I picture (I-picture) or I-block (I-block) for random access or for mitigating error propagation. Intra prediction is designed to utilize the spatial characteristics in a picture, such as smooth regions, vertical lines or edges, horizontal lines or edges, and diagonal lines or edges within the picture or within a picture region. Intra prediction is also useful for regions with high motion or scene changes. The PUs coded by intra prediction are dependent on the samples in the adjacent blocks that have already been processed. For example, if the blocks in a video picture or picture region are processed row by row from top to bottom and from left to right in sequence, the adjacent block above the current block and the adjacent block to the left of the current block can be used to form an intra predictor for predicting the samples in the current block.

[0005] The HEVC standard supports 35 intra prediction modes, including 33 angular modes, DC mode, and planar mode. Figure 2Illustrates the prediction directions of 33 angular intra prediction modes supported by the HEVC standard, where H represents the horizontal mode and V represents the vertical mode. The 33 angular intra prediction modes are represented by H, H+1 to H+8, H-1 to H-7, V, V+1 to V+8, V-1 to V-8. The intra predictor of the current block to be encoded / decoded or being encoded / decoded by intra prediction is generated by three steps, including: intra smoothing filter, intra prediction, and intra gradient filter. Figure 2 Illustrates exemplary reference samples filtered by the intra smoothing filter to derive the intra predictor for the current block. The smoothing filter operation is applied to the reference samples 22 of the current block 20 as a preprocessing step before calculating the intra predictor of the current block 20. The smoothing filter operation corresponds to applying a finite impulse response (FIR) intra smoothing filter [1 2 1]>>2 with low-pass characteristics to the reference samples 22 in the left adjacent column and upper adjacent row belonging to the current block 20. The smoothing filter operation reduces the discontinuities introduced by some intra prediction modes by applying the FIR filter. This smoothing filter operation is applied adaptively depending on the intra prediction mode and the size of the current block.

[0006] The second step of intra prediction is to derive the intra predictor from the adjacent reference samples according to an intra prediction mode selected from 35 intra prediction modes. The intra prediction mode is determined by the encoder and signaled in the bitstream, so the corresponding decoder can parse out the intra prediction mode from the bitstream. When the angular mode is selected, the value of each sample in the current block is predicted by samples extrapolated from the reference samples according to the prediction direction of the selected angular mode. When the Planar mode is selected, the value of each sample in the current block is calculated by assuming an amplitude surface with horizontal and vertical smooth gradients derived from the boundary samples of adjacent blocks. When the DC mode is selected, the value of each sample in the current block is the average of the reference samples.

[0007] In the third step, an intra-frame gradient filter is applied to the samples on the left and upper boundaries of the current block. The concept of applying the intra-frame gradient filter is to use the gradient information along the intra-frame prediction direction to improve the quality of intra-frame prediction. Figure 3A Illustrates the application of intra-frame gradient filtering to the predictors predicted by the vertical direction mode or the horizontal direction mode. In Figure 3A , the predicted pixel Pij represents the predictor at the i-th row and the j-th column, and AL represents the reconstructed sample at the upper left corner of the current block, while Li represents a reconstructed sample in the left adjacent column of the current block. The final predicted pixel P'ij for each predicted pixel Pij is calculated by Equation (1) after applying the intra-frame gradient filter.

[0008] P′ij = Pij + α·(Li - AL) Equation (1)

[0009] where α is a fraction between 0 and 1 and is selected according to the horizontal displacement j. For example, when j = 0, α = 1 / 2; and when j = 1, α = 1 / 4. For the current block predicted by the horizontal mode, the final predicted pixel P'ij for each predicted pixel Pij is calculated by Equation (2).

[0010] P′ij = Pij + α·(Aj - AL) Equation (2)

[0011] where Aj is the reconstructed sample in the above row. For the direction modes v+1 to v+8 and h+1 to h+8, the corresponding reference samples RLi or RAj of the reconstructed samples Li or Aj are first obtained along the intra-frame prediction direction to replace the reconstructed samples Li or Aj. Interpolation of the integer pixels in the above row (above row) or the left column (left column) of the current block is applied to generate the corresponding reference samples RLi or RAj (when they are not at the integer pixel positions). Figure 3B Illustrates an example of applying the intra-frame gradient filter to the v+1 to v+8 direction modes. The final predicted pixel P'ij is calculated from each predicted pixel Pij by Equation (3).

[0012] P′ij = Pij + α·(Li - RLi) Equation (3)

[0013] Similar to the vertical mode, α is a fraction between 0 and 1 and is selected according to the intra-frame prediction direction and the horizontal displacement j. For the h+1 to h+8 direction modes, the final predicted pixel P'ij is calculated from each predicted pixel Pij according to Equation (4), where α is a fraction between 0 and 1 and is selected according to the intra-frame prediction direction and the vertical displacement i.

[0014] P′ij = Pij + α·(Aj - RAj) Equation (4)

[0015] Although the intra-frame gradient filter can be applied to all directional modes v+1 to v+8 and h+1 to h+8, the intra-frame gradient filter can only be applied when the intra-frame prediction mode is the DC, horizontal, or vertical mode in the HEVC standard. When the selected intra-frame prediction mode is the DC mode, the samples in the first row and the first column of the current block are filtered by the intra-frame gradient filter. When the selected intra-frame prediction mode is the horizontal mode, the samples in the first row are filtered by the intra-frame gradient filter. If the selected intra-frame prediction mode is the vertical mode, the samples in the first column are filtered by the intra-frame gradient filter.

[0016] Among the 35 intra-frame prediction modes supported by the HEVC standard, three intra-frame prediction modes are considered the Most Probable Modes (MPMs) for predicting a current intra-frame prediction mode for a current block. The neighboring intra-frame prediction modes of the left neighboring block and the upper neighboring block are included in these three MPMs. If two neighboring intra-frame prediction modes are of the same directional mode, or if only one of the two neighboring intra-frame prediction modes is available and is a directional mode, the two directions adjacent to this neighboring directional mode are also included in these three MPMs. When the left or upper neighboring intra-frame prediction mode is non-directional or when the neighboring block is not available or is not encoded / decoded by intra-frame prediction, the DC mode and the planar mode are also considered MPMs. The first MPM flag is signaled to indicate whether the current intra-frame prediction mode is the same as one of the three MPMs. If so, another flag is signaled to indicate which one of the three MPMs is selected; if the first MPM flag is false, the current intra-frame prediction mode is a non-MPM mode and is explicitly signaled using a 5-bit fixed-length codeword.

[0017] Figure 2 The 33 shown angular modes can be extended to a general case with more or fewer angular modes, where each angular mode can be represented by mode H+k or mode V+k, where H represents the direction of the horizontal mode, V represents the direction of the vertical mode, and k = 0, ±1, ±2,.. ±K. An example of 65 angular modes for intra-frame prediction is shown in Figure 4 , where the range of k is from -16 to 16. Mode H-16 and mode V-16 are the same mode, which represents the prediction direction pointing to the upper left corner of the current block. Figure 4 Illustrates 65 angular intra-frame prediction modes, with an additional 32 angular modes between the original 33 angular modes in HEVC.Figure 4 The 65 angular patterns include patterns H+16 to H-15 from bottom to top at the left boundary of the block and patterns V-16 to V+16 from left to right at the upper boundary of the block. These denser directional intra prediction patterns can be applied to all block sizes and for both the luminance and chrominance components.

[0018] Wide-Angle Intra Prediction Mapping is coming. The emerging video coding standard Versatile Video Coding (VVC) supports various non-square block partitions. Wide-Angle Intra Prediction (WAIP) mode mapping is thus developed to improve intra prediction for non-square blocks. Multiple traditional angular intra prediction patterns can be adaptively replaced by modified intra prediction patterns after the WAIP mode mapping process. The traditional angular intra prediction directions are defined clockwise from 45 degrees to -135 degrees. Some of the original intra prediction patterns are replaced by modified intra prediction patterns after the WAIP mode mapping for intra prediction, but the original intra prediction mode indices are still signaled by the video encoder. The corresponding video decoder parses the original intra prediction mode indices and remaps these original intra prediction mode indices to the modified intra prediction patterns. The total number of intra prediction modes thus does not change, and the intra mode coding method also remains the same. To support the WAIP mode mapping, upper reference samples with a length of 2W+1 and left reference samples with a length of 2H+1 are defined in FIGS. 5A and 5B. In Figure 5A FIG. 5A, the current block 52 can be predicted by the left reference sample, where the sample has an angle greater than the angle of mode 2. In FIG. 5B, the current block 54 can be predicted by the upper reference sample, where the sample has an angle greater than the angle of mode 66. The number of modified intra prediction patterns used to replace the original intra prediction patterns depends on the aspect ratio of the block. The aspect ratio represents the ratio of the width to the height of the block. The corresponding angular intra prediction patterns to be replaced by the modified intra prediction patterns for each aspect ratio are shown in Table 1.

[0019] Table 1. Intra Prediction Modes Replaced by WAIP Mode Mapping

[0020]

[0021] The inputs of the WAIP mode mapping program include: a variable predModeIntra indicating the intra prediction mode, a variable nW indicating the width, a variable nH indicating the height, and a variable cIdx indicating the color component. The output of the WAIP mode mapping program is the modified intra prediction mode predModeIntra. If the Intra Sub-Partition (ISP) mode is used for encoding / decoding the current block or the variable cIdx for the current block is not equal to 0, the variables nW and nH are equal to the transform block width nTbW and the transform block height nTbH. Otherwise, the variables nW and nH are equal to the coding block width nCbW and the coding block height nCbH. When the current block is a chrominance block, the variable cIdx is not equal to 0; when the current block is a luminance block, the variable cIdx is equal to 0. Then the variable whRatio is derived from the two variables nW and nH by abs(Log2(nW / nH)). The WAIP mode mapping program includes checking whether all of the following three conditions are true: nW is greater than nH, predModeIntra is greater than or equal to 2, and predModeIntra is less than (whRatio>1)?(8 + 2*whRatio):8. If the above three conditions are all true, the modified intra prediction mode predModeIntra is set to be equal to (predModeIntra + 65). Otherwise, the WAIP mode mapping program further checks whether the following three conditions are true: nH is greater than nW, predModeIntra is less than or equal to 66, and predModeIntra is greater than (whRatio>1)?(60 – 2*whRatio):60. If the above three conditions are all true, the modified intra prediction mode predModeIntra is set to be equal to (predModeIntra – 67). SUMMARY OF THE INVENTION

[0022] Implement a method or apparatus for video encoding or decoding in a video codec system to process video data encoded or to be encoded / decoded using intra prediction. An embodiment of this video codec system receives input data related to a current chrominance block in a current picture encoded in a 4:2:2 color format. This video codec system determines whether the current chrominance block is to be encoded or decoded using the Direct Mode (DM); determines the luminance mode of the luminance block corresponding to the current chrominance block; and then maps the luminance mode to a mapped intra mode for the current chrominance block. When the luminance mode is mode 61, the mapped intra mode is mode 57; and when the luminance mode is mode 57, the mapped intra mode is mode 55. Based on the width-to-height ratio of the current chrominance block, the mapped intra mode is selectively replaced with a wide-angle intra prediction mode mapping. After the wide-angle intra prediction mode mapping, an intra predictor for the current chrominance block is derived based on the mapped intra mode; and the current chrominance block is encoded or decoded based on the intra predictor.

[0023] In one embodiment, when the width-to-height ratio of the current chrominance block is 1:4, the mapped intra mode of mode 57 corresponds to a prediction direction pointing to the lower left corner; and after the WAIP mode mapping, the mapped intra mode of mode 57 is replaced with mode -10. In another embodiment, when the width-to-height ratio of the current chrominance block is 1:8, the mapped intra mode of mode 55 corresponds to a prediction direction pointing to the lower left corner; and after the WAIP mode mapping, the mapped intra mode of mode 55 is replaced with mode -12.

[0024] The current chrominance block is encoded or decoded using the direct mode DM, and the luminance block is the collocated block of the current chrominance block. In one embodiment, when the width-to-height ratio is 1:4, the mapped intra modes for the current chrominance block at a lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 57, 18, 44, 50, and 56. In another embodiment, when the width-to-height ratio is 1:8, the mapped intra modes for the current chrominance block at a lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 55, 18, 46, 50, and 54. In another embodiment, when the width-to-height ratio is 1:16, the mapped intra modes for the current chrominance block at a lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 53, 18, 48, 50, and 52.

[0025] In one embodiment, when the width-to-height ratio is 2:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 8, 18, 38, 50, and 7. In another embodiment, when the width-to-height ratio is 4:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 12, 18, 24, 50, and 11. In another embodiment, when the width-to-height ratio is 8:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 14, 18, 22, 50, and 13. In yet another embodiment, when the width-to-height ratio is 16:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 16, 18, 20, 50, and 15.

[0026] When the width-to-height ratio of the current chrominance block is 1:2, the post-mapped intra modes replaced by the WAIP mode mapping are modes 61 to 66; when the width-to-height ratio of the current chrominance block is 1:4, the post-mapped intra modes replaced by the WAIP mode mapping are modes 57 to 66; when the width-to-height ratio of the current chrominance block is 1:8, the post-mapped intra modes replaced by the WAIP mode mapping are modes 55 to 66; and when the width-to-height ratio of the current chrominance block is 1:16, the post-mapped intra modes replaced by the WAIP mode mapping are modes 53 to 66.

[0027] When the width-to-height ratio of the current chrominance block is 2:1, the post-mapped intra modes replaced by the WAIP mode mapping are modes 2 to 7; when the width-to-height ratio of the current chrominance block is 4:1, the post-mapped intra modes replaced by the WAIP mode mapping are modes 2 to 11; when the width-to-height ratio of the current chrominance block is 8:1, the post-mapped intra modes replaced by the WAIP mode mapping are modes 2 to 13; and when the width-to-height ratio of the current chrominance block is 16:1, the post-mapped intra modes replaced by the WAIP mode mapping are modes 2 to 15.

[0028] In some embodiments, the step of mapping this luminance mode to the mapped intra mode for the current chrominance block is performed by referring to a mapping table, and this mapping table is used for all chrominance blocks encoded or to be encoded in direct mode DM, regardless of their width-to-height ratio. In one embodiment, by referring to this mapping table, this luminance mode of mode 61 or mode 62 is mapped to mode 57, and this luminance mode of mode 57 or mode 58 is mapped to mode 55. According to one embodiment, this luminance mode of modes 2 to 7 is mapped to modes 61 to 66.

[0029] Some aspects of the present disclosure further provide an apparatus in a video coding and decoding system for: receiving input data related to a current chrominance block encoded or to be encoded by intra prediction in a current picture encoded by a 4:2:2 color format; determining a luminance mode of a luminance block corresponding to the current chrominance block; mapping the luminance mode to a mapped intra mode for the current chrominance block; selectively replacing the mapped intra mode with a WAIP mode mapping based on the width-to-height ratio of the current chrominance block; after the WAIP mode mapping, deriving an intra predictor according to the mapped intra mode; and encoding or decoding the current chrominance block according to the intra predictor. When the luminance mode is mode 61, the mapped intra mode is mode 57; and when the luminance mode is mode 57, the mapped intra mode is mode 55.

[0030] Some aspects of the present disclosure further provide a non-transitory computer-readable medium for storing program instructions, the program instructions causing a processing circuit of an apparatus to encode or decode video data by intra prediction, the video data being video data of a current chrominance block in a current picture encoded by a 4:2:2 color format. The luminance mode of the co-located luminance block is mapped to a mapped intra mode, where when the luminance mode is mode 61, the mapped intra mode is mode 57, and when the luminance mode is mode 57, the mapped intra mode is mode 55. The proposed chrominance mode mapping ensures that the mapped intra mode for a chrominance block pointing to the lower left corner is a distinct mode different from any possible mapped intra mode for this chrominance block. Through a review of the following detailed description of specific embodiments, other aspects and features of the present invention will become apparent to those of ordinary skill in the art.

Description of the Drawings

[0031] The various embodiments in which the present disclosure is presented as an example will be explained in more detail with reference to the following drawings, where like numbers are used to refer to like elements, and where:

[0032] Figure 1Shows 33 angular intra prediction modes supported by the HEVC standard.

[0033] Figure 2 Shows exemplary reference samples filtered by an intra smoothing filter to derive an intra prediction candidate for the current block.

[0034] Figure 3A Shows applying intra gradient filtering to a candidate predicted by the vertical mode of intra prediction.

[0035] Figure 3B Shows applying intra gradient filtering to a candidate predicted by the angular mode of intra prediction.

[0036] Figure 4 Shows examples of 65 angular intra prediction modes.

[0037] Figure 5A And 5B Shows reference samples for wide-angle intra prediction applied to two exemplary rectangular blocks.

[0038] Figure 6A And 6B Shows a simplified block diagram to illustrate intra mode derivation for luminance and chrominance components.

[0039] Figure 7A Shows a square luminance block encoded and decoded in 4:2:2 color format; Figure 7B Shows the corresponding chrominance blocks with mapped intra modes derived by traditional chrominance mode mapping methods; and Figure 7C Shows the corresponding chrominance blocks with mapped intra modes derived by chrominance mode mapping according to an embodiment of the present invention.

[0040] Figure 8A Shows a luminance block with a width-to-height ratio of 1:2 encoded and decoded in a 4:2:2 color format; Figure 8B Shows the corresponding chrominance blocks with mapped intra modes derived by traditional chrominance mode mapping methods; and Figure 8C Shows the corresponding chrominance blocks with mapped intra modes derived by chrominance mode mapping according to an embodiment of the present invention.

[0041] Figure 9ADepicts a luminance block encoded and decoded in a 4:2:2 color format with a width-to-height ratio of 1:4; Figure 9B Depicts corresponding chrominance blocks with mapped intra modes, which are derived by a conventional chrominance mode mapping method; and Figure 9C Depicts corresponding chrominance blocks with mapped intra modes, which are derived by chrominance mode mapping according to an embodiment of the present invention.

[0042] Figure 10A Depicts a chrominance block with a width-to-height ratio of 1:16 and a mapped intra mode derived by chrominance mode mapping according to an embodiment of the present invention; Figure 10B Depicts a chrominance block with a width-to-height ratio of 2:1 and a mapped intra mode derived by chrominance mode mapping according to an embodiment of the present invention; Figure 10C Depicts a chrominance block with a width-to-height ratio of 4:1 and a mapped intra mode derived by chrominance mode mapping according to an embodiment of the present invention; Figure 10D Depicts a chrominance block with a width-to-height ratio of 8:1 and a mapped intra mode derived by chrominance mode mapping according to an embodiment of the present invention; and Figure 10E Depicts a chrominance block with a width-to-height ratio of 16:1 and a mapped intra mode derived by chrominance mode mapping according to an embodiment of the present invention.

[0043] Figure 11 Is a flowchart depicting an example video processing method according to an embodiment of the present invention.

[0044] Figure 12 Is an exemplary system block diagram according to an embodiment of the present invention for embodying a video encoding system of a video processing method.

[0045] Figure 13 Is an exemplary system block diagram according to an embodiment of the present invention for embodying a video decoding system of a video processing method.

Detailed Description

[0046] It is easily understandable that the various modules and components of the present invention generally described and illustrated in the accompanying drawings herein can be arranged and designed in various different configurations. Therefore, as shown in the drawings, the following more detailed description of the embodiments of the system and method of the present invention is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention.

[0047] References to "embodiments", "some embodiments", or similar language in this specification mean that the specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present invention. Thus, the phrases "in an embodiment" or "in some embodiments" that appear throughout this specification do not necessarily all refer to the same embodiment, and these embodiments can be implemented individually or in combination with one or more other embodiments. Additionally, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. However, those skilled in the art will recognize that the present invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other instances, well-known structures or operations are not shown or described in detail to avoid obscuring aspects of the present invention.

[0048] Figure 6A With 6B A simplified block diagram is shown for intra-mode derivation in the 4:2:2 color format for luminance and chrominance components. As Figure 6A shown, the luminance mode of a luminance block is generated by a Wide Angle IntraPrediction (WAIP) mode mapping module 62 to produce a final intra-mode for the luminance block. The luminance mode of the luminance block is signaled in the video bitstream by MPM signaling or fixed-length signaling (depending on whether the luminance mode belongs to one of the MPMs). Based on the width-to-height ratio of the luminance block, only the modes listed in Table 1 are replaced by the corresponding wide-angle modes after WAIP mode mapping. As shown in Figure 6B, if the DirectMode (DM) is selected for a chrominance block, the corresponding luminance mode is converted by a 4:2:2 chrominance intra-mode mapping module 64 to produce a mapped intra-mode for the chrominance block. The corresponding luminance intra-mode is signaled or parsed from the video bitstream for the co-located luminance block of the chrominance block. Then the mapped intra-mode is processed by a WAIP mode mapping module 66 to produce a final intra-mode for the chrominance block. If the chrominance block is not encoded / decoded by the direct mode DM, the chrominance intra-mode of the chrominance block is determined and then processed by a WAIP mode mapping module 66 to produce a final intra-mode for the chrominance block. After WAIP mode mapping, the chrominance intra-mode (rather than the final intra-mode) is signaled in the video bitstream. Based on the width-to-height ratio of the chrominance block, only the intra-modes listed in Table 1 are replaced by the corresponding wide-angle modes after WAIP mode mapping. After WAIP mode mapping, the final intra-mode for the luminance block or chrominance block is used to generate an intra-prediction.

[0049] Intra Mode Mapping for Chrominance Blocks with Aspect Ratio Equal to 1 / 2 When the 4:2:2 color format is selected, the intra mode mapping for chrominance is used to derive the chrominance intra mode of the chrominance blocks encoded or to be encoded in Direct Mode (DM). Specifically, the intra mode mapping converts the intra prediction mode of the corresponding luma block to the chrominance intra mode for the chrominance block. The intra prediction mode is the luma intra prediction mode signaled for the luma block corresponding to the chrominance block. Tables 2 and 3 are intra mode mapping tables used for the intra mode mapping in HEVC range extension and VTM-5.0 respectively, where VTM-5.0 is the software of VVC draft 5. There are 33 intra angular modes and 65 intra angular modes used for intra prediction in HEVC range extension and VTM-5.0 respectively. In Tables 2 and 3, modeIdx indicates the intra prediction mode of the corresponding luma block before the intra mode mapping for chrominance, and IntraPredModeC indicates the intra prediction mode after mapping for the chrominance blocks in the 4:2:2 color format. To handle non-square chrominance blocks in the 4:2:2 color format, the WAIP mode mapping is also used for the improvement of intra prediction after the intra mode mapping for chrominance to further change IntraPredModeC to the modified intra prediction mode.

[0050] Table 2. Intra Mode Mapping for Chrominance in HEVC Range Extension

[0051]

[0052] Table 3. Intra Mode Mapping for Chrominance in VTM-5.0

[0053]

[0054] Figure 7A An example of a square luma block is shown, and Figure 7BShows the corresponding chrominance blocks in 4:2:2 color format, having several mapped modes derived from Table 3 defined in VTM5.0. Since the luma block has a width-to-height ratio equal to 1:1, the corresponding chrominance block has a width-to-height ratio equal to 1:2. Some exemplary block sizes for the chrominance block are 64x128, 32x64, 16x32, 8x16, and 4x8 samples. To derive the intra prediction mode for the chrominance block, the mapped intra prediction mode IntraPredModeC for the chrominance block is first derived from the corresponding luma intra prediction mode modeIdx according to the mapping table. According to the width-to-height ratio, then the WAIP mode mapping procedure is selectively applied to IntraPredModeC to further map to the modified intra prediction mode. The modified intra prediction mode is used to generate the predicted samples for the chrominance block. As Figure 7A and 7B shown, modeIdx equal to 66 is mapped to 60, modeIdx equal to 8 is mapped to 2, and modeIdx equal to 34 is mapped to 40. For any modeIdx between mode 2 and mode 7, the mapped intra prediction mode IntraPredModeC is always 2.

[0055] Table 4. Intra mode mapping for chrominance in VTM-5.0

[0056]

[0057] Figure 7C Shows the corresponding chrominance blocks in 4:2:2 color format, having several mapped modes derived from Table 4 defined in VTM6.0. According to Table 4 and Figure 7C shown, when modeIdx is equal to 2, the mapped intra prediction mode IntraPredModeC is equal to 61; and when modeIdx is equal to 7, the mapped intra prediction mode IntraPredModeC is equal to 66. Based on the WAIP mode mapping procedure, when the mapped intra prediction mode IntraPredModeC is equal to any mode between 61 and 66, the WAIP mode mapping procedure maps IntraPredModeC to a mode between -6 and -1. For example, when IntraPredModeC of the chrominance block is equal to 61 and the width-to-height ratio of chrominance CB is 1:2, the intra prediction mode is replaced by mode -6. As Figure 7CAs shown, the mapped intra-frame modes of the chrominance blocks with a 1 / 2 ratio at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are mode 61, 18, 40, 50, and 60 respectively. Among these mapped intra-frame modes, after the WAIP mode mapping program, only the mapped intra-frame mode at the lower left corner is replaced by mode -6, and the remaining mapped modes remain unchanged after the WAIP mode mapping.

[0058] Intra-frame mode mapping for chrominance blocks with a ratio equal to 1 / 4 Figure 8A An example of a luminance block with a width-to-height ratio equal to 1:2 is shown; and Figure 8B and Figure 8C The corresponding chrominance blocks for the 4:2:2 color format with a width-to-height ratio equal to 1:4 are shown. For example, in Figure 8B or Figure 8C the size of the chrominance blocks is 16x64, 8x32, or 4x16 samples. Figure 8B The mapped intra-frame modes shown for the chrominance blocks are derived from the 4:2:2 chrominance intra-frame mode mapping according to Table 4 defined in VTM6.0. It should be noted that as Figure 8B shown, the mapped intra-frame mode of the chrominance block at the lower left corner and the mapped intra-frame mode at the upper right corner are both equal to 56. For chrominance blocks with a width-to-height ratio equal to 1:4, when IntraPredModeC is equal to 56 (since this mode corresponds to the upper right corner), the last intra-frame mode remains 56 after the wide-angle mode conversion. Embodiments of the present invention modify the 4:2:2 intra-frame mode mapping for chrominance to distinguish the mapped intra-frame modes at the lower left corner and at the upper right corner for chrominance blocks with a width-to-height ratio equal to 1:4. An example of the modified 4:2:2 intra-frame mode mapping table for chrominance is shown in Table 5. The mapping table shown in Table 5 is used for all chrominance blocks to be encoded or decoded with DM, in other words, this mapping table is applicable to all types of width-to-height ratios. Compared with Table 4, most of the mapped intra-frame modes IntraPredModeC in Table 5 remain unchanged (except for the numbers marked in bold). Figure 8C The mapped intra-frame modes shown for the chrominance blocks are derived from the modified 4:2:2 mode mapping table according to embodiments of the present invention. Figure 8CThe mapped intra-frame mode for the chrominance block in the lower left corner shown is 57, which is a distinct mode different from the mapped intra-frame mode in the upper right corner. For a chrominance block with a width-to-height ratio equal to 1:4 and encoded / decoded in DM, when the corresponding luma mode modeIdx is equal to 61, the mapped intra-frame prediction mode IntraPredModeC is 57. For a chrominance block with a width-to-height ratio equal to 1:4, the WAIP mode mapping converts any mapped intra-frame mode between modes 57 to 66 to modes -10 to -1. At both the encoder and the decoder, after the wide-angle mode conversion, the mapped intra-frame prediction mode of mode 57 is replaced by mode -10, and the intra-frame prediction sub for the chrominance block is derived based on mode -10 in intra-frame prediction. Figure 8C In the illustrated embodiment, the mapped intra-frame modes for chrominance blocks with a ratio of 1 / 4 in the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are mode 57, 18, 44, 50, and 56 respectively. Among these mapped intra-frame modes, after the WAIP mode mapping for intra-frame prediction sub generation, only the mapped intra-frame mode in the lower left corner is replaced by the wide-angle mode, and the remaining mapped modes remain unchanged after the WAIP mode mapping for intra-frame prediction sub generation.

[0059] Table 5. Intra-frame mode mapping for chrominance according to an embodiment

[0060]

[0061] The intra-frame mode mapping for chrominance blocks with a ratio equal to 1 / 8 is similar to that for chrominance blocks with a width-to-height ratio of 1 / 4. When the prediction direction for a chrominance block with a width-to-height ratio of 1 / 8 points to the lower left corner, according to the traditional chrominance mode mapping method, the mapped intra-frame prediction mode 54 is the same as the mapped intra-frame prediction mode for the prediction direction pointing to the upper right corner. The corrected 4:2:2 mode mapping table shown in Table 5 also addresses this shortcoming for chrominance blocks with a width-to-height ratio of 1 / 8. Figure 9A An example of a luma block encoded / decoded in 4:2:2 color format and having a width-to-height ratio equal to 1 / 4 is shown; and Figure 9B and Figure 9C The corresponding chrominance blocks with a width-to-height ratio equal to 1 / 8 are shown. For example, the size of the chrominance blocks in Figure 9B or Figure 9C is 8x64 or 4x32 samples. Figure 9B The mapped intra-frame modes shown for chrominance blocks are derived from the 4:2:2 chrominance mode mapping according to Table 4 defined in VTM6.0. In Figure 9BIn it, the post - mapped intra - mode for the chrominance block in the lower - left corner and in the upper - right corner is 54 for both cases. Figure 9C The post - mapped intra - mode shown for the chrominance block is derived from mapping the modified 4:2:2 chrominance intra - mode according to an embodiment of the present invention. In Figure 9C it, when the prediction direction points to the lower - left corner, the post - mapped intra - mode for the chrominance block is 55, which is a distinct mode compared to all other possible post - mapped intra - modes for this chrominance block. When the prediction direction points to the lower - left corner, after the wide - angle mode conversion, the final intra - mode for deriving the intra - predictor for this chrominance block is - 12. For a chrominance block with a width - to - height ratio of 1:8, the post - mapped intra - modes replaced by the WAIP mode mapping are modes 55 to 66. After the WAIP mode mapping for intra - predictor generation, the post - mapped intra - modes 55 to 66 are converted to modes - 12 to - 1. Figure 9C In the illustrated embodiment, the post - mapped intra - modes for chrominance blocks with a ratio of 1 / 8 in the lower - left corner, directly to the left, upper - left corner, directly above, and upper - right corner are modes 55, 18, 46, 50, and 54 respectively. Among these post - mapped intra - modes, after the WAIP mode mapping for intra - predictor generation, only the post - mapped intra - mode in the lower - left corner is replaced by mode - 2, and the remaining mapped modes remain unchanged after the WAIP mode mapping.

[0062] Intra - mode mapping for chrominance blocks with other ratios Some embodiments of the present invention also consider intra - mode mapping for chrominance blocks with other width - to - height ratios. In one example, Figure 10A shows a chrominance block with a width - to - height ratio of 1:16. The exemplary size of this chrominance block is 64x4 samples. As Figure 10A shown, for a chrominance block with a width - to - height ratio of 1:16, the post - mapped intra - modes in the lower - left corner, directly to the left, upper - left corner, directly above, and upper - right corner are modes 53, 18, 48, 50, and 52 respectively. When the width - to - height ratio is 1:16, the post - mapped intra - modes replaced by the WAIP mode mapping are modes 53 to 66, and these post - mapped intra - modes are replaced by modes - 14 to - 1 respectively. After the WAIP mode mapping for intra - predictor generation, the post - mapped intra - mode in the lower - left corner is replaced by mode - 14. Since the remaining post - mapped intra - modes in the directly to the left, upper - left corner, directly above, and upper - right corner are not wide - angle modes, these modes are not changed by the WAIP mode mapping.

[0063] Figure 10BDepicts a chrominance block with a width-to-height ratio of 2:1. For example, the block size of this chrominance block is 128x64, 64x32, 32x16, 16x8, or 8x4 samples. In the 4:2:2 color format, the width-to-height ratio of the corresponding luma block is 4:1. For example, the block size of this chrominance block is 128x32, 64x16, 32x8, or 16x4 samples. In Figure 10B the illustrated embodiment, the post-mapped intra modes for this chrominance block at the lower left corner, directly left, upper left corner, directly above, and upper right corner are mode 8, 18, 38, 50, and 7, respectively. When the width-to-height ratio is 2:1, the post-mapped intra modes replaced by the WAIP mode mapping are modes 2 to 7, and these post-mapped intra modes are replaced by modes 67 to 72. In Figure 10B the shown post-mapped intra modes, only the one at the upper right corner belongs to the wide-angle mode. Therefore, after the WAIP mode mapping for intra predictor generation, the post-mapped intra mode at the upper right corner is replaced by mode 72.

[0064] Figure 10C Depicts a chrominance block with a width-to-height ratio of 4:1. For example, the block size of this chrominance block is 128x32, 64x16, 32x8, or 16x4 samples. In the 4:2:2 color format, the width-to-height ratio of the corresponding luma block is 8:1. In Figure 10C the illustrated embodiment, the post-mapped intra modes for this chrominance block at the lower left corner, directly left, upper left corner, directly above, and upper right corner are mode 12, 18, 24, 50, and 11, respectively. When the width-to-height ratio is 4:1, the post-mapped intra modes converted by the WAIP mode mapping are modes 2 to 11, and these post-mapped intra modes are replaced by modes 67 to 76. After the WAIP mode mapping for intra predictor generation, the post-mapped intra mode at the upper right corner is replaced by mode 76.

[0065] Similar to Figure 10B and 10C , Figure 10D and 10E depict chrominance blocks with width-to-height ratios of 8:1 and 16:1, respectively. For example, Figure 10D the block size of the chrominance block in Figure 10E is 64x8 or 32x4 samples, and Figure 10DIn the illustrated embodiment, the post-mapped intra modes for the chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are modes 14, 18, 22, 50, and 13. When the width-to-height ratio is 8:1, the post-mapped intra mode converted by the WAIP mode mapping is modes 2 to 13. After the WAIP mode mapping for intra predictor generation, the post-mapped intra mode at the upper right corner is replaced by mode 78. In Figure 10E In the illustrated embodiment, the post-mapped intra modes for the chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are modes 16, 18, 20, 50, and 15. When the width-to-height ratio is 16:1, the post-mapped intra mode converted by the WAIP mode mapping is modes 2 to 15. After the WAIP mode mapping for intra predictor generation, the post-mapped intra mode at the upper right corner is replaced by mode 80.

[0066] Representative example flowchart Figure 11FIG. 0 is a flowchart of a video processing method according to an embodiment of the present invention for processing a current chrominance block encoded or to be encoded by direct mode (DM). In step S1102, a video encoder or decoder receives input data of a current chrominance block in a current picture encoded in a 4:2:2 color format. In step S1104, a bitwise luminance block luminance mode is determined for the current chrominance block. In step S1106, the video encoder or decoder maps the luminance mode to a mapped intra mode for the current chrominance block. In various embodiments of the present invention, for any width-to-height ratio, the mapped intra mode in the lower left corner and a mapped intra mode in the upper left corner are always distinct modes. In a particular embodiment, when the luminance mode is mode 61, the mapped intra mode is mode 57. For example, for a current chrominance block having a width-to-height ratio of 1:4, the luminance mode of mode 61 corresponds to a prediction direction pointing to the lower left corner, and the mapped intra mode in the lower left corner is mode 57, which is different from the mapped intra mode 56 used in the upper left corner. In another example, for a current chrominance block having a width-to-height ratio of 1:8, the luminance mode of mode 57 corresponds to a prediction direction pointing to the lower left corner, and the mapped intra mode in the lower left corner is mode 55, which is different from the mapped intra mode 54 used in the upper left corner. In step S1108, the video encoder or decoder checks whether to replace the mapped intra mode with a WAIP mode mapping based on the width-to-height ratio of the current chrominance block. In step S1110, if the answer in step S1108 is yes, the mapped intra mode is replaced with a WAIP mode mapping. For example, when the width-to-height ratio of the current chrominance block is 1:4, the mapped intra mode of mode 57 is replaced with mode -10; or when the width-to-height ratio of the current chrominance block is 1:8, the mapped intra mode of mode 55 is replaced with mode -12. In step S1112, after the WAIP mode mapping in step S1110, the replaced mapped intra mode is used to derive an intra predictor for the current chrominance block. If the answer in step S1108 is no, the mapped intra mode is directly used to derive an intra predictor for the current chrominance block. In step S1114, the video encoder or decoder encodes or decodes the current chrominance block according to the intra predictor derived in step S1112.

[0067] Maintaining Similarity in the Relative Directions of Intra - Mode for Luminance and Chrominance When the direct mode (DM) is selected for encoding / decoding these chrominance components, some other embodiments of the present invention maintain similarity in the relative directions of the intra - prediction modes for luminance and chrominance components. For example, for a binary - bit luminance coding block (CB), when the direction of the intra - prediction mode (mode 8 when the width - to - height ratio is equal to 2) is from the lower - left corner, it is better to use an intra - prediction mode with a direction from the lower - left corner for the chrominance CB. In this example, when the width - to - height ratio is equal to 1 / 2, the intra - prediction mode for the chrominance CB is mode - 6. Compared with traditional DM encoding / decoding, when DM is selected, the intra - prediction mode of the binary - bit luminance CB is directly specified as the intra - prediction mode for the chrominance CB. The intra - prediction mode of the chrominance block is changed according to the width and height of the chrominance CB by WAIP mode mapping. After WAIP mode mapping, the intra - prediction mode is used for intra - prediction. Embodiments of the present invention apply intra - mode mapping to make the relative directions of the intra - prediction modes for luminance and chrominance components similar.

[0068] In one embodiment, intra - mode mapping is applied in at least one of the following cases. In one case, when the chroma separate tree (CST) is used and chroma DM is selected, if the width - to - height ratios of the luminance and chrominance blocks are different, the relative directions for the luminance and chrominance components are different. When the chroma separate tree is used, the chrominance CB and the luminance CB are in different partition trees. In another case, if the width - to - height ratios of the reference adjacent block and the current block are different, the relative directions of the reference block and the current block for generating the MPM list are different.

[0069] In the previous embodiments, intra - mode mapping is applied before WAIP mode mapping; however, in some other embodiments, intra - mode mapping is applied after WAIP mode mapping.

[0070] In some embodiments of intra mode mapping, when the width-to-height ratio of the merged or reference block is greater than the width-to-height ratio of the current block, the intra prediction mode for the current block is close to the vertical direction. In one embodiment, the variable DiffLogRatio is defined as abs(log2(ratioWH1)) - abs(log2(ratioWH2)), where ratioWH1 is the width-to-height ratio of the merged or reference block and ratioWH2 is the width-to-height ratio of the current block. In this embodiment, Table 3 is directly looked up recursively, and each time after using Table 3, DiffLogRatio is decreased by one. The recursive look-up table operation is stopped when at least one of the following conditions is met. Condition one is met when the mode before looking up the table is the same as the mode after looking up the table. Condition two is met when DiffLogRatio is equal to zero.

[0071] In another embodiment, a chrominance block having a width-to-height ratio of 1:2 is encoded and decoded in direct mode DM, and the luma intra mode of the merged luma block is mode 34. The prediction direction of this luma intra mode points to the upper left corner. According to this embodiment, mode 40 is used for the chrominance block instead of directly using mode 34 for this chrominance block.

[0072] In another embodiment, when the width-to-height ratio of a merged or reference block is less than the width-to-height ratio of the current block, intra mode mapping is applied such that the intra prediction mode of the current block is close to the horizontal direction. The variable DiffLogRatio is defined as abs(log2(ratioWH1)) - abs(log2(ratioWH2)), where ratioWH1 is the width-to-height ratio of the merged or reference block and ratioWH2 is the width-to-height ratio of the current block. This embodiment directly looks up Table 3 recursively, and each time after looking up Table 3, DiffLogRatio is decreased by one. The recursive look-up table operation is stopped when at least one of the following conditions is met. The first condition is met when the mode before looking up the table is the same as the mode after looking up the table. The second condition is met when this variable DiffLogRatio is equal to zero. The difference (diffPredMode) between the original intra prediction mode and the intra prediction mode after intra mode mapping is obtained. The original intra prediction mode and diffPredMode can be used as inputs to change the intra prediction mode. If the mode value of the original intra prediction mode is less than the mode value of the vertical direction, the intra prediction mode is set to the original intra prediction - diffPredMode; otherwise, if the mode value of the original intra prediction mode is greater than the mode value of the vertical direction, the intra prediction mode is set to the original intra prediction mode + diffPredMode.

[0073] In another embodiment, after intra-mode mapping, the intra prediction mode is restricted to a range of directional modes. For example, this range of directional modes is [2, 33] when there are a total of 35 intra prediction modes; and is [2, 65] when there are a total of 67 intra prediction modes. In yet another embodiment, the intra prediction mode of the current block is restricted to the wide-angle modes within the range for that current block. In another embodiment, intra-mode mapping is only used for angular modes and not for non-angular modes such as Planar and DC modes.

[0074] In some embodiments, a check is required to ensure that the intra prediction mode after intra-mode mapping is not equal to any of the preset chroma modes. For example, the preset chroma modes include one or a combination of the Linear Model (LM) family modes (such as Cross-Component Linear Model (CCLM), CCLM_LEFT, and CCLM_TOP, horizontal mode, vertical mode, and diagonal mode). If the intra prediction mode is equal to one of the preset chroma modes, an adjacent intra prediction mode (such as intra prediction mode +1 or intra prediction mode –1) is then used. In the previous embodiment, the unit of CB can be replaced by the unit of TB.

[0075] Representative block diagram Figure 12FIG. 1200 is an exemplary system block diagram of a video encoder that implements one or more video processing methods of the present invention. The current chrominance block will be encoded based on the neighboring reconstructed samples according to the direct mode (DM). The current chrominance block is located in the current picture encoded and decoded in the 4:2:2 color format. The intra prediction module 1210 determines the luminance mode of the co-located luminance block of the current chrominance block. According to a mapping table (such as the mapping table shown in Table 5), the luminance mode is mapped to the mapped intra mode. According to an embodiment of the present invention, when the luminance mode is mode 61, the mapped intra mode is mode 57, and when the luminance mode is mode 57, the mapped intra mode is mode 55. Based on the width-to-height ratio of the current chrominance block, the intra prediction module 1210 selectively replaces the mapped intra mode with a WAIP mode mapping. After the WAIP mode mapping, the intra prediction module 1210 generates an intra prediction candidate from the reference samples of the current chrominance block according to the mapped intra mode. The inter prediction module 1212 performs motion estimation (ME) and motion compensation (MC) on the block to be encoded and decoded by inter prediction based on the video data from one or more other pictures to provide an inter prediction candidate. One of the intra prediction module 1210 or the inter prediction module 1212 provides the selected prediction candidate to the addition module 1216 to form a prediction error, also known as a prediction residual. Since the current chrominance block is encoded by intra prediction, the intra prediction module 1210 transmits the intra prediction candidate for the current chrominance block to the addition module 1216 to generate a prediction residual for the current chrominance block.

[0076] The prediction residual of the current chrominance block is further processed by a transform module (T) 1218, followed by processing by a quantization module (Q) 1220. Then the transformed and quantized residual signal is encoded by an entropy encoder 1234 to form an encoded video bitstream. Then the encoded video bitstream is packetized together with side information. The transformed and quantized residual signal of the current chrominance block is processed by an inverse quantization module (IQ) 1222 and an inverse transform module (IT) 1224 to recover the prediction residual. As Figure 12As shown, the prediction residual is restored by adding it back to the selected predictor at the reconstruction module (REC) 1226 to generate a reconstructed sample. The reconstructed sample can be stored in the reference picture buffer (Ref.Pict.Buffer) 1232 and used to predict other pictures. The reconstructed sample from the REC 1226 may be subject to various impairments due to the encoding process. Therefore, before being stored in the reference picture buffer 1232, the in-loop processing deblocking filter (DF) 1228 and the in-loop filter 1230 can be applied to the reconstructed sample to further improve the picture quality. The syntax associated with the information for the in-loop processing deblocking filter DF 1228 and the in-loop filter 1230 is provided to the entropy encoder 1234 to be incorporated into the encoded video bitstream.

[0077] For Figure 12 the corresponding video decoder 1300 of the video encoder 1200 as Figure 13As shown. The encoded video bitstream is the input to video decoder 1300 and is decoded by entropy decoder 1310 to parse and restore the transformed and quantized residual signals and other system information. Except that decoder 1300 only needs the motion compensation prediction in inter prediction module 1314, the decoding process of decoder 1300 is similar to the reconstruction loop at encoder 1200. Each block is decoded by intra prediction module 1312 or inter prediction module 1314. According to the decoded mode information, switch module 1316 selects an intra predictor from intra prediction module 1312 or an inter predictor from inter prediction module 1314. Intra prediction module 1312 decodes and the luminance mode of the block is used for the current chrominance block encoded and decoded in direct mode DM. According to various embodiments of the present invention, the luminance mode is mapped to a mapped intra mode, where the mapped intra mode for the prediction direction pointing to the lower left corner is a distinct mode different from the mapped intra mode for the prediction direction pointing to the upper left corner. For example, when the luminance mode for the current chrominance block with a width-to-height ratio of 1:4 is mode 61, the mapped intra mode is mode 57, and when the luminance mode for the current chrominance block with a width-to-height ratio of 1:8 is mode 57, the mapped intra mode is mode 55. Based on the width-to-height ratio of the current chrominance block, the mapped intra mode is selectively replaced by WAIP mode mapping. After this WAIP mode mapping, intra prediction module 1312 derives the intra predictor for the current chrominance block from the reference samples of the current chrominance block according to the mapped intra mode. The transformed and quantized residual signals associated with each block are restored by inverse quantization (IQ) module 1320 and inverse transformation (IT) module 1322. The restored transformed and quantized residual signal is reconstructed by adding back the predictor in reconstruction REC module 1318 to generate the reconstructed samples. The reconstructed samples are further processed by deblocking filter DF 1324 and in-loop filter 1326 to generate the final decoded video. If the current decoded picture is a reference picture, the reconstructed samples of the current decoded picture are also stored in reference picture buffer 1328 according to the decoding order for subsequent pictures.

[0078] Figure 12 and Figure 13Various components of the video encoder 1200 and the video decoder 1300 in [the context] can be implemented by hardware components, one or a plurality of processors configured to execute program instructions stored in a memory, or a combination of hardware and processors. For example, the processor executes program instructions to control mapping a luminance mode to a mapped intra mode for each chrominance block to be encoded or decoded in direct mode DM. The processor is equipped with a single or a plurality of processing cores. In some examples, the processor executes program instructions to perform functions in some components of the encoder 1200 and the decoder 1300, and the memory electrically coupled to the processor is used to store program instructions, information corresponding to the reconstructed video of the block, and / or intermediate data during the encoding or decoding process. In some embodiments, the memory includes a non-transitory computer-readable medium, such as semiconductor or solid-state memory, random access memory (RAM), read-only memory (ROM), hard disk, optical disk, or other suitable storage media. The memory can also be a combination of two or more of the non-transitory computer-readable media listed above. As Figure 12 and Figure 13 shown, the encoder 1200 and the decoder 1300 can be implemented in the same electronic device. Thus, if implemented in the same electronic device, various functional components of the encoder 1200 and the decoder 1300 can be shared or reused. For example, Figure 12 one or a plurality of the reconstruction module 1226, inverse transformation module 1224, inverse quantization module 1222, deblocking filter 1228, in-loop filter 1230, and reference picture buffer 1232 in [the context] can also be used respectively as Figure 13 the reconstruction module 1318, inverse transformation module 1322, inverse quantization module 1320, deblocking filter 1324, in-loop filter 1326, and reference picture buffer 1328 in [the context].

[0079] In an embodiment of a processing method for a video codec system, it can be implemented in a circuit integrated in a video compression chip, or by program code integrated in a video compression software to execute the processing described above. For example, selecting one filter among multiple reference sample filters for each intra-coded block can be implemented in program code executed on a computer processor, a digital signal processor (DSP), a microprocessor, or a field programmable gate array (FPGA). These processors can be configured to perform specific tasks according to the present invention by executing machine-readable software code or firmware code that defines the specific methods embodied in the present invention.

[0080] Without departing from the spirit or essential characteristics of the present invention, the present invention may be embodied in other specific forms. The described examples are considered illustrative in all respects and not restrictive. Thus, the scope of the present invention is indicated by the appended claims rather than the foregoing description. All changes that come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims

1. A video processing method in a video codec system, comprising: Receiving input video data related to a current chrominance block in a current picture encoded and decoded in a 4:2:2 color format; Determining a luminance mode of a luminance block corresponding to the current chrominance block; Mapping the luminance mode to a mapped intra mode for the current chrominance block, wherein when the luminance mode is mode 61, the mapped intra mode is mode 57, and when the luminance mode is mode 57, the mapped intra mode is mode 55; Selectively replacing the mapped intra mode with a wide-angle intra prediction mode mapping based on a width-to-height ratio of the current chrominance block; After the wide-angle intra prediction mode mapping, deriving an intra predictor for the current chrominance block according to the mapped intra mode; And Encoding or decoding the current chrominance block according to the intra predictor, wherein the current chrominance block is encoded or to be encoded in direct mode, and the luminance block is a co-located block of the current chrominance block.

2. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio of the current chrominance block is 1:4, the mapped intra mode of mode 57 corresponds to a prediction direction pointing to the lower left corner.

3. The video processing method in a video codec system according to claim 2, wherein after the wide-angle intra prediction mode mapping, the mapped intra mode of mode 57 is replaced by mode -10.

4. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio of the current chrominance block is 1:8, the mapped intra mode of mode 55 corresponds to a prediction direction pointing to the lower left corner.

5. The video processing method in a video codec system according to claim 4, wherein after the wide-angle intra prediction mode mapping, the mapped intra mode of mode 55 is replaced by mode -12.

6. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 1:4, the mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 57, 18, 44, 50, and 56.

7. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 1:8, the mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 55, 18, 46, 50, and 54.

8. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 1:16, the mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 53, 18, 48, 50, and 52.

9. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 2:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 8, 18, 38, 50, and 7, respectively.

10. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 4:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 12, 18, 24, 50, and 11, respectively.

11. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 8:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 14, 18, 22, 50, and 13, respectively.

12. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio is 16:1, the post-mapped intra modes for the current chrominance block at the lower left corner, directly to the left, upper left corner, directly above, and upper right corner are 16, 18, 20, 50, and 15, respectively.

13. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio of the current chrominance block is 1:2, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 61 to 66; when the width-to-height ratio of the current chrominance block is 1:4, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 57 to 66; when the width-to-height ratio of the current chrominance block is 1:8, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 55 to 66; and when the width-to-height ratio of the current chrominance block is 1:16, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 53 to 66.

14. The video processing method in a video codec system according to claim 1, wherein when the width-to-height ratio of the current chrominance block is 2:1, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 2 to 7; when the width-to-height ratio of the current chrominance block is 4:1, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 2 to 11; when the width-to-height ratio of the current chrominance block is 8:1, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 2 to 13; and when the width-to-height ratio of the current chrominance block is 16:1, the post-mapped intra modes replaced by wide-angle intra prediction mode mapping are modes 2 to 15.

15. The video processing method in a video codec system according to claim 1, wherein the step of mapping the luminance mode to the mapped intra mode for the current chrominance block is performed by referring to a mapping table, where the mapping table is used for all chrominance blocks encoded or to be encoded in direct mode and having different width-to-height ratios.

16. The video processing method in a video codec system according to claim 15, wherein by referring to the mapping table, the luminance mode of mode 61 or mode 62 is mapped to mode 57, the luminance mode of mode 57 or mode 58 is mapped to mode 55, and the luminance modes of modes 2 to 7 are mapped to modes 61 to 66.

17. An apparatus for processing video data in a video codec system, the apparatus comprising one or more electronic circuits configured to: receive input video data related to a current chrominance block in a current picture encoded in 4:2:2 color format; determine the luminance mode of the luminance block corresponding to the current chrominance block; map the luminance mode to a mapped intra mode for the current chrominance block, wherein when the luminance mode is mode 61, the mapped intra mode is mode 57, and when the luminance mode is mode 57, the mapped intra mode is mode 55; selectively replace the mapped intra mode with a wide-angle intra prediction mode mapping based on the width-to-height ratio of the current chrominance block; after the wide-angle intra prediction mode mapping, derive an intra predictor for the current chrominance block according to the mapped intra mode; and encode or decode the current chrominance block according to the intra predictor, wherein the current chrominance block is encoded or to be encoded in direct mode, and the luminance block is the bit-merged block of the current chrominance block.

18. A non-transitory computer-readable medium for storing program instructions, the program instructions causing the processing circuit of an apparatus to perform a method of video processing, and the method comprising: receive input video data related to a current chrominance block in a current picture encoded in 4:2:2 color format; determine the luminance mode of the luminance block corresponding to the current chrominance block; map the luminance mode to a mapped intra mode for the current chrominance block, wherein when the luminance mode is mode 61, the mapped intra mode is mode 57, and when the luminance mode is mode 57, the mapped intra mode is mode 55; selectively replace the mapped intra mode with a wide-angle intra prediction mode mapping based on the width-to-height ratio of the current chrominance block; after the wide-angle intra prediction mode mapping, derive an intra predictor for the current chrominance block according to the mapped intra mode; and encode or decode the current chrominance block according to the intra predictor, wherein the current chrominance block is encoded or to be encoded in direct mode, and the luminance block is the bit-merged block of the current chrominance block.

Citation Information

Patent Citations

  • Method and apparatus for encoding / decoding image and recording medium storing bit stream

    CN109792521A

  • Method and apparatus for intra chroma coding in image and video coding

    WO2018064948A1