Inter-frame coding motion vector processing method and device

By constructing a target merge table, the merged motion vector information is directly read from the table, which solves the problem of the long calculation time of the traditional inter-encoded motion vector merge mode and improves the coding efficiency.

CN118784836BActive Publication Date: 2025-08-12GLENFLY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410882714.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-08-12
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

The traditional inter-frame encoding motion vector merge mode calculation method requires a large number of iterative comparison operations, resulting in too long encoding time and low encoding efficiency, especially when the complexity of video content increases, the problem is more significant.

Method used

By constructing a target merge table, the position number of the estimated motion vector and the corresponding merged motion vector information are stored in advance, and the merged motion vector information is read directly from the target merge table in the motion vector search stage, reducing the number of comparisons between the estimated motion vector and the candidate motion vector.

Benefits of technology

Improves the computing efficiency in the inter-frame encoding merge mode, reduces encoding time, and improves encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784836B_ABST
    Figure CN118784836B_ABST
Patent Text Reader

Abstract

The present application relates to a method and apparatus for processing inter-frame coded motion vectors. The method comprises: obtaining an estimated motion vector and a position number of the estimated motion vector between a current coded image block and a reference frame coded image block; reading merged motion vector information corresponding to the position number from a target merge table based on the position number of the estimated motion vector; the target merge table includes the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector; and encoding the merged motion vector information by replacing the estimated motion vector with the corresponding position number. This method can reduce the time spent determining candidate motion vectors in inter-frame video coding merge mode and improve computational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video coding technology, and in particular to a method and device for processing inter-frame coding motion vectors. Background Art

[0002] With the increasing popularity of ultra-high-definition video content, the amount of video encoding data continues to increase. The merge mode in inter-frame estimation can reduce the amount of encoding of the estimated motion vector (est_mv) data of the current block by referencing the motion information of already encoded neighboring blocks, thereby reducing redundant encoding information and improving encoding efficiency. Testing has shown that enabling merge mode can improve encoding efficiency by approximately 2.5% on average.

[0003] In High Efficiency Video Coding (HEVC), the merge mode generates seven motion vector prediction values based on the coded adjacent blocks of the current frame and the coded frame before the motion vector search. Five motion vector prediction values are selected as candidate motion vectors (cand_mv) for the merge according to the priority provisions in the protocol. These are input into the integer pixel motion vector search unit in order of priority, and the optimal merge motion vector (merge motion vector, merge_mv) is selected through iterative comparison in the motion vector search unit.

[0004] In traditional techniques, integer-pixel search for motion estimation requires a merge comparison. To balance search speed and search result accuracy, the search is typically performed within an 8x8 range. Each est_mv within the 8x8 search range is independently compared with the five cand_mvs in the merge candidate list. For an 8x8 est_mv, each est_mv requires five cycles, resulting in 320 cycles for merge comparisons across the entire search area. Even with parallel computation of adjacent est_mvs, this still requires 160 cycles. Testing of this traditional integer-pixel search showed that when the minimum coding unit (CU) partitioning was used, the integer-pixel search phase for a CU block took approximately 237 cycles, with merge comparisons accounting for approximately 67% of the time. When the maximum CU partitioning was used, the integer-pixel search phase for a CU block took approximately 412 cycles, with merge comparisons accounting for approximately 39%.

[0005] Obviously, the traditional merge mode calculation method requires a large number of iterative comparison operations, which takes a long encoding time. As the complexity of the video content increases, the operation will become more time-consuming, resulting in low encoding efficiency. Summary of the Invention

[0006] Based on this, it is necessary to provide an inter-frame coded motion vector processing method and device that can reduce the time consumption of inter-frame coded motion vector merge decision and improve calculation efficiency in response to the above technical problems.

[0007] In a first aspect, the present application provides a method for processing inter-frame coded motion vectors, the method comprising:

[0008] A method for processing inter-frame coding motion vectors, the method comprising:

[0009] Obtaining an estimated motion vector between a current coded image block and a reference frame coded image block and a position number of the estimated motion vector;

[0010] According to the position number of the estimated motion vector, reading the merged motion vector information corresponding to the position number from the target merge table; the target merge table includes the relationship between the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector;

[0011] The merged motion vector information is used to replace the estimated motion vector of the corresponding position number, and the merged motion vector information is encoded.

[0012] In one embodiment, the target candidate motion vector information carries a number; and the target merge table is constructed by:

[0013] Get the search scope;

[0014] Obtaining the target candidate motion vector information from the candidate list in order of numbers;

[0015] For each target candidate motion vector information within the search range, if a preset condition is met, obtaining merged motion vector information corresponding to the target candidate motion vector information, wherein the merged motion vector information is determined based on a position number of the estimated motion vector;

[0016] A target merge table is obtained according to each target candidate motion vector information and the merged motion vector information corresponding to each target candidate motion vector information. The size of the target merge table is the same as the search range.

[0017] In one embodiment, obtaining the merged motion vector information corresponding to the target candidate motion vector information includes:

[0018] Perform pixel component determination on the target candidate motion vector information;

[0019] Based on the judgment result of the pixel component, the merged motion vector information corresponding to the target candidate motion vector information is determined.

[0020] In one embodiment, the target candidate motion vector information includes a first component and a second component; and determining the merged motion vector information corresponding to the target candidate motion vector information based on the judgment result of the sub-pixel component includes:

[0021] If both the first component and the second component are sub-pixel components, obtaining position numbers of a first number of estimated motion vectors within the neighborhood of the target candidate motion vector information;

[0022] Marking the position numbers of the first number of the estimated motion vectors as merged motion vector information;

[0023] If only one of the first component and the second component is a sub-pixel component, obtaining position numbers of a second number of estimated motion vectors within the neighborhood of the target candidate motion vector information; wherein the first number is greater than the second number;

[0024] marking position numbers of the second number of the estimated motion vectors as merged motion vector information;

[0025] If neither the first component nor the second component is a sub-pixel component, the position number of the estimated motion vector corresponding to the target candidate motion vector information is obtained and marked as merged motion vector information.

[0026] In one embodiment, obtaining a target merge table according to each target candidate motion vector information and the merged motion vector information corresponding to each target candidate motion vector information includes:

[0027] Sequentially acquiring the target candidate motion vector information and the position numbers of the estimated motion vectors in the neighborhood of the target candidate motion vector information in order of numbers;

[0028] Obtaining a position number of an estimated motion vector in a neighborhood of each historical candidate motion vector information of the target candidate motion vector information;

[0029] determining whether a position number of an estimated motion vector in a neighborhood of the target candidate motion vector information overlaps with a position number of an estimated motion vector in a neighborhood of each historical candidate motion vector information; if the position numbers overlap, taking the overlapping estimated motion vector as the first estimated motion vector;

[0030] If the position numbers do not overlap, the non-overlapping estimated motion vector is used as the second estimated motion vector;

[0031] The first estimated motion vector is iteratively saved and the second estimated motion vector is iteratively saved to obtain an initial merge table, until all target candidate motion vector information in the candidate list is saved to obtain a target merge table.

[0032] In one embodiment, the iteratively saving the first estimated motion vector and the saving the second estimated motion vector to obtain an initial merge table includes:

[0033] The target candidate motion vector information is saved using the iterated position number of the first estimated motion vector and the position number of the second estimated motion vector in the neighborhood of the target candidate motion vector information as indexes to obtain an initial merge table.

[0034] In one embodiment, the target candidate motion vector information includes a target merge type and a target distance; and before using the position number of the iterated first estimated motion vector within the neighborhood of the target candidate motion vector information as an index, the method includes:

