Limited memory access window for motion vector refinement
By limiting memory access to integer samples within a defined window for motion vector refinement, the complexity and cost associated with fractional interpolation are reduced, enhancing processing speed and efficiency in video encoding and decoding.
Patent Information
- Application Number
- JP2023078105
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2017-10-09
- Filing Date
- 2023-05-10
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2038-05-30
AI Technical Summary
Motion vector refinement in video encoding and decoding requires significant memory access, leading to increased complexity and processing time, particularly when fractional interpolation is involved, which can be costly in terms of chip size and external memory access.
Limit the number of samples required for motion vector refinement by defining a memory access window that includes only integer samples accessible for template matching, using interpolation filtering to obtain fractional positions without additional integer samples.
This approach reduces the need for external memory access and on-chip memory size, thereby improving processing speed and efficiency in motion vector determination.
Smart Images

Figure 0007541155000014 
Figure 0007541155000008 
Figure 0007541155000016
Abstract
Description
[Technical field]
[0001] The present invention relates to the determination and refinement of motion vectors that may be used during video encoding and decoding. [Background technology]
[0002] Current hybrid video codecs use predictive coding. Pictures of a video sequence are sub-divided into blocks of pixels, and then these blocks are coded. Instead of coding the blocks pixel by pixel, the whole block is predicted using already coded pixels that are spatially or temporally close to the block. The encoder further processes only the difference between the block and the prediction of that block. The further processing generally includes a transformation of the block pixels into coefficients in the transform domain. The coefficients may then be further compressed by quantization and further compacted by entropy coding to form a bitstream. The bitstream further includes any signaling information that allows a decoder to decode the coded video. For example, the signaling may include settings regarding encoder settings such as the size of the input picture, the frame rate, a quantization step indication, the prediction applied to the blocks of the picture, etc.
[0003] Temporal prediction exploits the temporal correlation between pictures, also called frames of a video. Temporal prediction is also called inter-prediction because it is a prediction that uses dependencies between different video frames. Thus, the block being coded, also called the current block, is predicted from one or more already coded pictures, called reference pictures. The reference pictures are not necessarily pictures that are ahead of the current picture in which the current block is located, in the display order of the video sequence. The encoder may code pictures in a coding order that is different from the display order. As a prediction of the current block, a co-located block in the reference picture may be determined. A co-located block is a block that is at the same position in the reference picture as the current block in the current picture. Such a prediction is accurate for areas of the picture with no motion, i.e. areas of the picture that do not move from picture to picture.
[0004] In general, motion estimation is used when determining a prediction of a current block to obtain a predictor that takes motion into account, i.e. a motion compensated predictor. Thus, the current block is predicted by a block in a reference picture that is at a distance given by a motion vector from the position of the co-located block. To enable the decoder to determine the same prediction of the current block, the motion vector may be signaled in the bitstream. To further reduce the signaling overhead caused by signaling the motion vector for each of the blocks, the motion vector itself may be estimated. The estimation of the motion vector may be performed based on the motion vectors of neighboring blocks in the spatial and / or temporal domain.
[0005] The prediction of the current block may be calculated using one reference picture by weighting predictions obtained from two or more reference pictures. The reference picture may be a neighboring picture, i.e., a picture immediately before and / or immediately after the current picture in display order, since it is most likely similar to the current picture. In general, however, the reference picture may be any other picture before or after the current picture in display order and before the current picture in the bitstream (decoding order). This may provide advantages, for example, in cases of occlusion and / or non-linear motion in the video content. Therefore, the identity of the reference picture may also be signaled in the bitstream.
[0006] A special mode of inter prediction is the so-called bidirectional prediction, in which two reference pictures are used in generating a prediction of the current block. In particular, two predictions determined in each of the two reference pictures are combined into a prediction signal of the current block. Bidirectional prediction may result in a more accurate prediction of the current block than unidirectional prediction, i.e., prediction using only a single reference picture. More accurate prediction leads to smaller differences (also called "residuals") between the pixels of the current block and the prediction, which may be coded more efficiently, i.e., compressed into a shorter bitstream. In general, more than two reference pictures may be used to find more than two reference blocks, respectively, to predict the current block, i.e., multi-reference inter prediction may be applied. Thus, the term multi-reference prediction includes bidirectional prediction and prediction using more than two reference pictures.
[0007] To provide more accurate motion estimation, the resolution of the reference picture may be increased by interpolating samples between pixels. Fractional pixel interpolation may be performed by weighted average of the nearest pixels. In the case of half-pixel resolution, for example, bilinear interpolation is typically used. Other fractional pixels are calculated as the average of the nearest pixels weighted by the inverse of the distance between each nearest pixel and the pixel being predicted.
[0008] Motion vector estimation is a computationally complex task in which the similarity is calculated between a current block and a corresponding predicted block pointed to by a candidate motion vector in a reference picture. Typically, a search area includes M×M samples of an image, and each of the sample positions among the M×M candidate positions is tested. The test involves the calculation of a measure of similarity between an N×N reference block C and a block R at the tested candidate position of the search area. Due to its simplicity, the Sum of Absolute Differences (SAD) is a measure frequently used for this purpose,
number
[0009] In the above equation, x and y define candidate positions in the search area, while indices i and j represent samples in the reference block C and candidate block R. The candidate positions are often referred to as block displacements or offsets, reflecting the representation of block matching as shifting the reference block in the search area and calculating the similarity between the reference block C and the overlapping part of the search area. To reduce complexity, the number of candidate motion vectors is usually reduced by restricting the candidate motion vectors to a particular search space. The search space may be defined, for example, by the number and / or location of pixels around a location in the reference picture that corresponds to the location of the current block in the current image. After calculating the SAD for all M×M candidate positions x and y, the best matching block R is the block whose location results in the lowest SAD corresponding to the highest similarity with the reference block C. On the other hand, the candidate motion vector may be defined by a list of candidate motion vectors formed by the motion vectors of neighboring blocks.
[0010] Typically, motion vectors are at least partially determined at the encoder side and signaled to the decoder in the encoded bitstream. However, motion vectors may also be derived at the decoder. In such a case, the current block is not available at the decoder and cannot be used to calculate similarity with the block to which the candidate motion vector points in the reference picture. Therefore, a template built from pixels of already decoded blocks is used instead of the current block. For example, already decoded pixels neighboring the current block may be used. Such motion estimation brings the advantage of reducing signaling, i.e., the motion vector is derived in the same way at both the encoder and the decoder, and therefore no signaling is required. On the other hand, the accuracy of such motion estimation may be lower.
[0011] To make a compromise between accuracy and signaling overhead, the estimation of motion vectors may be split into two steps: motion vector derivation and motion vector refinement. For example, the derivation of a motion vector may include the selection of a motion vector from a list of candidates. Such a selected motion vector may be further refined, for example, by a search in a search space. The search in the search space is based on calculating a cost function for each candidate motion vector, i.e. for each candidate position of the block to which the candidate motion vector points.
[0012] Document JVET-D0029: Decoder-Side Motion Vector Refinement Based on Bilateral Template Matching, X. Chen, J. An, J. Zheng (which may be found at the site http: / / phenix.it-sudparis.eu / jvet / ) shows a motion vector refinement in which a first motion vector with integer pixel resolution is found and further refined by a search with half-pixel resolution in a search space around the first motion vector.
[0013] To perform motion vector refinement, it is necessary to store in memory at least the samples required for the current block to perform the refinement, i.e. samples that correspond to the search space and samples that can be accessed when template matching in the search space is performed.
[0014] External memory access is a key design parameter of current hardware architectures and / or software implementations due to the fact that external memory access slows down processing compared to internal memory utilization, whereas on-chip internal memory is limited, for example, due to the implementation chip size. Summary of the Invention [Means for solving the problem]
[0015] This disclosure is based on the observation that motion vector refinement, when implemented in combination with fractional interpolation, may require a further increase in on-chip memory size or even external memory accesses, either option being potentially undesirable.
[0016] In view of the above-mentioned problems, the present disclosure provides a motion vector prediction that makes it possible to take into account the number of accesses to an external memory and the number of samples that need to be accessible for the refinement of a motion vector for a coding block.
[0017] This is achieved by limiting the number of samples to the number of samples required for template matching of integer samples, and enabling only fractional positions that can be obtained by a given interpolation filter without requiring additional integer samples.
[0018] According to an aspect of the present invention, an apparatus for determination of a motion vector for a predictive block is provided, the apparatus comprising a processing circuit configured to obtain an initial motion vector for the predictive block and a template, and to determine a refinement of the initial motion vector by template matching with the template in a search space, the search space being at a position given by the initial motion vector and including one or more fractional sample positions, each of the fractional sample positions belonging to the search space being obtained by interpolation filtering with a filter of a predefined tap size that evaluates only integer samples within a window, the window being formed by the integer samples accessible for template matching in the search space.
[0019] One of the advantages of such a motion vector determination is the limited number of samples that need to be accessible to perform the refinement of the motion vector for the prediction block while simultaneously limiting the number of accesses to external memory or to a memory / storage / cache that stores the entire reference picture more broadly.
[0020] In an example, the window is defined as N integer sample columns and M integer sample rows relative to the initial motion vector of the predictive block, where N and M are non-zero integer values. Such a definition may provide a simple means for specifying which samples should be taken for purposes of motion vector determination and / or refinement. It may also be easily configurable, for example, in a bitstream or standard.
[0021] In one embodiment, the processing circuitry is configured to determine a refinement of the initial motion vector by template matching with said template in a search space that is iteratively expanded in a direction given by one of the more best matching positions of the search space in the most recent iteration, the window being defined by a predefined maximum number of iterations.
[0022] The search space may include a rectangular subwindow of the window such that all integer samples accessed for interpolation filtering of each fractional sample within the subwindow are within said window for an interpolation filter of a predefined tap size.
[0023] The search space may include a rectangular search sub-window of a window, and refinement of the initial motion vector is determined by template matching with said template in a rectangular search sub-window such that the integer samples accessed for interpolation filtering of each fractional sample in the search sub-window are within said window for an interpolation filter of a predefined tap size.
[0024] In one implementation, the processing circuitry may be configured to determine a refinement of the initial motion vector by template matching with the template in a search space that is iteratively expanded in a direction given by one of the more best-matching positions of the search space in the most recent iteration, the iteration being terminated when at least one sample in the search space of the most recent iteration is outside the search subwindow.
[0025] In particular, as a particular example, the interpolation filter is a one-dimensional filter that evaluates K integer horizontal or vertical samples where the fractional position lies on each horizontal or vertical line of integer samples.
[0026] Furthermore, for example, the search space is - It is adjacent to the top or bottom of the subwindow and lies on a horizontal line of integer samples, or - Is it adjacent to the left or right side of the subwindow and on a vertical line of integer samples? , and further includes any fractional positions that are outside the subwindow.
[0027] According to another aspect of the invention, an encoding device is provided for encoding a video image divided into predictive blocks into a bitstream, the encoding device comprising a device for determining a motion vector for the predictive block as described above, and an encoding circuit for encoding a difference between the predictive block and a predictor provided by the predictive block at a position based on the determined motion vector, and for generating a bitstream comprising the encoded difference and an initial motion vector.
[0028] According to another aspect of the present invention, a decoding device is provided for decoding a video image divided into predictive blocks from a bitstream, the decoding device comprising: an analysis unit for analyzing from the bitstream an initial motion vector and an encoded difference between the predictive block and a predictor provided by the predictive block at a position specified by the refined motion vector; a device for determining a refined motion vector for said predictive block; and a decoding circuit for reconstructing the predictive block as a function of the analyzed difference and the predictor provided by the predictive block at a position specified by the refined motion vector. The function may be or include a summation. The function may further include a cropping, rounding, scaling or further operation.
[0029] According to another aspect of the present invention, there is provided a method for determining a motion vector for a predictive block, comprising the steps of obtaining an initial motion vector and a template for the predictive block, and determining a refinement of the initial motion vector by template matching with the template in a search space, the search space being at a position given by the initial motion vector and comprising one or more fractional sample positions, each of the fractional sample positions belonging to the search space being obtained by interpolation filtering using a filter with a predefined tap size that evaluates only integer samples within a window, the window being formed by the integer samples accessible for template matching in the search space.
[0030] For example, the window may be defined as N integer sample columns and M integer sample rows relative to the initial motion vector of the predictive block, where N and M are non-zero integer values.
[0031] In an embodiment, the refinement of the initial motion vector is determined by template matching with said template in a search space that is iteratively extended in a direction given by one of the more best matching positions of the search space in the most recent iteration, and the window is defined by a predefined maximum number of iterations.
[0032] In an exemplary implementation, the search space includes a rectangular subwindow of the window such that all integer samples accessed for interpolation filtering of each fractional sample within the subwindow are within said window for an interpolation filter of a predefined tap size.
[0033] The search space may include a rectangular search sub-window of a window, and refinement of the initial motion vector is determined by template matching with said template in a rectangular search sub-window such that the integer samples accessed for interpolation filtering of each fractional sample in the search sub-window are within said window for an interpolation filter of a predefined tap size.
[0034] In one implementation, refinement of the initial motion vector may be determined by template matching with said template in a search space that is iteratively expanded in a direction given by one of the more best-matching positions of the search space in the most recent iteration, the iteration being terminated when at least one sample in the search space of the most recent iteration is outside the search subwindow.
[0035] Further, for example, the interpolation filter is a one-dimensional filter that evaluates either K horizontal or vertical integer samples when the fractional position lies on each horizontal or vertical line of integer samples.
[0036] Advantageously, the search space further includes fractional positions outside the subwindow, either adjacent to the top or bottom of the subwindow and on a horizontal line of integer samples, or adjacent to the left or right side of the subwindow and on a vertical line of integer samples.
[0037] According to another aspect of the present invention, there is provided an encoding method for encoding a video image divided into predictive blocks into a bitstream, the encoding method comprising the steps of determining a motion vector for the predictive block according to any of the methods described above, encoding a difference between the predictive block and a predictor provided by the predictive block at a position based on the determined motion vector, and generating a bitstream comprising the encoded difference and an initial motion vector.
[0038] According to another aspect of the present invention, a decoding method is provided for decoding a video image divided into predictive blocks from a bitstream, the decoding method comprising the steps of: analyzing from the bitstream an initial motion vector and an encoded difference between the predictive block and a predictor provided by the predictive block at a position specified by the refined motion vector; determining a refined motion vector for the predictive block according to any of the methods described above; and reconstructing the predictive block as a sum of the analyzed difference and the predictor provided by the predictive block at a position specified by the refined motion vector.
[0039] According to an aspect of the present invention, a non-transitory computer readable storage medium is provided that stores instructions that, when executed by a processor / processing circuit, perform steps according to any of the above-mentioned aspects or embodiments or combinations thereof.
[0040] In the following, exemplary embodiments are explained in more detail with reference to the accompanying figures and drawings. [Brief description of the drawings]
[0041] [Figure 1] FIG. 2 is a block diagram illustrating an example structure of an encoder in which motion vector derivation and refinement may be used. [Diagram 2] 1 is a block diagram illustrating an example structure of a decoder in which motion vector derivation and refinement may be used. [Diagram 3] FIG. 2 is a schematic diagram illustrating an exemplary template matching suitable for bi-prediction. [Figure 4] FIG. 2 is a schematic diagram illustrating an exemplary template matching suitable for uni- and bi-prediction. [Diagram 5] FIG. 2 is a block diagram illustrating a stage of motion vector derivation that operates without providing an initial motion vector that is refined in the bitstream. [Figure 6] FIG. 2 is a block diagram illustrating exemplary hardware for implementing an embodiment of the present invention. [Figure 7] FIG. 2 is a schematic diagram illustrating an example window with samples that should be available to be accessed for a coding block; [Figure 8] FIG. 1 is a schematic diagram illustrating an iterative search space. [Figure 9] FIG. 1 is a schematic diagram illustrating the expansion of a memory access window in the horizontal direction by interpolation filtering. [Figure 10] FIG. 13 is a schematic diagram illustrating sub-window definition with respect to fractional sample positions. [Figure 11] FIG. 2 is a schematic diagram illustrating an exemplary definition of a memory access window. [Figure 12] FIG. 1 is a schematic diagram illustrating example positions, including fractional positions, that are allowed to form positions in a search space for motion vector refinement. [Figure 13] FIG. 10 is a schematic diagram illustrating example fractional positions that are not allowed to form positions of a search space for motion vector refinement. [Figure 14] 1 is a flow diagram illustrating a method for determining which locations in a search space are allowed to be tested by template matching for motion vector refinement. [Figure 15] FIG. 1 is a schematic diagram illustrating example positions, including fractional positions, that are allowed to form positions in a search space for motion vector refinement. [Figure 16] 1 is a flow diagram illustrating an iterative refinement process on a memory access window. [Figure 17] 13 is a flow diagram illustrating the iterative refinement process in a search subwindow. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0042] This disclosure relates to adjusting the number of samples that should be accessible to perform motion vector refinement and interpolation to obtain a fractional position within a reference picture.
[0043] As mentioned above, external memory access is one of the most important design considerations in today's hardware and software architectures. For example, in the case of motion vector refinement, the estimation of the motion vector, especially when including template matching, may also be used with interpolation filtering to obtain fractional positions of the search space. The use of interpolation filtering may require an increase in the number of samples that need to be accessed in memory. However, this may lead to either an increase in expensive on-chip memory or an increase in the number of external memory accesses, which on the other hand slows down the implementation. Especially on the decoder side, these issues may lead to undesirably more expensive or slower applications.
[0044] To prevent such a situation, the present disclosure places a limit on external memory access. According to an embodiment of the present invention, a window of samples that should be accessible for the refinement of a motion vector is defined around the position pointed to by the unrefined motion vector, i.e., by the initial motion vector. The window defines the maximum number of samples that need to be accessed in memory to perform the refinement of the motion vector. In general, the samples that should be accessible include samples at the position of the search space where the template matching should be performed and samples that should be matched with the template for all positions in the search space. The latter generally exceeds the search space. For simplicity reasons, the window of memory access may be defined as an extension around the coding block (the current block for which the motion vector is to be found). For example, R samples from the left and right boundaries and R samples from the top and bottom boundaries of the current block may define the window. In other words, when the current block has a size of N×N samples, the access window may have a size of (R+N+R)×(R+N+R), i.e., (N+2R)×(N+2R) samples. For example, R may be equal to 4. However, the current block may have a different vertical size N than its horizontal size N, and the number of extension samples above, below, left and right may also be different.
[0045] According to the present disclosure, in order to limit the memory access window, fractional pixel coordinates are accessed by motion vector refinement only if the samples required for interpolation are within the window of memory access for motion vector refinement defined for integer samples.
[0046] FIG. 1 shows an encoder 100 including an input for receiving input image samples of a frame or picture of a video stream and an output for generating an encoded video bitstream. The term "frame" in this disclosure is used as a synonym for picture. However, it is noted that the disclosure is also applicable to fields when interlacing is applied. Generally, a picture includes m by n pixels, which correspond to image samples and may include one or more color components. For simplicity, the following description refers to pixels meaning samples of luminance. However, it is noted that the motion vector search of the present invention may be applied to any color component, including chrominance or components of the search space such as RGB. On the other hand, it may be beneficial to only perform motion vector estimation for one component and apply the determined motion vector to further (or all) components.
[0047] The input blocks to be coded are not necessarily of the same size: a picture may contain blocks of different sizes, and the block rasters of different pictures may also be different.
[0048] In the illustrative implementation, the encoder 100 is configured to apply prediction, transformation, quantization, and entropy coding to a video stream, which are performed by a transform unit 106, a quantization unit 108, and an entropy coding unit 170, respectively, to generate an encoded video bitstream as output.
[0049] A video stream may include multiple frames, and each frame is divided into blocks of a certain size that are either intra-coded or inter-coded. For example, a block of a first frame of the video stream is intra-coded by the intra prediction unit 154. An intra frame is coded using only information within the same frame, and thus, it can be decoded independently and can provide an entry point in the bitstream for random access. Blocks of other frames of the video stream may be inter-coded by the inter prediction unit 144, that is, information from an already coded frame (reference frame) is used to reduce temporal redundancy, and thus, each block of the inter-coded frame is predicted from a block in the reference frame. The mode selection unit 160 is configured to select whether a block of a frame should be processed by the intra prediction unit 154 or the inter prediction unit 144. This mode selection unit 160 also controls parameters of intra or inter prediction. In order to enable refreshing of image information, an intra-coded block may be provided within an inter-coded frame. Additionally, intra frames, which contain only intra-coded blocks, may be inserted periodically into a video sequence to provide an entry point for decoding, i.e., a point at which the decoder can begin decoding without having information from already coded frames.
[0050] The intra estimation unit 152 and the intra prediction unit 154 are units that perform intra prediction. In particular, the intra estimation unit 152 may derive a prediction mode based on knowledge of the original image as well, while the intra prediction unit 154 provides a corresponding predictor for differential coding, i.e., a predicted sample using the selected prediction mode. To perform spatial or temporal prediction, the coded block may be further processed by the inverse quantization unit 110 and the inverse transform unit 112. After the reconstruction of the block, the loop filtering unit 120 is applied to further improve the quality of the decoded image. The filtered block then forms a reference frame, which is then stored in the decoded picture buffer 130. Such a decoding loop (decoder) on the encoder side provides the advantage of generating a reference frame that is the same as the reference picture reconstructed on the decoder side. Therefore, the encoder side and the decoder side operate in a corresponding manner. The term "reconstruction" in this specification refers to obtaining a reconstructed block by adding a prediction block to a decoded residual block.
[0051] The inter estimation unit 142 receives as input a block of a current frame or picture to be inter coded and one or more reference frames from the decoded picture buffer 130. Motion estimation is performed by the inter estimation unit 142, while motion compensation is applied by the inter prediction unit 144. Motion estimation is used, for example, to obtain a motion vector and a reference frame based on a certain cost function using also the original image to be coded. For example, the motion estimation unit 142 may provide an initial motion vector estimate. The initial motion vector may then be signaled in the bitstream directly in the form of a vector or as an index pointing to a candidate of the motion vector in a list of candidates that are constructed based on a predetermined rule in the same way in the encoder and the decoder. Then, the motion compensation derives a predictor of the current block as a transformation of a block co-located with the current block in the reference frame to a reference block in the reference frame, i.e., by the motion vector. The inter prediction unit 144 outputs a prediction block for the current block, which minimizes the cost function. For example, the cost function may be the difference between the current block to be coded and the predicted block of the current block, i.e., the cost function minimizes the residual block. The minimization of the residual block is based, for example, on calculating the sum of absolute differences (SAD) between all pixels (samples) of the current block and the candidate block in the candidate reference picture. However, in general, any other similarity metric, such as the mean square error (MSE) or the structural similarity metric (SSIM), may be used.
[0052] However, the cost function may also be the number of bits required to code such an inter block and / or the distortion resulting from such coding. Thus, a rate-distortion optimization procedure may be used to determine coding parameters such as the selection of motion vectors and / or whether and in what settings inter or intra prediction should be used for a block in general.
[0053] The intra estimation unit 152 and the intra prediction unit 154 receive as input a block of the current frame or picture to be intra-coded and one or more reference samples from an already reconstructed area of the current frame. Intra prediction then describes the pixels of the current block of the current frame by a function of the reference samples of the current frame. The intra prediction unit 154 outputs a prediction block for the current block, which advantageously minimizes the difference between the current block to be coded and the prediction block of the current block, i.e., the prediction block minimizes the residual block. The minimization of the residual block can be based, for example, on a rate-distortion optimization procedure. In particular, the prediction block is obtained as a directional interpolation of the reference samples. The direction may be determined by rate-distortion optimization and / or by calculating similar measures mentioned above in connection with inter prediction.
[0054] The inter estimation unit 142 receives as input a block or more general form of image sample of the current frame or picture to be inter coded and two or more already decoded pictures 231. Then, inter prediction describes the current image sample of the current frame by a motion vector to a reference image sample of a reference picture. The inter prediction unit 142 outputs one or more motion vectors for the current image sample, and said reference image sample pointed to by the motion vector advantageously minimizes the difference between the current image sample to be coded and the reference image sample of the image sample, i.e., said reference image sample minimizes the residual image sample. Then, a predictor for the current block is provided by the inter prediction unit 144 for differential coding.
[0055] Then, the difference between the current block and the prediction of the current block, i.e., the residual block 105, is transformed by the transform unit 106. The transform coefficients 107 are quantized by the quantization unit 108 and entropy coded by the entropy coding unit 170. The coded picture data 171 thus generated, i.e., the coded video bitstream, includes intra-coded and inter-coded blocks and corresponding signaling (such as mode indication, motion vector indication, and / or intra prediction direction). The transform unit 106 may apply a linear transformation, such as a Fourier or discrete cosine transform (DFT / FFT or DCT). Such a transformation into the spatial frequency domain brings the advantage that the resulting coefficients 107 generally have higher values at lower frequencies. Thus, after an effective coefficient scanning (such as zigzag) and quantization, the resulting sequence of values generally has some larger values at the beginning and end of the run of zeros. This allows for more efficient coding. The quantization unit 108 performs the actual lossy compression by reducing the resolution of the coefficient values. The entropy coding unit 170 then assigns binary codewords to the coefficient values to generate a bitstream. The entropy coding unit 170 also encodes signaling information (not shown in FIG. 1).
[0056] 2 shows a video decoder 200. The video decoder 200 includes, among other things, a decoded picture buffer 230, an inter prediction unit 244, and an intra prediction unit 254, which is a block prediction unit. The decoded picture buffer 230 is configured to store at least one (for unidirectional prediction) or at least two (for bidirectional prediction) reference frames reconstructed from an encoded video bitstream, said reference frames being different from a current frame (currently being decoded frame) of the encoded video bitstream. The intra prediction unit 254 is configured to generate a prediction block, which is an estimate of a block to be decoded. The intra prediction unit 254 is configured to generate this prediction based on reference samples obtained from the reconstructed block 215 or the buffer 216.
[0057] The decoder 200 is configured to decode the encoded video bitstream generated by the video encoder 100, and both the decoder 200 and the encoder 100 preferably generate identical predictions for each encoded / decoded block. The features of the decoded picture buffer 230, the reconstructed blocks 215, the buffer 216, and the intra prediction unit 254 are similar to the features of the decoded picture buffer 130, the reconstructed blocks 115, the buffer 116, and the intra prediction unit 154 of FIG.
[0058] The video decoder 200 includes further units that are also present in the video encoder 100, such as, for example, an inverse quantization unit 210, an inverse transform unit 212, and a loop filtering unit 220, which correspond respectively to the inverse quantization unit 110, the inverse transform unit 112, and the loop filtering unit 120 of the video encoder 100.
[0059] The entropy decoding unit 204 is configured to decode the received coded video bitstream and correspondingly obtain quantized residual transform coefficients 209 and signaling information. The quantized residual transform coefficients 209 are provided to an inverse quantization unit 210 and an inverse transform unit 212 to generate a residual block. The residual block is added to a prediction block 265, and the addition is provided to a loop filtering unit 220 to obtain a decoded video. A frame of the decoded video may be stored in a decoded picture buffer 230 and serve as a decoded picture 231 for inter prediction.
[0060] Generally, the intra prediction units 154 and 254 in Figures 1 and 2 can use reference samples from already coded regions to generate a prediction signal for a block that needs to be coded or decoded.
[0061] The entropy decoding unit 204 receives as its input the coded bitstream 171. In general, the bitstream is first parsed, i.e. signaling parameters and residuals are extracted from the bitstream. Usually, the syntax and semantics of the bitstream are defined by a standard so that the encoder and the decoder may work in an interoperable manner. As explained in the background section above, the coded bitstream does not only contain the prediction residuals. In case of motion compensated prediction, an indication of the motion vector is also coded into the bitstream and parsed from the bitstream in the decoder. The indication of the motion vector may be given by the reference picture to which the motion vector is provided and by the coordinates of the motion vector. Up to this point, coding the complete motion vector has been considered. But still, only the difference between the current motion vector and the previous motion vector in the bitstream may be coded. This approach makes it possible to exploit the redundancy between the motion vectors of neighboring blocks.
[0062] To efficiently code reference pictures, the H.265 codec (ITU-T, H265, Series H: Audiovisual and multimedia systems: High Efficient Video Coding) provides a list of reference pictures that assigns each reference frame to a list index. The reference frames are then signaled in the bitstream by including the corresponding assigned list index in the bitstream. Such lists may be defined in the standard or signaled at the beginning of a video or a collection of several frames. It is noted that in H.265, there are two lists of defined reference pictures, called L0 and L1. A reference picture is then signaled in the bitstream by indicating the list (L0 or L1) and the index in that list that is associated with the desired reference picture. Providing more than one list may have the advantage of better compression. For example, L0 may be used for both unidirectionally inter-predicted slices and bidirectionally inter-predicted slices, while L1 may be used only for bidirectionally inter-predicted slices. In general, however, the present disclosure is not limited to any content of the L0 and L1 lists.
[0063] The lists L0 and L1 may be defined and fixed in the standard. However, by signaling the lists at the beginning of the video sequence, more flexibility in encoding / decoding may be achieved. Thus, the encoder may configure the lists L0 and L1 such that the specific reference pictures are ordered according to their indexes. The lists of L0 and L1 may have the same fixed size. In general, there may be more than two lists. The motion vectors may be directly signaled by their coordinates in the reference pictures. Alternatively, as also specified in H.265, a list of candidate motion vectors may be built and an index associated with a specific motion vector in the list may be transmitted.
[0064] Usually, the motion vector of a current block is correlated with the motion vectors of neighboring blocks in the current picture or in a previously coded picture. This is because the neighboring blocks are more likely to correspond to the same moving object with similar motion, and the object motion is less likely to change abruptly with time. Therefore, using the motion vectors in neighboring blocks as predictors reduces the size of the signaled motion vector difference. Usually, a motion vector predictor (MVP) is derived from already coded / decoded motion vectors from spatially neighboring blocks in a reference picture or from temporally neighboring or co-located blocks. In H.264 / AVC, this is done by taking the component-wise median of three spatially neighboring motion vectors. Using this approach, no predictor signaling is required. The temporal MVP from co-located blocks in a reference picture is only considered in the so-called temporal direct mode of H.264 / AVC. The direct mode of H.264 / AVC is also used to derive motion data other than motion vectors. Therefore, those modes are more related to the HEVC concept of block merging. In HEVC, the technique of implicitly deriving an MVP has been replaced by a technique known as motion vector competition, which explicitly signals which MVP from a list of MVPs is used to derive a motion vector. The variable coding quadtree block structure of HEVC can result in one block having several neighboring blocks with motion vectors as potential MVP candidates. Taking the left neighboring block as an example, in the worst case, a 64x64 luma prediction block can have 16 4x4 luma prediction blocks to the left when a 64x64 luma coding tree block is not further divided and the left block is divided to the maximum depth.
[0065] Advanced Motion Vector Prediction (AMVP) was introduced to modify the motion vector conflicts to account for such flexible block structures. During the development of HEVC, the initial AMVP design was significantly simplified to provide a good compromise between coding efficiency and an easy-to-implement design. The initial design of AMVP included five MVPs from three different classes of predictors, namely, three motion vectors from spatially adjacent blocks, the median of the three spatial predictors, and a scaled motion vector from a co-located temporally adjacent block. Furthermore, the list of predictors was modified by reordering it to put the most promising motion predictor in the first position, and by removing redundant candidates to ensure minimal signaling overhead. The final design of the AMVP candidate list construction includes two MVP candidates: a) up to two spatial candidate MVPs derived from five spatially adjacent blocks, b) one temporal candidate MVP derived from two temporally co-located blocks when both spatial candidate MVPs are unavailable or identical, and c) a zero motion vector when spatial candidates, temporal candidates, or both candidates are unavailable. Details regarding the determination of motion vectors can be found in the book High Efficiency Video Coding (HEVC): Algorithms and Architectures, Springer, 2014, by V. Sze et al. (eds.), which is incorporated herein by reference, especially in Chapter 5.
[0066] To further improve the estimation of the motion vectors without further increase in signaling overhead, it may be beneficial to further refine the motion vectors derived at the encoder side and provided in the bitstream. The refinement of the motion vectors may be performed in the decoder without assistance from the encoder. The encoder may use the same refinement to obtain the corresponding motion vectors in its decoder loop. The refinement of the motion vectors is performed in a search space that includes integer and fractional pixel positions of the reference picture. For example, the fractional pixel positions may be half pixel positions or quarter pixel or further fractional positions. The fractional pixel positions may be obtained from the integer (full pixel) positions by interpolation, such as bilinear interpolation.
[0067] In bidirectional prediction of the current block, two prediction blocks obtained using the respective first motion vectors of list L0 and the second motion vector of list L1 are combined into a single prediction signal, which can provide better adaptation to the original signal than unidirectional prediction, resulting in less residual information and possibly more efficient compression.
[0068] At the decoder, since the current block is not available because it is being decoded, for the purpose of refining the motion vector, a template is used which is an estimate of the current block and is constructed based on parts of the image that have already been processed (i.e. coded at the encoder side and decoded at the decoder side).
[0069] First, a first motion vector estimate MV0 and a second motion vector estimate MV1 are received as input in the decoder 200. In the encoder side 100, the motion vector estimates MV0 and MV1 may be obtained by block matching and / or by searching a list of candidates (such as a merge list) formed by the motion vectors of blocks adjacent to the current block (in the same picture or in an adjacent picture). Then, MV0 and MV1 are advantageously signaled to the decoder side in the bitstream. However, it is generally noted that the first decision stage of the encoder can also be performed by template matching, which brings the advantage of reducing the signaling overhead.
[0070] At the decoder side 200, the motion vectors MV0 and MV1 are advantageously obtained based on information in the bitstream. Either MV0 and MV1 are directly signaled or differentially signaled, and / or an index of a list of motion vectors (merge list) is signaled. However, the present disclosure is not limited to signaling the motion vectors in the bitstream. Rather, the motion vectors may be determined by template matching already in the first stage corresponding to the operation of the encoder. The template matching of the first stage (derivation of the motion vectors) may be performed based on a search space different from the search space of the second refinement stage. In particular, the refinement may be performed in a search space with a higher resolution (i.e., a shorter distance between search positions).
[0071] An indication of two reference pictures RefPic0 and RefPic1, which are pointed to by MV0 and MV1, respectively, is also provided to the decoder. The reference pictures are stored in the decoded picture buffers at the encoder and decoder sides as a result of previous processing, i.e., encoding and decoding, respectively. One of these reference pictures is selected for the refinement of the motion vector by searching. The reference picture selection unit of the device for determining the motion vector is configured to select the first reference picture pointed to by MV0 and the second reference picture pointed to by MV1. Following the selection, the reference picture selection unit determines whether the first reference picture or the second reference picture is used for performing the refinement of the motion vector. To perform the refinement of the motion vector, a search area in the first reference picture is defined around the candidate position pointed to by the motion vector MV0. The candidate search space positions in the search area are analyzed to find the block most similar to the template block by performing template matching in the search space and determining a similarity metric, such as the sum of absolute difference (SAD). The location in the search space represents the location where the top left corner of the template is to be matched. As mentioned above, the top left corner is merely a convention and generally any point in the search space, such as the central point, may be used to represent the matching location.
[0072] According to the above mentioned document JVET-D0029, the decoder-side motion vector refinement (DMVR) has as input initial motion vectors MV0 and MV1 pointing to two respective reference pictures RefPict0 and RefPict1. These initial motion vectors are used to determine respective search spaces in RefPict0 and RefPict1. Furthermore, using the motion vectors MV0 and MV1, a template is constructed based on the respective blocks A and B (of samples) pointed to by MV0 and MV1 as follows: Template = function ((Block A, Block B))
[0073] The function may be a sample cropping operation combined with a weighted sum per sample. The template is then used to perform template matching in a search space determined based on MV0 and MV1 in the respective reference pictures 0 and 1. The cost function for determining the best template match in each search space is SAD(Template, Block candA'), where block candA' is the candidate coding block pointed to by the candidate MV in the search space spanning the position given by MV0. Figure 3 shows the determination of the best matching block A' and the resulting refined motion vector MV0'. Correspondingly, as shown in Figure 3, the same template is used to find the best matching block B' and the corresponding motion vector MV1' pointing to block B'. In other words, after the template is constructed based on blocks A and B pointed to by the initial motion vectors MV0 and MV1, the refined motion vectors MV0' and MV1' are found by searching on RefPic0 and RefPic1 using the template.
[0074] The motion vector derivation technique may also be called frame rate up-conversion (FRUC). In general, the initial motion vectors MV0 and MV1 may be indicated in the bitstream to ensure that the encoder and the decoder may use the same initial point for the refinement of the motion vector. Alternatively, the initial motion vector may be obtained by providing a list of initial candidates including one or more initial candidates. For each of those initial candidates, a refined motion vector is determined, and finally, the refined motion vector that minimizes the cost function is selected.
[0075] It is further noted that the present invention is not limited to the template matching described above with reference to Fig. 3. Fig. 4 shows an alternative template matching that is also applicable to unidirectional prediction. Details can be found in document JVET-A1001, in particular in section "2.4.6. Pattern matched motion vector derivation" of document JVET-A1001 entitled "Algorithm Description of Joint Exploration Test Model 1" by Jianle Chen et al., accessible at http: / / phenix.it-sudparis.eu / jvet / . The template of this template matching approach is determined as the samples adjacent to the current block in the current frame. As shown in Fig. 1, already reconstructed samples adjacent to the top and left boundaries of the current block may be obtained, and are called "L-shaped template".
[0076] FIG. 5 shows another type of motion vector derivation that may also be used. The input to the motion vector derivation process is a flag indicating whether motion vector derivation is applied or not. Implicitly, another input to the derivation process is the motion vector of an already coded / reconstructed block adjacent (temporally or spatially). The motion vectors of several adjacent blocks are used as candidates for the initial search step of the derivation of the motion vector. The output of the process is MV0′ (possibly also MV1′ if bi-prediction is used) and the corresponding reference picture indexes refPict0 and possibly refPict1, respectively. Then, the motion vector refinement stage includes template matching, as described above. After finding one (unidirectional prediction) or several (bi-prediction / multi-frame prediction) refined motion vectors, a predictor of the current block is constructed (by weighted sample prediction for bi- / multi-prediction, otherwise by referring to the samples pointed to by the refined MV).
[0077] The present invention is not limited to the above two template matching methods. As an example, a third template matching method called bilateral matching (also described in document JVET-A1001) can also be used for the refinement of the motion vector, and the present invention applies as well. According to bilateral matching, the best match between two blocks along the motion trajectory of the current block in two different reference pictures is searched. Under the assumption of continuous motion trajectories, the motion vectors MV0 and MV1 pointing to the two reference blocks are proportional to the temporal distance between the current picture and the two reference pictures, i.e., TD0 and TD1. In bilateral matching, a cost function such as SAD(Block cand0', Block cand1') may be used, where block cand0' is pointed to by MV0 and block cand1' is pointed to by MV1.
[0078] According to an embodiment of the present invention, an apparatus for determining a motion vector for a predictive block is provided, the apparatus including a processing circuit configured to obtain an initial motion vector and a template for the predictive block, and to determine a refinement of the initial motion vector by template matching with the template in a search space, the search space being at a position given by the initial motion vector and including one or more fractional sample positions, each of the fractional sample positions belonging to the search space being obtained by interpolation filtering using a filter of a predefined tap size that evaluates only integer samples within a window, the window being formed by the integer samples accessible for template matching in the search space.
[0079] A processing circuit 600 is shown in FIG. 6. The processing circuit may include any hardware, and the configuration may be implemented by any kind of programming or hardware design of a combination of both. For example, the processing circuit may be formed by a single processor, such as a general-purpose processor with corresponding software that implements the above-mentioned steps. On the other hand, the processing circuit may be implemented by specialized hardware, such as an ASIC (Application Specific Integrated Circuit), or an FPGA (Field Programmable Gate Array) of a DSP (Digital Signal Processor).
[0080] The processing circuit may include one or more of the above-mentioned hardware components interconnected to perform the above-mentioned derivation of motion vectors. The processing circuit 600 includes computation logic to implement two functions, namely obtaining an initial motion vector (or multiple initial motion vectors if bidirectional / multi-prediction is used) and a template 610, and refining the motion vector 620. These two functions may be implemented on the same hardware or may be performed by separate units of hardware, such as the initial motion vector and template determination unit 610 and the motion vector refinement unit 620. The processing circuit 600 may be communicatively connected to an external memory 650 in which reconstructed reference picture samples are stored. Furthermore, the processing circuit 600 may further include an internal memory 640 for buffering samples in a window transferred from the external memory and used for the determination of the motion vector for the block being processed at the same time. The processing circuit may be embodied on a single chip as an integrated circuit.
[0081] It is noted that the processing circuit may implement further functions of the encoder and / or decoder described with reference to Fig. 1 and Fig. 2. The internal memory may be an on-chip memory such as a cache or a line memory. The chip memory is advantageously implemented on the chip of the encoder / decoder to speed up the calculations. Since the size of the chip is limited, the on-chip memory is usually small. On the other hand, the external memory can be very large in size, but access to the external memory consumes more energy and the access is much slower. Usually, all the necessary information is retrieved from the external memory to the on-chip memory before the calculations are performed. The worst case external memory access (or the bandwidth that needs to be provisioned when designing the memory bus) represents the highest possible amount of memory transfer between the external memory and the chip during decoding of a frame or coding unit. The memory (especially the external memory) can usually only be accessed in predefined block units. In other words, generally, single pixels cannot be accessed, but instead the smallest unit (e.g., 8x8) must be accessed. The size of the on-chip memory is also an important design consideration, as large on-chip memories increase cost.
[0082] In other words, the above-mentioned apparatus may be an integrated circuit further including an internal memory embedded in the integrated circuit and a memory access unit (interface) for fetching integer samples within the window from an external memory to the internal memory.
[0083] The term "prediction block" used above refers to a current block to be predicted. A prediction block is a block in an image that may be obtained by subdividing the image into equal or different sized blocks (e.g., by hierarchically partitioning a coding tree unit CTU into smaller units). The block may be a square or more broadly rectangular shape, since these shapes are typical shapes also used in current encoders / decoders. However, the present disclosure is not limited by any size / shape of the block.
[0084] The device including the processing circuit may be an encoder, or a decoder, or even a device including such an encoder or decoder, for example a recording device and / or a playback device.
[0085] Fractional sample positions are positions between actual picture sample positions obtained by reconstructing the reference picture coded as shown in Figure 1. Therefore, fractional positions must be obtained by interpolation based on the nearest integer positions. Details of exemplary interpolation filtering used by H.265 can be found in section "5.3 Fractional Sample Interpolation" of the book High Efficiency Video Coding (HEVC) by V. Sze et al., Springer, 2014.
[0086] Typically, interpolation filtering applies different filters to generate different fractional pel (sample) positions. As an example, in the H.265 video compression standard, the following 1D separable filters are applied to generate quarter-pel and half-pel positions: [Table 1]
[0087] As can be seen from the table above, interpolation filtering requires a number of samples around the fractional pel position that correspond to the taps (number of coefficients in the table) of the filter. Using the example filter above to generate half-pel positions, four integer samples are required from the left / top and right / bottom. Note that the length of the interpolation filter is different for quarter-pel sample positions (which are 7 taps) than it is for half-pel sample positions (which are 8 taps).
[0088] In some embodiments of the present invention, an interpolation filter with a predefined tap size evaluates only integer samples within a window given by the integer samples accessible for template matching in the search space. The window may include many more samples than those actually used in the calculation of a particular prediction block. This is due to the fact that the refinement search operation is usually performed using a fast search method (as opposed to a brute force search method), according to which part of the samples is not evaluated as the search operation progresses. As a result, the number of iterations of template matching and the samples used in the calculation for the refinement search operation may vary for each prediction block.
[0089] Considering that the interpolation filtering needs to be applied to fractional sample positions, the present disclosure sets an upper limit (boundary of the region) on integer samples that may be used during the refinement search operation. This corresponds to the term "integer samples accessible for template matching". Which samples are actually accessed depends on the method of forming the search space, as exemplified below.
[0090] Figure 7 shows a coding block (prediction block) and corresponding samples of a window. It is noted that the samples shown in Figure 7 are reference picture samples, where the coding block is actually a block whose size and position correspond to the current block in the current frame for which a motion vector should be derived in the reference picture. Therefore, the coding block in Figure 7 is actually a block that is co-located with the block for which the predictor is searched. However, for simplicity reasons, this block is referred to as the "coding block" below.
[0091] In this example, the unrefined motion vector MV0 points to an integer sample position (the initial motion vector could point to a fractional sample position, and the integer sample position is chosen simply for ease of illustration). The granularity of the search for the motion vector refinement is one integer sample, i.e., since the starting point is an integer sample, only integer sample points are searched. The search is performed in this example in a gradually evolving search space. This means that the search space is improved at each iteration by adding new search positions according to the best direction in terms of a cost function with respect to the positions already tested.
[0092] Such an approach is shown in a simplified manner in FIG. 8. In FIG. 8, the initial motion vector pointed to a central point 810. The search space is gradually built up around the position of the initial motion vector. In a first step, four positions directly adjacent to the top, bottom, left, and right of the position 810 pointed to by the initial motion vector are tested, as well as the position 810 pointed to by the initial motion vector. Further positions to be tested are added to the search space based on the direction that results in the lowest cost function among the five points tested. In this example, the lowest cost function may be found at the right point, and thus the search space was extended by three further points in the horizontal right direction in a second step. In the second step, the lowest cost function may be found at the right point (relative to the lowest cost point of the first step), thus further extending the search space by three points in the horizontal right direction. In the third step, the lowest cost function is again observed at the point to the right relative to the lowest cost point of step 2, resulting in expanding the search space horizontally to the right by three more points. According to the example of Figure 8, three further steps are performed upwards, upwards, and to the right in that order. In the example, a diamond-shaped pattern (of five search points) is used for each iteration, and the search space is expanded at each step to fill in the missing search points.
[0093] At each iteration of the search space determination, the search space may grow by one or more integer sample positions. Now, let us return to FIG. 7 in an example where the maximum number of iterations of the search is four. Since a maximum of four iterations is possible, if the progressive development of the search space is towards the left, all of the samples drawn to the left need to be fetched from memory to perform the search operation. A similar extension of four samples upwards is required. Thus, the search space is expanded in both directions (left-right and up-down) since the refined MV can move in either direction, and hardware implementations require all of the samples that may be needed to be fetched from external memory before application of the refinement search. If the search space evolves downwards or to the right, an extension by four further samples is necessary since template matching with a template corresponding to the size of the coding block (prediction block) needs to access some of those samples. Furthermore, since hardware implementations generally cannot fetch irregular shapes (rectangular access is more feasible), the corner samples (e.g., top right) must also be fetched from memory.
[0094] It is noted that the above iterative search space evolution is merely exemplary, and that the rules and number of points for expanding the search space at each iteration may be different, i.e., specified in different ways.
[0095] Figure 8 also illustrates a scenario that may arise due to the rules of external memory access mentioned above: the number of samples fetched from external memory is much larger than the samples actually used in the computation steps. Assuming that the template here is only one sample large (for simplicity reasons), the white circles represent the samples fetched from external memory and the filled samples actually used. However, such redundancy is necessary if the number of accesses to external memory should be kept low, since the samples actually needed are not yet known when the current block starts to be processed.
[0096] It is noted that the search space may also be defined in different ways, for example as a stable shape at the position pointed to by the initial motion vector. The shape may be any shape, such as a square, a rectangle, a diamond, etc.
[0097] Figure 9 shows an example where the search space may also include fractional samples. In Figures 7 and 8, the search for the motion vector was performed on integer samples, resulting in the position shown by the larger solid dot included in the access window. Now, if the search is performed on samples with half-pel resolution (smaller solid dot), assuming that the interpolation filter is symmetrical and has 8 taps, three additional columns of samples must also be retrieved from memory to generate the fractional samples shown on the right. Furthermore, due to the fact that the search operation is symmetrical (it can move repeatedly left and right) so that fractional pixels may be on the left side of the window, the same must be applied to the left side (expanding by three columns of pixels).
[0098] As a result, the number of samples that need to be retrieved from memory due to the interpolation filtering is further increased, as indicated by the dashed line that now also includes dotted circles representing positions added due to fractional interpolation. Similarly, if one were to also allow half-pel positions in the vertical direction to be searched, the window of samples accessed from memory would need to be extended in the upper and lower vertical directions as well (not shown in the example of Figure 9).
[0099] The window of memory access is defined as a rectangle that includes all of the samples that need to be retrieved from memory to perform a motion vector search for a prediction block (coding block). The window of memory access does not only include the actual samples that are needed, but also includes all of the remaining samples that may be accessed during the motion vector search operation. In the example of FIG. 9, the motion vector search has moved to the right. However, it can also be moved to the left, which is not known in advance. Therefore, in order to avoid accessing the external memory multiple times, the window of memory access (or access window) includes all samples that are accessible by the respective process.
[0100] Figure 10 shows a window of memory accesses for motion vector refinement. The center point 1010 is the position pointed to by the unrefined input motion vector (the initial motion vector obtained either from the bitstream or by template matching or candidate testing already performed as described above). To avoid further increase in window size due to adding fractional positions to the search space, the motion vector refinement is performed according to the following rules: A) A window of memory access for refinement is defined around the coordinates of the initial unrefined motion vector (i.e., the location pointed to by the initial motion vector). The window specifies the maximum number of pixel samples that need to be accessed from memory to perform the refinement of the motion vector by template matching in the search space. 1. In this example, for simplicity, the size of the current block (the coding block size) is 1x1 sample, but the size of the current block can be and typically is larger. 2. The window of memory access is defined as an extension around the coding block, such as 4 samples from the left / right and 4 samples from the top / bottom as shown in the figure. B) Fractional pixel coordinates are accessed for MV refinement only if the samples required for the interpolation are within the window of memory accesses.
[0101] Requirement B ensures that the access window defined by the samples required for the refinement of the motion vector to integer samples is not further extended. The actual fractional samples accessible according to this rule are given by the size and shape of the interpolation filter. Thus, in FIG. 10, assuming a 6-tap interpolation filter, the dotted lines indicate the area where fractional samples may be. However, it is noted that further fractional pixel positions may be acceptable, as shown with reference to FIG. 12. In particular, fractional positions that require only vertical or only horizontal filtering that do not require an extension beyond the access window may still be used. Thus, restricting the fractional positions to the fractional sample window shown in FIG. 10 may be too restrictive for some applications.
[0102] In other words, according to an embodiment, the memory access window includes all samples that are accessible by the motion vector refinement performed on the integer samples, and does not include samples that are not accessible by the motion vector refinement performed on the integer samples. Thus, if fractional samples are used for the motion vector refinement, they are obtained in a manner that does not require additional samples.
[0103] In the example of FIG. 10, this is achieved by only allowing fractional samples that do not require samples outside the access window for a predefined shape and size of the interpolation filter. The dotted fractional sample window extends within the access window. If T is the number of taps of the interpolation filter, then the boundaries of the fractional sample window are defined by integer samples within a distance 1020 of floor(T / 2)-1 from the samples of the access window boundary. In particular, in this example, T=6, T / 2=3, and the distance from the samples of the access window boundary to the samples of the fractional window is T / 2-1=2 integer samples.
[0104] However, it is noted that this determination of the fractional window is merely an example. In general, the window may have different shapes and sizes. Vertical and horizontal interpolation may be performed by filters of different sizes. Furthermore, some fractional positions may require both vertical and horizontal filters, which may be generally separable or non-separable.
[0105] Alternatively, the interpolation filter may be modified (e.g., the number of taps in at least one direction is reduced) for fractional positions outside the dotted window of Figure 10. However, for implementation purposes and for reasons of interpolation quality, such a solution may be relatively unattractive.
[0106] The window for memory access may be defined in various ways. Figure 11 shows an example where the memory access window is defined as an extension EXT to the left / right or above / below of the coding block (corresponding to the position of the coding block given by the initial motion vector). The amount of extension may depend on the size and shape of the coding or prediction block. In Figure 11, the extension is 4 samples long in each direction (above, below, left, right). However, it is noted that EXT may also take different values for different directions depending on the block size (which may have different sizes vertically and horizontally) and / or the shape and size of the search space.
[0107] For example, according to the example, the window is defined as N integer sample columns and M integer sample rows for the initial motion vector of the prediction block, where at least one of N and M is a non-zero integer value (both are integers, but one of N and M can be zero). In FIG. 11, N and M are shown to have the same size. As mentioned above, N and M may have different sizes. N and M are integers, and at least one of them is non-zero. Obtaining the parameters N and M and the shape and size of the template, the size of the access window can be determined. In particular, if the template has T1 rows and T2 columns, the size of the memory access window can be calculated as (N+T2+N) rows and (M+T1+M) columns. This is because the search can go N samples to the left or right, resulting in 2N samples horizontally, and M samples up or down, resulting in 2M samples vertically.
[0108] On the other hand, for a particular approach to the construction of the search space, such as the approach described with reference to Figures 7 and 8, the memory access window may be defined by the maximum number of refinement iterations (iterations of the construction of the search space) that may later be translated into maximum amounts of left, right, up, and down displacement, and the iteration step size (in terms of maximum sample distance achievable in each iteration). The memory access window is thus defined as the maximum displacement in each direction. For example, 4 iterations, where each iteration may advance the search space by at most one integer sample position, would result in EXT=4.
[0109] In other words, according to this example, the processing circuitry is configured to determine a refinement of the initial motion vector by template matching with said template in a search space that is iteratively expanded in a direction given by one (or more) of the more best-matching positions of the search space in the most recent iteration, the window being defined by a predefined maximum number of iterations.
[0110] In general, it is noted that the present disclosure is not limited to any particular shape or form of the search space or type of determination. In another example, the search space is a rectangular subwindow of a window such that all integer samples accessed for the interpolation filtering of each fractional sample in the subwindow are within the window for an interpolation filter of a predefined tap size. A similar example has already been considered above with reference to Fig. 10. In Fig. 10, the search space is given by 9x9 integer samples and fractional samples that are within a region formed by 5x5 integer samples with the location of the initial motion vector at the center of the sample.
[0111] The definition of the memory access window may possibly be justified in order to include corresponding signaling parameters in the bitstream (e.g., parameter EXT or parameters N and M), but the size of the memory access window may be defined in the standard or derivable based on other coding parameters (such as the size of the template, the size of the prediction block, the resolution of the image, etc.).
[0112] FIG. 12 shows an example with different fractional pixel locations. For this example, it is assumed that the template size is 1x1 sample (for simplicity) and a 6-tap interpolation filter is used for each half-pel location. In the example, the search coordinates to be searched are represented by numbers 1-6, which indicate the order in which they are examined, i.e., the order in which the template matching search is performed. Locations 1 and 2 are half-pel locations (i.e., they are half-pel locations, where pel is an abbreviation for pixel, and the term pixel is used interchangeably with the term sample in this application). Locations 1 and 2 are examined because the required expansion for the interpolation filtering is within the window of memory access (3 integer samples diagonally up-left and down-right from location 1, 3 integer samples to the right and 3 integer samples to the left of location 2). Note that fractional sample point 1 requires both horizontal and vertical expansion, both of which are within the window. Location 2 requires only right and left expansion.
[0113] Locations 3, 4, and 5 are integer sample (integer pel) locations. Those locations may be searched since no expansion is required for interpolation filtering. Fractional (half-pel) sample 6 may also be accessed since it only requires vertical expansion (three integer locations up and down, respectively) and it is still within the window. No horizontal expansion is required. Again, in the above implementation, fractional sample points are accessed only if the extent of the required interpolation is within the memory access window.
[0114] In other words, by way of example, the interpolation filter is a one-dimensional filter that evaluates K integer horizontal or vertical samples where the fractional position lies on each horizontal or vertical line of integer samples.
[0115] Such one-dimensional fractional positions that lie on a line between two horizontally or two vertically adjacent integer positions (e.g., positions 2 and 6 in FIG. 12) require expansion for horizontally-only or vertically-only interpolation, i.e., should be filtered only by the respective horizontal or vertical interpolation filter. In order to be able to utilize as many fractional positions as possible, it may be advantageous to add further one-dimensional positions, such as position 6 shown in FIG. 12, in addition to the fractional positions allowed in the example of FIG. 10.
[0116] In other words, the search space is - It is adjacent to the top or bottom of the subwindow and lies on a horizontal line of integer samples, or - Is it adjacent to the left or right side of the subwindow and on a vertical line of integer samples? 10. It further includes fractional positions that are outside the fractional sub-window (see dotted window in FIG. 10) of any of the fractional positions.
[0117] It is noted that some fractional samples may require an additional integer sample in a given horizontal or vertical direction, which may be the case if the predefined filter size is different to generate that position in each direction.
[0118] FIG. 13 shows an example of fractional half-pel locations 1 and 2 that cannot be accessed. Those locations are outside the sub-window shown in FIG. 10. For this example, it is assumed that a 6-tap interpolation filter is used for the half-pel locations. Half-pel search points 1 and 2 are not allowed to be searched because the horizontal or vertical interpolation filtering requires samples that are outside the window. The integer sample locations required by the horizontal filter to filter location 1 and by the vertical filter to filter location 2 are shown by dashed lines in FIG. 13. As can be seen, the dashed circles correspond to integer locations that are not within the memory access window.
[0119] In the above example, the memory access window was defined such that no samples outside the window are accessed during the motion vector refinement process (even for interpolation filtering). In other words, the memory access window is the smallest window that encompasses samples that may need to be accessed for motion vector refinement and interpolation. Furthermore, the memory access window was designed according to samples required for motion vector refinement based on integer sample positions. Then, only fractional positions that do not require further extension of such access window by further integer positions are allowed.
[0120] It is noted that the above examples have been given with respect to half-pel interpolation. However, the present disclosure is not limited thereto. In general, any fractional position such as 1 / 4, 1 / 8, etc. may be used, i.e., interpolated using a corresponding interpolation filter.
[0121] The processing circuitry described in relation to FIG. 6 may be used in the encoder and / or decoder as shown in FIGS.
[0122] In particular, an encoding device may be provided for encoding a video image divided into predictive blocks into a bitstream, the encoding device including a device for determining a motion vector for the above-mentioned predictive block, including a processing circuit, and an encoding circuit for encoding a difference between the predictive block and a predictor provided by the predictive block at a position specified by the determined motion vector, and for generating a bitstream including the encoded difference and an initial motion vector.
[0123] Further units and functions of the encoder described above with reference to FIG. 1 may also be provided or implemented in the processing circuitry.
[0124] Correspondingly, a decoding device for decoding a video image divided into prediction blocks from a bitstream may be provided, the decoding device including: an analysis unit for analyzing from the bitstream an initial motion vector and an encoded difference between the prediction block and a predictor provided by the prediction block at a position specified by the refined motion vector; an apparatus for determining a refined motion vector for the prediction block mentioned above, including a processing circuit; and a decoding circuit for reconstructing the prediction block as a sum of the analyzed difference and the predictor provided by the prediction block at a position based on the refined motion vector. For example, the predictor may be directly provided by the position of the refined motion vector. However, there may be a further processing step of obtaining a motion vector of a current prediction block, which may further modify the motion vector (such as filtering, cropping, further refinement, etc.).
[0125] Further units and functions of the decoder described above with reference to FIG. 2 may also be provided or implemented in the processing circuitry.
[0126] Furthermore, although embodiments of the present invention have been described in terms of apparatus having processing circuitry for performing motion vector refinement, the present disclosure is not so limited and also provides corresponding methods including processing steps corresponding to those that the above-described processing circuitry is configured to perform.
[0127] In particular, a method is provided for determining a motion vector for a predictive block, comprising the steps of obtaining an initial motion vector and a template for the predictive block, and determining a refinement of the initial motion vector by template matching with the template in a search space, the search space being at a position given by the initial motion vector and including one or more fractional sample positions, each of the fractional sample positions belonging to the search space being obtained by interpolation filtering using a filter with a predefined tap size that evaluates only integer samples within a window, the window being formed by the integer samples accessible for template matching in the search space.
[0128] The taps correspond to the filter coefficients. The tap size corresponds to the filter order. Here, the filter is assumed to be a linear filter. In some examples, the filter may be symmetric, i.e., have symmetric coefficients. However, this disclosure is not limited to symmetric filters, or linear filters, or filters of any kind. In general, the fractional position may be obtained in any manner based on neighboring samples.
[0129] Further, an encoding method is provided for encoding a video image divided into predictive blocks into a bitstream, the encoding method comprising the steps of determining a motion vector for the predictive block according to any of the above-mentioned methods, encoding a difference between the predictive block and a predictor provided by the predictive block at a position based on the determined motion vector, and generating a bitstream comprising the encoded difference and an initial motion vector.
[0130] The encoding method may further include the steps described with reference to the functions of the blocks in FIG.
[0131] Further, a decoding method is provided for decoding a video image divided into predictive blocks from a bitstream, the decoding method comprising the steps of: analyzing from the bitstream an initial motion vector and an encoded difference between the predictive block and a predictor provided by the predictive block at a position specified by the refined motion vector; determining a refined motion vector for the predictive block according to any of the above-mentioned methods; and reconstructing the predictive block as a sum of the analyzed difference and the predictor provided by the predictive block at a position specified by the refined motion vector.
[0132] The decoding method may further include the steps described with reference to the functions of the blocks in FIG.
[0133] However, it is noted that Figures 1 and 2 should not limit the present disclosure, they merely provide non-limiting examples of implementations of the present invention within existing encoders and / or decoders.
[0134] 14 shows an example implementation of the method according to the embodiment. The function InterpolationFilterLength(C) returns the number of additional samples required in the horizontal and vertical directions to apply the interpolation filtering. The number of samples required is given by - Whether the search coordinates are integer pel, half pel, or quarter pel positions - Whether a horizontal interpolation filter, a vertical interpolation filter, or both may be applied to generate the search coordinate samples It depends on the.
[0135] The method begins in step 1430. In particular, the location of the initial motion vector is the first search space location C(x,y) to be tested. The function InterpolationFilterLength(C) returns the number of horizontal and vertical samples to apply the interpolation filtering for this location. If the sum of C(x,y) and InterpolationFilterLength(C(x,y)) exceeds the access window size defined by MAX(max_x, max_y), then the location is not used as part of the search space. Instead, the next search coordinate C(x,y) is selected in step 1440 to be tested (e.g., x or y or both are incremented depending on the order in which the search is performed). If the location tested in step 1430 does not require exceeding the access window, template matching as part of the refinement of the motion vector is performed in step 1410 for that location C(x,y). Then, it is tested in step 1420 whether there are any more search space locations left for template matching. If not, refinement is terminated. If so, the next coordinate is selected in step 1440 and the condition of step 1430 is evaluated for that new position. These steps are repeated.
[0136] As already explained above, there are alternative possibilities for defining allowed fractional positions (such as the window of FIG. 10 possibly extended by further fractional samples as shown in FIG. 12). Based on them, a simpler condition may be formulated in step 1430 that only evaluates whether the position C(x,y) belongs to the allowed window. For example, the search is restricted to integer search points and fractional points within a fractional search window encapsulated in a memory access window such as the memory access window shown in FIG. 10.
[0137] The search space may include a rectangular search sub-window of the window, and refinement of the initial motion vector may be determined by template matching with said template in the rectangular search sub-window such that the integer samples accessed for interpolation filtering of each fractional sample in the search sub-window are within said window for an interpolation filter of a predefined tap size.
[0138] More precisely, the allowed integer and fractional positions may be determined based on the distance of the search point from a point associated with the unrefined initial motion vector. In particular, search points at a distance P in the x direction from the unrefined initial motion vector and at a distance R in the y direction from the unrefined initial motion vector are allowed. In particular, a memory access window is defined relative to a point in the reference picture pointed to by the unrefined initial motion vector. This is illustrated in FIG. 15, where the center point of the memory access window is a half-pel point between two integer points along the horizontal axis. In the figure, the memory access window is defined as an extension in the x direction (N) and an extension in the y direction (M), where N and M are integers, at least one of which is non-zero. According to a particular implementation, a subwindow, i.e., a subwindow (or search window) for a search point, is defined within the memory access window and defined as an extension in the x direction (P) and an extension in the y direction (R) that includes all integer-pel and fractional-pel search points that are allowed to be searched by template matching. In FIG. 15, the numbers P and R are equal to 1 for illustrative purposes. Thus, if the distance of a search point to the center point exceeds P or R in the x and y directions, respectively, the search point is not included in the memory access window. In this particular example, the memory access window defined by N and M encapsulates or includes a secondary window, since fractional search points require access to additional samples. P and R may be real numbers indicating distance in units of the distance between two integer sample points in the horizontal and vertical directions. As an example, if P and R are defined as P=1.5 and R=1.5, then a search point (integer or fractional) that is at a distance of 1.5 in the x direction to the initial center point is allowed to be searched by the motion vector refinement process. Furthermore, in FIG. 15, the left-right extension and the up-down extension are defined to be equal, and the extensions may generally not be equal. Generally, all four extensions to the left, top, right, and bottom may be defined independently.
[0139] FIG. 16 shows a possible implementation of an iterative refinement process in a memory access window. According to FIG. 16, a refinement search is applied iteratively, i.e., only a maximum of K search points are searched in each iteration. First, K search points are determined around the initial starting point or around the best search point selected as a result of the previous iteration (1610). Second, if all of the K search points are within the memory access window (1620), a refinement search operation is applied to the K search points. However, if any one of the K points is outside the memory access window, then the search iteration is terminated. Third, a condition for a maximum number of search iterations is checked (1630), and if the current iteration exceeds the maximum number of allowed search iterations, the iteration is terminated. Finally, a refinement search is applied to the K search points (1640), and the best point among the K search points is selected according to a matching cost function (1650). The application of 1640 and 1650 increments the number of iterations by one. After 1650, the process is repeated using the best point, which is the output of 1650, as the input to 1610. According to FIG. 16, the number K, which determines the number of search points searched during one iteration, defines the maximum number of search points for each iteration. The number K and the pattern of points searched for each iteration may differ depending on the search strategy used. For example, according to an exemplary search strategy, K=5 search points (center, left, right, bottom, and top) may be searched in the first iteration, while K=3 points (center, bottom right, bottom left) may be searched in the second iteration. The number K is a number smaller than the total number of search points in the memory access window.
[0140] According to the specific implementation shown by Fig. 16, if a single search point among the K search points of an iteration is outside the memory access window, the iteration of the search is terminated. There may be other points among the K search points that are within the memory access window, but those points within the memory access window are also not searched because the iteration is terminated. The objective of the specific implementation is to reduce the number of iterations of the search and at the same time ensure that search points that fall outside the memory access window are not searched.
[0141] Checking whether the search point is within the memory access window may be performed by checking the distance of the search point to the initial starting point, per 1620. Thus, the search point is determined to be outside the memory access window if the x component of the distance is greater than N or if the y component of the distance is greater than M. Generally, N and M are integers, at least one of which is greater than 0.
[0142] A refinement of the initial motion vector may be determined by template matching with said template in a search space that is iteratively extended in a direction given by one of the more best matching positions of the search space in the most recent iteration, the iteration being terminated when at least one sample in the search space of the most recent iteration is outside the search subwindow.
[0143] Figure 17 is a flow chart showing a possible iterative scheme that can be applied to the search sub-window as shown in Figure 15. The flow chart of Figure 17 is the same as the flow chart shown in Figure 16, except for step 1720. According to step 1720 of Figure 17, the decision to perform a refinement search for the K search points is determined by checking whether all of the K points are within the sub-window for the search points. In other words, as shown in Figure 15, if the distance of any one of the K search points to the center point pointed to by the unrefined initial motion vector is greater than P or R, then the condition shown in 1720 evaluates to false and the iteration is terminated.
[0144] The determination of motion vectors with memory window limitations as described above may be implemented as part of the encoding and / or decoding of a video signal (moving image). However, the determination of motion vectors is not limited to being used for encoding / decoding, but may also be used for other purposes in image processing, such as motion estimation, motion analysis, etc.
[0145] The motion vector determination may be implemented as an apparatus. Such an apparatus may be a combination of software and hardware. For example, the motion vector determination may be performed by a general-purpose processor, or a digital signal processor (DSP), or a chip such as a field programmable gate array (FPGA). However, the invention is not limited to implementation on programmable hardware. The invention may be implemented in an application specific integrated circuit (ASIC) or by a combination of the above-mentioned hardware components.
[0146] The determination of the motion vector may also be implemented by program instructions stored in a computer-readable medium. The program, when executed, causes the computer to perform the steps of the above-mentioned method. The computer-readable medium may be any medium on which a program is stored, such as a DVD, a CD, a USB (flash) drive, a hard disk, a server storage available via a network, etc.
[0147] The encoder and / or decoder may be implemented in various devices, i.e., any recording, encoding, transcoding, decoding or playback device, including a television set, a set-top box, a PC, a tablet, a smartphone, etc. The encoder and / or decoder may be software or an app that implements the steps of the method and executes on a processor stored in / contained in an electronic device, such as the electronic devices mentioned above.
[0148] In summary, the present disclosure relates to a motion vector refinement. As a first step, an initial motion vector and a template for a prediction block are obtained. Then, the refinement of the initial motion vector is determined by template matching with the template in a search space. The search space is at a position given by the initial motion vector and includes one or more fractional sample positions, and each fractional sample position belonging to the search space is obtained by interpolation filtering using a filter with a predefined tap size that evaluates only integer samples within a window, and the window is formed by the integer samples accessible for template matching in the search space. [Explanation of symbols]
[0149] 100 Encoder 105 Residual Blocks 106 Conversion Units 107 Conversion Factors 108 quantization units 110 Inverse Quantization Unit 112 Reverse conversion unit 115 Reconstructed Blocks 116 Buffers 120 Loop Filtering Unit 130 Decoded Picture Buffer 142 Inter-Estimation Units 144 Inter Prediction Units 152 Intra Estimation Units 154 intra prediction units 160 Mode Selection Unit 170 Entropy Coding Unit 171 Encoded picture data, encoded bitstream 200 Decoder 204 Entropy Decoding Unit 209 Quantized Residual Transform Coefficients 210 Inverse Quantization Unit 212 Reverse conversion unit 215 reconstructed blocks 216 Buffers 220 Loop Filtering Unit 230 Decoded Picture Buffer 231 Decoded Pictures 244 Inter Prediction Units 254 intra prediction units 265 predicted blocks 600 Processing Circuit 610 Initial Motion Vector and Template Determination Unit 620 Motion Vector Refinement Unit 640 Internal Memory 650 External Memory 810 center point, position 1010 center point 1020 distance
Claims
1. 1. An apparatus for encoding a block of a video image, comprising: Segmenting the video image to obtain the blocks; Obtain the initial motion vector, determining a refinement of the initial motion vector by bilateral matching in a search space; the search space is at a position given by the initial motion vector and includes one or more fractional sample positions, each of the fractional sample positions belonging to the search space is obtained by interpolation filtering using a filter with a predefined tap size that evaluates only integer samples within a window, the window being formed by integer samples accessible for the bilateral matching in the search space; generating a bitstream including said blocks encoded based on said refinement; a processing circuit configured to Device.
2. 2. The apparatus of claim 1, wherein the window is defined as at least one of a left and right and a top and bottom extension of the block.
3. 3. An apparatus according to claim 1 or 2, wherein the window is defined around a position pointed to by the initial motion vector and specifies a number of samples to be accessed to perform the refinement of the initial motion vector.
4. 4. The apparatus of claim 1, wherein the window is defined as N integer sample columns and M integer sample rows relative to an initial motion vector of the block, where at least one of N and M is a non-zero integer value.
5. the processing circuitry is configured to determine the refinement of the initial motion vector by bilateral matching in a search space that is iteratively expanded in a direction given by one of more best matching positions of the search space in a most recent iteration; 5. The apparatus of claim 1, wherein the window is defined by a predefined maximum number of said iterations.
6. 6. The apparatus of claim 1, wherein the search space comprises a rectangular subwindow of the window such that all integer samples accessed for interpolation filtering of each fractional sample within the subwindow are within the window for the filter of the predefined tap size.
7. 5. The apparatus of claim 1, wherein the search space comprises a rectangular search sub-window of the window, and the refinement of the initial motion vector is determined by bilateral matching in the rectangular search sub-window such that the integer samples accessed for interpolation filtering of each fractional sample in the search sub-window are within the window for the filter of the predefined tap size.
8. 8. The apparatus of claim 7, wherein the processing circuitry is configured to determine the refinement of the initial motion vector by bilateral matching in a search space that is iteratively expanded in a direction given by one of more best-matching positions of the search space in a most recent iteration, and the iteration is terminated when at least one sample in the search space of the most recent iteration is outside the search subwindow.
9. 7. The apparatus of claim 6, wherein the filter is a one-dimensional filter that evaluates any K horizontal or vertical integer samples when the fractional sample position is on a respective horizontal or vertical line of integer samples.
10. The search space is: - adjacent to the top or bottom of said search sub-window and lying on a horizontal line of integer samples, or - on a vertical line of integer samples adjacent to the left or right side of the search subwindow 8. The apparatus of claim 7, further comprising any of the fractional positions outside the search subwindow.
11. 1. A method for encoding a block of a video image, the method comprising the steps of: Segmenting the video image to obtain the blocks; obtaining an initial motion vector; determining a refinement of the initial motion vector by bilateral matching in a search space, the search space is at a position given by the initial motion vector and includes one or more fractional sample positions, each of the fractional sample positions belonging to the search space is obtained by interpolation filtering using a filter with a predefined tap size that evaluates only integer samples within a window, the window being formed by integer samples accessible for the bilateral matching in the search space; generating a bitstream comprising said blocks encoded based on said refinement; The method includes:
12. 12. The method of claim 11, wherein the window is defined as N integer sample columns and M integer sample rows relative to the initial motion vector of the block, where N and M are non-zero integer values.
13. the refinement of the initial motion vector is determined by bilateral matching in a search space which is iteratively extended in a direction given by one of the more best matching positions of the search space in a most recent iteration; The method according to claim 11 or 12, wherein the window is defined by a predefined maximum number of said iterations.
14. 14. The method of claim 11, wherein the search space comprises a rectangular subwindow of the window such that all integer samples accessed for interpolation filtering of each fractional sample within the subwindow are within the window for the filter of the predefined tap size.
15. 13. A method according to claim 11 or 12, wherein the search space comprises a rectangular search sub-window of the window, and the refinement of the initial motion vector is determined by bilateral matching in the rectangular search sub-window such that the integer samples accessed for interpolation filtering of each fractional sample in the search sub-window are within the window for the filter of the predefined tap size.
16. 16. The method of claim 15, wherein the refinement of the initial motion vector is determined by bilateral matching in a search space that is iteratively expanded in a direction given by one of more best-matching positions of the search space in a most recent iteration, and the iteration is terminated when at least one sample in the search space of the most recent iteration is outside the search subwindow.
17. 15. The method of claim 14, wherein the filter is a one-dimensional filter that evaluates K integer horizontal or vertical samples when the fractional sample position lies on each horizontal or vertical line of integer samples.
18. The search space is: - adjacent to the top or bottom of said sub-window and on a horizontal line of integer samples, or - It is adjacent to the left or right side of the subwindow and lies on a vertical line of integer samples 20. The method of claim 17, further comprising any of the fractional positions outside the subwindow.
19. A computer readable medium storing instructions which, when executed on a processor, cause the processor to perform the method of any one of claims 11 to 18.
Citation Information
Patent Citations
Motion information derivation mode determination in video coding
US20160286230A1
Low memory access motion vector derivation
WO2012125178A1
Method and apparatus of decoder side motion derivation for video coding
WO2017036414A1
Image encoding / decoding method and device, and recording medium having bitstream stored thereon
WO2018097693A2
