CN114727115A - Integer motion estimation method, system and storage medium for video coding - Google Patents

Integer motion estimation method, system and storage medium for video coding Download PDF

Info

Publication number
CN114727115A
CN114727115A CN202210393510.4A CN202210393510A CN114727115A CN 114727115 A CN114727115 A CN 114727115A CN 202210393510 A CN202210393510 A CN 202210393510A CN 114727115 A CN114727115 A CN 114727115A
Authority
CN
China
Prior art keywords
data
current block
processed
block
point
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202210393510.4A
Other languages
Chinese (zh)
Other versions
CN114727115B (en
Inventor
张俊
张宇
高洁
肖葭
苏国旺
丁旭然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Original Assignee
Central South University
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 Central South University filed Critical Central South University
Priority to CN202210393510.4A priority Critical patent/CN114727115B/en
Publication of CN114727115A publication Critical patent/CN114727115A/en
Application granted granted Critical
Publication of CN114727115B publication Critical patent/CN114727115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/533Motion estimation using multistep search, e.g. 2D-log search or one-at-a-time search [OTS]
    • 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/557Motion estimation characterised by stopping computation or iteration based on certain criteria, e.g. error magnitude being too large or early exit

Landscapes

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

Abstract

The invention relates to the technical field of video coding, and discloses an integer motion estimation method for video coding, which comprises the following steps: calculating a first SAD value of the zero current block according to the central point, and outputting the relative coordinate of the central point as an optimal motion vector under the condition that the first SAD value is smaller than a threshold value; calculating a second SAD value of the current block in the dense area according to the first search point, and outputting the relative coordinate of the first search point as an optimal motion vector under the condition that the second SAD value is smaller than a threshold value; and under the condition that the optimal motion vector is not determined in the current block in the dense area, calculating a third SAD value of the current block in the sparse area according to the second search point, and under the condition that the third SAD value is smaller than a threshold value, outputting the relative coordinate of the second search point as the optimal motion vector.

Description

Integer motion estimation method, system and storage medium for video coding
Technical Field
The present invention relates to the field of video coding technologies, and in particular, to a method, a system, and a storage medium for integer motion estimation in video coding.
Background
With the rapid development of video technology, the amount of information carried by video is greatly increased, the video coding technology as the core technology of video transmission can eliminate redundant information in video, reduce bandwidth pressure and storage cost in the video transmission process, in the video coding process, Integer Motion Estimation (IME) is the most complicated link in the coding process, and occupies more than 50% of the time of the whole video coding, and at present, in the search algorithm of integer motion estimation, there are two categories, full search and fast search, and compared with full search, fast search can save a lot of time, improve coding performance, it still requires a significant amount of time and memory control for reading and saving the pixel data calculated in real time, and, therefore, the problem of long time consumption and large storage space consumption exists in the algorithm calculation related to the integer motion estimation.
Disclosure of Invention
The invention provides an integer motion estimation method, an integer motion estimation system and a storage medium for video coding, which aim to solve the problems of long time consumption and large storage space consumption of the existing integer motion estimation related calculation.
In order to achieve the purpose, the invention is realized by the following technical scheme:
in a first aspect, the present invention provides a method for integer motion estimation for video coding, including:
dividing the data to be processed into a zero current block, a dense current block and a sparse current block according to the step length of the data to be processed, and determining the central point of the zero current block, a first search point of the dense current block and a second search point of the sparse current block;
calculating a first SAD value of the zero current block according to the central point, and outputting the relative coordinate of the central point as an optimal motion vector under the condition that the first SAD value is smaller than a threshold value;
under the condition that the optimal motion vector is not determined in the zero current block, calculating a second SAD value of the current block in the dense area according to the first search point, and under the condition that the second SAD value is smaller than a threshold value, outputting the relative coordinate of the first search point as the optimal motion vector;
and under the condition that the optimal motion vector is not determined in the current block in the dense area, calculating a third SAD value of the current block in the sparse area according to the second search point, and under the condition that the third SAD value is smaller than a threshold value, outputting the relative coordinate of the second search point as the optimal motion vector.
Optionally, before dividing the data to be processed into the zero current block, the dense current block, and the sparse current block according to the step size of the data to be processed, the method further includes:
the method comprises the steps of obtaining a target video frame to be coded, determining a video frame to be processed in the target video frame, and dividing the video frame to be processed into n data to be processed according to a preset size, wherein n is a positive integer.
Optionally, the method further includes:
taking a first frame video frame of the target video frame as a reference video frame, and dividing the reference video frame into n reference data according to a preset size;
dividing the reference data into a zero reference block, a dense area reference block and a sparse area reference block according to the step length of the reference data, and determining a first calculation point of the zero reference block, a second calculation point of the dense area reference block and a third calculation point of the sparse area reference block.
Optionally, the calculating a first SAD value of the zero current block according to the central point includes:
acquiring the zero current block and the zero reference block based on the coordinates of the central point and the coordinates of the first calculation point;
splitting the zero current block and the zero reference block, and splicing the split data blocks to obtain a first computing basic unit block;
and subtracting the pixel from the zero point current block and the pixel from the zero point reference block in the first calculation basic unit block, then taking the absolute value, and accumulating the absolute value to obtain a first SAD value.
Optionally, the calculating a second SAD value of the current block in the dense region according to the first search point includes:
acquiring the current block and the reference block of the dense area based on the coordinate of the first search point and the coordinate of the second calculation point;
splitting the current block of the dense area and the reference block of the dense area, and splicing the split data blocks to obtain a second calculation basic unit block;
and subtracting the pixels from the current block in the dense area and the reference block in the dense area in the second calculation basic unit block, then taking the absolute value, and accumulating the absolute value to obtain a second SAD value.
Optionally, the calculating a third SAD value of the current block in the sparse region according to the second search point includes:
acquiring the sparse-region current block and the sparse-region reference block based on the coordinates of the second search point and the coordinates of the third calculation point;
splitting the sparse region current block and the sparse region reference block, and splicing the split data blocks to obtain a third calculation basic unit block;
and subtracting the pixel from the current block in the sparse area in the third calculation basic unit block from the pixel from the reference block in the sparse area, then taking the absolute value, and accumulating the absolute value to obtain a third SAD value.
Optionally, the method further includes:
determining first data to be processed and second data to be processed, wherein the second data to be processed is data adjacent to the first data to be processed;
determining a target area overlapping with the first data to be processed in the second data to be processed according to the step length and the size of the first data to be processed and the second data to be processed;
and eliminating the target area in the second data to be processed.
Optionally, the dividing the data to be processed into a zero current block, a dense current block, and a sparse current block according to the step size of the data to be processed includes:
dividing data to be processed with the step length of 0 into zero-point areas, and determining a zero-point current block in the division of the data to be processed based on the zero-point areas;
dividing data to be processed with the step size smaller than or equal to 4 into a dense area, and determining a current block of the dense area in the division of the data to be processed based on the dense area;
dividing the data to be processed with the step size being more than or equal to 8 into sparse regions, and determining sparse region current blocks in the data to be processed division based on the sparse regions.
In a second aspect, an embodiment of the present application provides an integer motion estimation system for video coding, including: the system comprises a control module, a data scheduling module, a data buffering module, a two-stage data splicing module, an SAD calculation module, an SAD comparison module and a storage module;
the data scheduling module is used for acquiring data to be processed and sending the data to be processed to the SAD calculation module, and is also used for acquiring reference data and sending the reference data to the two-stage data splicing module;
the two-stage data splicing module is used for splitting and splicing the reference data and sending the spliced data to the SAD calculation module;
the SAD calculating module is used for calculating according to the obtained spliced data and the obtained data to be processed to obtain an SAD value and sending the SAD value to the SAD comparing module;
the SAD comparison module is used for generating feedback information according to the acquired SAD value and sending the SAD value and the feedback information to the control module;
the control module is used for receiving the feedback information of the SAD comparison module to control the starting and stopping of the process and outputting the optimal motion vector according to the SAD value.
In a third aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method steps as described in the first aspect.
Has the advantages that:
the integer motion estimation algorithm of the video coding divides data to be processed into three search windows of a zero current block, a current block in a dense area and a current block in a sparse area, performs optimal matching operation of motion vectors in the three search windows in a step-by-step search operation mode, and terminates the operation after obtaining the optimal matching block of the motion vectors through the idea of termination in advance, thereby reducing unnecessary steps and improving the parallelism of the calculation.
Drawings
FIG. 1 is a flow chart of an integer motion estimation method for video coding according to a preferred embodiment of the present invention;
FIG. 2 is a schematic diagram of calculating a first SAD value, a second SAD value and a third SAD value according to the preferred embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating the current block partitioning of the dense area according to the preferred embodiment of the present invention;
FIG. 4 is a schematic diagram of overlapping target regions of adjacent data to be processed according to a preferred embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating splicing of current blocks and reference block data of a dense area according to a preferred embodiment of the present invention;
FIG. 6 is a schematic diagram of the partition of the sparse region current block according to the preferred embodiment of the present invention;
FIG. 7 is a block diagram of an integer motion estimation system for video coding according to a preferred embodiment of the present invention;
FIG. 8 is a second exemplary architecture of the integer motion estimation system for video coding according to the present invention.
Detailed Description
The technical solutions of the present invention are described clearly and completely below, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The use of "first," "second," and similar terms in the present application do not denote any order, quantity, or importance, but rather the terms are used to distinguish one element from another. Also, the use of the terms "a" or "an" and the like do not denote a limitation of quantity, but rather denote the presence of at least one. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships are changed accordingly.
Referring to fig. 1 to 6, an embodiment of the present application provides a method for integer motion estimation for video coding, including:
dividing the data to be processed into a zero current block, a dense current block and a sparse current block according to the step length of the data to be processed, and determining the central point of the zero current block, a first search point of the dense current block and a second search point of the sparse current block;
calculating a first SAD value of the zero current block according to the central point, and outputting the relative coordinate of the central point as an optimal motion vector under the condition that the first SAD value is smaller than a threshold value;
under the condition that the optimal motion vector is not determined in the zero current block, calculating a second SAD value of the current block in the dense area according to the first search point, and under the condition that the second SAD value is smaller than a threshold value, outputting the relative coordinate of the first search point as the optimal motion vector;
and under the condition that the optimal motion vector is not determined in the current block in the dense area, calculating a third SAD value of the current block in the sparse area according to the second search point, and under the condition that the third SAD value is less than a threshold value, outputting the relative coordinate of the second search point as the optimal motion vector.
In the above embodiment, the data to be processed is divided into three search windows, namely, a zero current block, a dense current block and a sparse current block, and the optimal matching operation of the motion vector is performed step by step in the three search windows in a step-by-step search operation manner, and the operation is terminated after the optimal matching block of the motion vector is obtained through the concept of termination in advance, so as to reduce unnecessary steps and improve the parallelism of the calculation, when the zero current block is operated, the zero current block is calculated according to the coordinates of the center point of the zero current block, and the calculated first SAD value is compared with the threshold immediately after one calculation is finished, meanwhile, the threshold value compared with the calculated first SAD value of the first zero current block is 0, and the value of the calculated first SAD value of the first zero current block is given to the threshold value after the comparison is finished, then, the first SAD value obtained by calculating the zero current block, the second SAD value obtained by calculating the current block in the dense area and the third SAD value obtained by calculating the current block in the sparse area are compared with the assigned threshold value, thereby realizing the reuse of data, reducing the calculation steps, in the process of calculating the current block of the compact area, first search points of the current blocks of all the compact areas are obtained, and calculating the second SAD value of the current block in the dense area according to all the first searching points to obtain all the second SAD values, then comparing all the second SAD values with the threshold value to obtain the second SAD value meeting the conditions, and comparing the second SAD values meeting the conditions, finding the minimum SAD value meeting the conditions as the optimal output, and outputting the relative coordinate of the current block search point in the dense region corresponding to the second SAD value as the optimal output as the optimal motion vector.
Optionally, before dividing the data to be processed into the zero current block, the dense current block, and the sparse current block according to the step size of the data to be processed, the method further includes:
the method comprises the steps of obtaining a target video frame to be coded, determining a video frame to be processed in the target video frame, and dividing the video frame to be processed into n data to be processed according to a preset size, wherein n is a positive integer.
In the above embodiment, the video frame to be processed is a video frame remaining in the target video frame except for the first frame video frame, and the video frame to be processed is divided into a plurality of pieces of data to be processed with the same size according to the preset size, and then the divided data to be processed are sequentially processed, so that the problems of overlarge data and excessive calculation amount in one-time processing are avoided.
Optionally, the method further includes:
taking a first frame video frame of the target video frame as a reference video frame, and dividing the reference video frame into n reference data according to a preset size;
dividing the reference data into a zero reference block, a dense area reference block and a sparse area reference block according to the step length of the reference data, and determining a first calculation point of the zero reference block, a second calculation point of the dense area reference block and a third calculation point of the sparse area reference block.
In the above embodiment, a first frame video frame in a target video frame is used as reference data, the reference data is divided according to a dividing manner of data to be processed, the data obtained by dividing the reference data can correspond to the data obtained by dividing the data to be processed one by one, and meanwhile, a first calculation point, a second calculation point and a third calculation point are determined according to a determination method of a central point, a first search point and a second search point, so that when the reference data is subsequently used for calculation, a corresponding relationship between the data to be processed and the reference data in the calculation process can be determined through mutual correspondence of coordinates among the first calculation point, the second calculation point, the third calculation point, the central point, the first search point and the second search point, and the data to be processed and the reference data corresponding to the coordinates are put together for calculation of the SAD value.
Optionally, the calculating a first SAD value of the zero current block according to the central point includes:
acquiring the zero current block and the zero reference block based on the coordinates of the central point and the coordinates of the first calculation point;
splitting the zero current block and the zero reference block, and splicing the split data blocks to obtain a first computing basic unit block;
and subtracting the pixel from the zero point current block and the pixel from the zero point reference block in the first calculation basic unit block, then taking the absolute value, and accumulating the absolute value to obtain a first SAD value.
In the above embodiment, the zero current block and the zero reference block, where the coordinates of the central point correspond to the coordinates of the first calculation point, are split and spliced to calculate the first SAD value, and when the absolute value is accumulated, data of 16 pixels is accumulated, and the data accumulated to 16 pixels is only an example and is not limited.
Meanwhile, in the above embodiment, the first SAD value is obtained by decoding pixel information through a two-stage block splicing storage module, and obtaining information such as the current block size, the burst transmission frequency, and the position of the reference pixel in the search window, the first-stage splicing is shown in fig. 2, in the drawing, Ref _ pi × el is the reference pixel transmitted in each cycle in the pipeline, and BUFFER _0 and BUFFER _1 are two reference pixel splicing BUFFERs of 256 bits. In the first-stage pixel splicing, effective data in any pixel with effective data bits of a reference pixel are shifted to a BUFFER _1 through a shifting operation with low time delay in the first step, and the BUFFER _0 waits; in the second step and the third step, reference pixel data are respectively shifted into two buffers according to the information of the splitting effective bit, and the data of the buffers after splicing are sent to an RAM and then emptied for waiting for new splicing operation; and the fourth step is the last step of splicing, and partial effective data is spliced into the cache which is not completely spliced in the previous step and is sent to the RAM. And finishing the first-stage splicing. The second stage splices 8 rows of pixels of the same 8 x 8 block stored in the RAM into a set of 512-bit reference pixels on the basis of the first stage. 512bit pixels after splicing are 8 multiplied by 8 sub-blocks of the divided data multiplexing and SAD calculation basic unit;
the SAD calculation module respectively calculates the following positions according to different hardware architecture designs: in low-cost design, the parallelism of the SAD calculation module is 4, namely the SAD calculation module consists of 4SAD calculation units which can calculate one 8 multiplied by 8 pixel block at a time; in high-performance design, in order to meet the requirement of larger data throughput, the parallelism of the SAD calculation module is 8, that is, the SAD calculation module consists of 8 SAD calculation units which can calculate one 8 × 8 pixel block at a time, each SAD calculation unit calls 4 underlying 4 × 4SAD operators, the SAD calculation module calculates SAD results of 4 or 8 × 8 blocks by subtracting the pixels of the reference block from the pixels of the current block, then accumulating the subtracted values until the SAD values of 16 pixels are accumulated, and by adopting pipeline design, the SAD calculation module calculates SAD results of 4 or 8 × 8 blocks in each period. In the SAD calculation module, whether the pixel information of the reference block is consistent with the pixel information of the current block is firstly judged so as to ensure that the calculated SAD value is accurate and effective, and relevant information is continuously transmitted;
in the case where the block size is equal to or less than 8 × 8, the SAD comparison module compares the input SAD value with the current minimum value. Then sending the minimum SAD value and the pixel information to a control module for early termination of algorithm judgment or final result output; when the block size is larger than 8 x 8, the SAD comparison module continuously accumulates SAD values with the SAD values of the corresponding search points according to the input pixel information until the SAD value calculation of the search points is completed. Comparing the SAD values of the finally calculated search points, and outputting the information of the search point where the minimum SAD value is located;
when the block size is larger than 8 × 8, according to the idea of block splitting and data reuse, the SAD comparison module stores the calculated SAD results of 8 × 8 sub-blocks to replace the original pixel data with larger data size, and waits for all 8 × 8 sub-blocks split by the search point to complete SAD operation and then accumulate, and finally compares to obtain the minimum SAD and the optimal MV, and the calculation method of the second SAD value and the third SAD value described below is the same as the above method.
Optionally, the calculating a second SAD value of the current block in the dense region according to the first search point includes:
acquiring the current block and the reference block of the dense area based on the coordinates of the first search point and the coordinates of the second calculation point;
splitting the current block of the dense area and the reference block of the dense area, and splicing the split data blocks to obtain a second computing basic unit block;
and subtracting the pixels from the current block in the dense area and the reference block in the dense area in the second calculation basic unit block, then taking the absolute value, and accumulating the absolute value to obtain a second SAD value.
In the above embodiment, the second SAD value is calculated by splitting and splicing the dense-area current block and the dense-area reference block corresponding to the coordinates of the first search point and the coordinates of the second calculation point, and when the absolute values are accumulated, the data of 16 pixels are accumulated, and the data accumulated to 16 pixels is only an example and is not limited.
Meanwhile, in the above-mentioned embodiment, the variable rectangular pixel block composed of the reference pixels that the dense area needs to read is called a dense area search window, as shown in fig. 3, the search window of the dense area is changed according to the current size, because the interval between adjacent search points of the dense area is less than or equal to 4, and for any PU size, each pixel in the search window of the dense area is adopted at least once, so for all the reference pixels in the dense area search window, the block partition of the dense area is based on the block where each search point is located, dividing it into several 8 × 8 sub-blocks, the block partition based on the search starting point and the data reuse between the adjacent search points are as shown in fig. 4, assuming that the current size is 16 × 16, taking two 16 × 16 search points on the step size of the dense area of 4, dividing each 16 × 16 block into 4 8 sub-blocks based on the block partition of the search points, the first search point is divided into four 8 x 8 sub-blocks A, B, C and D, the second search point is divided into four 8 x 8 sub-blocks E, F, G and H, after the reading of all the four blocks A, B, C and D of the first search point is completed, only F and H of the four blocks E, F, G and H of the second search point need to read partial reference pixels, and other reference pixels are repeated with the reference pixels of the first search point, so that the aim of reducing the data volume of the read and stored reference pixels is fulfilled;
when reading the reference pixels, the pixels with different repeated sub-blocks are allocated to the corresponding sub-blocks, so the dense area search window adopts a line-by-line reading mode, and the read reference pixels are allocated to the 8 × 8 blocks divided by each search point, as shown in fig. 5, when reading a certain line of reference pixels, the first 8 valid reference pixels are firstly allocated to the line corresponding to the first 8 × 8 sub-block. Then allocating subsequent reference pixels to the corresponding 8 × 8 sub-blocks according to the interval of the search points, and allocating repeated reference pixels between adjacent search points for multiple times to realize data reuse until all the reference pixels needing to be read in the row in the dense area are allocated completely, then reading the reference pixels in the next row, and assuming that 16 continuous reference pixels are read at one time by combining fig. 4, allocating the first 8 reference pixels to the first row of the a sub-block; allocating 5 th to 12 th reference pixels to a first row of the E sub-block; the last 8 reference pixels are allocated to the first row of the B sub-block; the last 4 reference pixels are assigned to the first row of the F sub-block. Therefore, the repeated utilization of all the subsequent repeated reference pixels can be met by reading the reference pixel once;
because the reference pixels are read according to rows in the algorithm, the search points in the dense area are densely arranged, the reference pixels are read by adopting bus burst transmission through hardware, and the reference pixels are stored by adopting the RAM by taking the search points as units, so that the processing speed is improved. The pixel reading order of the dense area is to read one row from top to bottom within the dense area search window.
For the conventional algorithm, assuming that the current block size is 16 × 16, if all search points of the dense area are calculated, data of 32 × 64 × 8-16384 bits needs to be read, while the data needed to be read by the algorithm proposed herein is only 24 × 24 × 8-4608 bits, which reduces the data amount by 71.88%. The amount of data reduced varies for different sized blocks, with larger sizes giving greater degrees of data reuse. The amount of data reduced is 96.02% for a 128 x 128 sized block.
Optionally, the calculating a third SAD value of the current block in the sparse region according to the second search point includes:
acquiring the sparse-region current block and the sparse-region reference block based on the coordinates of the second search point and the coordinates of the third calculation point;
splitting the sparse region current block and the sparse region reference block, and splicing the split data blocks to obtain a third calculation basic unit block;
and subtracting the pixel from the current block in the sparse area in the third calculation basic unit block from the pixel from the reference block in the sparse area, then taking the absolute value, and accumulating the absolute value to obtain a third SAD value.
In the above embodiment, the third SAD value is calculated by splitting and splicing the sparse-region current block and the sparse-region reference block corresponding to the coordinates of the second search point and the coordinates of the third calculation point, and when the absolute values are accumulated, data of 16 pixels are accumulated, where the data accumulated to 16 pixels is only an example and is not limited.
Meanwhile, in the above embodiment, since the sparse area search is performed after the dense area search, data reuse of pixels in the overlapping portion is realized, and the number of times of reading is reduced, in the sparse area, the pitch of each search point is equal to or greater than 8, and for all sizes, if reading by rows, there are some pixels that are not needed, the efficiency is reduced, so reading by steps from small to large is adopted for different steps. And the pixels needed by the search point in each step are divided into four variable-size sparse area search windows according to the size, as shown in fig. 6, the search point with the step size of 16 forms four variable-size search windows a, B, C, and D, in each search window, the reference pixels are allocated to the corresponding 8 × 8 blocks in the same row-by-row reading mode as the dense area search window, different from the dense area search, in the block division process of the sparse area, the four search windows are all divided into 8 × 8 sub-blocks instead of the block where the search point is located, and although a part of 8 × 8 sub-blocks in the sparse area search window can be adopted by a plurality of search points, the 8 × 8 sub-blocks are only read once and stored, so as to realize the reuse of data. For the same step length, four search windows are searched according to the sequence of A, D, B and C, the search sequence is from top to bottom in rows for each search window, the sparse area search windows are divided into 8 multiplied by 8 sub-blocks for storage when the hardware stores the reference pixels because the interval between the sparse area search points is large, and the RAM of the dense area is reused, so that the cost is saved. And finally adding the subblocks of the same search point. Since the arrangement distance of each search point in the sparse area is greater than 8, the pixel point can be recycled when the size is greater than 8 × 8.
Optionally, the method further includes:
determining first data to be processed and second data to be processed, wherein the second data to be processed is data adjacent to the first data to be processed;
determining a target area overlapping with the first data to be processed in the second data to be processed according to the step length and the size of the first data to be processed and the second data to be processed;
and eliminating the target area in the second data to be processed.
In the above embodiment, in the data processing process, an overlapped target area exists between one piece of data to be processed and two adjacent pieces of data to be processed, and in order to avoid repeated calculation of data in the overlapped target area, it is necessary to remove duplicate data in the overlapped target area, for example, after the first piece of data to be processed and the second piece of data to be processed are adjacent data, when calculating the second piece of data to be processed, after the target area overlapped with the first piece of data to be processed in the second piece of data to be processed is removed, the second piece of data to be processed from which the overlapped target area data is removed is calculated.
Optionally, the dividing, according to the step size of the data to be processed, the data to be processed into a zero current block, a current block in a dense area, and a current block in a sparse area includes:
dividing data to be processed with the step length of 0 into zero-point areas, and determining a zero-point current block in the division of the data to be processed based on the zero-point areas;
dividing data to be processed with the step length being less than or equal to 4 into dense areas, and determining current blocks of the dense areas in the division of the data to be processed based on the dense areas;
dividing the data to be processed with the step size being more than or equal to 8 into sparse regions, and determining sparse region current blocks in the data to be processed division based on the sparse regions.
In the above embodiment, the statistical analysis of the non-motion blocks and the small motion blocks in the test sequence shows that: the optimal matching blocks of the motion vectors of which the step length is more than 85 percent are positioned within 8 or less, so that the step length is used as a judgment basis for dividing the data to be processed, the area with the step length of 0 is divided into a zero area, the area with the step length of less than or equal to 4 is divided into a dense area, the area with the step length of more than or equal to 8 is divided into a sparse area, according to the research result, the probability of the optimal matching blocks of the motion vectors appearing in the zero area and the dense area is greater than that in the sparse area, the zero area and the dense area can be used as key processing objects for data processing, and the zero area, the dense area and the sparse area are sequentially calculated according to the size of the step length, so that the result of final data processing is obtained through the shortest operation processing mode, and the calculation and search processes are reduced.
Referring to fig. 7-8, an embodiment of the present application provides an integer motion estimation system for video coding, including: the system comprises a control module, a data scheduling module, a data buffering module, a two-stage data splicing module, an SAD calculation module, an SAD comparison module and a storage module;
the data scheduling module is used for acquiring data to be processed and sending the data to be processed to the SAD calculation module, and is also used for acquiring reference data and sending the reference data to the two-stage data splicing module;
the two-stage data splicing module is used for splitting and splicing the reference data and sending the spliced data to the SAD calculation module;
the SAD calculating module is used for calculating according to the obtained spliced data and the obtained data to be processed to obtain an SAD value and sending the SAD value to the SAD comparing module;
the SAD comparison module is used for generating feedback information according to the acquired SAD value and sending the SAD value and the feedback information to the control module;
the control module is used for receiving the feedback information of the SAD comparison module to control the starting and stopping of the process and outputting the optimal motion vector according to the SAD value.
In the above embodiment, there may be two video coding integer motion estimation systems, fig. 7 is an integer motion estimation system architecture diagram of a first video coding, which supports 4k @30fps video transmission, fig. 8 is an integer motion estimation system architecture diagram of a second video coding, which supports 8k @60fps video transmission, in the design of the first video coding integer motion estimation system, a control module first receives current block information, then the control module encodes information of a search point where a read pixel is located, step size and the like into pixel information, sends the pixel information to a data scheduling module, then transfers the pixel information to an Avalon bus and a data scheduling module, and each module in a pipeline starts to operate, the data scheduling module calculates a memory address according to the pixel information, the search center point information and the like, and then collects reference block pixels and current block pixels through burst transmission of the Avalon bus, the current block pixels will be stored in the current block pixel storage module. After the reference block pixels are collected, the reference block pixels and corresponding pixel information are firstly stored in a data buffer module consisting of FIFO (first in first out) and then are sent to a two-stage data splicing module according to the principle of first in first out, the control module judges the pipeline state in real time, and if data back pressure occurs, the preceding-stage pipeline operation and Avalon data reading are suspended.
In a second design of the integer motion estimation system for video coding, the control module will perform a pre-fetch operation: after obtaining the current block information and the searching center point coordinate, all data in the current block pixel and the complete searching window on the reference frame are stored in a pixel storage and management module, and are stored in an RAM according to an 8 multiplied by 8 sub-block unit during storage. The control module then starts the pipeline and computes pixel information to pass into the pipeline. The data buffer module mainly comprises FIFO and address calculator. The address calculator calculates the address of the data needing to be spliced currently in the pixel storage and management module, then reads the data into the FIFO, and the two-stage data splicing reads the data according to the FIFO first-in first-out principle for splicing.
Optionally, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the method steps as described above.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations can be devised by those skilled in the art in light of the above teachings. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (10)

1. A method for integer motion estimation for video coding, comprising:
dividing the data to be processed into a zero current block, a dense current block and a sparse current block according to the step length of the data to be processed, and determining the central point of the zero current block, a first search point of the dense current block and a second search point of the sparse current block;
calculating a first SAD value of the zero current block according to the central point, and outputting the relative coordinate of the central point as an optimal motion vector under the condition that the first SAD value is smaller than a threshold value;
under the condition that the optimal motion vector is not determined in the zero current block, calculating a second SAD value of the current block in the dense area according to the first search point, and under the condition that the second SAD value is smaller than a threshold value, outputting the relative coordinate of the first search point as the optimal motion vector;
and under the condition that the optimal motion vector is not determined in the current block in the dense area, calculating a third SAD value of the current block in the sparse area according to the second search point, and under the condition that the third SAD value is smaller than a threshold value, outputting the relative coordinate of the second search point as the optimal motion vector.
2. The method of claim 1, wherein the method further comprises, before the step size of the data to be processed is divided into a zero current block, a dense current block and a sparse current block:
the method comprises the steps of obtaining a target video frame to be coded, determining a video frame to be processed in the target video frame, and dividing the video frame to be processed into n data to be processed according to a preset size, wherein n is a positive integer.
3. The method of integer motion estimation for video coding according to claim 2, further comprising:
taking a first frame video frame of the target video frame as a reference video frame, and dividing the reference video frame into n reference data according to a preset size;
dividing the reference data into a zero reference block, a dense area reference block and a sparse area reference block according to the step length of the reference data, and determining a first calculation point of the zero reference block, a second calculation point of the dense area reference block and a third calculation point of the sparse area reference block.
4. The method of claim 3, wherein calculating the first SAD value for the zero current block according to the center point comprises:
acquiring the zero current block and the zero reference block based on the coordinates of the central point and the coordinates of the first calculation point;
splitting the zero current block and the zero reference block, and splicing the split data blocks to obtain a first computing basic unit block;
and subtracting the pixel from the zero point current block and the pixel from the zero point reference block in the first calculation basic unit block, then taking the absolute value, and accumulating the absolute value to obtain a first SAD value.
5. The method of claim 3, wherein calculating the second SAD value for the current block in the dense region according to the first search point comprises:
acquiring the current block and the reference block of the dense area based on the coordinates of the first search point and the coordinates of the second calculation point;
splitting the current block of the dense area and the reference block of the dense area, and splicing the split data blocks to obtain a second computing basic unit block;
and subtracting the pixels from the current block in the dense area and the reference block in the dense area in the second calculation basic unit block, then taking the absolute value, and accumulating the absolute value to obtain a second SAD value.
6. The method of claim 3, wherein calculating the third SAD value for the current block in the sparse region according to the second search point comprises:
acquiring the sparse-region current block and the sparse-region reference block based on the coordinates of the second search point and the coordinates of the third calculation point;
splitting the sparse region current block and the sparse region reference block, and splicing the split data blocks to obtain a third calculation basic unit block;
and subtracting the pixel from the current block in the sparse area in the third calculation basic unit block from the pixel from the reference block in the sparse area, then taking the absolute value, and accumulating the absolute value to obtain a third SAD value.
7. The method of integer motion estimation for video coding according to claim 1, further comprising:
determining first data to be processed and second data to be processed, wherein the second data to be processed is data adjacent to the first data to be processed;
determining a target area overlapping with the first data to be processed in the second data to be processed according to the step length and the size of the first data to be processed and the second data to be processed;
and eliminating the target area in the second data to be processed.
8. The integer motion estimation method of claim 1, wherein the dividing the data to be processed into a zero-point current block, a dense-region current block and a sparse-region current block according to the step size of the data to be processed comprises:
dividing data to be processed with the step length of 0 into zero-point areas, and determining a zero-point current block in the division of the data to be processed based on the zero-point areas;
dividing data to be processed with the step size smaller than or equal to 4 into a dense area, and determining a current block of the dense area in the division of the data to be processed based on the dense area;
dividing the data to be processed with the step size being more than or equal to 8 into sparse regions, and determining sparse region current blocks in the data to be processed division based on the sparse regions.
9. An integer motion estimation system for video coding, comprising: the system comprises a control module, a data scheduling module, a data buffering module, a two-stage data splicing module, an SAD calculation module, an SAD comparison module and a storage module;
the data scheduling module is used for acquiring data to be processed and sending the data to be processed to the SAD calculation module, and is also used for acquiring reference data and sending the reference data to the two-stage data splicing module;
the two-stage data splicing module is used for splitting and splicing the reference data and sending the spliced data to the SAD calculation module;
the SAD calculating module is used for calculating according to the obtained spliced data and the obtained data to be processed to obtain an SAD value and sending the SAD value to the SAD comparing module;
the SAD comparison module is used for generating feedback information according to the acquired SAD value and sending the SAD value and the feedback information to the control module;
the control module is used for receiving the feedback information of the SAD comparison module to control the starting and stopping of the process and also used for outputting the optimal motion vector according to the SAD value.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 1 to 8.
CN202210393510.4A 2022-04-14 2022-04-14 Integer motion estimation method, system and storage medium for video coding Active CN114727115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210393510.4A CN114727115B (en) 2022-04-14 2022-04-14 Integer motion estimation method, system and storage medium for video coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210393510.4A CN114727115B (en) 2022-04-14 2022-04-14 Integer motion estimation method, system and storage medium for video coding

Publications (2)

Publication Number Publication Date
CN114727115A true CN114727115A (en) 2022-07-08
CN114727115B CN114727115B (en) 2024-05-03

Family

ID=82243821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210393510.4A Active CN114727115B (en) 2022-04-14 2022-04-14 Integer motion estimation method, system and storage medium for video coding

Country Status (1)

Country Link
CN (1) CN114727115B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060002471A1 (en) * 2004-06-30 2006-01-05 Lippincott Louis A Motion estimation unit
US20060002472A1 (en) * 2004-06-30 2006-01-05 Mehta Kalpesh D Various methods and apparatuses for motion estimation
CN101374235A (en) * 2007-08-24 2009-02-25 大唐移动通信设备有限公司 Method and apparatus for estimating rapid block motion of video encoding
US20090225845A1 (en) * 2008-03-10 2009-09-10 Neomagic Corp. Multi-Directional Motion Estimation Using Parallel Processors and Pre-Computed Search-Strategy Offset Tables
CN110139106A (en) * 2019-04-04 2019-08-16 中南大学 A kind of video encoding unit dividing method and its system, device, storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060002471A1 (en) * 2004-06-30 2006-01-05 Lippincott Louis A Motion estimation unit
US20060002472A1 (en) * 2004-06-30 2006-01-05 Mehta Kalpesh D Various methods and apparatuses for motion estimation
CN101374235A (en) * 2007-08-24 2009-02-25 大唐移动通信设备有限公司 Method and apparatus for estimating rapid block motion of video encoding
US20090225845A1 (en) * 2008-03-10 2009-09-10 Neomagic Corp. Multi-Directional Motion Estimation Using Parallel Processors and Pre-Computed Search-Strategy Offset Tables
CN110139106A (en) * 2019-04-04 2019-08-16 中南大学 A kind of video encoding unit dividing method and its system, device, storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZHIKUN LIAO: "A novel motion compensation method for random frequency hopping radar", 《2017 10TH INTERNATIONAL CONGRESS ON IMAGE AND SIGNAL PROCESSING, BIOMEDICAL ENGINEERING AND INFORMATICS (CISP-BMEI)》, 26 February 2018 (2018-02-26) *
李丽娇: "一种适用于星载太阳翼的驱动控制器设计", 《空间控制技术与应用》, vol. 44, no. 6, 15 December 2018 (2018-12-15) *
韩佳;毛志刚;: "基于可重构***的HEVC运动估计算法实现", 信息技术, no. 11, 25 November 2016 (2016-11-25) *

Also Published As

Publication number Publication date
CN114727115B (en) 2024-05-03

Similar Documents

Publication Publication Date Title
US9106922B2 (en) Motion estimation engine for video encoding
KR100242880B1 (en) Apparatus for tracing contours of segmented regions
US9612962B2 (en) Performing cache bank operations in offset sequences from first bank
CN102113327B (en) Image encoding device, method, and integrated circuit
CN1260977C (en) Method of motion vector determination in digital video compression
US6470050B1 (en) Image coding apparatus and its motion vector detection method
US20030031257A1 (en) Motion estimation method and apparatus for interrupting computation which is determined not to provide solution
CN102148990A (en) Device and method for predicting motion vector
US6263112B1 (en) Motion vector searching apparatus and motion picture coding apparatus
CN1224977A (en) Method and apparatus for coding interlaced shape information
CN117528069A (en) Displacement vector prediction method, device and equipment
CN114727115B (en) Integer motion estimation method, system and storage medium for video coding
CN117014618A (en) Image compression-based blocking method and system and electronic equipment
CN104113759A (en) Video system and method and device for buffering and recompressing/decompressing video frames
CN101399978A (en) Reference frame data reading method in hardware decoder and apparatus thereof
CN114897665A (en) Configurable real-time parallax point cloud computing device and method
CN103327340A (en) Method and device for searching integer
JP4228705B2 (en) Motion vector search method and apparatus
JP3432039B2 (en) Image encoding method and apparatus
JPH11103257A (en) Arithmetic encoding/decoding device
CN115914645A (en) Inter-frame prediction method and device
JP5033285B2 (en) Method and system for video evaluation
CN113676737B (en) GPU-based efficient video encoder and encoding method
JP4859168B2 (en) Motion detection device and motion detection method
CN113723274B (en) Improved target object detection method based on non-maximum inhibition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant