Video block processing method, electronic device, and storage medium
By utilizing the spatial video block candidate information of the area surrounding the current block in the intra-frame block copy and intra-frame string copy technologies, the target candidate is determined and added to the candidate list, which solves the problem of insufficient utilization of spatial non-adjacent block information in the existing technology and improves the accuracy of block vector prediction and encoding and decoding quality.
Patent Information
- Application Number
- PCT/CN2024/134073
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-18
- Filing Date
- 2024-11-25
- Publication Date
- 2025-09-25
AI Technical Summary
In intra-block copy and intra-string copy technologies, existing methods fail to fully utilize the candidate information of spatially non-adjacent blocks, resulting in low block vector prediction accuracy and affecting the encoding and decoding quality.
By reading the candidates of the spatial video blocks in the area around the current block, the target candidate is determined according to the matching parameters and added to the candidate list of the block vector prediction, the prediction accuracy is improved by using the information of spatial non-adjacent blocks.
The accuracy of block vector prediction is improved, which improves the encoding and decoding quality.
Smart Images

Figure CN2024134073_25092025_PF_FP_ABST
Abstract
Description
Video block processing method, electronic device and storage medium Technical Field
[0001] The present application relates to the field of video coding technology, for example, to a video block processing method, electronic equipment and storage medium. Background Art
[0002] When constructing a candidate list for intra block copy (IBC) or intra string copy (ISC) technologies, a classification-based approach is typically used. First, a set of seven block vector prediction (BVP) candidates is constructed. Block vectors (BVs) are then searched for and a set of optimal BVP indices and block vector differences (BVDs) are calculated. However, this process fails to fully utilize spatial candidate information. Typically, only candidate information from spatially adjacent blocks is considered, while information from spatially non-adjacent blocks is insufficiently utilized. Specifically, when adding information from spatially non-adjacent blocks, one approach involves sequentially adding information from near to far blocks to the candidate list. This approach results in underutilization of candidate information for some spatially non-adjacent blocks. Another approach involves using a template to select the best candidate information from all non-adjacent blocks and adding it to the candidate list. This approach results in high redundancy and duplication in the selected candidate information. Consequently, the accuracy of the BVP prediction for the current block is low, impacting encoding and decoding quality. Summary of the Invention
[0003] The present application provides a video block processing method, an electronic device, and a storage medium.
[0004] The embodiment of the present application provides a video block processing method, including:
[0005] For each region of the current block, read each candidate of the spatial domain video block in the region according to the position parameter;
[0006] Determine a target candidate corresponding to the region according to a matching parameter between each candidate and the current block;
[0007] The target candidate is added to the corresponding position of the region in the candidate list of the block vector prediction of the current block.
[0008] An embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned video block processing method when executing the program.
[0009] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the above-mentioned video block processing method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] FIG1 is a flowchart of a video block processing method provided by an embodiment;
[0011] FIG2 is a schematic structural diagram of a video block processing device provided by an embodiment;
[0012] FIG3 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment. DETAILED DESCRIPTION
[0013] The present application is described below in conjunction with the accompanying drawings and embodiments. It will be understood that the specific embodiments described herein are merely intended to explain the present application and are not intended to limit the present application. It should be noted that, unless there is a conflict, the embodiments and features within the embodiments of the present application may be combined with each other in any manner. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present application, not all structures.
[0014] FIG1 is a flowchart of a video block processing method according to an embodiment. This method can be applied to an electronic device, which can be a device capable of processing image or video blocks, such as a computer, mobile terminal, or server. As shown in FIG1 , the method according to this embodiment includes steps 110 to 130.
[0015] In step 110 , for each region of the current block, each candidate of the spatial domain video block in the region is read according to the position parameter.
[0016] In step 120, a target candidate corresponding to the region is determined based on a matching parameter between each candidate and the current block.
[0017] In step 130, the target candidate is added to the corresponding position of the region in the candidate list for block vector prediction of the current block.
[0018] In this embodiment, the current block may refer to the video block to be predicted. Regions can be obtained by dividing the space around the current block and may be annular, sector-shaped, or linear regions, among others. Each region can also be understood as a class. For any region, the spatial domain video block of that region may have one or more candidates, and multiple candidates may correspond to a candidate set. This candidate set may be determined based on a history block vector prediction table (HBVP), which may be constructed based on block vectors of historical blocks. Each position in the HBVP table corresponds to a region. Each candidate set includes one or more candidates. Candidates may also be referred to as candidate blocks, which can be understood as reference blocks for the candidates. For each region, candidates are sequentially read from that region according to position parameters, and a target candidate is determined based on the matching parameters between each candidate and the current block. This target candidate may serve as the target reference block corresponding to the current block, providing a reference for the prediction and reconstruction of the current block and improving prediction accuracy.
[0019] The matching parameter can be used to measure the degree of match or similarity between the candidate and the current block. For example, the closer the distance between the candidate and the current block, the stronger the correlation, and the higher the degree of match or similarity. For another example, the smaller the template cost between the template of the reference block pointed by the candidate and the set template of the current block, the higher the degree of match or similarity. The set template can be a reconstructed area adjacent to the candidate's reference block, and can include the upper reconstructed area and the left reconstructed area. The template cost is related to the template cost difference between the template of the reference block pointed by the candidate and the template of the current block, and can be calculated using the Sum of Absolute Difference (SAD), Sum of Squared Difference (SSD), or Hadamard Transform Sum of Absolute Transformed Difference (SATD) algorithm.
[0020] In addition, the target candidate corresponding to each region can be added to the corresponding position in the candidate list of the current block, and each position in the candidate list corresponds to a region.
[0021] On this basis, by reading each candidate of the spatial domain video block in the area according to the position parameter and using the matching parameter to determine the target candidate, the candidate information of spatial non-adjacent blocks or the information of adjacent reconstructed areas is fully utilized to improve the accuracy of the block vector prediction of the current block, thereby improving the encoding and decoding quality.
[0022] In one embodiment, the area of the current block includes a middle area radiating in two directions with the current block as the center, where the two directions are one of the following: directly below and lower left, lower left and directly left, directly left and upper left, upper left and directly above, directly above and upper left, or upper left and directly right;
[0023] Alternatively, the area of the current block includes a straight line area radiating from the current block in one direction, where the one direction is directly above, directly left, upper left, upper right, or lower left;
[0024] Alternatively, the area of the current block includes an annular area with a distance from the current block between n and m, where m is greater than n, m and n are both positive numbers, and mn is the width of the annular area, which is determined according to the distance between the annular area and the current block.
[0025] In one embodiment, the position parameter is used to represent the offset position of the corresponding candidate relative to the current block in the middle area, the straight area, or the annular area.
[0026] In one embodiment, the candidate includes a candidate block and at least one of the following information of the candidate block: a motion vector, a position parameter, and a shape parameter.
[0027] In one embodiment, the matching parameter includes the distance between the candidate and the current block.
[0028] In one embodiment, determining a target candidate corresponding to a region based on a matching parameter between each candidate and the current block includes:
[0029] The candidate with the shortest distance to the current block is taken as the target candidate corresponding to the region.
[0030] For example, for any region, the spatial domain video block in the region corresponds to p candidates, and the distances between the p candidates and the current block are D1, D2...D p , where the minimum template cost is D min , then D min The corresponding candidate is used as the target candidate corresponding to the area. Optionally, D min Compared with a threshold, if D min If it is less than the threshold, D min The corresponding candidate is used as the target candidate corresponding to the region; otherwise, one candidate is designated from the p candidates as the target candidate corresponding to the region.
[0031] In one embodiment, the matching parameters include a template cost between the template of the reference block pointed by the candidate and the set template of the current block; wherein the template cost is the cost difference between the template of the reference block pointed by the candidate and the set template multiplied by a weight parameter of the reference block pointed by the candidate; the set template is determined based on the adjacent reconstructed area of the current block.
[0032] In this embodiment, the set template can be a reconstructed area adjacent to the current block, and can include an upper reconstructed area and a left reconstructed area. The template cost is related to the cost difference between the template of the reference block pointed by the candidate and the template of the current block, and can be calculated using the Sum of Absolute Difference (SAD), the Sum of Squared Difference (SSD), or the Hadamard Transformed Absolute Difference (SATD) algorithm. The template cost between a candidate and the set template can be expressed as: δc = △c*w, where δc represents the template cost, △c represents the cost difference between the template of the reference block pointed by the candidate and the set template, and w represents the weight parameter of the reference block pointed by the candidate, and the weight parameter is used to measure the importance of the candidate.
[0033] In one embodiment, the weight parameter is a measure of the candidate's importance, determined by the distance between the candidate and the current block; as the distance increases, the corresponding weight parameter decreases. In other words, the closer the candidate is to the current block, the larger the corresponding weight parameter. Based on this, more attention can be paid to the correlation between candidates closer to the current block and the set template, giving more consideration to whether candidates closer to the current block can provide sufficient reference for the current block. The weight parameter can be set according to actual needs.
[0034] In one embodiment, the weight parameter is a measure of the importance of the candidate, and the weight parameter corresponding to each candidate is 1.
[0035] In one embodiment, determining the target candidate corresponding to the region based on the matching parameter between each candidate and the current block includes one of the following:
[0036] The candidate with the lowest template cost is selected as the target candidate corresponding to the region;
[0037] When the lowest template cost is less than or equal to the set threshold, the candidate corresponding to the lowest template cost is selected as the target candidate;
[0038] When the lowest template cost is greater than a set threshold, the designated candidate in the area is used as the target candidate, where the designated candidate is the candidate in the area closest to the current block, or the candidate that is first added to the candidate set, and the set threshold is determined by the area of the set template.
[0039] In this embodiment, the matching parameter is the template cost. For any region, the spatial domain video block in the region corresponds to p candidates, and the corresponding template costs are δc1, δc2...δcp , where the minimum template cost is δc min , then δc min The corresponding candidate is used as the target candidate corresponding to the region; or, δc min Compared with the set threshold (denoted as Th), if δc min ≤Th, then δc min The corresponding candidate is used as the target candidate for the region. Otherwise, a candidate is designated from the p candidates as the target candidate for the region. For example, the candidate that is first added to the candidate set among the p candidates can be used as the target candidate for the region, or the candidate that is closest to the current block among the p candidates can be used as the target candidate for the region. The threshold value can be determined by the area of the template. For example, if the area of the template is large, the threshold value can be set relatively high to appropriately relax the requirements for template cost matching. If the area of the template is small, the threshold value can be set relatively low to ensure that the template cost meets the matching requirements and ensure prediction accuracy.
[0040] In one embodiment, before reading each candidate of block vector prediction in each region of the current block according to the position parameter, the method further includes:
[0041] The class index of the candidate list is determined by parsing the code stream, and each class index corresponds to a region.
[0042] In this embodiment, the class index of the candidate list of the current block is parsed from the bitstream to specify the region in the candidate list of the current block. In addition, the target candidate of the region corresponding to each index can be derived as motion information.
[0043] In one embodiment, for each region of the current block, reading each candidate spatial domain video block in the region according to the position parameter includes:
[0044] S1110: Determine the switch status of constructing the candidate list by parsing the setting information of the code stream.
[0045] S1120: When the switch state is on, for each region corresponding to the class index, each candidate of the spatial domain video block in the region is read according to the position parameter.
[0046] In this embodiment, the switch state of parsing and constructing the candidate list in the code stream can also be understood as determining the switch state of the candidate list derivation method. If the switch state is on, each candidate of the spatial domain video block on the area can be read according to the position parameter, and the target candidate can be determined using the matching parameter; if the switch state is off, the target candidate is not determined using the position parameter and the matching parameter, but the target candidate corresponding to each area is determined in turn by traversing the HBVP table.
[0047] In one embodiment, the setting information includes at least one of the following:
[0048] Sequence header parameters (Sequence header); Picture Header (PH); Patch; Coding Unit (CU).
[0049] The following is a detailed description of each grammatical element, including but not limited to the following elements:
[0050] According to an embodiment of the present application, a target candidate enabling flag is selected using the method of the embodiment of the present application through signaling at the sequence level of the coded bit stream, that is, in the sequence header.
[0051] Table 1 is a syntax table of the sequence header at the coding bitstream sequence level, as shown below. It should be noted that in the various tables of the embodiments of the present application, the values of the various identifiers are only exemplary. In actual applications, other types of values can also be taken, for example, "true" and "false" can be used instead of "1" and "0", or other types of characters or symbols can be used instead of "1" and "0".
[0052] Table 1 Syntax of the sequence header at the coded bitstream sequence level
[0053] The semantics of the relevant syntax fields in Table 1 are as follows:
[0054] ibc_enable_flag: Indicates the enable flag of the sequence-level IBC mode, which is used to indicate whether the sequence-level IBC mode is enabled. A value of 1 indicates enabled, and a value of 0 indicates disabled.
[0055] sbvp_class_enable_flag: indicates the enable flag of the method of the embodiment of the present application, which is used to indicate whether the method of the embodiment of the present application is enabled at the sequence level. A value of 1 indicates enabled, and a value of 0 indicates disabled. The representation of the syntax field is not limited to this embodiment.
[0056] According to an embodiment of the present application, a target candidate enabling flag is selected using the method of the embodiment of the present application through signaling at the picture level of the coded bitstream, that is, in the picture header.
[0057] Table 2 is a syntax table of the picture header at the picture level of the coded bitstream.
[0058] Table 2 Syntax of picture header at the coded bitstream picture level
[0059] The semantics of the relevant syntax fields in Table 2 are as follows:
[0060] picture_ibc_enable_flag: indicates the enable flag of the image-level IBC mode, used to indicate whether the image-level IBC mode is enabled. 1 indicates enabled, and 0 indicates disabled.
[0061] picture_sbvp_class_enable_flag: indicates whether the method of the embodiment of the present application is enabled, and is used to indicate whether the method of the embodiment of the present application is enabled at the picture level. A value of 1 indicates enabled, and a value of 0 indicates disabled. The representation of the syntax field is not limited to this embodiment.
[0062] According to an embodiment of the present application, a target candidate enabling flag is selected using the method of the embodiment of the present application through signaling at the slice level of the coded bitstream.
[0063] Table 3 is the syntax table of the coded bitstream slice level.
[0064] Table 3 Syntax table of coded bitstream slice level
[0065] The semantics of the relevant syntax fields in Table 3 are as follows:
[0066] patch_sbvp_class_enable_flag: indicates the enable flag of the method of the embodiment of the present application, which is used to indicate whether the method of the embodiment of the present application is enabled at the slice level. A value of 1 indicates enabled, and a value of 0 indicates disabled. The representation of the syntax field is not limited to this embodiment.
[0067] According to an embodiment of the present application, a flag for enabling a target candidate method selection method using the method of an embodiment of the present application is notified by signaling at the coding unit level of the coded bit stream.
[0068] Table 4 is the syntax table of the coded bitstream slice level.
[0069] Table 4 Syntax table of coded bitstream slice level
[0070] The semantics of the relevant syntax fields in Table 4 are described as follows:
[0071] isc_ibc_cu_flag: string copy or block copy intra prediction flag, a value of 1 indicates that the current coding unit is in string copy intra prediction mode or block copy intra prediction mode; a value of 0 indicates that the current coding unit is neither in string copy intra prediction mode nor in block copy intra prediction mode.
[0072] ibc_cu_flag: Block copy intra mode flag, a value of 1 indicates that the current coding unit is in block copy intra prediction mode; a value of 0 indicates that the current coding unit is not in block copy intra prediction mode.
[0073] sbvp_class_flag: indicates the enabling flag of the method of the embodiment of the present application, which is used to indicate whether the method of the embodiment of the present application is enabled at the coding unit level. A value of 1 indicates enabling, and a value of 0 indicates disabling. The representation of the syntax field is not limited to this embodiment.
[0074] The above syntax elements can be used in any combination or individually. In addition, the above syntax elements can also be used in other bitstream formats, including Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), Slice Header (SH), etc.
[0075] In one embodiment, the method further comprises:
[0076] S140: When the switch state is off, traverse each candidate in the historical block vector prediction table.
[0077] S150: For each region arranged in the specified order, determine in turn whether the current candidate belongs to the current region.
[0078] S160: When the current candidate belongs to the current region and there is no corresponding target candidate in the current region, the current candidate is taken as the target candidate of the current region and added to the corresponding position of the current region in the candidate list.
[0079] In this embodiment, when the switch is off, the target candidate corresponding to each region is determined in sequence by traversing the HBVP table. For example, by traversing each candidate in the historical block vector prediction table, for any candidate, it is determined in sequence whether the candidate belongs to the first region, the second region, the third region, and so on. If the candidate belongs to the tth region (t is a positive integer) and there is no corresponding target candidate in the tth region, the candidate is added to the corresponding position of the th region in the candidate list.
[0080] In one embodiment, for each region of the current block, the method further comprises:
[0081] S170: Traverse the spatially adjacent blocks of the current block, and fill the candidates of each spatially adjacent block into the candidate list in turn.
[0082] S180: Fill the limited number of candidates in the historical block vector prediction table into the candidate list.
[0083] In one embodiment, the method further comprises:
[0084] S190: When there is no candidate for the designated area in the candidate list, the designated space is used as a candidate for the designated area and filled into a corresponding position of the designated area in the candidate list.
[0085] For example, if there is no candidate in the qth region in the candidate list, a candidate in a specified space (such as the left of the current block) may be placed in the position corresponding to the qth region in the candidate list.
[0086] The video block processing method of the present application is exemplarily described below through some embodiments.
[0087] Example 1
[0088] The video block processing method of this embodiment can be applied to the process of encoding a video. Specifically, a method for deriving region-based spatial candidate information is provided, wherein a region can also be understood as a class.
[0089] Step 1: Obtain region-based candidate sets;
[0090] With the current block as the center, radiate in n directions, including but not limited to the following directions: left, top, top-left, top-right, and bottom-left. Each direction corresponds to a region, which is considered a candidate.
[0091] For a certain direction, we increase the offset from near to far, read the candidate information from each offset position, and add the candidate information to the candidate set of the corresponding direction.
[0092] The offset distance includes but is not limited to: fixed offset distance or adaptive offset distance.
[0093] Step 2: derive region-based target candidates;
[0094] For the candidate set of each region, the candidate information closest to the current coding unit is selected as the target candidate of the region.
[0095] Example 2
[0096] The video block processing method of this embodiment can be applied to the process of encoding a video. Specifically, a method for deriving region-based spatial candidate information is provided, wherein a region can also be understood as a class.
[0097] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0098] Step 1: It should be noted that technical details not fully described in this embodiment can be referred to any of the above embodiments.
[0099] Step 2: derive region-based target candidates;
[0100] For each region, the candidate with the lowest template cost among all candidates of the spatial domain video block in the corresponding region is selected as the target candidate for the region.
[0101] The set template can be a reconstructed region adjacent to the candidate's reference block, including the reconstructed region above and to the left. The template cost can be the cost difference between the template of the candidate's reference block and the template of the current block multiplied by a weight parameter. Specifically, it can be calculated using algorithms such as SAD, SSD, or SATD.
[0102] Example 3
[0103] The video block processing method of this embodiment can be applied to the process of encoding a video, and specifically, mainly acts on the candidate list construction process of IBC, wherein a region can also be understood as a class.
[0104] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0105] Step 1: Obtain the HBVP table;
[0106] During the encoding of the historical IBC code block, candidate information such as BV is added to the HBVP table in the order of first-in-first-out. If the same candidate information exists in the HBVP table, the same candidate information in the HBVP table is deleted and the latest candidate information is added to the HBVP table.
[0107] Step 2: Obtain a region-based target candidate set.
[0108] Step 3: derive region-based target candidates;
[0109] For each region, the candidate information closest to the current coding unit may be selected as the target candidate for the region according to the first embodiment, or the target candidate for the region may be selected using the template cost according to the second embodiment.
[0110] Step 4: Derive the candidate list for each region from the class-based HBVP table;
[0111] For example, the candidate classes are divided according to the following spatial classification rules:
[0112] Class 0: The area of the coding block is greater than the threshold 32;
[0113] Class 1: The frequency of BV is greater than 2;
[0114] Class 2: The upper left corner of the coded block is to the left of the current block.
[0115] Class 3: The upper left corner of the coded block is above the current block.
[0116] Class 4: The upper left corner of the coded block is located above the current block.
[0117] Class 5: The upper left corner of the coded block is located above and to the right of the current block.
[0118] Class 6: The upper left corner of the coded block is located at the lower left of the current block;
[0119] The coding block can be understood as the reference block pointed to by the candidate.
[0120] Traverse the HBVP table. When a candidate is found, determine which of the above categories it belongs to, following the class order {0, 1, 4, 5, 6, 3, 2}. If the candidate belongs to a category and no target candidate exists for that category, it is considered the target candidate for that category and the traversal continues to the next candidate. If the candidate belongs to a category but a target candidate already exists for that category, the determination continues to the next category.
[0121] Step 4: Fill in target candidates;
[0122] When there is still no target candidate for any class in the candidate list, fill it with the candidates in the specified space. For example, if there is no target candidate for class 0, 2, 4, or 6, use the candidate of the left class (Class2) as the target candidate for that area and fill it into the corresponding position of that class in the candidate list.
[0123] Example 4
[0124] The video block processing method of this embodiment can be applied to the process of encoding a video, and specifically, mainly acts on the candidate list construction process of IBC, wherein a region can also be understood as a class.
[0125] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0126] Step 1: Obtain the HBVP table;
[0127] Step 2: Obtain a region-based target candidate set;
[0128] Step 3: Parse the code stream and obtain the class index of the candidate list;
[0129] The index of the candidate list of the current block is parsed from the code stream to specify the area in the BVP of the current block.
[0130] For example, the categories are divided according to the following rules:
[0131] Class 0: The area of the coding block is greater than the threshold 32;
[0132] Class 1: The frequency of BV is greater than 2;
[0133] Class 2: The upper left corner of the coded block is to the left of the current block.
[0134] Class 3: The upper left corner of the coded block is above the current block.
[0135] Class 4: The upper left corner of the coded block is located above the current block.
[0136] Class 5: The upper left corner of the coded block is located above and to the right of the current block.
[0137] Class 6: The upper left corner of the coded block is located at the lower left of the current block;
[0138] The coding block can be understood as the reference block pointed to by the candidate.
[0139] Step 4: Parse the switch status of the candidate list derivation method;
[0140] The symbol of the switch state of the candidate list derivation method (i.e., the switch state of constructing the candidate list) is parsed in the code stream. If the switch state is on, the set template is used for matching and deduction, and the process goes to step 5. Otherwise, the process goes to step 6.
[0141] The parsed symbols can exist in but are not limited to the following symbols and can be used in combination:
[0142] 1) Candidate list derivation method switch in the sequence parameter set (SPS): The method for derivation of the candidate list of the current video sequence is determined according to the sequence-level candidate list derivation method switch identifier in the bitstream.
[0143] 2) Candidate list derivation method switch in picture parameter set (PPS): The candidate list derivation method is determined according to the candidate list derivation method switch picture-level identifier. The candidate list derivation method can be applied to the reconstructed picture or to one or more slices of the reconstructed picture.
[0144] 3) Candidate list derivation method switch in the picture header (PH): The candidate list derivation method used by the current image is determined according to the candidate list derivation method switch in the picture header of the current image.
[0145] 4) Candidate list derivation method switch in the slice header (SH): Determine the candidate list derivation method of the current slice based on the candidate list derivation method switch in the current image slice header
[0146] 5) Candidate list derivation method switch in coding unit (CU): Determine the candidate list derivation method used by the current CU according to the candidate list derivation method switch.
[0147] Step 5: Derivation of target candidates for the region corresponding to the class index;
[0148] For each region corresponding to a class index, the candidate information closest to the current coding unit can be selected as the target candidate for the region according to the first embodiment, or the target candidate for the region can be selected using the template cost according to the second embodiment.
[0149] Step 6: Derive the candidate list for each region from the class-based HBVP table;
[0150] Step 7: Populate target candidates.
[0151] Example 5
[0152] The video block processing method of this embodiment can be applied to the process of encoding a video, and specifically, mainly acts on the candidate list construction process of IBC, wherein a region can also be understood as a class.
[0153] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0154] Step 1: Obtain the HBVP table;
[0155] Step 2: Obtain a region-based target candidate set;
[0156] Step 2: Obtain a region-based target candidate set;
[0157] Step 3: Derive region-based object candidates.
[0158] Step 4: Derive the candidate list for each region from the class-based HBVP table;
[0159] Step 5: Fill in target candidates;
[0160] When there is still no target candidate in any class in the candidate list, it is filled with candidates from the specified space. For example, the candidate classes are divided according to the following spatial classification rules:
[0161] Class 0: The area of the coding block is greater than the threshold 32;
[0162] Class 1: The frequency of BV is greater than 2;
[0163] Class 2: The upper left corner of the coded block is to the left of the current block.
[0164] Class 3: The upper left corner of the coded block is above the current block.
[0165] Class 4: The upper left corner of the coded block is located above the current block.
[0166] Class 5: The upper left corner of the coded block is located above and to the right of the current block.
[0167] Class 6: The upper left corner of the coded block is located at the lower left of the current block;
[0168] The coding block can be understood as the reference block pointed to by the candidate.
[0169] After traversing the HBVP table, if there is no target candidate in Class 2, fill the candidate on the left to the corresponding position of that class; if there is no target candidate in Class 3, fill the candidate above the candidate to the corresponding position of that class; if there is no target candidate in Class 4, fill the candidate to the upper left of the candidate to the corresponding position of that class; if there is no target candidate in Class 5, fill the candidate to the upper right of the candidate to the corresponding position of that class; if there is no target candidate in Class 6, fill the candidate to the lower left of the candidate to the corresponding position of that class.
[0170] Example 6
[0171] The video block processing method of this embodiment can be applied to the process of encoding a video, and specifically, mainly acts on the candidate list construction process of IBC, wherein a region can also be understood as a class.
[0172] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0173] Step 1: Obtain the HBVP table;
[0174] Step 2: Obtain a region-based target candidate set;
[0175] Step 3: Parse the code stream and obtain the class index of the candidate list;
[0176] Step 4: Parse the switch state of the candidate list derivation method
[0177] The symbol of the switch state of the candidate list derivation method (i.e., the switch state of constructing the candidate list) is parsed in the code stream. If the switch state is on, the set template is used for matching and derivation, and the process goes to step 5. Otherwise, the process goes to step 7.
[0178] The parsed symbols can exist in but are not limited to the following symbols and can be used in combination:
[0179] 1) Candidate list derivation method switch in the sequence parameter set (SPS): The method for derivation of the candidate list of the current video sequence is determined according to the sequence-level candidate list derivation method switch identifier in the bitstream.
[0180] 2) Candidate list derivation method switch in picture parameter set (PPS): The candidate list derivation method is determined according to the candidate list derivation method switch picture-level identifier. The candidate list derivation method can be applied to the reconstructed picture or to one or more slices of the reconstructed picture.
[0181] 3) Candidate list derivation method switch in the picture header (PH): The candidate list derivation method used by the current image is determined according to the candidate list derivation method switch in the picture header of the current image.
[0182] 4) Candidate list derivation method switch in the slice header (SH): Determine the candidate list derivation method of the current slice based on the candidate list derivation method switch in the current image slice header
[0183] 5) Candidate list derivation method switch in coding unit (CU): Determine the candidate list derivation method used by the current CU according to the candidate list derivation method switch.
[0184] Step 5: Derivation of target candidates for the region corresponding to the class index;
[0185] Step 6: Derive the candidate list for each region from the class-based HBVP table;
[0186] Step 7: Fill the target candidate in the area corresponding to the class index;
[0187] When there is no candidate in the area corresponding to any class index in the candidate list, the target candidate is used to fill it. For example, the candidate classes are divided according to the following spatial classification rules:
[0188] Class 0: The area of the coding block is greater than the threshold 32;
[0189] Class 1: The frequency of BV is greater than 2;
[0190] Class 2: The upper left corner of the coded block is to the left of the current block.
[0191] Class 3: The upper left corner of the coded block is above the current block.
[0192] Class 4: The upper left corner of the coded block is located above the current block.
[0193] Class 5: The upper left corner of the coded block is located above and to the right of the current block.
[0194] Class 6: The upper left corner of the coded block is located at the lower left of the current block;
[0195] The coding block can be understood as the reference block pointed to by the candidate.
[0196] After traversing the HBVP table, if there is no target candidate in Class 2, fill the candidate on the left to the corresponding position of that class; if there is no target candidate in Class 3, fill the candidate above the candidate to the corresponding position of that class; if there is no target candidate in Class 4, fill the candidate to the upper left of the candidate to the corresponding position of that class; if there is no target candidate in Class 5, fill the candidate to the upper right of the candidate to the corresponding position of that class; if there is no target candidate in Class 6, fill the candidate to the lower left of the candidate to the corresponding position of that class.
[0197] Example 7
[0198] The video block processing method of this embodiment can be applied to the process of encoding a video, and specifically, mainly acts on the candidate list construction process of IBC, wherein a region can also be understood as a class.
[0199] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0200] Step 1: Fill in spatial adjacent candidates;
[0201] Traverse the spatially adjacent blocks and fill the candidate information of the spatially adjacent blocks in the candidate list in turn;
[0202] Step 2: Fill in HBVP candidates;
[0203] Select a finite number of candidates from the HBVP table and fill them into the candidate list;
[0204] Step 3: Fill in non-adjacent space candidates;
[0205] First, spatial non-adjacent candidates are classified: with the current block as the center, radiate in n directions including but not limited to the following directions: left, top, upper left, upper right, and lower left.
[0206] For a certain direction, we increase the offset from near to far, read the candidate information from each offset position, and add the candidate information to the candidate set of the corresponding direction.
[0207] The offset distance includes but is not limited to: fixed offset distance or adaptive offset distance.
[0208] For each region, the candidate information closest to the current coding unit may be selected as the target candidate for the region according to the first embodiment, or the target candidate for the region may be selected using the template cost according to the second embodiment.
[0209] After selecting the target candidates corresponding to each area, they are added to the candidate list in order.
[0210] Step 4: Fill in other candidates;
[0211] When the candidate list is not full, that is, there is no target candidate corresponding to a certain index, the candidate in the specified space can be used as the target candidate corresponding to the area.
[0212] The present application also provides a video block processing device. FIG2 is a schematic diagram of the structure of a video block processing device provided by one embodiment. As shown in FIG2, the video block processing device includes:
[0213] A reading module 210 is configured to read, for each region of the current block, each candidate spatial domain video block on the region according to a position parameter;
[0214] A target candidate determination module 220 is configured to determine a target candidate corresponding to the region based on a matching parameter between each candidate and the current block;
[0215] The adding module 230 is configured to add the target candidate to a corresponding position of the region in a candidate list for block vector prediction of the current block.
[0216] In one embodiment, the area of the current block includes a middle area radiated in two directions with the current block as the center, where the two directions are one of the following: directly below and lower left, lower left and directly left, directly left and upper left, upper left and directly above, directly above and upper left, or upper left and directly right;
[0217] or,
[0218] The area of the current block includes a straight line area radiating in one direction from the current block as the center, where the one direction is directly above, directly left, upper left, upper right, or lower left;
[0219] or,
[0220] The area of the current block includes an annular area with a distance from the current block between n and m, where m is greater than n, and mn is a width of the annular area, which is determined according to the distance between the annular area and the current block.
[0221] In one embodiment, the position parameter is used to represent the offset position of the corresponding candidate relative to the current block in the middle area, the straight area, or the annular area.
[0222] In one embodiment, the candidate includes a candidate block and at least one of the following information of the candidate block: a motion vector, a position parameter, and a shape parameter.
[0223] In one embodiment, the matching parameter includes a distance between the candidate and the current block.
[0224] In one embodiment, the target candidate determination module 220 is configured to:
[0225] The candidate with the shortest distance to the current block is used as the target candidate corresponding to the area.
[0226] In one embodiment, the matching parameter includes a template cost between a template of a reference block pointed to by the candidate and a set template of the current block;
[0227] The template cost is the cost difference between the template of the reference block pointed by the candidate and the set template multiplied by the weight parameter of the reference block pointed by the candidate;
[0228] The set template is determined according to an adjacent reconstructed area of the current block.
[0229] In one embodiment, the weight parameter is a measure of the importance of the candidate, which is determined by the distance between the candidate and the current block; as the distance increases, the corresponding weight parameter decreases.
[0230] In one embodiment, the weight parameter is a measure of the importance of the candidate, and the weight parameter corresponding to each candidate is 1.
[0231] In one embodiment, the target candidate determination module 220 is configured to be one of the following:
[0232] The candidate with the lowest template cost is used as the target candidate corresponding to the region;
[0233] When the lowest template cost is less than or equal to the set threshold, the candidate corresponding to the lowest template cost is selected as the target candidate;
[0234] When the lowest template cost is greater than a set threshold, the designated candidate in the area is used as the target candidate, wherein the designated candidate is the candidate in the area that is closest to the current block, or the candidate that is first added to the candidate set, and the set threshold is determined by the area of the set template.
[0235] In one embodiment, before reading each candidate of block vector prediction in each region of the current block according to the position parameter, the apparatus further includes:
[0236] The index parsing module is configured to determine the class index of the candidate list by parsing the code stream, where each class index corresponds to a region.
[0237] In one embodiment, the reading module 210 includes:
[0238] a switch parsing unit configured to determine a switch state for constructing a candidate list by parsing setting information of a code stream;
[0239] The reading unit is configured to read, when the switch state is on, for a region corresponding to each class index, each candidate of the spatial domain video block on the region according to the position parameter.
[0240] In one embodiment, the setting information includes at least one of the following: SPS; PPS; PH; SH; CU.
[0241] In one embodiment, the apparatus further comprises:
[0242] A first traversal module is configured to traverse each candidate in the historical block vector prediction table when the switch state is off;
[0243] A judgment module is configured to judge whether a current candidate belongs to the current category for each category arranged in a specified order;
[0244] The first adding module is configured to, when the current candidate belongs to the current category and there is no corresponding target candidate for the current category, take the current candidate as the target candidate for the current category and add it to the corresponding position of the current category in the candidate list.
[0245] In one embodiment, the apparatus further comprises:
[0246] a second traversal module configured to traverse the spatially adjacent blocks of the current block and sequentially fill the candidate of each spatially adjacent block into a candidate list;
[0247] The second adding module is configured to fill a limited number of candidates in the historical block vector prediction table into the candidate list.
[0248] In one embodiment, the apparatus further comprises:
[0249] The designation module is configured to, when there is no candidate for the designated area in the candidate list, use the designated space as a candidate for the designated area and fill it into a corresponding position of the designated area in the candidate list.
[0250] The video block processing device proposed in this embodiment and the video block processing method proposed in the above embodiments belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to any of the above embodiments. This embodiment has the same beneficial effects as executing the video block processing method.
[0251] An embodiment of the present application further provides an electronic device. FIG3 is a schematic diagram of the hardware structure of an electronic device provided in one embodiment. As shown in FIG3 , the electronic device provided in the present application includes a processor 310 and a memory 320. The processor 310 in the electronic device may be one or more. FIG3 takes one processor 310 as an example. The memory 320 is configured to store one or more programs. The one or more programs are executed by the one or more processors 310, so that the one or more processors 310 implement the video block processing method as described in the embodiment of the present application.
[0252] The electronic device further includes a communication device 330 , an input device 340 and an output device 350 .
[0253] The processor 310 , memory 320 , communication device 330 , input device 340 and output device 350 in the electronic device may be connected via a bus or other means. FIG3 takes the bus connection as an example.
[0254] The input device 340 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 350 may include a display device such as a display screen.
[0255] The communication device 330 may include a receiver and a transmitter. The communication device 330 is configured to perform information transmission and reception communication according to the control of the processor 310.
[0256] The memory 320, as a computer-readable storage medium, can be configured to store software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the video block processing method described in the embodiments of the present application (for example, the reading module 210, the target candidate determination module 220, and the joining module 230 in the video block processing device). The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 320 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely located relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0257] The present application also provides a storage medium storing a computer program that, when executed by a processor, implements the video block processing method described in any of the embodiments of the present application. The method comprises: for each region of a current block, reading each candidate for a spatial domain video block in the region according to a position parameter; determining a target candidate corresponding to the region based on a matching parameter between each candidate and the current block; and adding the target candidate to the corresponding position of the region in a candidate list for block vector prediction of the current block.
[0258] An embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements any of the video block processing methods described in the embodiments of the present application.
[0259] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example, but not limited to: electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above.More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM), flash memories, optical fibers, portable CD-ROMs, optical storage devices, magnetic storage devices, or any suitable combination of the above.Computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0260] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0261] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0262] The computer program code for performing the operations of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and also conventional procedural programming languages such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0263] An embodiment of the present application further provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the video encoding method as described in any of the above embodiments.
[0264] The above description is merely an exemplary embodiment of the present application and is not intended to limit the scope of protection of the present application.
[0265] It will be understood by those skilled in the art that the term user terminal covers any suitable type of wireless user equipment, such as a mobile phone, a portable data processor, a portable web browser or a vehicle-mounted mobile station.
[0266] In general, various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.
[0267] Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.
[0268] The block diagram of any logic flow in the drawings of this application may represent program steps, or may represent interconnected logic circuits, modules and functions, or may represent a combination of program steps and logic circuits, modules and functions. A computer program may be stored on a memory. The memory may be of any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical storage devices and systems (digital versatile discs (DVD) or compact disks (CD), etc.). Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), and a processor based on a multi-core processor architecture.
[0269] The above description of exemplary embodiments of the present application has been provided by way of exemplary and non-limiting examples. However, various modifications and adaptations of the above embodiments will be apparent to those skilled in the art, when considered in conjunction with the accompanying drawings and the appended claims, without departing from the scope of the present application. Therefore, the proper scope of the present application will be determined by reference to the appended claims.
Claims
1. A video block processing method, comprising: For each region of the current block, read each candidate of the spatial domain video block in the region according to the position parameter; Determine a target candidate corresponding to the region according to a matching parameter between each candidate and the current block; The target candidate is added to the corresponding position of the region in the candidate list of the block vector prediction of the current block.
2. The method according to claim 1, wherein The area of the current block includes a middle area radiated in two directions with the current block as the center, where the two directions are one of the following: directly below and lower left, lower left and directly left, directly left and upper left, upper left and directly above, directly above and upper left, or upper left and directly right; or, The area of the current block includes a straight line area radiating in one direction from the current block as the center, where the one direction is directly above, directly left, upper left, upper right, or lower left; or, The area of the current block includes an annular area with a distance from the current block between n and m, where m is greater than n, and both m and n are positive numbers. mn is the width of the annular area, and the width is determined according to the distance between the annular area and the current block.
3. The method according to claim 2, wherein: The position parameter is used to represent the offset position of the corresponding candidate relative to the current block in the middle area, the straight area or the annular area.
4. The method according to claim 1, wherein The candidate includes a candidate block and at least one of the following information of the candidate block: a motion vector, a position parameter, and a shape parameter.
5. The method according to claim 1, wherein The matching parameter includes the distance between the candidate and the current block.
6. The method according to claim 5, wherein: Determining a target candidate corresponding to the region according to a matching parameter between each candidate and the current block includes: The candidate with the shortest distance to the current block is used as the target candidate corresponding to the area.
7. The method according to claim 1, wherein The matching parameter includes a template cost between the template of the reference block pointed to by the candidate and the set template of the current block; The template cost is the cost difference between the template of the reference block pointed by the candidate and the set template multiplied by the weight parameter of the reference block pointed by the candidate; The set template is determined according to an adjacent reconstructed area of the current block.
8. The method according to claim 7, wherein: The weight parameter is a measure of the importance of the candidate, which is determined by the distance between the candidate and the current block; As the distance increases from small to large, the corresponding weight parameters decrease from large to small.
9. The method according to claim 7, wherein: The weight parameter is a measure of the importance of the candidate, and the weight parameter corresponding to each candidate is 1.
10. The method according to claim 7, wherein: Determining a target candidate corresponding to the region according to a matching parameter between each candidate and the current block includes one of the following: The candidate with the lowest template cost is used as the target candidate corresponding to the region; In response to the lowest template cost being less than or equal to a set threshold, taking the candidate corresponding to the lowest template cost as the target candidate; In response to the lowest template cost being greater than a set threshold, a designated candidate in the area is used as a target candidate, wherein the designated candidate is the candidate in the area that is closest to the current block, or the candidate that is first added to the candidate set, and the set threshold is determined by the area of the set template.
11. The method according to claim 1 , further comprising: before reading, for each region of the current block, each candidate spatial domain video block in the region according to the position parameter: The class index of the candidate list is determined by parsing the code stream, and each class index corresponds to a region.
12. The method according to claim 1, wherein The step of reading, for each region of the current block, each candidate spatial domain video block in the region according to the position parameter comprises: By parsing the setting information of the code stream, the switch status of building the candidate list is determined; In response to the switch state being on, for each region corresponding to the class index, each candidate of the spatial domain video block in the region is read according to the position parameter.
13. The method according to claim 12, wherein: The setting information includes at least one of the following: Sequence parameter set SPS; picture parameter set PPS; picture header PH; slice header SH; coding unit CU.
14. The method according to claim 12, further comprising: In response to the switch state being off, traversing each candidate in the historical block vector prediction table; For each region arranged in the specified order, determine whether the current candidate belongs to the current region; In response to the current candidate belonging to the current area and no corresponding target candidate exists in the current area, the current candidate is taken as the target candidate of the current area and added to the corresponding position of the current area in the candidate list.
15. The method according to claim 14, further comprising: Traversing the spatially adjacent blocks of the current block, and sequentially filling the candidates of each spatially adjacent block into a candidate list; The candidate list is filled with a limited number of candidates in the historical block vector prediction table.
16. The method according to any one of claims 11 to 15, further comprising: In response to the absence of a candidate in the designated area in the candidate list, a candidate in the designated space is used as a target candidate for the designated area and filled into a corresponding position of the designated area in the candidate list.
17. An electronic device comprising: memory, and at least one processor; The memory is configured to store at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the video block processing method according to any one of claims 1 to 16.
18. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the video block processing method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Method and apparatus of motion refinement for video coding
CN110115032A
Video coding and decoding method and device, computer readable medium and electronic equipment
CN116805969A
Video encoding and decoding method and apparatus, storage medium, electronic device, and computer program product
US20240089494A1
Reference pixel candidate list constructing method and apparatus, device and storage medium
WO2022078339A1