[0035] When the search range is an integer pixel search range, reading a first merge type and a first distance corresponding to the first estimated motion vector from the initial merge table; wherein the first merge type is determined based on each historical candidate motion vector information of the target candidate motion vector information; and the first distance indicates a distance between each historical candidate motion vector of the target candidate motion vector information and the estimated motion vector;

[0036] Determining the priority of the target merge type and the first merge type;

[0037] If the priority of the target merge type is higher than the priority of the first merge type, replacing the first merge type with the target merge type, and replacing the first distance with the target distance, to obtain the first estimated motion vector after iteration;

[0038] If the priority of the target merge type is equal to the priority of the first merge type, determining whether the target distance is less than a first distance; wherein the target distance indicates the distance between the target candidate motion vector and the estimated motion vector;

[0039] If the target distance is smaller than the first distance, the first distance is replaced by the target distance to obtain the first estimated motion vector after iteration.

[0040] In one embodiment, the target candidate motion vector information includes a target merge type; and before using the position number of the iterated first estimated motion vector within the neighborhood of the target candidate motion vector information as an index, the method includes:

[0041] When the search range is a sub-pixel search range, a first merge type corresponding to the first estimated motion vector is read from the initial merge table; the first merge type is determined based on each historical candidate motion vector information of the target candidate motion vector information;

[0042] Determining the priority of the target merge type and the first merge type;

[0043] If the priority of the target merge type is higher than the priority of the first merge type, the first merge type is replaced with the target merge type to obtain the first estimated motion vector after iteration.

[0044] In one embodiment, the method further comprises:

[0045] Get a new search scope;

[0046] The size of the target merge table is determined according to the new search range.

[0047] In a second aspect, the present application provides an inter-frame coding motion vector processing device, the device comprising:

[0048] A first acquisition module is configured to acquire an estimated motion vector between a current coded image block and a reference frame coded image block and a position number of the estimated motion vector;

[0049] a reading module, configured to read, from a target merging table, the merged motion vector information corresponding to the position number of the estimated motion vector according to the position number of the estimated motion vector; the target merging table including the relationship between the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector;

[0050] The replacement encoding module is used to replace the estimated motion vector of the corresponding position number with the merged motion vector information, and encode the merged motion vector information.

[0051] The above-mentioned inter-frame coding motion vector processing method and device, by, in the merge mode of inter-frame coding, before encoding the estimated motion vector, prepending the candidate vector comparison, directly reads the merged motion vector information corresponding to the position number from the target merge table according to the position number of the estimated motion vector in the motion vector search stage; the target merge table pre-stores the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector, thereby reducing the time spent on comparing each estimated motion vector with each candidate motion vector, thereby improving the coding efficiency in the merge mode of inter-frame coding. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 A diagram illustrating an application environment of a method for processing inter-frame coding motion vectors in one embodiment;

[0054] Figure 2 1 is a flow chart of a method for processing inter-frame coding motion vectors according to an embodiment;

[0055] Figure 3 a is a schematic diagram of an integer pixel target merging table in one embodiment;

[0056] Figure 3 b is a schematic diagram of a sub-pixel target merging table in another embodiment;

[0057] Figure 4 A schematic diagram of a process for constructing a target merge table in one embodiment;

[0058] Figure 5 is a schematic diagram of merge mv corresponding to cand-mv in another embodiment;

[0059] Figure 6 A schematic diagram of a process for obtaining merged motion vector information corresponding to target candidate motion vector information in one embodiment;

[0060] Figure 7 1. A schematic diagram of a process for determining merged motion vector information corresponding to target candidate motion vector information based on a sub-pixel component judgment result in one embodiment;

[0061] Figure 8 A schematic diagram of constructing a target merge table in another embodiment;

[0062] Figure 9 Schematic diagram of an entire pixel loop iteration in one embodiment;

[0063] Figure 10 A schematic diagram of a process of iterating the first estimated motion vector in the initial merge table in one embodiment;

[0064] Figure 11 1. It is a schematic diagram of a flow chart for iteratively dividing a first estimated motion vector in a real-time example;

[0065] Figure 12 A schematic diagram of a flow chart of iterating the first estimated motion vector in the initial merge table in another embodiment;

[0066] Figure 13 Schematic diagram of the overall pixel-by-pixel loop iteration process in one embodiment;

[0067] Figure 14 A schematic diagram of a flow chart of inter-frame coding motion vector processing in another embodiment;

[0068] Figure 15 is a structural block diagram of an inter-frame coding motion vector processing device in one embodiment;

[0069] Figure 16 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0071] Predictive coding primarily involves two parts: intra-frame coding and inter-frame coding. Intra-frame coding involves compressing a single frame without relying on information from other frames; each frame is encoded independently. Inter-frame coding is a video compression technique used to reduce video file size. It exploits redundant information between video frames, using reference to other frames (typically preceding and following frames) for compression.

[0072] In inter-frame coding, motion estimation is required. Figure 1 As shown, the lower layer refers to the previous frame image, which can also be the reference frame image, and the upper layer is the current frame image. In these two frames, the circular pattern moves from the left side of the image to the right side of the image. This displacement is called a motion vector.

[0073] Typically, motion vectors are estimated by dividing an image into blocks, each consisting of multiple pixels. Since the motion between two frames is relatively small, the reference frame's coded block is likely to be located near the current frame's coded block. Typically, an integer pixel search is performed within an 8x8 pixel range, resulting in 64 estimated motion vectors. This shows that motion vectors can be determined without using merge mode.

[0074] The significance of the merge mode is that, if Figure 1 As shown in the figure, if the motion vector of block 1 has been determined, then this motion vector, after certain calculations, is used as a candidate motion vector for block 2. When estimating the block pointed to by the motion vector in the previous frame and comparing it to the closest block, if a merge motion vector exists for the estimated motion vector, the merge motion vector number is used to replace the estimated motion vector. As you can imagine, directly encoding an estimated motion vector requires much more code than encoding the merge motion vector number. Therefore, merge mode can reduce the code size and thus improve coding efficiency.

[0075] In Merge mode, before the motion vector search, 7 motion vector prediction values are generated based on the encoded adjacent blocks of the current frame and the adjacent blocks of the encoded frame. Five motion vector prediction values are selected as candidate motion vectors (cand_mv) for merge according to the priority provisions in the protocol. They are input into the integer pixel motion vector search unit in order of priority, and an iterative comparison is performed in the motion vector search unit to select the optimal merge motion vector (merge motion vector, merge_mv).

[0076] During the whole-pixel search for motion estimation, a merge determination operation is required. To balance search speed and search result accuracy, each est_mv within the 8*8 search range is independently compared with the five cand_mv in the merge candidate list. However, this merge comparison process takes too long during motion estimation. Therefore, a target merge table is constructed to store the position number of the estimated motion vector and the merged motion vector information corresponding to the position number in the target merge table. During the motion vector search phase, the merged motion vector information in the target merge table is read based on the position number of the estimated motion vector, without consuming additional cycles.

[0077] In an exemplary embodiment, Figure 2 As shown, a method for processing inter-frame coding motion vectors is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the method, which includes the following steps S202 to S206.

[0078] Step S202: Obtain an estimated motion vector and a position number of the estimated motion vector between the current coded image block and the reference frame coded image block.

