Method and apparatus for intra mode selection
Patent Information
- Application Number
- PCT/CN2026/079742
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-14
- Filing Date
- 2026-02-24
- Publication Date
- 2026-09-17
Smart Images

Figure CN2026079742_17092026_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS FOR INTRA MODE SELECTIONCROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of priority to U.S. Provisional Application No. 63 / 772,302, entitled “METHOD AND APPARATUS FOR SEVERAL INTRA MODE SELECTION METHODS FOR VIDEO CODING” and filed on March 14, 2025, which is incorporated by reference herein in its entirety.BACKGROUND
[0002] Embodiments of the present disclosure relate to video coding.
[0003] Digital video has become mainstream and is being used in a wide range of applications including digital television, video telephony, and teleconferencing. These digital video applications are feasible because of the advances in computing and communication technologies as well as efficient video coding techniques. Various video coding techniques may be used to compress video data, such that coding on the video data can be performed using one or more video coding standards. Exemplary video coding standards may include, but are not limited to, versatile video coding (H. 266 / VVC) , high-efficiency video coding (H. 265 / HEVC) , advanced video coding (H. 264 / AVC) , moving picture expert group (MPEG) coding, enhanced video coding model (ECM) , to name a few.SUMMARY
[0004] According to one aspect of the present disclosure, a method of encoding is provided. The method may include performing, by a processor, a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The method may include performing, by the processor, a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The method may include encoding, by the processor, a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0005] According to another aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to perform a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to encode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0006] According to a further aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to perform a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to encode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0007] According to still another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a processor of an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to perform a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to encode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0008] According to still another aspect of the present disclosure, a method of transmitting a bitstream is provided. The method may include executing the method of encoding described herein to generate a bitstream. The method may include transmitting the bitstream.
[0009] According to still another aspect of the present disclosure, a non-transitory computer-readable storage medium, having a computer program and a bitstream stored thereon is provided. The computer program, when executed by a processor, may enable the processor to perform the method of encoding described herein to generate the bitstream.
[0010] These illustrative embodiments are mentioned not to limit or define the present disclosure, but to provide examples to aid understanding thereof. Additional embodiments are described in the Detailed Description, and further description is provided there.BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments of the present disclosure and, together with the description, further serve to explain the principles of the present disclosure and to enable a person skilled in the pertinent art to make and use the present disclosure.
[0012] FIG. 1 illustrates a block diagram of an exemplary encoding system, according to some embodiments of the present disclosure.
[0013] FIG. 2 illustrates a block diagram of an exemplary decoding system, according to some embodiments of the present disclosure.
[0014] FIG. 3 illustrates a detailed block diagram of an exemplary encoder in the encoding system in FIG. 1, according to some embodiments of the present disclosure.
[0015] FIG. 4 illustrates a detailed block diagram of an exemplary decoder in the decoding system in FIG. 2, according to some embodiments of the present disclosure.
[0016] FIG. 5 illustrates an exemplary picture divided into coding tree units (CTUs) , according to some embodiments of the present disclosure.
[0017] FIG. 6 illustrates an exemplary CTU divided into coding units (CUs) , according to some embodiments of the present disclosure.
[0018] FIG. 7 illustrates a schematic visualization of a current CU block and spatially adjacent and non-adjacent reconstructed samples to the current block, according to some embodiments of the present disclosure.
[0019] FIG. 8 illustrates a schematic visualization of the angular modes of VVC, according to some embodiments of the present disclosure.
[0020] FIG. 9 illustrates an example L-shaped neighborhood for a corresponding predicted block, according to some embodiments of the present disclosure.
[0021] FIG. 10 illustrates a flowchart of an exemplary method of encoding, according to some embodiments of the present disclosure.
[0022] Embodiments of the present disclosure will be described with reference to the accompanying drawings.DETAILED DESCRIPTION
[0023] Although some configurations and arrangements are discussed, it should be understood that this is done for illustrative purposes only. A person skilled in the pertinent art will recognize that other configurations and arrangements can be used without departing from the spirit and scope of the present disclosure. It will be apparent to a person skilled in the pertinent art that the present disclosure can also be employed in a variety of other applications.
[0024] It is noted that references in the specification to “one embodiment, ” “an embodiment, ” “an example embodiment, ” “some embodiments, ” “certain embodiments, ” etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases do not necessarily refer to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it would be within the knowledge of a person skilled in the pertinent art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
[0025] In general, terminology may be understood at least in part from usage in context. For example, the term “one or more” as used herein, depending at least in part upon context, may be used to describe any feature, structure, or characteristic in a singular sense or may be used to describe combinations of features, structures or characteristics in a plural sense. Similarly, terms, such as “a, ” “an, ” or “the, ” again, may be understood to convey a singular usage or to convey a plural usage, depending at least in part upon context. In addition, the term “based on” may be understood as not necessarily intended to convey an exclusive set of factors and may, instead, allow for the existence of additional factors not necessarily expressly described, again, depending at least in part on context.
[0026] Various aspects of video coding systems will now be described with reference to various apparatus and methods. These apparatus and methods will be described in the following detailed description and illustrated in the accompanying drawings by various modules, components, circuits, steps, operations, processes, algorithms, etc. (collectively referred to as “elements” ) . These elements may be implemented using electronic hardware, firmware, computer software, or any combination thereof. Whether such elements are implemented as hardware, firmware, or software depends upon the particular application and design constraints imposed on the overall system.
[0027] The techniques described herein may be used for various video coding applications. As described herein, video coding includes both encoding and decoding a video. Encoding and decoding of a video can be performed by the unit of block. For example, an encoding / decoding process such as transform, quantization, prediction, in-loop filtering, reconstruction, or the like may be performed on a coding block, a transform block, or a prediction block. As described herein, a block to be encoded / decoded will be referred to as a “current block. ” For example, the current block may represent a coding block, a transform block, or a prediction block according to a current encoding / decoding process. In addition, it is understood that the term “unit” used in the present disclosure indicates a basic unit for performing a specific encoding / decoding process, and the term “block” indicates a sample array of a predetermined size. Unless otherwise stated, the “block” and “unit” may be used interchangeably.
[0028] FIG. 1 illustrates a block diagram of an exemplary encoding system 100, according to some embodiments of the present disclosure. FIG. 2 illustrates a block diagram of an exemplary decoding system 200, according to some embodiments of the present disclosure. Each system 100 or 200 may be applied or integrated into various systems and apparatus capable of data processing, such as computers and wireless communication devices. For example, system 100 or 200 may be the entirety or part of a mobile phone, a desktop computer, a laptop computer, a tablet, a vehicle computer, a gaming console, a printer, a positioning device, a wearable electronic device, a smart sensor, a virtual reality (VR) device, an argument reality (AR) device, or any other suitable electronic devices having data processing capability. As shown in FIGs. 1 and 2, system 100 or 200 may include a processor 102, a memory 104, and an interface 106. These components are shown as connected to one another by a bus, but other connection types are also permitted. It is understood that system 100 or 200 may include any other suitable components for performing functions described here.
[0029] Processor 102 may include microprocessors, such as a graphic processing unit (GPU) , image signal processor (ISP) , central processing unit (CPU) , digital signal processor (DSP) , tensor processing unit (TPU) , vision processing unit (VPU) , neural processing unit (NPU) , synergistic processing unit (SPU) , or physics processing unit (PPU) , microcontroller units (MCUs) , application-specific integrated circuits (ASICs) , field-programmable gate arrays (FPGAs) , programmable logic devices (PLDs) , state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functions described throughout the present disclosure. Although only one processor is shown in FIGs. 1 and 2, it is understood that multiple processors can be included. Processor 102 may be a hardware device having one or more processing cores. Processor 102 may execute software. Software shall be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software modules, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. Software can include computer instructions written in an interpreted language, a compiled language, or machine code. Other techniques for instructing hardware are also permitted under the broad category of software.
[0030] Memory 104 can broadly include both memory (a.k.a, primary / system memory) and storage (a.k.a. secondary memory) . For example, memory 104 may include random-access memory (RAM) , read-only memory (ROM) , static RAM (SRAM) , dynamic RAM (DRAM) , ferro-electric RAM (FRAM) , electrically erasable programmable ROM (EEPROM) , compact disc read-only memory (CD-ROM) or other optical disk storage, hard disk drive (HDD) , such as magnetic disk storage or other magnetic storage devices, Flash drive, solid-state drive (SSD) , or any other medium that can be used to carry or store desired program code in the form of instructions that can be accessed and executed by processor 102. Broadly, memory 104 may be embodied by any computer-readable medium, such as a non-transitory computer-readable medium. Although only one memory is shown in FIGs. 1 and 2, it is understood that multiple memories can be included.
[0031] Interface 106 can broadly include a data interface and a communication interface that is configured to receive and transmit a signal in the process of receiving and transmitting information with other external network elements. For example, interface 106 may include input / output (I / O) devices and wired or wireless transceivers. Although only one memory is shown in FIGs. 1 and 2, it is understood that multiple interfaces can be included.
[0032] Processor 102, memory 104, and interface 106 may be implemented in various forms in system 100 or 200 for performing video coding functions. In some embodiments, processor 102, memory 104, and interface 106 of system 100 or 200 are implemented (e.g., integrated) on one or more system-on-chips (SoCs) . In one example, processor 102, memory 104, and interface 106 may be integrated into an application processor (AP) SoC that handles application processing in an operating system (OS) environment, including running video encoding and decoding applications. In another example, processor 102, memory 104, and interface 106 may be integrated into a specialized processor chip for video coding, such as a GPU or ISP chip dedicated to image and video processing in a real-time operating system (RTOS) .
[0033] As shown in FIG. 1, in encoding system 100, processor 102 may include one or more modules, such as an encoder 101. Although FIG. 1 shows that encoder 101 is within one processor 102, it is understood that encoder 101 may include one or more sub-modules that can be implemented on different processors located closely or remotely with each other. Encoder 101 (and any corresponding sub-modules or sub-units) can be hardware units (e.g., portions of an integrated circuit) of processor 102 designed for use with other components or software units implemented by processor 102 through executing at least part of a program, e.g., instructions. The instructions of the program may be stored on a computer-readable medium, such as memory 104, and when executed by processor 102, it may perform a process having one or more functions related to video encoding, such as picture partitioning, inter prediction, intra prediction, transformation, quantization, filtering, entropy encoding, etc., as described below in detail.
[0034] Similarly, as shown in FIG. 2, in decoding system 200, processor 102 may include one or more modules, such as a decoder 201. Although FIG. 2 shows that decoder 201 is within one processor 102, it is understood that decoder 201 may include one or more sub-modules that can be implemented on different processors located closely or remotely with each other. Decoder 201 (and any corresponding sub-modules or sub-units) can be hardware units (e.g., portions of an integrated circuit) of processor 102 designed for use with other components or software units implemented by processor 102 through executing at least part of a program, e.g., instructions. The instructions of the program may be stored on a computer-readable medium, such as memory 104, and when executed by processor 102, it may perform a process having one or more functions related to video decoding, such as entropy decoding, inverse quantization, inverse transformation, inter prediction, intra prediction, filtering, as described below in detail.
[0035] FIG. 3 illustrates a detailed block diagram of exemplary encoder 101 in encoding system 100 in FIG. 1, according to some embodiments of the present disclosure. As shown in FIG. 3, encoder 101 may include a partitioning module 302, an inter prediction module 304, an intra prediction module 306, a transform module 308, a quantization module 310, a dequantization module 312, an inverse transform module 314, a filter module 316, a buffer module 318, and an encoding module 320. It is understood that each of the elements shown in FIG. 3 is independently shown to represent characteristic functions different from each other in a video encoder, and it does not mean that each component is formed by the configuration unit of separate hardware or single software. That is, each element is included to be listed as an element for convenience of explanation, and at least two of the elements may be combined to form a single element, or one element may be divided into a plurality of elements to perform a function. It is also understood that some of the elements are not necessary elements that perform functions described in the present disclosure but instead may be optional elements for improving performance. It is further understood that these elements may be implemented using electronic hardware, firmware, computer software, or any combination thereof. Whether such elements are implemented as hardware, firmware, or software depends upon the particular application and design constraints imposed on encoder 101.
[0036] Partitioning module 302 may be configured to partition an input picture of a video into at least one processing unit. A picture can be a frame of the video or a field of the video. In some embodiments, a picture includes an array of luma samples in monochrome format, or an array of luma samples and two corresponding arrays of chroma samples. At this point, the processing unit may be a prediction unit (PU) , a transform unit (TU) , or a coding unit (CU) . Partitioning module 302 may partition a picture into a combination of a plurality of coding units, prediction units, and transform units, and encode a picture by selecting a combination of a coding unit, a prediction unit, and a transform unit based on a predetermined criterion (e.g., a cost function) .
[0037] Similar to H. 265 / HEVC, H. 266 / VVC is a block-based hybrid spatial and temporal predictive coding scheme. As shown in FIG. 5, during encoding, an input picture 500 is first divided into square blocks - CTUs 502, by partitioning module 302. For example, CTUs 502 can be blocks of 128×128 pixels. As shown in FIG. 6, each CTU 502 in input picture 500 can be partitioned by partitioning module 302 into one or more CUs 602, which can be used for prediction and transformation. Unlike H. 265 / HEVC, in H. 266 / VVC, CUs 602 can be rectangular or square, and can be coded without further partitioning into prediction units or transform units. For example, as shown in FIG. 6, the partition of CTU 502 into CUs 602 may include quadtree splitting (indicated in solid lines) , binary tree splitting (indicated in dashed lines) , and ternary splitting (indicated in dash-dotted lines) . Each CU 602 can be as large as its root CTU 502 or be subdivisions of root CTU 502 as small as 4×4 blocks, according to some embodiments.
[0038] Referring to FIG. 3, inter prediction module 304 may be configured to perform inter prediction on a prediction unit, and intra prediction module 306 may be configured to perform intra prediction on a prediction unit. It may be determined whether to use inter prediction or to perform intra prediction for the prediction unit, and determine specific information (e.g., intra prediction mode, motion vector, reference picture, etc. ) according to each prediction method. At this point, a processing unit for performing prediction may be different from a processing unit for determining a prediction method and specific content. For example, a prediction method and a prediction mode may be determined in a prediction unit, and transform may be performed in a transform unit. Residual coefficients in a residual block between the generated prediction block and the original block may be input into transform module 308. In addition, prediction mode information, motion vector information, and the like used for prediction may be encoded by encoding module 320 together with the residual coefficients or quantization levels into the bitstream. It is understood that in certain encoding modes, an original block may be encoded as it is without generating a prediction block through prediction module 304 or 306. It is also understood that in certain encoding modes, prediction, transform, and / or quantization may be skipped as well.
[0039] In some embodiments, inter prediction module 304 may predict a prediction unit based on information on at least one picture among pictures before or after the current picture, and in some cases, it may predict a prediction unit based on information on a partial area that has been encoded in the current picture. Inter prediction module 304 may include sub-modules, such as a reference picture interpolation module, a motion prediction module, and a motion compensation module (not shown) . For example, the reference picture interpolation module may receive reference picture information from buffer module 318 and generate pixel information of an integer number of pixels from the reference picture. In the case of a luminance pixel, a discrete cosine transform (DCT) -based 8-tap interpolation filter with a varying filter coefficient may be used to generate pixel information of an integer number of pixels by the unit of 1 / 4 pixels. In the case of a color difference signal, a DCT-based 4-tap interpolation filter with a varying filter coefficient may be used to generate pixel information of an integer number of pixels by the unit of 1 / 8 pixels. The motion prediction module may perform motion prediction based on the reference picture interpolated by the reference picture interpolation part. Various methods, such as a full search-based block matching algorithm (FBMA) , a three-step search (TSS) , and a new three-step search algorithm (NTS) may be used as a method of calculating a motion vector. The motion vector may have a motion vector value of a unit of 1 / 2, 1 / 4, or 1 / 16 pixels or integer pel based on interpolated pixels. The motion prediction module may predict a current prediction unit by varying the motion prediction method. Various methods, such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, an intra-block copy method, and the like, may be used as the motion prediction method.
[0040] Still referring to FIG. 3, in some embodiments, intra prediction module 306 may generate a prediction unit based on the information on reference pixels around the current block, which is pixel information in the current picture. The reference pixels may be located in reference lines non-adjacent to the current block. When a block in the neighborhood of the current prediction unit is a block on which inter prediction has been performed and thus, the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed may be used in place of reference pixel information of a block in the neighborhood on which intra prediction has been performed. That is, when a reference pixel is unavailable, at least one reference pixel among available reference pixels may be used in place of unavailable reference pixel information. In the intra prediction, the prediction mode may have an angular prediction mode that uses reference pixel information according to a prediction direction, and a non-angular prediction mode that does not use directional information when performing prediction. A mode for predicting luminance information may be different from a mode for predicting color difference information, and intra prediction mode information used to predict luminance information or predicted luminance signal information may be used to predict the color difference information. If the size of the prediction unit is the same as the size of the transform unit when intra prediction is performed, the intra prediction may be performed for the prediction unit based on pixels on the left side, pixels on the top-left side, and pixels on the top of the prediction unit. However, if the size of the prediction unit is different from the size of the transform unit when the intra prediction is performed, the intra prediction may be performed using a reference pixel based on the transform unit.
[0041] The intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to the reference pixel according to a prediction mode. The type of the AIS filter applied to the reference pixel may vary. In order to perform the intra prediction method, the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing in the neighborhood of the current prediction unit. When a prediction mode of the current prediction unit is predicted using the mode information predicted from the neighboring prediction unit, if the intra prediction modes of the current prediction unit are the same as the prediction unit in the neighborhood, information indicating that the prediction modes of the current prediction unit are the same as the prediction unit in the neighborhood may be transmitted using predetermined flag information, and if the prediction modes of the current prediction unit and the prediction unit in the neighborhood are different from each other, prediction mode information of the current block may be encoded by extra flags information.
[0042] As shown in FIG. 3, a residual module including a prediction module that has performed prediction based on the prediction module generated by prediction module 304 or 306 and residual coefficient information (also referred to herein as the “residual” ) , which is a difference value of the prediction unit with the original block, may be generated. The generated residual block may be input into transform module 308. Additional details of residuals and transforms for video coding will now be provided.
[0043] In hybrid video coding systems, redundancy in the video signal is first exploited by applying inter or intra prediction tools for each CU. The difference between the original samples of a CU and the prediction block for that CU is commonly referred to as the residual. Even after prediction, the residual may still be highly spatially correlated. Although conditional entropy coding can capture some spatial dependency between adjacent samples, it is computationally impractical to form entropy coding statistical models that can fully exploit spatial correlation in the residual. In contrast, transform coding is a practical and effective method for spatially decorrelating the residual.
[0044] For example, transform module 308 may transform the residual using an integerized version of the two-dimensional discrete cosine transform (DCT) , which may be applied separably in the horizontal and vertical directions. For an MxN block of residual samples (where M is the width of the block and N is the height of the block) , transform module 308 may obtain transform coefficients by applying an MxM DCT to each row, resulting in intermediate transform coefficients, and then applying an NxN DCT to each column of intermediate transform coefficients.
[0045] For intra-coded CUs (also referred to herein as “intra CUs” ) , spatial neighboring reconstructed samples are used to predict the current block, and the intra prediction mode is signaled once for the entire CU. Each CU consists of one or more collocated coding blocks (CBs) corresponding to the color components of the video sequence. For example, consumer video typically takes the 4: 2: 0 chroma format, in which case each CU consists of a luma CB and two chroma CBs with one-quarter the samples of the luma CB. Intra prediction and transform coding are performed at the prediction block (PB) and transform block (TB) level, respectively. Each CB consists of a single TB, except in the cases of Intra Subpartition (ISP) mode and implicit splitting. For luma CBs, the maximum side length of a TB is 64, and the minimum side length is 4. In addition, luma TBs are further specified as W × H rectangular blocks of width W and height H, where W, H ∈ {4, 8, 16, 32, 64} . For chroma CBs, the maximum TB side length is 32, and chroma TBs are rectangular W × H blocks of width W and height H. Here, W, H ∈ {2, 4, 8, 16, 32} , but blocks of shapes 2 × H and 4 × 2 are excluded in order to address memory architecture and throughput requirements.
[0046] FIG. 7 illustrates a schematic visualization 700 of a current CU block 702 and spatially adjacent and non-adjacent reconstructed samples to the current block, according to some aspects of the present disclosure. In FIG. 7, the number 0, 1, 2, . . . indicates the pixel-line index in relation to current CU block 702.
[0047] In VVC, the intra prediction samples for the current block are generated using reference samples that are obtained from reconstructed samples of neighboring blocks. For a W ×H block, the reference samples are spatially adjacent to the current block, consisting of the vertical line of 2·H reconstructed samples to the left of the block and extending downwards, the top left reconstructed sample, and the horizontal line of 2·W reconstructed samples above the current block and extending to the right. This “L” shaped set of samples may be referred to in this disclosure as a “reference line” . The reference line directly adjacent to current CU block 702 is shown as the line with index 0 in FIG. 7.
[0048] Similar to AVC and HEVC, VVC also supports angular intra prediction modes. Angular intra prediction is a directional intra prediction method. In comparison to HEVC, the angular intra prediction of VVC was modified by increasing the prediction accuracy and by an adaptation to the new partitioning framework. The former was realized by enlarging the number of angular prediction directions and by more accurate interpolation filters, while the latter was achieved by introducing wide-angular intra prediction modes. In VVC, the number of directional modes available for a given block is increased to 65 directions from the 33 HEVC directions. The angular prediction modes 800 of VVC are depicted in FIG. 8.
[0049] As shown, each angular direction is assigned a numeric value (an index value) which is called an intra prediction mode (IPM) . Intra prediction modes 0 and 1 are non-angular modes corresponding to “DC” and “planar” prediction, respectively. The directions having even indices between 2 and 66 are equivalent to the directions of the angular modes supported in HEVC. For blocks of square shape, an equal number of angular modes is assigned to the top and left side of a block. On the other hand, intra blocks of rectangular shape, which are not present in HEVC, are a central part of VVC’s partitioning scheme with additional intra prediction directions assigned to the longer side of a block. The additional modes allocated along a longer side are called Wide-Angle Intra Prediction (WAIP) modes, since they correspond to prediction directions with angles greater than 45° relative to the horizontal or vertical mode. A WAIP mode for a given mode index is defined by mapping the original directional mode to a mode that has the opposite direction with an index offset equal to one, as shown in FIG. 8. For a given rectangular block, the aspect ratio, i.e., the ratio of width to height, is used to determine which angular modes are to be replaced by the corresponding wide-angular modes.
[0050] For square-shaped blocks in VVC, each pair of predicted samples that are horizontally or vertically adjacent is predicted from a pair of adjacent reference samples. To the contrary, WAIP extends the angular range of directional prediction beyond 45°, and therefore, for a coding block predicted with a WAIP mode, adjacent predicted samples may be predicted from non-adjacent reference samples.
[0051] In addition to the directly adjacent line of neighboring samples, one of the two non-adjacent reference lines (line 1 and line 2) that are depicted in FIG. 7 may include the input samples for intra prediction in VVC. For ECM, more non-adjacent reference lines may be used. The use of adjacent and non-adjacent reference samples is referred to as multiple reference line (MRL) prediction.
[0052] The intra modes that can be used for MRL are the DC mode and the angular prediction modes. However, for a given block, not all of these modes can be combined with MRL. The MRL mode is always coupled with a mode in the Most Probable Mode (MPM) list in VVC. This coupling means that if non-adjacent reference lines are used, the intra prediction mode is one of the MPMs. Such a design of an MPM-based MRL prediction mode is motivated by the observation that non-adjacent reference lines are mainly beneficial for texture patterns with sharp and strongly directed edges. In these cases, MPMs are much more frequently selected since there is typically a strong correlation between the texture patterns of the neighboring and the current blocks. On the other hand, choosing a non-MPM for intra prediction is an indication that edges are not consistently distributed in neighboring blocks, and thus, the MRL prediction mode is expected to be less useful in this case. In addition, it has been observed that MRL does not provide additional coding gain when the intra prediction mode is the Planar mode, since this mode is typically used for smooth areas. Consequently, MRL excludes the Planar mode, which is always one of the MPMs. The angular or DC prediction process in MRL is very similar to the case of a directly adjacent reference line. However, for angular modes with a non-integer slope, a DCT-based interpolation filter (DCTIF) is always used. This design choice is both evidenced by experimental results and aligned with the empirical observation that MRL is mostly beneficial for sharp and strongly directed edges where the DCTIF is more appropriate since it retains more high frequencies than some other filters.
[0053] From a hardware design perspective, applying multiple reference lines as proposed in the initial methods requires extra cost of line buffers that are used for holding the additional reference lines. In typical hardware designs, line buffers are part of the on-chip memory architecture for image and video coding, and it is of great importance to minimize their on-chip area. To address this issue, MRL is disabled and not signaled for the coding units that are attached to the top boundary of the CTU. In this way, the extra buffers for holding non-adjacent reference lines are bounded by 128, which is the width of the largest unit size.
[0054] In some known approaches, an intra prediction fusion method was proposed to improve the accuracy of intra prediction. More specifically, if the current block is a luma block, and it is coded with a non-integer slope angular mode and not in the ISP mode, and the block size (width *height) is greater than 16, two prediction blocks generated from two different reference lines will be “fused, ” where the prediction fusion is calculated as a weighted summation of the two prediction blocks. More specifically, a first reference line at index i (linei) is specified with the current methods of signaling in the bitstream, and the prediction block generated from this reference line using the selected intra prediction mode is denoted as p (linei) , where p (·) represents the operation of generating a prediction block from a reference line with a given intra prediction mode. In the known approach, the reference line linei+1 is implicitly selected as the second reference line. That is, the second reference line is one index position further away from the current block relative to the first reference line. Similarly, the prediction block generated from the second reference line is denoted as p (linei+1) . The weighted sum of the two prediction blocks is obtained as follows and serves as the predictor for the current block according to equation (1) . pfusion=w0*p (linei) +w1*p (linei+1) (1) , where pfusion represents the fused prediction, w0 and w1 are two weighting factors, and they are set as 3 / 4 and 1 / 4 in the experiment, respectively.
[0055] Matrix-based position-dependent intra prediction (MPDIP) is a new intra prediction method under exploration in ECM. In selected cases that are described further below, MPDIP may be enabled and performed instead of conventional angular intra prediction. That is, MPDIP replaces the conventional angular prediction method in certain cases. There is no change to the number of intra prediction modes or the signaling of the selection.
[0056] In MPDIP, a matrix of weights F is selected based on both the block shape and the intra prediction mode. A matrix multiplication is directly applied with these weights to boundary reconstructed samples in an L-shaped neighbourhood 900 of the current block as shown in FIG. 9. Unlike conventional angular intra prediction, the neighbourhood may extend further to the above-right and below-left of the current block as shown in FIG. 9. FIG. 9 shows an L-shaped neighbourhood 900 of a current block p which has height H and width W. The L-shaped neighbourhood 900 consists of T1x2W samples to the above and above-right of the current block, T2x2H samples to the left and below-left of the current block, and T1xT2 samples in the corner to the above-left of the current block. In one example, T1 and T2 are both set to 2. In another example, T1 and T2 are both set to 1.
[0057] Each sample P (x, y) in the example of FIG. 9 can be calculated using equation (2) , shown below. P (x, y) =∑kF (x, y, n) *r (n) (2) , where the reference samples in the neighborhood are denoted as r (n) , n denotes the index of the reference sample in the neighbourhood and n = 0, 1, … (T1x2W + T2x2H + T1xT2 -1) , and (x, y) are coordinates of positions in the given prediction block p relative to the top-left corner of block p, ∑k () represents the sum of all k elements.
[0058] MPDIP is enabled for selected block sizes and selected intra prediction modes. It is enabled for blocks with width and height up to 32, except for 4x32, 32x4, 8x32 and 32x8 sizes. For blocks with both width and height less than or equal to 16, MPDIP is enabled when an intra prediction mode index of 0, 1, or (2+2*k) is selected where k is 0, 1, . . or 32, and MPDIP is performed instead of conventional angular prediction. For example, the current block is MPDIP eligible block size, e.g. 8x8, the intra prediction mode index 2 will use MPDIP (formula 2) instead of conventional angular prediction to generate the prediction. The neighborhood width is set to 2 (T1=T2=2) , and each sample in the prediction block is directly obtained from the matrix multiplication, such as shown above in the example of equation (2) . For other, generally larger, block sizes, MPDIP is enabled when an intra prediction mode index of 0, 1, or (2+4*k) is selected where k is 0, 1, . . or 16, and MPDIP is performed instead of conventional angular prediction. To limit the computational cost of the MPDIP with larger block sizes, the neighborhood width is set to 1 (T1=T2=1) ; and furthermore, MPDIP may produce a maximum output block of 16x16 samples. For blocks bigger than 16x16, the remaining samples are generated by bilinear interpolation. For all block sizes, block shape and mode-based symmetry are used. The neighborhood width and height are set to W and H for angular modes greater than 18 and less than 50;otherwise, the neighborhood width and height are set to 2*W and 2*H otherwise.
[0059] In the current implementation of MPDIP in ECM, other than the DC and planar modes, only even angular mode indices (e.g., 2, 4, …, 66) can signal MPDIP, depending on the block size.
[0060] For a CTU, the encoder chooses out of all possible, signallable combinations of partitioning, prediction, and transform, which one is selected (and signaled by appropriate syntax elements) to identify a current coding block and the prediction and transform it performs. The search space is undesirably large and may not be practically searched in a brute force manner, even in research-oriented reference software. Computational complexity may be limited in commercial encoders by heuristically disallowing some combinations in response to a selected preset. For example, particularly expensive prediction methods may be disabled for a “fast” preset. However, more generally, the encoder may perform a search according to some search algorithm. Search strategies are described further here in the context of searching intra prediction modes.
[0061] In ECM, the regular intra prediction modes are enumerated from 0 to 66 inclusive. The “best” mode for a current block minimizes a cost function J (m) =D (m) +λ*bits (m) for all intra prediction modes, where bits (m) is the bit cost resulting from selecting mode m, D (m) is the error between the original block’s samples and the samples the decoder will reconstruct for a selected mode, and λ is a parameter indicating the relative importance of bit cost and distortion for this decision. To model the cost function, both the distortion and bits components account for transforms, quantization, and entropy coding, which are performed on the residual resulting from a particular intra prediction mode. Moreover, depending on the desired accuracy, the distortion measure may be performed by summing absolute differences between the samples of the original and reconstructed block, or summing squared differences, or by computing a perceptual error metric from the two blocks. Performing a mode-selection search over these types of cost functions may be referred to as rate distortion optimization (RDO) .
[0062] To perform a mode-selection search in practical encoders, typically a proxy cost function is used, which may be referred to as a “non-RD cost function. ” The non-RD cost function is shown below in equation (3) and is similar to the true cost function J (m) . JnonRD (m) =DnonRD (m) +λ*bitsnonRD (m) (3) .
[0063] However, the distortion and bits components are instead calculated as approximations. For example, the bit cost may be determined for the signaling costs of the prediction mode considered and neglect any signaling costs of the transform coefficients. In other implementations, the bit cost may be neglected completely (e.g., the non-RD cost only consists of a distortion component) . The distortion component may only include the sum of absolute differences (SAD) between the original block of samples and the prediction block generated by the prediction mode m and neglect quantization. In another implementation, the distortion component may be the sum of absolute transformed differences (SATD) between the original block of samples and the prediction block generated by the prediction mode m and neglect quantization.
[0064] Because the non-RD cost function is an approximation, the mode that produces the lowest non-RD cost may not be the same as the best mode that optimizes the true cost function J(m) . However, computing this approximate cost may consume fewer time and computational resources since transform, quantization, and entropy coding can be skipped. Moreover, even when using the non-RD cost function, a practical encoder may not perform an exhaustive search (e.g., brute force) of all intra prediction modes.
[0065] In ECM, the intra prediction modes are searched across several rounds. In a first round, a non-exhaustive search is performed across intra prediction modes 0, 1, and the even numbered angular prediction modes (e.g., 2, 4, 6, …, 64, 66) generating non-RD costs. Among these 35 tested modes (nearly half of all the available regular intra prediction modes) in this first round, N modes with the smallest JnonRD are selected for further search in a second round of mode selection. Among the selected N modes, some may be angular modes. Because angular modes represent different intra prediction directions, the selected angular modes may guide the mode selection to the ultimate intra prediction direction that gives the best intra prediction for the current block. Therefore, the angular modes among these N selected modes are subject to fine-tuning in the second round of mode selection.
[0066] In the second round of mode selection, the ECM encoder further searches adjacent angular modes of each angular prediction mode selected from the first round. That is, for each angular mode Angmodeinx among the selected N modes from the first round, the non-RD cost defined in (3) is calculated for up to two adjacent modes (Angmodeinx+1) and (Angmodeinx-1) , depending on their existence. Both (Angmodeinx+1) and (Angmodeinx-1) are angular prediction modes with odd-numbered index values since Angmodeinx has an even-numbered index value.
[0067] The second round of mode selection does not test all available odd number angular modes since N is a relatively small number. A total of 35 intra modes is tested in the first round of mode selection and up to 2*N (e.g., 6) angular prediction modes are tested in the second round of mode selection. From the second round, M modes with the smallest non-RD cost are selected from a set of candidates which includes the N modes with the smallest non-RD cost selected from the first round of mode selection and up to 2*N tested modes from the second round of mode selection.
[0068] The best M modes are further tested in a final round of mode selection which searches these modes along with other available intra prediction methods (e.g., extrapolation-based intra prediction (EIP) , spatial geometric prediction mode (SGPM) , matrix-based intra prediction (MIP) , intra template matching (intraTMP) , decoder-side intra mode derivation (DIMD) , template-based intra mode derivation (TIMD) , template-based multiple reference line (TMRL) , etc. ) in a shortened list of options compared to the full range available. In the final round, the full RDO cost of each option is calculated and the intra mode with the smallest full RD cost is selected for coding the current block.
[0069] Practical encoders may use the same principles that are escribed in ECM but with a further computational reduction. For example, a practical encoder may select the best mode according to the non-RD cost in the second round and skip performing the RDO search altogether.
[0070] MPDIP may provide an improvement to prediction accuracy compared to the conventional angular prediction with the same prediction direction. However, MPDIP may consume an undesirable amount of computational resources to generate the prediction values because matrix multiplication is generally computationally complex. In the current ECM search algorithm, iterating over the angular prediction modes with even-numbered index values means that MPDIP prediction is performed repeatedly in the first pass. Solutions disclosed here may present a better trade-off between coding efficiency and computational complexity.
[0071] The main purpose of the first round of mode selection as described in ECM is to find an approximate intra prediction direction with relatively inexpensive search (e.g., using non-RD costs) . The first round tests angular prediction modes with even-numbered index values. Because MPDIP is generally enabled for angular prediction modes with even-numbered index values, it means that for block sizes where MPDIP is enabled, the first round will iterate over many MPDIP prediction options. MPDIP consumes a much larger amount of computational resources compared to the conventional angular prediction to generate the prediction. It may not provide a desirable trade-off to test MPDIP in the first round of mode selection.
[0072] To address these and other challenges, the present disclosure proposes to perform a first round of intra prediction mode search (afirst round of mode selection) across intra prediction modes that may include DC mode, planar mode, or conventional angular intra prediction modes and exclude MPDIP prediction. Search across MPDIP prediction modes may be performed in subsequent rounds when the number of modes to search is substantially reduced.
[0073] In one arrangement, the angular prediction modes with odd-numbered index values instead of angular prediction modes with even-numbered index values are tested in the first round of mode selection. Since the odd numbered intra prediction modes are searched, only conventional angular prediction may be performed. More specifically, the intra mode index 0, 1 plus odd intra mode indices, 3, 5, 7, …, 65 will be evaluated by calculating the non-RD cost defined in (3) in the first round of mode selection. Similar to the current mode selection method, the best N intra modes with the smallest non-RD cost will be selected from the first round of mode selection. In the second round of mode selection, for each angular mode Angmodeinx among the selected N modes from the first round, the non-RD cost defined in (3) is calculated for up to two adjacent modes (Angmodeinx+1) and (Angmodeinx-1) , depending on their existence. Both (Angmodeinx+1) and (Angmodeinx-1) are even numbered angular modes since Angmodeinx is an odd number, so the modes searched in the second round may potentially be MPDIP modes.
[0074] Table 1, shown below, provides a summary of the maximum number of tested angular prediction modes with odd and even-numbered index values for the current ECM search method and the proposed method. Table 1: First round mode selection differences
[0075] The computational benefit of this arrangement may be explained with reference to Table 1. If the current block is MPDIP eligible, some of the angular prediction modes with even-numbered index values may be MPDIP modes, depending on block size. An intra prediction mode that selects MPDIP prediction (e.g., angular prediction modes with even-numbered index values or DC, planar) may be referred to as an “MPDIP mode, ” and an intra prediction mode that selects regular / conventional intra prediction (e.g., angular prediction modes with odd-numbered index values or DC, planar, and angular prediction modes with odd-numbered index values) may be referred to as a “non-MPDIP mode. ” ECM currently generates an MPDIP instead of the conventional angular prediction if the intra prediction mode with an even-numbered index for the current block is an MPDIP mode. In the worst case, all angular prediction modes with even-numbered index values are MPDIP modes. From Table 1, up to 33 MPDIP modes (not including DC and planar) and up to 6 non-MPDIP modes will be searched in ECM-15.0 across the two rounds of mode selection. In comparison, there are 32 non-MPDIP modes and only up to 6 MPDIP modes searched in the proposed method. As a result, the proposed method consumes a smaller amount of computational resources than ECM because fewer MPDIPs are performed. Simulation results further confirm this analysis and show over 1%encoding time saving with almost no performance change for the proposed method.
[0076] The arrangement described above provides one way to avoid performing MPDIP in the first round of search by searching DC mode 0, planar mode 1, and angular prediction modes with odd-numbered index values 3, 5, 7, …65. The DC mode 0 and planar mode 1 searched in the first round may be MPDIP or non-MPDIP. In some implementations, the complexity of the first round of search may be further reduced by subsampling the angular prediction modes with odd-numbered index values. For example, the first round of mode selection may search angular prediction modes with index values that increase by an even numbered integer value greater than two, such as by 4 at a time, evaluating intra mode indices 0, 1, 3, 7, 11, …63, 65, in this example. In other implementations, the first round of search may be heuristically limited to a set of intra mode indices more likely to be exercised, such as 0, 1, and intra prediction modes with angles close to diagonal, vertical, or horizontal. For example, the first round of search may be heuristically limited to intra mode indices 0, 1, 3, 17, 19, 33, 35, 49, 51, and 65.
[0077] Recently, some intra prediction modes have been proposed to be excluded for coding the current blocks in ECM-16.0 and ECM-16.1. In this proposed method, 20 out of the total 67 available angular intra modes have been defined as excluded modes for a block. Excluded modes may be angular prediction modes with odd-numbered index values, and the excluded modes are chosen by a DIMD-like method. Both the encoder and decoder use the same method to identify these 20 excluded modes so no additional signaling is performed. On the encoding side, if the tested modes are one of the excluded modes, they will be skipped in the cost calculation because these modes are not eligible for the current block and may not be signaled. If the current arrangement of the solution is directly applied in combination with excluded modes, it may negatively impact the coding performance due to the number angular prediction modes with odd-numbered index values that are excluded modes and skipped during the first round of mode selection. Therefore, the first round may not provide an effective search, and the best N modes selected from the first round of mode selection may not provide approximations of the actual intra prediction direction. To achieve a better trade-off, in this arrangement, excluded modes are disabled (not allowed) for mode selection when the proposed method is applied.
[0078] There is another adoption, called most dominant intra prediction (MDIP) mode, which is one of the 67 conventional intra prediction modes and identified using DIMD-like method in ECM-16.0 and ECM-16.1. MDIP is signaled before regular intra prediction modes if the current block is MDIP eligible and it limits the available intra prediction modes to 66 instead of 67. If the current tested mode is the MDIP mode, it will be skipped in the cost calculation (similar to excluded modes) because it is not one of regular intra prediction modes. The MDIP cost is calculated separately for mode selection purpose.
[0079] In another arrangement of this solution, the angular prediction modes with odd-numbered index values instead of angular prediction modes with even-numbered index values are tested in the first round of mode selection. For instance, the DC mode with index 0, planar mode with index 1, as well as angular prediction modes with odd-numbered index values 3, 5, 7, …, 65 will be evaluated by calculating the non-RD cost defined in (3) in the first round of mode selection. Each of these intra mode indices are evaluated, regardless of whether it has been excluded by the above method of excluded modes or it is an MDIP mode. If an excluded intra mode or MDIP index is tested, then the distortion component of the non-RD cost can still be produced by calculating the prediction block from conventional angular intra prediction. The bit cost component of the non-RD cost is approximated by calculating the signaling cost of an adjacent angular prediction mode. Because there may be two adjacent angular prediction modes, the adjacent angular prediction modes with smaller bit consumption is selected. The best N intra modes with the smallest non-RD cost will be selected from the first round of mode selection. In the second round of mode selection, for each angular prediction mode Angmodeinx among the selected N modes from the first round, the non-RD cost defined in (3) is calculated for up to two adjacent angular prediction modes (Angmodeinx+1) and (Angmodeinx-1) , depending on their existence. If the selected Angmodeinx is not MDIP, Angmodeinx is an odd number. Therefore, both (Angmodeinx+1) and (Angmodeinx-1) are angular prediction modes with even-numbered index values; and thus, the modes searched in the second round may potentially be MPDIP modes. If the selected Angmodeinx is MDIP, Angmodeinx could be either an angular prediction mode with an even or odd-numbered index value. As a result, both (Angmodeinx+1) and (Angmodeinx-1) are either odd numbered angular prediction modes or even numbered angular prediction modes, depending on the parity of Angmodeinx. The modes searched in the second round may potentially be either non-MPDIP or MPDIP modes. In the second round of mode selection, any excluded intra mode and MDIP indices are not allowed to be selected.
[0080] In another arrangement of this solution, the angular prediction modes with even-numbered index values are still tested in the first round of mode selection. An advantage of this arrangement is there is no interaction with the excluded modes described above, so the method of excluding modes does not have to be disabled. In this arrangement, regardless of whether the current block is eligible for MPDIP, only conventional intra prediction is used for calculating non-RD costs for the MPDIP mode in the first round of mode selection. In addition, both DC and planar modes may use regular DC and planar prediction instead of MPDIP DC prediction and MPDIP planar prediction in the first round of mode selection. After the first round of mode selection, the N modes with the smallest non-RD cost defined in (3) are selected. Before the second round of mode selection starts, the non-RD costs for the selected N modes will be re-calculated with MPDIP predictions instead of the conventional DC, planar, and angular predictions if any of the selected N modes are MPDIP eligible. The second round of mode selection otherwise proceeds in the same manner as described for ECM. That is, for each angular prediction mode Angmodeinxamong the selected N modes from the first round, the non-RD cost defined in (3) is calculated for up to two adjacent angular prediction modes (Angmodeinx+1) and (Angmodeinx-1) , depending on their existence. The best M modes with the smallest non-RD cost from the second round of mode selection are further tested in a final round of mode selection searching by RDO cost.
[0081] Table 2, shown below, provides a summary of the maximum number of tested odd and even numbered angular modes for the current ECM search method and the proposed method. Table 2: The number of mode selection differences
[0082] From Table 2, up to 35 MPDIP modes in the first round of mode selection and up to 6 non-MPDIP modes in the second round of mode selection may be searched in ECM-15.0. In comparison, only up to 3 MPDIP modes and 41 non-MPDIP modes may be searched in the first and the second round of mode selection using the proposed method. As a result, the proposed method consumes a significantly smaller amount of computational resources.
[0083] For ECM-16.0 / 16.1 with excluded modes, the analysis of Table 2 still holds because all 20 excluded modes have odd-numbered index values.
[0084] The arrangement described above provides one way to avoid performing MPDIP prediction in the first round of search by searching DC mode 0, planar mode 1, and conventional angular prediction modes with even-numbered index values 2, 4, 6, …, 66. In some implementations, the first round of mode search may be further reduced in complexity by subsampling the angular prediction modes with even-numbered index values. For example, the first round of mode selection may step by 4 at time (or any even-numbered integer greater than 2) , evaluating intra mode indices 0, 1, 2, 6, 10, …, 62, 66. In other implementations, the first round of search may be heuristically limited to a set of intra mode indices more likely to be exercised, such as 0, 1, and intra prediction modes with angles close to diagonal, vertical, or horizontal. For example, the first round of search may be heuristically limited to intra mode indices 0, 1, 2, 18, 34, 50, and 64.
[0085] In another arrangement, the first round of mode selection may include both odd and even numbered angular intra prediction modes. The set of modes that is searched may vary across encoder implementations according to complexity concerns. In this arrangement, any excluded intra prediction modes may still be evaluated using the approximation of bit costs as described above. Even numbered intra prediction modes are evaluated in the first round of mode selection using the prediction from conventional angular prediction and may be recalculated if selected for the second round of mode selection using MPDIP prediction.
[0086] Referring again to FIG. 3, transform module 308 can transform the video signals in the residual block from the pixel domain to a transform domain (e.g., a frequency domain depending on the transform method) . It is understood that in some examples, transform module 308 may be skipped, and the video signals may not be transformed to the transform domain.
[0087] Quantization module 310 may be configured to quantize the coefficient of each position in the coding block to generate quantization levels of the positions. The current block may be the residual block. That is, quantization module 310 can perform a quantization process on each residual block. The residual block may include N×M positions (samples) , each associated with a transformed or non-transformed video signal / data, such as luma and / or chroma information, where N and M are positive integers. In the present disclosure, before quantization, the transformed or non-transformed video signal at a specific position is referred to herein as a “coefficient. ” After quantization, the quantized value of the coefficient is referred to herein as a “quantization level” or “level. ”
[0088] Quantization can be used to reduce the dynamic range of transformed or non-transformed video signals so that fewer bits will be used to represent video signals. Quantization typically involves division by a quantization step size and subsequent rounding, while dequantization (a.k.a. inverse quantization) involves multiplication by the quantization step size. The quantization step size can be indicated by a quantization parameter (QP) . Such a quantization process is referred to as scalar quantization. The quantization of all coefficients within a coding block can be done independently, and this kind of quantization method is used in some existing video compression standards, such as H. 264 / AVC and H. 265 / HEVC. The QP in quantization can affect the bit rate used for encoding / decoding the pictures of the video. For example, a higher QP can result in a lower bit rate, and a lower QP can result in a higher bit rate.
[0089] For an N×M coding block, a specific coding scan order may be used to convert the two-dimensional (2D) coefficients of a block into a one-dimensional (1D) order for coefficient quantization and coding. Typically, the coding scan starts from the left-top corner and stops at the right-bottom corner of a coding block or the last non-zero coefficient / level in a right-bottom direction. It is understood that the coding scan order may include any suitable order, such as a zig-zag scan order, a vertical (column) scan order, a horizontal (row) scan order, a diagonal scan order, or any combinations thereof. Quantization of a coefficient within a coding block may make use of the coding scan order information. For example, it may depend on the status of the previous quantization level along the coding scan order. In order to further improve the coding efficiency, more than one quantizer, e.g., two scalar quantizers, can be used by quantization module 310. Which quantizer will be used for quantizing the current coefficient may depend on the information preceding the current coefficient in coding scan order. Such a quantization process is referred to as dependent quantization.
[0090] Referring to FIG. 3, encoding module 320 may be configured to encode the quantization level of each position in the coding block into the bitstream. In some embodiments, encoding module 320 may perform entropy encoding on the coding block. Entropy encoding may use various binarization methods, such as Golomb-Rice binarization, to convert each quantization level into a respective binary representation, such as binary bins. Then, the binary representation can be further compressed using entropy encoding algorithms. The compressed data may be added to the bitstream. Besides the quantization levels, encoding module 320 may encode various other information, such as block type information of a coding unit, prediction mode information, partitioning unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information input from, for example, prediction modules 304 and 306. In some embodiments, encoding module 320 may perform residual coding on a coding block to convert the quantization level into the bitstream. For example, after quantization, there may be N×M quantization levels for an N×M block. These N×M levels may be zero or non-zero values. The non-zero levels may be further binarized to binary bins if the levels are not binary, for example, using combined Truncated Rice (TR) and limited EGk binarization.
[0091] Non-binary syntax elements may be mapped to binary codewords. The bijective mapping between symbols and codewords, for which typically simple structured codes are used, is called binarization. The binary symbols, also called bins, of both binary syntax elements and codewords for non-binary data may be coded using binary arithmetic coding. The core coding engine of context-adaptive binary arithmetic coding (CABAC) can support two operating modes: a context coding mode, in which the bins are coded with adaptive probability models, and a less complex bypass mode that uses fixed probabilities of 1 / 2. The adaptive probability models are also called contexts, and the assignment of probability models to individual bins is referred to as context modeling.
[0092] As shown in FIG. 3, dequantization module 312 may be configured to dequantize the quantization levels by dequantization module 312, and inverse transform module 314 may be configured to inversely transform the coefficients transformed by transform module 308. The reconstructed residual block generated by dequantization module 312 and inverse transform module 314 may be combined with the prediction units predicted through prediction module 304 or 306 to generate a reconstructed block.
[0093] Filter module 316 may include at least one among a deblocking filter, a sample adaptive offset (SAO) , and an adaptive loop filter (ALF) . The deblocking filter may remove block distortion generated by the boundary between blocks in the reconstructed picture. The SAO module may correct an offset to the original video by the unit of pixel for a video on which the deblocking has been performed. ALF may be performed based on a value obtained by comparing the reconstructed and filtered video and the original video. Buffer module 318 may be configured to store the reconstructed block or picture calculated through filter module 316, and the reconstructed and stored block or picture may be provided to inter prediction module 304 when inter prediction is performed.
[0094] FIG. 4 illustrates a detailed block diagram of exemplary decoder 201 in decoding system 200 in FIG. 2, according to some embodiments of the present disclosure. As shown in FIG. 4, decoder 201 may include a decoding module 402, a dequantization module 404, an inverse transform module 406, an inter prediction module 408, an intra prediction module 410, a filter module 412, and a buffer module 414. It is understood that each of the elements shown in FIG. 4 is independently shown to represent characteristic functions different from each other in a video decoder, and it does not mean that each component is formed by the configuration unit of separate hardware or single software. That is, each element is included to be listed as an element for convenience of explanation, and at least two of the elements may be combined to form a single element, or one element may be divided into a plurality of elements to perform a function. It is also understood that some of the elements are not necessary elements that perform functions described in the present disclosure but instead may be optional elements for improving performance. It is further understood that these elements may be implemented using electronic hardware, firmware, computer software, or any combination thereof. Whether such elements are implemented as hardware, firmware, or software depends upon the particular application and design constraints imposed on decoder 201.
[0095] When a video bitstream is input from a video encoder (e.g., encoder 101) , the input bitstream may be decoded by decoder 201 in a procedure opposite to that of the video encoder. Thus, some details of decoding that are described above with respect to encoding may be skipped for ease of description. Decoding module 402 may be configured to decode the bitstream to obtain various information encoded into the bitstream, such as the quantization level of each position in the coding block. In some embodiments, decoding module 402 may perform entropy decoding (decompressing) corresponding to the entropy encoding (compressing) performed by the encoder, such as, for example, variable-length coding (VLC) , context-adaptive variable-length coding (CAVLC) , CABAC, syntax-based binary arithmetic coding (SBAC) , PIPE coding, and the like to obtain the binary representation (e.g., binary bins) . Decoding module 402 may further convert the binary representations to quantization levels using Golomb-Rice binarization, including, for example, EGk binarization and combined TR and limited EGk binarization. Besides the quantization levels of the positions in the transform units, decoding module 402 may decode various other information, such as the parameters used for Golomb-Rice binarization (e.g., the Rice parameter) , block type information of a coding unit, prediction mode information, partitioning unit information, prediction unit information, transmission unit information, motion vector information, reference frame information, block interpolation information, and filtering information. During the decoding process, decoding module 402 may perform rearrangement on the bitstream to reconstruct and rearrange the data from a 1D order into a 2D rearranged block through a method of inverse-scanning based on the coding scan order used by the encoder.
[0096] Dequantization module 404 may be configured to dequantize the quantization level of each position of the coding block (e.g., the 2D reconstructed block) to obtain the coefficient of each position. In some embodiments, dequantization module 404 may perform dependent dequantization based on quantization parameters provided by the encoder as well, including the information related to the quantizers used in dependent quantization, for example, the quantization step size used by each quantizer.
[0097] Inverse transform module 406 may be configured to perform inverse transformation, for example, inverse DCT, inverse discrete sine transform (DST) , and inverse KLT, for DCT, DST, and KLT, LFNST, and / or NSPT performed by the encoder, respectively, to transform the data from the transform domain (e.g., coefficients) back to the pixel domain (e.g., luma and / or chroma information) . In some embodiments, inverse transform module 406 may selectively perform a transform operation (e.g., DCT, DST, KLT, LFNST, NSPT) according to a plurality of pieces of information such as a prediction method, a size of the current block, a prediction direction, and the like.
[0098] FIG. 10 illustrates a flowchart of a first exemplary method 1000 of encoding, according to some embodiments of the present disclosure. Method 1000 may be performed by a system, e.g., such as encoding system 100, encoder 101, inter prediction module 304, or intra prediction module 306, just to name a few. Method 1000 may include operations 1002-1012, as described below. It is to be appreciated that some of the steps may be optional (as indicated with dashed lines) , and some of the steps may be performed simultaneously, or in a different order than shown in FIG. 10.
[0099] Referring to FIG. 10, at 1002, MPDIP may be determined to be enabled for the current block.
[0100] At 1004, a first round of mode selection may be performed across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes.
[0101] In some implementations, the performing the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes calculating a plurality of cost values corresponding to a DC mode, a planar mode, and angular prediction modes with odd-numbered index values. In some implementations, the performing the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes determining the first set of intra prediction modes based on the plurality of cost values.
[0102] In some implementations, the DC mode and the planar mode may be non-MPDIP modes. In some implementations, at least one of the DC mode or the planar mode may be an MPDIP mode.
[0103] In some implementations, the angular prediction modes with odd-numbered index values may include all angular prediction modes with odd-numbered index values.
[0104] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.
[0105] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.
[0106] In some implementations, the second set of intra prediction modes may include the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes.
[0107] At 1006, a second round of mode selection may be performed across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes.
[0108] In some implementations, the second set of intra prediction modes may include the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes. In some implementations, the third set of intra prediction modes may include, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.
[0109] In some implementations, the performing the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, for an angular prediction mode of the first set of intra prediction modes, calculating one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode. In some implementations, the performing the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes determining the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.
[0110] In some implementations, the up to two adjacent angular prediction modes with even-numbered index values may include at least one MPDIP mode if the current block is MPDIP eligible.
[0111] At 1008, a plurality of cost values corresponding to the second set of intra prediction modes may be determined.
[0112] At 1010, in response to an intra prediction mode having a lowest cost value of the plurality of cost values, the intra prediction mode may be selected from among the second set of intra prediction modes for use in encoding the current block.
[0113] At 1012, a current block may be encoded based on an intra prediction mode selected from among the second set of intra prediction modes.
[0114] In various aspects of the present disclosure, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as instructions on a non-transitory computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a processor, such as processor 102 in FIGs. 1 and 2. By way of example, and not limitation, such computer-readable media can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, HDD, such as magnetic disk storage or other magnetic storage devices, Flash drive, SSD, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a processing system, such as a mobile device or a computer. Disk and disc, as used herein, include CD, laser disc, optical disc, digital video disc (DVD) , and floppy disk where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0115] According to one aspect of the present disclosure, a method of encoding is provided. The method may include performing, by a processor, a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The method may include performing, by the processor, a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The method may include encoding, by the processor, a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0116] In some implementations, the second set of intra prediction modes may include the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes. In some implementations, the third set of intra prediction modes may include, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.
[0117] In some implementations, the method may further include determining, by the process, a plurality of cost values corresponding to the second set of intra prediction modes. In some implementations, the method may further include, in response to the intra prediction mode having a lowest cost value of the plurality of cost values, selecting, by the processor, the intra prediction mode from among the second set of intra prediction modes for use in encoding the current block.
[0118] In some implementations, the performing, by the processor, the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes calculating, by the processor, a plurality of cost values corresponding to a DC mode, a planar mode, and angular prediction modes with odd-numbered index values. In some implementations, the performing, by the processor, the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes determining, by the processor, the first set of intra prediction modes based on the plurality of cost values.
[0119] In some implementations, the DC mode and the planar mode may be non-MPDIP modes. In some implementations, at least one of the DC mode or the planar mode may be an MPDIP mode.
[0120] In some implementations, the angular prediction modes with odd-numbered index values may include all angular prediction modes with odd-numbered index values.
[0121] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.
[0122] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.
[0123] In some implementations, the performing, by the processor, the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, for an angular prediction mode of the first set of intra prediction modes, calculating, by the processor, one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode. In some implementations, the performing, by the processor, the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes determining, by the processor, the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.
[0124] In some implementations, the up to two adjacent angular prediction modes with even-numbered index values may include at least one MPDIP mode if the current block is MPDIP eligible.
[0125] In some implementations, the method may include determining, by the processor, MPDIP is enabled for the current block.
[0126] According to another aspect of the present disclosure, an encoder is provided. The encoder may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to perform a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to encode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0127] In some implementations, the second set of intra prediction modes may include the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes. In some implementations, the third set of intra prediction modes may include, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.
[0128] In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to determine a plurality of cost values corresponding to the second set of intra prediction modes. In some implementations, the memory storing instructions, which when executed by the processor, may further cause the processor to, in response to the intra prediction mode having a lowest cost value of the plurality of cost values, select the intra prediction mode from among the second set of intra prediction modes for use in encoding the current block.
[0129] In some implementations, to perform the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes, the memory storing instructions, which when executed by the processor, may cause the processor to calculate a plurality of cost values corresponding to a DC mode, a planar mode, and angular prediction modes with odd-numbered index values. In some implementations, to perform the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes, the memory storing instructions, which when executed by the processor, may cause the processor to determine the first set of intra prediction modes based on the plurality of cost values.
[0130] In some implementations, the DC mode and the planar mode may be non-MPDIP modes. In some implementations, at least one of the DC mode or the planar mode may be an MPDIP mode.
[0131] In some implementations, the angular prediction modes with odd-numbered index values may include all angular prediction modes with odd-numbered index values.
[0132] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.
[0133] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.
[0134] In some implementations, to perform the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, the memory storing instructions, which when executed by the processor, may cause the processor to, for an angular prediction mode of the first set of intra prediction modes, calculate one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode. In some implementations, to perform the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, the memory storing instructions, which when executed by the processor, may cause the processor to determine the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.
[0135] In some implementations, the up to two adjacent angular prediction modes with even-numbered index values may include at least one MPDIP mode if the current block is MPDIP eligible.
[0136] In some implementations, the memory storing instructions, which when executed by the processor, may cause the processor to determine MPDIP is enabled for the current block.
[0137] According to a further aspect of the present disclosure, an apparatus for encoding is provided. The apparatus for encoding may include a processor and memory storing instructions. The memory storing instructions, which when executed by the processor, may cause the processor to perform a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The memory storing instructions, which when executed by the processor, may cause the processor to encode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0138] According to still another aspect of the present disclosure, a non-transitory computer-readable medium storing instructions for a processor of an encoder is provided. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to perform a first round of mode selection across a first plurality of intra prediction modes that excludes MPDIP modes to determine a first set of intra prediction modes. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes. The instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to encode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.
[0139] In some implementations, the second set of intra prediction modes may include the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes. In some implementations, the third set of intra prediction modes may include, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.
[0140] In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to determine a plurality of cost values corresponding to the second set of intra prediction modes. In some implementations, the instructions, which when executed by the processor of the encoder, may further cause the processor of the encoder to, in response to the intra prediction mode having a lowest cost value of the plurality of cost values, select the intra prediction mode from among the second set of intra prediction modes for use in encoding the current block.
[0141] In some implementations, to perform the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes, the instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to calculate a plurality of cost values corresponding to a DC mode, a planar mode, and angular prediction modes with odd-numbered index values. In some implementations, to perform the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes, the instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to determine the first set of intra prediction modes based on the plurality of cost values.
[0142] In some implementations, the DC mode and the planar mode may be non-MPDIP modes. In some implementations, at least one of the DC mode or the planar mode may be an MPDIP mode.
[0143] In some implementations, the angular prediction modes with odd-numbered index values may include all angular prediction modes with odd-numbered index values.
[0144] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.
[0145] In some implementations, the angular prediction modes with odd-numbered index values may include a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.
[0146] In some implementations, to perform the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, the instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to, for an angular prediction mode of the first set of intra prediction modes, calculate one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode. In some implementations, to perform the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, the instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to determine the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.
[0147] In some implementations, the up to two adjacent angular prediction modes with even-numbered index values may include at least one MPDIP mode if the current block is MPDIP eligible.
[0148] In some implementations, the instructions, which when executed by the processor of the encoder, may cause the processor of the encoder to determine MPDIP is enabled for the current block.
[0149] According to still another aspect of the present disclosure, a method of transmitting a bitstream is provided. The method may include executing the method of encoding described herein to generate a bitstream. The method may include transmitting the bitstream.
[0150] According to still another aspect of the present disclosure, a non-transitory computer-readable storage medium, having a computer program and a bitstream stored thereon is provided. The computer program, when executed by a processor, may enable the processor to perform the method of encoding described herein to generate the bitstream.
[0151] The foregoing description of the embodiments will so reveal the general nature of the present disclosure that others can, by applying knowledge within the skill of the art, readily modify and / or adapt for various applications such embodiments, without undue experimentation, without departing from the general concept of the present disclosure. Therefore, such adaptations and modifications are intended to be within the meaning and range of equivalents of the disclosed embodiments, based on the teaching and guidance presented herein. It is to be understood that the phraseology or terminology herein is for the purpose of description and not of limitation, such that the terminology or phraseology of the present specification is to be interpreted by the skilled artisan in light of the teachings and guidance.
[0152] Embodiments of the present disclosure have been described above with the aid of functional building blocks illustrating the implementation of specified functions and relationships thereof. The boundaries of these functional building blocks have been arbitrarily defined herein for the convenience of the description. Alternate boundaries can be defined so long as the specified functions and relationships thereof are appropriately performed.
[0153] The Summary and Abstract sections may set forth one or more but not all exemplary embodiments of the present disclosure as contemplated by the inventor (s) , and thus, are not intended to limit the present disclosure and the appended claims in any way.
[0154] Various functional blocks, modules, and steps are disclosed above. The arrangements provided are illustrative and without limitation. Accordingly, the functional blocks, modules, and steps may be reordered or combined in different ways than in the examples provided above. Likewise, some embodiments include only a subset of the functional blocks, modules, and steps, and any such subset is permitted.
[0155] The breadth and scope of the present disclosure should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.
Claims
A method of encoding, comprising:performing, by a processor, a first round of mode selection across a first plurality of intra prediction modes that excludes matrix-based position-dependent intra prediction (MPDIP) modes to determine a first set of intra prediction modes;performing, by the processor, a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes; andencoding, by the processor, a current block based on an intra prediction mode selected from among the second set of intra prediction modes.The method of claim 1, wherein:the second set of intra prediction modes comprises the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes, andthe third set of intra prediction modes comprises, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.The method of claim 1, further comprising:determining, by the process, a plurality of cost values corresponding to the second set of intra prediction modes; andin response to the intra prediction mode having a lowest cost value of the plurality of cost values, selecting, by the processor, the intra prediction mode from among the second set of intra prediction modes for use in encoding the current block.The method of claim 1, wherein the performing, by the processor, the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes comprises:calculating, by the processor, a plurality of cost values corresponding to a direct current (DC) mode, a planar mode, and angular prediction modes with odd-numbered index values; anddetermining, by the processor, the first set of intra prediction modes based on the plurality of cost values.The method of claim 4, wherein:the DC mode and the planar mode are non-MPDIP modes, orat least one of the DC mode or the planar mode is an MPDIP mode.The method of claim 4, wherein the angular prediction modes with odd-numbered index values comprise all angular prediction modes with odd-numbered index values.The method of claim 4, wherein the angular prediction modes with odd-numbered index values comprise a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.The method of claim 4, wherein the angular prediction modes with odd-numbered index values comprise a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.The method of claim 1, wherein the performing, by the processor, the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes comprises:for an angular prediction mode of the first set of intra prediction modes,calculating, by the processor, one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode; anddetermining, by the processor, the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.The method of claim 9, wherein the up to two adjacent angular prediction modes with even-numbered index values comprise at least one MPDIP mode if the current block is MPDIP eligible.The method of claim 1, further comprising:determining, by the processor, MPDIP is enabled for the current block.An encoder, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:perform a first round of mode selection across a first plurality of intra prediction modes that excludes matrix-based position-dependent intra prediction (MPDIP) modes to determine a first set of intra prediction modes;perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes; andencode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.The encoder of claim 12, wherein:the second set of intra prediction modes comprises the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes, andthe third set of intra prediction modes comprises, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.The encoder of claim 12, wherein the memory storing instructions, which when executed by the processor, further cause the processor to:determine a plurality of cost values corresponding to the second set of intra prediction modes; andin response to the intra prediction mode having a lowest cost value of the plurality of cost values, select the intra prediction mode from among the second set of intra prediction modes for use in encoding the current block.The encoder of claim 12, wherein, to perform the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes, the memory storing instructions, which when executed by the processor, cause the processor to:calculate a plurality of cost values corresponding to a direct current (DC) mode, a planar mode, and angular prediction modes with odd-numbered index values; anddetermine the first set of intra prediction modes based on the plurality of cost values.The encoder of claim 15, wherein:the DC mode and the planar mode are non-MPDIP modes, orat least one of the DC mode or the planar mode is an MPDIP mode.The encoder of claim 15, wherein the angular prediction modes with odd-numbered index values comprise all angular prediction modes with odd-numbered index values.The encoder of claim 15, wherein the angular prediction modes with odd-numbered index values comprise a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.The encoder of claim 15, wherein the angular prediction modes with odd-numbered index values comprise a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.The encoder of claim 12, wherein, to perform the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, the memory storing instructions, which when executed by the processor, cause the processor to:for an angular prediction mode of the first set of intra prediction modes,calculate one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode; anddetermine the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.The encoder of claim 20, wherein the up to two adjacent angular prediction modes with even-numbered index values comprise at least one MPDIP mode if the current block is MPDIP eligible.The encoder of claim 12, wherein the memory storing instructions, which when executed by the processor, cause the processor to:determine MPDIP is enabled for the current block.An apparatus for encoding, comprising:a processor; andmemory storing instructions, which when executed by the processor, cause the processor to:perform a first round of mode selection across a first plurality of intra prediction modes that excludes matrix-based position-dependent intra prediction (MPDIP) modes to determine a first set of intra prediction modes;perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes; andencode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.A non-transitory computer-readable medium storing instructions, which when executed by a processor of an encoder, cause the processor of the encoder to:perform a first round of mode selection across a first plurality of intra prediction modes that excludes matrix-based position-dependent intra prediction (MPDIP) modes to determine a first set of intra prediction modes;perform a second round of mode selection across a second plurality of intra prediction modes that includes the MPDIP modes to determine a second set of intra prediction modes based on the first set of intra prediction modes; andencode a current block based on an intra prediction mode selected from among the second set of intra prediction modes.The non-transitory computer-readable medium of claim 24, wherein:the second set of intra prediction modes comprises the first set of intra prediction modes and a third set of intra prediction modes determined from the second plurality of intra prediction modes, andthe third set of intra prediction modes comprises, for each angular intra prediction mode included in the first set of intra prediction modes, a respective pair of intra prediction modes having angular mode indexes adjacent to an angular mode index of a corresponding angular intra prediction mode included in the first set of intra prediction modes.The non-transitory computer-readable medium of claim 24, wherein the instructions, which when executed by the processor of the encoder, further cause the processor of the encoder to:determine a plurality of cost values corresponding to the second set of intra prediction modes; andin response to the intra prediction mode having a lowest cost value of the plurality of cost values, select the intra prediction mode from among the second set of intra prediction modes for use in encoding the current block.The non-transitory computer-readable medium of claim 24, wherein, to perform the first round of mode selection across the first plurality of intra prediction modes that excludes MPDIP modes to determine the first set of intra prediction modes, the instructions, which when executed by the processor of the encoder, cause the processor of the encoder to:calculate a plurality of cost values corresponding to a direct current (DC) mode, a planar mode, and angular prediction modes with odd-numbered index values; anddetermine the first set of intra prediction modes based on the plurality of cost values.The non-transitory computer-readable medium of claim 27, wherein:the DC mode and the planar mode are non-MPDIP modes, orat least one of the DC mode or the planar mode is an MPDIP mode.The non-transitory computer-readable medium of claim 27, wherein the angular prediction modes with odd-numbered index values comprise all angular prediction modes with odd-numbered index values.The non-transitory computer-readable medium of claim 27, wherein the angular prediction modes with odd-numbered index values comprise a subset of angular prediction modes with odd-numbered index values that increment by an integer greater than two.The non-transitory computer-readable medium of claim 27, wherein the angular prediction modes with odd-numbered index values comprise a subset of angular prediction modes with odd-numbered index values with angles within a threshold degree of a horizontal line, a vertical line, or a diagonal line associated with the current block.The non-transitory computer-readable medium of claim 24, wherein, to perform the second round of mode selection across the second plurality of intra prediction modes that includes the MPDIP modes to determine the second set of intra prediction modes based on the first set of intra prediction modes, the instructions, which when executed by the processor of the encoder, cause the processor of the encoder to:for an angular prediction mode of the first set of intra prediction modes,calculate one or more cost values corresponding to up to two adjacent angular prediction modes with even-numbered index values adjacent to an odd-numbered index value of the angular prediction mode; anddetermine the second set of intra prediction modes based on a second plurality of cost values corresponding to the first set of intra prediction modes and the one or more cost values corresponding to the up to two adjacent angular prediction modes with even-numbered index values.The non-transitory computer-readable medium of claim 32, wherein the up to two adjacent angular prediction modes with even-numbered index values comprise at least one MPDIP mode if the current block is MPDIP eligible.The non-transitory computer-readable medium of claim 24, wherein the instructions, which when executed by the processor of the encoder, cause the processor of the encoder to:determine MPDIP is enabled for the current block.A method of transmitting a bitstream, comprising:executing the method of encoding of one or more of claims 1-11 to generate a bitstream; andtransmitting the bitstream.A non-transitory computer-readable storage medium, having a computer program and a bitstream stored thereon, wherein the computer program, when executed by a processor, enables the processor to perform the method of encoding of one or more of claims 1-11 to generate the bitstream.