Decoding method, encoding method, electronic apparatus, storage medium and program product
Patent Information
- Application Number
- PCT/CN2026/079877
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-18
- Filing Date
- 2026-02-25
- Publication Date
- 2026-10-22
Smart Images

Figure CN2026079877_22102026_PF_FP_ABST
Abstract
Description
Decoding methods, encoding methods, electronic devices, storage media and program products
[0001] This disclosure claims priority to Chinese patent application No. 202510494860.3, filed on April 18, 2025, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of communication technology, and in particular to a decoding method, encoding method, electronic device, storage medium, and program product. Background Technology
[0003] In video coding standards, information about the current block can be predicted by locating a reference block. However, in scenarios with complex image content, this method has poor adaptability to the image content and may not be able to accurately and reliably predict the information of the current block when the image content is complex. Summary of the Invention
[0004] On the one hand, a decoding method is provided, which includes:
[0005] Receive video stream;
[0006] Determine the sub-block prediction mode of the current block in the video stream;
[0007] Based on the sub-block prediction mode, the current block is divided into sub-blocks and the block vector motion information of each sub-block in the current block is determined;
[0008] Based on the block vector motion information of each sub-block, the reconstruction value of the current block is predicted.
[0009] In another aspect, an electronic device is provided, including a receiving module and a processing module;
[0010] The receiving module is used to receive video streams;
[0011] The processing module is used to determine the sub-block prediction mode of the current block in the video bitstream;
[0012] The processing module is also used to perform sub-block partitioning on the current block based on the sub-block prediction mode and determine the block vector motion information of each sub-block in the current block;
[0013] The processing module is used to predict the reconstruction value of the current block based on the block vector motion information of each sub-block.
[0014] On the other hand, an encoding method is provided, which includes:
[0015] Construct a list of intra-block copy candidate modes for the current block; the list of intra-block copy candidate modes for the current block includes a list of intra-block copy candidate modes based on sub-blocks;
[0016] Based on the intra-block copy candidate mode list of the current block, determine the sub-block prediction mode of the current block;
[0017] The video stream is obtained by encoding the current block based on the sub-block prediction mode of the current block;
[0018] Send the video stream.
[0019] In another aspect, an electronic device is provided, comprising: a processing module and a transmitting module;
[0020] The processing module is used to construct the intra-block copying candidate mode list for the current block; the intra-block copying candidate mode list for the current block includes an intra-block copying candidate mode list based on sub-blocks;
[0021] The processing module is also used to determine the sub-block prediction mode of the current block based on the intra-block copying candidate mode list of the current block;
[0022] The processing module is also used to encode the current block based on the sub-block prediction mode of the current block to obtain a video bitstream;
[0023] The sending module is used to send video streams.
[0024] In another aspect, an electronic device is provided, comprising: a memory and a processor; the memory and the processor being coupled; the memory being used to store a computer program; and the processor executing the computer program to implement the method of any of the above embodiments.
[0025] In another aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, which, when executed by a processor, implement the methods of any of the above embodiments.
[0026] In another aspect, a computer program product is provided, the computer program product including computer program instructions that, when executed by a processor, implement the method of any of the above embodiments.
[0027] In another aspect, a non-transitory computer-readable storage medium is provided for storing a video stream, the video stream including a target prediction mode index and / or first indication information; the target prediction mode index is used to determine the sub-block prediction mode of the current block from the intra-block copying candidate mode list; the first indication information is used to indicate whether a first prediction method is enabled; the first prediction method is a sub-block-based intra-block copying prediction method. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.
[0029] Figure 1 is a schematic diagram of the coding framework of a video coding standard according to some embodiments;
[0030] Figure 2 is a schematic diagram of a decoding framework for a video coding standard according to some embodiments;
[0031] Figure 3 is a block flipping schematic diagram according to some embodiments;
[0032] Figure 4 is a schematic diagram of a sampling method according to some embodiments;
[0033] Figure 5 is a schematic diagram of a candidate type for spatial motion vector prediction according to some embodiments;
[0034] Figure 6 is a block diagram of the architecture of a system according to some embodiments;
[0035] Figure 7 is a flowchart illustrating a decoding method according to some embodiments;
[0036] Figure 8 is a schematic diagram of a mode orientation according to some embodiments;
[0037] Figure 9 is a schematic diagram of a prediction pattern according to some embodiments;
[0038] Figure 10 is a schematic diagram of performing an offset operation on the block vector motion information of a sub-block according to some embodiments;
[0039] Figure 11 is a schematic diagram of another method for performing an offset operation on the block vector motion information of a sub-block according to some embodiments;
[0040] Figure 12 is a schematic diagram of a sub-block-initiated intra-block copying combined with local illumination compensation technique according to some embodiments;
[0041] Figure 13 is a flowchart illustrating an encoding method according to some embodiments;
[0042] Figure 14 is a block diagram of an electronic device according to some embodiments;
[0043] Figure 15 is a block diagram of another electronic device according to some embodiments;
[0044] Figure 16 is a block diagram of another electronic device according to some embodiments. Detailed Implementation
[0045] The technical solutions of this disclosure will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0046] It should be noted that, in this disclosure, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0047] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0048] In the description of this disclosure, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "more than one" means two or more.
[0049] The following describes the concepts that may be involved in this disclosure:
[0050] I. Hybrid Video Encoding / Decoding Framework:
[0051] For example, as shown in Figure 1, a schematic diagram of the coding framework of a video coding standard according to some embodiments is provided. It is used to indicate the H.266 / VVC coding framework of the video coding standard developed based on the joint video project of the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) and the International Organization for Standardization / International Electrotechnical Commission (ISO / IEC), including modules such as intra-frame prediction, inter-frame prediction, transform, quantization, loop filtering, and entropy coding.
[0052] The overall framework flow of the encoding end is as follows:
[0053] (1) The input video is first divided into frames and then into blocks;
[0054] (2) The divided blocks are sent to the intra / inter-frame prediction module for prediction coding. For example, the intra-frame prediction module is mainly used to remove spatial correlations of the image; the inter-frame prediction module is mainly used to remove temporal correlations of the image; Figure 1 shows the intra-frame prediction module performing intra-frame prediction as an example. In addition, intra / inter-frame selection can also be performed.
[0055] (3) Subtract the predicted value from the original block to obtain the residual value. Then transform and quantize the residual to remove frequency domain correlation and perform lossy compression on the data.
[0056] (4) Finally, all encoding parameters (intra-prediction data, quantized transform coefficients, motion data) and residuals are entropy-encoded to form a binary stream for storage or transmission. The output data of the entropy encoding module is the original video compressed bitstream (encoded data). Motion data is obtained by performing motion estimation on the input video. After motion estimation, motion compensation can be performed on the buffered video signal. Intra-prediction data is obtained through intra-frame estimation. The input to intra-frame estimation includes the input video and the output of the inverse quantization and inverse transform. After intra-frame estimation, the output of the intra-frame estimation and the output of the inverse quantization and inverse transform can be combined to perform intra-frame prediction.
[0057] (5) The predicted value and the residual after inverse quantization and inverse transformation are added together to obtain the block reconstruction value, and finally the reconstructed image is formed.
[0058] (6) The reconstructed image is filtered by a loop filter and stored in the image buffer as a reference image for the future.
[0059] For example, as shown in Figure 2, a schematic diagram of a decoding framework for a video coding standard according to some embodiments is provided to indicate the decoding framework for the video coding standard H.266 / VVC.
[0060] Overall framework flow of the decoding end:
[0061] (1) Parse the bitstream to obtain the prediction pattern and get the prediction value;
[0062] (2) Perform inverse transformation and inverse quantization on the residual obtained from the code stream parsing;
[0063] (3) The predicted value and the residual after inverse quantization and inverse transformation are added together to obtain the block reconstruction value, and finally the reconstructed image is formed. The predicted value is obtained by inter-frame / intra-frame selection.
[0064] (4) The reconstructed image is filtered by a loop filter and stored in an image buffer as a reference image for future use. Intra-frame prediction can also be performed on the reconstructed image. Motion compensation can also be performed on the buffered image. After image buffering, a video signal can be output.
[0065] Similar hybrid framework-based encoding and decoding structures are used in standards such as AVS3 and H.266 / VVC.
[0066] II. Intra Block Copy (IBC):
[0067] Intra-frame block copying (IBC) is an intra-prediction technique primarily used for screen content coding (SCC). Unlike traditional intra-prediction methods (such as direct current (DC) prediction and angle prediction), IBC uses already encoded blocks in the same frame (the current frame) to predict the current block, thereby reducing redundant information and improving coding efficiency. In traditional video coding, inter-frame prediction uses already encoded blocks in a reference frame as a prediction reference, while IBC searches for similar blocks within the same frame, matches them, and copies their pixel values, thus avoiding the storage and transmission overhead associated with inter-frame prediction.
[0068] The core idea of IBC is to find the best-matching block within the encoded region of the current frame and copy the pixels of that block to the current block as the predicted value. The process is as follows: First, search for matching blocks: Within the encoded region of the current frame, search for regions similar to the current block. The search range is usually limited to the encoded region of the current frame. Search methods similar to motion estimation (ME) are used, such as integer pixel search and sub-pixel search. Matching degree evaluation: Calculate the matching degree between the candidate block and the current block, for example, using metrics such as the sum of absolute differences (SAD) or the sum of squared differences (SSD). Select the block with the smallest error as the best-matching block (or best block vector (BV)).
[0069] The IBC block vector (BV) is similar to the inter-frame motion vector (MV), but the search range is limited to the current frame.
[0070] Vector prediction and encoding are performed using methods similar to Advanced Motion Vector Prediction (AMVP) in inter-frame prediction.
[0071] IBC residual coding: Calculates the residual between the actual pixel value and the predicted block, and performs transformation, quantization, entropy coding, and other processing. If the matching blocks are completely identical, no residual information is needed, and the copied block can be used directly for reconstruction.
[0072] To transmit block vectors (BVs) more efficiently, the IBC Merge mode allows the current block to reuse the block vectors of adjacent blocks without explicitly encoding BVs separately, thus reducing bit overhead. Its core idea is similar to the Merge mode (MV Merge) in traditional inter-frame prediction, where the current block can directly inherit motion information from surrounding coded blocks (in IBC, this is the block vector BV).
[0073] III. Reconstruction-Reordered IBC (RRIBC) Mode:
[0074] In IBC (Intra-Block Copy) coded blocks, the Reconstruction-Reordered IBC (RR-IBC) mode is allowed. When RR-IBC mode is applied, samples in the reconstructed block are flipped according to the flip type of the current block. At the encoding end, the original block is flipped before motion search and residual calculation, while the generation of the prediction block is not flipped. At the decoding end, the reconstructed block is flipped back to its original state when reconstructing the original block.
[0075] The RR-IBC mode supports two flipping methods: horizontal flip and vertical flip.
[0076] In IBC AMVP mode, the syntax signal first indicates whether to apply flip; if flip is enabled, the syntax signal further indicates the specific flip type (horizontal or vertical).
[0077] In IBC Merge mode, the flip type is directly inherited from the adjacent block, thus requiring no additional syntax signal transmission. Due to the influence of horizontal or vertical symmetry, the current block and the reference block are typically aligned horizontally or vertically. Therefore: when a horizontal flip is applied, the vertical component of the BV (block vector) does not need to be encoded and is deduced as 0. When a vertical flip is applied, the horizontal component of the BV does not need to be encoded and is deduced as 0.
[0078] Flip-sensing block vector (BV) adjustment method:
[0079] To better utilize block symmetry, the RR-IBC model applies a flip-aware block vector adjustment method to optimize block vector candidates. For example, as shown in Figure 3, assuming (x... nbr ,y nbr ) and (x cur ,y cur ) represents the center sample coordinates of adjacent blocks and the center sample coordinates of the current block (Cur). BV nbr and BV cur These represent the block vectors (BV) of adjacent blocks and the current block, respectively. nbr h and BV nbr v These represent the horizontal and vertical components of adjacent block BVs, respectively. To optimize the BV inheritance strategy:
[0080] When adjacent blocks are horizontally flipped, the horizontal component of the current block's BV is calculated by adding a motion shift: BV cur h=2(x nbr -x cur )+BV nbr h The center sample coordinates of the reference blocks (ref) corresponding to the adjacent blocks and the current block after flipping are respectively (x... nbr+ BV nbr h ,y nbr ) and (2x nbr -x cur+ BV nbr h ,y cur Here, BV cur h <0, BV nbr h <0.
[0081] When adjacent blocks are vertically flipped, the vertical component of the current block's BV is calculated by adding a motion displacement: BV cur v =2(y nbr -y cur )+BV nbr v The center sample coordinates of the reference blocks (ref) corresponding to the adjacent blocks and the current block after flipping are respectively (x... nbr ,y nbr+ BV nbr v ) and (x cur ,2y nbr -y cur+ BV nbr v ). Among them, BV nbr v <0, BV cur v <0.
[0082] In Figure 3, the dashed line is the axis of symmetry, representing the baseline for horizontal or vertical flipping.
[0083] IV. Intra Block Copy with Local Illumination Compensation (IBC-LIC):
[0084] Intra-frame block duplication combined with local illumination compensation (IMC) is a coding tool that compensates for local illumination variations between a code unit (CU) and its prediction block within the same IBC frame using linear equations. The parameters of this linear equation are derived in the same way as for inter-frame prediction IMC, but in IBC-LIC, the reference template is generated based on the block vector (BV). IBC-LIC can be applied to IBC AMVP and IBC Merge modes. In IBC AMVP mode, the IBC-LIC flag indicates whether IBC-LIC is used. It allows the use of top-only, left-only, or L-shaped templates to derive the parameters of a single model. MMLM is extended to IBC-LIC, allowing IBC-LIC to use two linear models within a single CU. In IBC-LIC MMLM mode, only L-shaped templates are used for derivation, and a mode index is transmitted. In IBC Merge mode, the IBC-LIC flag is derived from the merge candidates. The IBC-LIC flag is inherited from the IBC HMVP candidate to ensure consistency between IBC HMVP and IBC-LIC, similar to LIC in inter-frame prediction.
[0085] V. Intra Block Copy with Combined Inter and Intra Prediction (IBC-CIIP):
[0086] Combining intra-block copying (IBC) and intra-prediction is a coding tool used in the CU (Code Encoding Unit). It generates two prediction signals through IBC and intra-prediction, and then performs a weighted sum of these two signals to generate the final prediction signal. The calculation method is as follows: P = (w... ibc *P ibc +((1<<shift)-w ibc )*P intra +(1<<(shift-1)))>>shift formula 1;
[0087] Here, w ibc This represents the weights of the IBC prediction signal. `shift` is the number of bits used for right shifting the weighted calculation result into an integer approximate division. P ibc P intra These represent the IBC prediction signal and the intra-frame prediction signal, respectively. In IBC Merge mode and IBC AMVP mode, they are set to (13,4) and (1,1), respectively.
[0088] The intra-prediction signal is generated from an intra-prediction mode (IPM) candidate list, which is predefined to be 2. The IPM used is indicated by transmitting the IPM index.
[0089] VI. Subblock-based Temporal Motion Vector Prediction (SbTMVP):
[0090] Sub-block-based temporal motion vector prediction leverages motion information from co-frames to improve motion vector prediction for coding units (CUs) in the current frame. SbTMVP divides the current CU into fixed-size sub-blocks (typically 8×8) and derives motion vectors individually for each sub-block. This approach allows for capturing motion information at a finer granularity, improving prediction accuracy. Furthermore, SbTMVP applies a motion offset derived from the motion vectors of spatially adjacent blocks in the current CU before acquiring motion information from co-frames.
[0091] sbTMVP and Affine share the same sub-block candidate list. sbTMVP candidates are added to the sub-block candidate list after template reordering.
[0092] VII. Motion Vector Angle Prediction (MVAP):
[0093] AVS3 Phase 2 adopted Motion Vector Angle Prediction (MVAP).
[0094] MVAP constructs five angle prediction modes: horizontal, vertical, horizontal up, horizontal down, and vertical right. The MVAP mode is placed as an additional candidate before the Skip and Direct modes. During list construction, the MVAP mode needs to be checked for duplicates with the modes in the list. To reduce the complexity of hardware implementation, a sampling method as shown in Figure 4 is used for duplicate checking. Arrows 0-4 in Figure 4 correspond to the five angle prediction modes: horizontal, vertical, horizontal up, horizontal down, and vertical right, respectively. In Figure 4, E represents the current block, and A1-AN, B1-BN, C1-CN, and D1-DN represent the blocks surrounding the current block.
[0095] Next, motion information needs to be padded to the intra-frame or uncoded blocks of surrounding blocks. The padding method is similar to that used for intra-frame reference pixels. Finally, motion information is padded to each 8x8 sub-block within the current coding unit according to the configured angle.
[0096] 8. Sub-block-based Spatial Motion Vector Prediction (sbSMVP) method:
[0097] A sub-block-based spatial motion vector prediction (sbSMVP) method is proposed to derive the sub-block motion field from spatial neighboring blocks. The sub-block motion field of the current coding unit (CU) can be inherited based on the motion information of spatial neighboring blocks. Figure 5 illustrates different types of sbSMVP candidates, where the motion vectors of sub-blocks are inherited from neighboring blocks in specific directions. In examples of SSMVP candidate types, motion vectors (MVs) are inherited along the horizontal, vertical, diagonal-top-left (diagonal-TL), diagonal-bottom-left (diagonal-BL), and diagonal-top-right (diagonal-TR) directions.
[0098] The sbSMVP method is implemented as an additional candidate in the sub-block Merge candidate list. In subsequent tests, a maximum of five SSMVP candidates are added, positioned between the sbTMVP and affine Merge candidates. If an SSMVP candidate is selected, the motion data (such as motion vectors, reference indices, and prediction directions) of the corresponding neighboring sub-blocks are copied to the current sub-block along predefined directions, as shown by the arrows in Figure 5.
[0099] All sub-block motion candidates, including sbTMVP, sbSMVP, and affine candidates, will be reordered in the same manner as the current Enhanced Compression Model (ECM). Similar to ECM, 20 candidates are ultimately selected for Merge index signal transmission. This proposed method requires no additional signal transmission.
[0100] It should be noted that in video coding standards, information about the current block can be obtained by locating a reference block and predicting based on the reference block.
[0101] However, in scenarios with complex image content, the above method has the problem of poor adaptability to image content and may not be able to accurately and reliably predict the information of the current block when the image content is complex.
[0102] To address the aforementioned technical problems, this disclosure provides a decoding method that uses the sub-block prediction mode of the current block to reflect the sub-block division method of the current block and the prediction method of each sub-block. Therefore, based on the sub-block prediction mode, the current block can be divided into sub-blocks, and the block vector motion information of each sub-block within the current block can be determined. Since video streams contain repetitive structures, such as a sub-block and its corresponding reference sub-block being identical, or a sub-block having a high similarity to its reference block, and since the block vector motion information of a sub-block reflects the relative motion information (such as relative displacement) between the sub-block and its corresponding reference sub-block, the reconstructed value of the current block can be predicted based on the block vector motion information of each sub-block. Furthermore, compared to traditional techniques that predict the current block using its block vector motion information, predicting the current block based on the block vector motion information of its sub-blocks offers finer granularity and thus more accurate and reliable prediction of the current block. When the content of the current block, or the image content corresponding to the current block, is more complex, sub-block partitioning can better adapt to the image content and enable efficient and reliable transmission of images or videos.
[0103] In some embodiments, the above-described decoding or encoding method can be applied to the system shown in FIG6. As shown in FIG6, the system includes: a first node 601 and a second node 602.
[0104] Here, the first node 601 can be a decoding device, or a device with decoding and encoding functions, which can receive and decode video streams.
[0105] In some embodiments, the first node 601 may be used to receive a video bitstream from the second node 602; or, to determine the sub-block prediction mode of the current block in the video bitstream; or, to perform sub-block partitioning on the current block based on the sub-block prediction mode and determine the block vector motion information of each sub-block in the current block; or, to predict the reconstruction value of the current block based on the block vector motion information of each sub-block.
[0106] The second node 602 can be an encoding device, or a device with encoding and decoding functions, which can generate and send video streams.
[0107] In some embodiments, the second node 602 may be used to construct an intra-block copy candidate mode list for the current block; the intra-block copy candidate mode list for the current block includes an intra-block copy candidate mode list based on sub-blocks; or, to determine the sub-block prediction mode of the current block based on the intra-block copy candidate mode list of the current block; or, to perform encoding on the current block based on the sub-block prediction mode of the current block to obtain a video stream; or, to send the video stream to the first node 601.
[0108] It should be noted that Figure 6 is only an exemplary framework diagram, and the number of devices included in Figure 6 and the names of each device are not limited.
[0109] The application scenarios of the embodiments disclosed herein are not limited. The system architecture and business scenarios described in the embodiments of this disclosure are for the purpose of more clearly illustrating the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of this disclosure. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this disclosure are also applicable to similar technical problems.
[0110] The decoding and encoding methods provided in the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0111] The decoding method provided in this embodiment can be applied to the first node 601 in the system shown in FIG. 6. FIG. 7 shows a schematic flowchart of a decoding method, which includes the following steps S701-S704:
[0112] In S701, video streams are received.
[0113] In S702, the sub-block prediction mode of the current block in the video stream is determined.
[0114] In one possible implementation, the current block can be determined to belong to the intra-block copy prediction mode by parsing the video bitstream; further parsing the video bitstream can determine that the current block belongs to the intra-block copy prediction mode of the sub-block.
[0115] In some embodiments, prediction mode-related information is transmitted via the syntax element structure shown in Table 1 below:
[0116] Table 1 Syntax Element Structure
[0117] Here, `predMode` represents the encoding mode of the current block, indicating whether the current block belongs to intra-prediction mode, inter-prediction mode, or intra-block copy mode. The representation of syntax fields is not limited to this embodiment.
[0118] ibc_sub_flag: This flag indicates whether sub-block-based IBC prediction is enabled for the current block. A value of 1 indicates that it is enabled, and a value of 0 indicates that it is not enabled. The representation of these syntax fields is not limited to this embodiment.
[0119] In some embodiments, ibc_sub_flag will only be resolved if the current block is in IBC mode (MODE_IBC); otherwise, ibc_sub_flag defaults to 0.
[0120] In some embodiments, syntax elements based on sub-block IBC prediction are only parsed if the current block size meets a given condition. For example, if the area of the current block is not less than A, or if the current width or height is greater than or equal to L.
[0121] In some embodiments, IBC-based IBC prediction syntax elements are only parsed when some associated syntax elements of IBC are 0. For example, when template matching-based IBC is not enabled, or when IBC-merge mode is enabled.
[0122] In another possible implementation, the sub-block prediction mode of the current block in the video bitstream is determined as follows: The prediction mode of the current block is determined to be a sub-block-based intra-block replication prediction mode; a list of intra-block replication candidate modes for the current block is constructed; this list includes the sub-block-based intra-block replication candidate mode list; and the sub-block prediction mode of the current block is determined from this list. It should be noted that when the prediction mode of the current block is determined to be a sub-block-based intra-block replication prediction mode, an intra-block replication candidate mode list that includes the sub-block-based intra-block replication candidate mode list can be constructed. This allows for the acquisition of various candidate sub-block prediction modes applicable to the current block. Furthermore, the sub-block prediction mode of the current block can be determined from this list of intra-block replication candidate modes.
[0123] In some embodiments, the candidate mode list for intra-block copying based on sub-blocks includes at least one of the following prediction modes: vertical mode, horizontal mode, top-left mode, bottom-left mode, and top-right mode. The prediction mode (or the set corresponding to the prediction mode) includes the set of angles corresponding to that prediction mode (or, in other words, the prediction mode is a set of prediction modes composed of a given set of angles). The direction corresponding to the vertical mode can be 90 degrees downwards. The angle set corresponding to the horizontal mode can be 180 degrees to the right. The angle set corresponding to the top-left mode is 135 degrees to the bottom right. The angle set corresponding to the bottom-left mode is 225 degrees to the top right. The angle set corresponding to the top-right mode is 45 degrees to the bottom left. It should be noted that the above angles are used to indicate the angle between a horizontally rightward line and a line rotated counterclockwise from that line. The angle of a horizontally rightward line is 0 degrees.
[0124] For example, as shown in Figure 8, which is a schematic diagram of a mode direction according to some embodiments, any direction in the figure, rotating clockwise from the vertical dashed line to the horizontal dashed line, can be used as a prediction direction of a prediction mode.
[0125] For example, as shown in Figure 9, a schematic diagram of a prediction mode according to some embodiments illustrates an example of an intra-block copying candidate mode list based on sub-blocks indicating the respective vertical mode, horizontal mode, top-left mode, bottom-left mode, and top-right mode. In the figure, BV represents a block vector or block vector motion information. The subscript of BV is the sequence number of the block vector.
[0126] In some embodiments, the sub-block-based intra-block replication candidate mode list includes prediction modes that are available prediction modes. It should be understood that by including available prediction modes in the sub-block-based intra-block replication candidate mode list, compared to a candidate mode list that also includes unavailable prediction modes or has not undergone availability filtering, the sub-block prediction mode for the current block can be determined more quickly from the sub-block-based intra-block replication candidate mode list, reducing the overhead of selecting a sub-block prediction mode.
[0127] In some embodiments, the availability of a prediction mode is determined based on the availability of the spatial reference motion field of the current block. It should be understood that the spatial reference motion field of the current block reflects the motion trend of the region surrounding the current block, and the availability of the spatial reference motion field reflects whether it can be used to predict the current block. Therefore, determining the availability of a prediction mode based on the availability of the spatial reference motion field of the current block ensures that all prediction modes included in the intra-block copy candidate mode list based on sub-blocks are suitable for predicting sub-blocks of the current block.
[0128] In some embodiments, the availability of the spatial reference motion field of the current block and the availability of the prediction mode satisfy at least one of the following:
[0129] Vertical mode is unavailable when all adjacent reference motion fields (BV1-BV4 in Figure 9) are unavailable in the spatial domain of the current block.
[0130] The horizontal mode is unavailable when the left adjacent reference motion fields (BV5-BV8 in Figure 9) of the current block's airspace are all unavailable;
[0131] The upper right mode is unavailable when the adjacent reference motion fields in the spatial domain of the current block and the upper right reference motion fields in the spatial domain (as shown in Figure 9, BV2-BV4 and BV13-BV16) are both unavailable.
[0132] The lower left mode is unavailable when both the left adjacent reference motion field and the lower left reference motion field (as shown in Figure 9, BV5-BV8 and BV9-BV12) in the current block's airspace are unavailable.
[0133] The top-left mode is unavailable when both the left-adjacent reference motion field in the current block's airspace and the top-adjacent reference motion fields in the airspace (as shown in Figure 9, BV0-BV3 and BV5-BV7) are unavailable.
[0134] Vertical mode is unavailable when adjacent reference motion fields (BV1-BV4 in Figure 9) are all available and identical in the spatial domain of the current block.
[0135] The horizontal mode is unavailable when the left adjacent reference motion fields (BV5-BV8 in Figure 9) of the current block are all available and identical;
[0136] When the adjacent reference motion fields in the spatial domain of the current block and the upper right reference motion fields in the spatial domain (as shown in Figure 9, BV2-BV4 and BV13-BV16) are both available and identical, the upper right mode is unavailable.
[0137] When the left adjacent reference motion field and the lower left reference motion field (as shown in Figure 9) of the current block are available and are the same, the lower left mode is not available;
[0138] The top-left mode is unavailable when the left-adjacent reference motion field in the current block's airspace and the top-adjacent reference motion fields in the airspace (as shown in Figure 9, BV0-BV3 and BV5-BV7) are both available and identical.
[0139] It should be noted that an unavailable reference location indicates that the reference location does not contain a reconstructed block, a block vector, or a valid block vector. A valid block vector indicates that it points to the specified reference region, and the corresponding region has been reconstructed.
[0140] When adjacent reference motion fields in the spatial domain of the current block are unavailable, reliable block vector motion information cannot be obtained from adjacent reference motion fields in the spatial domain, and prediction cannot be performed in the vertical direction. In this case, the vertical mode is unavailable. The same applies to the horizontal mode.
[0141] If the adjacent reference motion fields in the spatial domain and the upper-right reference motion field in the spatial domain are both unavailable, reliable block vector motion information cannot be obtained from these reference motion fields. Therefore, prediction cannot be performed in the upper-right direction, and the upper-right mode is unavailable. The same applies to the lower-left and upper-left modes.
[0142] If all adjacent reference motion fields in the spatial domain of the current block are available and identical, performing predictions using the vertical mode incurs higher prediction costs compared to directly reusing block vector motion information. In this case, the vertical mode can be considered redundant and inefficient, and can be determined to be unavailable to prevent subsequent selection of this costly mode and reduce the probability of increased prediction costs. The same logic applies to the horizontal, upper-right, lower-left, and upper-left modes.
[0143] In some embodiments, the order of the predicted modes included in the intra-block copy candidate mode list satisfies one of the following: sorted based on an arbitrary fixed order, sorted based on the shape of the block, or sorted based on template cost.
[0144] It should be noted that the order of prediction modes in the intra-block copy candidate mode list affects both the construction process of the intra-block copy candidate mode list and the determination of the final prediction mode used by the current block based on the intra-block copy candidate mode list.
[0145] Here, sorting based on an arbitrary fixed order allows prediction modes to be ordered according to a desired or pre-defined order, resulting in fast list construction and low power consumption. Sorting based on block shape requires analyzing the block shapes and sorting them according to certain logic. Sorting based on template cost involves significant computation because it requires determining the template cost. Furthermore, when selecting a suitable prediction mode from the list, sorting based on block shape or template cost enables the decoding device to determine the appropriate or optimal prediction mode more quickly. Therefore, during list construction, the sorting method can be determined by combining the efficiency of list construction with the efficiency of selecting a suitable prediction mode. For example, a fixed order sorting can be used when the decoding device has limited capabilities and the desired decoding latency requirement is low.
[0146] For example, sorting based on block shape may include: when the block's width is greater than its height, prioritizing the addition of vertical, top-left, or top-right patterns to the candidate list; when the block's height is greater than its width, prioritizing horizontal, bottom-left, or top-left patterns to the candidate list.
[0147] For example, template cost sorting can be done by adding predicted modes to the intra-block copy candidate mode list in ascending order of module cost.
[0148] In some embodiments, the template for the prediction pattern can be a reconstructed region surrounding the current block or a reference block, and may include at least one of the left region, the top region, the upper left region, the upper right region, and the lower left region. The template cost of a prediction pattern can be determined by the difference between the template of the current block based on the prediction pattern and the reference template of the reference block to which the candidate motion vector points. In some embodiments, this difference can be determined based on at least one of the following methods: Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), Mean Absolute Difference (MAD), Sum of Absolute Transformed Differences (SATD), and Mean-Removed Sum of Absolute Differences (MRSAD).
[0149] In some embodiments, the intra-block copy candidate mode list also includes a block-based intra-block copy candidate mode list.
[0150] In some embodiments, constructing an intra-block copying candidate mode list for the current block includes: constructing a block-based intra-block copying candidate mode list; constructing a sub-block-based intra-block copying candidate mode list; and determining the intra-block copying candidate mode list for the current block based on the block-based and sub-block-based intra-block copying candidate mode lists. It should be understood that in some scenarios, some blocks in the video stream may choose block-based intra-block copying candidate modes for prediction, while others may choose sub-block-based intra-block copying candidate modes. In this case, an intra-block copying candidate mode list for the current block that includes both the block-based and sub-block-based intra-block copying candidate mode lists can be constructed.
[0151] In some embodiments, the block-based intra-block copying candidate mode list includes at least one of the following types of modes: spatially adjacent block vector prediction mode, spatially non-adjacent block vector prediction mode, temporal block vector prediction mode, chained block vector prediction mode, historical block vector prediction mode, and default block vector prediction mode.
[0152] In some embodiments, the order between the block-based intra-block copying candidate mode list and the sub-block-based intra-block copying candidate mode list satisfies one of the following:
[0153] The sub-block-based intra-block copying candidate mode list is located at the top of the intra-block copying candidate mode list for the current block.
[0154] The sub-block-based intra-block copying candidate mode list is located at the end of the current block's intra-block copying candidate mode list.
[0155] The sub-block-based intra-block copy candidate mode list is located between any two types of modes in the block-based intra-block copy candidate mode list.
[0156] The block-based intra-block copy candidate mode list and the sub-block-based intra-block copy candidate mode list are sorted by template cost in the intra-block copy candidate mode list for the current block.
[0157] In some embodiments, where the intra-block copying candidate mode list includes a sub-block-based intra-block copying candidate mode list, the sub-block prediction mode of the current block is determined from the intra-block copying candidate mode list by: determining the first prediction mode in the intra-block copying candidate mode list as the sub-block prediction mode of the current block; or, parsing the video bitstream to obtain the target prediction mode index; and determining the sub-block prediction mode of the current block from the intra-block copying candidate mode list based on the target prediction mode index.
[0158] For example, as shown in Table 2, this is a schematic table of syntax elements for a sub-block prediction mode index according to some embodiments, used to parse the video bitstream to obtain the target prediction mode index; based on the target prediction mode index, the sub-block prediction mode of the current block is determined from the intra-block copy candidate mode list:
[0159] Table 2 Syntax Elements of Sub-Block Prediction Mode Index
[0160] Here, ibcSubIdx represents the index of the selected sub-block prediction mode in the candidate list of sub-block prediction modes. The value ranges from 0 to maxNumIbcSub. maxNumIbcSub represents the maximum value in the candidate list of sub-block prediction modes, which can be specified using syntax elements in the Video Parameter Set (VPS), Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), or Slice Header (SH), or is a fixed value such as 5 or 2.
[0161] In S703, based on the sub-block prediction mode, the current block is divided into sub-blocks and the block vector motion information of each sub-block in the current block is determined.
[0162] In one possible implementation, based on the sub-block prediction pattern, the current block is divided into sub-blocks and the block vector motion information of each sub-block in the current block is determined, including: dividing the current block into sub-blocks based on the sub-block prediction pattern; merging adjacent sub-blocks into one sub-block if the block vector motion information of adjacent sub-blocks in the current block is consistent; and copying the block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction pattern into each sub-block of the current block to obtain the block vector motion information of each sub-block.
[0163] In some embodiments, the sub-block prediction pattern and the target adjacent spatial region satisfy at least one of the following:
[0164] When the sub-block prediction mode is horizontal, the target's adjacent airspace region is the left adjacent airspace region.
[0165] When the sub-block prediction mode is vertical, the target's adjacent airspace region is the upper adjacent airspace region;
[0166] When the sub-block prediction mode is the top-left mode, the target's adjacent airspace regions are the left adjacent airspace region and the top adjacent airspace region.
[0167] When the sub-block prediction mode is the lower left mode, the target's adjacent airspace regions are the left adjacent airspace region and the lower adjacent airspace region.
[0168] When the sub-block prediction mode is the upper right mode, the target's adjacent airspace regions are the right adjacent airspace region and the upper adjacent airspace region.
[0169] In some embodiments, at least one of the following is also satisfied for each sub-block:
[0170] The minimum width or minimum height of the sub-block is a given value;
[0171] If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block uses the block vector motion information of the adjacent sub-block;
[0172] If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block performs predictive filling using either Planar mode or DC mode;
[0173] If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block uses the intra-frame angle partitioning mode corresponding to the partitioning direction angle of the sub-block to perform prediction filling;
[0174] Sub-blocks have the re-reordering intra-block copying technology disabled by default.
[0175] Sub-blocks are disabled by default, combining intra-block copying with local illumination compensation technology.
[0176] The technique of filtering the predicted blocks for intra-block copying is disabled by default in sub-blocks;
[0177] When the reconstructed reordering intra-block copying technique is enabled in a sub-block, the block vector motion information of the sub-block is offset based on the flip type of the reconstructed reordering intra-block copying technique.
[0178] When intra-block copying combined with local illumination compensation technology is enabled for a sub-block, or when filtering is applied to the predicted block of intra-block copying, the local illumination compensation model parameters or the filtered intra-block copying model parameters for the sub-block are derived based on the adjacent spatial regions corresponding to the sub-block. Alternatively, when intra-block copying combined with local illumination compensation technology is enabled for a sub-block, or when filtering is applied to the predicted block of intra-block copying, the local illumination compensation model parameters or the filtered intra-block copying model parameters for the sub-block are determined from the coding block to which the reference block vector motion information belongs.
[0179] For example, the minimum width or minimum height of a sub-block can be 4 or 8.
[0180] In some embodiments, the sub-block inherits the reconstructed reordering intra-block copying technology switch of the motion information of the reference region corresponding to the sub-block. For example, when the motion information of the reference region enables the reconstructed reordering intra-block copying technology, the sub-block enables the reconstructed reordering intra-block copying technology and uses the corresponding flipping mode (horizontal flipping and vertical flipping); when the motion information of the reference region disables the reconstructed reordering intra-block copying technology, the corresponding sub-block disables the reconstructed reordering intra-block copying technology.
[0181] For example, as shown in Figure 10, this is a schematic diagram of performing an offset operation on the block vector motion information of a sub-block according to some embodiments. It illustrates the flipping of the block vector motion information of a sub-block when the sub-block is enabled by the reconstruction reordering intra-block copying technique and the flipping type is horizontal mode. In the figure, (xc, yc) represents the center position of the current sub-block, and (xn, yn) represents the center position of the coding block to which the reference block vector motion information of the current sub-block belongs. When horizontally flipped, the BVc of the current sub-block is the reference BVn plus twice the horizontal offset of the center position, i.e., BVc = 2(xn - xc) + BVn, where BV is a negative value representing the horizontal component. The vertical component is 0. After flipping, the center position of the sub-block is (xc + BVc, yc), and the center position of the corresponding coding block is (xn + BVn, yn).
[0182] For example, as shown in Figure 11, this is a schematic diagram of another method for performing an offset operation on the block vector motion information of a sub-block according to some embodiments. It illustrates the flipping of the block vector motion information of a sub-block when the sub-block is enabled by the reconstruction reordering intra-block copying technique and the flipping type is vertical mode. In the figure, (xc, yc) represents the center position of the current sub-block, and (xn, yn) represents the center position of the coding block to which the reference block vector motion information of the current sub-block belongs. When flipped vertically, the BVc of the current sub-block is the reference BVn plus twice the vertical offset of the center position, i.e., BVc = 2(yn - yc) + BVn, where BV is a negative value representing the vertical component. The horizontal component is 0. After flipping, the center position of the sub-block is (xc, yc + BVc), and the center position of the corresponding coding block is (xn, yn + BVn).
[0183] In some embodiments, the sub-block inherits the switching of the intra-block replication combined with local illumination compensation technology / the technology of filtering the predicted block of the intra-block replication, which corresponds to the motion information of the reference region. For example, when the motion information of the reference region enables the intra-block replication combined with local illumination compensation technology / the technology of filtering the predicted block of the intra-block replication, the corresponding sub-block enables the intra-block replication combined with local illumination compensation technology / the technology of filtering the predicted block of the intra-block replication; when the motion information of the reference region disables the intra-block replication combined with local illumination compensation technology / the technology of filtering the predicted block of the intra-block replication, the corresponding sub-block disables the intra-block replication combined with local illumination compensation technology / the technology of filtering the predicted block of the intra-block replication.
[0184] For example, as shown in Figure 12, this is a schematic diagram of a sub-block-initiated intra-block copying combined with local illumination compensation technique according to some embodiments. In the figure, the current block is divided into four horizontal sub-blocks, including sub-block 1, sub-block 2, sub-block 3, and sub-block 4. Among them, sub-block 2 disables the intra-block copying combined with local illumination compensation technique, while the other sub-blocks enable the intra-block copying combined with local illumination compensation technique. Sub-block 1 uses the intra-block copying combined with local illumination compensation model 1 (or LIC1) derived from template 1 for brightness compensation, sub-block 3 uses the intra-block copying combined with local illumination compensation model 3 (or LIC3) derived from template 3 for brightness compensation, and sub-block 4 uses the intra-block copying combined with local illumination compensation model 4 (or LIC4) derived from template 4 for brightness compensation.
[0185] For example, suppose a sub-block initiates the technique of intra-block copying combined with local illumination compensation / filtering of the predicted block of intra-block copying. In this case, the model parameters of the technique of intra-block copying combined with local illumination compensation / filtering of the predicted block of intra-block copying are inherited from the coding block to which the reference block vector motion information belongs, and are used to perform intra-block copying combined with local illumination compensation / filtering of the predicted block of intra-block copying on that sub-block.
[0186] In some embodiments, determining the block vector motion information of each sub-block in the current block further includes: if the block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction mode is stored at the decoding end, obtaining the block vector motion information of the sub-block from the storage area. This allows for faster acquisition of the block vector motion information of the sub-block.
[0187] In S704, the reconstruction value of the current block is predicted based on the block vector motion information of each sub-block.
[0188] It should be noted that the sub-block prediction mode of the current block reflects the sub-block partitioning method of the current block and the prediction method of each sub-block. Therefore, based on the sub-block prediction mode, the current block can be partitioned into sub-blocks and the block vector motion information of each sub-block in the current block can be determined. Since there are repetitive structures in the video stream, such as a sub-block and its corresponding reference sub-block being repeated, or a sub-block having a high similarity to its reference block, and since the block vector motion information of a sub-block reflects the relative motion information (such as relative displacement) between the sub-block and its corresponding reference sub-block, the reconstructed value of the current block can be predicted based on the block vector motion information of each sub-block. Furthermore, compared to predicting the current block based on its block vector motion information in traditional techniques, predicting the current block based on the block vector motion information of its sub-blocks provides a finer granularity and therefore more accurate and reliable prediction of the current block. When the content of the current block, or the image content corresponding to the current block, is more complex, sub-block partitioning can better adapt to the image content and enable efficient and reliable transmission of images or videos.
[0189] In one possible implementation, the reconstructed value of the current block is predicted based on the block vector motion information of each sub-block, including: for each sub-block, determining the predicted value of the sub-block based on the block vector motion information of the sub-block; and determining the reconstructed value of the current block based on the predicted value of each sub-block.
[0190] In some embodiments, determining the predicted value of a sub-block based on its block vector motion information includes: determining a reference block corresponding to the sub-block based on its block vector motion information; and determining the predicted value of the sub-block based on its reference block.
[0191] In some embodiments, determining the predicted value of a sub-block based on a reference block of the sub-block includes at least one of the following: when the sub-block enables the reconstruction reordering intra-block copying technique, performing a flip on the reference block of the sub-block based on the flip type of the reconstruction reordering intra-block copying technique, and determining the predicted value of the sub-block based on the flipped reference block; when the sub-block enables intra-block copying combined with local illumination compensation, performing brightness compensation on the reference block of the sub-block based on the model corresponding to the intra-block copying combined with local illumination compensation technique, and determining the predicted value of the sub-block based on the brightness-compensated reference block; when the sub-block enables filtering of the predicted block of intra-block copying, performing filtering on the reference block of the sub-block based on the model corresponding to the filtering of the predicted block of intra-block copying, and determining the predicted value of the sub-block based on the filtered reference block.
[0192] In some embodiments, the method provided in this disclosure further includes: for each sub-block, if no block vector motion information exists in the adjacent spatial region corresponding to the sub-block, determining the predicted value of the sub-block based on the intra-frame mode. It should be noted that if no block vector motion information exists in the adjacent spatial region corresponding to the sub-block, the block vector motion information corresponding to that sub-block may not be determined; therefore, the predicted value of that sub-block cannot be determined based on its block vector motion information. In this case, the predicted value of the sub-block can be determined based on the intra-frame mode. This ensures that the predicted value of each sub-block of the current block can be determined, thereby determining the reconstructed value of the current block.
[0193] In some embodiments, determining the reconstructed value of the current block based on the predicted value of each sub-block includes: obtaining residual values based on bitstream parsing; and determining the reconstructed value of the current block based on the residual values and the predicted values of each sub-block. It should be understood that the residual values reflect the difference between the predicted and actual values; therefore, the reconstructed value of the current block can be determined based on the residual values and the predicted values of each sub-block, resulting in a more accurate reconstructed value for the current block.
[0194] In some embodiments, the method provided in this disclosure further includes: storing block vector motion information of each sub-block of the current block.
[0195] In some embodiments, storing the block vector motion information of each sub-block of the current block includes at least one of the following: saving the block vector motion information corresponding to the sub-block with the largest area in the current block to the historical block vector list; saving the block vector motion information corresponding to the first sub-block in the current block to the historical block vector list; and saving the block vector motion information corresponding to the sub-block at the center position in the current block to the historical block vector list.
[0196] In some embodiments, storing the block vector motion information of each sub-block of the current block includes: saving the block vector motion information of each sub-block of the current block in the motion information buffer corresponding to the current block. It should be understood that by caching the block vector motion information of each sub-block of the current block, the prediction efficiency of subsequent blocks can be improved and the decoding overhead of the video stream can be reduced.
[0197] In some embodiments, storing the block vector motion information of each sub-block of the current block in the motion information buffer corresponding to the current block includes: skipping the block vector saving operation of the current block when the motion information buffer corresponding to the current block is a historical block vector list; and storing the block vector motion information corresponding to the sub-block with the largest area in the current block to the historical block vector list, or storing the block vector motion information corresponding to the first sub-block in the current block to the historical block vector list, or storing the block vector motion information corresponding to the sub-block at the center position in the current block to the historical block vector list.
[0198] In some embodiments, the method provided in this disclosure further includes: obtaining first indication information; the first indication information is used to indicate whether a first prediction method is enabled; the first prediction method is a sub-block-based intra-block copy prediction method. Thus, whether the sub-block-based intra-block copy prediction method is enabled can be dynamically controlled via signaling, improving the flexibility of video stream encoding and decoding.
[0199] In some embodiments, the first indication information is transmitted based on one of the following levels: slice level, image level, or sequence level.
[0200] The decoding method provided in this embodiment can be applied to the second node 602 in the system shown in FIG. 6. FIG. 13 shows a schematic flowchart of an encoding method. As shown in FIG. 13, the encoding method includes the following S1301-S1304:
[0201] In S1301, construct a list of intra-block copy candidate modes for the current block.
[0202] Here, the intra-block copy candidate mode list for the current block includes a sub-block-based intra-block copy candidate mode list.
[0203] In S1302, the sub-block prediction mode of the current block is determined based on the intra-block copy candidate mode list of the current block.
[0204] In some embodiments, determining the sub-block prediction mode of the current block based on the intra-block copying candidate mode list of the current block includes: determining / calculating the rate-distortion cost of each candidate mode in the intra-block copying candidate mode list of the current block; and determining the sub-block prediction mode of the current block based on the rate-distortion cost of each candidate mode.
[0205] In S1303, the current block is encoded based on the sub-block prediction mode to obtain the video stream.
[0206] In S1304, send the video stream.
[0207] In some embodiments, the video stream is also obtained by encoding at least one of the following:
[0208] Syntax elements associated with the current block, candidate indices associated with the sub-block prediction pattern, and residuals of the current block.
[0209] In some embodiments, the syntax elements of the sub-block-based IBC prediction technique are parsed only when the use of the sub-block-based IBC prediction technique is indicated at the slice level (title (SH)), image level (image parameter set (PPS) or image header (PH)), sequence level (sequence parameter set (SPS), video parameter set (VPS)).
[0210] In some embodiments, a signaling notification is made in the video layer of the encoded bitstream, i.e., the video parameter set (VPS), to allow the use of the method of this disclosure to enable a flag.
[0211] In some embodiments, the method of this disclosure is enabled by parsing signaling at the video layer of the encoded bitstream, i.e., the video parameter set (VPS).
[0212] For example, Table 3 is a syntax table of the video parameter set at the encoded bitstream video level. It should be noted that the values of each identifier in the tables of this disclosure are only illustrative examples. In practical applications, other types of values can also be used. For example, "true" and "false" can be used to replace "1" and "0", or other types of characters or symbols can be used to replace "1" and "0", etc.
[0213] Table 3 Syntax table of video parameter sets for encoded bitstream video layers
[0214] Here, `vps_ibc_sub_enabled_flag` represents the enable flag of the method in this embodiment, used to indicate whether the method of this embodiment is enabled at the video layer. A value of 1 indicates that it is enabled, and a value of 0 indicates that it is not enabled. Furthermore, the representation of syntax fields is not limited to this embodiment.
[0215] In some embodiments, a signaling notification is made at the sequence level of the encoded bitstream, i.e., the sequence parameter set (SPS), to allow the use of the method of this disclosure to enable a flag.
[0216] In some embodiments, a flag enabling the method of this disclosure is determined by parsing signaling at the sequence level of the encoded bitstream, i.e., the sequence parameter set (SPS).
[0217] For example, Table 4 is a syntax table for the video parameter set at the encoded bitstream sequence level.
[0218] Table 4. Syntax table of sequence parameter sets for encoded bitstream sequence levels.
[0219] Here, `sps_ibc_sub_enabled_flag` represents the enable flag of the method in this embodiment of the disclosure, used to indicate whether the method of this embodiment is enabled at the sequence level. A value of 1 indicates that it is enabled, and a value of 0 indicates that it is not enabled. The representation of the syntax fields is not limited to the embodiments of this disclosure.
[0220] In some embodiments, a signaling notification is made in the image layer of the encoded bitstream, i.e., the image parameter set (PPS) or image header (PH), to allow the use of the method of this disclosure to enable a flag.
[0221] In some embodiments, a flag enabling the method of this disclosure is determined by parsing signaling at the image level of the encoded bitstream, i.e., the image parameter set (PPS) or image header (PH).
[0222] For example, Table 5 is a syntax table for the set of video parameters at the encoded bitstream image level.
[0223] Table 5. Syntax table of image parameter sets for encoded bitstream image levels.
[0224] Here, ph_ibc_sub_enabled_flag represents the enable flag of the method in this embodiment of the disclosure, used to indicate whether the method of this embodiment of the image layer is enabled. A value of 1 indicates that it is enabled, and a value of 0 indicates that it is not enabled. The representation of the syntax fields is not limited to this embodiment of the disclosure.
[0225] In some embodiments, a signaling notification is made in the slice level of the encoded bitstream, i.e., the slice header (SH), to allow an enable flag to be used using the methods of this disclosure.
[0226] In some embodiments, a flag enabling the method of this disclosure is determined by parsing signaling at the slice level of the encoded bitstream, i.e., the slice header (SH).
[0227] For example, Table 6 is a syntax table for the chip header (SH) at the bit stream level.
[0228] Table 6 Syntax table for the header of the encoded bitstream layer
[0229] The semantic descriptions of the relevant syntax fields in Table 6 are as follows:
[0230] sh_ibc_sub_enabled_flag: This flag indicates the enabling flag of the method in this embodiment of the application. It is used to indicate whether the method of this embodiment is enabled at the slice level. A value of 1 indicates that it is enabled, and a value of 0 indicates that it is not enabled. The representation of the syntax fields is not limited to this embodiment.
[0231] It should be noted that the explanation of the embodiment of the encoding method applied to the second node 602 in the system shown in FIG6 can be referred to the explanation of the embodiment of the decoding method applied to the first node 601 in the system shown in FIG6.
[0232] The following is an exemplary description of the decoding or encoding method provided in the embodiments of this disclosure:
[0233] Example 1: A method for decoding video blocks:
[0234] Step 1: Determine the current block to use the sub-block-based intra-block copy prediction mode.
[0235] Analyze the bitstream to determine if the current block belongs to the intra-block copy prediction mode.
[0236] Further analysis of the bitstream determines that the current block belongs to the sub-block-based intra-block copy prediction mode.
[0237] For example, possible implementation methods are as follows:
[0238] Syntax elements based on sub-block IBC prediction will only be parsed if the current block size meets given conditions. For example, if the area of the current block is not less than A, or if the current width or height is greater than or equal to L.
[0239] IBC will only parse sub-block-based IBC prediction syntax elements when some associated syntax elements are 0. This includes situations such as when template matching-based IBC is disabled, or when IBC-merge mode is enabled.
[0240] Step 2: Construct a list of IBC candidate modes based on sub-blocks for the current block.
[0241] First, a set of IBC candidate patterns based on sub-blocks is determined. This set includes prediction patterns such as vertical (90 degrees downward), horizontal (180 degrees to the right), top-left (135 degrees to the bottom right), bottom-left (225 degrees to the top right), and top-right (45 degrees to the bottom left). The degree represents the angle between the horizontal to the right (0 degrees) and the horizontal-to-right straight line rotated counterclockwise.
[0242] For example, possible implementation methods include:
[0243] The candidate pattern set includes prediction patterns such as: vertical pattern (90 degrees downward), horizontal pattern (180 degrees to the right), top-left diagonal pattern (depending on the angle of the diagonal line from the top left to the bottom right of the current block pointing to the bottom right), bottom-left diagonal pattern (depending on the angle of the diagonal line from the bottom left to the top right of the current block pointing to the top right), and top-right pattern (depending on the angle of the diagonal line from the bottom left to the top right of the current block pointing to the bottom left).
[0244] The candidate pattern set contains: a set of predicted patterns consisting of a given set of angles.
[0245] Any direction from the vertical dashed line clockwise to the horizontal dashed line can be used as a prediction pattern. (BV is more suitable for screen content encoding than MV).
[0246] The availability of the block vector IBC candidate pattern set based on the availability of the spatial reference motion field of the current block is determined.
[0247] Possible implementation methods include:
[0248] Vertical mode is unavailable when all adjacent reference motion fields in the spatial domain of the current block are unavailable.
[0249] The horizontal mode is unavailable when the left adjacent reference motion field of the current block's airspace is unavailable.
[0250] The top-right mode is unavailable when both the adjacent and top-right reference motion fields in the current block's spatial domain are unavailable.
[0251] The bottom-left mode is unavailable when both the left adjacent space and the bottom-left reference motion field of the current block are unavailable.
[0252] The top-left mode is unavailable when both the left and top adjacent reference motion fields of the current block's spatial domain are unavailable.
[0253] Another alternative embodiment includes:
[0254] Vertical mode is unavailable when adjacent reference motion fields in the spatial domain of the current block are both available but identical.
[0255] The horizontal mode is unavailable if the left adjacent reference motion field of the current block's airspace is available and identical.
[0256] If the adjacent and upper-right reference motion fields in the spatial domain of the current block are both available but identical, then the upper-right mode is unavailable.
[0257] If the left adjacent space and the lower left reference motion field of the current block are both available but identical, then the lower left mode is unavailable.
[0258] If the left and top adjacent reference motion fields of the current block's spatial domain are both available but identical, then the top-left mode is unavailable.
[0259] The "unavailable" option indicates that there is no reconstructed block, no BV, or no valid BV at the reference location (a valid BV indicates that it points to the specified reference area and the corresponding area has been reconstructed).
[0260] Add the available sub-block candidate patterns to the candidate list.
[0261] Possible implementation methods include:
[0262] Add in any fixed order: horizontal mode, vertical mode, top left mode, bottom left mode, and top right mode.
[0263] Candidate patterns are arranged according to block shape. For example, if the width of the block is greater than its height, the vertical pattern, top-left pattern, or top-right pattern is added to the candidate list first. If the height of the block is greater than its width, the horizontal pattern, bottom-left pattern, or top-left pattern is added to the candidate list first.
[0264] Sort the candidate patterns according to their template costs and add them to the candidate list. For example, calculate the template cost of each sub-block candidate pattern and add them to the candidate list in ascending order of template cost.
[0265] Step 3: Select a sub-block prediction pattern from the candidate pattern list as the prediction pattern for the current block.
[0266] Parse the bitstream to determine the sub-block prediction mode index. Use the determined index to select the corresponding sub-block prediction mode from the candidate modes as the prediction mode for the current block.
[0267] Possible methods include: directly selecting the first sub-block prediction pattern from the candidate list of sub-block prediction patterns, without parsing any syntax elements.
[0268] Step 4: Based on the determined prediction pattern, divide the current block into sub-blocks and determine the block vector motion information of each sub-block of the current block.
[0269] When the prediction mode is horizontal, the current block is horizontally divided. If the block vectors and other motion information of adjacent sub-blocks are consistent, these two sub-blocks are merged into one. Then, the motion information of the left reference region is copied horizontally to each sub-block of the current block. Each sub-block shares a set of motion information.
[0270] When the prediction mode is vertical, the current block is vertically divided. If the block vectors and other motion information of adjacent sub-blocks are consistent, these two sub-blocks are merged into one. Then, the motion information of the upper reference region is copied vertically to each sub-block of the current block. Each sub-block shares a set of motion information.
[0271] When the prediction mode is top-left, the current block is divided into top-left angle directions. If the block vectors and other motion information of adjacent sub-blocks are consistent, these two sub-blocks are merged into one. Then, according to the corresponding angle direction of the top-left mode, the motion information of the left and top reference regions is copied to each sub-block of the current block. Each sub-block shares a set of motion information.
[0272] When the prediction mode is bottom-left, the current block is divided into bottom-left angle directions. If the block vectors and other motion information of adjacent sub-blocks are consistent, these two sub-blocks are merged into one. Then, according to the angle direction corresponding to the bottom-left mode, the motion information of the left and bottom-left reference regions is copied to each sub-block of the current block. Each sub-block shares a set of motion information.
[0273] When the prediction mode is top-right, the current block is divided into top-right angle directions. If the motion information, such as block vectors, of adjacent sub-blocks is consistent, these two sub-blocks are merged into one. Then, according to the angle direction corresponding to the top-right mode, the motion information of the upper and top-right reference regions is copied to each sub-block of the current block. Each sub-block shares a set of motion information.
[0274] Possible methods include:
[0275] The minimum width or height of the sub-block is a given value, such as 4 or 8.
[0276] If a reference region corresponding to a certain sub-block does not have a block vector, then the block vector of the adjacent sub-block is used.
[0277] If a reference region corresponding to a certain sub-block does not have a block vector, the Planar mode or DC mode is used by default for prediction filling.
[0278] If a reference region corresponding to a certain sub-block does not have a block vector, then the intra-frame angle partitioning mode corresponding to the sub-block partitioning direction angle is used for prediction filling.
[0279] RIBC technology is disabled by default in each sub-block.
[0280] Each sub-block inherits the RRIBC switch of the motion information of the corresponding reference area. Specifically, when the motion information of the reference area enables RRIBC technology, the corresponding sub-block enables RRIBC technology and uses the corresponding flip mode (horizontal flip and vertical flip); when the motion information of the reference area disables RRIBC technology, the corresponding sub-block disables RRIBC technology.
[0281] By default, IBC-LIC / IBC_FIBC (Filtered IBC, which filters the prediction blocks of IBC) technology is disabled for each sub-block.
[0282] Each sub-block inherits the IBC-LIC / IBC_FIBC switch of the motion information of the corresponding reference region. Specifically, when the motion information of the reference region enables IBC-LIC / IBC_FIBC technology, the corresponding sub-block enables IBC-LIC / IBC_FIBC technology; when the motion information of the reference region disables IBC-LIC / IBC_FIBC technology, the corresponding sub-block disables IBC-LIC / IBC_FIBC technology.
[0283] If a sub-block has RRIBC enabled, the sub-block's block vector is offset according to the flip type, similar to the RRIBC offset operation for the entire block.
[0284] If a subblock has IBC-LIC / IBC_FIBC enabled, the LIC or FIBC model parameters are derived using the reference region corresponding to that subblock.
[0285] Optional embodiments include:
[0286] If a subblock has IBC-LIC / IBC_FIBC enabled, the IBC-LIC / FIBC model parameters are inherited from the coding block to which the referenced BV belongs and used for the current subblock.
[0287] Step 5: Based on the block vector motion information of each sub-block, determine the predicted value of each sub-block, and finally determine the reconstructed value of the current block.
[0288] For each sub-block, the corresponding reference block is determined using the defined block vector motion information. If RRIBC is enabled, the corresponding flipping is performed; if IBC-LIC / IBC_FIBC is enabled, the corresponding model is used for brightness compensation or filtering. This determines the predicted value for that sub-block.
[0289] After determining the predicted values for all sub-blocks, add the residual values obtained through bitstream parsing (if they exist).
[0290] Determine the reconstruction value of the current block.
[0291] Example 2: A method for decoding video blocks:
[0292] Step 1: Determine the IBC prediction mode for the current block.
[0293] Parse the bitstream to determine if the current block belongs to IBC mode.
[0294] Step 2: Determine the IBC candidate list.
[0295] Construct a candidate list of BVPs for the current block in the following order: spatial adjacency, HBVP, spatial non-adjacency, temporal BVP, chained BVP, and default BVP (block-based).
[0296] Construct a sub-block-based BVP candidate list following step 2 in Example 1.
[0297] Inserting a sub-block-based BVP candidate into the BVP candidate list, with alternative insertion methods including: inserting it at the end of the BVP candidate list, at the beginning of the BVP candidate list, or between any two types of BVPs.
[0298] An optional implementation includes: sorting the block-based BVP and sub-block-based BVP candidates in ascending order according to template cost to form an IBC BVP candidate list.
[0299] Step 3: Determine the candidates for the current block.
[0300] Parse the bitstream, obtain the candidate index, and determine the candidate selected for the current block in the BVP candidate list.
[0301] If the selected candidate is a sub-block-based BVP candidate, then the subsequent steps are the same as steps 4 and 5 in Example 1.
[0302] Example 3: An optional embodiment includes:
[0303] When constructing a sub-block-based BVP candidate in Example 1 or Example 2, if the reference BV corresponding to a sub-block does not exist in a certain mode, the sub-block is predicted using the intra-frame mode.
[0304] Optional implementation methods include: using DC mode, Planar mode, or an intra-frame prediction mode corresponding to the division direction of the sub-block prediction method (e.g., using the intra-frame angle horizontal prediction mode for horizontal model division).
[0305] Example 4: In Example 1 or Example 2, after the current block is reconstructed, the BV of each sub-block is saved to the motion information buffer corresponding to the current block.
[0306] When saving to the HBVP list, the available methods include: skipping the BV saving of the block, saving the BV of the largest sub-block in the block to the HBVP, or saving the BV corresponding to the first sub-block in the block to the HBVP, or saving the BV corresponding to the center position of the block to the HBVP.
[0307] Example 5: An encoding method for video blocks
[0308] Step 1: Construct a list of IBC candidate modes based on sub-blocks for the current block.
[0309] The construction process is the same as step 2 in Example 1.
[0310] Step 2: Traverse the candidate pattern list and calculate the rate-distortion cost for each candidate.
[0311] After determining any candidate, sub-blocks are divided according to the direction of the candidate, and block vector motion information is obtained from the corresponding reference area. The specific details are the same as step 4 in Example 1.
[0312] After determining the motion information, the predicted value of the block is determined, and the specific details are the same as step 5 in Example 1.
[0313] Calculate the rate-distortion cost of the candidate.
[0314] Step 3: Determine the optimal candidate, calculate the residual, and encode it into the bitstream.
[0315] The candidate with the lowest rate-distortion cost is selected as the prediction mode for the current block, and IBC predictions for sub-blocks will be used.
[0316] Enable encoding of syntax elements, candidate indices, residuals, etc. into the bitstream.
[0317] The disclosed embodiments can divide the electronic device into functional modules according to the above method embodiments. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. It should be noted that the module division in this disclosed embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each functional module according to each function.
[0318] Figure 14 is a block diagram of an electronic device provided in an embodiment of this disclosure. The electronic device can execute the decoding method provided in the above-described method embodiments. As shown in Figure 14, the electronic device includes: a receiving module 1401 and a processing module 1402.
[0319] Receiver module 1401 is used to receive video streams;
[0320] Processing module 1402 is used to determine the sub-block prediction mode of the current block in the video bitstream;
[0321] Processing module 1402 is used to perform sub-block division on the current block based on the sub-block prediction mode and determine the block vector motion information of each sub-block in the current block;
[0322] The processing module 1402 is also used to predict the reconstruction value of the current block based on the block vector motion information of each sub-block.
[0323] In some embodiments, the processing module 1402 is specifically used to determine that the prediction mode of the current block is a sub-block-based intra-block copy prediction mode.
[0324] The processing module 1402 is also configured to construct an intra-block copying candidate mode list for the current block; the intra-block copying candidate mode list for the current block includes an intra-block copying candidate mode list based on sub-blocks;
[0325] The processing module 1402 is also specifically used to determine the sub-block prediction mode of the current block by copying the candidate mode list from the intra-block.
[0326] In some embodiments, the list of candidate modes for intra-block copying based on sub-blocks includes at least one of the following predicted modes: vertical mode, horizontal mode, top-left mode, bottom-left mode, and top-right mode.
[0327] In some embodiments, the intra-block copy candidate mode list based on sub-blocks includes prediction modes that are available prediction modes; the availability of prediction modes is determined based on the availability of the spatial reference motion field of the current block.
[0328] In some embodiments, the availability of the spatial reference motion field of the current block and the availability of the prediction mode satisfy at least one of the following:
[0329] Vertical mode is unavailable when neither of the adjacent reference motion fields is available in the spatial domain of the current block;
[0330] The horizontal mode is unavailable when neither of the left adjacent reference motion fields in the current block's airspace is available.
[0331] The upper right mode is unavailable when both the adjacent reference motion field and the upper right reference motion field in the current block's airspace are unavailable.
[0332] The lower left mode is unavailable when both the left adjacent reference motion field and the lower left reference motion field in the current block are unavailable.
[0333] The top-left mode is unavailable when both the left-adjacent reference motion field in the airspace and the upper-adjacent reference motion field in the airspace of the current block are unavailable.
[0334] Vertical mode is unavailable when all adjacent reference motion fields in the spatial domain of the current block are available and identical;
[0335] The horizontal mode is unavailable when the left adjacent reference motion fields in the current block's airspace are both available and identical;
[0336] The upper right mode is unavailable when both the adjacent reference motion field and the upper right reference motion field in the current block's airspace are available and identical.
[0337] The lower left mode is unavailable when the left adjacent reference motion field and the lower left reference motion field in the current block are available and identical;
[0338] The top-left mode is unavailable when both the left-adjacent reference motion field in the current block's airspace and the top-adjacent reference motion field in the airspace are available and identical.
[0339] In some embodiments, the order of the predicted modes included in the intra-block copy candidate mode list satisfies one of the following:
[0340] Sort based on arbitrary fixed order, sort based on block shape, and sort based on template cost.
[0341] In some embodiments, the processing module 1402 is further configured to construct a block-based intra-block copying candidate mode list;
[0342] The processing module 1402 is also used to construct a list of candidate modes for intra-block copying based on sub-blocks;
[0343] The processing module 1402 is further configured to determine the intra-block copying candidate mode list for the current block based on the block-based intra-block copying candidate mode list and the sub-block-based intra-block copying candidate mode list.
[0344] In some embodiments, the block-based intra-block copying candidate mode list includes at least one of the following types of modes: spatially adjacent block vector prediction mode, spatially non-adjacent block vector prediction mode, temporal block vector prediction mode, chained block vector prediction mode, historical block vector prediction mode, and default block vector prediction mode.
[0345] In some embodiments, the order between the block-based intra-block copying candidate mode list and the sub-block-based intra-block copying candidate mode list satisfies one of the following:
[0346] The sub-block-based intra-block copying candidate mode list is located at the top of the intra-block copying candidate mode list for the current block.
[0347] The sub-block-based intra-block copying candidate mode list is located at the end of the current block's intra-block copying candidate mode list.
[0348] The sub-block-based intra-block copy candidate mode list is located between any two types of modes in the block-based intra-block copy candidate mode list.
[0349] The block-based intra-block copy candidate mode list and the sub-block-based intra-block copy candidate mode list are sorted by template cost in the intra-block copy candidate mode list for the current block.
[0350] In some embodiments, the processing module 1402 is further configured to determine the first prediction mode in the intra-block copy candidate mode list as the sub-block prediction mode of the current block; or,
[0351] The processing module 1402 is also used to parse the video bitstream to obtain the target prediction mode index; the processing module 1402 is also used to determine the sub-block prediction mode of the current block from the intra-block copy candidate mode list based on the target prediction mode index.
[0352] In some embodiments, the processing module 1402 is specifically used to perform sub-block partitioning on the current block based on the sub-block prediction mode;
[0353] Processing module 1402 is specifically used to merge adjacent sub-blocks into one sub-block when the block vector motion information of adjacent sub-blocks in the current block is consistent;
[0354] Processing module 1402 is specifically used to copy the block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction mode to each sub-block of the current block, so as to obtain the block vector motion information of each sub-block;
[0355] The sub-block prediction pattern and the target's adjacent airspace region satisfy at least one of the following:
[0356] When the sub-block prediction mode is horizontal, the target's adjacent airspace region is the left adjacent airspace region.
[0357] When the sub-block prediction mode is vertical, the target's adjacent airspace region is the upper adjacent airspace region;
[0358] When the sub-block prediction mode is the top-left mode, the target's adjacent airspace regions are the left adjacent airspace region and the top adjacent airspace region.
[0359] When the sub-block prediction mode is the lower left mode, the target's adjacent airspace regions are the left adjacent airspace region and the lower adjacent airspace region.
[0360] When the sub-block prediction mode is the upper right mode, the target's adjacent airspace regions are the right adjacent airspace region and the upper adjacent airspace region.
[0361] In some embodiments, at least one of the following is also satisfied for each sub-block:
[0362] The minimum width or minimum height of the sub-block is a given value;
[0363] If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block uses the block vector motion information of the adjacent sub-block;
[0364] If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block uses planar mode or DC mode to perform predictive filling;
[0365] If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block uses the intra-frame angle partitioning mode corresponding to the partitioning direction angle of the sub-block to perform prediction filling;
[0366] Sub-blocks have the re-reordering intra-block copying technology disabled by default.
[0367] Sub-blocks are disabled by default, combining intra-block copying with local illumination compensation technology.
[0368] The technique of filtering the predicted blocks for intra-block copying is disabled by default in sub-blocks;
[0369] When the reconstructed reordering intra-block copying technique is enabled in a sub-block, the block vector motion information of the sub-block is offset based on the flip type of the reconstructed reordering intra-block copying technique.
[0370] When intra-block copying combined with local illumination compensation technology is enabled for a sub-block, or when filtering is applied to the predicted block of intra-block copying, the local illumination compensation model parameters or the filtered intra-block copying model parameters for the sub-block are derived based on the adjacent spatial regions corresponding to the sub-block. Alternatively, when intra-block copying combined with local illumination compensation technology is enabled for a sub-block, or when filtering is applied to the predicted block of intra-block copying, the local illumination compensation model parameters or the filtered intra-block copying model parameters for the sub-block are determined from the coding block to which the reference block vector motion information belongs.
[0371] In some embodiments, the processing module 1402 is further configured to obtain the block vector motion information of the sub-block from the storage area when the block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction mode is stored at the decoding end.
[0372] In some embodiments, the processing module 1402 is further configured to determine the predicted value of each sub-block based on the block vector motion information of the sub-block;
[0373] The processing module 1402 is also used to determine the reconstruction value of the current block based on the predicted value of each sub-block.
[0374] In some embodiments, the processing module 1402 is further configured to determine the reference block corresponding to the sub-block based on the block vector motion information of the sub-block;
[0375] The processing module 1402 is also used to determine the predicted value of the sub-block based on the reference block of the sub-block.
[0376] In some embodiments, the processing module 1402 is further configured to: when the sub-block enables the reconstruction reordering intra-block copying technique, perform a flip on the reference block of the sub-block based on the flip type of the reconstruction reordering intra-block copying technique, and determine the predicted value of the sub-block based on the flipped reference block; when the sub-block enables intra-block copying combined with local illumination compensation technique, perform brightness compensation on the reference block of the sub-block based on the model corresponding to the intra-block copying combined with local illumination compensation technique, and determine the predicted value of the sub-block based on the brightness-compensated reference block; when the sub-block enables filtering of the predicted block of intra-block copying, perform filtering on the reference block of the sub-block based on the model corresponding to filtering of the predicted block of intra-block copying, and determine the predicted value of the sub-block based on the filtered reference block.
[0377] In some embodiments, the processing module 1402 is further configured to determine the predicted value of each sub-block based on the intra-frame mode when there is no block vector motion information in the adjacent spatial region corresponding to the sub-block.
[0378] In some embodiments, the processing module 1402 is further configured to obtain residual values based on bitstream parsing;
[0379] The processing module 1402 is also used to determine the reconstruction value of the current block based on the residual value and the predicted value of each sub-block.
[0380] In some embodiments, the processing module 1402 is further configured to store block vector motion information for each sub-block of the current block.
[0381] In some embodiments, the processing module 1402 is further configured to save the block vector motion information corresponding to the largest sub-block in the current block to the historical block vector list; and / or save the block vector motion information corresponding to the first sub-block in the current block to the historical block vector list; and / or save the block vector motion information corresponding to the sub-block at the center position in the current block to the historical block vector list.
[0382] In some embodiments, the receiving module 1401 is configured to acquire first indication information; the first indication information is used to indicate whether a first prediction method is enabled; the first prediction method is a sub-block-based intra-block copy prediction method.
[0383] In some embodiments, signaling is transmitted at one of the following levels: slice level, image level, or sequence level.
[0384] Figure 15 is a block diagram of another electronic device provided in an embodiment of this disclosure. The electronic device can execute the encoding method provided in the above-described method embodiments. As shown in Figure 15, the electronic device includes: a processing module 1501 and a transmitting module 1502.
[0385] Processing module 1501 is used to construct an intra-block copying candidate mode list for the current block; the intra-block copying candidate mode list for the current block includes an intra-block copying candidate mode list based on sub-blocks;
[0386] Processing module 1501 is used to determine the sub-block prediction mode of the current block based on the intra-block copying candidate mode list of the current block.
[0387] Processing module 1501 is also used to encode the current block based on the sub-block prediction mode of the current block to obtain a video bitstream;
[0388] The sending module 1502 is used to send video streams.
[0389] In some embodiments, the video stream is also obtained by encoding at least one of the following: syntax elements associated with the current block, candidate indices associated with the sub-block prediction patterns, and residuals of the current block.
[0390] In the case of implementing the functions of the integrated modules described above in hardware, this disclosure provides another possible structure for the electronic device involved in the above embodiments. As shown in FIG16, the electronic device includes: a processor 1602 and a bus 1604. Optionally, the electronic device may further include a memory 1601; optionally, the electronic device may further include a communication interface 1603.
[0391] Processor 1602 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1602 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1602 may also be a combination of computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0392] The communication interface 1603 is used to connect to other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0393] The memory 1601 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0394] In one possible implementation, the memory 1601 can exist independently of the processor 1602. The memory 1601 can be connected to the processor 1602 via a bus 1604 and is used to store instructions or program code. When the processor 1602 calls and executes the instructions or program code stored in the memory 1601, it can implement the method provided in the embodiments of this disclosure.
[0395] In another possible implementation, the memory 1601 can also be integrated with the processor 1602.
[0396] Bus 1604 can be an extended industry standard architecture (EISA) bus, etc. Bus 1604 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in Figure 16, but this does not mean that there is only one bus or one type of bus.
[0397] Some embodiments of this disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a computer, cause the computer to perform the methods described in any of the above embodiments.
[0398] For example, the computer-readable storage media described above may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). The various computer-readable storage media described in this disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.
[0399] This disclosure provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods described in any of the above embodiments.
[0400] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A decoding method, wherein, The method includes: Receive video stream; Determine the sub-block prediction mode of the current block in the video stream; Based on the sub-block prediction mode, the current block is divided into sub-blocks and the block vector motion information of each sub-block in the current block is determined; Based on the block vector motion information of each sub-block, the reconstruction value of the current block is predicted.
2. The method according to claim 1, wherein, Determining the sub-block prediction mode of the current block in the video bitstream includes: The prediction mode of the current block is determined to be the intra-block copy prediction mode based on sub-blocks; Construct an intra-block copying candidate mode list for the current block; the intra-block copying candidate mode list for the current block includes an intra-block copying candidate mode list based on sub-blocks; The sub-block prediction mode of the current block is determined from the intra-block copy candidate mode list.
3. The method according to claim 2, wherein, The sub-block-based intra-block copying candidate mode list includes at least one of the following predicted modes: vertical mode, horizontal mode, top-left mode, bottom-left mode, and top-right mode.
4. The method according to claim 3, wherein, The candidate prediction modes included in the sub-block-based intra-block copying list are available prediction modes; the availability of the prediction modes is determined based on the availability of the spatial reference motion field of the current block.
5. The method according to claim 4, wherein, The availability of the spatial reference motion field of the current block and the availability of the prediction mode satisfy at least one of the following: Vertical mode is unavailable when all adjacent reference motion fields are unavailable in the spatial domain of the current block; The horizontal mode is unavailable when the left adjacent reference motion field of the current block is unavailable. When both the adjacent reference motion field and the upper right reference motion field in the spatial domain of the current block are unavailable, the upper right mode is unavailable. When both the left adjacent reference motion field and the lower left reference motion field of the current block are unavailable, the lower left mode is unavailable; The top-left mode is unavailable when both the left-adjacent reference motion field and the upper-adjacent reference motion field in the spatial domain of the current block are unavailable. Vertical mode is unavailable when all adjacent reference motion fields are available and identical in the spatial domain of the current block; The horizontal mode is unavailable when the left adjacent reference motion fields of the current block are both available and identical; When the adjacent reference motion field and the upper right reference motion field in the spatial domain of the current block are both available and identical, the upper right mode is unavailable. When the left adjacent reference motion field and the lower left reference motion field of the current block are available and identical, the lower left mode is unavailable; The top-left mode is unavailable when both the left-adjacent reference motion field in the spatial domain and the top-adjacent reference motion field in the spatial domain of the current block are available and identical.
6. The method according to claim 4, wherein, The order of the predicted modes included in the intra-block copy candidate mode list satisfies one of the following: Sort based on arbitrary fixed order, sort based on block shape, and sort based on template cost.
7. The method according to claim 2, wherein, The process of constructing the intra-block copying candidate mode list for the current block includes: Construct the block-based intra-block copying candidate mode list; Construct the candidate list of intra-block copying modes based on sub-blocks; The intra-block copying candidate mode list for the current block is determined based on the block-based intra-block copying candidate mode list and the sub-block-based intra-block copying candidate mode list.
8. The method according to claim 7, wherein, The block-based intra-block copying candidate mode list includes at least one of the following types of modes: spatially adjacent block vector prediction mode, spatially non-adjacent block vector prediction mode, temporal block vector prediction mode, chained block vector prediction mode, historical block vector prediction mode, and default block vector prediction mode.
9. The method according to claim 7, wherein, The order between the block-based intra-block copying candidate mode list and the sub-block-based intra-block copying candidate mode list satisfies one of the following: The sub-block-based intra-block copying candidate mode list is located at the beginning of the intra-block copying candidate mode list for the current block. The sub-block-based intra-block copying candidate mode list is located at the end of the intra-block copying candidate mode list for the current block. The sub-block-based intra-block copying candidate mode list is located between any two types of modes in the block-based intra-block copying candidate mode list. The block-based intra-block copying candidate mode list and the sub-block-based intra-block copying candidate mode list are sorted according to template cost in the intra-block copying candidate mode list of the current block.
10. The method according to claim 2, wherein, Determining the sub-block prediction mode of the current block from the intra-block copy candidate mode list includes: The first prediction mode in the intra-block copy candidate mode list is determined as the sub-block prediction mode of the current block; or, The video stream is parsed to obtain the target prediction mode index; based on the target prediction mode index, the sub-block prediction mode of the current block is determined from the intra-block copy candidate mode list.
11. The method according to claim 1, wherein, The step of performing sub-block partitioning on the current block based on the sub-block prediction pattern and determining the block vector motion information of each sub-block in the current block includes: Based on the sub-block prediction pattern, the current block is divided into sub-blocks; If the block vector motion information of adjacent sub-blocks in the current block is consistent, the adjacent sub-blocks will be merged into one sub-block; The block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction mode is copied to each sub-block of the current block to obtain the block vector motion information of each sub-block; The sub-block prediction pattern and the adjacent spatial region of the target satisfy at least one of the following: When the sub-block prediction mode is horizontal, the target adjacent spatial region is the left adjacent spatial region; When the sub-block prediction mode is vertical, the target adjacent spatial region is the upper adjacent spatial region. When the sub-block prediction mode is the top-left mode, the target adjacent spatial region is the left adjacent spatial region and the top adjacent spatial region. When the sub-block prediction mode is the lower left mode, the target adjacent spatial region is the left adjacent spatial region and the lower adjacent spatial region. When the sub-block prediction mode is the upper right mode, the target adjacent airspace region is the right adjacent airspace region and the upper adjacent airspace region.
12. The method according to claim 11, wherein, For each of the sub-blocks, at least one of the following conditions must also be met: The minimum width or minimum height of the sub-block is a given value; If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block uses the block vector motion information of the adjacent sub-blocks; If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block performs predictive filling using either planar mode or DC mode; If there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the sub-block performs prediction padding using the intra-frame angle partitioning mode corresponding to the partitioning direction angle of the sub-block; The sub-block has the intra-block copying technology of reconstruction and reordering disabled by default. The sub-block is said to have intra-block copying disabled by default, combined with local illumination compensation technology. The sub-block, by default, disables the technique of performing filtering on predicted blocks for intra-block copying; When the reconstructed reordering intra-block copying technique is enabled in the sub-block, the block vector motion information of the sub-block is offset based on the flip type of the reconstructed reordering intra-block copying technique; When the sub-block enables intra-block copying combined with local illumination compensation technology or performs filtering on the predicted block of intra-block copying, the local illumination compensation model parameters or filtered intra-block copying model parameters corresponding to the sub-block are derived based on the adjacent spatial regions corresponding to the sub-block; or, when the sub-block enables intra-block copying combined with local illumination compensation technology or performs filtering on the predicted block of intra-block copying, the local illumination compensation model parameters or filtered intra-block copying model parameters corresponding to the sub-block are determined from the coding block to which the reference block vector motion information belongs.
13. The method according to claim 11, wherein, Determining the block vector motion information of each sub-block in the current block further includes: If the block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction mode is stored at the decoding end, the block vector motion information of the sub-block is obtained from the stored block vector motion information of the target adjacent spatial region corresponding to the sub-block prediction mode.
14. The method according to claim 1, wherein, The process of predicting the reconstruction value of the current block based on the block vector motion information of each sub-block includes: For each sub-block, a predicted value for the sub-block is determined based on the block vector motion information of the sub-block; The reconstruction value of the current block is determined based on the predicted value of each sub-block.
15. The method according to claim 14, wherein, Determining the predicted value of the sub-block based on the block vector motion information of the sub-block includes: Based on the block vector motion information of the sub-block, the reference block corresponding to the sub-block is determined; The predicted value of the sub-block is determined based on the reference block of the sub-block.
16. The method according to claim 15, wherein, Determining the predicted value of the sub-block based on the reference block of the sub-block includes at least one of the following: When the reconstructed reordering intra-block copying technique is enabled for the sub-block, the reference block of the sub-block is flipped based on the flipping type of the reconstructed reordering intra-block copying technique, and the predicted value of the sub-block is determined based on the flipped reference block. When the sub-block enables intra-block copying combined with local illumination compensation technology, the reference block of the sub-block is luminance compensated based on the model corresponding to the intra-block copying combined with local illumination compensation technology, and the predicted value of the sub-block is determined based on the luminance compensated reference block. When the technique of performing filtering on the predicted blocks of intra-block copying is enabled in the sub-block, the reference block of the sub-block is filtered based on the model corresponding to the filtering on the predicted blocks of intra-block copying, and the predicted value of the sub-block is determined based on the filtered reference block.
17. The method according to claim 14, wherein, The method further includes: For each sub-block, if there is no block vector motion information in the adjacent spatial region corresponding to the sub-block, the predicted value of the sub-block is determined based on the intra-frame mode.
18. The method according to claim 14, wherein, Determining the reconstruction value of the current block based on the predicted value of each sub-block includes: Obtaining residual values based on bitstream parsing; Based on the residual value and the predicted value of each sub-block, the reconstruction value of the current block is determined.
19. The method according to claim 1, wherein, The method further includes: Store the block vector motion information of each sub-block of the current block.
20. The method according to claim 19, wherein, The storage of block vector motion information for each sub-block of the current block includes at least one of the following: Save the block vector motion information corresponding to the largest sub-block in the current block to the historical block vector list; Save the block vector motion information corresponding to the first sub-block in the current block to the historical block vector list; Save the block vector motion information corresponding to the sub-block at the center position in the current block to the historical block vector list.
21. The method according to claim 1, wherein, The method further includes: Obtain first indication information; the first indication information is used to indicate whether to enable the first prediction method; the first prediction method is an intra-block copy prediction method based on sub-blocks.
22. The method according to claim 21, wherein, The first indication information is transmitted based on one of the following levels: slice level, image level, or sequence level.
23. An encoding method, wherein, The method includes: Construct an intra-block copy candidate mode list for the current block; the intra-block copy candidate mode list for the current block includes an intra-block copy candidate mode list based on sub-blocks; Based on the intra-block copy candidate mode list of the current block, determine the sub-block prediction mode of the current block; The current block is encoded based on the sub-block prediction mode of the current block to obtain a video stream; Send the video stream.
24. The method according to claim 23, wherein, The video stream is also obtained by encoding at least one of the following: Syntax elements associated with the current block, candidate indices associated with the sub-block prediction pattern, and residuals of the current block.
25. An electronic device, wherein, include: Memory and processor; Memory and processor are coupled; The memory is used to store instructions that can be executed by the processor; When the processor executes the instruction, it performs the method as described in any one of claims 1-22, or the method as described in any one of claims 23-24.
26. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-22, or the method as described in any one of claims 23-24.
27. A computer program product, wherein, The computer program product includes computer program instructions that, when executed by a processor, implement the method as described in any one of claims 1-22, or the method as described in any one of claims 23-24.