Video block processing method, electronic device, and storage medium
By constructing a candidate set and setting a template to determine the target candidate, the problem of the existing technology failing to fully utilize the adjacent reconstructed areas and historical coding block information is solved, the block vector prediction accuracy of video block processing is improved, and the encoding and decoding quality is improved.
Patent Information
- Application Number
- PCT/CN2024/133828
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-18
- Filing Date
- 2024-11-22
- Publication Date
- 2025-09-25
AI Technical Summary
In intra-block copying and intra-string copying technologies, existing methods fail to fully utilize the block vector prediction candidate information of adjacent reconstructed areas and historical coding blocks, resulting in low block vector prediction accuracy and affecting the encoding and decoding quality.
By constructing a candidate set, the target candidate is determined according to the set template and added to the candidate list of block vector prediction, and the information of adjacent reconstructed areas and historical block vector prediction tables is used to improve the prediction accuracy.
Improves the block vector prediction accuracy of video block processing and enhances encoding and decoding quality.
Smart Images

Figure CN2024133828_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 processing 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) technology, a classification-based approach is typically used. First, a set of seven Block Vector Prediction (BVP) candidate lists 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 the information about BVP candidates from adjacent reconstructed areas and historically coded blocks. The candidate information recorded in the historical BVP prediction table is incomplete, resulting in low BVP prediction accuracy for the current block, 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 category of the current block, determining a candidate set corresponding to the category according to a historical block vector prediction table, wherein the candidate set includes at least one candidate;
[0006] determining a target candidate in the candidate set according to a set template, wherein the set template is determined according to an adjacent reconstructed area of the current block, and a template cost between the target candidate and the set template satisfies a set condition;
[0007] The target candidate is added to the corresponding position of the category 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 may 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 the following steps 110 to 130.
[0015] In step 110, for each category of the current block, a candidate set corresponding to the category is determined according to a historical block vector prediction table, where the candidate set includes at least one candidate.
[0016] In step 120, a target candidate in the candidate set is determined according to a set template, wherein the set template is determined according to an adjacent reconstructed area of the current block, and a template cost between the target candidate and the set template satisfies a set condition.
[0017] In step 130, the target candidate is added to the corresponding position of the category in the candidate list for block vector prediction of the current block.
[0018] In this embodiment, the current block may refer to a video block to be predicted. Each category corresponds to a candidate set, which is determined based on a history-based block vector prediction (HBVP) table. The HBVP can be constructed based on block vectors of historical blocks. Each position in the HBVP table corresponds to a category. Each candidate set includes one or more candidates. A candidate can be understood as a reference block for the candidate. For each category, a target candidate can be determined from the candidates in that category. This target candidate can serve as the target reference block corresponding to the current block, providing a reference for prediction and reconstruction of the current block and improving prediction accuracy.
[0019] The set template can be a reconstructed area adjacent to the candidate reference block, and can include the upper reconstructed area and the left reconstructed area. The template cost is related to the cost difference between the template of the reference block pointed to 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 transform Sum of Absolute Transformed Difference (SATD) algorithm. The template cost between the target candidate and the set template meets the set conditions, such as the template cost is less than or equal to the set threshold, the template cost is minimum, or the template cost is within a preset range. This means that the target candidate has a high degree of correlation with the set template, and can provide a more valuable and accurate reference for the prediction and reconstruction of the current block.
[0020] On this basis, in the process of determining the target candidates of each category and constructing the candidate list for block vector prediction of the current block, full use is made of the information of block vector prediction candidates of adjacent reconstructed areas and historical coding blocks. The information of candidates recorded in the historical block vector prediction table is not comprehensive, which leads to low accuracy of block vector prediction of the current block, affecting the encoding and decoding quality.
[0021] In one embodiment, the categories are divided according to at least one of the following: the number of times the candidate appears (ie, frequency), the area of the block where the candidate is located, and the position of the candidate relative to the current block.
[0022] For example, according to the number of times the candidate appears, the category of the current block may include the first category (the candidate appears less than 2 times in the historical block vector prediction table) and the second category (the candidate appears 2 times or more in the historical block vector prediction table), etc.
[0023] According to the area of the block where the candidate is located, the category of the current block may include category 3 (the area of the block where the candidate is located is less than 32) and category 4 (the area of the block where the candidate is located is greater than or equal to 32).
[0024] According to the position of the candidate relative to the current block, the category of the current block may include Category 5 (the candidate is located to the left of the current block), Category 6 (the candidate is located above the current block), Category 7 (the candidate is located above the current block), Category 8 (the candidate is located above the current block) and Category 9 (the candidate is located below the current block), etc.
[0025] According to the frequencies of the candidate block vectors, the categories of the current block may include category 10 (the frequency of the candidate block vector is less than 2), category 11 (the frequency of the candidate block vector is greater than or equal to 2), and the like.
[0026] In one embodiment, determining a candidate set corresponding to a category according to a historical block vector prediction table includes:
[0027] Step 1110: traverse each candidate in the historical block vector prediction table;
[0028] Step 1120: If the current candidate belongs to a single category, add the current candidate to the candidate set corresponding to the corresponding category;
[0029] Step 1130: When the current candidate belongs to at least two categories, the current candidate is added to a designated candidate set, where the designated candidate set is a candidate set with the least number of candidates among the candidate sets corresponding to the at least two categories.
[0030] For example, for a candidate in the historical block vector prediction table, if the candidate only belongs to the xth class (x is a positive integer), the candidate is added to the candidate set corresponding to the xth class; if the candidate also belongs to the yth class (y is a positive integer, y≠x), and there are m candidates in the candidate set corresponding to the xth class and n candidates in the candidate set corresponding to the yth class, then if m<n, the candidate is added to the candidate set corresponding to the xth class; if m>n, the candidate is added to the candidate set corresponding to the yth class; if m=n, the candidate can be added to the candidate set of the xth class or to the candidate set corresponding to the yth class.
[0031] In one embodiment, determining a target candidate in a candidate set according to a set template includes:
[0032] Step 1210: When the candidate set includes a candidate, the candidate is used as a target candidate of the candidate set;
[0033] Step 1220: When the candidate set includes multiple candidates, for each candidate, calculate the template cost between the candidate and the set template, and select the candidate whose template cost meets the set condition as the target candidate of the candidate set;
[0034] 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.
[0035] In this embodiment, after traversing the HBVP table to determine the candidate set corresponding to each category, for any category, if there is only one candidate in the candidate set corresponding to that category, this single candidate is used as the target candidate for that candidate set. If there are multiple candidates in the candidate set corresponding to that category, the template cost between each candidate and the set template is calculated, and the target candidate is determined based on the template cost corresponding to each candidate. 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, which is used to measure the importance of the candidate.
[0036] In one embodiment, the candidate whose template cost satisfies a set condition is selected as the target candidate of the candidate set, including one of the following:
[0037] The candidate with the lowest template cost is selected as the target candidate in the candidate set;
[0038] 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;
[0039] When the lowest template cost is greater than a set threshold, the designated candidate in the candidate set is used as the target candidate. The designated candidate is the candidate first added to the candidate set. The set threshold is determined by the area of the set template.
[0040] For example, for any category, the candidate set corresponding to the category includes p candidates, and the corresponding template costs are δc1, δc2...δc p , where the minimum template cost is δc min , then δc min The corresponding candidate is used as the target candidate of the candidate set; or, δc min Compared with the set threshold (denoted as Th), if δc min ≤Th, then δc min The corresponding candidate is selected as the target candidate for the candidate set. Otherwise, one candidate is designated from the p candidates as the target candidate for the candidate set. For example, the candidate first added to the candidate set (which can also be understood as the candidate first traversed in the HBVP table) can be selected as the target candidate for the candidate set. The threshold is determined by the area of the template. For example, if the template area is large, the threshold can be set relatively high to appropriately relax the requirements for template cost matching. If the template area is small, the threshold can be set relatively low to ensure that the template cost meets the matching requirements and ensure prediction accuracy.
[0041] In one embodiment, the weight parameter is a measure of the importance of the candidate, which is determined by the position of the candidate in the historical block vector prediction table; the candidates in the historical block vector prediction table are stored in a first-in-first-out manner;
[0042] In the historical block vector prediction table, the corresponding weight parameters are from large to small from the entry position to the exit position.
[0043] For example, for any category, the candidate set corresponding to the category includes p candidates: BVP1, BVP2...BVP p , the corresponding weights are w1, w2...w p In the historical block vector prediction table, these p candidates are arranged from the entry position to the exit position, that is, BVP1 is first added to the historical block vector prediction table and reaches the exit position first, BVP p Finally, the historical block vector prediction table is added and finally located at the entry position, then w1>w2>……>w p On this basis, we can pay more attention to the correlation between candidates added later to the HBVP (which can also be understood as candidates traversed later in the HBVP table) and the set template, and consider more whether candidates near the entry position in the HBVP table can provide reference for the current block. The weight parameters can be set according to actual needs.
[0044] 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.
[0045] In one embodiment, when a category does not have a corresponding candidate, at least one of the following is further included:
[0046] Add the candidate of the specified space as the corresponding candidate of the category to the corresponding position of the category in the candidate list;
[0047] The candidate at the designated position in the historical block vector prediction table is added to the candidate list as a category-corresponding candidate, wherein the designated position is determined according to the length and category of the historical block vector prediction table.
[0048] For example, if there is no candidate belonging to the qth category in the HBVP table, then the candidate in the specified space (e.g., to the left of the current block) may be placed in the position corresponding to the qth category in the candidate list. For another example, if there is no candidate belonging to the qth category in the HBVP table, or there is no candidate in the specified space, then the candidate at position cnt_hbvp_cands%(idx+1) in the HBVP table may be selected, where cnt_hbvp_cands is the length of the HBVP table, and idx is the category number of the qth category (category numbers for each category start at 0 and are numbered using consecutive natural numbers).
[0049] In one embodiment, the method further comprises:
[0050] S140: Determine the index of the candidate list by parsing the code stream;
[0051] S150: Export the target candidate of each category in the candidate list corresponding to the index as motion information.
[0052] In this embodiment, the index of the candidate list of the current block is parsed from the bitstream to specify the category in the candidate list of the current block, and the target candidate of the category corresponding to each index is derived as motion information.
[0053] In one embodiment, for each category of the current block, determining a candidate set corresponding to the category according to the historical block vector prediction table includes:
[0054] S1140: Determine the switch state of constructing a candidate list according to a setting template by parsing the setting information of the code stream;
[0055] S1150: When the switch state is on, for each category of the current block, determine a candidate set corresponding to the category according to the historical block vector prediction table.
[0056] In this embodiment, parsing the switch state of constructing a candidate list based on a set template in the bitstream can also be understood as determining the switch state of the candidate list derivation method. If the switch state is on, the candidate set and the set template can be used for template matching and target candidate derivation; if the switch state is off, the candidate set and the set template are not used, and the target candidate corresponding to each category is determined in turn by traversing the HBVP table.
[0057] In one embodiment, the setting information includes at least one of the following:
[0058] Sequence header parameters (Sequence header); Picture Header (PH); Patch; Coding Unit (CU).
[0059] The following is a detailed description of each grammatical element, including but not limited to the following elements:
[0060] 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.
[0061] 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".
[0062] Table 1 Syntax table of sequence header at the coding bitstream sequence level
[0063] The semantics of the relevant syntax fields in Table 1 are as follows:
[0064] ibc_enable_flag: indicates whether the IBC mode is enabled at the sequence level. 1 indicates enabled, and 0 indicates disabled.
[0065] hbvp_tm_enable_flag: indicates the activation of the method of the embodiment of the present application, and 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.
[0066] According to one embodiment of the present application, a target candidate enablement flag is selected using the present invention through signaling notification at the picture level of the coded bitstream, that is, in the picture header.
[0067] Table 2 is a syntax table of the picture header at the picture level of the coded bitstream.
[0068] Table 2 Syntax table of picture header at the coded bitstream picture level
[0069] The semantics of the relevant syntax fields in Table 2 are as follows:
[0070] picture_ibc_enable_flag: indicates whether the IBC mode at the picture level is enabled. It is used to indicate whether the IBC mode is enabled at the picture level. 1 indicates enabled, and 0 indicates disabled.
[0071] picture_hbvp_tm_enable_flag: indicates 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 syntax field is not limited to this embodiment.
[0072] According to an embodiment of the present application, a target candidate selection enabling flag using any embodiment of the present application is notified by signaling at the slice level of the coded bitstream.
[0073] Table 3 is the syntax table of the coded bitstream slice level.
[0074] Table 3 Syntax table of coded bitstream slice level
[0075] The semantics of the relevant syntax fields in Table 3 are as follows:
[0076] patch_hbvp_tm_enable_flag: indicates 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 syntax field is not limited to this embodiment.
[0077] According to one embodiment of the present application, a flag is enabled by the target candidate selection method of the present patent at the coding unit level of the coded bit stream through signaling.
[0078] Table 4 is the syntax table of the coded bitstream slice level:
[0079] Table 4 Syntax table of coded bitstream slice level
[0080] The semantics of the relevant syntax fields in Table 4 are described as follows:
[0081] 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.
[0082] 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.
[0083] hbvp_tm_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 coding unit 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.
[0084] 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. In one embodiment, the method further includes:
[0085] S160: When the switch state is off, traverse each candidate in the historical block vector prediction table;
[0086] S170: For each category arranged in the specified order, determine in turn whether the current candidate belongs to the current category;
[0087] S180: When the current candidate belongs to the current category and there is no corresponding target candidate for the current category, the current candidate is added to the corresponding position of the current category in the candidate list.
[0088] In this embodiment, when the switch is off, the target candidate corresponding to each category is determined sequentially by traversing the HBVP table. For example, each candidate in the historical block vector prediction table is traversed and, for any candidate, it is determined in sequence whether the candidate belongs to category 1, category 2, category 3, and so on. If the candidate belongs to category t (t is a positive integer) and there is no corresponding candidate in category t, the candidate is added to the corresponding position of category t in the candidate list.
[0089] The video block processing method of the present application is exemplarily described below through some embodiments.
[0090] Example 1
[0091] 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.
[0092] Step 1: Obtain the HBVP table;
[0093] 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.
[0094] Step 2: Get the candidate set for each category from the HBVP table;
[0095] For example, the categories are divided according to the following rules:
[0096] Class 0: The area of the coding block is greater than the threshold 32;
[0097] Class 1: The frequency of BV is greater than 2;
[0098] Class 2: The upper left corner of the coded block is to the left of the current block.
[0099] Class 3: The upper left corner of the coded block is located above the current block;
[0100] Class 4: The upper left corner of the coded block is located at the upper left edge of the current block;
[0101] Class 5: The upper left corner of the coded block is located at the upper right edge of the current block;
[0102] Class 6: The upper left corner of the coded block is at the lower left of the current block.
[0103] The coding block can be understood as the reference block pointed to by the candidate.
[0104] Traverse the HBVP table. When a candidate is found, determine which of the above categories the candidate belongs to. If the candidate belongs to only one category, add the candidate to the candidate set of that category; if the candidate belongs to multiple categories, add the candidate to the candidate set with the least number of candidates among the candidate sets corresponding to the multiple categories.
[0105] Step 3: Determine the target candidate for each candidate set;
[0106] Perform the following operations on the candidate set of each category:
[0107] If there is no candidate in the candidate set, the candidate in the specified space is used or the candidate in the specified position in the HBVP table is reused as the target candidate corresponding to the candidate set;
[0108] If there is only one candidate in the candidate set, then the candidate is used as the target candidate corresponding to the candidate set;
[0109] If there are multiple candidates in the candidate set, the candidate with the lowest template cost is selected from the multiple candidates as the target candidate corresponding to the candidate set.
[0110] 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.
[0111] Step 4: Place the target candidates of each category into the corresponding position in the candidate list;
[0112] Each position in the candidate list corresponds to a category.
[0113] Example 2
[0114] 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.
[0115] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0116] Step 1: Obtain the HBVP table;
[0117] Step 2: Parse the code stream and obtain the index of the candidate list;
[0118] The index of the candidate list of the current block is parsed from the code stream to specify the category in the BVP of the current block.
[0119] Step 3: Obtain the candidate set for each category from the HBVP table and derive the candidate set of the index corresponding to the class;
[0120] For example, the categories are divided according to the following rules:
[0121] Class 0: The area of the coding block is greater than the threshold 32;
[0122] Class 1: The frequency of BV is greater than 2;
[0123] Class 2: The upper left corner of the coded block is to the left of the current block.
[0124] Class 3: The upper left corner of the coded block is located above the current block;
[0125] Class 4: The upper left corner of the coded block is located at the upper left edge of the current block;
[0126] Class 5: The upper left corner of the coded block is located at the upper right edge of the current block;
[0127] Class 6: The upper left corner of the coded block is at the lower left of the current block.
[0128] The coding block can be understood as the reference block pointed to by the candidate.
[0129] Traverse the HBVP table. When a candidate is found, determine which of the above categories the candidate belongs to. If the candidate belongs to only one category, add the candidate to the candidate set of that category; if the candidate belongs to multiple categories, add the candidate to the candidate set with the least number of candidates among the candidate sets corresponding to the multiple categories.
[0130] Export the candidate set of classes corresponding to the parsed index.
[0131] Step 4: Determine the target candidate of the candidate set corresponding to each index;
[0132] Perform the following operations on the candidate set of categories corresponding to each index:
[0133] Perform the following operations on the candidate set of each category:
[0134] If there is no candidate in the candidate set, the candidate in the specified space is used or the candidate in the specified position in the HBVP table is reused as the target candidate corresponding to the candidate set;
[0135] If there is only one candidate in the candidate set, then the candidate is used as the target candidate corresponding to the candidate set;
[0136] If there are multiple candidates in the candidate set, the candidate with the lowest template cost is selected from the multiple candidates as the target candidate corresponding to the candidate set.
[0137] 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.
[0138] Step 5: Get motion information;
[0139] The target candidates of the category corresponding to each index are derived as motion information.
[0140] Example 3
[0141] 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.
[0142] It should be noted that for technical details not fully described in this embodiment, reference can be made to any of the above embodiments.
[0143] Step 1: Obtain the HBVP table;
[0144] Step 2: Parse the code stream and obtain the index of the candidate list;
[0145] Step 3: Parse the switch status of the candidate list derivation method;
[0146] The symbol of the switch state of the candidate list derivation method (i.e., the switch state of the candidate list constructed according to the set template) is parsed in the code stream. If the switch state is on, the set template is used for matching and derivation, and step 4 is entered; otherwise, step 6 is entered.
[0147] The parsed symbols can exist in but are not limited to the following symbols and can be used in combination:
[0148] 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.
[0149] 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.
[0150] 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.
[0151] 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
[0152] 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.
[0153] Step 4: Obtain the candidate set for each category from the HBVP table and derive the candidate set of the index corresponding to the class;
[0154] Step 5: Determine the target candidate of the candidate set corresponding to each index; jump to step 7.
[0155] Step 6: Get the target candidate corresponding to each index from the HBVP table;
[0156] For example, the categories are divided according to the following rules:
[0157] Class 0: The area of the coding block is greater than the threshold 32;
[0158] Class 1: The frequency of BV is greater than 2;
[0159] Class 2: The upper left corner of the coded block is to the left of the current block.
[0160] Class 3: The upper left corner of the coded block is located above the current block;
[0161] Class 4: The upper left corner of the coded block is located at the upper left edge of the current block;
[0162] Class 5: The upper left corner of the coded block is located at the upper right edge of the current block;
[0163] Class 6: The upper left corner of the coded block is at the lower left of the current block.
[0164] The coding block can be understood as the reference block pointed to by the candidate.
[0165] Traverse the HBVP table, and when a candidate is found, determine its category information in the order of categories {0, 1, 4, 5, 6, 3, 2}.
[0166] If the candidate belongs to a certain category and there is no target candidate in this category, it will be used as the target candidate corresponding to this category and the traversal will continue to the next candidate.
[0167] If the candidate belongs to a certain category, but there is already a target candidate in that category, continue to judge the next category.
[0168] If there is no target candidate for a category corresponding to a certain index, the candidate in the specified space is used or the candidate at the specified position in the HBVP table is reused as the target candidate corresponding to the category.
[0169] Step 7: Get motion information.
[0170] 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:
[0171] A candidate set determination module 210 is configured to determine, for each category of a current block, a candidate set corresponding to the category according to a historical block vector prediction table, wherein the candidate set includes at least one candidate;
[0172] A target candidate determination module 220 is configured to determine a target candidate in the candidate set according to a set template, wherein the set template is determined according to an adjacent reconstructed area of the current block, and a template cost between the target candidate and the set template satisfies a set condition;
[0173] The candidate list determination module 230 is configured to add the target candidate to the corresponding position of the category in the candidate list for block vector prediction of the current block.
[0174] In one embodiment, the categories are divided according to at least one of the following:
[0175] The number of times the candidate appears, the area of the block where the candidate is located, and the position of the candidate relative to the current block.
[0176] In one embodiment, the candidate set determination module is configured to:
[0177] Traverse each candidate in the historical block vector prediction table;
[0178] If the current candidate belongs to a single category, add the current candidate to the candidate set corresponding to the corresponding category;
[0179] In the case that the current candidate belongs to at least two categories, the current candidate is added to a designated candidate set, where the designated candidate set is a candidate set having the least number of candidates among the candidate sets corresponding to the at least two categories.
[0180] In one embodiment, the target candidate determination module is configured to:
[0181] In a case where the candidate set includes a candidate, taking the candidate as a target candidate of the candidate set;
[0182] In a case where the candidate set includes multiple candidates, for each candidate, calculating a template cost between the candidate and the set template, and taking a candidate whose template cost satisfies a set condition as a target candidate of the candidate set;
[0183] 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.
[0184] In one embodiment, the candidate whose template cost satisfies a set condition is selected as the target candidate of the candidate set, including one of the following:
[0185] taking the candidate with the lowest template cost as the target candidate of the candidate set;
[0186] 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;
[0187] When the lowest template cost is greater than a set threshold, a designated candidate in the candidate set is used as a target candidate, the designated candidate being the candidate first added to the candidate set, and the set threshold is determined by the area of the set template.
[0188] In one embodiment, the weight parameter is a measure of the importance of the candidate, which is determined by the position of the candidate in the historical block vector prediction table;
[0189] The candidates in the historical block vector prediction table are stored in a first-in-first-out manner;
[0190] In the historical block vector prediction table, the corresponding weight parameters are from large to small from the entry position to the exit position.
[0191] 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. In one embodiment, when there is no corresponding candidate in the category, the device further includes a specifying module configured to perform at least one of the following:
[0192] Adding the candidate of the specified space as a candidate corresponding to the category to the corresponding position of the category in the candidate list;
[0193] The candidate at the designated position in the historical block vector prediction table is added to the candidate list as the category-corresponding candidate, wherein the designated position is determined according to the length of the historical block vector prediction table and the category.
[0194] In one embodiment, the apparatus further comprises:
[0195] An index parsing module configured to determine an index of a candidate list by parsing a bitstream;
[0196] The export module is configured to export the target candidate of each category in the candidate list corresponding to the index as motion information.
[0197] In one embodiment, the candidate set determination module includes:
[0198] a switch parsing unit configured to determine a switch state for constructing a candidate list according to a setting template by parsing setting information of a code stream;
[0199] The candidate set determination unit is configured to determine, when the switch state is on, for each category of the current block, a candidate set corresponding to the category according to a historical block vector prediction table.
[0200] In one embodiment, the setting information includes at least one of the following:
[0201] SPS;PPS;PH;SH;CU.
[0202] In one embodiment, the apparatus further comprises:
[0203] a traversal module, configured to traverse each candidate in the historical block vector prediction table when the switch state is off;
[0204] A judgment module is configured to judge whether a current candidate belongs to the current category for each category arranged in a specified order;
[0205] The adding module is configured to add the current candidate to a corresponding position of the current category in the candidate list when the current candidate belongs to the current category and there is no corresponding target candidate for the current category.
[0206] 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.
[0207] 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.
[0208] The electronic device further includes a communication device 330 , an input device 340 and an output device 350 .
[0209] 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.
[0210] 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.
[0211] 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.
[0212] 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 candidate set determination module 210, the target candidate determination module 220, and the candidate list determination module 230). 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.
[0213] 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 one of the embodiments of the present application. The method comprises: for each category of a current block, determining a candidate set corresponding to the category based on a historical block vector prediction table, wherein the candidate set includes at least one candidate; determining a target candidate in the candidate set based on a set template, wherein the set template is determined based on adjacent reconstructed areas of the current block, and the template cost between the target candidate and the set template satisfies a set condition; and adding the target candidate to the corresponding position of the category in a candidate list of block vector predictions for the current block.
[0214] 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.
[0215] 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.
[0216] 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.
[0217] 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.
[0218] 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 conventional procedural programming languages such as "C" 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).
[0219] An embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the video block processing method as described in any of the above embodiments.
[0220] 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.
[0221] 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.
[0222] 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.
[0223] 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.
[0224] 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.
[0225] 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 category of the current block, determining a candidate set corresponding to the category according to a historical block vector prediction table, wherein the candidate set includes at least one candidate; determining a target candidate in the candidate set according to a set template, wherein the set template is determined according to an adjacent reconstructed area of the current block, and a template cost between the target candidate and the set template satisfies a set condition; The target candidate is added to the corresponding position of the category in the candidate list of the block vector prediction of the current block.
2. The method according to claim 1, wherein The categories are divided according to at least one of the following: The number of times the candidate appears, the area of the block where the candidate is located, and the position of the candidate relative to the current block.
3. The method according to claim 1, wherein The determining of the candidate set corresponding to the category according to the historical block vector prediction table includes: Traverse each candidate in the historical block vector prediction table; In response to the current candidate belonging to a single category, adding the current candidate to a candidate set corresponding to the corresponding category; In response to the current candidate belonging to at least two categories, the current candidate is added to a designated candidate set, where the designated candidate set is a candidate set having the least number of candidates among the candidate sets corresponding to the at least two categories.
4. The method according to claim 1, wherein Determining a target candidate in the candidate set according to a set template includes: In response to the candidate set including a candidate, taking the candidate as a target candidate of the candidate set; In response to the candidate set including multiple candidates, for each candidate, calculating a template cost between the candidate and the set template, and taking a candidate whose template cost satisfies a set condition as a target candidate of the candidate set; 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.
5. The method according to claim 4, wherein The candidate whose template cost satisfies the set condition is taken as the target candidate of the candidate set, including one of the following: taking the candidate with the lowest template cost as the target candidate of the candidate set; 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 candidate set is used as a target candidate, the designated candidate being the candidate first added to the candidate set, and the set threshold is determined by the area of the set template.
6. The method according to claim 4, wherein: The weight parameter is a measure of the importance of the candidate, which is determined by the position of the candidate in the historical block vector prediction table; The candidates in the historical block vector prediction table are stored in a first-in-first-out manner; In the historical block vector prediction table, the corresponding weight parameters are from large to small from the entry position to the exit position.
7. The method according to claim 4, wherein: The weight parameter is a measure of the importance of the candidate, and the weight parameter corresponding to each candidate is 1.
8. The method according to claim 1, wherein In response to the category not having a corresponding candidate, the method further includes at least one of the following: Adding the candidate of the specified space as a candidate corresponding to the category to the corresponding position of the category in the candidate list; The candidate at the designated position in the historical block vector prediction table is added to the candidate list as the category-corresponding candidate, wherein the designated position is determined according to the length of the historical block vector prediction table and the category.
9. The method according to claim 1, further comprising: Determine the index of the candidate list by parsing the code stream; The target candidate of each category in the candidate list corresponding to the index is derived as motion information.
10. The method according to claim 1, wherein For each category of the current block, determining a candidate set corresponding to the category according to the historical block vector prediction table includes: Determine the switch state of building a candidate list according to a set template by parsing the setting information of the code stream; In response to the switch state being on, for each category of the current block, a candidate set corresponding to the category is determined according to a historical block vector prediction table.
11. The method according to claim 10, 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.
12. The method according to claim 10, further comprising: In response to the switch state being off, traversing each candidate in the historical block vector prediction table; For each category arranged in the specified order, determine whether the current candidate belongs to the current category; In response to the current candidate belonging to the current category and the current category having no corresponding target candidate, the current candidate is added to a corresponding position of the current category in the candidate list.
13. 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 12.
14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is configured to implement the video block processing method according to any one of claims 1 to 12 when executed by a processor.
Citation Information
Patent Citations
Displacement vector prediction method and device in video coding and decoding, and equipment
CN113709458A
Template matching on IBC merge candidates
CN116686292A
Method and apparatus for video coding
US20210067790A1
Spatial displacement vector prediction for intra picture block and string copying
US20210392363A1