[0079] Optionally, the server obtains an estimated motion vector between the current coded image block and the reference frame coded image block, where the current coded image block is located in the current frame. Typically, an integer pixel search is performed within an 8x8 range, resulting in 64 estimated motion vectors. Each estimated motion vector is assigned a position number. The position number can be used to determine the location of each estimated motion vector. For example, with the upper left corner as the coordinate axis origin, the horizontal axis (X-axis) is 1-8 from left to right, and the vertical axis (Y-axis) is 1-8 from top to bottom. The position number of each estimated motion vector can be represented by (X, Y) coordinates or other symbols. For example, within an 8x8 range, the first row can be numbered A1-A8; the second row can be numbered B1-B8, and so on to identify the position numbers of the 64 estimated motion vectors. The position numbering can be in any reasonable format and is not specifically limited here.

[0080] Step S204, according to the position number of the estimated motion vector, read the merged motion vector information corresponding to the position number from the target merge table; the target merge table includes the relationship between the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector.

[0081] The target merge table includes the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector. The target merge table can be either an integer pixel target merge table or a sub-pixel target merge table. The target merge table has pre-stored all the merge candidate vector information within the search range in the candidate list.

[0082] Optionally, the above coordinates are used as an example to represent the position number, such as Figure 3 a is the target merge table for integer pixels, and the merged motion vector information of the estimated candidate vector with position number (5, 3) is 1.

[0083] like Figure 3 b is the target merge table for each pixel. With the upper left corner as the coordinate axis origin, within the 8*8 area, the horizontal coordinates from left to right are 1 / 4-2, and the vertical coordinates are similar. For example, the merged motion vector information corresponding to the position number (5 / 4, 1) is 2.

[0084] Alternatively, in integer pixel object merging, e.g. Figure 3In a, the server can read the merged motion vector information 1 corresponding to (5,3) from the integer pixel target merge according to the position number of the estimated motion vector, for example (5,3).

[0085] Optionally, in sub-pixel target merging, e.g. Figure 3 In b, the server can read the merged motion vector information 2 corresponding to (5 / 4, 1) from the integer pixel target merge according to the position number of the estimated motion vector, for example (5 / 4, 1).

[0086] Step S206 : Replace the estimated motion vector of the corresponding position number with the merged motion vector information, and encode the merged motion vector information.

[0087] Optionally, since directly encoding an estimated motion vector is definitely much larger than the amount of code used to encode the number of the merge motion vector, the server replaces the estimated motion vector of the corresponding position number with the merged motion vector information and encodes the merged motion vector information. Therefore, the merge mode can reduce the amount of code, thereby improving coding efficiency.

[0088] In the above-mentioned inter-frame coding motion vector processing method, by prepending the candidate vector comparison before encoding the estimated motion vector in the merge mode of inter-frame coding, in the motion vector search stage, according to the position number of the estimated motion vector, the merged motion vector information corresponding to the position number is directly read from the target merge table; the target merge table pre-stores the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector, which reduces the time spent on comparing each estimated motion vector with each candidate motion vector, thereby improving the computational efficiency in the merge mode of inter-frame coding.

[0089] In an exemplary embodiment, Figure 4 As shown, the target candidate motion vector information carries a number; the target merging table is constructed in a manner including steps S402 to S408.

[0090] Step S402: Obtain the search range.

[0091] The search range may be a whole pixel search range or a sub-pixel search range.

[0092] Optionally, the server obtains the search range of integer pixels. Assuming that the search range of integer pixels is an 8*8 area and an area smaller than 1 pixel around it, the search range is recorded as ({0 <mvx<9},{0<mvy<9})。

[0093] Optionally, the server obtains a search range of integer pixels such as ({0≤mvx<2},{0≤mvy<2}).

[0094] Step S404: obtaining target candidate motion vector information from the candidate list in order of number.

[0095] The candidate motion vector can be a quarter pixel or an eighth pixel, that is, the candidate motion vector can be a sub-pixel. If the search range of the candidate motion vector is an integer pixel search range, a corresponding integer pixel target merging table is constructed; if the search range of the candidate motion vector is a sub-pixel search range, a corresponding sub-pixel target merging table is constructed.

[0096] In actual applications, for a prediction coding unit, a maximum of five candidate motion vector information cand_mv are stored in the candidate list, namely cand_mv1, cand_mv2, cand_mv3, cand_mv4 and cand_mv5.

[0097] Optionally, the server obtains the target candidate motion vector information in sequence according to the numbering order. The target candidate motion vector information may be any candidate motion vector information in the candidate list, such as cand_mv1, or other candidate motion vector information.

[0098] In practical applications, increasing the number of cand_mvs is a way to improve the probability of est_mv merges. The increase in cand_mvs can be adaptive. In traditional processing, if the number of cand_mvs increases by one, the merge iteration comparison time increases by 32 cycles, significantly increasing the total inter-frame estimation time. However, this embodiment consumes almost no additional time, reducing the impact of expanding the number of cand_mvs on peripheral module timing.

[0099] Step S406 : for each target candidate motion vector information within the search range, if a preset condition is met, obtain the merged motion vector information corresponding to the target candidate motion vector information, wherein the merged motion vector information is determined based on the position number of the estimated motion vector.

[0100] The merged motion vector information is determined based on the position number of the estimated motion vector. A preset condition may be that the merge type number of cand_mv is greater than 0.

[0101] Merge types are categorized as half, rectangular, and square. Each prediction coding unit (PCU) can be a half-merge. A rectangular-divided PU can be a rectangular merge, and a square PU can be a square merge. Half-merge has lower priority than rectangular and square merges. Merge types are numbered based on their priority.

[0102] Table 1 Numbers of merge types

[0103]

[0104] Optionally, the server makes the following judgment on cand_mv1, that is, judges whether the two components mvx and mvy of cand_mv1 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). If within this range, then judge whether cand_mv1 meets the preset condition. For example, the preset condition can be that the number of the merge type of cand_mv1 is greater than 0. If cand_mv1 also meets the preset condition, then obtain the merge motion vector information corresponding to cand_mv1, and at this time, save the merge motion information corresponding to cand_mv1.

[0105] Optionally, after the server saves the merge motion information corresponding to cand_mv1, the target candidate motion vector information is cand_mv2 at this time. Then continue to judge whether the two components mvx and mvy of cand_mv2 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). If within this range, then judge whether cand_mv2 meets the preset condition. For example, the preset condition can be that the number of the merge type of cand_mv1 is greater than 0. If cand_mv2 also meets the preset condition, then obtain the merge motion vector information corresponding to cand_mv2, and at this time, save the merge motion information corresponding to cand_mv2.

[0106] Step S408: Obtain a target merge table according to each target candidate motion vector information and the merge motion vector information corresponding to each target candidate motion vector information. The size of the target merge table is the same as the search range.

[0107] Among them, the size of the target merge table is the same as the search range, that is, the target merge table and the motion vector search points are in one-to-one correspondence.

[0108] Optionally, the server saves 5 target candidate motion vector information and the merge motion vector information corresponding to each target candidate motion vector information in sequence according to the number order to obtain the target merge table.

[0109] Such as Figure 5As shown, assume that the type numbers of all cand_mv are greater than 0; the server sequentially obtains cand_mv1, and determines whether the two components mvx and mvy of cand_mv1 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). If within this range and cand_mv1 meets the preset conditions, then obtain the merged motion vector information corresponding to cand_mv1. At this time, there are 4 pieces of merged motion information corresponding to cand_mv1, and the server saves the 4 pieces of merged motion information in parallel.

