WO2022061573A1 - Motion search method, video coding device, and computer-readable storage medium - Google Patents

Motion search method, video coding device, and computer-readable storage medium Download PDF

Info

Publication number
WO2022061573A1
WO2022061573A1 PCT/CN2020/117076 CN2020117076W WO2022061573A1 WO 2022061573 A1 WO2022061573 A1 WO 2022061573A1 CN 2020117076 W CN2020117076 W CN 2020117076W WO 2022061573 A1 WO2022061573 A1 WO 2022061573A1
Authority
WO
WIPO (PCT)
Prior art keywords
search
image block
target search
point
points
Prior art date
Application number
PCT/CN2020/117076
Other languages
French (fr)
Chinese (zh)
Inventor
王悦名
胡光辉
郑萧桢
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/117076 priority Critical patent/WO2022061573A1/en
Publication of WO2022061573A1 publication Critical patent/WO2022061573A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/567Motion estimation based on rate distortion criteria

Definitions

  • the present application relates to the technical field of image coding, and in particular, to a motion search method, a video coding apparatus, and a computer-readable storage medium.
  • Compression and coding technology of data video is one of the key technologies in video transmission. By using efficient video compression technology to greatly compress video, it can effectively reduce the demand for network transmission bandwidth.
  • the intra-frame prediction method is usually used to eliminate the spatial redundancy of the image
  • the inter-frame prediction method is used to eliminate the temporal redundancy. Since the temporal redundancy between adjacent frames of a video source is much larger than the spatial redundancy within a frame, this makes the inter-frame prediction method extremely important in video coding. Because the video sequence images have strong correlation on the time axis, the motion estimation technology and motion compensation technology in the inter prediction method can effectively reduce the temporal redundancy. Therefore, this technology is widely used in video compression coding schemes. .
  • the motion estimation technique is usually completed by using the image block to be encoded in the current frame to find the best matching block within the corresponding search range of one or more reference frames.
  • traversal search is usually used to find the best matching block within a certain search range, but the number of traversal searches is large, which requires excessive search resources, and the search efficiency is relatively high. Low.
  • one of the objectives of the present application is to provide a motion search method, a video encoding device, and a computer-readable storage medium.
  • an embodiment of the present application provides a motion search method, including:
  • the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  • embodiments of the present application provide a video encoding apparatus, including one or more processors, working individually or together, the processors include multiple pipeline stages; and a memory for storing executable instructions ;
  • the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  • embodiments of the present application provide a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, implement the method described in the first aspect.
  • the motion search method, video encoding device, and computer-readable storage medium provided by the embodiments of the present application are beneficial to reduce the number of searches, save search resources, and improve search efficiency.
  • FIG. 1 is a schematic diagram of a video communication system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of pipeline level division and execution of a hardware encoder provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a motion search method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of two adjacent image frames provided by an embodiment of the present application.
  • 5A is a schematic diagram of a search area provided by an embodiment of the present application.
  • 5B to 5H are schematic diagrams of a selected first target search point provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of another motion search method provided by an embodiment of the present application.
  • FIGS. 7A and 7B are schematic diagrams of a selected second target search point provided by an embodiment of the present application.
  • FIG. 8 is a structural diagram of a video encoding apparatus provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a typical video communication system.
  • the sending end 100 includes a video capturing device 101, a video encoding device 102 and a sending device 103.
  • the video capturing device 101 will The collected video is sent to the video encoding device 102 for compression encoding of image information, and then sent out through the sending device 103 .
  • the receiving end 200 includes a receiving device 201, a video display device 203 and a video decoding device 202.
  • the receiving device 201 receives the compressed video data sent by the transmitting end 100, and the video decoding device 202 decodes the received video data to recover an image, and decodes the video data.
  • the resulting image is displayed on the video display device 203 .
  • the motion estimation method in the embodiments of the present application is mainly applied to a video coding device in a video communication system, and motion estimation is a major part of computing resources occupied in the coding process, and the rapid research on motion estimation algorithm is important for improving the overall performance of video coding. Speed plays an important role.
  • Motion estimation is a technique widely used in video coding and video processing.
  • the basic idea of motion estimation is to divide each frame of the image sequence into many non-overlapping image blocks to be encoded, and consider that the displacement of all pixels in the image block to be encoded is the same, and then assign each image block to be encoded to the reference frame.
  • the predicted image block most similar to the image block to be coded is found within a certain search range according to certain matching criteria, as the best matching block, and the relative displacement between the best matching block and the current image block to be coded is the motion vector.
  • the motion vector and residual data (the difference between the best matching block and the current image block to be coded), and at the decoding end, according to the position indicated by the motion vector, from the adjacent decoded reference
  • the corresponding predicted image block is found in the frame, and the reconstructed data is obtained by adding the predicted image block and the residual data.
  • the moving image can be divided into several blocks, and the position of each block in the adjacent frame image can be searched, and the relative offset of the spatial position between the two can be obtained, and the obtained relative offset is usually Refers to the motion vector, and the process of obtaining the motion vector is called motion estimation. Inter-frame redundancy can be removed through motion estimation, which greatly reduces the number of bits in video transmission. Therefore, motion estimation is an important part of a video compression processing system.
  • the video encoding process includes prediction, transformation, quantization, inverse transformation, inverse quantization, entropy coding, and loop filtering.
  • the prediction step is further divided into intra-frame prediction and inter-frame prediction. prediction step. Because the hardware encoder has certain performance requirements, the processing time of each pipeline stage is limited. Therefore, the fast search algorithm with uncertain search time is not suitable for the hardware encoder.
  • FIG. 2 is a schematic diagram of the pipeline stage division of a hardware encoder.
  • the pipeline stages are divided into 5 stages, which are integer pixel search, sub-pixel search, intra prediction, mode decision, entropy coding and Filtering, in which the whole pixel search pipeline stage and the sub-pixel search pipeline stage carry out the steps related to the inter-frame search, the intra-frame prediction pipeline stage and the mode decision pipeline stage carry out the steps related to the intra-frame search, and each pipeline stage is processed in parallel.
  • 5 stages are integer pixel search, sub-pixel search, intra prediction, mode decision, entropy coding and Filtering
  • N is an integer
  • the N+1 th image block to be encoded is subjected to integer pixel search processing in the integer pixel search pipeline stage, and the Nth to-be-coded image block is subjected to sub-pixel search processing in the sub-pixel search pipeline stage;
  • the N+2 th image block to be encoded is subjected to integer pixel search processing in the integer pixel search pipeline stage, and the N+1 th image block to be encoded is subjected to sub-pixel search processing in the sub-pixel search pipeline stage.
  • Intra-frame prediction processing is performed in the intra-frame prediction pipeline stage for the image blocks to be encoded;
  • the N+3 th image block to be encoded is subjected to integer pixel search processing in the integer pixel search pipeline stage
  • the N+2 th image block to be encoded is subjected to pixel-by-pixel search processing in the sub-pixel search pipeline stage
  • the Nth +1 image block to be encoded is subjected to intra prediction processing in the intra prediction pipeline stage
  • the Nth image block to be encoded is subjected to mode decision processing in the mode decision pipeline stage
  • the N+4th image block to be encoded is subjected to the integer pixel search process in the integer pixel search pipeline stage
  • the N+3th image block to be encoded is subjected to pixel-by-pixel search processing in the sub-pixel search pipeline stage
  • the Nth The +2 to-be-coded image blocks are subjected to intra-frame prediction processing in the intra-frame prediction pipeline stage
  • the N+1-th to-be-coded image block is subjected to mode decision processing in the mode decision pipeline stage
  • the N-th to-be-coded image block is subjected to entropy coding Entropy coding and filtering are performed in the filtering pipeline stage.
  • the motion search method in the embodiments of the present application may be applied to a chip including multiple pipeline stages, the chip may be installed on a video encoding device, and the video encoding device uses the pipeline stages to perform video encoding processing, wherein the present
  • the motion search method of an application embodiment may be performed in one of the pipeline stages.
  • the motion search method in the embodiment of the present application may also be executed on a software encoder, which is not limited in the embodiment of the present application.
  • FIG. 3 is a motion search method provided by an embodiment of the present application, which can be applied to a video encoding device, and the method includes:
  • step S101 for the current image block to be encoded, a search area is determined in the reference frame corresponding to the current image block to be encoded.
  • N first target search points are selected from the M search points included in the search area; N ⁇ M; any two first target search points in at least one direction are not adjacent.
  • step S103 the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the first target search points is acquired.
  • step S104 the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  • any two first target search points in the first direction are not adjacent, and any two first target search points in the second direction are adjacent; wherein the first There is an included angle between the direction and the second direction.
  • the included angle may be 0 to 90 degrees.
  • an image block to be encoded refers to a prediction unit to be subjected to motion estimation.
  • the basic coding unit used in the prediction link is the prediction unit PU (Prediction Unit), and all prediction-related operations are in units of PU.
  • the direction of intra prediction, the motion vector difference and reference frame index of inter prediction, motion vector prediction, motion estimation and motion compensation are all processed based on PU.
  • HEVC High Efficiency Video Coding
  • Skip Intra
  • Inter Inter
  • the PU size of the prediction unit may be 8 ⁇ 8 to 64 ⁇ 64; in Intra mode, the size of the prediction unit PU may be 4 ⁇ 4 to 64 ⁇ 64; in Inter mode, the size of the prediction unit PU may be 8 ⁇ 4 Or 4 ⁇ 8 to 64 ⁇ 64.
  • motion estimation is a process of encoding an image frame
  • the image frame is divided into many non-overlapping image blocks to be encoded during the process of motion estimation. Therefore, in this embodiment of the present application, the prediction unit to be subjected to motion estimation is referred to as an image block to be encoded.
  • different video compression standards have different sizes of the image blocks to be encoded, and their names may also be different. Specific settings can be made according to the actual application scenario. There are no restrictions on this.
  • the reference frame in this embodiment of the present application refers to an image frame that has been previously encoded.
  • the reference frame is a frame that is used for reference when the current frame is encoded.
  • the reference frame may advance or lag behind the current frame in time.
  • the motion vector of the current image block to be encoded can be further obtained.
  • the video encoding apparatus may determine the search area in the reference frame according to the predicted motion vector of the current image block to be encoded; wherein, considering that the adjacent encoded image blocks have certain Therefore, the predicted motion vector of the currently to-be-coded image block can be determined based on the motion vectors of one or more adjacent coded image blocks, thereby helping to improve search efficiency.
  • the adjacent coded image blocks may include temporally adjacent coded image blocks and/or (and/or represent both or either) in Spatially adjacent coded image blocks.
  • the video data 10 includes multiple frames of images, and each frame of image may be divided into several image blocks to be encoded.
  • image frame 11 and image frame 12 are two consecutive adjacent frames in video data 10, wherein image frame 11 is an encoded image, image frame 12 is an image currently being encoded, image frame 11 It includes 4 coded image blocks, namely coded image block 111 , coded image block 112 , coded image block 113 and coded image block 114 .
  • the image frame 12 includes the coded image block 121, the coded image block 122, the to-be-coded image block 123, and the to-be-coded image block 124; the to-be-coded image block 123 is currently to be encoded, and the predicted motion vector of the to-be-coded image block 123 can be based on The motion vector of the adjacent coded image blocks is determined, and the coded image blocks adjacent to the to-be-coded image block 123 in space include the coded image block 121 and the coded image block 122, which are temporally similar to the to-be-coded image block 123.
  • the adjacent coded image blocks include the coded image block 113 , that is, the predicted motion vector of the to-be-coded image block 123 is determined according to the motion vectors of the coded image block 113 , the coded image block 121 and the coded image block 122 .
  • the predicted motion vector of the currently coded image block is determined according to the motion vector of the adjacent coded image block , which can improve the accuracy of the search area for subsequent positioning, thereby improving the search efficiency.
  • Determining the predicted motion vector of the currently to-be-coded image block according to the motion vector of the adjacent coded image block is described here:
  • the adjacent coded image block with the highest correlation with the current to-be-coded image block should be selected from the adjacent multiple coded image blocks, and
  • the predicted motion vector is determined according to the motion vector of the adjacent coded image block with the highest correlation.
  • each motion vector of each encoded image block adjacent to the current image block to be encoded is used to determine the encoded image block corresponding to each motion vector in the reference frame; for example, the video encoding device First obtain the position information of the current image block to be coded in the current frame, and then determine the position pointed to by the position information in the reference frame according to the position information. Each motion vector of the coded image block offsets the position to obtain the coded image block corresponding to each motion vector. Next, by comparing the coding cost between the coded image block corresponding to each motion vector in the reference frame and the current to-be-coded image block, the predicted motion vector of the current to-be-coded image block is determined.
  • the coded image block with the least coding cost is selected, and the motion vector corresponding to the coded image block with the least coding cost is used as the predicted motion vector.
  • the search region is subsequently determined based on the predicted motion vector of the current image block to be encoded, the determined search region can be made more accurate, so that the best matching block of the current image block to be encoded can be found more quickly , which is beneficial to improve search efficiency and save search resources.
  • the adjacent coded image blocks of the current image block 123 to be coded in the current frame include the coded image block 113 , the coded image block 121 and the coded image block 122 .
  • the reference frame is Image frame 11
  • the image frame 11 is an encoded image
  • the video encoding device determines the position information of the image block 123 to be encoded in the current frame 12, and then determines the position information in the reference frame (ie, the image frame 11). point, and then offset the positions according to the motion vectors of the encoded image block 113, the encoded image block 121, and the encoded image block 122, and determine the encoded image block 113 in the reference frame (ie, image frame 11).
  • the prediction of the current to-be-coded image block can be directly selected from the motion vectors of each adjacent coded image block corresponding to the current to-be-coded image block of the current frame according to a predetermined selection rule Motion vector.
  • the selection rule includes selecting the motion vector of the adjacent coded image block at a specific position as the predicted motion vector of the current image block to be coded; in an example, please refer to FIG.
  • Spatially adjacent coded image blocks include coded image block 121 and coded image block 122, and coded image blocks temporally adjacent to to-be-coded image block 123 include coded image block 113, for example, the selection
  • the rule may be to select the encoded image block that is spatially adjacent to and above the image block to be encoded 123 , that is, the encoded image block 121 .
  • the encoding cost includes, but is not limited to, Rate Distortion Optimized (RDO).
  • RDO Rate Distortion Optimized
  • SAD Sum of Absolute Difference
  • SATD Sum of Absolute Transformed Difference
  • MSE Mean Squared Error
  • Sum of the Differences sum of The encoding cost is derived from any one of squared difference, SSD), mean absolute difference (MAE), and the number of encoded bits of the motion vector and the rate-distortion parameter lambda.
  • the video encoding apparatus uses the position pointed by the predicted motion vector as a search starting point, and will include the The preset range of the search starting point is used as the search area. It can be understood that, the preset range may be specifically set according to an actual application scenario, which is not limited in this embodiment.
  • the predicted motion vector of the current image block to be coded is determined according to the motion vector of the adjacent coded image block. Since the adjacent coded image block and the image to be coded have a certain correlation, change In other words, adjacent coded image blocks have a certain similarity with the image to be coded.
  • a preset range including the search starting point may be used as the search area, which may be a preset range with the search starting point as the center point as the search area, that is, in the The best matching block of the current image block to be encoded is searched around the search starting point, considering that the search starting point is determined by the motion vector of the encoded image block adjacent to the current image block to be encoded, and the adjacent image block is determined by the motion vector.
  • the coded image block has a certain correlation with the to-be-coded image, and the surrounding area of the search starting point is determined as the search area, which is beneficial to ensure that the most recent image block to be coded can be quickly searched in the search area. Best matching block.
  • the video encoding apparatus in this embodiment includes the search area.
  • Select N first target search points from M search points, N ⁇ M, and any two first target search points in at least one direction are not adjacent; in this way, compared with traversal search, it can greatly reduce Search times, improve search efficiency and save search resources.
  • the present application does not impose any restrictions on the search order of the N first target search points, and specific settings may be made according to actual application scenarios.
  • the search sequence of the above-mentioned N first target search points is from left to right and from top to bottom.
  • the above-mentioned search order of the first target search point of N is two orders of row-by-row scanning and column-by-column scanning.
  • the M search points are arranged in rows and columns, please refer to FIG. 5A , the search area is a 9*9 search area, including 81 search points; Taking a search point spaced between any two first target search points as an example, please refer to FIG. 5B , the N first target search points can be respectively search points on odd rows and odd columns in the search area at the same time.
  • the search order is from left to right, from top to bottom
  • the selection rule is the search points on odd rows and odd columns
  • the N first target search points can be search points on even rows and even columns at the same time (gray points in the figure), then when searching, for example, the search order is from left to right, From top to bottom, the selection rule is the search points on the even-numbered columns and even-numbered rows, then the search starts from the second row and the second column, from left to right, the second row, the fourth column, the second row, the sixth column, and the second row.
  • the search point on the second row and the eighth column is searched from top to bottom, starting from the fourth row and the second column from left to right, and so on, until the search point on the eighth row and eighth column is searched. end.
  • the N first target search points may be search points on even rows and odd columns at the same time (gray points in the figure), then when searching, for example, the search order is from left to right, From top to bottom, the selection rule is the search point on the even-numbered row and odd-numbered column, then the search starts from the second row and the first column, and from left to right, the order is the second row, the third column, the second row, the fifth column, the first column.
  • the search point on the seventh column of the second row and the ninth column of the second row then from top to bottom, starting from the fourth row and the first column to search from left to right, and so on, until the search point is on the eighth row and the ninth column search point, the search ends.
  • the N first target search points may be search points on odd-numbered rows of even columns at the same time (gray points in the figure), then when searching, for example, the search order is from left to right, From top to bottom, the selection rule is the search point on the even-numbered column and the odd-numbered row, then start the search from the first row and the second column, from left to right, the first row, the fourth column, the first row, the sixth column, and the first row.
  • the search point on the eighth column of a row then from top to bottom, starting from the third row and the second column to search from left to right, and so on, until the search point on the ninth row and the eighth column is searched, then search end.
  • the search order is from left to right, top to top
  • the selection rule is to start from the even-numbered rows and even-numbered columns, then start the search from the second row and the second column, from left to right, followed by the second row and five columns, the second row and the eighth column; then from top to bottom,
  • the search starts from the fifth row and the second column from left to right, and so on, until the search point on the eighth row and the eighth column is searched, and the search ends.
  • the selection rule may also be selected from even rows and odd columns, odd rows and odd columns, or odd rows and even columns, which can be specifically set according to actual application scenarios.
  • any two first target search points in the first direction are not adjacent, and any two first target search points in the second direction are adjacent; wherein the first direction and The second direction is the direction indicated by the connecting line between any two target search points. That is to say, the first direction and the second direction are respectively formed by connecting lines obtained by taking the positions of any two target search points in the reference frame corresponding to the current image block to be encoded as the starting point and the ending point, respectively. indicated direction.
  • any two first target search points ie, the gray points in the figure
  • the b direction ie, the vertical direction
  • any two first target search points ie, the gray points in the figure
  • the angle between the a direction and the b direction is 90 degrees. That is, the a direction and the b direction are orthogonal.
  • the first direction is the a-direction or the b-direction
  • the second direction is the c-direction.
  • any two first target search points are not adjacent.
  • the angle between the a direction and the c direction is 45 degrees.
  • the angle between the b direction and the c direction is also 45 degrees.
  • any two first target search points selected in this embodiment are not adjacent is that the correlation of the predicted image blocks corresponding to the adjacent search points is relatively high. If the predicted image block is not the best matching block of the current image block to be coded, then the predicted image block corresponding to the adjacent search point is also very likely not the best matching block of the current image block to be coded. If the adjacent search points are all used as the first target search points to be searched, the search efficiency will inevitably be too low. Therefore, when selecting the first target search point, non-adjacent search points can be selected as the first target search point, which can save search resources and reduce the number of searches. In addition, because non-adjacent search points are selected as the first target search points, the first target search points are evenly distributed in the search area, so that the search area can be uniformly searched to ensure that the best search results are obtained. the result of.
  • one or more search points may be spaced between any two first target search points. Further, the two first target search points adjacent to the top and bottom are located in the same column, and the two first target search points adjacent to the left and right are located in the same row.
  • the number of search points spaced between any two first target search points may be determined based on the size of the search area and/or the number of searches (and/or representing either or both) of the search points. Sure. For example, the number of search points spaced between any two first target search points may have a positive correlation with the search area, and a negative correlation with the number of searches. When the number of searches is fixed, the larger the search area, the greater the number of search points spaced between any two first target search points. The smaller the number of spaced search points. In the case where the search area is fixed, the more times the search is performed, the smaller the number of search points spaced between any two first target search points. The greater the number of search points in the interval.
  • the M search points are arranged in rows and columns, please refer to FIG. 5A , the search area is a 9*9 search area, including 81 search points; Taking one search point between any two first target search points as an example, please refer to FIG. 5B , FIG. 5C , FIG. 5D and FIG.
  • the N first target search points can be the search area at the same time Search points on odd-numbered rows and odd-numbered columns, search points on even-numbered rows, even-numbered rows, odd-numbered columns, or search points on odd-numbered rows and even-numbered columns at the same time (gray points in the figure) , the first target search points are evenly distributed in the search area, so as to achieve a uniform search in the search area and ensure that the search results are better; in another example, please refer to FIG. 5F, any two first targets There are two search points between the search points; it can be seen that the number of first target search points in each row is equal to the number of first target search points in other rows, and is located between any two first target search points in each row.
  • the number of first target search points in each column is equal to the number of first target search points in other columns, and the interval between any two first target search points located in each column is equal, In this way, a uniform search of the search area can be achieved, and better results can be ensured.
  • step S103 after acquiring the first target search point, the video encoding apparatus may search for the first target search point.
  • the search order of the above N first target search points is: to the right, top to bottom.
  • the video encoding apparatus can obtain the predicted images corresponding to the current image blocks to be encoded and each of the first target search points respectively. encoding cost between blocks, the first target search point with the smallest encoding cost is the best matching point of the current image block to be encoded.
  • the video encoding apparatus obtains the encoding cost between the current image block to be encoded and the predicted image block corresponding to the first target search point on odd rows and odd columns .
  • FIG. 5B the video encoding apparatus obtains the encoding cost between the current image block to be encoded and the predicted image block corresponding to the first target search point on odd rows and odd columns .
  • the video encoding apparatus obtains the difference between the current image block to be encoded and the predicted image block corresponding to the first target search point on the even-numbered rows and even-numbered columns. encoding cost. Or, in an example, referring to FIG. 5D , during the search process, the video encoding apparatus obtains the difference between the current image block to be encoded and the predicted image block corresponding to the first target search point on the even row and odd column. encoding cost. Or, in an example, referring to FIG. 5E , during the search process, the video encoding apparatus obtains the difference between the current image block to be encoded and the predicted image block corresponding to the first target search point on odd rows and even columns. encoding cost.
  • the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  • the predicted image block with the smallest difference is determined as the best matching block of the current image block to be encoded.
  • the size of the predicted image block corresponding to the first target search point is the same as that of the current image block to be coded, and the predicted image block corresponding to the first target search point may be the first target search point in the reference frame including the first image block.
  • the image block of the target search point that is to say, the first target search point is one of the pixel points in the corresponding predicted image block; for example, the predicted image block determined by the first target search point as the starting point, Or the first target search point is a certain pixel point in the predicted image block, which is not limited in this embodiment of the present application.
  • the encoding cost includes, but is not limited to, Rate Distortion Optimized (RDO).
  • RDO Rate Distortion Optimized
  • SAD Sum of Absolute Difference
  • SATD Sum of Absolute Transformed Difference
  • MSE Mean Squared Error
  • Sum of the Differences sum of The encoding cost is derived from any one of squared difference, SSD), mean absolute difference (MAE), and the number of encoded bits of the motion vector and the rate-distortion parameter lambda.
  • FIG. 6 is a schematic flowchart of another motion search method provided by an embodiment of the present application.
  • the method includes:
  • step S201 for the current image block to be encoded, a search area is determined in the reference frame of the current image block to be encoded. Similar to step S101, details are not repeated here.
  • step S202 N first target search points are selected from the M search points included in the search area; N ⁇ M; any two first target search points in at least one direction are not adjacent. Similar to step S102, details are not repeated here.
  • step S203 the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the first target search points is acquired. Similar to step S103, details are not repeated here.
  • step S204 the first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost are used as the second target search point, and the search area is in the center position
  • the search point of , and the search point in the neighborhood of the search point at the center position are taken as the second target search point.
  • step S205 the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the second target candidate search points is acquired.
  • step S206 from the first target search point with the smallest coding cost and the second target search point, a corresponding predicted image block with the smallest coding cost is selected as the best matching block of the current image block to be coded.
  • the correlation of the predicted image blocks corresponding to the adjacent search points is relatively high. If the predicted image block corresponding to the current search point is not the best matching block of the current image block to be encoded, then the adjacent The predicted image block corresponding to the search point is also very likely not the best matching block of the current image block to be encoded, and vice versa, the predicted image block corresponding to the first target search point with the smallest encoding cost is all the first target search points. Among all the predicted image blocks corresponding to the point, the difference with the current coded image block is the smallest, then the predicted image block corresponding to the search point adjacent to the first target search point with the least coding cost may be different from the currently coded image block. smaller.
  • step S204 on the basis of obtaining the first target search point with the smallest coding cost, the video encoding apparatus further searches the first target search point with the smallest coding cost and all the The search point in the neighborhood of the first target search point with the smallest coding cost is used as the second target search point, and the search point in the center of the search area and the search point in the neighborhood of the search point in the center point as the second target search point.
  • the search point in the neighborhood of the first target search point with the smallest coding cost is used as the second target search point to search, which is beneficial to obtain better search results;
  • the search point may be the search starting point of the current image block to be encoded in the reference frame when determining the search area, considering that the search starting point is determined by the motion of the encoded image block adjacent to the current image block to be encoded
  • the coded image blocks adjacent to the current to-be-coded image block usually have a certain similarity with the current to-be-coded image block. For example, in a sky image, most of them are sky areas.
  • the pixels in the sky area are relatively similar, and the two adjacent image blocks divided based on the sky area also have high similarity; Therefore, the search point in the central position in the search area and the search point in the neighborhood of the search point in the central position are searched as the second target search point to further search for better results. result.
  • the search point within the neighborhood of the search point is used as the second target search point.
  • the search point at the center position may be the search start point of the current image block to be encoded in the reference frame when the search area is determined. This embodiment considers that there is a high probability of searching near the search start point.
  • the search point at the center of the search area and the search point in the neighborhood of the search point at the center are used as the second target search point to search, and further search results can be obtained.
  • the neighborhood is an area of L ⁇ L, and L represents the number of search points in any row or column in the neighborhood, L ⁇ 3; in other words, the number of search points in the neighborhood is greater than or equal to 8.
  • the size of the neighborhood may be determined according to the size of the search area, for example, the size of the neighborhood has a positive correlation with the size of the search area, that is, the larger the search area, The larger the neighborhood is, on the contrary, the smaller the search area is, the smaller the neighborhood is, so as to ensure that a better result can be searched.
  • FIGS. 7A and 7B assuming that the black point in the figure is the first target search point with the smallest coding cost, and FIG. 7A takes an area with a neighborhood of 3 ⁇ 3 as an example for illustration, then the coding cost can be minimized
  • the first target search point and the search point in the neighborhood of the first target search point with the least coding cost are taken as the second target search point, that is, the 3 ⁇ 3 area centered on the black point
  • Fig. 7B takes the neighborhood as
  • the 5 ⁇ 5 area is taken as an example to illustrate, that is, the 5 ⁇ 5 area with the black point as the center; in addition, the search point at the center position in the search area and the neighbors of the search point at the center position can also be used.
  • the search point in the domain is used as the second target search point, that is, the 3 ⁇ 3 area of the central search point in FIG. 7A and the 5 ⁇ 5 area of the central search point in FIG. 7B .
  • the search at the center position may also include some first target search points that have been searched. These first target search points have been searched before and it is determined that the coding cost is not the smallest. If you search again, it will obviously waste search resources.
  • the video encoding apparatus may divide the first target search point with the smallest encoding cost and the first target search point with the smallest encoding cost in the neighborhood of the first target search point with the smallest encoding cost
  • the part other than the first target search point is used as the second target search point; and the search point at the center position in the search area and the part other than the first target search point in the neighborhood of the search point at the center position are used as the second target search point , in this embodiment, it is considered that there may be already searched first target search points in the neighborhood of the first target search point with the smallest coding cost and in the neighborhood of the search point at the center position, and these first target search points If the point is not the least expensive for encoding, then these first target search points have been determined not to be optimal, and these first target search points are eliminated in this embodiment, which can reduce unnecessary search times, save search resources, and help improve search efficiency.
  • the video encoding apparatus may search for the second target search point.
  • the encoding cost of any two image blocks can be reflected in the The degree of difference between the two, therefore, the video encoding apparatus can obtain the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the second target candidate search points, and then obtain the encoding cost from the encoding cost.
  • a corresponding predicted image block with the smallest encoding cost is selected as the best matching block of the current image block to be encoded, in other words, the smallest difference is selected.
  • the predicted image block is determined as the best matching block of the current image block to be encoded.
  • by further increasing the second target search point and searching for the second target search point it is beneficial to search for better results, and compared with the traversal search, the number of searches is significantly reduced, and search resources are saved, And it can ensure that the best matching block of the current image block to be encoded is obtained.
  • the encoding cost includes, but is not limited to, Rate Distortion Optimized (RDO).
  • RDO Rate Distortion Optimized
  • SAD Sum of Absolute Difference
  • SATD Sum of Absolute Transformed Difference
  • MSE Mean Squared Error
  • Sum of the Differences sum of The encoding cost is derived from any one of squared difference, SSD), mean absolute difference (MAE), and the number of encoded bits of the motion vector and the rate-distortion parameter lambda.
  • an embodiment of the present application further provides a video encoding apparatus, which includes one or more processors 31 that work independently or together, and the processors include multiple pipeline stages; Memory 32 that stores executable instructions.
  • a search area is determined in the reference frame corresponding to the current image block to be encoded.
  • the encoding cost between the currently to-be-encoded image block and the predicted image blocks corresponding to each of the first target search points is acquired.
  • the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  • the processor 31 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 32 may include at least one type of storage medium including flash memory, hard disk, multimedia card, card-type memory (eg, SD or DX memory 32, etc.), random access memory (RAM), static random access memory (SRAM), read only memory 32 (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the memory 32 may be an internal storage unit of the video encoding apparatus 30, such as a hard disk or a memory.
  • the memory 32 may also be an external storage device of the video encoding device 30, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the video encoding device 30 card, Flash Card, etc. Further, the memory 32 may also include both an internal storage unit of the video encoding apparatus 30 and an external storage device. The memory 32 is used to store computer programs and other programs and data required by the device. The memory 32 may also be used to temporarily store data that has been or will be output.
  • an external storage device of the video encoding device 30 such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the video encoding device 30 card, Flash Card, etc.
  • the memory 32 may also include both an internal storage unit of the video encoding apparatus 30 and an external storage device.
  • the memory 32 is used to store computer programs and other programs and data required by the device.
  • the memory 32
  • one or more search points are spaced between any two first target search points.
  • the number of search points spaced between any two first target search points is determined based on the size of the search area and/or the number of searches.
  • the M search points are arranged in rows and columns.
  • the N first target search points are simultaneously search points on odd-numbered rows and odd-numbered columns in the search area, simultaneously search points on even-numbered columns and even-numbered rows, simultaneously search points on even-numbered rows and odd-numbered columns, or simultaneously odd-numbered search points. Search points on rows and even columns.
  • the number of first target search points in each row is equal to the number of first target search points in other rows
  • the number of first target search points in each column is equal to the number of first target search points in other columns
  • any The interval between the two first target search points is equal.
  • the processor 31 is further configured to: use the first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost as the second target search point, And take the search point at the center position in the search area and the search point in the neighborhood of the search point at the center position as the second target search point; obtain the current image block to be encoded and each of the second The coding cost between the predicted image blocks corresponding to the target candidate search points; from the first target search point with the smallest coding cost and the second target search point, select a corresponding predicted image block with the smallest coding cost as the current The best matching block of the image block to be encoded.
  • the processor when determining the second target search point, is specifically configured to: place the first target search point with the smallest coding cost and the first target search point with the smallest coding cost in the neighborhood of the first target search point with the smallest coding cost
  • the part other than the first target search point is used as the second target search point; and the search point in the center of the search area and the part other than the first target search point in the neighborhood of the search point in the center as the second target search point.
  • the number of search points within the neighborhood is greater than or equal to eight.
  • the neighborhood is an L ⁇ L area, and L represents the number of search points in any row or column in the neighborhood, and L ⁇ 3.
  • the size of the neighborhood is determined according to the size of the search area.
  • the size of the neighborhood is positively correlated with the size of the search area.
  • the processor when determining the search area, is specifically configured to: determine the search area in the reference frame according to the predicted motion vector of the current image block to be encoded; the predicted motion vector is based on one or The motion vectors of a plurality of adjacent coded image blocks are determined.
  • the adjacent coded image blocks include temporally adjacent coded image blocks and/or spatially adjacent coded image blocks.
  • the predicted motion vector is the motion vector of the one with the least coding cost among the one or more adjacent coded image blocks.
  • the processor 31 when determining the search area, is specifically configured to: in the reference frame of the image block currently to be encoded, use the position pointed to by the predicted motion vector as the search starting point, and include The preset range of the search starting point is used as the search area.
  • the coding cost includes at least one of: rate-distortion optimization, absolute error, transformed absolute error, mean squared error, sum of squares of differences, mean absolute difference, or number of bits of a motion vector.
  • non-transitory computer-readable storage medium such as a memory including instructions, executable by a processor of an electronic device to perform the above method.
  • the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
  • the electronic device when the instructions in the storage medium are executed by the processor, the electronic device is enabled to execute the aforementioned motion search method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A motion search method, a video encoding device, and a computer-readable storage medium. The method comprises: for a current image block to be encoded, determining a search area in a reference frame of said current image block; selecting N first target search points among M search points included in the search area, N<M, and any two first target search points not being adjacent; acquiring the encoding costs between said current image block and predicted image blocks corresponding to the first target search points; and determining the predicted image block corresponding to the first target search point having the lowest coding cost as the best matching block of said current image block. The present embodiment is conducive to reducing the number of searches and saving search resources.

Description

运动搜索方法、视频编码装置及计算机可读存储介质Motion search method, video encoding device, and computer-readable storage medium 技术领域technical field
本申请涉及图像编码技术领域,具体而言,涉及一种运动搜索方法、视频编码装置及计算机可读存储介质。The present application relates to the technical field of image coding, and in particular, to a motion search method, a video coding apparatus, and a computer-readable storage medium.
背景技术Background technique
数据视频的压缩编码技术是视频传输中的关键技术之一,通过高效的视频压缩技术将视频进行大幅度的压缩,可以有效的降低对网络传输带宽的需求。Compression and coding technology of data video is one of the key technologies in video transmission. By using efficient video compression technology to greatly compress video, it can effectively reduce the demand for network transmission bandwidth.
目前,在视频编码过程中,通常使用帧内预测方法来消除图像的空间冗余度,使用帧间预测方法来消除时间冗余度。由于视频源的相邻帧间的时间冗余度相比较于帧内的空间冗余度要大得多,那么这就使得帧间预测方法在视频编码中显得极为重要。由于视频序列图像在时间轴上具有较强的相关性,帧间预测方法中的运动估计技术和运动补偿技术可以有效地减少时间冗余,因此,该技术被广泛的应用于视频压缩编码方案中。At present, in the video coding process, the intra-frame prediction method is usually used to eliminate the spatial redundancy of the image, and the inter-frame prediction method is used to eliminate the temporal redundancy. Since the temporal redundancy between adjacent frames of a video source is much larger than the spatial redundancy within a frame, this makes the inter-frame prediction method extremely important in video coding. Because the video sequence images have strong correlation on the time axis, the motion estimation technology and motion compensation technology in the inter prediction method can effectively reduce the temporal redundancy. Therefore, this technology is widely used in video compression coding schemes. .
其中,运动估计技术通常是利用当前帧的待编码图像块在一个或多个参考帧的对应搜索范围内寻找最佳匹配块来完成。具体地,在硬件编码器中,通常会在一定的搜索范围内采用遍历搜索的方式来寻找最佳匹配块,但遍历搜索的次数较多,需要耗费过大的搜索资源,而且搜索效率也比较低。而对于其他的快速搜索算法如菱形搜索算法、六边形搜索算法等,由于其收敛次数是不一定的,其是否收敛取决于每一次搜索的结果是否满足条件,在不满足条件的情况下则继续下一次搜索,因此针对于不同的待编码图像块的搜索时间都是不一定的,而硬件编码器具有一定的性能要求,需要严格把控各个步骤的执行时间,显然,搜索时间不定的快速搜索算法不适用于硬件编码器。Among them, the motion estimation technique is usually completed by using the image block to be encoded in the current frame to find the best matching block within the corresponding search range of one or more reference frames. Specifically, in hardware encoders, traversal search is usually used to find the best matching block within a certain search range, but the number of traversal searches is large, which requires excessive search resources, and the search efficiency is relatively high. Low. For other fast search algorithms such as diamond search algorithm, hexagon search algorithm, etc., because the number of convergence is not certain, whether the convergence depends on whether the result of each search satisfies the conditions, if the conditions are not met, then Continue the next search, so the search time for different image blocks to be encoded is not certain, and the hardware encoder has certain performance requirements, and it is necessary to strictly control the execution time of each step. Obviously, the search time is uncertain and fast The search algorithm does not work with hardware encoders.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请的目的之一是提供一种运动搜索方法、视频编码装置及计算机可读存储介质。In view of this, one of the objectives of the present application is to provide a motion search method, a video encoding device, and a computer-readable storage medium.
第一方面,本申请实施例提供了一种运动搜索方法,包括:In a first aspect, an embodiment of the present application provides a motion search method, including:
对于当前待编码图像块,在所述当前待编码图像块对应的参考帧中确定搜索区域;For the current image block to be encoded, determining a search area in the reference frame corresponding to the current image block to be encoded;
在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻;Select N first target search points from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent;
获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价;obtaining the encoding cost between the current image block to be encoded and the predicted image block corresponding to each of the first target search points;
将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。The predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
第二方面,本申请实施例提供了一种视频编码装置,包括一个或多个处理器,单独的或共同的工作,所述处理器包括多个流水级;以及用于存储可执行指令的存储器;In a second aspect, embodiments of the present application provide a video encoding apparatus, including one or more processors, working individually or together, the processors include multiple pipeline stages; and a memory for storing executable instructions ;
所述处理器执行所述可执行指令时,在在其中一个流水级中执行以下步骤:When the processor executes the executable instructions, the following steps are performed in one of the pipeline stages:
对于当前待编码图像块,在所述当前待编码图像块对应的参考帧中确定搜索区域;For the current image block to be encoded, determining a search area in the reference frame corresponding to the current image block to be encoded;
在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻;Select N first target search points from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent;
获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价;obtaining the encoding cost between the current image block to be encoded and the predicted image block corresponding to each of the first target search points;
将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。The predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
第三方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现第一方面所述的方法。In a third aspect, embodiments of the present application provide a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, implement the method described in the first aspect.
本申请实施例所提供的一种运动搜索方法、视频编码装置及计算机可读存储介质,有利于减少搜索次数,节省搜索资源,提高搜索效率。The motion search method, video encoding device, and computer-readable storage medium provided by the embodiments of the present application are beneficial to reduce the number of searches, save search resources, and improve search efficiency.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.
图1是本申请一个实施例提供的一种视频通信系统的示意图;1 is a schematic diagram of a video communication system provided by an embodiment of the present application;
图2是本申请一个实施例提供的硬件编码器的流水级划分以及执行的示意图;2 is a schematic diagram of pipeline level division and execution of a hardware encoder provided by an embodiment of the present application;
图3是本申请一个实施例提供的一种运动搜索方法的流程示意图;3 is a schematic flowchart of a motion search method provided by an embodiment of the present application;
图4是本申请一个实施例提供的一种两个相邻图像帧的结构示意图;4 is a schematic structural diagram of two adjacent image frames provided by an embodiment of the present application;
图5A是本申请一个实施例提供的搜索区域的示意图;5A is a schematic diagram of a search area provided by an embodiment of the present application;
图5B~图5H是本申请一个实施例提供的选取的第一目标搜索点的示意图;5B to 5H are schematic diagrams of a selected first target search point provided by an embodiment of the present application;
图6是本申请一个实施例提供的另一种运动搜索方法的流程示意图;6 is a schematic flowchart of another motion search method provided by an embodiment of the present application;
图7A和图7B是本申请一个实施例提供的选取的第二目标搜索点的示意图;7A and 7B are schematic diagrams of a selected second target search point provided by an embodiment of the present application;
图8是本申请一个实施例提供的视频编码装置的结构图。FIG. 8 is a structural diagram of a video encoding apparatus provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
本申请实施例中的运动搜索方法应用于多媒体信息的压缩编码过程,多媒体信息包括视频、静态图像、动态图像等。本申请中以视频通信为例进行介绍,图1为典型的视频通信系统示意图,如图1所示:发送端100包括视频采集装置101、视频编码装置102和发送装置103,视频采集装置101将采集到的视频发送至视频编码装置102中进行图像信息的压缩编码,然后通过发送装置103发送出去。接收端200包括接收装置201、视频显示装置203和视频解码装置202,接收装置201接收发送端100发送的压缩的视频数据,视频解码装置202对接收的视频数据进行解码恢复出图像,并将解码出来的图像显示在视频显示装置203上。本申请实施例中的运动估计方法主要应用于视频通信系统中的视频编码装置上,而运动估计是编码过程中占用计算资源的主要部分,面向快速进行运动估计算法的研究对于提高视频编码的整体速度起着重要的作用。The motion search method in the embodiment of the present application is applied to the compression coding process of multimedia information, and the multimedia information includes video, static image, dynamic image, and the like. In this application, video communication is used as an example for introduction. FIG. 1 is a schematic diagram of a typical video communication system. As shown in FIG. 1 , the sending end 100 includes a video capturing device 101, a video encoding device 102 and a sending device 103. The video capturing device 101 will The collected video is sent to the video encoding device 102 for compression encoding of image information, and then sent out through the sending device 103 . The receiving end 200 includes a receiving device 201, a video display device 203 and a video decoding device 202. The receiving device 201 receives the compressed video data sent by the transmitting end 100, and the video decoding device 202 decodes the received video data to recover an image, and decodes the video data. The resulting image is displayed on the video display device 203 . The motion estimation method in the embodiments of the present application is mainly applied to a video coding device in a video communication system, and motion estimation is a major part of computing resources occupied in the coding process, and the rapid research on motion estimation algorithm is important for improving the overall performance of video coding. Speed plays an important role.
运动估计是视频编码和视频处理中广泛使用的一种技术。运动估计的基本思想是将图像序列的每一帧分成许多互不重叠的待编码图像块,并认为待编码图像块内所有像素的位移量都相同,然后对每个待编码图像块到参考帧某一特定搜索范围内根据一定的匹配准则找出与待编码图像块最相似的预测图像块,作为最佳匹配块,最佳匹配块与当前待编码图像块的相对位移即为运动矢量。Motion estimation is a technique widely used in video coding and video processing. The basic idea of motion estimation is to divide each frame of the image sequence into many non-overlapping image blocks to be encoded, and consider that the displacement of all pixels in the image block to be encoded is the same, and then assign each image block to be encoded to the reference frame. The predicted image block most similar to the image block to be coded is found within a certain search range according to certain matching criteria, as the best matching block, and the relative displacement between the best matching block and the current image block to be coded is the motion vector.
视频压缩的时候,只需保存运动矢量和残差数据(最佳匹配块与当前待编码图像块之间的差值)即可,在解码端按照运动矢量指明的位置,从邻近已解码的参考帧中找到 相应的预测图像块,将预测图像块和残差数据相加后就得到了重构数据。在帧间预测编码中,由于活动图像相邻帧中的景物存在着一定的相关性。因此,可将活动图像分成若干块,并设法搜索出每个块在邻近帧图像中的位置,并得出两者之间的空间位置的相对偏移量,得到的相对偏移量就是通常所指的运动矢量,得到运动矢量的过程被称为运动估计。通过运动估计可以去除帧间冗余度,使得视频传输的比特数大为减少,因此,运动估计是视频压缩处理系统中的一个重要组成部分。When compressing video, you only need to save the motion vector and residual data (the difference between the best matching block and the current image block to be coded), and at the decoding end, according to the position indicated by the motion vector, from the adjacent decoded reference The corresponding predicted image block is found in the frame, and the reconstructed data is obtained by adding the predicted image block and the residual data. In the inter-frame predictive coding, there is a certain correlation between the scenes in the adjacent frames of the moving image. Therefore, the moving image can be divided into several blocks, and the position of each block in the adjacent frame image can be searched, and the relative offset of the spatial position between the two can be obtained, and the obtained relative offset is usually Refers to the motion vector, and the process of obtaining the motion vector is called motion estimation. Inter-frame redundancy can be removed through motion estimation, which greatly reduces the number of bits in video transmission. Therefore, motion estimation is an important part of a video compression processing system.
在硬件编码器中,相关技术的做法通常会在一定的搜索范围内采用遍历搜索的方式来寻找最佳匹配块,但遍历搜索的次数较多,需要耗费过大的搜索资源,而且搜索效率也比较低。而对于其他的快速搜索算法如菱形搜索算法、六边形搜索算法等,由于其收敛次数是不一定的,其是否收敛取决于每一次搜索的结果是否满足条件,在不满足条件的情况下则继续下一次搜索,因此针对于不同的待编码图像块的搜索时间都是不一定的,而硬件编码器具有一定的性能要求,需要严格把控各个步骤的执行时间,显然,搜索时间不定的快速搜索算法不适用于硬件编码器。具体来说,为了提高处理速度和资源利用率,在硬件编码器中进行视频编码处理时,通常会划分多个流水级,相应的会将视频编码处理过程拆分成多个步骤,每个流水级并行处理不同的步骤,一般来说,视频编码处理过程包括预测、变换、量化、反变换、反量化、熵编码和环路滤波等步骤,其中,预测步骤又分为帧内预测和帧间预测步骤。因硬件编码器具有一定的性能要求,每个流水级的处理时间是有限制的,因此,搜索时间不定的快速搜索算法不适用于硬件编码器。In hardware encoders, related technologies usually use traversal search to find the best matching block within a certain search range, but the number of traversal searches is large, which requires excessive search resources, and the search efficiency is also high. relatively low. For other fast search algorithms such as diamond search algorithm, hexagon search algorithm, etc., because the number of convergence is not certain, whether the convergence depends on whether the result of each search satisfies the conditions, if the conditions are not met, then Continue the next search, so the search time for different image blocks to be encoded is not certain, and the hardware encoder has certain performance requirements, and it is necessary to strictly control the execution time of each step. Obviously, the search time is uncertain and fast The search algorithm does not work with hardware encoders. Specifically, in order to improve the processing speed and resource utilization, when performing video encoding processing in a hardware encoder, multiple pipeline stages are usually divided, and the video encoding process is divided into multiple steps accordingly. In general, the video coding process includes prediction, transformation, quantization, inverse transformation, inverse quantization, entropy coding, and loop filtering. The prediction step is further divided into intra-frame prediction and inter-frame prediction. prediction step. Because the hardware encoder has certain performance requirements, the processing time of each pipeline stage is limited. Therefore, the fast search algorithm with uncertain search time is not suitable for the hardware encoder.
在一个例子中,请参阅图2,为一个硬件编码器的流水级划分的示意图,流水级一共分为5级,分别为整像素搜索、分像素搜索、帧内预测、模式决策、熵编码和滤波,其中,整像素搜索流水级和分像素搜索流水级进行的是有关帧间搜索的步骤,帧内预测流水级和模式决策流水级进行的是有关帧内搜索的步骤,各流水级并行处理,在图2所示的例子中:In an example, please refer to FIG. 2, which is a schematic diagram of the pipeline stage division of a hardware encoder. The pipeline stages are divided into 5 stages, which are integer pixel search, sub-pixel search, intra prediction, mode decision, entropy coding and Filtering, in which the whole pixel search pipeline stage and the sub-pixel search pipeline stage carry out the steps related to the inter-frame search, the intra-frame prediction pipeline stage and the mode decision pipeline stage carry out the steps related to the intra-frame search, and each pipeline stage is processed in parallel. , in the example shown in Figure 2:
在T1时刻,第N个待编码图像块在整像素搜索流水级中进行整像素搜索处理;N为整数;At time T1, the Nth image block to be encoded is processed by integer pixel search in the integer pixel search pipeline stage; N is an integer;
在T2时刻,第N+1个待编码图像块在整像素搜索流水级中进行整像素搜索处理,第N个待编码图像块在分像素搜索流水级中进行分像素搜索处理;At time T2, the N+1 th image block to be encoded is subjected to integer pixel search processing in the integer pixel search pipeline stage, and the Nth to-be-coded image block is subjected to sub-pixel search processing in the sub-pixel search pipeline stage;
在T3时刻,第N+2个待编码图像块在整像素搜索流水级中进行整像素搜索处理,第N+1个待编码图像块在分像素搜索流水级中进行分像素搜索处理,第N个待编码图像块在帧内预测流水级中进行帧内预测处理;At time T3, the N+2 th image block to be encoded is subjected to integer pixel search processing in the integer pixel search pipeline stage, and the N+1 th image block to be encoded is subjected to sub-pixel search processing in the sub-pixel search pipeline stage. Intra-frame prediction processing is performed in the intra-frame prediction pipeline stage for the image blocks to be encoded;
在T4时刻,第N+3个待编码图像块在整像素搜索流水级中进行整像素搜索处理,第N+2个待编码图像块在分像素搜索流水级中进行分像素搜索处理,第N+1个待编码图像块在帧内预测流水级中进行帧内预测处理,第N个待编码图像块在模式决策流水级中进行模式决策处理;At time T4, the N+3 th image block to be encoded is subjected to integer pixel search processing in the integer pixel search pipeline stage, the N+2 th image block to be encoded is subjected to pixel-by-pixel search processing in the sub-pixel search pipeline stage, and the Nth +1 image block to be encoded is subjected to intra prediction processing in the intra prediction pipeline stage, and the Nth image block to be encoded is subjected to mode decision processing in the mode decision pipeline stage;
在T5时刻,第N+4个待编码图像块在整像素搜索流水级中进行整像素搜索处理,第N+3个待编码图像块在分像素搜索流水级中进行分像素搜索处理,第N+2个待编码图像块在帧内预测流水级中进行帧内预测处理,第N+1个待编码图像块在模式决策流水级中进行模式决策处理,第N个待编码图像块在熵编码和滤波流水级中进行熵编码和滤波处理。At time T5, the N+4th image block to be encoded is subjected to the integer pixel search process in the integer pixel search pipeline stage, the N+3th image block to be encoded is subjected to pixel-by-pixel search processing in the sub-pixel search pipeline stage, and the Nth The +2 to-be-coded image blocks are subjected to intra-frame prediction processing in the intra-frame prediction pipeline stage, the N+1-th to-be-coded image block is subjected to mode decision processing in the mode decision pipeline stage, and the N-th to-be-coded image block is subjected to entropy coding Entropy coding and filtering are performed in the filtering pipeline stage.
当然,可以理解的是,以上流水级的划分仅为举例说明,可根据实际需要划分不同的流水级,本实施例对此不做任何限制。其中,各流水级的执行时间相对固定,因此,搜索时间不定的快速搜索算法不适用于硬件编码器中。Of course, it can be understood that the above division of flow levels is only for illustration, and different flow levels may be divided according to actual needs, which is not limited in this embodiment. Among them, the execution time of each pipeline stage is relatively fixed, so the fast search algorithm with indefinite search time is not suitable for hardware encoders.
本申请实施例的运动搜索方法可应用于包括多个流水级的芯片上,所述芯片可安装于视频编码装置上,由所述视频编码装置使用所述流水级进行视频编码处理,其中,本申请实施例的运动搜索方法可在其中一个流水级中执行。或者,本申请实施例的运动搜索方法也可以在软件编码器上执行,本申请实施例对此不做任何限制。The motion search method in the embodiments of the present application may be applied to a chip including multiple pipeline stages, the chip may be installed on a video encoding device, and the video encoding device uses the pipeline stages to perform video encoding processing, wherein the present The motion search method of an application embodiment may be performed in one of the pipeline stages. Alternatively, the motion search method in the embodiment of the present application may also be executed on a software encoder, which is not limited in the embodiment of the present application.
请参与图3,为本申请实施例提供的一种运动搜索方法,其可应用于视频编码装置上,所述方法包括:Please refer to FIG. 3 , which is a motion search method provided by an embodiment of the present application, which can be applied to a video encoding device, and the method includes:
在步骤S101中,对于当前待编码图像块,在所述当前待编码图像块对应的参考帧中确定搜索区域。In step S101, for the current image block to be encoded, a search area is determined in the reference frame corresponding to the current image block to be encoded.
在步骤S102中,在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻。In step S102, N first target search points are selected from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent.
在步骤S103中,获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价。In step S103, the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the first target search points is acquired.
在步骤S104中,将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。In step S104, the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
根据本发明的一实施方式,在第一方向上的任意两个第一目标搜索点不相邻,以及在第二方向上的任意两个第一目标搜索点相邻;其中,所述第一方向与所述第二方向之间具有一夹角。该夹角可以为0~90度。According to an embodiment of the present invention, any two first target search points in the first direction are not adjacent, and any two first target search points in the second direction are adjacent; wherein the first There is an included angle between the direction and the second direction. The included angle may be 0 to 90 degrees.
根据本发明的一实施方式,待编码图像块是指:要进行运动估计的预测单元。例如,在进行预测环节时使用的基本编码单元为预测单元PU(Prediction Unit),所有和预 测相关的操作都是以PU为单位的。例如:帧内预测的方向、帧间预测的运动矢量差和参考帧索引、运动矢量预测、运动估计以及运动补偿都是基于PU进行处理的。在高效率视频编解码(High Efficiency Video Coding,HEVC)中有3种预测类型:Skip,Intra,Inter。预测类型是影响PU分割的主要因素。例如:Skip模式下预测单元PU大小可以是8×8到64×64;Intra模式下,预测单元PU大小可能是4×4至64×64;Inter模式下,预测单元PU大小可能是8×4或者4×8到64×64。由于运动估计是对图像帧进行编码的过程,在运动估计过程中会将图像帧分成许多互不重叠的待编码图像块,所以本申请实施例将要进行运动估计的预测单元称为待编码图像块。可以理解的是,在实际应用过程中,不同的视频压缩标准,其划分的待编码图像块的大小也有所不同,其命名可能也有所不同,可依据实际应用场景进行具体设置,本申请实施例对此不做任何限制。According to an embodiment of the present invention, an image block to be encoded refers to a prediction unit to be subjected to motion estimation. For example, the basic coding unit used in the prediction link is the prediction unit PU (Prediction Unit), and all prediction-related operations are in units of PU. For example, the direction of intra prediction, the motion vector difference and reference frame index of inter prediction, motion vector prediction, motion estimation and motion compensation are all processed based on PU. There are 3 prediction types in High Efficiency Video Coding (HEVC): Skip, Intra, Inter. The prediction type is the main factor that affects PU segmentation. For example: in Skip mode, the PU size of the prediction unit may be 8×8 to 64×64; in Intra mode, the size of the prediction unit PU may be 4×4 to 64×64; in Inter mode, the size of the prediction unit PU may be 8×4 Or 4×8 to 64×64. Since motion estimation is a process of encoding an image frame, the image frame is divided into many non-overlapping image blocks to be encoded during the process of motion estimation. Therefore, in this embodiment of the present application, the prediction unit to be subjected to motion estimation is referred to as an image block to be encoded. . It can be understood that, in the actual application process, different video compression standards have different sizes of the image blocks to be encoded, and their names may also be different. Specific settings can be made according to the actual application scenario. There are no restrictions on this.
本申请实施例中的参考帧是指:先前已编码的图像帧。参考帧是用于当前帧进行编码时所需参考的帧。参考帧在时间上可以超前或者滞后于当前帧,当在参考帧中搜索到当前帧中的当前待编码图像块的最佳匹配块时,可以进一步得到当前待编码图像块的运动矢量。The reference frame in this embodiment of the present application refers to an image frame that has been previously encoded. The reference frame is a frame that is used for reference when the current frame is encoded. The reference frame may advance or lag behind the current frame in time. When the best matching block of the current image block to be encoded in the current frame is searched in the reference frame, the motion vector of the current image block to be encoded can be further obtained.
对于步骤S101,所述视频编码装置在确定搜索区域时,可以根据所述当前待编码图像块的预测运动矢量在所述参考帧中确定搜索区域;其中,考虑到相邻的编码图像块具有一定的相关性,因此,所述当前待编码图像块的预测运动矢量可以基于一个或多个相邻的已编码图像块的运动矢量确定,从而有利于提高搜索效率。For step S101, when determining the search area, the video encoding apparatus may determine the search area in the reference frame according to the predicted motion vector of the current image block to be encoded; wherein, considering that the adjacent encoded image blocks have certain Therefore, the predicted motion vector of the currently to-be-coded image block can be determined based on the motion vectors of one or more adjacent coded image blocks, thereby helping to improve search efficiency.
在一种实现方式中,考虑到在时间上与所述当前待编码图像块相邻的编码图像块、以及在空间上与所述当前待编码图像块相邻的编码图像块均与所述待编码图像具有一定的相关性,即是说,所述相邻的已编码图像块可以包括在时间上相邻的已编码图像块和/或(和/或表示两者或者两者之一)在空间上相邻的已编码图像块。In an implementation manner, considering that the coded image blocks temporally adjacent to the current to-be-coded image block and the coded image blocks spatially adjacent to the current to-be-coded image block are both the same as the to-be-coded image block The coded image has a certain correlation, that is, the adjacent coded image blocks may include temporally adjacent coded image blocks and/or (and/or represent both or either) in Spatially adjacent coded image blocks.
在一个例子中,视频数据10包括多帧图像,每帧图像可以被划分为若干个待编码图像块。请参阅图4,图像帧11和图像帧12为视频数据10中2个连续相邻的帧,其中,图像帧11为已编码的图像,图像帧12为当前正在编码中的图像,图像帧11包括4个已编码图像块,分别为已编码图像块111、已编码图像块112、已编码图像块113和已编码图像块114。图像帧12包括已编码图像块121、已编码图像块122、待编码图像块123和待编码图像块124;当前要对待编码图像块123进行编码,则待编码图像块123的预测运动矢量可以基于相邻的已编码图像块运动矢量确定,与待编码图像块123在空间上相邻的已编码图像块包括已编码图像块121和已编码图像块122,与 待编码图像块123在时间上相邻的已编码图像块包括已编码图像块113,即根据已编码图像块113、已编码图像块121和已编码图像块122的运动矢量确定所述待编码图像块123的预测运动矢量。本实施例中,考虑到相邻的已编码块与所述当前待编码图像块有一定的相关性,因此根据相邻的已编码图像块运动矢量确定所述当前待编码图像块的预测运动矢量,能够提高后续定位的搜索区域的准确性,从而提高搜索效率。In one example, the video data 10 includes multiple frames of images, and each frame of image may be divided into several image blocks to be encoded. Referring to FIG. 4, image frame 11 and image frame 12 are two consecutive adjacent frames in video data 10, wherein image frame 11 is an encoded image, image frame 12 is an image currently being encoded, image frame 11 It includes 4 coded image blocks, namely coded image block 111 , coded image block 112 , coded image block 113 and coded image block 114 . The image frame 12 includes the coded image block 121, the coded image block 122, the to-be-coded image block 123, and the to-be-coded image block 124; the to-be-coded image block 123 is currently to be encoded, and the predicted motion vector of the to-be-coded image block 123 can be based on The motion vector of the adjacent coded image blocks is determined, and the coded image blocks adjacent to the to-be-coded image block 123 in space include the coded image block 121 and the coded image block 122, which are temporally similar to the to-be-coded image block 123. The adjacent coded image blocks include the coded image block 113 , that is, the predicted motion vector of the to-be-coded image block 123 is determined according to the motion vectors of the coded image block 113 , the coded image block 121 and the coded image block 122 . In this embodiment, considering that adjacent coded blocks have a certain correlation with the current image block to be coded, the predicted motion vector of the currently coded image block is determined according to the motion vector of the adjacent coded image block , which can improve the accuracy of the search area for subsequent positioning, thereby improving the search efficiency.
这里对根据相邻的已编码图像块的运动矢量确定所述当前待编码图像块的预测运动矢量进行说明:在一种实现方式中,在当前帧中的当前待编码图像块的相邻的已编码图像块有多个的情况下,为了进一步提高搜索效率,要从相邻的多个已编码图像块中选择与所述当前待编码图像块相关度最高的相邻的已编码图像块,并依据所述相关度最高的相邻的已编码图像块的运动矢量来确定预测运动矢量。具体来说,首先,分别利用与所述当前待编码图像块相邻的各个已编码图像块的各个运动矢量,在参考帧中确定各个运动向量对应的已编码图像块;比如所述视频编码装置首先获取所述当前待编码图像块在当前帧中的位置信息,然后根据所述位置信息在参考帧中确定所述位置信息指向的位置,根据与所述当前待编码图像块相邻的各个已编码图像块的各个运动矢量将所述位置进行偏移,得到各个运动向量分别对应的已编码图像块。接着,通过比较各个运动向量在参考帧中对应的已编码图像块与当前待编码图像块之间的编码代价,确定所述当前待编码图像块的预测运动矢量。例如,在参考帧中确定的各个已编码图像块中选取编码代价最小的已编码图像块,并将所述编码代价最小的已编码图像块对应的运动矢量作为预测运动矢量。这样,后续在基于所述当前待编码图像块的所述预测运动矢量确定搜索区域时,能够使确定的搜索区域更为准确,从而能够更快找到所述当前待编码图像块的最佳匹配块,有利于提高搜索效率,节省搜索资源。Determining the predicted motion vector of the currently to-be-coded image block according to the motion vector of the adjacent coded image block is described here: When there are multiple coded image blocks, in order to further improve the search efficiency, the adjacent coded image block with the highest correlation with the current to-be-coded image block should be selected from the adjacent multiple coded image blocks, and The predicted motion vector is determined according to the motion vector of the adjacent coded image block with the highest correlation. Specifically, first, each motion vector of each encoded image block adjacent to the current image block to be encoded is used to determine the encoded image block corresponding to each motion vector in the reference frame; for example, the video encoding device First obtain the position information of the current image block to be coded in the current frame, and then determine the position pointed to by the position information in the reference frame according to the position information. Each motion vector of the coded image block offsets the position to obtain the coded image block corresponding to each motion vector. Next, by comparing the coding cost between the coded image block corresponding to each motion vector in the reference frame and the current to-be-coded image block, the predicted motion vector of the current to-be-coded image block is determined. For example, from each coded image block determined in the reference frame, the coded image block with the least coding cost is selected, and the motion vector corresponding to the coded image block with the least coding cost is used as the predicted motion vector. In this way, when the search region is subsequently determined based on the predicted motion vector of the current image block to be encoded, the determined search region can be made more accurate, so that the best matching block of the current image block to be encoded can be found more quickly , which is beneficial to improve search efficiency and save search resources.
在一个例子中,请参阅图4,比如当前帧的当前待编码图像块123的相邻已编码图像块包括已编码图像块113、已编码图像块121和已编码图像块122,比如参考帧为图像帧11,图像帧11为已编码的图像,所述视频编码装置确定当前待编码图像块123在当前帧12中的位置信息,然后在参考帧(即图像帧11)中确定所述位置信息指向的位置,接着根据已编码图像块113、已编码图像块121和已编码图像块122的运动矢量将所述位置进行偏移,在参考帧(即图像帧11)中确定已编码图像块113、已编码图像块121和已编码图像块122的运动矢量分别对应的已编码图像块,最后计算各个运动矢量分别对应的已编码图像块分别与所述当前待编码图像块123之间的编码代价,将编码代价最小的一个对应的运动矢量作为所述当前待编码图像块123的预测运动矢量。In an example, please refer to FIG. 4 , for example, the adjacent coded image blocks of the current image block 123 to be coded in the current frame include the coded image block 113 , the coded image block 121 and the coded image block 122 . For example, the reference frame is Image frame 11, the image frame 11 is an encoded image, and the video encoding device determines the position information of the image block 123 to be encoded in the current frame 12, and then determines the position information in the reference frame (ie, the image frame 11). point, and then offset the positions according to the motion vectors of the encoded image block 113, the encoded image block 121, and the encoded image block 122, and determine the encoded image block 113 in the reference frame (ie, image frame 11). , the encoded image blocks corresponding to the motion vectors of the encoded image block 121 and the encoded image block 122 respectively, and finally calculate the encoding cost between the encoded image blocks corresponding to the respective motion vectors and the currently to-be-encoded image block 123 , and a corresponding motion vector with the least coding cost is used as the predicted motion vector of the image block 123 currently to be coded.
在另一实施方式中,可以按照预定的选取规则,从与当前帧的当前待编码图像块对应的各个相邻的已编码图像块的运动矢量中直接选取出所述当前待编码图像块的预测运动矢量。比如,所述选取规则包括选择特定位置的相邻的已编码图像块的运动矢量作为所述当前待编码图像块的预测运动矢量;在一个例子中,请参阅图4,与待编码图像块123在空间上相邻的已编码图像块包括已编码图像块121和已编码图像块122,与待编码图像块123在时间上相邻的已编码图像块包括已编码图像块113,比如所述选择规则可以是选择所述与待编码图像块123在空间上相邻且处于上方的已编码图像块,即已编码图像块121。In another embodiment, the prediction of the current to-be-coded image block can be directly selected from the motion vectors of each adjacent coded image block corresponding to the current to-be-coded image block of the current frame according to a predetermined selection rule Motion vector. For example, the selection rule includes selecting the motion vector of the adjacent coded image block at a specific position as the predicted motion vector of the current image block to be coded; in an example, please refer to FIG. Spatially adjacent coded image blocks include coded image block 121 and coded image block 122, and coded image blocks temporally adjacent to to-be-coded image block 123 include coded image block 113, for example, the selection The rule may be to select the encoded image block that is spatially adjacent to and above the image block to be encoded 123 , that is, the encoded image block 121 .
在一个实施方式中,所述编码代价包括但不限于率失真优化(Rate DistortionOptimized,RDO)。在其他实施方式中,可以利用绝对误差(Sum of Absolute Difference,SAD)、变换后的绝对误差和(Sum of Absolute Transformed Difference,SATD)、平均平方误差(MSE)、差值的平方和(sum of squared difference,SSD)、平均绝对差值(MAE)中的任意一个,以及运动矢量的编码比特数和率失真参数lambda来推导出所述编码代价。In one embodiment, the encoding cost includes, but is not limited to, Rate Distortion Optimized (RDO). In other embodiments, the Sum of Absolute Difference (SAD), the Sum of Absolute Transformed Difference (SATD), the Mean Squared Error (MSE), the Sum of the Differences (sum of The encoding cost is derived from any one of squared difference, SSD), mean absolute difference (MAE), and the number of encoded bits of the motion vector and the rate-distortion parameter lambda.
在确定所述当前待编码图像块的预测运动矢量之后,在所述当前待编码图像块的参考帧中,所述视频编码装置将所述预测运动矢量指向的位置作为搜索起点,以及将包括所述搜索起点的预设范围作为所述搜索区域。可以理解的是,所述预设范围可依据实际应用场景进行具体设置,本实施例对此不做任何限制。本实施例中,根据相邻的已编码图像块的运动矢量确定所述当前待编码图像块的预测运动矢量,由于相邻的已编码图像块与所述待编码图像具有一定的相关性,换句话说,相邻的已编码图像块与所述待编码图像具有一定的相似性,比如在一张天空图像中,绝大部分都是天空区域,天空区域的像素之间就比较相似,则基于天空区域划分得到的相邻两个图像块之间也具有较高的相似度则在根据相邻的已编码图像块的运动矢量确定的搜索区域内,有很大的概率也可以搜索到所述当前待编码图像块的最佳匹配块,从而有利于提高搜索效率,节省搜索资源。After determining the predicted motion vector of the currently to-be-encoded image block, in the reference frame of the currently to-be-encoded image block, the video encoding apparatus uses the position pointed by the predicted motion vector as a search starting point, and will include the The preset range of the search starting point is used as the search area. It can be understood that, the preset range may be specifically set according to an actual application scenario, which is not limited in this embodiment. In this embodiment, the predicted motion vector of the current image block to be coded is determined according to the motion vector of the adjacent coded image block. Since the adjacent coded image block and the image to be coded have a certain correlation, change In other words, adjacent coded image blocks have a certain similarity with the image to be coded. For example, in a sky image, most of them are sky areas, and the pixels in the sky area are similar. There is also a high degree of similarity between two adjacent image blocks obtained by dividing the sky area. In the search area determined according to the motion vectors of adjacent coded image blocks, there is a high probability that the The best matching block of the current image block to be coded, thereby helping to improve search efficiency and save search resources.
在一种实现方式中,将包括所述搜索起点的预设范围作为所述搜索区域,可以是将所述搜索起点为中心点的预设范围作为所述搜索区域,即是说,在所述搜索起点的周围搜索所述当前待编码图像块的最佳匹配块,考虑到所述搜索起点由与所述当前待编码图像块相邻的已编码图像块的运动矢量所确定,而相邻的已编码图像块与所述待编码图像具有一定的相关性,则将所述搜索起点的周围区域确定为搜索区域,有利于保证在该搜索区域内快速搜索到所述当前待编码图像块的最佳匹配块。In an implementation manner, a preset range including the search starting point may be used as the search area, which may be a preset range with the search starting point as the center point as the search area, that is, in the The best matching block of the current image block to be encoded is searched around the search starting point, considering that the search starting point is determined by the motion vector of the encoded image block adjacent to the current image block to be encoded, and the adjacent image block is determined by the motion vector. The coded image block has a certain correlation with the to-be-coded image, and the surrounding area of the search starting point is determined as the search area, which is beneficial to ensure that the most recent image block to be coded can be quickly searched in the search area. Best matching block.
接着,在步骤S102中,在所述搜索区域内,考虑到遍历搜索耗费的搜索资源较大,搜索效率也比较低,因此,本实施例中所述视频编码装置在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点,N<M,并且在至少一方向上的任意两个第一目标搜索点不相邻;这样,相对于相比于遍历搜索,能够大幅度降低搜索次数,提高搜索效率,节省搜索资源。Next, in step S102, in the search area, considering that the search resources consumed by the traversal search are relatively large and the search efficiency is relatively low, therefore, the video encoding apparatus in this embodiment includes the search area. Select N first target search points from M search points, N<M, and any two first target search points in at least one direction are not adjacent; in this way, compared with traversal search, it can greatly reduce Search times, improve search efficiency and save search resources.
可以理解的是,本申请对于所述N个第一目标搜索点的搜索顺序不做任何限制,可依据实际应用场景进行具体设置。在一个实施方式中,上述的N个第一目标搜索点的搜索顺序是,从左到右,从上到下。在另一实施方式中,上述的N的第一目标搜索点的搜索顺序是逐行扫描和逐列扫描两种顺序。It can be understood that the present application does not impose any restrictions on the search order of the N first target search points, and specific settings may be made according to actual application scenarios. In one embodiment, the search sequence of the above-mentioned N first target search points is from left to right and from top to bottom. In another embodiment, the above-mentioned search order of the first target search point of N is two orders of row-by-row scanning and column-by-column scanning.
在一个示例性的实施例中,所述M个搜索点以行列形式排布,请参阅图5A,所述搜索区域为9*9的搜索区域,包括81个搜索点;在一个例子中,以任意两个第一目标搜索点之间间隔一个搜索点为例进行说明,请参阅图5B,所述N个第一目标搜索点可以同时分别为所述搜索区域内奇数行奇数列上的搜索点(图中灰色的点),则在进行搜索时,可以基于设定的搜索顺序进行搜索,比如搜索顺序是从左到右,从上到下,选取规则是奇数行奇数列上的搜索点,则从第一行第一列开始搜索,从左到右,依次是第一行第三列,第一行第五列,第一行第七列以及第一行第九列上的搜索点,接着从上到下,从第三行第一列开始从左到右搜索,依次类推,直到搜索到第九行第九列上的搜索点,此时搜索结束。In an exemplary embodiment, the M search points are arranged in rows and columns, please refer to FIG. 5A , the search area is a 9*9 search area, including 81 search points; Taking a search point spaced between any two first target search points as an example, please refer to FIG. 5B , the N first target search points can be respectively search points on odd rows and odd columns in the search area at the same time. (gray point in the figure), when searching, you can search based on the set search order, for example, the search order is from left to right, from top to bottom, the selection rule is the search points on odd rows and odd columns, Then start the search from the first row and the first column, from left to right, the search points on the first row and the third column, the first row and the fifth column, the first row and the seventh column, and the first row and the ninth column, Then search from top to bottom, starting from the third row and the first column, from left to right, and so on, until the search point on the ninth row and ninth column is searched, and the search ends.
或者,请参阅图5C,所述N个第一目标搜索点可以同时为偶数列偶数行上的搜索点(图中灰色的点),则在进行搜索时,比如搜索顺序是从左到右,从上到下,选取规则是偶数列偶数行上的搜索点,则从第二行第二列开始搜索,从左到右,依次是第二行第四列,第二行第六列以及第二行第八列上的搜索点,接着从上到下,从第四行第二列开始从左到右搜索,依次类推,直到搜索到第八行第八列上的搜索点,此时搜索结束。Alternatively, referring to FIG. 5C , the N first target search points can be search points on even rows and even columns at the same time (gray points in the figure), then when searching, for example, the search order is from left to right, From top to bottom, the selection rule is the search points on the even-numbered columns and even-numbered rows, then the search starts from the second row and the second column, from left to right, the second row, the fourth column, the second row, the sixth column, and the second row. The search point on the second row and the eighth column is searched from top to bottom, starting from the fourth row and the second column from left to right, and so on, until the search point on the eighth row and eighth column is searched. end.
或者,请参阅图5D,所述N个第一目标搜索点可以同时为偶数行奇数列上的搜索点(图中灰色的点),则在进行搜索时,比如搜索顺序是从左到右,从上到下,选取规则是偶数行奇数列上的搜索点,则从第二行第一列开始搜索,从左到右,依次是第二行第三列,第二行第五列,第二行第七列以及第二行第九列上的搜索点,接着从上到下,从第四行第一列开始从左到右搜索,依次类推,直到搜索到第八行第九列上的搜索点,此时搜索结束。Alternatively, referring to FIG. 5D , the N first target search points may be search points on even rows and odd columns at the same time (gray points in the figure), then when searching, for example, the search order is from left to right, From top to bottom, the selection rule is the search point on the even-numbered row and odd-numbered column, then the search starts from the second row and the first column, and from left to right, the order is the second row, the third column, the second row, the fifth column, the first column. The search point on the seventh column of the second row and the ninth column of the second row, then from top to bottom, starting from the fourth row and the first column to search from left to right, and so on, until the search point is on the eighth row and the ninth column search point, the search ends.
或者,请参阅图5E,所述N个第一目标搜索点可以同时为偶数列奇数行上的搜索 点(图中灰色的点),则在进行搜索时,比如搜索顺序是从左到右,从上到下,选取规则是偶数列奇数行上的搜索点,则从第一行第二列开始搜索,从左到右,依次是第一行第四列,第一行第六列以及第一行第八列上的搜索点,接着从上到下,从第三行第二列开始从左到右搜索,依次类推,直到搜索到第九行第八列上的搜索点,此时搜索结束。Alternatively, referring to FIG. 5E, the N first target search points may be search points on odd-numbered rows of even columns at the same time (gray points in the figure), then when searching, for example, the search order is from left to right, From top to bottom, the selection rule is the search point on the even-numbered column and the odd-numbered row, then start the search from the first row and the second column, from left to right, the first row, the fourth column, the first row, the sixth column, and the first row. The search point on the eighth column of a row, then from top to bottom, starting from the third row and the second column to search from left to right, and so on, until the search point on the ninth row and the eighth column is searched, then search end.
在另一个例子中,以任意两个第一目标搜索点之间间隔两个搜索点为例进行说明,请参阅图5F,则在进行搜索时,比如搜索顺序是从左到右,从上到下,选取规则是从偶数行偶数列开始选取,则从第二行第二列开始搜索,从左到右,依次是第二行五列,第二行第八列;接着从上到下,从第五行第二列开始从左到右搜索,依次类推,直到搜索到第八行第八列上的搜索点,此时搜索结束。或者,选择规则也可以是从偶数行奇数列、奇数行奇数列或者奇数行偶数列开始选取,可依据实际应用场景进行具体设置。In another example, taking two search points spaced between any two first target search points as an example, please refer to FIG. 5F , when searching, for example, the search order is from left to right, top to top The selection rule is to start from the even-numbered rows and even-numbered columns, then start the search from the second row and the second column, from left to right, followed by the second row and five columns, the second row and the eighth column; then from top to bottom, The search starts from the fifth row and the second column from left to right, and so on, until the search point on the eighth row and the eighth column is searched, and the search ends. Alternatively, the selection rule may also be selected from even rows and odd columns, odd rows and odd columns, or odd rows and even columns, which can be specifically set according to actual application scenarios.
根据本发明的一实施方式,在第一方向上的任意两个第一目标搜索点不相邻,以及在第二方向上的任意两个第一目标搜索点相邻;其中,第一方向和第二方向为任意两个目标搜索点之间的连线指示的方向。也就是说,第一方向和第二方向分别为将所述当前待编码图像块对应的参考帧中的任意两个目标搜索点在参考帧中的位置分别作为起点和终点而得到的连线所指示的方向。第一方向与第二方向之间具有一夹角。该夹角可以为0~180度。请参阅图5G,第一方向为a方向,第二方向为b方向。在a方向(即,水平方向)上,任意两个第一目标搜索点(即,图中灰色的点)不相邻。然而,在b方向(即,垂直方向)上,任意两个第一目标搜索点(即,图中灰色的点)相邻。其中a方向和b方向之间的夹角为90度。也就是说,a方向和b方向正交。According to an embodiment of the present invention, any two first target search points in the first direction are not adjacent, and any two first target search points in the second direction are adjacent; wherein the first direction and The second direction is the direction indicated by the connecting line between any two target search points. That is to say, the first direction and the second direction are respectively formed by connecting lines obtained by taking the positions of any two target search points in the reference frame corresponding to the current image block to be encoded as the starting point and the ending point, respectively. indicated direction. There is an included angle between the first direction and the second direction. The included angle may be 0 to 180 degrees. Referring to FIG. 5G , the first direction is the a direction, and the second direction is the b direction. In the a direction (ie, the horizontal direction), any two first target search points (ie, the gray points in the figure) are not adjacent. However, in the b direction (ie, the vertical direction), any two first target search points (ie, the gray points in the figure) are adjacent. The angle between the a direction and the b direction is 90 degrees. That is, the a direction and the b direction are orthogonal.
请参阅图5H,在另一实施方式中,第一方向为a方向或者b方向,第二方向为c方向。在a方向或者b方向上,任意两个第一目标搜索点不相邻。然而,在c方向上,任意两个第一目标搜索点相邻。其中,a方向和c方向的夹角为45度。b方向和c方向的夹角也为45度。Referring to FIG. 5H , in another embodiment, the first direction is the a-direction or the b-direction, and the second direction is the c-direction. In the a direction or the b direction, any two first target search points are not adjacent. However, in the c direction, any two first target search points are adjacent. Among them, the angle between the a direction and the c direction is 45 degrees. The angle between the b direction and the c direction is also 45 degrees.
其中,本实施例中选择的任意两个第一目标搜索点不相邻的原因,是考虑到相邻的搜索点对应的预测图像块的相关度是比较高的,如果当前的搜索点对应的预测图像块不是所述当前待编码图像块的最佳匹配块,那么相邻的搜索点对应的预测图像块也极大可能不是所述当前待编码图像块的最佳匹配块。如果将相邻的搜索点均作为第一目标搜索点进行搜索,难免使得搜索效率太低。因此,在选择第一目标搜索点的时候,可以选择不相邻的搜索点作为第一目标搜索点,这样能够节省搜索资源,也减少了搜 索次数。另外,因为选择了不相邻的搜索点作为第一目标搜索点,所述第一目标搜索点均匀分布于所述搜索区域中,这样,可以实现对搜索区域的均匀搜索,保证搜索到较优的结果。The reason why any two first target search points selected in this embodiment are not adjacent is that the correlation of the predicted image blocks corresponding to the adjacent search points is relatively high. If the predicted image block is not the best matching block of the current image block to be coded, then the predicted image block corresponding to the adjacent search point is also very likely not the best matching block of the current image block to be coded. If the adjacent search points are all used as the first target search points to be searched, the search efficiency will inevitably be too low. Therefore, when selecting the first target search point, non-adjacent search points can be selected as the first target search point, which can save search resources and reduce the number of searches. In addition, because non-adjacent search points are selected as the first target search points, the first target search points are evenly distributed in the search area, so that the search area can be uniformly searched to ensure that the best search results are obtained. the result of.
在一实施例中,任意两个第一目标搜索点之间可以间隔一个或多个搜索点。进一步地,上下相邻的两个第一目标搜索点位于同一列,并且左右相邻的两个第一目标搜索点位于同一行。作为一种实现方式,任意两个第一目标搜索点之间间隔的搜索点的数量可以基于所述搜索区域的大小和/或(和/或表示两者或者两者之一)搜索的次数所确定。比如任意两个第一目标搜索点之间间隔的搜索点的数量可以跟所述搜索区域呈正相关关系,以及跟所述搜索的次数呈负相关关系。在搜索的次数固定的情况下,搜索区域越大,任意两个第一目标搜索点之间间隔的搜索点的数量越多,反之,搜索区域越小,任意两个第一目标搜索点之间间隔的搜索点的数量越少。在搜索区域固定的情况下,搜索的次数越多,任意两个第一目标搜索点之间间隔的搜索点的数量越少,反之,搜索的次数越少,任意两个第一目标搜索点之间间隔的搜索点的数量越多。In one embodiment, one or more search points may be spaced between any two first target search points. Further, the two first target search points adjacent to the top and bottom are located in the same column, and the two first target search points adjacent to the left and right are located in the same row. As an implementation, the number of search points spaced between any two first target search points may be determined based on the size of the search area and/or the number of searches (and/or representing either or both) of the search points. Sure. For example, the number of search points spaced between any two first target search points may have a positive correlation with the search area, and a negative correlation with the number of searches. When the number of searches is fixed, the larger the search area, the greater the number of search points spaced between any two first target search points. The smaller the number of spaced search points. In the case where the search area is fixed, the more times the search is performed, the smaller the number of search points spaced between any two first target search points. The greater the number of search points in the interval.
在一示例性的实施例中,所述M个搜索点以行列形式排布,请参阅图5A,所述搜索区域为9*9的搜索区域,包括81个搜索点;在一个例子中,以任意两个第一目标搜索点之间间隔一个搜索点为例进行说明,则请参阅图5B、图5C、图5D以及图5E,所述N个第一目标搜索点可以同时为所述搜索区域内奇数行奇数列上的搜索点、同时为偶数列偶数行上的搜索点、同时为偶数行奇数列上的搜索点,或者同时为奇数行偶数列上的搜索点(图中灰色的点),所述第一目标搜索点均匀分布于所述搜索区域中,实现对搜索区域的均匀搜索,保证搜索到较优的结果;在另一个例子中,请参阅图5F,任意两个第一目标搜索点之间间隔两个搜索点;可见,每一行的第一目标搜索点的数量与其他行的第一目标搜索点的数量相等,并且位于每一行中的任意两个第一目标搜索点之间的间隔相等;和/或每一列的第一目标搜索点的数量与其他列的第一目标搜索点的数量相等,并且位于每一列的任意两个第一目标搜索点之间的间隔相等,这样,可以实现对搜索区域的均匀搜索,保证搜索到较优的结果。In an exemplary embodiment, the M search points are arranged in rows and columns, please refer to FIG. 5A , the search area is a 9*9 search area, including 81 search points; Taking one search point between any two first target search points as an example, please refer to FIG. 5B , FIG. 5C , FIG. 5D and FIG. 5E , the N first target search points can be the search area at the same time Search points on odd-numbered rows and odd-numbered columns, search points on even-numbered rows, even-numbered rows, odd-numbered columns, or search points on odd-numbered rows and even-numbered columns at the same time (gray points in the figure) , the first target search points are evenly distributed in the search area, so as to achieve a uniform search in the search area and ensure that the search results are better; in another example, please refer to FIG. 5F, any two first targets There are two search points between the search points; it can be seen that the number of first target search points in each row is equal to the number of first target search points in other rows, and is located between any two first target search points in each row. and/or the number of first target search points in each column is equal to the number of first target search points in other columns, and the interval between any two first target search points located in each column is equal, In this way, a uniform search of the search area can be achieved, and better results can be ensured.
在步骤S103中,在获取所述第一目标搜索点之后,所述视频编码装置可以针对所述第一目标搜索点进行搜索,比如上述的N个第一目标搜索点的搜索顺序是,从左到右,从上到下。In step S103, after acquiring the first target search point, the video encoding apparatus may search for the first target search point. For example, the search order of the above N first target search points is: to the right, top to bottom.
考虑到任意两个图像块的编码代价可以体现两者之间的差异程度,因此,所述视频编码装置可以获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价,则编码代价最小的第一目标搜索点即为所述当前待编码图 像块的最佳匹配点。在一个例子中,请参阅图5B,在搜索过程中,所述视频编码装置获取所述当前待编码图像块与奇数行奇数列上的第一目标搜索点对应的预测图像块之间的编码代价。或者,在一个例子中,请参阅图5C,在搜索过程中,所述视频编码装置获取所述当前待编码图像块与偶数行偶数列上的第一目标搜索点对应的预测图像块之间的编码代价。或者,在一个例子中,请参阅图5D,在搜索过程中,所述视频编码装置获取所述当前待编码图像块与偶数行奇数列上的第一目标搜索点对应的预测图像块之间的编码代价。或者,在一个例子中,请参阅图5E,在搜索过程中,所述视频编码装置获取所述当前待编码图像块与奇数行偶数列上的第一目标搜索点对应的预测图像块之间的编码代价。Considering that the encoding cost of any two image blocks can reflect the degree of difference between the two, the video encoding apparatus can obtain the predicted images corresponding to the current image blocks to be encoded and each of the first target search points respectively. encoding cost between blocks, the first target search point with the smallest encoding cost is the best matching point of the current image block to be encoded. In an example, please refer to FIG. 5B , during the search process, the video encoding apparatus obtains the encoding cost between the current image block to be encoded and the predicted image block corresponding to the first target search point on odd rows and odd columns . Or, in an example, referring to FIG. 5C , during the search process, the video encoding apparatus obtains the difference between the current image block to be encoded and the predicted image block corresponding to the first target search point on the even-numbered rows and even-numbered columns. encoding cost. Or, in an example, referring to FIG. 5D , during the search process, the video encoding apparatus obtains the difference between the current image block to be encoded and the predicted image block corresponding to the first target search point on the even row and odd column. encoding cost. Or, in an example, referring to FIG. 5E , during the search process, the video encoding apparatus obtains the difference between the current image block to be encoded and the predicted image block corresponding to the first target search point on odd rows and even columns. encoding cost.
相应地,将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。换句话说,将差异最小的预测图像块确定为所述当前待编码图像块的最佳匹配块。本实施例中,通过选择第一目标搜索点进行搜索,有利于减少搜索次数,节省搜索资源。Correspondingly, the predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded. In other words, the predicted image block with the smallest difference is determined as the best matching block of the current image block to be encoded. In this embodiment, by selecting the first target search point for searching, it is beneficial to reduce the number of searches and save search resources.
其中,所述第一目标搜索点对应的预测图像块与所述当前待编码图像块的大小相同,所述第一目标搜索点对应的预测图像块可以是所述参考帧中包括所述第一目标搜索点的图像块,即是说,所述第一目标搜索点为对应的预测图像块中的其中一个像素点;比如可以是以所述第一目标搜索点为起点确定的预测图像块,或者所述第一目标搜索点为所述预测图像块中的某一个像素点,本申请实施例对此不做任何限制。The size of the predicted image block corresponding to the first target search point is the same as that of the current image block to be coded, and the predicted image block corresponding to the first target search point may be the first target search point in the reference frame including the first image block. The image block of the target search point, that is to say, the first target search point is one of the pixel points in the corresponding predicted image block; for example, the predicted image block determined by the first target search point as the starting point, Or the first target search point is a certain pixel point in the predicted image block, which is not limited in this embodiment of the present application.
在一个例子中,所述编码代价包括但不限于率失真优化(Rate DistortionOptimized,RDO)。在其他实施方式中,可以利用绝对误差(Sum of Absolute Difference,SAD)、变换后的绝对误差和(Sum of Absolute Transformed Difference,SATD)、平均平方误差(MSE)、差值的平方和(sum of squared difference,SSD)、平均绝对差值(MAE)中的任意一个,以及运动矢量的编码比特数和率失真参数lambda来推导出所述编码代价。In one example, the encoding cost includes, but is not limited to, Rate Distortion Optimized (RDO). In other embodiments, the Sum of Absolute Difference (SAD), the Sum of Absolute Transformed Difference (SATD), the Mean Squared Error (MSE), the Sum of the Differences (sum of The encoding cost is derived from any one of squared difference, SSD), mean absolute difference (MAE), and the number of encoded bits of the motion vector and the rate-distortion parameter lambda.
进一步地,请参阅图6,为本申请实施例提供的另一种运动搜索方法的流程示意图,所述方法包括:Further, please refer to FIG. 6 , which is a schematic flowchart of another motion search method provided by an embodiment of the present application. The method includes:
在步骤S201中,对于当前待编码图像块,在所述当前待编码图像块的参考帧中确定搜索区域。与步骤S101类似,此处不再赘述。In step S201, for the current image block to be encoded, a search area is determined in the reference frame of the current image block to be encoded. Similar to step S101, details are not repeated here.
在步骤S202中,在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻。与步骤S102类似,此处不再赘述。In step S202, N first target search points are selected from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent. Similar to step S102, details are not repeated here.
在步骤S203中,获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价。与步骤S103类似,此处不再赘述。In step S203, the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the first target search points is acquired. Similar to step S103, details are not repeated here.
在步骤S204中,将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点。In step S204, the first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost are used as the second target search point, and the search area is in the center position The search point of , and the search point in the neighborhood of the search point at the center position are taken as the second target search point.
在步骤S205中,获取所述当前待编码图像块分别与各个所述第二目标候选搜索点对应的预测图像块之间的编码代价。In step S205, the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the second target candidate search points is acquired.
在步骤S206中,从编码代价最小的第一目标搜索点和所述第二目标搜索点中,选择编码代价最小的一个对应的预测图像块作为所述当前待编码图像块的最佳匹配块。In step S206, from the first target search point with the smallest coding cost and the second target search point, a corresponding predicted image block with the smallest coding cost is selected as the best matching block of the current image block to be coded.
前面我们提到,相邻的搜索点对应的预测图像块的相关度是比较高的,如果当前的搜索点对应的预测图像块不是所述当前待编码图像块的最佳匹配块,那么相邻的搜索点对应的预测图像块也极大可能不是所述当前待编码图像块的最佳匹配块,反之亦然,编码代价最小的第一目标搜索点对应的预测图像块是所有第一目标搜索点对应的所有预测图像块中与所述当前编码图像块差异最小的,那么与编码代价最小的第一目标搜索点相邻的搜索点对应的预测图像块可能跟所述当前编码图像块的差异更小。We mentioned earlier that the correlation of the predicted image blocks corresponding to the adjacent search points is relatively high. If the predicted image block corresponding to the current search point is not the best matching block of the current image block to be encoded, then the adjacent The predicted image block corresponding to the search point is also very likely not the best matching block of the current image block to be encoded, and vice versa, the predicted image block corresponding to the first target search point with the smallest encoding cost is all the first target search points. Among all the predicted image blocks corresponding to the point, the difference with the current coded image block is the smallest, then the predicted image block corresponding to the search point adjacent to the first target search point with the least coding cost may be different from the currently coded image block. smaller.
因此,为了能够搜索到更优的结果,在步骤S204中,在获取了编码代价最小的第一目标搜索点的基础上,所述视频编码装置进一步将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点。本实施例中,将所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点进行搜索,有利于获取更优的搜索结果;另外,前面提到,处于中心位置的搜索点可能是在确定搜索区域时,所述当前待编码图像块在参考帧中的搜索起点,考虑到所述搜索起点由与所述当前待编码图像块相邻的已编码图像块的运动矢量所确定,而与所述当前待编码图像块相邻的已编码图像块通常与所述当前待编码图像块具有一定的相似性,比如在一张天空图像中,绝大部分都是天空区域,天空区域的像素之间就比较相似,则基于天空区域划分的相邻两个图像块之间也具有较高的相似度;即是说,有很大的概率在所述搜索起点附近搜索到更优的结果,因此,将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点进行搜索,能够进一步搜索到更优的结果。Therefore, in order to be able to search for better results, in step S204, on the basis of obtaining the first target search point with the smallest coding cost, the video encoding apparatus further searches the first target search point with the smallest coding cost and all the The search point in the neighborhood of the first target search point with the smallest coding cost is used as the second target search point, and the search point in the center of the search area and the search point in the neighborhood of the search point in the center point as the second target search point. In this embodiment, the search point in the neighborhood of the first target search point with the smallest coding cost is used as the second target search point to search, which is beneficial to obtain better search results; The search point may be the search starting point of the current image block to be encoded in the reference frame when determining the search area, considering that the search starting point is determined by the motion of the encoded image block adjacent to the current image block to be encoded The coded image blocks adjacent to the current to-be-coded image block usually have a certain similarity with the current to-be-coded image block. For example, in a sky image, most of them are sky areas. , the pixels in the sky area are relatively similar, and the two adjacent image blocks divided based on the sky area also have high similarity; Therefore, the search point in the central position in the search area and the search point in the neighborhood of the search point in the central position are searched as the second target search point to further search for better results. result.
在一个实施方式中,同时将编码代价最小的第一目标搜索点、所述第一目标搜索点的邻域内的搜索点、所述搜索区域中处于中心位置的搜索点、所述处于中心位置的 搜索点的邻域内的搜索点作为第二目标搜索点。例如,在以编码代价最小的第一目标搜索点及其邻域内的搜索点进行搜索时,同时在以搜索区域中处于中心位置的搜索点及其邻域内的搜索点进行搜索。前面提到,处于中心位置的搜索点可能是在确定搜索区域时,所述当前待编码图像块在参考帧中的搜索起点,本实施例考虑到有很大的概率在所述搜索起点附近搜索到更优的结果,因此,将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点进行搜索,能够进一步搜索到更优的结果。其中,所述邻域为L×L的区域,所述L表征该邻域内任意一行或任意一列的搜索点的个数,L≥3;换句话说,所述邻域内的搜索点的数量大于或等于8。In one embodiment, the first target search point with the smallest coding cost, the search point in the neighborhood of the first target search point, the search point in the center of the search area, the search point in the center The search point within the neighborhood of the search point is used as the second target search point. For example, when searching is performed with the first target search point with the least coding cost and the search points in its neighborhood, the search is performed with the search point at the center of the search area and the search points in its neighborhood at the same time. As mentioned above, the search point at the center position may be the search start point of the current image block to be encoded in the reference frame when the search area is determined. This embodiment considers that there is a high probability of searching near the search start point. Therefore, the search point at the center of the search area and the search point in the neighborhood of the search point at the center are used as the second target search point to search, and further search results can be obtained. the result of. Wherein, the neighborhood is an area of L×L, and L represents the number of search points in any row or column in the neighborhood, L≥3; in other words, the number of search points in the neighborhood is greater than or equal to 8.
在一种实现方式中,所述邻域的大小可以根据所述搜索区域的大小所确定,比如所述邻域的大小与所述搜索区域的大小呈正相关关系,即所述搜索区域越大,所述邻域也越大,反之,所述搜索区域越小,所述邻域也越小,从而保证能够搜索到更优的结果。In an implementation manner, the size of the neighborhood may be determined according to the size of the search area, for example, the size of the neighborhood has a positive correlation with the size of the search area, that is, the larger the search area, The larger the neighborhood is, on the contrary, the smaller the search area is, the smaller the neighborhood is, so as to ensure that a better result can be searched.
在一个例子中,请参阅图7A以及7B,假设图中黑色点为编码代价最小的第一目标搜索点,图7A以邻域为3×3的区域为例进行说明,则可以将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,即以黑色点为中心的3×3的区域,图7B以邻域为5×5的区域为例进行说明,即以黑色点为中心的5×5的区域;另外,还可以将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点,即图7A中的处于中心位置的搜索点的3×3的区域,图7B中的处于中心位置的搜索点的5×5的区域。In an example, please refer to FIGS. 7A and 7B , assuming that the black point in the figure is the first target search point with the smallest coding cost, and FIG. 7A takes an area with a neighborhood of 3×3 as an example for illustration, then the coding cost can be minimized The first target search point and the search point in the neighborhood of the first target search point with the least coding cost are taken as the second target search point, that is, the 3 × 3 area centered on the black point, Fig. 7B takes the neighborhood as The 5×5 area is taken as an example to illustrate, that is, the 5×5 area with the black point as the center; in addition, the search point at the center position in the search area and the neighbors of the search point at the center position can also be used. The search point in the domain is used as the second target search point, that is, the 3×3 area of the central search point in FIG. 7A and the 5×5 area of the central search point in FIG. 7B .
在一个实施例中,比如如图7B所示,考虑到所述编码代价最小的第一目标搜索点的邻域内可能会包括一些已经搜索过的第一目标搜索点,所述处于中心位置的搜索点的邻域内也可能会包括一些已经搜索过的第一目标搜索点,这些第一目标搜索点在之前已经搜索过并且确定其编码代价不是最小的,如果再搜索一次显然会浪费了搜索资源,因此,在确定所述第二目标搜索点时,所述视频编码装置可以将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点;以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点,本实施例中考虑到所述编码代价最小的第一目标搜索点的邻域内以及所述处于中心位置的搜索点的邻域内可能存在已经搜索过的第一目标搜索点,且这些第一目标点不是 编码代价最小的,则这些第一目标搜索点已经确定不是最优的,本实施例剔除了这些第一目标搜索点,这样能够减少不必要的搜索次数,节省搜索资源,也有利于提高搜索效率。In one embodiment, such as shown in FIG. 7B , considering that the neighborhood of the first target search point with the smallest coding cost may include some already searched first target search points, the search at the center position The neighborhood of the point may also include some first target search points that have been searched. These first target search points have been searched before and it is determined that the coding cost is not the smallest. If you search again, it will obviously waste search resources. Therefore, when determining the second target search point, the video encoding apparatus may divide the first target search point with the smallest encoding cost and the first target search point with the smallest encoding cost in the neighborhood of the first target search point with the smallest encoding cost The part other than the first target search point is used as the second target search point; and the search point at the center position in the search area and the part other than the first target search point in the neighborhood of the search point at the center position are used as the second target search point , in this embodiment, it is considered that there may be already searched first target search points in the neighborhood of the first target search point with the smallest coding cost and in the neighborhood of the search point at the center position, and these first target search points If the point is not the least expensive for encoding, then these first target search points have been determined not to be optimal, and these first target search points are eliminated in this embodiment, which can reduce unnecessary search times, save search resources, and help improve search efficiency.
接着,在步骤S205中,在获取所述第二目标搜索点之后,所述视频编码装置可以对所述第二目标搜索点进行搜索,前面我们说到,任意两个图像块的编码代价可以体现两者之间的差异程度,因此,所述视频编码装置可以获取所述当前待编码图像块分别与各个所述第二目标候选搜索点对应的预测图像块之间的编码代价,然后从编码代价最小的第一目标搜索点和所述第二目标搜索点中,选择编码代价最小的一个对应的预测图像块作为所述当前待编码图像块的最佳匹配块,换句话说,将差异最小的预测图像块确定为所述当前待编码图像块的最佳匹配块。本实施例中,通过进一步增加第二目标搜索点,通过对第二目标搜索点进行搜索,有利于搜索到更优的结果,并且相对于遍历搜索来说,显著减少搜索次数,节省搜索资源,并且能够保证获取所述当前待编码图像块的最佳匹配块。Next, in step S205, after acquiring the second target search point, the video encoding apparatus may search for the second target search point. As we mentioned earlier, the encoding cost of any two image blocks can be reflected in the The degree of difference between the two, therefore, the video encoding apparatus can obtain the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the second target candidate search points, and then obtain the encoding cost from the encoding cost. Among the smallest first target search point and the second target search point, a corresponding predicted image block with the smallest encoding cost is selected as the best matching block of the current image block to be encoded, in other words, the smallest difference is selected. The predicted image block is determined as the best matching block of the current image block to be encoded. In this embodiment, by further increasing the second target search point and searching for the second target search point, it is beneficial to search for better results, and compared with the traversal search, the number of searches is significantly reduced, and search resources are saved, And it can ensure that the best matching block of the current image block to be encoded is obtained.
在一个例子中,所述编码代价包括但不限于率失真优化(Rate DistortionOptimized,RDO)。在其他实施方式中,可以利用绝对误差(Sum of Absolute Difference,SAD)、变换后的绝对误差和(Sum of Absolute Transformed Difference,SATD)、平均平方误差(MSE)、差值的平方和(sum of squared difference,SSD)、平均绝对差值(MAE)中的任意一个,以及运动矢量的编码比特数和率失真参数lambda来推导出所述编码代价。In one example, the encoding cost includes, but is not limited to, Rate Distortion Optimized (RDO). In other embodiments, the Sum of Absolute Difference (SAD), the Sum of Absolute Transformed Difference (SATD), the Mean Squared Error (MSE), the Sum of the Differences (sum of The encoding cost is derived from any one of squared difference, SSD), mean absolute difference (MAE), and the number of encoded bits of the motion vector and the rate-distortion parameter lambda.
相应的,请参阅图8,本申请实施例还提供了一种视频编码装置,包括一个或多个处理器31,单独的或共同的工作,所述处理器包括多个流水级;以及用于存储可执行指令的存储器32。Correspondingly, referring to FIG. 8 , an embodiment of the present application further provides a video encoding apparatus, which includes one or more processors 31 that work independently or together, and the processors include multiple pipeline stages; Memory 32 that stores executable instructions.
所述处理器在执行所述可执行指令时,在其中一个流水级中执行以下步骤:When the processor executes the executable instructions, the following steps are performed in one of the pipeline stages:
对于当前待编码图像块,在所述当前待编码图像块对应的参考帧中确定搜索区域。For the current image block to be encoded, a search area is determined in the reference frame corresponding to the current image block to be encoded.
在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻。Select N first target search points from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent.
获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价。The encoding cost between the currently to-be-encoded image block and the predicted image blocks corresponding to each of the first target search points is acquired.
将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。The predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
所述处理器31可以是中央处理单元(Central Processing Unit,CPU),还可以是其 他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 31 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器32可以包括至少一种类型的存储介质,存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器32等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器32(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。存储器32可以是所述视频编码装置30的内部存储单元,例如硬盘或内存。存储器32也可以是所述视频编码装置30的外部存储设备,例如所述视频编码装置30上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器32还可以既包括所述视频编码装置30的内部存储单元也包括外部存储设备。存储器32用于存储计算机程序以及设备所需的其他程序和数据。存储器32还可以用于暂时地存储已经输出或者将要输出的数据。The memory 32 may include at least one type of storage medium including flash memory, hard disk, multimedia card, card-type memory (eg, SD or DX memory 32, etc.), random access memory (RAM), static random access memory (SRAM), read only memory 32 (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. The memory 32 may be an internal storage unit of the video encoding apparatus 30, such as a hard disk or a memory. The memory 32 may also be an external storage device of the video encoding device 30, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the video encoding device 30 card, Flash Card, etc. Further, the memory 32 may also include both an internal storage unit of the video encoding apparatus 30 and an external storage device. The memory 32 is used to store computer programs and other programs and data required by the device. The memory 32 may also be used to temporarily store data that has been or will be output.
在一实施例中,任意两个第一目标搜索点之间间隔一个或多个搜索点。In one embodiment, one or more search points are spaced between any two first target search points.
在一实施例中,任意两个第一目标搜索点之间间隔的搜索点的数量基于所述搜索区域的大小和/或搜索的次数所确定。In one embodiment, the number of search points spaced between any two first target search points is determined based on the size of the search area and/or the number of searches.
在一实施例中,所述M个搜索点以行列形式排布。In one embodiment, the M search points are arranged in rows and columns.
所述N个第一目标搜索点同时为所述搜索区域内奇数行奇数列上的搜索点、同时为偶数列偶数行上的搜索点、同时为偶数行奇数列上的搜索点或者同时为奇数行偶数列上的搜索点。The N first target search points are simultaneously search points on odd-numbered rows and odd-numbered columns in the search area, simultaneously search points on even-numbered columns and even-numbered rows, simultaneously search points on even-numbered rows and odd-numbered columns, or simultaneously odd-numbered search points. Search points on rows and even columns.
其中,每一行的第一目标搜索点的数量与其他行的第一目标搜索点的数量相等,每一列的第一目标搜索点的数量与其他列的第一目标搜索点的数量相等,并且任意两个第一目标搜索点之间的间隔相等。The number of first target search points in each row is equal to the number of first target search points in other rows, the number of first target search points in each column is equal to the number of first target search points in other columns, and any The interval between the two first target search points is equal.
在一实施例中,所述处理器31还用于:将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点;获取所述当前待编码图像块分别与各个所述第二目标候选搜索点对应的预测图像块之间的编码代价;从编码代价最小的第一目标搜索点和所述第二目标搜索点中,选择编码代价最小的一个对应的预测图像块作为所述当前待编码图像块的最佳匹配块。In one embodiment, the processor 31 is further configured to: use the first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost as the second target search point, And take the search point at the center position in the search area and the search point in the neighborhood of the search point at the center position as the second target search point; obtain the current image block to be encoded and each of the second The coding cost between the predicted image blocks corresponding to the target candidate search points; from the first target search point with the smallest coding cost and the second target search point, select a corresponding predicted image block with the smallest coding cost as the current The best matching block of the image block to be encoded.
在一实施例中,在确定所述第二目标搜索点时,所述处理器具体用于:将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点;以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点。In an embodiment, when determining the second target search point, the processor is specifically configured to: place the first target search point with the smallest coding cost and the first target search point with the smallest coding cost in the neighborhood of the first target search point with the smallest coding cost The part other than the first target search point is used as the second target search point; and the search point in the center of the search area and the part other than the first target search point in the neighborhood of the search point in the center as the second target search point.
在一实施例中,所述邻域内的搜索点的数量大于或等于8。In one embodiment, the number of search points within the neighborhood is greater than or equal to eight.
在一实施例中,所述邻域为L×L的区域,所述L表征该邻域内任意一行或任意一列的搜索点的个数,L≥3。In one embodiment, the neighborhood is an L×L area, and L represents the number of search points in any row or column in the neighborhood, and L≥3.
在一实施例中,所述邻域的大小根据所述搜索区域的大小所确定。In one embodiment, the size of the neighborhood is determined according to the size of the search area.
在一实施例中,所述邻域的大小与所述搜索区域的大小呈正相关关系。In one embodiment, the size of the neighborhood is positively correlated with the size of the search area.
在一实施例中,在确定搜索区域时,所述处理器具体用于:根据所述当前待编码图像块的预测运动矢量在所述参考帧中确定搜索区域;所述预测运动矢量基于一个或多个相邻的已编码图像块的运动矢量确定。In an embodiment, when determining the search area, the processor is specifically configured to: determine the search area in the reference frame according to the predicted motion vector of the current image block to be encoded; the predicted motion vector is based on one or The motion vectors of a plurality of adjacent coded image blocks are determined.
在一实施例中,所述相邻的已编码图像块包括在时间上相邻的已编码图像块和/或在空间上相邻的已编码图像块。In an embodiment, the adjacent coded image blocks include temporally adjacent coded image blocks and/or spatially adjacent coded image blocks.
在一实施例中,所述预测运动矢量为所述一个或多个相邻的已编码图像块中编码代价最小的一个的运动矢量。In one embodiment, the predicted motion vector is the motion vector of the one with the least coding cost among the one or more adjacent coded image blocks.
在一实施例中,在确定搜索区域时,所述处理器31具体用于:在所述当前待编码图像块的参考帧中,将所述预测运动矢量指向的位置作为搜索起点,以及将包括所述搜索起点的预设范围作为所述搜索区域。In one embodiment, when determining the search area, the processor 31 is specifically configured to: in the reference frame of the image block currently to be encoded, use the position pointed to by the predicted motion vector as the search starting point, and include The preset range of the search starting point is used as the search area.
在一实施例中,所述编码代价包括以下至少一项:率失真优化、绝对误差、变换后的绝对误差、平均平方误差、差值的平方和、平均绝对差值或者运动矢量的比特数。In one embodiment, the coding cost includes at least one of: rate-distortion optimization, absolute error, transformed absolute error, mean squared error, sum of squares of differences, mean absolute difference, or number of bits of a motion vector.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the apparatus embodiments, since they basically correspond to the method embodiments, reference may be made to the partial descriptions of the method embodiments for related parts. The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器,上述指令可由电子设备的处理器执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、 磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as a memory including instructions, executable by a processor of an electronic device to perform the above method. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
其中,当所述存储介质中的指令由所述处理器执行时,使得电子设备能够执行前述运动搜索方法。Wherein, when the instructions in the storage medium are executed by the processor, the electronic device is enabled to execute the aforementioned motion search method.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. The terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also other not expressly listed elements, or also include elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
以上对本申请实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The methods and devices provided by the embodiments of the present application have been introduced in detail above, and specific examples are used to illustrate the principles and implementations of the present application. At the same time, for those of ordinary skill in the art, according to the idea of the application, there will be changes in the specific implementation and application scope. In summary, the content of this specification should not be construed as a limitation to the application. .

Claims (34)

  1. 一种运动搜索方法,其特征在于,包括:A motion search method, comprising:
    对于当前待编码图像块,在所述当前待编码图像块对应的参考帧中确定搜索区域;For the current image block to be encoded, determining a search area in the reference frame corresponding to the current image block to be encoded;
    在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻;Select N first target search points from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent;
    获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价;obtaining the encoding cost between the current image block to be encoded and the predicted image block corresponding to each of the first target search points;
    将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。The predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  2. 根据权利要求1所述的方法,其特征在于,在第一方向上的任意两个第一目标搜索点不相邻,以及在第二方向上的任意两个第一目标搜索点相邻;The method according to claim 1, wherein any two first target search points in the first direction are not adjacent, and any two first target search points in the second direction are adjacent;
    其中,所述第一方向和所述第二方向分别为任意两个目标搜索点之间的连线指示的方向,并且所述第一方向与所述第二方向之间具有一夹角。Wherein, the first direction and the second direction are directions indicated by a connecting line between any two target search points, respectively, and there is an included angle between the first direction and the second direction.
  3. 根据权利要求1所述的方法,其特征在于,任意两个第一目标搜索点之间间隔一个或多个搜索点。The method according to claim 1, wherein one or more search points are spaced between any two first target search points.
  4. 根据权利要求1所述的方法,其特征在于,任意两个第一目标搜索点之间间隔的搜索点的数量基于所述搜索区域的大小和/或搜索的次数所确定。The method according to claim 1, wherein the number of search points spaced between any two first target search points is determined based on the size of the search area and/or the number of searches.
  5. 根据权利要求1所述的方法,其特征在于,所述M个搜索点以行列形式排布;The method according to claim 1, wherein the M search points are arranged in rows and columns;
    所述N个第一目标搜索点同时为所述搜索区域内奇数行奇数列上的搜索点、同时为偶数列偶数行上的搜索点、同时为偶数列奇数行上的搜索点,或者同时为奇数行偶数列上的搜索点;The N first target search points are simultaneously search points on odd-numbered rows and odd-numbered columns in the search area, simultaneously search points on even-numbered columns and even-numbered rows, and simultaneously search points on even-numbered columns and odd-numbered rows, or both. search points on odd rows and even columns;
    其中,每一行的第一目标搜索点的数量与其他行的第一目标搜索点的数量相等,并且位于每一行中的任意两个第一目标搜索点之间的间隔相等;和/或Wherein, the number of first target search points in each row is equal to the number of first target search points in other rows, and the interval between any two first target search points in each row is equal; and/or
    每一列的第一目标搜索点的数量与其他列的第一目标搜索点的数量相等,并且位于每一列的任意两个第一目标搜索点之间的间隔相等。The number of first target search points in each column is equal to the number of first target search points in other columns, and the interval between any two first target search points located in each column is equal.
  6. 根据权利要求1所述的方法,其特征在于,在所述获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价之后,还包括:The method according to claim 1, wherein after acquiring the encoding cost between the current image block to be encoded and the predicted image blocks corresponding to each of the first target search points, the method further comprises:
    将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点;The first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost are used as the second target search point, and the search point at the center of the search area and all The search point in the neighborhood of the search point at the central position is used as the second target search point;
    获取所述当前待编码图像块分别与各个所述第二目标候选搜索点对应的预测图像 块之间的编码代价;Obtain the encoding cost between the current image block to be encoded and the predicted image block corresponding to each of the second target candidate search points;
    将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块,包括:Determining the predicted image block corresponding to the first target search point with the smallest encoding cost as the best matching block of the current image block to be encoded, including:
    从编码代价最小的第一目标搜索点和所述第二目标搜索点中,选择编码代价最小的一个对应的预测图像块作为所述当前待编码图像块的最佳匹配块。From the first target search point with the smallest encoding cost and the second target search point, a corresponding predicted image block with the smallest encoding cost is selected as the best matching block of the current image block to be encoded.
  7. 根据权利要求6所述的方法,其特征在于,所述将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,包括:The method according to claim 6, wherein the first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost are used as the second target search point, include:
    将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点;Taking the first target search point with the smallest coding cost and the part other than the first target search point in the neighborhood of the first target search point with the smallest coding cost as the second target search point;
    所述将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点,包括:Said taking the search point at the center position in the search area and the search point in the neighborhood of the search point at the center position as the second target search point, including:
    将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点。The search point at the center position in the search area and the part other than the first target search point in the neighborhood of the search point at the center position are used as the second target search point.
  8. 根据权利要求6所述的方法,其特征在于,所述邻域内的搜索点的数量大于或等于8。The method according to claim 6, wherein the number of search points in the neighborhood is greater than or equal to 8.
  9. 根据权利要求6所述的方法,其特征在于,所述邻域为L×L的区域,所述L表征该邻域内任意一行或任意一列的搜索点的个数,L≥3。The method according to claim 6, wherein the neighborhood is an area of L×L, and the L represents the number of search points in any row or column in the neighborhood, and L≥3.
  10. 根据权利要求6所述的方法,其特征在于,所述邻域的大小根据所述搜索区域的大小所确定。The method according to claim 6, wherein the size of the neighborhood is determined according to the size of the search area.
  11. 根据权利要求10所述的方法,其特征在于,所述邻域的大小与所述搜索区域的大小呈正相关关系。The method according to claim 10, wherein the size of the neighborhood is positively correlated with the size of the search area.
  12. 根据权利要求1所述的方法,其特征在于,所述在所述当前待编码图像块的参考帧中确定搜索区域,包括:The method according to claim 1, wherein the determining a search area in the reference frame of the current image block to be encoded comprises:
    根据所述当前待编码图像块的预测运动矢量在所述参考帧中确定搜索区域;所述预测运动矢量基于一个或多个相邻的已编码图像块的运动矢量确定。A search area is determined in the reference frame according to the predicted motion vector of the currently to-be-coded image block; the predicted motion vector is determined based on the motion vectors of one or more adjacent coded image blocks.
  13. 根据权利要求12所述的方法,其特征在于,所述相邻的已编码图像块包括在时间上相邻的已编码图像块和/或在空间上相邻的已编码图像块。The method according to claim 12, wherein the adjacent coded image blocks comprise temporally adjacent coded image blocks and/or spatially adjacent coded image blocks.
  14. 根据权利要求12所述的方法,其特征在于,所述预测运动矢量为所述一个或多个相邻的已编码图像块中编码代价最小的一个的运动矢量。The method according to claim 12, wherein the predicted motion vector is the motion vector of the one with the least coding cost among the one or more adjacent coded image blocks.
  15. 根据权利要求12所述的方法,其特征在于,所述根据所述当前待编码图像块 的预测运动矢量在所述参考帧中确定搜索区域,包括:The method according to claim 12, wherein, determining a search area in the reference frame according to the predicted motion vector of the current image block to be encoded, comprising:
    在所述当前待编码图像块的参考帧中,将所述预测运动矢量指向的位置作为搜索起点,以及将包括所述搜索起点的预设范围作为所述搜索区域。In the reference frame of the image block currently to be encoded, the position pointed to by the predicted motion vector is used as a search starting point, and a preset range including the searching starting point is used as the search area.
  16. 根据权利要求1或14所述的方法,其特征在于,所述编码代价包括以下至少一项:率失真优化、绝对误差、变换后的绝对误差和、平均平方误差、差值的平方和、平均绝对差值或者运动矢量的编码比特数。The method according to claim 1 or 14, wherein the coding cost comprises at least one of the following: rate-distortion optimization, absolute error, transformed absolute error sum, mean squared error, square sum of differences, average The absolute difference or the number of encoded bits of the motion vector.
  17. 根据权利要求1所述的方法,其特征在于,所述方法应用于包括多个流水级的芯片上;且所述方法在其中一个流水级中执行。The method of claim 1, wherein the method is applied to a chip comprising a plurality of pipeline stages; and the method is performed in one of the pipeline stages.
  18. 一种视频编码装置,其特征在于,包括一个或多个处理器,单独的或共同的工作,所述处理器包括多个流水级;以及用于存储可执行指令的存储器;A video encoding device, characterized in that it comprises one or more processors, working independently or together, the processors comprising a plurality of pipeline stages; and a memory for storing executable instructions;
    所述处理器执行所述可执行指令时,在在其中一个流水级中执行以下步骤:When the processor executes the executable instructions, the following steps are performed in one of the pipeline stages:
    对于当前待编码图像块,在所述当前待编码图像块对应的参考帧中确定搜索区域;For the current image block to be encoded, determining a search area in the reference frame corresponding to the current image block to be encoded;
    在所述搜索区域所包括的M个搜索点中选取N个第一目标搜索点;N<M;在至少一方向上的任意两个第一目标搜索点不相邻;Select N first target search points from the M search points included in the search area; N<M; any two first target search points in at least one direction are not adjacent;
    获取所述当前待编码图像块分别与各个所述第一目标搜索点对应的预测图像块之间的编码代价;obtaining the encoding cost between the current image block to be encoded and the predicted image block corresponding to each of the first target search points;
    将编码代价最小的第一目标搜索点对应的预测图像块确定为所述当前待编码图像块的最佳匹配块。The predicted image block corresponding to the first target search point with the smallest encoding cost is determined as the best matching block of the current image block to be encoded.
  19. 根据权利要求18所述的装置,其特征在于,在第一方向上的任意两个第一目标搜索点不相邻,以及在第二方向上的任意两个第一目标搜索点相邻;The device according to claim 18, wherein any two first target search points in the first direction are not adjacent, and any two first target search points in the second direction are adjacent;
    其中,所述第一方向和所述第二方向分别为任意两个目标搜索点之间的连线指示的方向,并且所述第一方向与所述第二方向之间具有一夹角。Wherein, the first direction and the second direction are directions indicated by a connecting line between any two target search points, respectively, and there is an included angle between the first direction and the second direction.
  20. 根据权利要求18所述的装置,其特征在于,任意两个第一目标搜索点之间间隔一个或多个搜索点。The apparatus according to claim 18, wherein one or more search points are spaced between any two first target search points.
  21. 根据权利要求18所述的装置,其特征在于,任意两个第一目标搜索点之间间隔的搜索点的数量基于所述搜索区域的大小和/或搜索的次数所确定。The apparatus according to claim 18, wherein the number of search points spaced between any two first target search points is determined based on the size of the search area and/or the number of searches.
  22. 根据权利要求18所述的装置,其特征在于,所述M个搜索点以行列形式排布;The device according to claim 18, wherein the M search points are arranged in rows and columns;
    所述N个第一目标搜索点同时为所述搜索区域内奇数行奇数列上的搜索点、同时为偶数列偶数行上的搜索点、同时为偶数行奇数列上的搜索点或者同时为奇数行偶数 列上的搜索点;The N first target search points are simultaneously search points on odd-numbered rows and odd-numbered columns in the search area, simultaneously search points on even-numbered columns and even-numbered rows, simultaneously search points on even-numbered rows and odd-numbered columns, or simultaneously odd-numbered search points. search points on rows and even columns;
    其中,每一行的第一目标搜索点的数量与其他行的第一目标搜索点的数量相等,并且位于每一行中的任意两个第一目标搜索点之间的间隔相等;和/或Wherein, the number of first target search points in each row is equal to the number of first target search points in other rows, and the interval between any two first target search points in each row is equal; and/or
    每一列的第一目标搜索点的数量与其他列的第一目标搜索点的数量相等,并且位于每一列的任意两个第一目标搜索点之间的间隔相等。The number of first target search points in each column is equal to the number of first target search points in other columns, and the interval between any two first target search points located in each column is equal.
  23. 根据权利要求18所述的装置,其特征在于,所述处理器还用于:The apparatus of claim 18, wherein the processor is further configured to:
    将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内的搜索点作为第二目标搜索点,以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内的搜索点作为第二目标搜索点;The first target search point with the smallest coding cost and the search point in the neighborhood of the first target search point with the smallest coding cost are used as the second target search point, and the search point in the center of the search area and all The search point in the neighborhood of the search point at the central position is used as the second target search point;
    获取所述当前待编码图像块分别与各个所述第二目标候选搜索点对应的预测图像块之间的编码代价;obtaining the encoding cost between the currently to-be-encoded image blocks and the predicted image blocks corresponding to the respective second target candidate search points;
    从编码代价最小的第一目标搜索点和所述第二目标搜索点中,选择编码代价最小的一个对应的预测图像块作为所述当前待编码图像块的最佳匹配块。From the first target search point with the smallest encoding cost and the second target search point, a corresponding predicted image block with the smallest encoding cost is selected as the best matching block of the current image block to be encoded.
  24. 根据权利要求23所述的装置,其特征在于,在确定所述第二目标搜索点时,所述处理器具体用于:将编码代价最小的第一目标搜索点及所述编码代价最小的第一目标搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点;以及将所述搜索区域中处于中心位置的搜索点及所述处于中心位置的搜索点的邻域内除第一目标搜索点以外的部分作为第二目标搜索点。The apparatus according to claim 23, wherein when determining the second target search point, the processor is specifically configured to: combine the first target search point with the smallest coding cost and the first target search point with the smallest coding cost A part of the neighborhood of a target search point other than the first target search point is used as a second target search point; A portion other than a target search point is used as a second target search point.
  25. 根据权利要求23所述的装置,其特征在于,所述邻域内的搜索点的数量大于或等于8。The apparatus according to claim 23, wherein the number of search points in the neighborhood is greater than or equal to 8.
  26. 根据权利要求23所述的装置,其特征在于,所述邻域为L×L的区域,所述L表征该邻域内任意一行或任意一列的搜索点的个数,L≥3。The device according to claim 23, wherein the neighborhood is an area of L×L, and L represents the number of search points in any row or column in the neighborhood, and L≥3.
  27. 根据权利要求23所述的装置,其特征在于,所述邻域的大小根据所述搜索区域的大小所确定。The apparatus according to claim 23, wherein the size of the neighborhood is determined according to the size of the search area.
  28. 根据权利要求27所述的装置,其特征在于,所述邻域的大小与所述搜索区域的大小呈正相关关系。The apparatus according to claim 27, wherein the size of the neighborhood is positively correlated with the size of the search area.
  29. 根据权利要求18所述的装置,其特征在于,在确定搜索区域时,所述处理器具体用于:根据所述当前待编码图像块的预测运动矢量在所述参考帧中确定搜索区域;所述预测运动矢量基于一个或多个相邻的已编码图像块的运动矢量确定。The apparatus according to claim 18, wherein when determining the search area, the processor is specifically configured to: determine the search area in the reference frame according to the predicted motion vector of the current image block to be encoded; The predicted motion vector is determined based on the motion vectors of one or more adjacent coded image blocks.
  30. 根据权利要求29所述的装置,其特征在于,所述相邻的已编码图像块包括在时间上相邻的已编码图像块和/或在空间上相邻的已编码图像块。The apparatus according to claim 29, wherein the adjacent coded image blocks comprise temporally adjacent coded image blocks and/or spatially adjacent coded image blocks.
  31. 根据权利要求29所述的装置,其特征在于,所述预测运动矢量为所述一个或多个相邻的已编码图像块中编码代价最小的一个的运动矢量。The apparatus of claim 29, wherein the predicted motion vector is the motion vector of the one with the least coding cost among the one or more adjacent coded image blocks.
  32. 根据权利要求29所述的装置,其特征在于,在确定搜索区域时,所述处理器具体用于:在所述当前待编码图像块的参考帧中,将所述预测运动矢量指向的位置作为搜索起点,以及将包括所述搜索起点的预设范围作为所述搜索区域。The apparatus according to claim 29, wherein when determining the search area, the processor is specifically configured to: in the reference frame of the current image block to be encoded, use the position pointed by the predicted motion vector as A search start point, and a preset range including the search start point is used as the search area.
  33. 根据权利要求18或31所述的装置,其特征在于,所述编码代价包括以下至少一项:率失真优化、绝对误差、变换后的绝对误差、平均平方误差、差值的平方和、平均绝对差值或者运动矢量的比特数。The apparatus according to claim 18 or 31, wherein the coding cost comprises at least one of the following: rate-distortion optimization, absolute error, transformed absolute error, mean squared error, sum of squares of differences, mean absolute error The difference or the number of bits of the motion vector.
  34. 一种计算机可读存储介质,其特征在于,其上存储有计算机指令,该指令被处理器执行时实现权利要求1至17任意一项所述的方法。A computer-readable storage medium, characterized in that computer instructions are stored thereon, and when the instructions are executed by a processor, the method according to any one of claims 1 to 17 is implemented.
PCT/CN2020/117076 2020-09-23 2020-09-23 Motion search method, video coding device, and computer-readable storage medium WO2022061573A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/117076 WO2022061573A1 (en) 2020-09-23 2020-09-23 Motion search method, video coding device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/117076 WO2022061573A1 (en) 2020-09-23 2020-09-23 Motion search method, video coding device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2022061573A1 true WO2022061573A1 (en) 2022-03-31

Family

ID=80844566

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117076 WO2022061573A1 (en) 2020-09-23 2020-09-23 Motion search method, video coding device, and computer-readable storage medium

Country Status (1)

Country Link
WO (1) WO2022061573A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547354A (en) * 2008-03-26 2009-09-30 联发科技股份有限公司 Video encoder and motion estimation method
KR101349111B1 (en) * 2013-07-04 2014-01-10 상명대학교 천안산학협력단 Method search multiple reference frames
EP2343901B1 (en) * 2010-01-08 2017-11-29 BlackBerry Limited Method and device for video encoding using predicted residuals
CN109672894A (en) * 2017-10-13 2019-04-23 腾讯科技(深圳)有限公司 A kind of inter-frame prediction method, device and storage medium
CN110248188A (en) * 2018-03-07 2019-09-17 华为技术有限公司 Predicted motion vector generation method and relevant device
WO2020007291A1 (en) * 2018-07-02 2020-01-09 Huawei Technologies Co., Ltd. A video encoder, a video decoder and corresponding methods
CN110784711A (en) * 2018-07-30 2020-02-11 腾讯美国有限责任公司 Method and device for generating merging candidate list for encoding or decoding video sequence
CN110800301A (en) * 2018-09-30 2020-02-14 深圳市大疆创新科技有限公司 Control method and device of coding equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101547354A (en) * 2008-03-26 2009-09-30 联发科技股份有限公司 Video encoder and motion estimation method
EP2343901B1 (en) * 2010-01-08 2017-11-29 BlackBerry Limited Method and device for video encoding using predicted residuals
KR101349111B1 (en) * 2013-07-04 2014-01-10 상명대학교 천안산학협력단 Method search multiple reference frames
CN109672894A (en) * 2017-10-13 2019-04-23 腾讯科技(深圳)有限公司 A kind of inter-frame prediction method, device and storage medium
CN110248188A (en) * 2018-03-07 2019-09-17 华为技术有限公司 Predicted motion vector generation method and relevant device
WO2020007291A1 (en) * 2018-07-02 2020-01-09 Huawei Technologies Co., Ltd. A video encoder, a video decoder and corresponding methods
CN110784711A (en) * 2018-07-30 2020-02-11 腾讯美国有限责任公司 Method and device for generating merging candidate list for encoding or decoding video sequence
CN110800301A (en) * 2018-09-30 2020-02-14 深圳市大疆创新科技有限公司 Control method and device of coding equipment and storage medium

Similar Documents

Publication Publication Date Title
US10051273B2 (en) Video decoder and video decoding method
TWI536811B (en) Method and system for image processing, decoding method, encoder and decoder
JP4927753B2 (en) Moving picture coding method, moving picture decoding method, moving picture coding apparatus, moving picture decoding apparatus, and semiconductor device
US20190356914A1 (en) Encoding method, decoding method and device thereof
US10291925B2 (en) Techniques for hardware video encoding
US20120076207A1 (en) Multiple-candidate motion estimation with advanced spatial filtering of differential motion vectors
US11025913B2 (en) Encoding video using palette prediction and intra-block copy
EP3854077A1 (en) Local illumination compensation for video encoding and decoding using stored parameters
US20160050431A1 (en) Method and system for organizing pixel information in memory
CN113596475A (en) Image/video encoding method, apparatus, system, and computer-readable storage medium
JP7448558B2 (en) Methods and devices for image encoding and decoding
JP2019520743A (en) Image data encoding and decoding
JP4674496B2 (en) Encoding device, decoding device, encoding method, decoding method, and program thereof
US20050089232A1 (en) Method of video compression that accommodates scene changes
US20150189333A1 (en) Method and system for image processing, decoding method, encoder, and decoder
WO2022061573A1 (en) Motion search method, video coding device, and computer-readable storage medium
US20220417550A1 (en) Method and apparatus for constructing motion information list in video encoding and decoding and device
WO2022061563A1 (en) Video coding method and device, and computer readable storage medium
JP4802928B2 (en) Image data processing device
CN112313950B (en) Video image component prediction method, device and computer storage medium
US20100150237A1 (en) Selecting a macroblock encoding mode
WO2022021310A1 (en) Encoding method and apparatus, computing processing device, computer program, and storage medium
Jia et al. A fast variable block size motion estimation algorithm with refined search range for a two-layer data reuse scheme
US10951900B2 (en) Speeding up small block intra-prediction in video coding
EP4099698A1 (en) Method, apparatus and device for constructing motion information list in video coding and decoding

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20954427

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20954427

Country of ref document: EP

Kind code of ref document: A1