Adaptive matrix intra-frame MPM prediction method and system based on neighborhood availability
By using the adaptive matrix intra-frame MPM prediction method, which leverages neighborhood availability and linear weighted calculation, the problem of one-sided utilization of neighborhood information and insufficient adaptability in existing video coding standards is solved, thereby improving coding efficiency and compression performance.
Patent Information
- Application Number
- CN202610220477.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-15
AI Technical Summary
Existing video coding standards suffer from limitations in coding efficiency due to issues such as one-sided use of neighborhood information, lack of adaptability, and high computational complexity when constructing the most probable mode (MPM) list.
An adaptive matrix intra-frame MPM prediction method based on neighborhood availability is adopted. By obtaining the prediction patterns of five neighborhood positions around the current block, the neighborhood topological fingerprint information is generated by weighted summation of binary bits, and the optimal weight matrix is indexed for linear weighted calculation to generate MPM candidates.
It significantly improves the hit rate of the first candidate in the MPM list, reduces the number of bits for pattern index encoding, improves video encoding compression efficiency, and maintains low computational complexity, making it suitable for video encoding technologies.
Smart Images

Figure CN122053840A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image coding technology, and particularly relates to an adaptive matrix intra-frame MPM prediction method and system based on neighborhood availability. Background Technology
[0002] With the rapid development of ultra-high-definition video (UHD), virtual reality (VR), and panoramic video services, the amount of video data is growing exponentially, posing a huge challenge to the transmission bandwidth and storage space of video data. To further improve compression efficiency while maintaining high-quality video reconstruction, the Joint Video Experts Group (JVET), after releasing the H.266 / VVC standard, launched research on the next-generation video coding standard, namely the Enhanced Compression Model (ECM). ECM aims to further reduce bitrate and eliminate redundant information in images by introducing more sophisticated and complex coding tools.
[0003] In hybrid video coding frameworks, intra-frame prediction eliminates spatial redundancy by leveraging the spatial correlation of reconstructed pixels around the current coding block, requiring only the transmission of prediction residuals and prediction mode information to reconstruct the image. To accommodate the increasingly complex texture features in natural images, the number of intra-frame prediction angle modes in video coding standards has significantly expanded. From 8 orientation modes in H.264 / AVC, it has grown to 33 in H.265 / HEVC, and then to 65 in H.266 / VVC. In current ECM research platforms, to capture even finer texture orientations, the number of angle modes has further expanded to 131 or more. However, this surge in the number of modes directly leads to a significant increase in the signaling overhead of the Intra Mode Index, which is particularly noticeable in low-bitrate transmissions.
[0004] To mitigate this overhead, Most Probable Pattern (MPM) coding has become a standard feature of modern video coding standards. Its basic principle is to leverage the fact that the texture orientation of spatially adjacent blocks (usually the left and top neighbors) is typically highly correlated with the current block, constructing an MPM list containing several high-probability candidate patterns. If the best pattern for the current block matches this list, the encoder only needs to transmit a short truncated unary code; otherwise, it needs to transmit a longer fixed-length code. Therefore, the accuracy of the MPM list construction algorithm directly determines the entropy coding efficiency of intra-frame coding and is a key factor in improving overall compression performance.
[0005] However, the existing technology still has the following drawbacks: 1. The use of neighborhood spatial information is one-sided and limited.
[0006] While existing ECM encoding standards traverse five key spatial locations (left, top, bottom left, top right, and top left) around the current block when constructing the MPM list, their utilization of this information is primarily based on discrete filtering and filling strategies. Specifically, the algorithm typically checks the predicted patterns of each neighboring block in a fixed priority order, adding valid and non-repeating patterns directly to the candidate list. This strategy merely involves a simple transfer of neighborhood information, failing to uncover potential geometric relationships between neighboring blocks at different locations. For example, when the left block points to a certain angle, while the top block points to a slightly different angle, the actual texture direction often lies somewhere in between. Existing technologies cannot use mathematical models to linearly or non-linearly fuse the angular information of multiple neighboring blocks to derive a new pattern that better reflects the local texture continuity trend, resulting in limited accuracy of the generated candidate list when dealing with complex or gradient textures.
[0007] 2. Insufficient adaptive handling capability for missing neighbor states.
[0008] In video coding, the availability combinations of neighboring blocks are highly variable (i.e., the "neighborhood topology" is constantly changing). For example, at image boundaries or slice boundaries, specific cases may arise such as "only the left block is available" or "only the top left and top right blocks are available." While existing MPM construction logic includes availability checks, its processing logic is static and generic—if a location is unavailable, it is simply skipped or replaced with a default value. Existing technologies lack an adaptive mechanism based on neighborhood state classification (pattern-based). It cannot dynamically switch the prediction strategy or parameters most suitable for a given state based on which neighboring blocks are currently available (e.g., Pattern A: left + top; Pattern B: bottom left only). This "one-size-fits-all" logic leads to an inability to fully utilize the value of remaining effective information when neighborhood information is incomplete, resulting in a loss of prediction gain.
[0009] 3. Some advanced technologies (such as DIMD / TIMD) have excessive computational overhead.
[0010] While ECM introduced DIMD (Intra-Frame Mode Derivation at the Decoder) and TIMD (Template Matching) to attempt to address the prediction accuracy problem, these techniques require complex pixel-level gradient calculations or multiple template matching searches, resulting in extremely high hardware implementation costs and processing latency. The construction of the basic MPM list still requires a lightweight optimization scheme with low computational complexity (such as table lookup or simple weighting) that can significantly improve hit rate, and current technologies still fall short in this regard. Summary of the Invention
[0011] To overcome the shortcomings of the prior art, this invention provides an adaptive matrix intra-frame MPM prediction method and system based on neighborhood availability. It optimizes the intra-frame prediction MPM construction mechanism under the ECM coding framework, achieving a certain improvement in coding efficiency while maintaining reasonable computational complexity, thus providing an improved solution for video coding technology.
[0012] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides an adaptive matrix intra-frame MPM prediction method based on neighborhood availability.
[0013] The adaptive matrix intra-frame MPM prediction method based on neighborhood availability includes the following steps: Obtain the predicted patterns of the five neighboring locations surrounding the current block; The neighborhood topological fingerprint information of the current block is determined by using a binary bit weighted summation method and combining the effectiveness of five neighborhood location prediction patterns. Based on the neighborhood topological fingerprint information of the current block, an optimal weight matrix corresponding to the current neighborhood state is obtained by indexing. Using the optimal weight matrix, the predicted modes of the five neighborhood positions are linearly weighted to obtain the MPM candidates for the current block, which are then filled into the MPM list, thereby completing the intra-frame prediction in the image encoding and decoding process.
[0014] A second aspect of the present invention provides an adaptive matrix intra-frame MPM prediction system based on neighborhood availability.
[0015] An adaptive matrix intra-frame MPM prediction system based on neighborhood availability includes: The neighborhood information acquisition module is configured to: acquire the prediction patterns of the five neighboring locations around the current block; The neighborhood topology fingerprint information calculation module is configured to: use a binary bit weighted summation method, combined with the effectiveness of five neighborhood position prediction patterns, to determine the neighborhood topology fingerprint information of the current block; The indexing module is configured to: based on the neighborhood topological fingerprint information of the current block, index to obtain an optimal weight matrix corresponding to the current neighborhood state; The weighted calculation module is configured to use the optimal weight matrix to perform linear weighted calculation on the prediction modes of the five neighborhood positions to obtain the MPM candidates for the current block, fill them into the MPM list, and thus complete the intra-frame prediction in the image encoding and decoding process.
[0016] A third aspect of the present invention provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the adaptive matrix intra-MPM prediction method based on neighborhood availability as described in the first aspect of the present invention.
[0017] A fourth aspect of the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in the first aspect of the present invention.
[0018] The above one or more technical solutions have the following beneficial effects: This invention provides an adaptive matrix intra-frame MPM prediction method and system based on neighborhood availability. It optimizes the intra-frame prediction MPM construction mechanism under the ECM coding framework, achieving adaptive intra-frame prediction mode derivation. Compared with existing technologies, this invention can derive candidate modes that more closely resemble the real texture direction through linear fusion of multi-dimensional features, even when neighboring block information is incomplete or texture is complex. This improves coding efficiency while maintaining reasonable computational complexity, providing an improved solution for video coding technology. Experimental data shows that this method significantly improves the hit rate of the first candidate in the MPM list, thereby reducing the number of bits required for mode index encoding and effectively improving the compression efficiency of video coding.
[0019] This invention achieves linear fusion of neighborhood features: by using the weight matrix obtained through training, the prediction patterns of multiple neighboring blocks are weighted and summed to calculate the "comprehensive direction" with statistical optimality, thereby breaking through the limitation of existing technologies that can only discretely select a single neighboring block pattern and improving the prediction accuracy of complex textures.
[0020] This invention provides an adaptive strategy based on availability patterns. A unique "availability mask (Pattern ID)" is generated based on the actual existence of the five neighboring blocks surrounding the current block, and a specific prediction weight parameter is matched using this mask by looking up a table. This ensures that the algorithm can still adapt to an optimal prediction logic even when the neighborhood is incomplete (such as edge blocks), fully exploiting the value of the remaining information.
[0021] This invention maintains low computational complexity. By utilizing a pre-trained lookup table mechanism and simple integer bitwise operations to replace complex pixel-level search or gradient analysis, it significantly improves the hit rate of the first candidate in the MPM list while maintaining low latency at the encoding and decoding end, and is easy to implement in hardware.
[0022] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0023] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0024] Figure 1 This is a diagram illustrating the method execution steps of Example 1.
[0025] Figure 2 This is a flowchart of the method in Example 1.
[0026] Figure 3 This is a schematic diagram of the five neighboring locations of the current block in Example 1.
[0027] Figure 4 The figure shows the experimental results of Example 1. Detailed Implementation
[0028] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0029] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of the present invention.
[0030] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0031] Example 1 As described in the background section, to accommodate the increasingly complex texture features in natural images, the number of intra-frame prediction angle modes in video coding standards has significantly expanded. From 8 orientation modes in the H.264 / AVC era, it has evolved to 33 in H.265 / HEVC, and then to 65 in H.266 / VVC. Specifically, in existing technical solutions: 1. H.264 / AVC: H.264 employs a simple Most Probable Mode (MPM) mechanism for encoding intra-prediction modes. The standard supports nine 4×4 block intra-prediction modes, including DC mode and eight directional prediction modes.
[0032] In terms of MPM construction, H.264 uses a single MPM scheme, determining the most probable pattern of the current block by examining the patterns of its left and upper neighboring blocks. During encoding, a flag bit indicates whether an MPM is used; if not, additional bits are needed to represent the actual pattern used. While this method reduces the number of bits for pattern signaling, the limited use of a single MPM results in limited prediction accuracy and insignificant improvement in encoding efficiency for complex textures or highly directional content. Furthermore, this mechanism fails to fully utilize spatial pattern correlations, particularly lacking flexibility when handling various directional textures.
[0033] 2. HEVC (H.265): HEVC has been extended to a three-MPM list construction mechanism to accommodate the increased number of prediction modes (35 modes in total, including Planar, DC, and 33 angular modes). While this mechanism is more efficient than H.264, the coverage of three MPMs is still insufficient for a prediction system containing 35 modes, especially for complex texture regions. Furthermore, the MPM list construction does not consider statistical frequency, leading to high-probability modes not being effectively encoded in some cases, impacting overall compression efficiency.
[0034] 3. VVC (H.266): VVC expands the MPM list to six candidates to handle its 67 intra-frame prediction modes. During construction, the Planar mode is always a fixed candidate, modes are obtained from neighboring blocks, and new candidates are derived from neighboring modes of existing angular modes. This method, based on statistical analysis, improves mode coverage, but the fixed construction method cannot adapt to all situations. Although prediction accuracy is improved and signaling overhead is reduced, the interaction with newly introduced techniques such as Multi-Reference Line Prediction (MRL) and Matrix Weighted Prediction (MIP) increases system complexity and poses challenges for real-time applications.
[0035] Based on this, this invention proposes an intra-frame prediction method based on adaptive matrix weighting of neighborhood availability status within the framework of Enhanced Compression Model (ECM) and future video coding standards. This method aims to address the prediction efficiency bottleneck in existing Most Probable Mode (MPM) construction techniques caused by the reliance on a single neighborhood information source (only left and top neighbor blocks) and rigid processing rules (lack of adaptability).
[0036] like Figure 1 As shown, the adaptive matrix intra-frame MPM prediction method based on neighborhood availability includes the following steps: Obtain the predicted patterns of the five neighboring locations surrounding the current block; The neighborhood topological fingerprint information of the current block is determined by using a binary bit weighted summation method and combining the effectiveness of five neighborhood location prediction patterns. Based on the neighborhood topological fingerprint information of the current block, an optimal weight matrix corresponding to the current neighborhood state is obtained by indexing. Using the optimal weight matrix, the predicted modes of the five neighborhood positions are linearly weighted to obtain the MPM candidates for the current block, which are then filled into the MPM list, thereby completing the intra-frame prediction in the image encoding and decoding process.
[0037] The core technical solution of this invention lies in: An extended neighborhood template containing five key spatial locations (left, top, top left, top right, and bottom left) is introduced. By detecting the validity of these five locations, a unique "neighborhood topological fingerprint" (Pattern ID) is generated. The optimal weight matrix pre-trained using this fingerprint index is then used to linearly fuse valid neighbor patterns, thereby deriving a high-precision prediction pattern that can reflect the trend of local texture continuity.
[0038] Next, we will combine the appendix Figure 2 The technical solution of this embodiment will be explained in detail.
[0039] 1. Overall technical solution.
[0040] Appendix Figure 2 This invention demonstrates the core processing flow of constructing an MPM list in a video encoder or decoder. The flow mainly includes five stages: neighborhood information acquisition, pattern classification, parameter matching, matrix calculation, and list updating. To ensure consistency between encoding and decoding, the following steps are executed with completely identical logic at both the encoding and decoding ends.
[0041] Step S1: Obtain the predicted patterns for 5 extended neighborhood locations.
[0042] When constructing the MPM list for the current prediction unit (PU), the system first locates the spatial coordinates of the current block and then visits its five key neighboring locations in a predetermined order. For example... Figure 3 As shown, with the top-left pixel coordinates of the current block as the origin (0,0), the width of the current block is W, and the height is H, the relative coordinates of these five positions are defined as follows: Position L (Left): Coordinates (-1, H-1), which is the bottommost pixel block immediately adjacent to the left boundary of the current block; Position A (Above): Coordinates (W-1, -1), which is the rightmost pixel block immediately adjacent to the upper boundary of the current block; Position AL (Above-Left): Coordinates (-1, -1), which is the diagonal pixel block opposite the top left corner of the current block; Position AR (Above-Right): Coordinates (W, -1), which is the diagonal pixel block opposite the top right corner of the current block; Position BL (Below-Left): Coordinates (-1, H), which is the diagonal pixel block opposite the bottom left corner of the current block.
[0043] For each location, the system performs a rigorous availability check and pattern cleaning logic: (1) Physical boundary check: Determine whether the location is within the physical boundary of the current picture, slice, tile, or maximum coding unit (CTU). If it is outside the boundary, it is considered unusable.
[0044] (2) Encoding status check: Determine whether the position has been encoded / decoded. Areas that have not been encoded (such as the right or lower area in the raster scan sequence) are considered unusable.
[0045] (3) Pattern type filtering: Determine the prediction pattern attribute of the location.
[0046] If the position uses Intra Angular Mode, then read its specific mode index value (such as 2~66 or 2~130). If the position uses a non-angle mode (such as Planar, DC, LFNST, MIP, PNN, etc.) or an inter-frame prediction mode (Inter / IBC / CIIP, etc.), its mode value is forcibly set to 0 (corresponding to the Planar mode index), and the position is marked as "invalid information" and will not participate in subsequent angle weighting.
[0047] It can be understood that this embodiment determines the validity of the prediction mode of the current block neighborhood by physical boundary check, encoding state check and mode type filtering. When any one of the physical boundary check, encoding state check and mode type filtering is unavailable, the prediction mode of the current neighborhood is determined to be invalid.
[0048] Step S2: Calculate the neighborhood state mask (Pattern ID).
[0049] To transform complex, unstructured neighborhood topologies into structured indexes that can be efficiently processed by computers, this embodiment of the invention introduces a "Pattern ID" generation mechanism. The system calculates a unique integer ID based on the validity of the five positions determined in step S1. The calculation uses a bitwise weighted sum:
[0050] in For the first The validity flag for each position (1 for valid, 0 for invalid); A validity marker indicating the left block neighbor position of the current block. A validity marker indicating the left block neighbor position of the current block. A validity marker indicating the top-left block neighborhood of the current block. A validity marker indicating the top-right block neighbor position of the current block. A validity marker indicating the position of the lower-left block neighbor of the current block.
[0051] like Figure 3 As shown, the specific mapping relationship is as follows: The left block (L) corresponds to the least significant bit (Bit 0), with a weight of 1; The upper block (A) corresponds to the 1st bit (Bit 1), with a weight of 2; The top left (AL) corresponds to the 2nd bit (Bit 2), with a weight of 4; The top right (AR) corresponds to the 3rd bit (Bit 3), with a weight of 8; The bottom left (BL) corresponds to the 4th bit (Bit 4), with a weight of 16.
[0052] Using this formula, any combination of missing neighboring blocks will be mapped to a unique integer between 0 and 31.
[0053] Example A: If the current block is located at the left edge of the image, causing L, AL, and BL to be missing, and only A and AR to exist, then PatternID = 2(A) + 8(AR) = 10.
[0054] Example B: If all neighboring blocks exist and are all in angular pattern, then Pattern ID = 1+2+4+8+16 = 31. This mechanism is equivalent to establishing a unique "digital fingerprint" for the neighborhood environment of the current block, which can cover all possible boundary cases.
[0055] Step S3: Retrieve adaptive prediction parameters based on ID.
[0056] Using the Pattern ID obtained in step S2 as an index, the system accesses the pre-stored global lookup table (LUT) in memory. This lookup table is the core achievement of this invention, obtained through offline training on massive video sequences, and stores parameter sets optimized for 31 different neighborhood states (Pattern ID 1~31).
[0057] Each set of parameters includes: (1) Weight vector W = { , , , , }: These correspond to the weighting coefficients of the five neighboring blocks; (2) Bias: Used to correct the intercept error of linear prediction.
[0058] The design of this parameter table embodies the concept of adaptive design. For example: When Pattern ID=31 (available in all directions), the weight vector obtained by looking up the table usually exhibits a "central diffusion" distribution, that is, L and A have larger weights, while AL / AR / BL have smaller but non-zero weights, in order to utilize global geometric information to smooth the prediction.
[0059] When Pattern ID=17 (only left and bottom left are available), in the weight vector obtained by looking up the table, the weight coefficients corresponding to top (A), top left (AL), and top right (AR) will be automatically set to 0, while the weight coefficients of left (L) and bottom left (BL) will be renormalized to the optimal value, thus completely avoiding noise interference or default value deviation caused by missing directions.
[0060] This embodiment also discloses a training scheme for intra-frame prediction derivation matrix based on neighborhood pattern classification. The implementation of this method first involves configuring the encoder in All Intra mode during the offline data acquisition phase, traversing massive video sequences for full encoding. Upon completion of encoding for each prediction unit (PU), the system records its final selected optimal intra-frame prediction pattern number as the target value in real time, and simultaneously extracts the encoded pattern numbers of neighboring blocks (including left, top, top left, top right, and bottom left) as associated features. After all video sequence encoding tasks are completed, the collected massive pattern data tuples are uniformly constructed into an offline training dataset.
[0061] During the data processing and matrix training phase, the system iterates through the offline captured pattern tuples, removes non-angle prediction samples of the target pattern, and constructs a five-bit binary mask using bitwise operations based on the non-zero validity of the pattern values at five neighborhood positions (left, top, top left, top right, and bottom left), thereby mapping massive amounts of data to the corresponding pattern identifier.
[0062] Subsequently, the system adopts a disk-caching-based classification storage strategy, which stores samples belonging to the same topology in the corresponding binary data blocks. This physical isolation mechanism effectively solves the memory allocation conflict during massive data training.
[0063] When performing specific weight calculations, the system independently performs parameter optimization based on the sum of absolute errors (SAD) criterion for each subset of data with a specific identifier. The training process abandons the traditional regression model with a bias term and forces the construction of an unbiased linear mapping matrix, that is, the current block prediction pattern is determined only by a weighted linear combination of the patterns of effective neighboring blocks.
[0064] The system dynamically retrieves samples from a subset of the dataset using memory mapping technology, constructing a vector composed of the target pattern and a feature matrix composed of the corresponding effective neighboring patterns. It then iterates in the multidimensional parameter space using a quasi-Newton method, aiming to minimize the Manhattan distance between the predicted value and the true optimal pattern value. Compared to traditional mean squared error, this SAD-based optimization strategy more effectively suppresses outlier interference caused by fluctuations in video pattern numbers, resulting in a more generalizable weight matrix.
[0065] Finally, the optimal floating-point weights of each group are converted into fixed-point integers with ten-digit precision through displacement quantization, and then standardized by combining the rounding offset to form a fixed-point pattern derivation matrix library that can adapt to neighborhood availability.
[0066] Step S4: Perform linear weighted prediction calculation.
[0067] Using the retrieved weights and biases, the system performs linear weighted prediction on the neighboring block pattern values obtained in step S1. To adapt to hardware pipeline implementation and reduce computational complexity, this embodiment of the invention uses integer fixed-point arithmetic instead of floating-point arithmetic. The calculation formula is as follows:
[0068] The parameters are designed as follows: : No. The pattern index value of each neighboring block; Accumulator precision: To prevent intermediate results from overflowing, the accumulation process uses a 64-bit integer (int64); Offset: Normalized offset, set to 512 in this embodiment (corresponding to...) ), used to perform rounding; Shift: Displacement amount, set to 10 in this embodiment, corresponding to the fixed-point precision of the weight parameter (i.e., the floating-point weight multiplied by 1024 and then rounded down). The raw result calculated by the system needs to be normalized (right-shifted) and clipped. Since the result of the linear combination may exceed the standard-defined mode range, the system needs to limit it to the legal angle mode range defined by the ECM standard (such as 2 to 66, or 2 to 130 in the extended mode). If the calculated result is less than the minimum angle index, it is corrected to the Planar or the nearest legal angle; if it exceeds the maximum index, it is truncated to the maximum value.
[0069] After calculating the matrix prediction mode (MatrixMode) in step S4, the next step is to perform row deduplication (Pruning): The matrix prediction pattern (MatrixMode) calculated in step S4 is used as a candidate pattern and attempted to be added to the MPM list. Before insertion, the system performs deduplication (Pruning): Compare MatrixMode with existing patterns in the list (usually, the list only contains Planar, or Planar and DC at this point): If not repeated: Insert the pattern at the specified position in the MPM list.
[0070] If repeated: skip this mode and proceed directly to the subsequent regular MPM list population process (such as adding default mode, derived mode, etc.) to ensure the diversity of the candidate list.
[0071] 2. Bitmask definition.
[0072] The five neighboring blocks surrounding the current block to be predicted represent the neighborhood reference sample set utilized in this invention: Position L (Left): The coded block immediately adjacent to the left boundary of the current block, with a corresponding bit weight of 1. ); Position A (Above): The coded block immediately adjacent to the upper boundary of the current block, with a corresponding bit weight of 2. ); Position AL (Above-Left): The encoded block located on the upper left diagonal of the current block, with a corresponding bit weight of 4. ); Position AR (Above-Right): The encoded block located on the upper right diagonal of the current block, with a corresponding binary bit weight of 8. ); Position BL (Below-Left): The encoded block located at the bottom left diagonal of the current block, with a corresponding binary bit weight of 16. ).
[0073] The advantages of this spatial structure design are: First, it breaks through the limitation of traditional MPMs that only utilize L and A, and introduces three corner point information: AL, AR, and BL. When L or A is unavailable (e.g., L is located outside the Slice boundary), AL or BL is often still available, thus providing additional angular reference information and enhancing the robustness of the prediction.
[0074] Second, through the design of binary bit weights, the calculation of Pattern ID is essentially the compression of the neighborhood topological state into a 5-bit data. This makes the "table lookup" operation extremely efficient, eliminating the need for complex conditional branch judgments (if-else), and greatly optimizing the execution efficiency of the hardware pipeline.
[0075] like Figure 4 The figure shows the experimental results of an embodiment of the present invention. Class A1 to Class F in the figure are standard test sequence classifications defined by JVET, used for performance testing under CTC. The three columns of data represent the BD-rate of the Y component, the BD-rate of the U component, and the BD-rate of the V component, respectively.
[0076] Finally, the innovations proposed in the embodiments of the present invention are summarized as follows: This invention addresses the shortcomings of existing ECM video coding standards' MPM list construction mechanisms in handling complex neighborhood environments by proposing an adaptive matrix intra-frame MPM prediction method based on neighborhood availability. This method represents a substantial improvement and innovation in three dimensions: neighborhood awareness mechanism, prediction model construction, and engineering implementation.
[0077] First, this invention establishes a refined neighborhood topology state classification mechanism based on bitmasks, breaking through the limitations of traditional techniques that rely solely on the field of view of two fixed neighboring blocks on the left and top. In actual encoding processes, image boundaries, slice division, or encoding order often result in incomplete neighboring block information. Existing technologies typically resort to a crude regress to an inefficient default mode when faced with such situations. To address this pain point, this invention innovatively introduces an extended neighborhood template containing five key positions: left, top, top-left, top-right, and bottom-left. By detecting the validity of these five positions, a unique "Pattern ID" is generated using a binary bit-weighted algorithm. This mechanism can accurately identify and distinguish up to 31 different combinations of missing neighborhoods (e.g., special edge cases where only the left and bottom-left sides are available). This refined classification provides precise structural guidance for subsequent differential prediction, ensuring that the system can still keenly perceive the current geometric environment and make optimal decisions even under extreme conditions of arbitrary neighborhood incompleteness, thereby extracting the maximum value from the remaining information.
[0078] Secondly, in terms of core prediction logic, this invention achieves a leap from "discrete selection" to "linear fusion," proposing a data-driven adaptive matrix linear fusion prediction technique. Traditional MPM construction algorithms typically directly copy the pattern of a neighboring block as the prediction value based on fixed rules, lacking deep integration of information from multiple neighboring blocks. This invention, however, obtains a set of optimal weight vectors and bias parameters for each specific Pattern ID through large-scale offline training. During the encoding process, the system uses these parameters to perform a linear weighted summation of the patterns of all valid neighboring blocks. This "soft fusion" mechanism can comprehensively consider the distance, orientation, and texture continuity of each neighboring block, calculating a "median angle" that integrates information from multiple sources. Experiments show that this new pattern, derived from matrix calculation, has higher prediction accuracy than a single neighboring block when dealing with regions with complex textures or gradual changes in orientation, significantly improving the hit rate of the first candidate in the MPM list, thereby greatly reducing the bit overhead of pattern index encoding.
[0079] Finally, to meet the stringent requirements of video coding standards for real-time performance and hardware cost, this invention employs a low-complexity lookup-table parameter matching and fixed-point computation design. Unlike the high-complexity tools introduced in ECM, such as DIMD (decoder-side pattern derivation) or TIMD (template matching), this invention completely avoids complex pixel-level gradient calculations or multiple search processes. The system uses Pattern ID to directly address the global lookup table (LUT) to obtain prediction parameters, avoiding complex conditional branch judgments and greatly optimizing pipeline efficiency. Simultaneously, the algorithm internally converts floating-point weights to fixed-point integers and normalizes the results of multiplication and addition operations through simple bit shifting. This makes the entire core algorithm involve only integer addition, multiplication, and shifting, resulting in extremely low computational overhead, easy parallel implementation in hardware, and high engineering application value.
[0080] Example 2 This embodiment discloses an adaptive matrix intra-frame MPM prediction system based on neighborhood availability.
[0081] An adaptive matrix intra-frame MPM prediction system based on neighborhood availability includes: The neighborhood information acquisition module is configured to: acquire the prediction patterns of the five neighboring locations around the current block; The neighborhood topology fingerprint information calculation module is configured to: use a binary bit weighted summation method, combined with the effectiveness of five neighborhood position prediction patterns, to determine the neighborhood topology fingerprint information of the current block; The indexing module is configured to: based on the neighborhood topological fingerprint information of the current block, index to obtain an optimal weight matrix corresponding to the current neighborhood state; The weighted calculation module is configured to use the optimal weight matrix to perform linear weighted calculation on the prediction modes of the five neighborhood positions to obtain the MPM candidates for the current block, fill them into the MPM list, and thus complete the intra-frame prediction in the image encoding and decoding process.
[0082] Example 3 The purpose of this embodiment is to provide a computer-readable storage medium.
[0083] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps in the adaptive matrix intra-MPM prediction method based on neighborhood availability as described in Embodiment 1 of this disclosure.
[0084] Example 4 The purpose of this embodiment is to provide an electronic device.
[0085] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in Embodiment 1 of this disclosure.
[0086] The steps and methods involved in the apparatuses of Embodiments 2, 3, and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0087] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0088] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. An adaptive matrix intra-frame MPM prediction method based on neighborhood availability, characterized in that, Includes the following steps: Obtain the predicted patterns of the five neighboring locations surrounding the current block; The neighborhood topological fingerprint information of the current block is determined by using a binary bit weighted summation method and combining the effectiveness of five neighborhood location prediction patterns. Based on the neighborhood topological fingerprint information of the current block, an optimal weight matrix corresponding to the current neighborhood state is obtained by indexing. Using the optimal weight matrix, the predicted modes of the five neighborhood positions are linearly weighted to obtain the MPM candidates for the current block, which are then filled into the MPM list, thereby completing the intra-frame prediction in the image encoding and decoding process.
2. The adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in claim 1, characterized in that, Obtain the predicted patterns of the five neighboring locations surrounding the current block, specifically including: Locate the spatial coordinates of the current block; Based on the spatial coordinates of the current block, locate the five neighboring blocks of the current block: left block, top block, top-left block, top-right block, and bottom-left block. The five neighboring locations and their predicted patterns are preprocessed, including performing neighbor block availability checks and pattern cleaning, specifically physical boundary checks, encoding state checks and pattern type filtering. The validity of the predicted pattern for the current block's neighborhood is determined by physical boundary checks, encoding state checks, and pattern type filtering. If any of these checks is unavailable, the predicted pattern for the current neighborhood is deemed invalid.
3. The adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in claim 2, characterized in that: The physical boundary check is as follows: determine whether each neighborhood location is within the physical boundary of the current image, strip, tile, or maximum coding unit. If it exceeds the boundary, it is considered unusable. The encoding status check is as follows: determine whether each neighboring location has been encoded / decoded; areas that have not yet been encoded are considered unusable. The mode type filtering is as follows: determine the prediction mode attribute of each neighborhood position. If the current neighborhood position uses the intra-angle mode, then read the specific mode index value; if the current neighborhood position uses the non-angle mode or inter-frame prediction mode, then force the mode value to be set to 0.
4. The adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in claim 2, characterized in that, Using a bit-weighted summation method and combining the effectiveness of five neighborhood location prediction patterns, the neighborhood topological fingerprint information of the current block is determined, specifically including: The five neighboring positions of the current block's left block, top block, top-left block, top-right block, and bottom-left block are respectively mapped to the least significant bit, the 1st bit, the 2nd bit, the 3rd bit, and the 4th bit in the binary representation. Introduce a validity marker corresponding to the validity of the prediction pattern for each neighborhood location; Calculate the product of the validity flag of the predicted pattern for each neighborhood location and the corresponding binary data, and sum the products obtained from the five neighborhood locations to obtain the neighborhood topological fingerprint information of the current block.
5. The adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in claim 1, characterized in that, The neighborhood topological fingerprint information of the current block is calculated using the following formula: ; in, This represents the neighborhood topological fingerprint information of the current block; For the first Validity markers for each neighborhood location, It can be 0, 1, 2, 3, or 4. A validity marker indicating the left block neighbor position of the current block. A validity marker indicating the left block neighbor position of the current block. A validity marker indicating the top-left block neighborhood of the current block. A validity marker indicating the top-right block neighbor position of the current block. A validity marker indicating the position of the lower-left block neighbor of the current block.
6. The adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in claim 1, characterized in that, Based on the neighborhood topological fingerprint information of the current block, an optimal weight matrix corresponding to the current neighborhood state is obtained through indexing, specifically including: A global lookup table is pre-stored, which stores the optimal weight matrix corresponding to different neighborhood states; Using the neighborhood topological fingerprint information of the current block as an index, access the global lookup table and match the optimal weight matrix corresponding to the neighborhood topological fingerprint information of the current block. The optimal weight matrix is obtained through offline training using a video sequence training dataset and includes a set of weight vectors and bias values.
7. The adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in claim 1, characterized in that, Using the optimal weight matrix, the predicted patterns of the five neighboring locations are linearly weighted to obtain the MPM candidates for the current block. The specific calculation method is as follows: in, Indicates the matrix prediction pattern. Indicates the first The pattern index value of each neighboring block; This represents the weight vector in the optimal weight matrix; The offset represents the bias value in the optimal weight matrix; the normalized offset represents the shift value; and the shift value represents the displacement. These represent the left block, top block, top-left block, top-right block, and bottom-left block, respectively. or, It also includes taking the obtained MPM candidates of the current block as a candidate pattern and populating the MPM list, and performing deduplication before insertion: The MPM candidate of the current block is compared with the existing patterns in the MPM list. If they are not duplicates, the MPM candidate of the current block is inserted into the specific position in the MPM list. If they are duplicates, the process of filling the MPM list continues.
8. An adaptive matrix intra-frame MPM prediction system based on neighborhood availability, characterized in that, include: The neighborhood information acquisition module is configured to: acquire the prediction patterns of the five neighboring locations around the current block; The neighborhood topology fingerprint information calculation module is configured to: use a binary bit weighted summation method, combined with the effectiveness of five neighborhood position prediction patterns, to determine the neighborhood topology fingerprint information of the current block; The indexing module is configured to: based on the neighborhood topological fingerprint information of the current block, index to obtain an optimal weight matrix corresponding to the current neighborhood state; The weighted calculation module is configured to use the optimal weight matrix to perform linear weighted calculation on the prediction modes of the five neighborhood positions to obtain the MPM candidates for the current block, fill them into the MPM list, and thus complete the intra-frame prediction in the image encoding and decoding process.
9. A computer-readable storage medium having a program stored thereon, characterized in that, When executed by the processor, the program implements the steps of the adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in any one of claims 1-7.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the adaptive matrix intra-frame MPM prediction method based on neighborhood availability as described in any one of claims 1-7.