[0110] The server obtains cand_mv2, and determines whether the two components mvx and mvy of cand_mv2 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). If within this range and cand_mv2 meets the preset conditions, then obtain the merged motion vector information corresponding to cand_mv2. At this time, there are 2 pieces of merged motion information corresponding to cand_mv2, and the server saves the 2 pieces of merged motion information in parallel.

[0111] The server obtains cand_mv3, and determines whether the two components mvx and mvy of cand_mv3 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). cand_mv3 is not within this range, so cand_mv3 is excluded.

[0112] The server obtains cand_mv4, and determines whether the two components mvx and mvy of cand_mv4 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). If within this range and cand_mv4 meets the preset conditions, then obtain the merged motion vector information corresponding to cand_mv4. At this time, there is 1 piece of merged motion information corresponding to cand_mv4.

[0113] The server obtains cand_mv5, and determines whether the two components mvx and mvy of cand_mv5 belong to the search range ({0 < mvx < 9}, {0 < mvy < 9}). If within this range and cand_mv5 meets the preset conditions, then obtain the merged motion vector information corresponding to cand_mv5. At this time, there are 2 pieces of merged motion information corresponding to cand_mv5, and the server saves the 2 pieces of merged motion information in parallel. When all cand_mv within the search range have been saved, a target merged table is generated.

[0114] Optionally, if the number of Cand_mv increases, then correspondingly obtain the merged motion vector information corresponding to the increased Cand_mv.

[0115] In this embodiment, by obtaining candidate motion vectors in sequence, and judging the range and preset conditions of the candidate motion vectors, when all are met, the merged motion vector information corresponding to the candidate motion vector is obtained, and a target merge table is generated. When the target merge table is used subsequently, the comparison between each estimated motion vector and each candidate motion vector is reduced, thereby improving the computational efficiency of the merge mode.

[0116] In an exemplary embodiment, Figure 6 As shown, obtaining the merged motion vector information corresponding to the target candidate motion vector information includes steps S602 to S604.

[0117] Step S602: performing pixel component determination on the target candidate motion vector information.

[0118] The target candidate motion vector information itself may be a decimal, that is, a sub-pixel component, and the target candidate motion vector information may include an X-axis component mvx and a Y-axis component mvy.

[0119] Optionally, the server determines mvx and mvy of the target candidate motion vector information in parallel.

[0120] Step S604 : determining the merged motion vector information corresponding to the target candidate motion vector information based on the judgment result of the sub-pixel component.

[0121] The judgment result may be that mvx is a sub-pixel component, or mvy is a sub-pixel component; it is also possible that mvx and mvy are both sub-pixel components; it is also possible that neither mvx nor mvy is a sub-pixel component.

[0122] Optionally, the server obtains different amounts of merged motion vector information based on the judgment results of mvx and mvy.

[0123] In this embodiment, the combined motion vector information corresponding to the target candidate motion vector information is determined by using the judgment results of the sub-pixel components with different precisions, which can improve the accuracy of the obtained combined motion vector information.

[0124] Following the previous exemplary embodiment, Figure 7 As shown, the target candidate motion vector information includes a first component and a second component; based on the judgment result of the sub-pixel component, determining the merged motion vector information corresponding to the target candidate motion vector information includes steps S702 to S710.

[0125] Step S702: If both the first component and the second component are sub-pixel components, obtain position numbers of a first number of estimated motion vectors within the target candidate motion vector information neighborhood.

[0126] The first component can be an X-axis component or a Y-axis component. If the first component is an X-axis component, the corresponding second component is a Y-axis component.

[0127] Alternatively, assuming a 4-neighborhood search, when mvx and mvy are both pixel components, such as Figure 5 In cand_mv1, the server obtains the position numbers of the four estimated motion vectors in the neighborhood of the target candidate motion vector information.

[0128] Optionally, if it is another type of neighborhood search, the server obtains the position numbers of corresponding estimated motion vectors in the neighborhood of the target candidate motion vector information.

[0129] Step S704: Mark the position numbers of the first number of estimated motion vectors as merged motion vector information.

[0130] Optionally, when mvx and mvy of cand_mv are both sub-pixel components, the four estimated motion vectors est_mv marked in the merge table are:

[0131]

[0132]

[0133]

[0134]

[0135] Among them, mvx and mvy are fixed-point decimals, the lower two digits are decimal places, and offset is the horizontal search width.

[0136] Step S706 : If only one of the first component and the second component is a sub-pixel component, obtain position numbers of a second number of estimated motion vectors within the target candidate motion vector information neighborhood; wherein the first number is greater than the second number.

[0137] The first number is greater than the second number, that is, when mvx and mvy of cand_mv are both sub-pixel components, the data of the estimated motion vector in the neighborhood of cand_mv is greater than the data of the estimated motion vector corresponding to only one sub-pixel component of mvx and mvy of cand_mv.

[0138] Alternatively, if there is only one sub-pixel component in mvx and mvy, such as Figure 5 The server obtains the position numbers of the second number of estimated motion vectors in the neighborhood of the target candidate motion vector information.

[0139] Step S708: Mark the position numbers of the second number of estimated motion vectors as merged motion vector information.

[0140] Optionally, the server obtains two est_mvs in the neighborhood and marks them as merge_mv.

[0141] Step S710 : If both the first component and the second component are not sub-pixel components, obtain the position number of the estimated motion vector corresponding to the target candidate motion vector information and mark it as merged motion vector information.

[0142] Alternatively, if there is no pixel component in mvx and mvy, that is, if cand_mv is equal to some est_mv, such as Figure 5 cand_mv4 in the , marks the estimated motion vector as merged motion vector information.

[0143] In this embodiment, by determining the pixel components, different numbers of estimated motion vectors can be obtained, and these estimated motion vectors are recorded as merged motion vector information, so that the merged motion vector information of the estimated motion vectors can be read from the target merge table later.

[0144] In an exemplary embodiment, Figure 8 As shown, according to each target candidate motion vector information and the merged motion vector information corresponding to each target candidate motion vector information, a target merge table is obtained, including steps S802 to S804.

[0145] Step S802 : obtaining target candidate motion vector information and position numbers of estimated motion vectors in the neighborhood of the target candidate motion vector information in sequence according to the order of numbers.

[0146] Optionally, when the target candidate motion vector information is not the last one, the server obtains the target candidate motion vector information in sequence according to the order of the numbers, such as cand_mv1, and the position number of the estimated motion vector est_mv in the neighborhood of the target candidate motion vector information cand_mv1.

[0147] Get the initial merge table; the server continues to obtain cand_mv2 and the position number of est_mv in the neighborhood of cand_mv2 to get the updated initial merge table. At this time, the initial merge table contains both cand_mv1 information and cand_mv2, and so on. Continue to execute the steps.

[0148] Step S804 : obtaining the position number of the estimated motion vector in the neighborhood of each historical candidate motion vector information of the target candidate motion vector information.

[0149] Optionally, the historical candidate motion vector information of the target candidate motion vector information, if the target candidate motion vector information is cand_mv2, the historical candidate motion vector information is cand_mv1; if the target candidate motion vector information is cand_mv3, the historical candidate motion vector information is cand_mv2 and cand_mv1; and so on.

[0150] Step S806, determine whether the position number of the estimated motion vector in the neighborhood of the target candidate motion vector information overlaps with the position number of the estimated motion vector in the neighborhood of each historical candidate motion vector information. If the position numbers overlap, the overlapping estimated motion vector is used as the first estimated motion vector.

