Motion compensation method and module, chip, electronic device and storage medium
By judging the position of video blocks and performing motion vector clustering processing, the problem of edge halo of moving objects in low frame rate videos is solved, and the display quality and processing efficiency of the video are improved.
Patent Information
- Application Number
- CN202010613538.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-06-30
AI Technical Summary
Video jitter and blurring effects caused by low frame rate videos when played on display devices, especially halos and fragmentation at the edges of moving objects.
By judging whether the current block is located at the junction of the foreground and the background, the basic motion vector and the motion vector with large differences are obtained, clustering processing is performed to obtain the new motion vector, and the basic motion vector and the new motion vector are combined for pixel value interpolation to improve Halo problem at the edges of moving objects.
It effectively improves the halo problem at the edge of moving objects, improves the authenticity and clarity of video images, reduces the calculation amount of data processing, and improves the response speed of video image processing.
Smart Images

Figure CN113873095B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of video image processing, and in particular to a motion compensation method and module, a chip, an electronic device and a storage medium. Background Art
[0002] The video frame rate is a measure of the number of frames played by a display device in one second. Generally, when the frame rate is 60 frames per second, the human eye will feel that the video is more realistic and smooth. In actual applications, when low-frame-rate video resources are played on a display device, the human eye can feel jitter and blur. In order to solve the video jitter and blur effects caused by low frame rates, the subjective visual effect of the video image can be improved by increasing the video frame rate technology.
[0003] Video frame rate conversion includes the step of motion estimation (ME). The basic idea of motion estimation is to divide each frame of the image sequence into many non-overlapping blocks, and assume that the displacement of all pixels in the block is the same. According to certain matching criteria, the block most similar to the current block is found as the matching block. The relative displacement between the matching block and the current block is the motion vector.
[0004] After motion estimation, motion compensation (MC) is required. Motion compensation is the process of interpolating the pixel values of the previous frame and the current frame to obtain the pixel values of the frame to be interpolated based on the motion vector obtained by motion estimation.
[0005] However, there is a halo effect in the video images of moving objects, such as Figure 1 As shown, compared with the second grid area 2 without moving objects, the first grid area 1 at the edge of the moving portrait is obviously fragmented. In some other video images with halo effect, there is also a phenomenon of blurred edges of moving objects. Summary of the invention
[0006] The problem solved by the embodiments of the present invention is to provide a motion compensation method and module, a chip, an electronic device and a storage medium to improve the problem that halo is easily generated at the edge of a moving object.
[0007] To solve the above problems, an embodiment of the present invention provides a motion compensation method, including: determining whether a current block is located at the junction of a foreground and a background; marking the current block as a target block when the current block is located at the junction of a foreground and a background, and the motion vector of the target block is a basic motion vector; obtaining a first motion vector set according to the difference between a motion vector of a first central block of a previous frame pointed to by the target block within a search range and the basic motion vector; obtaining a second motion vector set according to the difference between a motion vector of a second central block of a current frame pointed to by the target block within a search range and the basic motion vector; clustering the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block; and obtaining a pixel value of the target block according to the basic motion vector and the newly added motion vector.
[0008] Correspondingly, an embodiment of the present invention also provides a motion compensation module, including: a judgment unit, used to judge whether the current block is located at the junction of the foreground and the background; an extraction unit, used to mark the current block as a target block when it is located at the junction of the foreground and the background, and extract the motion vector of the target block as a basic motion vector; a calculation unit, used to obtain a first motion vector set based on the difference between the motion vector of the target block pointing to the first central block of the previous frame within a search range and the basic motion vector; and also used to obtain a second motion vector set based on the difference between the motion vector of the target block pointing to the second central block of the current frame within a search range and the basic motion vector; a clustering unit, used to cluster the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block; and an interpolation unit, used to obtain the pixel value of the target block based on the basic motion vector and the newly added motion vector.
[0009] Correspondingly, an embodiment of the present invention further provides a chip, comprising the motion compensation module provided by the embodiment of the present invention.
[0010] Correspondingly, an embodiment of the present invention further provides an electronic device, comprising the chip provided by the embodiment of the present invention.
[0011] Correspondingly, an embodiment of the present invention further provides a storage medium, wherein the storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the motion compensation method described in the embodiment of the present invention.
[0012] Compared with the prior art, the technical solution of the embodiment of the present invention has the following advantages:
[0013] An embodiment of the present invention provides a motion compensation method, which obtains a motion vector that is significantly different from a basic motion vector for a target block located at a background or foreground position, and obtains a newly added motion vector through clustering. Since the motion vector of the background and the motion vector of the foreground in the boundary area are significantly different, the newly added motion vector and the basic motion vector obtained based on the significant difference can represent the motion vectors of the background (or foreground) and the foreground (or background), respectively. In this way, the pixel values obtained based on the newly added motion vector and the basic motion vector, combined with the background and foreground information, can more realistically reflect the pixel values of the actual image, thereby improving the problem of halo easily appearing at the edges of moving objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a schematic diagram of the halo effect;
[0015] Figure 2 It is a position relationship diagram of moving objects in adjacent frames;
[0016] Figure 3 It is a schematic diagram of motion vectors of adjacent frames;
[0017] Figure 4 is a flow chart of a motion compensation method according to an embodiment of the present invention;
[0018] Figure 5 yes Figure 4 Schematic diagram of step S3 in FIG.
[0019] Figure 6 yes Figure 4 Schematic diagram of step S5;
[0020] Figure 7a and Figure 7b is a comparison diagram of a motion compensation method according to an embodiment of the present invention;
[0021] Figure 8 is a functional block diagram of a motion compensation module according to an embodiment of the present invention;
[0022] Fig. 9 yes Figure 8 Functional block diagram of the computing unit and clustering unit;
[0023] Fig.10 yes Figure 8 Functional block diagram of the interpolation unit;
[0024] Fig.11 It is a functional block diagram of a chip according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] As known from the background technology, currently there is a halo effect in the video images with moving objects. The causes of the halo are analyzed below in combination with the images of adjacent frames.
[0026] Figure 2 It is a position relationship diagram of the moving object in adjacent frames, and is a schematic diagram of the overlap of the previous frame and the current frame. The box in the figure is offset from the A position of the background 10 to the B position. The solid box 20 represents the position of the moving object in the foreground of the current frame. The solid box 20 without the shadow area is the area covered by the foreground of the moving object; the dotted box 30 represents the position of the moving object in the foreground of the previous frame. The dotted box 30 without the shadow area is the area of the background exposed after the foreground of the moving object passes.
[0027] The solid line box 20 and the dotted line box 30 are located at the boundary area between the moving foreground and the background. When performing motion estimation based on blocks, there is only one motion vector for a block. Figure 3 The motion vector diagrams of adjacent frames are shown. For block B in the boundary area, the motion vector of the foreground is MV B1 , the background motion vector is MV B2 , the two have a large difference, so based on a basic motion vector MV B When performing motion compensation, the basic motion vector MV B Either the foreground motion vector or the background motion vector, through this basic motion vector MV B The pixel values obtained by interpolation operation are difficult to truly reflect the pixel values of the actual image, resulting in a halo effect of image fragmentation or blur.
[0028] In order to solve the technical problem, an embodiment of the present invention provides a motion compensation method, which obtains a motion vector that is significantly different from a basic motion vector for a target block located at the background and foreground positions, and obtains a newly added motion vector through clustering. Since the motion vector of the background and the motion vector of the foreground in the boundary area are quite different, the newly added motion vector and the basic motion vector obtained based on the large difference can respectively represent the motion vectors of the background (or foreground) and the foreground (or background). In this way, the pixel values obtained based on the newly added motion vector and the basic motion vector, combined with the background and foreground information, can more realistically reflect the pixel values of the actual image, thereby improving the problem of halo easily appearing at the edges of moving objects.
[0029] refer to Figure 4 , is a flow chart of a motion compensation method according to an embodiment of the present invention. The motion compensation method, after the step of motion estimation, performs interpolation operation according to the motion vector obtained by motion estimation to obtain the pixel value of the frame to be interpolated. The motion compensation method of this embodiment includes:
[0030] Step S1, determining whether the current block is located at the junction of the foreground and the background;
[0031] Step S2, when the current block is located at the junction of the foreground and the background, it is marked as a target block, and the motion vector of the target block is the basic motion vector;
[0032] Step S3, obtaining a first motion vector set according to the difference between a motion vector of a first central block of a previous frame pointed to by a target block within a search range and the basic motion vector; obtaining a second motion vector set according to the difference between a motion vector of a second central block of a current frame pointed to by the target block within a search range and the basic motion vector;
[0033] Step S4, clustering the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block;
[0034] Step S5: Obtain the pixel value of the target block according to the basic motion vector and the newly added motion vector.
[0035] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present invention more obvious and understandable, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0036] Execute step S1 to determine whether the current block is located at the junction of the foreground and the background.
[0037] It should be noted that in the block located in the foreground area or the background area, the motion direction of all pixels remains consistent, so the motion vectors of the block completely located in the foreground area or completely located in the background area and its adjacent surrounding blocks are also consistent. For the block located at the junction of the foreground area or the background area, the motion vector in one block includes the foreground motion vector and the background motion vector, so the motion vectors of the adjacent surrounding blocks of the block located at the junction are different. For example, some of the surrounding blocks have background motion vectors; other blocks have foreground motion vectors that are quite different. Based on this feature, step S1 may include the following sub-steps:
[0038] Step S11, obtaining the motion vector of the current block.
[0039] Specifically, the current block here refers to the block that needs to be judged in the frame to be inserted, and the motion vector refers to the motion vector from the previous frame (P frame) to the current frame (C frame). Before motion compensation, motion estimation is performed. The video chip includes a motion estimation module for providing motion vectors. In actual applications, the motion vector can be obtained from the motion estimation module.
[0040] Step S12: Taking the current block as the center, determine whether the motion vectors of the surrounding blocks are the same as the motion vector of the current block.
[0041] In practical applications, the motion vector within a 3×3 range can be analyzed based on the current block. Specifically, there are 9 blocks in the 3×3 range. The motion vector of the current block is used as a reference to determine the similarities and differences between the motion vectors of the surrounding 8 blocks and the motion vector of the current block.
[0042] Step S13: If the motion vectors of the surrounding blocks are different from the motion vector of the current block, it is determined that the current block is located at the boundary between the foreground and the background.
[0043] For example, if 5 of the 8 surrounding blocks have the same motion vector as the current block, but 3 blocks have different motion vectors from the current block, it means that these 3 blocks and the current block are located in different background or foreground areas, the current block is located at the junction of the background and foreground, and the pixels in the current block have multiple motion vectors.
[0044] If the motion vectors of the surrounding blocks are consistent with the motion vector of the current block, it means that the current block is located in a relatively flat area with little change, and it is determined that the current block is completely located in the foreground area or completely located in the background area.
[0045] Step S2, when the current block is located at the boundary between the foreground and the background, it is marked as a target block, and the motion vector of the target block is the basic motion vector.
[0046] This step is used to determine the block located at the boundary determined in step S1 as the target block for motion compensation, and use the motion vector of the target block from the P frame to the C frame as the basic motion vector to facilitate the benchmark for subsequent motion vector comparison.
[0047] Execute step S3 to obtain a first motion vector set based on the difference between a motion vector of a first central block of a previous frame pointed to by a target block within a search range and the basic motion vector; and obtain a second motion vector set based on the difference between a motion vector of a second central block of a current frame pointed to by the target block within a search range and the basic motion vector.
[0048] Combined with reference Figure 5 , shows a schematic diagram of various motion vectors of a target block to be inserted into a frame within a search range pointing to a previous frame, and explains the process of obtaining the first motion vector set.
[0049] The target block B in the frame to be inserted in the figure is based on the basic motion vector MV B The first central block corresponding to the P frame is B p , the target block B is located at the junction of the background and the foreground. Accordingly, the first central block B corresponding to the P frame p It is also located at the junction of the background and the foreground. p Compare 8 first surrounding blocks B in a 3×3 search range as the center p1 , Bp2 The difference between the motion vector of ... and the base motion vector.
[0050] Specifically, obtain the first central block B p Surrounding 8 first surrounding blocks B p1 , B p2 ...and judge the surrounding 8 motion vectors MV p With the basic motion vector MV B whether the difference is greater than a first preset threshold; when it is judged that it is greater than the first preset threshold, the motion vector of the first surrounding block is included in the first motion vector set.
[0051] Specifically, the process of obtaining the first motion vector set can be expressed by Formula 1:
[0052]
[0053] Among them, MV p ' represents each motion vector in the first motion vector set, w×w is the search range, (row p ,col p ) represents the position of the first central block in the previous frame, i p and j p is the offset position of the first surrounding block relative to the first central block, MV B is a basic motion vector, and thrd represents a first preset threshold.
[0054] It should also be noted that, because the motion vector has directionality, when projected onto the XY coordinate system of the plane where the P frame is located, MV p With MV B The difference can actually be expressed as abs(MV px -MV Bx )+abs(MV py -MV By ), where abs means absolute value.
[0055] Similar to the method of searching and judging in the P frame, the target block B is determined according to the basic motion vector MV B The second center block corresponding to the C frame is B c , the target block B is located at the junction of the background and the foreground. Accordingly, the second center block B corresponding to the C frame c It is also located at the junction of the background and foreground. For example, the second center block is B c The difference between the motion vectors of the eight second surrounding blocks and the basic motion vector is compared within a 3×3 search range.
[0056] Specifically, the motion vectors of the eight second surrounding blocks around the second central block are obtained, and the motion vectors of the eight surrounding blocks are determined to be different from the basic motion vector MV B whether the difference is greater than a first preset threshold; when it is judged that it is greater than the first preset threshold, the motion vector of the second surrounding block is included in the second motion vector set.
[0057] Specifically, the process of obtaining the second motion vector set can be expressed by Formula 2:
[0058]
[0059] MV c ' represents each motion vector in the second motion vector set, (row c ,col c ) represents the position of the second center block in the current frame, i c and j c is the offset position of the second surrounding block relative to the second central block.
[0060] It should also be noted that, because the motion vector has directionality, when projected onto the XY coordinate system of the plane where the C frame is located, MV c With MV B The difference can actually be expressed as abs(MV cx -MV Bx )+abs(MV cy -MV By ).
[0061] It should be noted that Figure 5 Taking the search in the range of 3×3 as an example, accordingly, the search range w in Formula 1 and Formula 2 is set to 3, and the integer i is taken p and j p The value is taken in the range of -1, 0, and + 1. In other embodiments, the value of w can also be set according to the size of the block and the accuracy requirement, for example, w can also be set to 5, 7, and so on.
[0062] The embodiment of the present invention compares the first preset threshold with the basic motion vector MV B The motion vectors with larger differences are selected and represent the background motion vector and the foreground motion vector respectively with the basic motion vector.
[0063] It should be noted that if the first preset threshold is too small, it is difficult to distinguish the motion vectors of the background and foreground. If the first preset threshold is too large, fewer motion vectors are selected, which is not conducive to using the mean or median algorithm to obtain pixel values in subsequent interpolation. Therefore, in this embodiment, the first preset threshold is located between the basic motion vector MV BOne third of the base motion vector MV B Two-thirds of the range, i.e. 1 / 3MV B <thrd<2 / 3MV B .
[0064] Combined with reference Figure 4 , execute step S4, cluster the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block.
[0065] The newly added motion vector is obtained by clustering the motion vectors of the first motion vector set and the second motion vector set, and the first motion vector set and the second motion vector set include motion vectors that are greatly different from the basic motion vector. Therefore, the newly added motion vector is a typical motion vector that is greatly different from the basic motion vector. By making the block at the junction of the foreground and the background have multiple motion vectors (basic motion vectors and newly added motion vectors), the different motion conditions of the foreground pixels and the background pixels can be reflected.
[0066] In addition, the motion compensation method of the embodiment of the present invention obtains a motion vector that is significantly different from the basic motion vector in step S3, and obtains a typical motion vector as a representative for subsequent pixel value calculation through clustering processing, which can reduce the amount of data processing calculation and improve the response speed of video image processing.
[0067] Specifically, first, according to the difference of motion vectors, the first motion vector set MV p ' and the second motion vector set MV c The motion vectors in ' are divided into multiple groups. The mean or median of the motion vectors in each group is used as the newly added motion vector.
[0068] For example, the first motion vector set MV p ' and the second motion vector set MV c 'There are multiple motion vectors. Take any motion vector as the initial motion vector of the first group, and compare the difference between other motion vectors and the initial motion vector. If the difference is large, it will be a new group. If the difference is small, it will be the same group as the initial motion vector. And so on. After polling the motion vectors in the two motion vector sets, the motion vectors are grouped. The difference can be set according to the experience value.
[0069] After grouping, if there is only one motion vector in a group, then the one motion vector is used as the newly added motion vector. If there are multiple motion vectors in a group, then the mean or median of the multiple motion vectors is used as the newly added motion vector.
[0070] Specifically, the process of obtaining a new motion vector by averaging the values can be expressed by the following formula 3:
[0071]
[0072] {Ω 1 ∪Ω 2 ∪…Ω n}={MV p '∪MV c '}
[0073] Where n represents the number of groups after grouping, m i represents the number of motion vectors in the i-th group after classification (i is in the range of 1 to n), Σ represents the sum of motion vectors, where Ω 1 ,Ω 2 ,...,Ω n , respectively represent the motion vector sets of each group.
[0074] In other embodiments, the middle value of the motion vectors in any group may be taken as the newly added motion vector, that is, the newly added motion vector is obtained through the middle value.
[0075] Combined with reference Figure 6 , execute step S5 to obtain the pixel value of the target block according to the basic motion vector and the newly added motion vector.
[0076] In the embodiment of the present invention, based on the basic motion vector obtained by motion estimation, a motion vector is added to the block located at the junction of the foreground and the background to represent a motion vector different from the basic motion vector. The pixel value of the frame to be interpolated obtained by interpolating multiple motion vectors for a block can restore the image more realistically.
[0077] It should be noted that the process of the interpolation algorithm in the embodiment of the present invention is performed based on the characteristic that the pixel values of the same pixel in adjacent frames are correlated.
[0078] Specifically, the step of obtaining the pixel value of the target block includes: obtaining the pixel values of the basic motion vector in the previous frame and the current frame as the first basic pixel value and the second basic pixel value, respectively; obtaining the pixel values of the newly added motion vector in the previous frame and the current frame as reference pixel values; and obtaining the pixel value of the target block based on the pixel values in the reference pixel values that are correlated with the basic pixel values.
[0079] Accordingly, based on the pixel values in the reference pixel values that are correlated with the basic pixel values, the step of obtaining the pixel values of the target block includes: calculating a first difference between the reference pixel value and the first basic pixel value, and a second difference between the reference pixel value and the second basic pixel value, and taking the sum of the first difference and the second difference as the deviation; determining whether the deviation corresponding to the reference pixel value of each newly added motion vector is less than a second preset threshold; when the deviation is less than the second preset threshold, taking the reference pixel value as the target pixel value; and taking the mean or median of the target pixel values as the pixel value of the target block.
[0080] Combination Figure 6 Describe the process of obtaining pixel values. Figure 6 As shown, in this embodiment, the newly added motion vectors obtained by step S4 are 3: MV 1 , MV 2 , MV 3 , the base motion vector of the target block is MV B Values not indicated in the figure.
[0081] Basic motion vector MV B The pixel values in the P frame and the C frame are respectively the first basic pixel value MV Bp and the first basic pixel value MV Bc Because there are 3 newly added motion vectors, and the newly added motion vectors point to two pixel values each in the P frame and the C frame, therefore, the 6 reference pixel values corresponding to the 3 newly added motion vectors in this embodiment include: the newly added motion vector MV 1 The pixel value MV in P frame and C frame 1p and MV 1c MV 2 The pixel value MV in P frame and C frame 2p and MV 2c MV 3 The pixel value MV in P frame and C frame 3p and MV 3c .
[0082] Diff represents the deviation, and the deviations corresponding to the six reference pixel values can be expressed as:
[0083] Diff_MV 1p =abs(MV 1p -MV Bp )+abs(MV 1p -MV Bc );
[0084] Diff_MV 1c =abs(MV 1c -MV Bp )+abs(MV 1c-MV Bc );
[0085] Diff_MV 2p =abs(MV 2p -MV Bp )+abs(MV 2p -MV Bc );...Formula 4
[0086] Diff_MV 2c =abs(MV 2c -MV Bp )+abs(MV 2c -MV Bc );
[0087] Diff_MV 3p =abs(MV 3p -MV Bp )+abs(MV 3p -MV Bc );
[0088] Diff_MV 3c =abs(MV 3c -MV Bp )+abs(MV 3c -MV Bc ).
[0089] The correlation is determined by comparing the relative sizes of the six deviations with the second preset threshold. Specifically, when the deviation is less than the second preset threshold, it indicates that the correlation with the reference pixel value is good and is used as the target pixel value; when the deviation is greater than or equal to the second preset threshold, it indicates that the correlation is weak and is discarded. The pixel value of the target block is obtained by averaging or median the selected target pixel values.
[0090] It should be noted that if the second preset threshold is too small, the pixel correlation requirement is high, and the selected target pixel values are small, thereby affecting the process of averaging or median; if the second preset threshold is too large, the pixel correlation requirement is low, thereby distorting the obtained pixel value. Accordingly, the second preset threshold is between the first basic pixel value MV Bp (or the second basic pixel value MV Bc ) is in the range of one fifth to one half.
[0091] It should be noted that this is only a description of a specific implementation method for obtaining the pixel value of the target block based on the basic motion vector and the newly added motion vector. In other embodiments, other methods can be used to combine the basic motion vector and the newly added motion vector to calculate the pixel value of the target block.
[0092] refer to Figure 7a and Figure 7b , respectively illustrate a comparison diagram of not performing the motion compensation algorithm of the embodiment of the present invention and having performed the motion compensation algorithm of the embodiment of the present invention.
[0093] like Figure 7a As shown in FIG. 1 , the elliptical frame 3 is located at the edge of the moving portrait, and the grid image is broken. Figure 7b In the elliptical frame 4 shown, the grid at the edge of the moving portrait still retains the original continuous grid line image without grid line fragmentation, thereby effectively improving the halo problem.
[0094] In order to solve the technical problem, the embodiment of the present invention further provides a motion compensation module, referring to Figure 8 , shows a functional block diagram of a motion compensation module according to an embodiment of the present invention.
[0095] The motion compensation module 100 obtains the pixel value of the frame to be inserted. The motion compensation module 100 includes:
[0096] A judging unit 101, used to judge whether the current block is located at the junction of the foreground and the background;
[0097] An extraction unit 102 is used to mark the current block as a target block when the current block is located at the boundary of the foreground and the background, and extract a motion vector of the target block as a base motion vector;
[0098] The calculation unit 103 is used to obtain a first motion vector set according to the difference between the motion vector of the target block pointing to the first central block of the previous frame within a search range and the basic motion vector; and is also used to obtain a second motion vector set according to the difference between the motion vector of the target block pointing to the second central block of the current frame within a search range and the basic motion vector;
[0099] A clustering unit 104, configured to perform clustering processing on the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block;
[0100] The interpolation unit 105 is used to obtain the pixel value of the target block according to the basic motion vector and the newly added motion vector.
[0101] The motion compensation module provided by the present invention obtains a motion vector that is greatly different from a basic motion vector for a target block located at a background and a foreground position through a calculation unit, and obtains a newly added motion vector through a clustering unit. Since the motion vector of the background and the motion vector of the foreground in the boundary area are greatly different, the newly added motion vector and the basic motion vector obtained based on the large difference can represent the motion vectors of the background (or foreground) and the foreground (or background), respectively. In this way, the pixel value obtained by the interpolation unit based on the newly added motion vector and the basic motion vector, combined with the background and foreground information, can more truly reflect the pixel value of the actual image, thereby improving the problem of halo easily appearing at the edge of the moving object.
[0102] The embodiment of the present invention is described in detail below in conjunction with the functional block diagram of each unit.
[0103] It should be noted that in the block located in the foreground area or the background area, the motion direction of all pixels is consistent, so the motion vectors of the blocks located completely in the foreground area or the background area and their adjacent surrounding blocks are also consistent. For the blocks located at the junction of the foreground area or the background area, the motion vectors in one block include the foreground motion vector and the background motion vector, so the motion vectors of the adjacent surrounding blocks of the blocks located at the junction are different. For example, some of the surrounding blocks have background motion vectors, while other blocks have foreground motion vectors that are quite different.
[0104] Based on this feature, Figure 8 As shown, the judgment unit 101 is used to obtain the motion vector of the current block; it is also used to judge whether the motion vectors of the surrounding blocks are the same as the motion vector of the current block with the current block as the center; it is also used to judge that the current block is located at the junction of the foreground and the background when the motion vectors of the surrounding blocks are different from the motion vector of the current block.
[0105] Specifically, the current block here refers to the block that needs to be judged in the frame to be inserted, and the motion vector refers to the motion vector from the previous frame (P frame) to the current frame (C frame). Before motion compensation, motion estimation is performed, and the video chip includes a motion estimation module for providing motion vectors. In actual applications, the judgment unit 101 can obtain the motion vector from the motion estimation module.
[0106] The judging unit 101 is further configured to judge whether the motion vectors of the surrounding blocks are the same as the motion vector of the current block, with the current block as the center.
[0107] In practical applications, the judgment unit 101 can analyze the motion vector within a 3×3 range based on the current block. Specifically, there are 9 blocks in the 3×3 range, and the motion vector of the current block is used as a reference to judge the similarities and differences between the motion vectors of the surrounding 8 blocks and the motion vector of the current block.
[0108] The determining unit 101 further determines that the current block is located at the boundary between the foreground and the background when the motion vectors of the surrounding blocks are different from the motion vector of the current block.
[0109] For example, if 5 of the 8 surrounding blocks have the same motion vector as the current block, while 3 blocks have different motion vectors from the current block, it means that these 3 blocks and the current block are located in different background or foreground areas. The judgment unit 101 determines that the current block is located at the junction of the background and foreground, and the pixels in the current block have multiple motion vectors.
[0110] If the motion vectors of the surrounding blocks are consistent with the motion vector of the current block, it means that the current block is located in a relatively flat area with little change, and the judgment unit 101 judges that the current block is completely located in the foreground area or completely located in the background area.
[0111] The extraction unit 102 is used to mark the current block as a target block when the current block is located at the boundary of the foreground and the background, and the motion vector of the target block is the basic motion vector.
[0112] The block located at the boundary determined by the extraction unit 102 is determined as the target block for motion compensation, and the motion vector of the target block from the P frame to the C frame is used as the basic motion vector to facilitate the benchmark for subsequent motion vector comparison.
[0113] Combined with reference Fig. 9 , showing Figure 8 Functional block diagram of the computing unit and clustering unit in .
[0114] The calculation unit 103 includes:
[0115] A value acquirer 1031 is used for taking a block in a previous frame pointed to by a basic motion vector of the target block as a first central block, and obtaining motion vectors of a plurality of first surrounding blocks of the first central block within a search range;
[0116] A comparator 1032, configured to determine whether a difference between a motion vector of a first surrounding block or a motion vector of a second surrounding block and the basic motion vector is greater than a first preset threshold;
[0117] Counter 1033 is used to classify the motion vector of the first surrounding block into the first motion vector set when it is determined that the difference between the first surrounding block and the basic motion vector is greater than the first preset threshold; and is also used to classify the motion vector of the second surrounding block into the second motion vector set when it is determined that the difference between the second surrounding block and the basic motion vector is greater than the first preset threshold.
[0118] Specifically, in conjunction with reference Figure 5 , the process of the calculation unit 103 obtaining the first motion vector set is described.
[0119] Figure 5 The target block B in the frame to be inserted is based on the basic motion vector MV B The first central block corresponding to the P frame is B p , the target block B is located at the junction of the background and the foreground. Accordingly, the first central block B corresponding to the P frame p It is also located at the junction of the background and foreground. Here, the first central block B p Compare the 8 first surrounding blocks B within the 3×3 search range as the center p1 , B p2 The difference between the motion vector of ... and the base motion vector.
[0120] Specifically, the valuer 1031 is used to obtain the first central block B p Surrounding 8 first surrounding blocks B p1 , B p2 The comparator 1032 is used to determine the surrounding 8 motion vectors MV p With the basic motion vector MV B is greater than a first preset threshold; when it is judged that it is greater than the first preset threshold, the counter 1033 classifies the motion vector of the first surrounding block into the first motion vector set.
[0121] Specifically, the process of obtaining the first motion vector set can be expressed by Formula 1:
[0122]
[0123] Among them, MV p ' represents each motion vector in the first motion vector set, w×w is the search range, (row p ,col p ) represents the position of the first central block in the previous frame, i p and j p is the offset position of the first surrounding block relative to the first central block, MV B is a basic motion vector, and thrd represents a first preset threshold.
[0124] It should also be noted that, because the motion vector has directionality, when projected onto the XY coordinate system of the plane where the P frame is located, MV p With MV B The difference can actually be expressed as abs(MV px -MV Bx )+abs(MV py -MV By ), where abs means absolute value.
[0125] Similar to the method of searching in a P frame, the target block B is located according to the basic motion vector MV B The second center block corresponding to the C frame is B c , the target block B is located at the junction of the background and the foreground. Accordingly, the second center block corresponding to the C frame is B c It is also located at the junction of the background and foreground. For example, the second center block is B c The difference between the motion vectors of the eight second surrounding blocks and the basic motion vector is compared within a 3×3 search range.
[0126] Specifically, the valuer 1031 is used to obtain the motion vectors of the eight second surrounding blocks around the second central block, and the comparator 1032 determines whether the eight surrounding motion vectors are consistent with the basic motion vector MV B is greater than a first preset threshold; when it is judged that it is greater than the first preset threshold, the counter 1033 classifies the motion vector of the second surrounding block into the second motion vector set.
[0127] Specifically, the process of obtaining the second motion vector set can be expressed by Formula 2:
[0128]
[0129] MV c ' represents each motion vector in the second motion vector set, (row c ,col c ) represents the position of the second center block in the current frame, i c and j c is the offset position of the second surrounding block relative to the second central block.
[0130] It should also be noted that, because the motion vector has directionality, when projected onto the XY coordinate system of the plane where the C frame is located, MV c With MV B The difference can actually be expressed as abs(MV cx -MV Bx )+abs(MV cy -MV By ).
[0131] It should be noted that Figure 5 Taking the search in the range of 3×3 as an example, accordingly, w in Formula 1 and Formula 2 is set to 3, and after taking the integer i p and j p The search is performed within the range of -1, 0, and +1. In other embodiments, the value of w may be set according to the size of the block and the accuracy requirement, for example, w may be set to 5, 7, and so on.
[0132] The embodiment of the present invention compares the first preset threshold with the basic motion vector MV B The motion vectors with large differences are selected and represent the background motion vector and the foreground motion vector respectively with the basic motion vector. Accordingly, if the first preset threshold is too small, it is difficult to distinguish the motion vectors of the background and the foreground. If the first preset threshold is too large, fewer motion vectors are selected, which is not conducive to obtaining pixel values by using the mean or median algorithm in subsequent interpolation. In this embodiment, the first preset threshold is located between the basic motion vector MV B One third of the base motion vector MV B Two-thirds of the range, i.e. 1 / 3MV B <thrd<2 / 3MV B .
[0133] Continue to refer Fig. 9 The motion compensation module 100 further includes: a clustering unit 104, configured to perform clustering processing on the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block.
[0134] The newly added motion vector is obtained by clustering the motion vectors of the first motion vector set and the second motion vector set, and the first motion vector set and the second motion vector set are obtained by selecting motion vectors that are greatly different from the basic motion vector. Therefore, the newly added motion vector is a typical motion vector that is greatly different from the basic motion vector. By making the block at the junction of the foreground and the background have multiple motion vectors, the different motion conditions of the foreground pixels and the background pixels can be reflected.
[0135] In addition, the motion compensation module 100 of the embodiment of the present invention obtains a motion vector that is significantly different from the basic motion vector through the calculation unit 103, and uses the typical motion vector as a representative to calculate subsequent pixel values through the clustering unit 104, which can reduce the amount of data processing calculations and improve the response speed of video image processing.
[0136] Specifically, the clustering unit 104 includes a grouper 1041 and a clusterer 1042, wherein the grouper 1041 is used to group the first motion vector set MV according to the difference of the motion vectors. p ' and the second motion vector set MV c The motion vectors in ' are divided into multiple groups; the clusterer 1042 is used to use the mean or median of the motion vectors in each group as the newly added motion vector.
[0137] The grouper 1041 may adopt the following methods when grouping. For example, the first motion vector set MV p ' and the second motion vector set MV c'There are multiple motion vectors. Take any motion vector as the initial motion vector of the first group. Compare the difference between other motion vectors and the initial motion vector. If the difference is large, it will be a new group. If the difference is small, it will be the same group as the initial motion vector. After polling the motion vectors in the two motion vector sets once, grouping is achieved. The difference can be set according to experience.
[0138] The clusterer 1042 is connected to the grouper 1041, and is used to use the one motion vector as a newly added motion vector when there is only one motion vector in a group; and is also used to use the mean or median of multiple motion vectors as a newly added motion vector when there are multiple motion vectors in a group.
[0139] The process of obtaining a new motion vector by averaging can be expressed by the following formula 3:
[0140]
[0141] {Ω 1 ∪Ω 2 ∪…Ω n}={MV p '∪MV c '}
[0142] Where n represents the number of groups after grouping, m i represents the number of motion vectors in the i-th group after classification (i is in the range of 1 to n), Σ represents the sum of motion vectors, where Ω 1 ,Ω 2 ,...,Ω n , respectively represent the motion vector sets of each group.
[0143] In other embodiments, the clusterer 1042 may also take the middle value of the motion vector in any group as the newly added motion vector, that is, obtain the newly added motion vector through the median value.
[0144] refer to Fig.10 , showing Figure 8 The interpolation unit 105 is used to obtain the pixel value of the target block according to the basic motion vector and the newly added motion vector.
[0145] In the embodiment of the present invention, based on the basic motion vector obtained by motion estimation, a motion vector is added to the block located at the junction of the foreground and the background to represent the motion vector of the area different from the basic motion vector. The pixel value of the frame to be interpolated obtained by interpolating multiple motion vectors in a block can restore the image more realistically.
[0146] It should be noted that the interpolation unit 105 in the embodiment of the present invention is based on the characteristic that the pixel values of the same pixel in adjacent frames are correlated.
[0147] Specifically, the interpolation unit 105 includes:
[0148] A basic pixel valuer 1051 is used to obtain pixel values of the basic motion vector in the previous frame and the current frame as the first basic pixel value and the second basic pixel value respectively;
[0149] A reference pixel valuer 1052 is used to obtain the pixel values of the newly added motion vector in the previous frame and the current frame as reference pixel values;
[0150] The target pixel valuer 1053 is used to obtain the pixel value of the target block according to the pixel value in the reference pixel value that is correlated with the basic pixel value.
[0151] Accordingly, the target pixel valuer 1053 further includes:
[0152] a deviation meter 1054, configured to calculate a first difference between a reference pixel value and a first basic pixel value, and a second difference between the reference pixel value and a second basic pixel value, and use the sum of the first difference and the second difference as a deviation;
[0153] A determiner 1055, used to determine whether the deviation corresponding to the reference pixel value of each newly added motion vector is less than a second preset threshold;
[0154] A configurator 1056, configured to use the reference pixel value as the target pixel value when the deviation is less than the second preset threshold;
[0155] The interpolator 1057 is used to calculate the mean or median of the target pixel value as the pixel value of the target block.
[0156] Combine the following Figure 6 The process of obtaining pixel values by the interpolation unit 105 is described below. Figure 6 As shown, in this embodiment, the clustering unit 104 obtains three new motion vectors: MV 1 , MV 2 , MV 3 The original basic motion vector of the target block is MV B Not shown in the figure.
[0157] Basic motion vector MV B The pixel values in the P frame and the C frame may be the first basic pixel value MV Bp and the first basic pixel value MV Bc Because there are 3 newly added motion vectors, and the newly added motion vectors point to two pixel values each in the P frame and the C frame, therefore, the 6 reference pixel values corresponding to the 3 newly added motion vectors in this embodiment include: the newly added motion vector MV 1 The pixel value MV in P frame and C frame1p and MV 1c MV 2 The pixel value MV in P frame and C frame 2p and MV 2c MV 3 The pixel value MV in P frame and C frame 3p and MV 3c .
[0158] The deviation meter 1054 uses Diff to represent the deviation, so the deviations corresponding to the six reference pixel values can be expressed as:
[0159] Diff_MV 1p =abs(MV 1p -MV Bp )+abs(MV 1p -MV Bc );
[0160] Diff_MV 1c =abs(MV 1c -MV Bp )+abs(MV 1c -MV Bc );
[0161] Diff_MV 2p =abs(MV 2p -MV Bp )+abs(MV 2p -MV Bc );...Formula 4
[0162] Diff_MV 2c =abs(MV 2c -MV Bp )+abs(MV 2c -MV Bc );
[0163] Diff_MV 3p =abs(MV 3p -MV Bp )+abs(MV 3p -MV Bc );
[0164] Diff_MV 3c =abs(MV 3c -MV Bp )+abs(MV 3c -MV Bc ).
[0165] The judgement unit 1055 judges the correlation by comparing the relative sizes of the six deviations with the second preset threshold. Specifically, when the deviation is less than the second preset threshold, it indicates that the correlation with the reference pixel value is good, and the configuration unit 1056 configures it as the target pixel value; when the deviation is greater than or equal to the second preset threshold, it indicates that the correlation is weak and is discarded.
[0166] The interpolator 1057 is used to obtain the pixel value of the target block by averaging or median the target pixel values selected by the configurator 1056.
[0167] It should be noted that if the second preset threshold is too small, the pixel correlation requirement is high, and the selected target pixel values are small, thereby affecting the process of averaging or median; if the second preset threshold is too large, the pixel correlation requirement is low, thereby distorting the obtained pixel value. Accordingly, the second preset threshold is between the first basic pixel value MV Bp (or the second basic pixel value MV Bc ) is in the range of one fifth to one half.
[0168] It should be noted that this is only a description of a specific implementation method for obtaining the pixel value of the target block based on the basic motion vector and the newly added motion vector. In other embodiments, the interpolation unit may also use other methods to combine the basic motion vector and the newly added motion vector to calculate the pixel value of the target block.
[0169] Accordingly, an embodiment of the present invention further provides a chip, referring to Fig.11 , is a functional block diagram of a chip according to an embodiment of the present invention. The chip 300 includes:
[0170] The motion estimation module 200 is used to provide a motion vector.
[0171] The motion compensation module 100 provided in the embodiment of the present invention is used to add a motion vector to the block located at the junction of the background and the foreground according to the motion vector provided by the motion estimation module 200, and perform interpolation processing in combination with the newly added motion vector and the motion vector provided by the motion estimation module 200 to achieve motion compensation, thereby improving the halo problem.
[0172] Correspondingly, an embodiment of the present invention further provides an electronic device, including: the chip provided by the embodiment of the present invention.
[0173] The electronic device is a set-top box, a television, a projector or a mobile phone. In the video image output by the electronic device, the edge of the moving object is not prone to fragmentation or blur, thereby improving the halo problem.
[0174] Correspondingly, an embodiment of the present invention further provides a storage medium, wherein the storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the motion compensation method provided by the embodiment of the present invention.
[0175] The storage medium is a computer-readable storage medium, and the storage medium can be a read-only memory (ROM), a random access memory (RAM), a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk, or other medium that can store program codes.
[0176] The above-mentioned embodiments of the present invention are combinations of elements and features of the present invention. Unless otherwise mentioned, the elements or features may be considered as optional. Each element or feature may be put into practice without being combined with other elements or features. In addition, the embodiments of the present invention may be constructed by combining some elements and / or features. The order of operations described in the embodiments of the present invention may be rearranged. Some constructions of any one embodiment may be included in another embodiment, and may be replaced by the corresponding construction of another embodiment. It is obvious to those skilled in the art that claims that do not have a clear reference relationship to each other in the attached claims may be combined into embodiments of the present invention, or may be included as new claims in the amendment after submitting this application.
[0177] The embodiments of the present invention can be implemented by various means such as hardware, firmware, software or a combination thereof. In a hardware configuration, the method according to the exemplary embodiment of the present invention can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, etc.
[0178] In a firmware or software configuration, the embodiments of the present invention may be implemented in the form of modules, procedures, functions, etc. The software code may be stored in a memory unit and executed by a processor. The memory unit is located inside or outside the processor and may send data to and receive data from the processor via various known means.
[0179] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A motion compensation method, characterized in that: include: Determine whether the current block is at the junction of the foreground and background; When the current block is located at the junction of the foreground and the background, it is marked as a target block, and a motion vector from a previous frame to a current frame of the target block is a basic motion vector; According to the difference between the motion vector of the first central block of the previous frame pointed by the target block and the basic motion vector within a search range, a first motion vector set is obtained; according to the difference between the motion vector of the second central block of the current frame pointed by the target block and the basic motion vector within a search range, a second motion vector set is obtained; the target block corresponds to the first central block in the previous frame according to the basic motion vector, and the target block corresponds to the second central block in the current frame according to the basic motion vector; clustering is performed on the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block; According to the basic motion vector and the newly added motion vector, a pixel value of the target block is obtained, and the step of obtaining the pixel value of the target block includes: obtaining the pixel value of the basic motion vector in the previous frame and the current frame as the first basic pixel value and the second basic pixel value respectively; obtaining the pixel value of the newly added motion vector in the previous frame and the current frame as the reference pixel value; based on the pixel value in the reference pixel value that is correlated with the basic pixel value, the pixel value of the target block is obtained, and based on the pixel value in the reference pixel value that is correlated with the basic pixel value, the step of obtaining the pixel value of the target block includes: calculating a first difference between the reference pixel value and the first basic pixel value, and a second difference between the reference pixel value and the second basic pixel value, and calculating the first difference and the second difference. The sum of the values is used as the deviation; judging whether the deviation corresponding to the reference pixel value of each newly added motion vector is less than a second preset threshold; when the deviation is less than the second preset threshold, taking the reference pixel value as the target pixel value; taking the mean or median of the target pixel value as the pixel value of the target block; the step of obtaining the first motion vector set comprises: taking the block of the previous frame pointed to by the basic motion vector of the target block as the first central block; obtaining the motion vectors of a plurality of first surrounding blocks of the first central block within the search range; judging whether the difference between the motion vector of the first surrounding block and the basic motion vector is greater than a first preset threshold; when judging that it is greater than the first preset threshold, classifying the motion vector of the first surrounding block into the first motion vector set; The step of obtaining a second motion vector set includes: taking a block of a current frame pointed to by a basic motion vector of the target block as a second central block; obtaining motion vectors of a plurality of second surrounding blocks of the second central block within the search range; judging whether a difference between a motion vector of the second surrounding block and the basic motion vector is greater than a first preset threshold; and when judging that the difference is greater than the first preset threshold, classifying the motion vector of the second surrounding block into the second motion vector set.
2. The motion compensation method according to claim 1, characterized in that: The first preset threshold is located within a range between one third of the basic motion vector and two thirds of the basic motion vector.
3. The motion compensation method according to claim 1, wherein: The second preset threshold is within a range from one fifth to one half of the first basic pixel value, or the second preset threshold is within a range from one fifth to one half of the second basic pixel value.
4. The motion compensation method according to claim 1, wherein: The step of obtaining a newly added motion vector of the target block comprises: Dividing the motion vectors in the first motion vector set and the second motion vector set into a plurality of groups according to differences in the motion vectors; The mean or median of the motion vectors in each group is used as the newly added motion vector.
5. The motion compensation method according to claim 1, wherein: The step of determining whether the current block to be inserted is located at the junction of the foreground and the background includes: Get the motion vector of the current block; Taking the current block as the center, it is determined whether the motion vectors of the surrounding blocks are the same as the motion vector of the current block; if the motion vectors of the surrounding blocks are different from the motion vector of the current block, it is determined that the current block is located at the junction of the foreground and the background.
6. A motion compensation module, characterized in that: include: A judging unit, used to judge whether the current block is located at the junction of the foreground and the background; An extraction unit, configured to mark the current block as a target block when the current block is located at the boundary of the foreground and the background, and extract a motion vector from a previous frame to a current frame of the target block as a basic motion vector; A calculation unit, configured to obtain a first motion vector set according to a difference between a motion vector of a first central block of a previous frame pointed to by a target block and the basic motion vector within a search range; and further configured to obtain a second motion vector set according to a difference between a motion vector of a second central block of a current frame pointed to by the target block and the basic motion vector within a search range; the target block corresponding to the first central block in the previous frame according to the basic motion vector, and the target block corresponding to the second central block in the current frame according to the basic motion vector; A clustering unit, configured to perform clustering processing on the motion vectors of the first motion vector set and the second motion vector set to obtain a newly added motion vector of the target block; An interpolation unit is used to obtain pixel values of a target block according to the basic motion vector and the newly added motion vector; the interpolation unit includes: a basic pixel valuer, used to obtain pixel values of the basic motion vector in a previous frame and a current frame, as first basic pixel values and second basic pixel values, respectively; a reference pixel valuer, used to obtain pixel values of the newly added motion vector in a previous frame and a current frame as reference pixel values; a target pixel valuer, used to obtain pixel values of the target block according to pixel values in the reference pixel values that are correlated with the basic pixel values; the target pixel valuer includes: a deviation measurer, used to calculate a first difference between the reference pixel value and the first basic pixel value, and a second difference between the reference pixel value and the second basic pixel value, and taking the sum of the first difference and the second difference as the deviation; a judger, used to judge whether the deviation corresponding to the reference pixel value of each newly added motion vector is less than a second preset threshold; a configurator, used to take the reference pixel value as the target pixel value when the deviation is less than the second preset threshold; an interpolator, used to calculate the mean or median of the target pixel value as the pixel value of the target block; The computing unit comprises: A value obtainer, used to take a block of a previous frame pointed to by the basic motion vector of the target block as a first central block, and obtain motion vectors of a plurality of first surrounding blocks of the first central block within a search range; and also used to take a block of a current frame pointed to by the basic motion vector of the target block as a second central block; and obtain motion vectors of a plurality of second surrounding blocks of the second central block within a search range; a comparator, configured to determine whether a difference between a motion vector of a first surrounding block or a motion vector of a second surrounding block and the basic motion vector is greater than a first preset threshold; a counter, configured to classify the motion vector of the first surrounding block into the first motion vector set when it is determined that the difference between the first surrounding block and the basic motion vector is greater than the first preset threshold; and to classify the motion vector of the second surrounding block into the second motion vector set when it is determined that the difference between the second surrounding block and the basic motion vector is greater than the first preset threshold.
7. The motion compensation module according to claim 6, characterized in that: The first preset threshold is located within a range between one third of the basic motion vector and two thirds of the basic motion vector.
8. The motion compensation module according to claim 6, characterized in that: The second preset threshold is within a range from one fifth to one half of the first basic pixel value, or the second preset threshold is within a range from one fifth to one half of the second basic pixel value.
9. The motion compensation module according to claim 6, characterized in that: The clustering unit comprises: a grouper, configured to divide the motion vectors in the first motion vector set and the second motion vector set into a plurality of groups according to differences in the motion vectors; A clusterer is used to use the mean or median of the motion vectors in each group as the newly added motion vector.
10. The motion compensation module according to claim 6, characterized in that: The judgment unit is used to obtain the motion vector of the current block; is also used to judge whether the motion vectors of the surrounding blocks are the same as the motion vector of the current block with the current block as the center; and is also used to judge that the current block is located at the junction of the foreground and the background when the motion vectors of the surrounding blocks are different from the motion vector of the current block.
11. A chip, comprising: A motion compensation module as claimed in any one of claims 6 to 10.
12. The chip according to claim 11, characterized in that: Also includes: The motion estimation module is used to provide a motion vector to the motion compensation module.
13. An electronic device, characterized in that: Comprising the chip as claimed in claim 11 or 12.
14. The electronic device according to claim 13, characterized in that: The electronic device is a set-top box, a television, a projector or a mobile phone.
15. A storage medium, characterized in that: The storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the motion compensation method according to any one of claims 1-5.
