Motion information determination method, electronic equipment and storage medium
By determining the offset direction and index of image units in video coding, the candidate list for basic motion information prediction is expanded, and the optimal candidate is selected using template cost. This solves the problem of weak adaptive ability of basic motion information prediction and improves coding efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2024-10-23
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, the fixed order of base motion prediction (baseMVP) results in weak adaptability, and the motion information expansion process has significant limitations, affecting video coding efficiency.
By determining the offset direction, offset distance, and index of motion information candidates for the current image unit, the basic motion information prediction candidate list is expanded. Template cost is used for coarse selection to select the optimal motion information candidate, thereby increasing the diversity of motion information and coding efficiency.
It improves the accuracy and efficiency of video coding by expanding the diversity of the candidate list, thereby enhancing the accuracy of inter-frame prediction and coding efficiency.
Smart Images

Figure CN121921336A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, such as a method for determining motion information, an electronic device, and a storage medium. Background Technology
[0002] Ultimate Motion Vector Expression (UMVE) adds motion information offsets to candidates for skip and direct modes, providing a more refined representation of motion information and better eliminating matching errors caused by rapid motion in video scenes. Typically, a base Motion Vector Prediction (baseMVP) is selected as a candidate, and then the motion vector difference (MVD) is extended in four directions (horizontal and vertical) with different offsets. This leads to the following problems: First, the selected baseMVP plays a crucial role in the effectiveness of subsequent MVD extensions, but because the baseMVP is selected in a fixed order, its adaptability is weak; second, all subsequent MVD extensions depend on the selected baseMVP as a starting point, resulting in significant limitations in the extension process. Summary of the Invention
[0003] This application provides a method for determining motion information, an electronic device, and a storage medium.
[0004] This application provides a method for determining motion information, including:
[0005] Determine the offset direction, offset distance, and index of the motion information candidate for the current image unit;
[0006] Based on the offset direction and the offset distance, each candidate in the basic motion information prediction candidate list is offset to obtain a new motion information candidate list;
[0007] The first motion information candidate list is determined based on the template cost between the current image unit and each candidate in the motion information candidate list;
[0008] Based on the motion information candidate index, the target motion information in the first motion information candidate list is determined, and the target motion information is the motion information of the current image unit.
[0009] This application also provides a method for determining motion information, including:
[0010] For each offset direction in the offset direction set and each offset distance in the offset distance set, offset each candidate in the basic motion information prediction candidate list according to the offset direction and the offset distance to obtain a new motion information candidate list;
[0011] The first motion information candidate list is determined based on the template cost between the current image unit and each candidate in the motion information candidate list;
[0012] Target motion information candidates are determined from the first motion information candidate list, wherein the target motion information is the motion information of the current image unit.
[0013] This application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the motion information determination method described above.
[0014] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the motion information determination method described above. Attached Figure Description
[0015] Figure 1 This is a schematic diagram illustrating the offsetting of motion information candidates according to one embodiment;
[0016] Figure 2 A flowchart illustrating a motion information determination method provided in one embodiment;
[0017] Figure 3 This is a schematic diagram illustrating a motion information determination process according to one embodiment.
[0018] Figure 4 A flowchart illustrating a motion information determination method provided in one embodiment;
[0019] Figure 5 This is a schematic diagram illustrating a motion information determination process according to one embodiment.
[0020] Figure 6 A flowchart illustrating a motion information determination method provided in one embodiment;
[0021] Figure 7 This is a schematic diagram of a spatial adjacency candidate provided in one embodiment;
[0022] Figure 8 This is a schematic diagram of the structure of a motion information determination device according to one embodiment;
[0023] Figure 9A schematic diagram of another motion information determination device provided in one embodiment;
[0024] Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment. Detailed Implementation
[0025] The present application will now be described in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. It should be noted that, unless otherwise specified, the embodiments and features described herein can be arbitrarily combined with each other. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present application are shown in the accompanying drawings, not the entire structure.
[0026] For UMVE, the specific offset information of the motion information is determined by the encoder and transmitted to the decoder in the bitstream. The motion information that UMVE technology needs to transmit includes: starting point, motion distance, and motion direction. Figure 1 As shown, a candidate is used as the starting point, and offsets are made in four directions: up, down, left, and right. There can be two starting points (2 base MVs), so the selected starting point (choose one of two), the offset direction (choose one of four), and the offset distance (choose one of five or eight, determined by the flag bit in the image header) need to be indicated in the bitstream. The offset distance can be determined by the index in the bitstream. The relationship between the index and the specific offset distance is shown in Table 1 or 2 below. A flag bit transmitted in the image header determines whether Table 1 or Table 2 is used. Which table is used for the current image is determined by the average offset selected in UMVE mode of the previous frame.
[0027] Table 1. Binary representation of UMVE mode MVD offset
[0028] Offset distance 1 / 4 1 / 2 1 2 4 index 1 01 001 0001 0000
[0029] Table 2. Binary representation of UMVE mode MVD offset
[0030] Offset distance 1 / 4 1 / 2 1 2 4 8 16 32 index 000 001 011 010 10 110 1110 1111
[0031] For the Audio Video Coding Standard (AVS), the methods for determining candidates include at least one of the following:
[0032] 1. Method for exporting candidate motion information in the time domain
[0033] For direct and skip modes, the L0 motion information stored in the temporal motion information storage unit of the image with reference index 0 in reference image queue 1, which contains the brightness sample with the same coordinate position as the top-left corner brightness sample of the current image unit (also called the current coding unit or the current block), is scaled to obtain the forward and backward motion information of the current coding unit. If the L0 motion information in the temporal motion information storage unit is unavailable, the motion information of the current coding unit is derived using the spatial domain derivation method.
[0034] 2. Method for Exporting Candidate Motion Information in Conventional Airspace
[0035] Determine the availability of spatially adjacent blocks at positions F (bottom left), G (top right), C (top right), A (left), and D (top left). If spatially adjacent blocks exist at positions F (bottom left), G (top right), C (top right), A (left), and D (top left), then take the motion information of these spatially adjacent blocks as candidates for regular spatial motion information, and take as many as there are.
[0036] 3. Motion Information Candidate Derivation Method for Motion Vector Angular Prediction (MVAP)
[0037] Determine the availability of the adjacent 4x4 blocks to the left and top of the current coding unit. If there are available adjacent blocks to the left and top of the current coding unit, take the motion information of the available adjacent blocks as the motion information candidates for MVAP, and take as many as there are.
[0038] 4. A method for deriving motion information candidates based on history-based motion vector prediction (HMVP).
[0039] HMVP is a motion prediction algorithm based on historical information. Eight motion candidates are copied from the previous encoded block into a FIFO (First-In, First-Out) buffer. The FIFO is continuously updated. If a motion candidate in the FIFO is the same as the recently encoded motion, this duplicate candidate is removed, and the motion information of the current encoded unit is added to the end of the FIFO. If the motion information of the current encoded unit is different from any candidate in the FIFO, the first candidate is removed, and the latest motion information is added to the end of the FIFO, ensuring that the FIFO always retains eight of the most recent motion candidates.
[0040] In this embodiment, a template can be used to select the baseMVP, and the selection can proceed through initial screening and further selection. First, a candidate list is constructed, which may include candidates such as spatial adjacency, temporal adjacency, MVAP, HMVP, and / or spatial adjacency extension. Then, the template cost is calculated using the template, and the baseMVP with the smaller template cost is selected for UMVE.
[0041] Figure 2 This is a flowchart illustrating a motion information determination method according to one embodiment, which can be applied to a decoding end. Figure 2 As shown, the method provided in this embodiment includes the following steps:
[0042] Step 110: Determine the offset direction, offset distance, and index of the motion information candidate for the current image unit.
[0043] Step 120: Based on the offset direction and the offset distance, offset each candidate in the basic motion information prediction candidate list to obtain a new motion information candidate list.
[0044] Step 130: Determine the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list;
[0045] Step 140: Based on the motion information candidate index, determine the target motion information in the first motion information candidate list, wherein the target motion information is the motion information of the current image unit.
[0046] In this embodiment, motion information may include motion vectors, reference frame indexes, and / or technical information. The offset direction, offset distance, and indexes of the motion information candidates can be obtained by parsing the bitstream. The offset direction and offset distance are used to offset (or expand) each candidate in the basic motion information prediction candidate list (also called the basic candidate) to obtain a new motion information candidate list, which can also be called the expanded candidate list. The candidates in the basic motion information prediction candidate list may include spatial adjacency, temporal adjacency, MVAP, HMVP, and / or spatial adjacency expansion candidates. Determining the first motion information candidate can be understood as a coarse selection of candidates from the expanded candidates in the motion information candidate list. This coarse selection process can be implemented using template cost. For example, the template cost between the template corresponding to the current image unit and the template corresponding to each expanded candidate can be calculated, and candidates with template costs less than a set threshold or a specified number (e.g., 2) of candidates with the smallest template costs can be selected as the first motion information candidate. Based on this, the target motion information is determined from the first motion information candidate list according to the motion information candidate index, that is, the optimal extended candidate is determined by utilizing the rate-distortion cost, and the motion information of the current image unit is obtained by combining its corresponding baseMVP.
[0047] Figure 3 This is a schematic diagram illustrating a motion information determination process according to one embodiment. First, the offset of the current image unit and the index of the motion information candidate are determined. The offset is determined by the offset direction and offset distance. An offset (corresponding to an offset direction and an offset distance) can be represented by an identifier or index (denoted as k), such as... Figure 3 As shown, the determined offset can be denoted as offset 1 (i.e., the offset identifier k=1), and the index of the motion information candidate is, for example, m=1. Figure 3 In the diagram, 0, 1, 2, 3, 4, and 5 in the second row represent the six basic candidates in the basic motion information prediction candidate list, and 0+1, 2+1, 2+1, 3+1, 4+1, and 5+1 in the first row represent the six extended candidates in the motion information candidate list. Based on the template cost, a coarse selection is performed, and two candidates can be selected from the extended candidates as the first motion information candidate. For example, the two extended candidates with the smallest template cost (0+1 and 5+1, with corresponding indices of 0 and 1 respectively) are selected. Then, the target motion information candidate (5+1) is determined based on the index of the motion information candidate, thus obtaining the motion information of the current image unit.
[0048] The method in this embodiment expands the sources of basic motion information prediction candidates in high-level motion information representation. For each extension of motion information offset extension in high-level motion information representation, multiple optimal motion information candidates are coarsely selected using templates to increase the diversity of motion information corresponding to different extensions, improve coding efficiency, and achieve accurate inter-frame prediction.
[0049] In one embodiment, the method further includes: constructing a basic motion information prediction candidate list; the motion information prediction candidates in the basic motion information prediction candidate list include at least one of the following:
[0050] Spatial adjacency candidates; temporal co-occurrence candidates; motion information prediction candidates based on historical information (HMVP); motion information angle prediction candidates (MVAP); spatial candidates from the boundary of the largest coding unit (LCU); unidirectional zero motion information candidates; bidirectional zero motion information candidates.
[0051] In one embodiment, the length of the basic motion information prediction candidate list is less than or equal to a maximum length limit; or, the length of the basic motion information prediction candidate list is the number of all candidates for the current image unit.
[0052] In this embodiment, the length of the candidate list for basic motion information prediction depends on the number of candidates. There may be a maximum length limit, meaning that the number of candidates will not exceed this maximum length limit; or there may be no maximum number, meaning that any number of candidates can be added to the candidate list for basic motion information prediction.
[0053] In one embodiment, before determining the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list, the method further includes:
[0054] Perform a duplicate check on at least one of the following candidates to remove duplicate candidates:
[0055] Candidates in the motion information candidate list;
[0056] Candidates in the candidate list for basic motion information prediction;
[0057] Candidates are obtained based on the offset distance and offset direction;
[0058] Candidates are obtained based on a specified offset distance and a specified offset direction, wherein the index of the specified offset distance is not greater than the index of the offset distance of the current image unit motion information, and the index of the specified offset direction is not greater than the index of the offset direction of the current image unit motion information.
[0059] In one embodiment, the template of the current image unit is the surrounding reconstructed region of the current image unit, and the candidate template is the surrounding reconstructed region of the reference image unit to which the candidate is pointed.
[0060] For any image unit, the surrounding reconstructed region includes at least one of the following:
[0061] One or more rows of reconstructed pixel regions are located directly above the image unit;
[0062] The image unit is reconstructed using a single or multiple columns of pixel regions directly to its left.
[0063] The top left corner of the image unit is used to reconstruct the pixel region in a single row and column or multiple rows and columns.
[0064] The upper right corner of the image unit is a single or multiple rows of reconstructed pixel regions.
[0065] The image's lower left corner is reconstructed using a single column or multiple columns of pixel regions.
[0066] In one embodiment, the template cost is calculated in at least one of the following ways: Sum of Absolute Difference (SSD), Sum of Absolute Transformed Difference (SATD), Sum of Squared Error (SSE), Mean Absolute Difference (MAD), Mean Absolute Error (MAE), Mean Squared Error (MSE), and Mean Relative Sum of Absolute Difference (MRSAD).
[0067] In one embodiment, determining the offset direction, offset distance, and index of the motion information candidate for the current image unit includes:
[0068] If the number of first motion information candidates is greater than 1, the bitstream is parsed to obtain the offset direction, offset distance, and index of the motion information candidate for the current image unit.
[0069] In one embodiment, the inter-frame prediction mode applied by the method includes at least one of the following: High-Level Motion Information Representation (UMVE) mode in skip mode, direct prediction UMVE mode, affine transformation-based UMVE mode, merged MMVD mode with motion information difference, affine transformation-based MMVD mode, and intra-block copying MMVD mode.
[0070] In one embodiment, the current image unit and the candidate reference image unit each satisfy at least one of the following:
[0071] The area is greater than or equal to the first predetermined value;
[0072] The area is smaller than the second predetermined value;
[0073] Both length and width are greater than or equal to the third predetermined value;
[0074] Both the length and width are less than the fourth predetermined value.
[0075] In one embodiment, the method further includes: determining the enabled state of control flags of the bitstream;
[0076] Among them, the control flags include the UMVE enable flag and the UMVE coarse selection enable flag;
[0077] Control flags are set in at least one of the sequence header, image header, slice header, and coding unit syntax set of the bitstream.
[0078] Figure 4 This is a flowchart illustrating a motion information determination method according to one embodiment, which can be applied to the encoding end. For example... Figure 4 As shown, the method provided in this embodiment includes the following steps:
[0079] Step 210: For each offset direction in the offset direction set and each offset distance in the offset distance set, offset each candidate in the basic motion information prediction candidate list according to the offset direction and the offset distance to obtain a new motion information candidate list.
[0080] Step 220: Determine the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list.
[0081] Step 230: Determine target motion information candidates from the first motion information candidate list, wherein the target motion information is the motion information of the current image unit.
[0082] In this embodiment, for the encoding end, multiple sets of offset directions and offset distances can be used to offset each candidate (which can be called a basic candidate) in the basic motion information prediction candidate list to obtain a new motion information candidate list. Each candidate in the motion information candidate list can also be called an extended candidate. Determining the first motion information candidate can be understood as performing a coarse selection on the extended candidates in the motion information candidate list. For example, a specified number of extended candidates can be selected from all extended candidates. Or, for each basic candidate, a specified number (e.g., 2) of extended candidates can be selected from the corresponding extended candidates of the basic candidate. This coarse selection process can be implemented using template cost. For example, the template cost between the template corresponding to the current image unit and the templates corresponding to each extended candidate can be calculated, and a specified number (e.g., 2) of extended candidates with template costs less than a set threshold or with the smallest template costs can be selected as the first motion information candidate. Based on this, the target motion information is determined from the first motion information candidate list according to the motion information candidate index. For example, the optimal extended candidate is determined using rate-distortion cost, and combined with its corresponding basic candidate, the motion information of the current image unit is obtained.
[0083] Figure 5 This is a schematic diagram illustrating a motion information determination process according to one embodiment. Assuming there are 2 offset distances in the offset distance set and 2 offset directions in the offset direction set, there are a total of 2 × 2 = 4 offsets. Each offset (corresponding to one offset direction and one offset distance) can be represented by an identifier or index (denoted as k). The four offsets (k = 0, k = 1, k = 2, k = 3) are used to offset each basic candidate in the basic motion information prediction candidate list. For example... Figure 5 As shown, the numbers 0, 1, 2, 3, 4, and 5 in the fifth row represent the six basic candidates in the basic motion information prediction candidate list; the numbers 0+0, 1+0, 2+0, 3+0, 4+0, and 5+0 in the fourth row represent the six extended candidates obtained by offsetting with k=0; the numbers 0+1, 2+1, 2+1, 3+1, 4+1, and 5+1 in the third row represent the six extended candidates obtained by offsetting with k=1; the numbers 0+2, 1+1, 2+1, 3+1, 4+1, and 5+1 in the second row represent the six extended candidates obtained by offsetting with k=2; and the numbers 0+1, 2+1, 2+1, 3+1, 4+1, and 5+1 in the first row represent the six extended candidates obtained by offsetting with k=3. Then, a coarse selection can be performed based on the template cost to select the first motion information candidate from the extended candidates. Figure 5In this process, for each offset (for each k value), a specified number (e.g., two) of extended candidates with the minimum template cost can be selected. For example, for k=0, the selected first motion information candidates include 1+0 and 0+0; for k=1, the selected first motion information candidates include 0+1 and 5+1; for k=2, the selected first motion information candidates include 1+2 and 3+2; and for k=3, the selected first motion information candidates include 0+3 and 2+3. For each offset, the indices of the two corresponding extended candidates are m=0 and m=1, respectively. Then, the optimal target motion information candidate is determined from the first motion information candidates to obtain the motion information of the current image unit. The index of the target motion information candidate and the corresponding offset of the target motion information candidate are recorded. This information can be indicated to the decoding end.
[0084] The method in this embodiment expands the sources of basic motion information prediction candidates in high-level motion information representation. For each extension of motion information offset extension in high-level motion information representation, multiple optimal motion information candidates are coarsely selected using templates to increase the diversity of motion information corresponding to different extensions, improve coding efficiency, and achieve accurate inter-frame prediction.
[0085] In one embodiment, determining target motion information candidates from a first motion information candidate list includes:
[0086] Motion offset is performed sequentially on each candidate in the first motion information candidate, and the rate-distortion cost corresponding to each candidate is calculated.
[0087] The first motion information candidate with the best rate-distortion cost is selected as the target motion information candidate.
[0088] Figure 6 This is a flowchart illustrating a motion information determination method according to one embodiment. Figure 6 As shown, as an example, the method includes:
[0089] Step 1: Construct a candidate list for basic motion information prediction of the current image unit. The candidates in the candidate list include, but are not limited to, the following candidate sources: spatially adjacent candidates, temporal candidates, HMVP candidates, non-adjacent spatial candidates of LCU boundaries, and default candidates containing zero motion information.
[0090] Step 2: Initialize the optimal rate-distortion cost, as well as the set of offset directions and the set of offset distances to be traversed. We can use i and j to represent the indices of an offset in the offset direction set and the offset distance set, respectively, and initialize both i and j to 0.
[0091] Step 3: If i is greater than the maximum index of the offset direction set, jump to the last step; otherwise, continue to the next step.
[0092] Step 4: If j is greater than the maximum index of the offset distance set, increment i by 1 and jump to step 3; otherwise, continue to the next step.
[0093] Step 5: Use the offset direction and offset distance corresponding to i and j to offset each candidate in the basic motion information prediction candidate list, and add the offset candidate to the motion information candidate list.
[0094] Step 6: Use the template to perform a coarse selection of candidates in the motion information candidate list. Multiple optimal motion information candidates can be selected, namely the first motion information candidate.
[0095] Among them, using templates for coarse selection can be to calculate the template cost between the template of the current image unit and each candidate in the motion information candidate list, and select multiple motion information candidates with the minimum template cost.
[0096] Step 7: Traverse the coarsely selected motion information candidates, perform motion offset and other operations in sequence, calculate rate distortion cost, and select the optimal target motion information candidate.
[0097] Step 8: Update the optimal rate distortion cost.
[0098] Specifically, if the rate-distortion cost corresponding to the target motion information candidate is greater than or equal to the current optimal rate-distortion cost, the current optimal rate-distortion cost remains unchanged. If the rate-distortion cost corresponding to the target motion information candidate is less than the current optimal rate-distortion cost, the optimal rate-distortion cost is updated to the rate-distortion cost corresponding to the target motion information candidate, and the offset direction, offset distance, and index of the motion information candidate are saved. Finally, j is incremented by 1, and the process jumps to step 4.
[0099] Step 9: Encode the offset direction, offset distance, and index of the target motion information candidate into the bitstream.
[0100] In one embodiment, the method further includes: constructing a basic motion information prediction candidate list; the motion information prediction candidates in the basic motion information prediction candidate list include at least one of the following: spatially adjacent candidates; co-located temporal candidates; motion information prediction candidates based on historical information; candidates based on motion information angle prediction; spatial candidates from the boundary of the largest coding unit; unidirectional zero motion information candidates; bidirectional zero motion information candidates.
[0101] In one embodiment, the length of the basic motion information prediction candidate list is less than or equal to a maximum length limit; or, the length of the basic motion information prediction candidate list is the number of all candidates for the current image unit.
[0102] In one embodiment, before determining the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list, the method further includes:
[0103] Perform a duplicate check on at least one of the following candidates to remove duplicate candidates:
[0104] Candidates in the motion information candidate list;
[0105] Candidates from the basic motion information prediction candidate list;
[0106] Candidates are obtained based on the offset distance and the offset direction;
[0107] Candidates are obtained based on a specified offset distance and a specified offset direction, wherein the index of the specified offset distance is not greater than the index of the offset distance of the current image unit motion information, and the index of the specified offset direction is not greater than the index of the offset direction of the current image unit motion information.
[0108] In one embodiment, the template of the current image unit is the surrounding reconstructed region of the current image unit, and the candidate template is the surrounding reconstructed region of the reference image unit to which the candidate is pointed.
[0109] For any image unit, the surrounding reconstructed region includes at least one of the following:
[0110] One or more rows of reconstructed pixel regions are located directly above the image unit;
[0111] The image unit is reconstructed using a single or multiple columns of pixel regions directly to its left.
[0112] The top left corner of the image unit is used to reconstruct the pixel region in a single row and column or multiple rows and columns.
[0113] The upper right corner of the image unit is a single or multiple rows of reconstructed pixel regions.
[0114] The image's lower left corner is reconstructed using a single column or multiple columns of pixel regions.
[0115] In one embodiment, the template cost is calculated in at least one of the following ways: sum of absolute errors (SAD), sum of squared differences (SSD), sum of absolute values after Hadamard transformation (SATD), sum of squared errors (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), and mean relative difference sum of squared values (MRSAD).
[0116] In one embodiment, the method further includes: when the number of first motion information candidates is greater than 1, encoding the offset direction, offset distance, and motion information candidate index corresponding to the target motion information candidate into the bitstream.
[0117] In one embodiment, the inter-frame prediction mode applied by the method includes at least one of the following: High-Level Motion Information Representation (UMVE) mode in skip mode, direct prediction UMVE mode, affine transformation-based UMVE mode, merged MMVD mode with motion information difference, affine transformation-based MMVD mode, and intra-block copying MMVD mode.
[0118] In one embodiment, the current image unit and the candidate reference image unit each satisfy at least one of the following:
[0119] The area is greater than or equal to the first predetermined value;
[0120] The area is smaller than the second predetermined value;
[0121] Both length and width are greater than or equal to the third predetermined value;
[0122] Both the length and width are smaller than the fourth predetermined value.
[0123] In one embodiment, the method further includes:
[0124] The enabling state of the control flags of the bitstream is determined; wherein, the control flags include the UMVE enable flag and the UMVE coarse selection enable flag; the control flags are set in at least one of the sequence header, image header, slice header and coding unit syntax set of the bitstream.
[0125] The motion information determination method of this application is illustrated by some embodiments below.
[0126] Example 1
[0127] The motion information determination method in this embodiment can be found in [reference needed]. Figure 6 The process is shown below.
[0128] In the step of constructing the basic motion information prediction candidate list, the motion information prediction candidates include at least one of the following sources: spatially adjacent candidates, co-located temporal candidates; candidates from HMVP; candidates from MVAP; spatial candidates from LCU boundaries; unidirectional zero motion information candidates; and bidirectional zero motion information candidates.
[0129] Figure 7 This is a schematic diagram illustrating a spatial adjacency candidate as provided in one embodiment. Figure 7 As shown, spatial neighbor candidates include the spatially adjacent blocks at positions F (bottom left), G (inside), C (outside), A (left), and D (top left) of the current image unit. These are the five positions shown in the figure below.
[0130] Optionally, for candidates in the basic motion information prediction candidate list and / or the motion information candidate list, duplicate or redundant motion information candidates can be removed.
[0131] Optionally, the candidate list for basic motion information prediction has a fixed length, not exceeding a maximum length limit. The maximum length limit is a predetermined value, and the number of candidates in the candidate list for basic motion information prediction will not exceed the predetermined value.
[0132] Optionally, the list has no maximum length limit, and all possible candidates can be added to the list to participate in the subsequent template selection process.
[0133] Example 2
[0134] The motion information determination method in this embodiment can be found in [reference needed]. Figure 6 The process is shown below.
[0135] In the step of constructing the candidate list for basic motion information prediction, the index k is set as the offset index, which can also be understood as a combination of the offset direction index i and the offset distance index j. That is, any value of k represents an i and a j.
[0136] At the encoding end, it is necessary to sequentially construct candidate lists of motion information under different extensions corresponding to k = {0, 1, ..., K}, where K is the maximum index of the offset, i.e., the maximum index of the combination of i and j. If k starts from 0, then K is the total number of combinations of i and j minus 1.
[0137] Assuming the m-th candidate in the basic motion information prediction candidate list is denoted as MVPk(m), and the motion information offset extension corresponding to offset k is denoted as MVDk, then the offset motion information candidate is MVk(m) = MVPk(m) + MVDk.
[0138] Optionally, perform the following deduplication operation: For the current offset direction and offset distance, and the offset directions and offset distances before the current offset direction and offset distance, perform deduplication. That is, for any offset k, traverse any candidate MVk(m) in its corresponding motion information candidate MVk, and perform a deduplication operation on all candidates corresponding to MVk(m) and offsets k-1, k-2, ..., 0. If there is a duplicate, remove MVk(m) and do not participate in the subsequent coarse selection process.
[0139] Example 3
[0140] In the step of using a template to coarsely select the motion information candidate list, the template can represent the surrounding reconstruction region of the current image unit and the surrounding reconstruction region of the reference image unit to which the motion information candidate points.
[0141] For example, for any image unit, the template area of the image unit may include at least one of the following: a single or multiple rows of reconstructed pixel areas directly above the image unit; a single or multiple columns of reconstructed pixel areas directly to the left of the image unit; a single or multiple rows of reconstructed pixel areas in the upper left corner of the image unit; a single or multiple rows of reconstructed pixel areas in the upper right corner of the image unit; and a single or multiple columns of reconstructed pixel areas in the lower left corner of the image unit.
[0142] Optionally, the template cost can be calculated using at least one of the following methods: SAD, SSD, SATD, MRSAD, etc.
[0143] Optionally, during the coarse selection process using template cost, one or more candidates can be coarsely selected as first motion information candidates. Optionally, if only one first motion information candidate is coarsely selected, that first motion information candidate is the target motion information candidate, and there is no need to encode the index of the target motion information candidate into the bitstream, nor is it necessary for the decoding end to parse the index.
[0144] Optionally, for the template coarse selection process, cost calculations such as SAD, SSD, SATD, and / or MRSAD can be used. For example, one or more of these calculation methods can be used to calculate the template cost and perform template coarse selection, or multiple cost calculation methods can be used to calculate the template cost separately, and coarse selection can be performed for each calculation method to obtain the corresponding optimal candidate. These coarsely selected candidates are collectively used as the first motion information candidate.
[0145] Example 4
[0146] Optionally, the motion information determination method may be applied to specific modes, including but not limited to: skip UMVE mode, direct UMVE mode, Affine-UMVE mode, MMVD, Affine-MMVD and / or IBC-MMVD mode.
[0147] Optionally, the motion information determination method can be applied to image units of a defined size, wherein the image unit satisfies at least one of the following: the area of the image unit (the smallest image unit) is greater than or equal to a first predetermined value; the area of the image unit (the largest image unit) is less than a second predetermined value; the length or width of the image unit is greater than or equal to a third predetermined value; and the length or width of its processing block is less than a fourth predetermined value.
[0148] Example 5
[0149] Optionally, control flags can be set in the sequence header. These control flags may include the UMVE enable flag (umve_enable_flag) and the UMVE coarse selection enable flag (umve_etm_enable_flag). As shown in Table 3, the motion information determination method provided in this embodiment can take effect when both umve_enable_flag and umve_etm_enable_flag are 1. The decoding end can first parse umve_enable_flag. If umve_enable_flag is 1, then umve_etm_enable_flag is further parsed. If umve_etm_enable_flag is 1, then the motion information determination process is executed.
[0150] Table 3 shows the sequence header with the added umve_etm_enable_flag control flag.
[0151]
[0152]
[0153] Optionally, relevant control flags can be set in the image header, the title sequence, and the coding unit syntax set.
[0154] This application also provides a motion information determination device. Figure 8 This is a schematic diagram of a motion information determination device according to one embodiment. Figure 8 As shown, the motion information determining device includes:
[0155] The index determination module 310 is configured to determine the offset direction, offset distance, and index of the motion information candidate of the current image unit.
[0156] The offset module 320 is configured to offset each candidate in the basic motion information prediction candidate list according to the offset direction and the offset distance to obtain a new motion information candidate list.
[0157] The coarse selection module 330 is configured to determine a first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list;
[0158] The information determination module 340 is configured to determine the target motion information in the first motion information candidate list based on the motion information candidate index, wherein the target motion information is the motion information of the current image unit.
[0159] In one embodiment, the device further includes: a construction module configured to construct a candidate list for basic motion information prediction;
[0160] The motion information prediction candidates in the basic motion information prediction candidate list include at least one of the following:
[0161] Candidates are categorized as follows: spatially adjacent; temporally co-located; motion information prediction candidates based on historical information; motion information angle prediction candidates; spatial candidates from the boundary of the largest coding unit; unidirectional zero motion information candidates; and bidirectional zero motion information candidates.
[0162] In one embodiment, the length of the basic motion information prediction candidate list is less than or equal to a maximum length limit; or, the length of the basic motion information prediction candidate list is the number of all candidates for the current image unit.
[0163] In one embodiment, before determining the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list, the apparatus further includes: a deduplication module configured to perform deduplication on at least one of the following candidates to remove duplicate candidates:
[0164] Candidates in the motion information candidate list;
[0165] Candidates from the basic motion information prediction candidate list;
[0166] Candidates obtained based on the offset distance and the offset direction;
[0167] Candidates are obtained based on a specified offset distance and a specified offset direction, wherein the index of the specified offset distance is not greater than the index of the offset distance of the current image unit motion information, and the index of the specified offset direction is not greater than the index of the offset direction of the current image unit motion information.
[0168] In one embodiment, the template of the current image unit is the surrounding reconstructed region of the current image unit, and the template of the candidate is the surrounding reconstructed region of the reference image unit to which the candidate points;
[0169] For any image unit, the surrounding reconstructed region includes at least one of the following:
[0170] The image unit is directly above a single or multiple rows of reconstructed pixel regions;
[0171] The image unit has a single or multiple columns of reconstructed pixel regions on its left side;
[0172] The image unit's upper left corner is a single-row, single-column, or multi-row, multi-column reconstructed pixel region;
[0173] The image unit has a single or multiple rows of reconstructed pixel regions in the upper right corner;
[0174] The image shows a single or multiple column reconstructed pixel area in the lower left corner of the single pedal.
[0175] In one embodiment, the template cost is calculated in at least one of the following ways: SAD, SSD, SATD, SSE, MAD, MAE, MSE, MRSAD.
[0176] In one embodiment, the index determination module 310 is specifically configured as follows:
[0177] If the number of the first motion information candidates is greater than 1, the bitstream is parsed to obtain the offset direction, offset distance, and index of the motion information candidate of the current image unit.
[0178] In one embodiment, the inter-frame prediction mode applied by the method includes at least one of the following:
[0179] The high-level motion information representation (UMVE) mode in skip mode, the direct prediction UMVE mode, the affine transformation-based UMVE mode, the merged MMVD mode with motion information difference, the affine transformation-based MMVD mode, and the intra-block copying MMVD mode.
[0180] In one embodiment, the current image unit and the candidate reference image unit each satisfy at least one of the following:
[0181] The area is greater than or equal to the first predetermined value;
[0182] The area is smaller than the second predetermined value;
[0183] Both length and width are greater than or equal to the third predetermined value;
[0184] Both the length and width are smaller than the fourth predetermined value.
[0185] In one embodiment, the apparatus further includes: a state determination module configured to determine the enable state of control flags of the bitstream; wherein the control flags include a UMVE enable flag and a UMVE coarse selection enable flag; the control flags are set in at least one of the sequence header, image header, slice header, and coding unit syntax set of the bitstream.
[0186] The motion information determination device proposed in this embodiment and the motion information determination method proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in any of the above embodiments. Furthermore, this embodiment has the same beneficial effects as the motion information determination method.
[0187] This application also provides another motion information determination device. Figure 9 This is a schematic diagram of another motion information determining device provided in one embodiment. Figure 9As shown, the motion information determining device includes:
[0188] The offset module 410 is configured to offset each candidate in the basic motion information prediction candidate list according to the offset direction and the offset distance for each offset direction in the offset direction set and each offset distance in the offset distance set, so as to obtain a new motion information candidate list;
[0189] The coarse selection module 420 is configured to determine a first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list;
[0190] The information determination module 430 is configured to determine a target motion information candidate from the first motion information candidate list, wherein the target motion information is the motion information of the current image unit.
[0191] In one embodiment, the information determination module 430 is specifically configured as follows:
[0192] Motion offset is performed sequentially on each candidate in the first motion information candidate, and the rate-distortion cost corresponding to each candidate is calculated; the first motion information candidate with the optimal rate-distortion cost is selected as the target motion information candidate.
[0193] In one embodiment, the device further includes: a construction module configured to construct a candidate list for basic motion information prediction;
[0194] The motion information prediction candidates in the basic motion information prediction candidate list include at least one of the following:
[0195] Candidates are categorized as follows: spatially adjacent; temporally co-located; motion information prediction candidates based on historical information; motion information angle prediction candidates; spatial candidates from the boundary of the largest coding unit; unidirectional zero motion information candidates; and bidirectional zero motion information candidates.
[0196] In one embodiment, the fixed length of the basic motion information prediction candidate list is less than or equal to a maximum length limit; or, the length of the basic motion information prediction candidate list is the number of all candidates for the current image unit.
[0197] In one embodiment, before determining the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list, the device further includes a deduplication module configured to:
[0198] Perform a duplicate check on at least one of the following candidates to remove duplicate candidates:
[0199] Candidates in the motion information candidate list;
[0200] Candidates from the basic motion information prediction candidate list;
[0201] Candidates obtained based on the offset distance and the offset direction;
[0202] Candidates are obtained based on a specified offset distance and a specified offset direction, wherein the index of the specified offset distance is not greater than the index of the offset distance of the current image unit motion information, and the index of the specified offset direction is not greater than the index of the offset direction of the current image unit motion information.
[0203] In one embodiment, the template of the current image unit is the surrounding reconstructed region of the current image unit, and the template of the candidate is the surrounding reconstructed region of the reference image unit to which the candidate points;
[0204] For any image unit, the surrounding reconstructed region includes at least one of the following:
[0205] The image unit is directly above a single or multiple rows of reconstructed pixel regions;
[0206] The image unit has a single or multiple columns of reconstructed pixel regions on its left side;
[0207] The image unit's upper left corner is a single-row, single-column, or multi-row, multi-column reconstructed pixel region;
[0208] The image unit has a single or multiple rows of reconstructed pixel regions in the upper right corner;
[0209] The image shows a single or multiple column reconstructed pixel area in the lower left corner of the single pedal.
[0210] In one embodiment, the template cost is calculated in at least one of the following ways: SAD, SSD, SATD, SSE, MAD, MAE, MSE, MRSAD.
[0211] In one embodiment, the device further includes an encoding module configured to encode the offset direction, offset distance, and motion information candidate index corresponding to the target motion information candidate into the bitstream when the number of the first motion information candidates is greater than 1.
[0212] In one embodiment, the inter-frame prediction mode applied by the method includes at least one of the following:
[0213] The high-level motion information representation (UMVE) mode in skip mode, the direct prediction UMVE mode, the affine transformation-based UMVE mode, the merged MMVD mode with motion information difference, the affine transformation-based MMVD mode, and the intra-block copying MMVD mode.
[0214] In one embodiment, the current image unit and the candidate reference image unit each satisfy at least one of the following:
[0215] The area is greater than or equal to the first predetermined value;
[0216] The area is smaller than the second predetermined value;
[0217] Both length and width are greater than or equal to the third predetermined value;
[0218] Both the length and width are smaller than the fourth predetermined value.
[0219] In one embodiment, the apparatus further includes: a state determination module configured to determine the enable state of control flags of the bitstream; wherein the control flags include a UMVE enable flag and a UMVE coarse selection enable flag; the control flags are set in at least one of the sequence header, image header, slice header, and coding unit syntax set of the bitstream.
[0220] The motion information determination device proposed in this embodiment and the motion information determination method proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in any of the above embodiments. Furthermore, this embodiment has the same beneficial effects as the motion information determination method.
[0221] This application also provides an electronic device, which can be an encoding end or a decoding end, and can be a computer, mobile phone, mobile device, image processing device or server, etc. Figure 10 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment, such as... Figure 10 As shown, the electronic device provided in this application includes a processor 510 and a memory 520; the processor 510 in the electronic device may be one or more. Figure 10 Taking a processor 510 as an example; the memory 520 is configured to store one or more programs; the one or more programs are executed by the one or more processors 510, causing the one or more processors 510 to implement the motion information determination method as described in the embodiments of this application.
[0222] The electronic device also includes: a communication device 530, an input device 540, and an output device 550.
[0223] The processor 510, memory 520, communication device 530, input device 540, and output device 550 in the electronic device can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0224] Input device 540 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 550 may include display devices such as a display screen.
[0225] The communication device 530 may include a receiver and a transmitter. The communication device 530 is configured to perform information transmission and reception communication under the control of the processor 510.
[0226] The memory 520, 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 motion information determination method described in the embodiments of this application (e.g., the index determination module 310, offset module 320, coarse selection module 330, and information determination module 340 in the motion information determination device). The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the electronic device, etc. Furthermore, the memory 520 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include memory remotely located relative to the processor 510, and these remote memories can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0227] This application embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements any of the motion information determination methods described in this application embodiment. The method includes: determining the offset direction, offset distance, and index of motion information candidates for a current image unit; offsetting each candidate in a basic motion information prediction candidate list according to the offset direction and the offset distance to obtain a new motion information candidate list; determining a first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list; and determining target motion information in the first motion information candidate list based on the motion information candidate index, wherein the target motion information is the motion information of the current image unit. Alternatively, the method includes: for each offset direction in the offset direction set and each offset distance in the offset distance set, offsetting each candidate in the basic motion information prediction candidate list according to the offset direction and the offset distance to obtain a new motion information candidate list; determining a first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list; and determining a target motion information candidate from the first motion information candidate list, wherein the target motion information is the motion information of the current image unit.
[0228] This application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements any of the motion information determination methods described in this application.
[0229] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable CD-ROM, optical storage device, magnetic storage device, or any suitable combination thereof. The computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0230] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0231] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency (RF), etc., or any suitable combination thereof.
[0232] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as 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 a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0233] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the motion information determination method as described in any of the above embodiments.
[0234] The above description is merely an exemplary embodiment of this application and is not intended to limit the scope of protection of this application.
[0235] Those skilled in the art will understand that the term user terminal encompasses any suitable type of wireless user equipment, such as mobile phones, portable data processing portable web browsers, or vehicle-mounted mobile stations.
[0236] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0237] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0238] Any block diagram of logical flow in the accompanying 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. The computer program may be stored in memory. The memory may be of any type suitable to 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 Video Disc (DVD) or Compact Disk (CD), etc.). Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), and processors based on multi-core processor architectures.
[0239] A detailed description of exemplary embodiments of this application has been provided above through exemplary and non-limiting examples. However, various modifications and adjustments to the above embodiments will be apparent to those skilled in the art when considered in conjunction with the accompanying drawings and claims, without departing from the scope of this application. Therefore, the proper scope of this application will be determined by the claims.
Claims
1. A method for determining motion information, characterized in that, include: Determine the offset direction, offset distance, and index of the motion information candidate for the current image unit; Based on the offset direction and the offset distance, each candidate in the basic motion information prediction candidate list is offset to obtain a new motion information candidate list; The first motion information candidate list is determined based on the template cost between the current image unit and each candidate in the motion information candidate list; Based on the motion information candidate index, the target motion information in the first motion information candidate list is determined, and the target motion information is the motion information of the current image unit.
2. The method according to claim 1, characterized in that, Also includes: Construct a candidate list for basic motion information prediction; The motion information prediction candidates in the basic motion information prediction candidate list include at least one of the following: Spatial adjacency candidates; temporal candidates with the same position; motion information prediction candidates based on historical information; candidates based on motion information angle prediction; spatial candidates from the boundary of the largest coding unit; Candidates for unidirectional zero-motion information; candidates for bidirectional zero-motion information.
3. The method according to claim 1, characterized in that, The length of the candidate list for basic motion information prediction is less than or equal to the maximum length limit; or... The length of the basic motion information prediction candidate list is the total number of candidates for the current image unit.
4. The method according to claim 1 or 2, characterized in that, Before determining the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list, the method further includes: Perform a duplicate check on at least one of the following candidates to remove duplicate candidates: Candidates in the motion information candidate list; Candidates from the basic motion information prediction candidate list; Candidates are obtained based on the offset distance and the offset direction; Candidates are obtained based on a specified offset distance and a specified offset direction, wherein the index of the specified offset distance is not greater than the index of the offset distance of the current image unit motion information, and the index of the specified offset direction is not greater than the index of the offset direction of the current image unit motion information.
5. The method according to claim 1, characterized in that, The template for the current image unit is the surrounding reconstructed region of the current image unit, and the template for the candidate is the surrounding reconstructed region of the reference image unit to which the candidate points. For any image unit, the surrounding reconstructed region includes at least one of the following: The image unit is directly above a single or multiple rows of reconstructed pixel regions; The image unit has a single or multiple columns of reconstructed pixel regions on its left side; The image unit's upper left corner is a single-row, single-column, or multi-row, multi-column reconstructed pixel region; The image unit has a single or multiple rows of reconstructed pixel regions in the upper right corner; The image shows a single or multiple column reconstructed pixel area in the lower left corner of the single pedal.
6. The method according to claim 1, characterized in that, The template cost is calculated in at least one of the following ways: sum of absolute errors (SAD), sum of squared differences (SSD), sum of absolute values after Hadamard transformation (SATD), sum of squared errors (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), and mean relative difference sum of squared values (MRSAD).
7. The method according to claim 1, characterized in that, Determine the offset direction, offset distance, and index of the motion information candidate for the current image unit, including: If the number of the first motion information candidates is greater than 1, the bitstream is parsed to obtain the offset direction, offset distance, and index of the motion information candidate of the current image unit.
8. The method according to claim 1, characterized in that, The inter-frame prediction mode applied by the method includes at least one of the following: The high-level motion information representation (UMVE) mode in skip mode, the direct prediction UMVE mode, the affine transformation-based UMVE mode, the merged MMVD mode with motion information difference, the affine transformation-based MMVD mode, and the intra-block copying MMVD mode.
9. The method according to claim 1, characterized in that, The current image unit and the candidate reference image unit each satisfy at least one of the following: The area is greater than or equal to the first predetermined value; The area is smaller than the second predetermined value; Both length and width are greater than or equal to the third predetermined value; Both the length and width are less than the fourth predetermined value.
10. The method according to claim 1, characterized in that, Also includes: Determine the enable status of the control flags for the bitstream; The control flags include the UMVE enable flag and the UMVE coarse selection enable flag; The control flag is set in at least one of the sequence header, image header, slice header, and coding unit syntax set of the bitstream.
11. A method for determining motion information, characterized in that, include: For each offset direction in the offset direction set and each offset distance in the offset distance set, offset each candidate in the basic motion information prediction candidate list according to the offset direction and the offset distance to obtain a new motion information candidate list; The first motion information candidate list is determined based on the template cost between the current image unit and each candidate in the motion information candidate list; Target motion information candidates are determined from the first motion information candidate list, wherein the target motion information is the motion information of the current image unit.
12. The method according to claim 11, characterized in that, Determining target motion information candidates from the first motion information candidate list includes: Motion offset is performed sequentially on each candidate in the first motion information candidate, and the rate-distortion cost corresponding to each candidate is calculated. The first motion information candidate with the best rate-distortion cost is selected as the target motion information candidate.
13. The method according to claim 11, characterized in that, Also includes: Construct a candidate list for basic motion information prediction; The motion information prediction candidates in the basic motion information prediction candidate list include at least one of the following: Spatial adjacency candidates; temporal candidates with the same position; motion information prediction candidates based on historical information; candidates based on motion information angle prediction; spatial candidates from the boundary of the largest coding unit; Candidates for unidirectional zero-motion information; candidates for bidirectional zero-motion information.
14. The method according to claim 11, characterized in that, The length of the candidate list for basic motion information prediction is less than or equal to the maximum length limit; or... The length of the basic motion information prediction candidate list is the total number of candidates for the current image unit.
15. The method according to claim 11 or 12, characterized in that, Before determining the first motion information candidate list based on the template cost between the current image unit and each candidate in the motion information candidate list, the method further includes: Perform a duplicate check on at least one of the following candidates to remove duplicate candidates: Candidates in the motion information candidate list; Candidates from the basic motion information prediction candidate list; Candidates are obtained based on the offset distance and the offset direction; Candidates are obtained based on a specified offset distance and a specified offset direction, wherein the index of the specified offset distance is not greater than the index of the offset distance of the current image unit motion information, and the index of the specified offset direction is not greater than the index of the offset direction of the current image unit motion information.
16. The method according to claim 11, characterized in that, The template for the current image unit is the surrounding reconstructed region of the current image unit, and the template for the candidate is the surrounding reconstructed region of the reference image unit to which the candidate points. For any image unit, the surrounding reconstructed region includes at least one of the following: The image unit is directly above a single or multiple rows of reconstructed pixel regions; The image unit has a single or multiple columns of reconstructed pixel regions on its left side; The image unit's upper left corner is a single-row, single-column, or multi-row, multi-column reconstructed pixel region; The image unit has a single or multiple rows of reconstructed pixel regions in the upper right corner; The image shows a single or multiple column reconstructed pixel area in the lower left corner of the single pedal.
17. The method according to claim 11, characterized in that, The template cost is calculated in at least one of the following ways: sum of absolute errors (SAD), sum of squared differences (SSD), sum of absolute values after Hadamard transformation (SATD), sum of squared errors (SSE), mean absolute difference (MAD), mean absolute error (MAE), mean squared error (MSE), and mean relative difference sum of squared values (MRSAD).
18. The method according to claim 11, characterized in that, Also includes: If the number of the first motion information candidates is greater than 1, the offset direction, offset distance, and motion information candidate index corresponding to the target motion information candidate are encoded into the bitstream.
19. The method according to claim 11, characterized in that, The inter-frame prediction mode applied by the method includes at least one of the following: The high-level motion information representation (UMVE) mode in skip mode, the direct prediction UMVE mode, the affine transformation-based UMVE mode, the merged MMVD mode with motion information difference, the affine transformation-based MMVD mode, and the intra-block copying MMVD mode.
20. The method according to claim 11, characterized in that, The current image unit and the candidate reference image unit each satisfy at least one of the following: The area is greater than or equal to the first predetermined value; The area is smaller than the second predetermined value; Both length and width are greater than or equal to the third predetermined value; Both the length and width are less than the fourth predetermined value.
21. The method according to claim 11, characterized in that, Also includes: Determine the enable status of the control flags for the bitstream; The control flags include the UMVE enable flag and the UMVE coarse selection enable flag; The control flags are set in at least one of the sequence header, image header, slice header, and coding unit syntax set of the bitstream.
22. An electronic device, characterized in that, include: Memory, and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the motion information determination method as described in any one of claims 1-21.
23. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the motion information determination method as described in any one of claims 1-21.