[0151] Optionally, if the target candidate motion vector information is cand_mv2, the historical candidate motion vector information is cand_mv1. Figure 9 As shown, the position numbers of the four estimated motion vectors in the neighborhood of cand_mv2 are (6,3) (7,3) (7,4) (6,4) respectively; at this time, the information of cand_mv1 has been stored in the initial merge table.

[0152] Optionally, the server obtains the position numbers of the four estimated motion vectors in the neighborhood of cand_mv1 as (5, 3), (6, 3), (6, 4), and (5, 4). The positions (6, 3) and (6, 4) where cand_mv1 and cand_mv2 overlap are the two first estimated motion vectors.

[0153] Step S808: If the position numbers do not overlap, the non-overlapping estimated motion vector is used as the second estimated motion vector.

[0154] Optionally, if there is no overlap in the position numbers, the server uses the non-overlapping estimated motion vector as the second estimated motion vector. Figure 9 As shown, (7,3) (7,4) are the estimated motion vectors that do not overlap with cand_mv2, that is, the second estimated motion vector.

[0155] Step S810 , iteratively save the first estimated motion vector and save the second estimated motion vector to obtain an initial merge table, until all target candidate motion vector information in the candidate list is saved to obtain a target merge table.

[0156] Optionally, when the target candidate motion vector information is not the last one, the server obtains the target candidate motion vector information in order of numbering. For example, if the first target candidate motion vector information is cand_mv1, there is no historical candidate motion vector information at this time, so the estimated motion vectors in the neighborhood of the target candidate motion vector information cand_mv1 are all the second estimated motion vectors; the position number of the second estimated motion vector est_mv is obtained to obtain the initial merge table. The server continues to obtain cand_mv2, the position numbers of the first estimated motion vector est_mv and the second estimated motion vector est_mv in the neighborhood of cand_mv2, and obtains an updated initial merge table. At this time, the initial merge table contains both cand_mv1 information and cand_mv2, and the steps are continued in this order. Until the last target candidate motion vector information in the candidate list is saved, the target merge table is obtained.

[0157] Optionally, the server iteratively saves the first estimated motion vector while saving the second estimated motion vector. The server processes the first estimated motion vector and the second estimated motion vector in parallel and saves them to the initial merge table, thereby improving efficiency.

[0158] Optionally, if the number of cand_mvs is expanded to 6, the target merge table is obtained when the sixth cand_mv information is saved. The number of cand_mvs can be expanded based on actual needs and is not limited here. This embodiment consumes almost no additional time and reduces the impact of the expansion of the number of cand_mvs on the timing of peripheral modules.

[0159] In this embodiment, the first estimated motion vector in the initial table is iterated until all target candidate motion vector information in the candidate list is completed, and the comparison of each cand_mv is regarded as a cycle. Only cand_mv cycles are required to obtain the target merge table, which can flexibly expand the number of cand_mv with almost no additional time consumption, thereby reducing the impact on the timing of peripheral modules when the number of cand_mv is expanded.

[0160] In an exemplary embodiment, the first estimated motion vector is iteratively saved and the second estimated motion vector is saved to obtain an initial merge table, including: using the position number of the iterated first estimated motion vector and the position number of the second estimated motion vector within the neighborhood of the target candidate motion vector information as indexes, saving the target candidate motion vector information, and obtaining the initial merge table.

[0161] Optionally, if the target candidate motion vector information is not the last one, the server first creates an empty table with the same size as the search range. The server uses the position number of the estimated motion vector in the neighborhood of cand_mv1 as an index and saves cand_mv1 to the empty table to obtain the initial merged table. The server then uses the position number of the first and second estimated motion vectors after iteration in the neighborhood of cand_mv2 as indexes and updates cand_mv2 to the initial merged table. The server then uses the position number of the first and second estimated motion vectors after iteration in the neighborhood of cand_mv3 as indexes and updates cand_mv3 to the initial merged table. This continues until the last cand_mv is updated, obtaining the target merged table.

[0162] In this embodiment, by using the estimated motion vector position number as an index to save the target candidate motion vector information, the relationship between the motion vector position number and the target candidate motion vector information can be obtained. This relationship can then be used during the subsequent motion vector search process to obtain the merged motion vector information.

[0163] In an exemplary embodiment, Figure 10 As shown, the target candidate motion vector information includes the target merge type and the target distance; before the position number of the first estimated motion vector after iteration in the neighborhood of the target candidate motion vector information is used as the index, steps S1002 to S1010 are included.

[0164] Step S1002, when the search range is an integer pixel search range, read the first merge type and the first distance corresponding to the first estimated motion vector from the initial merge table; wherein the first merge type is determined based on the historical candidate motion vector information of the target candidate motion vector information; the first distance indicates the distance between the historical candidate motion vectors of the target candidate motion vector information and the estimated motion vector.

[0165] The first merge type is determined based on the historical candidate motion vector information of the target candidate motion vector information; the first distance indicates the distance between the historical candidate motion vector of the target candidate motion vector information and the estimated motion vector. When the estimated motion vector in the neighborhood of the target candidate motion vector information coincides with the estimated motion vector in the neighborhood of each historical candidate motion vector information of the target candidate motion vector information, the coincident estimated motion vector can be used as the first estimated motion vector. Figure 9As shown, the positions of the four estimated motion vectors in the neighborhood of cand_mv1 are numbered as (5,3) (6,3) (6,4) (5,4); the positions of the four estimated motion vectors in the neighborhood of cand_mv2 are numbered as (6,3) (7,3) (7,4) (6,4); the overlapping (6,3) (6,4) of cand_mv1 and cand_mv2 are the two first estimated motion vectors; (7,3) (7,4) is the second estimated motion vector. The positions of the four estimated motion vectors in the neighborhood of cand_mv3 are numbered as (4,4) (5,4) (5,5) (4,5); the overlapping (5,4) of cand_mv1 and cand_mv3 is also the first estimated motion vector, and (4,4) (5,5) (4,5) is the second estimated motion vector.

[0166] Optionally, in actual applications, the candidate list stores at most 5 candidate motion vector information cand_mv, namely cand_mv1, cand_mv2, cand_mv3, cand_mv4 and cand_mv5. Assume that the relevant information of cand_mv1 has been stored in the initial merge, including the merge type and distance. At this time, the server obtains the estimated motion vector in the neighborhood of cand_mv2, which coincides with the estimated motion vector in the neighborhood of cand_mv2, such as Figure 9 As shown, (6,3) and (6,4) are the two first estimated motion vectors. The server obtains the merge type of cand_mv1 corresponding to the first estimated motion vector (6,3) and the distance between cand_mv1 and the first estimated motion vector (6,3) in parallel as the original mergetype and original distance, respectively.

[0167] Optionally, when the target candidate motion vector information is cand_mv3, the server obtains the merge type of cand_mv2 corresponding to the first estimated motion vector (5, 4) and the distance between cand_mv2 and the first estimated motion vector (5, 4) as the original merge type and the original distance, respectively.

[0168] Step S1004: Determine the priority between the target merging type and the first merging type.

[0169] Optionally, assume that cand_mv1 and cand_mv2 are both square merges, and the server obtains the target merge information of the target candidate motion vector information. If we continue to use the two first estimated motion vectors (6,3) and (6,4) as an example, Figure 11As shown, when the server determines that the target merge type number of cand_mv2 is greater than 0, it continues to determine the priorities of the cand_mv2 target merge type and the first merge type of cand_mv1, both of which are merge and have the same priority.

[0170] Step S1006: If the priority of the target merge type is higher than the priority of the first merge type, the first merge type is replaced with the target merge type, and the first distance is replaced with the target distance to obtain a first estimated motion vector after iteration.

[0171] Optionally, continue as Figure 11 As shown, if the priority of the target merge type of cand_mv2 is higher than the priority of the first merge type of cand_mv1, the first merge type corresponding to the updated first estimated motion vector is replaced with the target merge type, and the first distance is replaced with the target distance. The target merge type and target distance corresponding to the first estimated motion vector are then saved in the initial merge table. That is, in the initial merge table, the first estimated motion vector's original merge type and distance corresponding to cand_mv1 are replaced with the merge type and distance corresponding to cand_mv2.

[0172] Step S1008 : If the priority of the target merge type is equal to the priority of the first merge type, determine whether the target distance is less than the first distance; wherein the target distance indicates the distance between the target candidate motion vector and the estimated motion vector.

[0173] Optionally, continue as Figure 11 As shown, the priority of the target merge type of cand_mv2 and the first merge type of cand_mv1 are both merge, and the priority is the same. At this time, the server needs to further determine the distance of cand_mv2 and the distance of cand_mv1.

[0174] Among them, the formula for calculating the distance between cand_mv and est_mv is as follows:

[0175] The distance between cand_mv and est_mv on the upper left is:

[0176]

[0177] The distance between cand_mv and est_mv in the upper right corner is:

[0178]

[0179] The distance between cand_mv and est_mv on the lower left is:

[0180]

[0181] The distance between cand_mv and est_mv in the lower right corner is:

[0182]

[0183] Step S1010: If the target distance is less than the first distance, the first distance is replaced by the target distance to obtain a first estimated motion vector after iteration.

[0184] Optionally, if the distance of cand_mv2 is smaller than the distance of cand_mv1, the server uses the cand_mv with a closer distance as the final merge_mv. That is, the server replaces the merge type and distance of the first estimated motion vector in the initial merge table from the original corresponding cand_mv1 to the merge type and distance of cand_mv2.

[0185] It should be noted that when there are multiple first estimated motion vectors, the server updates the first estimated motion vectors in parallel. The server may also save the second estimated motion vector and at least one first estimated motion vector in the candidate motion vector information neighborhood to the initial merge table in parallel.

[0186] In this embodiment, by comparing the merge type and the distance, the merge_mv with the best merge type and the shortest distance is selected as the final merge_mv, which can shorten the iteration time and improve the calculation efficiency.

[0187] In an exemplary embodiment, Figure 12 As shown, the target candidate motion vector information includes the target merge type; before the position number of the first estimated motion vector after iteration in the neighborhood of the target candidate motion vector information is used as the index, steps S1202 to S1206 are included.

[0188] Step S1202 : when the search range is a sub-pixel search range, read a first merge type corresponding to the first estimated motion vector from the initial merge table; the first merge type is determined based on each historical candidate motion vector information of the target candidate motion vector information.

[0189] Step S1204: Determine the priority between the target merging type and the first merging type.

[0190] Step S1206: If the priority of the target merge type is higher than the priority of the first merge type, the first merge type is replaced with the target merge type; and the target merge type corresponding to the first estimated motion vector is saved in the initial merge table.

[0191] In practical applications, in order to further improve coding efficiency, a merge mode needs to be added in the sub-pixel search stage. Since the est_mv of the sub-pixel search is also a quarter-pixel precision, which is consistent with the cand_mv precision, there must be an est_mv equal to the cand_mv within the search range. In this case, the distance judgment between cand_mv and est_mv is no longer performed in the sub-pixel search, and the rest of the behavior is consistent with the whole pixel search. The merge_mv judgment flow chart in the sub-pixel stage is as follows: Figure 13 shown.

[0192] in accordance with Figure 13 The process in the middle establishes the target merge table for each pixel. If cand_mv belongs to the search range ({0≤mvx<2},{0≤mvy<2}), the cand_mv is saved as merge_mv in the merge table. Otherwise, the cand_mv is excluded, such as Figure 3 cand_mv5 in b.

[0193] In this embodiment, in order to further improve the coding efficiency, the sub-pixel search merge mode is expanded. The sub-pixel target merge table can be constructed through the above steps. The sub-pixel target merge table can be flexibly expanded, reducing the iteration time and further improving the computing efficiency.

[0194] In an exemplary embodiment, Figure 14 As shown, the inter-frame coding motion vector processing further includes steps S1402 to S1404. Among them:

[0195] Step S1402: Obtain a new search range.

[0196] Step S1404: Determine the size of the target merge table according to the new search range.

[0197] In practical applications, expanding the Est_mv search area and improving search accuracy are common upgrade methods for video coding protocols. This change can be addressed by parameterizing the data bit width. This change mainly affects cand_mv. For cand_mv, the two components mvx and mvy of valid cand_mv should belong to:

[0198]

[0199]

[0200] in, Refers to the width of the search, and point specifies the position of the decimal point.

[0201] Secondly, the merge result information is stored in the merge table. The size of the merge table is the same as the search range. Therefore, the size of the merge table is configured parametrically to be consistent with the search range, that is:

[0202]

[0203] The 12*12 integer-pixel motion vector search is an optimized extended form of the 8*8 search. According to the above formula, the size of the merge table is configured parametrically to establish the merge table, and at the same time, the bit width is configured parametrically, and the effective range of cand_mv can be obtained as:

[0204]

[0205]

[0206] It can be seen that different search ranges can be adapted through simple parameter configuration. Currently, in actual engineering projects, the above-mentioned extension of the 12*12 motion vector search merge mode has been applied.

[0207] In this embodiment, by determining the size of the target merge table through the new search range, it can be flexibly expanded and the operation is simple.

[0208] In an exemplary embodiment, it includes two stages, the target merge table construction stage: Suppose there are 5 cand_mv, and cand_mv1 and cand_mv2 are both square merges, and the search range is ({0 < mvx < 9}, {0 < mvy < 9}). The server establishes a table that only records the estimated motion vector information with the same size as the search range. The server judges the search range of cand_mv1. Within the search range, it continues to judge the merge type of cand_mv1. It is a square merge, and the number 3 is greater than 0, so it meets the preset conditions. Store cand_mv1 into the table that only records the estimated motion vector information before to obtain the initial merge table.

[0209] At this time, the server continues to judge the search range of cand_mv2. Within the search range, it continues to judge the merge type of cand_mv2. It is a square merge, and the number 3 is greater than 0, so it meets the preset conditions.

[0210] Such as Figure 9As shown, the initial merge table records the position numbers of the four estimated motion vectors corresponding to cand_mv1, which are (5,3), (6,3), (6,4), and (5,4). The position numbers of the four estimated motion vectors in the neighborhood of cand_mv2 are (6,3), (7,3), (7,4), and (6,4). The overlapping (6,3) and (6,4) of cand_mv1 and cand_mv2 are the two first estimated motion vectors. At this time, cand_mv1 is used as the original merge type and distance. The priority of the target merge type of cand_mv2 and the first merge type of cand_mv1 are both merge. The priority result is the same. At this time, the server needs to further determine the distance of cand_mv2 and the distance of cand_mv1. For the estimated motion vector (6,3), the distance of cand_mv2 is smaller than the distance of cand_mv1. Therefore, the estimated motion vector (6,3) originally recorded as cand_mv1 in the initial merge table is replaced by the information of cand_mv2. For the estimated motion vector (6, 4), the distance of cand_mv2 is greater than the distance of cand_mv1, so there is no need to update the information of cand_mv1 originally recorded in the initial merge table for the estimated motion vector (6, 4). This process continues until the last cand_mv5 is updated to obtain the target merge table for integer pixels.

[0211] During the target merge table usage phase, the server obtains the estimated motion vectors between the current coded image block and the reference frame coded image block. Each estimated motion vector corresponds to a corresponding position number. Based on the position number, the corresponding merged motion vector information is read from the integer-pixel target merge table. If a merged motion vector exists, it replaces the estimated motion vector at the corresponding position number with the merged motion vector information and is encoded. This significantly reduces the time required to determine candidate motion vector information in inter-frame video coding merge mode, improving processing efficiency.

[0212] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0213] Based on the same inventive concept, embodiments of the present application further provide an inter-frame coded motion vector processing device for implementing the aforementioned inter-frame coded motion vector processing method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more inter-frame coded motion vector processing device embodiments provided below can be found in the above-mentioned limitations on the inter-frame coded motion vector processing method and will not be further elaborated here.

[0214] In an exemplary embodiment, Figure 15 As shown, an inter-frame coding motion vector processing device is provided, including: a first acquisition module 1501, a reading module 1502 and an alternative coding module 1503, wherein:

[0215] The first acquisition module 1501 is configured to acquire an estimated motion vector and a position number of the estimated motion vector between a current coded image block and a reference frame coded image block.

[0216] The reading module 1502 is used to read the merged motion vector information corresponding to the position number of the estimated motion vector from the target merge table according to the position number of the estimated motion vector; the target merge table includes the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector.

[0217] The replacement encoding module 1503 is configured to replace the estimated motion vector of the corresponding position number with the merged motion vector information, and encode the merged motion vector information.

[0218] In an exemplary embodiment, a device for processing inter-frame coded motion vectors is provided, comprising:

[0219] The second acquisition module is used to acquire the search range.

[0220] The third acquisition module is used to acquire target candidate motion vector information from the candidate list in sequence according to the order of numbers.

[0221] The fourth acquisition module is used to obtain the merged motion vector information corresponding to each target candidate motion vector information within the search range when a preset condition is met, wherein the merged motion vector information is determined based on the position number of the estimated motion vector.

[0222] The target merging module is used to obtain a target merging table according to each target candidate motion vector information and the merged motion vector information corresponding to each target candidate motion vector information. The size of the target merging table is the same as the search range.

[0223] In an exemplary embodiment, the fourth acquisition module includes:

[0224] The pixel classification judgment unit is used to perform pixel component judgment on the target candidate motion vector information.

[0225] The merged motion vector information determining unit is configured to determine the merged motion vector information corresponding to the target candidate motion vector information based on the judgment result of the sub-pixel component.

[0226] In an exemplary embodiment, the target candidate motion vector information includes a first component and a second component; the merged motion vector information determination unit includes:

[0227] The first acquisition subunit is configured to acquire position numbers of a first number of estimated motion vectors within a neighborhood of the target candidate motion vector information if both the first component and the second component are sub-pixel components.

[0228] The first marking subunit is configured to mark position numbers of a first number of estimated motion vectors as merged motion vector information.

[0229] The second acquisition subunit is used to obtain the position numbers of a second number of estimated motion vectors in the neighborhood of the target candidate motion vector information if only one of the first component and the second component is a sub-pixel component; wherein the first number is greater than the second number.

[0230] The second marking subunit is configured to mark position numbers of a second number of estimated motion vectors as merged motion vector information.

[0231] The obtaining marking subunit is configured to obtain the position number of the estimated motion vector corresponding to the target candidate motion vector information if both the first component and the second component are not sub-pixel components, and mark the position number as the merged motion vector information.

[0232] In one embodiment, the target merge module includes:

[0233] The first acquiring unit is configured to sequentially acquire target candidate motion vector information and position numbers of estimated motion vectors in a neighborhood of the target candidate motion vector information in sequence according to the order of numbers.

[0234] The second obtaining unit is configured to obtain a position number of an estimated motion vector in a neighborhood of each historical candidate motion vector information of the target candidate motion vector information.

[0235] The overlap judgment unit is used to judge whether the position number of the estimated motion vector in the neighborhood of the target candidate motion vector information and the position number of the estimated motion vector in the neighborhood of each historical candidate motion vector information overlap. If the position numbers overlap, the overlapping estimated motion vector is used as the first estimated motion vector; if the position numbers do not overlap, the non-overlapping estimated motion vector is used as the second estimated motion vector.

[0236] The iterative saving unit is used to iteratively save the first estimated motion vector and the second estimated motion vector to obtain an initial merge table, until all target candidate motion vector information in the candidate list is saved to obtain a target merge table.

[0237] In one embodiment, the iterative saving unit is further configured to save the target candidate motion vector information using the position number of the iterative first estimated motion vector and the position number of the second estimated motion vector in the neighborhood of the target candidate motion vector information as indexes to obtain an initial merge table.

[0238] In one embodiment, the target candidate motion vector information includes a target merging type and a target distance; the target merging module includes:

[0239] A first reading unit is used to read a first merge type and a first distance corresponding to a first estimated motion vector from an initial merge table when the search range is an integer pixel search range; wherein the first merge type is determined based on each historical candidate motion vector information of the target candidate motion vector information; and the first distance indicates the distance between each historical candidate motion vector of the target candidate motion vector information and the estimated motion vector.

[0240] The first judging unit is configured to judge the priority of the target merging type and the first merging type.

[0241] The first replacing unit is configured to replace the first merging type with the target merging type and the first distance with the target distance if the priority of the target merging type is higher than the priority of the first merging type, so as to obtain a first estimated motion vector after iteration.

[0242] The second judgment unit is configured to judge whether the target distance is less than the first distance if the priority of the target merge type is equal to the priority of the first merge type; wherein the target distance indicates the distance between the target candidate motion vector and the estimated motion vector.

[0243] The second replacing unit is configured to replace the first distance with the target distance if the target distance is smaller than the first distance, so as to obtain a first estimated motion vector after iteration.

[0244] In one embodiment, the target candidate motion vector information includes a target merge type; and the target merge module further includes:

[0245] The second reading unit is used to read the first merging type corresponding to the first estimated motion vector from the initial merging table when the search range is a sub-pixel search range; the first merging type is determined based on each historical candidate motion vector information of the target candidate motion vector information.

[0246] The third judgment unit is configured to judge the priority between the target merging type and the first merging type.

[0247] The third replacing unit is configured to replace the first merging type with the target merging type if the priority of the target merging type is higher than the priority of the first merging type, so as to obtain the first estimated motion vector after iteration.

[0248] In one embodiment, in an exemplary embodiment, an inter-frame coding motion vector processing apparatus is provided, further comprising:

[0249] The fifth acquisition module is used to acquire a new search range.

[0250] The size determination module is used to determine the size of the target merge table according to the new search range.

[0251] Each module in the above-mentioned inter-frame coded motion vector processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0252] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 16As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store motion vector data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for processing inter-frame coded motion vectors is implemented.

[0253] Those skilled in the art will understand that Figure 16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0254] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0255] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0256] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A method for processing inter-frame coding motion vectors, characterized in that: The method comprises: Obtaining a current estimated motion vector between a current coded image block and a reference frame coded image block and a position number of the current estimated motion vector; the position number is used to indicate a position of the estimated motion vector within a search range; According to the position number of the current estimated motion vector, if the target merge table stores merged motion vector information corresponding to the position number of the current estimated motion vector, reading the merged motion vector information corresponding to the position number of the current estimated motion vector from the target merge table; the target merge table includes a relationship between the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector; The merged motion vector information replaces the current estimated motion vector of the corresponding position number, and the merged motion vector information is encoded. The merged motion vector information is the target candidate motion vector information; the target candidate motion vector information is determined based on each corresponding candidate motion vector information within the search range and the estimated motion vector within the neighborhood of each candidate motion vector information.

2. The method according to claim 1, characterized in that The target merge table is constructed in the following manner: Get the search scope; Obtaining each candidate motion vector information from the candidate list in sequence according to the order of the numbers in the candidate list; For each piece of candidate motion vector information within the search range, if a preset condition is met, obtaining initial merged motion vector information corresponding to each piece of candidate motion vector information, wherein the initial merged motion vector information is determined based on each piece of candidate motion vector information corresponding to the search range and an estimated motion vector in a neighborhood of each piece of candidate motion vector information; Obtaining an initial merge table according to each candidate motion vector information and initial merged motion vector information corresponding to each candidate motion vector information; Based on the initial merge table, a target merge table is determined, where the size of the target merge table is the same as the search range.

3. The method according to claim 2, characterized in that The obtaining of the initial merged motion vector information corresponding to each candidate motion vector information includes: Perform pixel component determination on each candidate motion vector information; Based on the judgment result of the pixel component, the initial merged motion vector information corresponding to each candidate motion vector information is determined.

4. The method according to claim 3, characterized in that Each of the candidate motion vector information includes a first component and a second component; and determining the initial merged motion vector information corresponding to each of the candidate motion vector information based on the judgment result of the sub-pixel component includes: If both the first component and the second component of any candidate motion vector information are sub-pixel components, obtaining a first number of estimated motion vectors carrying position numbers within a neighborhood of the candidate motion vector information; Marking the first number of estimated motion vectors carrying position numbers as initial merged motion vector information corresponding to the candidate motion vector information; If only one of the first component and the second component of any candidate motion vector information is a sub-pixel component, obtaining a second number of estimated motion vectors carrying position numbers within a neighborhood of the candidate motion vector information; wherein the first number is greater than the second number; Marking the second number of estimated motion vectors carrying position numbers as initial merged motion vector information corresponding to the candidate motion vector information; If the first component and the second component of any candidate motion vector information are not sub-pixel components, obtain the estimated motion vector carrying the position number corresponding to the candidate motion vector information and mark it as the initial merged motion vector information corresponding to the candidate motion vector information.

5. The method according to claim 4, characterized in that The initial merge table is obtained according to each candidate motion vector information and the initial merged motion vector information corresponding to each candidate motion vector information, including: Obtaining, in order of numbers, each piece of candidate motion vector information and the position number of the initial merged motion vector information corresponding to the candidate motion vector information; Obtaining a position number of an estimated motion vector within a neighborhood of each historical candidate motion vector information of each candidate motion vector information; wherein the historical candidate motion vector information indicates candidate motion vector information preceding the candidate motion vector information in the candidate list; Iteratively determining whether the position number of the initial merged motion vector information corresponding to the candidate motion vector information and the position number of the estimated motion vector in the neighborhood of each historical candidate motion vector information overlap, taking the overlapping estimated motion vector as the first estimated motion vector; and taking the non-overlapping estimated motion vector as the second estimated motion vector; sequentially saving the first estimated motion vector and the second estimated motion vector of each candidate motion vector information neighborhood to obtain an initial merge table; The determining of the target merge table based on the initial merge table includes: Until the initial merge table saves the first estimated motion vector and the second estimated motion vector of all candidate motion vector information neighborhoods within the search range in the candidate list, a target merge table is obtained.

6. The method according to claim 5, characterized in that The first estimated motion vector and the second estimated motion vector of each candidate motion vector information neighborhood are sequentially saved to obtain an initial merge table, including: Using any of the candidate motion vector information as current candidate motion vector information; Using the position number of the iterated first estimated motion vector and the position number of the second estimated motion vector in the neighborhood of the current candidate motion vector information as indexes, respectively, saving the current candidate motion vector information once as merged motion vector information; the number of times of saving is the same as the number of indexes; The next candidate motion vector information of the current candidate motion vector information in the candidate list is used as the new current candidate motion vector information; repeatedly performing the operation of using the position number of the first estimated motion vector and the position number of the second estimated motion vector after iteration within the neighborhood of the current candidate motion vector information as indexes, and saving the current candidate motion vector information once respectively as the merged motion vector information; obtaining an initial merge table; the current candidate motion vector information is not the last candidate motion vector information in the candidate list.

7. The method according to claim 6, characterized in that Each candidate motion vector information includes a merge type and a distance; the distance indicates the distance between the current candidate motion vector and an estimated motion vector in its neighborhood; before using the position number of the iterated first estimated motion vector in the neighborhood of the current candidate motion vector information as an index, the method includes: When the search range is an integer pixel search range, reading a first merge type and a first distance corresponding to the first estimated motion vector from the initial merge table; wherein the first merge type is determined based on each historical candidate motion vector information of the current candidate motion vector information; and the first distance indicates a distance between each historical candidate motion vector of the current candidate motion vector information and the estimated motion vector; Determining a merge type corresponding to the current candidate motion vector information and a priority of the first merge type; If the priority of the merge type corresponding to the current candidate motion vector information is higher than the priority of the first merge type, replacing the first merge type with the merge type and replacing the first distance with the distance to obtain the first estimated motion vector after iteration; If the priority of the merge type corresponding to the current candidate motion vector information is equal to the priority of the first merge type, determining whether the distance is less than the first distance; If the distance corresponding to the current candidate motion vector information is smaller than the first distance, the first distance is replaced by the distance to obtain the first estimated motion vector after iteration.

8. The method according to claim 6, characterized in that Each candidate motion vector information includes a merge type; before using the position number of the iterated first estimated motion vector within the neighborhood of the current candidate motion vector information as an index, it includes: When the search range is a sub-pixel search range, reading a first merge type corresponding to the first estimated motion vector from the initial merge table; the first merge type is determined based on each historical candidate motion vector information of the current candidate motion vector information; Determining a merge type corresponding to the current candidate motion vector information and a priority of the first merge type; If the priority of the merge type corresponding to the current candidate motion vector information is higher than the priority of the first merge type, the first merge type is replaced with the merge type to obtain the first estimated motion vector after iteration.

9. The method according to any one of claims 2 to 8, characterized in that The method further comprises: Get a new search scope; The size of the target merge table is determined according to the new search range.

10. An inter-frame coding motion vector processing device, characterized in that: The device comprises: A first acquisition module is configured to acquire a current estimated motion vector between a current coded image block and a reference frame coded image block and a position number of the current estimated motion vector; the position number is used to indicate a position of the estimated motion vector within a search range; a reading module configured to read, based on the position number of the current estimated motion vector, the merged motion vector information corresponding to the position number of the current estimated motion vector from the target merged table, if the merged motion vector information corresponding to the position number of the current estimated motion vector is stored in the target merged table; the target merged table includes a relationship between the position number of the estimated motion vector and the merged motion vector information corresponding to the position number of the estimated motion vector; An alternative encoding module is used to replace the current estimated motion vector of the corresponding position number with the merged motion vector information, and encode the merged motion vector information, where the merged motion vector information is the target candidate motion vector information; the target candidate motion vector information is determined based on each corresponding candidate motion vector information within the search range and the estimated motion vector within the neighborhood of each candidate motion vector information.

Citation Information

Patent Citations

  • Method and device for motion estimation

    CN108271022A

  • Motion vector candidate pruning systems and methods

    US20200021842A1