METHOD AND APPARATUS FOR ENCODING OR DECODING VIDEO DATA IN FRUC MODE WITH REDUCED MEMORY ACCESSES - Patent application

By refining motion vectors at sub-pixel levels with adaptive patterns based on edge directions and signal content, the method addresses inefficiencies in decoder-side motion vector prediction, enhancing coding efficiency and reducing bit rate costs in video encoding.

JP7542118B2Active Publication Date: 2024-08-29CANON KK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023120924
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2017-07-04
Filing Date
2023-07-25
Publication Date
2024-08-29
Estimated Expiration
2038-06-27

AI Technical Summary

Technical Problem

Existing video encoding technologies, particularly in HEVC, face inefficiencies in decoder-side motion vector prediction, specifically in the FRUC mode, due to sub-optimal refinement steps in motion vector derivation processes.

Method used

The method involves refining motion vectors at sub-pixel locations with increasing resolution, using patterns like diamond and cross searches, and adapting these patterns based on edge directions and signal content to improve accuracy.

Benefits of technology

Enhances coding efficiency by improving the precision of motion vector prediction, reducing bit rate costs, and optimizing rate-distortion performance in video encoding and decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007542118000015
    Figure 0007542118000015
  • Figure 0007542118000002
    Figure 0007542118000002
  • Figure 0007542118000013
    Figure 0007542118000013
Patent Text Reader

Abstract

To provide a method and an apparatus for encoding or decoding video data for improving an elaboration step of a motion vector in a frame rate up-conversion (FRUC) merge mode.SOLUTION: When a matching mode is template matching, a method extracts a left template, and determines whether its block includes high frequency. When the left template includes high frequency, the method applies a motion vector elaboration step. When the left template does not sufficiently include high frequency, the method extracts an upper template, determines whether the extracted template includes high frequency, and when the upper template includes high frequency, applies the motion vector elaboration step. Otherwise, the method skips the motion vector elaboration step.SELECTED DRAWING: Figure 13
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to methods and devices for encoding or decoding video data, and more particularly to encoding according to a particular coding mode using a decoder-side motion vector derivation mode, referred to as Frame-Rate Up Conversion mode or FRUC mode. [Background technology]

[0002] Predictive coding of video data is based on the division of a frame into blocks of pixels. For each block of pixels, a predictive block is searched for in the available data. In INTER coding mode, the predictive block is a block in a reference frame different from the current block, while in INTRA coding mode, the predictive block is generated from neighboring pixels in the current frame. Different coding modes are defined according to different ways of determining the predictive block. The result of the coding is an indication of a predictive block and a residual block consisting of the difference between the block to be coded and the predictive block.

[0003] For INTER coding modes, the indication of the predicted block is a motion vector that gives the position in the reference image of the predicted block relative to the position of the block to be coded. The motion vector is itself predictively coded based on a motion vector predictor. The High Efficiency Video Coding (HEVC) standard defines several known coding modes for predictive coding of motion vectors, namely the Advanced Motion Vector Prediction (AMVP) modes, the merge derivation process. These modes are based on building a candidate list of motion vector predictors and signaling the index of the motion vector predictor in this list that is used for encoding. Typically, the residual motion vector is also signaled. Summary of the Invention [Problem to be solved by the invention]

[0004] Recently, a new coding mode for motion vector prediction, called FRUC, has been introduced. It defines a decoder-side derivation process of a motion vector predictor without any signaling. The result of the derivation process is used as a motion vector predictor without the transmission of index or residual motion vectors by the decoder.

[0005] In FRUC merge mode, the derivation process includes a refinement step to increase the accuracy of the derived motion vector at the sub-pixel level, which involves evaluating different sub-pixel positions around the derived motion vector according to different patterns.

[0006] The present invention has been devised to improve the known refinement step, aiming at improving the coding efficiency by taking into account the matching type in the template and / or the characteristics of the signal. [Means for solving the problem]

[0007] According to a first aspect of the present invention there is provided a method for encoding or decoding video data having frames each divided into blocks of pixels, the method comprising the steps of: For each block of pixels, deriving a motion vector list of motion vectors using a decoder-side motion vector derivation method to obtain motion information; evaluating a list of motion vectors to select one motion vector; refining the selected motion vector by evaluating motion vectors at sub-pixel locations neighboring the selected motion vector; wherein at least some of the subpixel locations are selected at a resolution of 1 / 16 subpixels or greater. has.

[0008] In an embodiment, refining the selected motion vector comprises a number of search steps, At least one of the search steps involves sub-pixel locations at 1 / 16 sub-pixel resolution or better.

[0009] In an embodiment, the plurality of searching steps includes at least three consecutive steps, each of the three successive search steps includes a sub-pixel location at a given resolution; Each given resolution associated with the last two search steps is greater than the given resolution of the previous search step.

[0010] In an embodiment, the multiple search steps include at least a search step based on a diamond pattern performed at a first subpixel resolution and two search steps based on cross patterns performed at a subpixel resolution higher than the first subpixel resolution.

[0011] In an embodiment, at least some of the search steps are performed at sub-pixel resolution depending on the matching type used to encode the block of pixels.

[0012] In an embodiment, the first search step is a diamond pattern based search step performed at ¼ sub-pixel resolution; the second search step is a cross pattern based search step performed at 1 / 8 sub-pixel resolution; The third search step is a cross pattern based search step performed at 1 / 16 sub-pixel resolution.

[0013] According to another aspect of the present invention there is provided a method for encoding or decoding video data consisting of frames, each frame being divided into blocks of pixels, the method comprising the steps of: For each block of pixels, deriving a motion vector list of motion vectors using a decoder-side motion vector derivation method to obtain motion information; evaluating a list of motion vectors to select one motion vector; refining the selected motion vector by evaluating motion vectors at sub-pixel locations neighboring the selected motion vector; wherein the sub-pixel locations are evaluated according to a pattern selected from at least a plurality of patterns; Here, the plurality of patterns includes a horizontal pattern and a vertical pattern. has.

[0014] In an embodiment, the plurality of patterns further includes at least a diagonal pattern.

[0015] In an embodiment, a pattern in the plurality of patterns is selected based on edge directions detected within a block of adjacent pixels.

[0016] In an embodiment, at least one pattern in said plurality of patterns is defined at a resolution of 1 / 16 sub-pixel or better.

[0017] According to another aspect of the present invention there is provided a method for encoding or decoding video data having frames each divided into blocks of pixels, the method comprising the steps of: For each pixel block, deriving a motion vector list of motion vectors using a decoder-side motion vector derivation method to obtain motion information; evaluating a list of motion vectors to select one motion vector; refining the selected motion vector by evaluating motion vectors at sub-pixel locations neighboring the selected motion vector based on signal content of at least a block of neighboring pixels; has.

[0018] In an embodiment, the signal content is a frequency within the neighboring pixel block.

[0019] According to another aspect of the present invention there is provided a method for encoding or decoding video data having frames each divided into blocks of pixels, the method comprising the steps of: For each pixel block, deriving a motion vector list of motion vectors using a decoder-side motion vector derivation method to obtain motion information; evaluating a list of motion vectors to select one motion vector; where the evaluation of the motion vector list of motion vectors is based on a template defined by a pattern of pixels in the neighborhood of a block of pixels; The template used to derive the motion vector list of motion vectors is determined based on the signal content of the template. has.

[0020] In an embodiment, the signal content is a frequency within the template.

[0021] According to another aspect of the present invention there is provided a computer program product for a programmable device comprising instruction sequences for carrying out the invention when loaded and executed by said programmable device.

[0022] Another aspect of the present invention provides a computer readable storage medium having stored thereon computer program instructions for carrying out the present invention.

[0023] According to another aspect of the present invention there is provided a decoding device for decoding video data having frames each divided into blocks of pixels, the decoding device comprising: a processor configured to decode a block of pixels, the processor comprising: Derive a motion vector list of motion vectors using a mode of obtaining motion information by a decoder-side motion vector derivation method; Evaluate the list of motion vectors to select one motion vector; refining the selected motion vector by evaluating motion vectors at sub-pixel locations neighboring the selected motion vector; wherein at least some of the subpixel locations are selected at a resolution of 1 / 16 subpixels or greater. It is characterized by:

[0024] According to another aspect of the present invention there is provided a decoding device for decoding video data having frames each divided into blocks of pixels, the decoding device comprising: a processor configured to decode a block of pixels, the processor comprising: Derive a motion vector list of motion vectors using a mode of obtaining motion information by a decoder-side motion vector derivation method; Evaluate the list of motion vectors to select one motion vector; refining the selected motion vector by evaluating motion vectors at sub-pixel locations neighboring the selected motion vector; wherein the sub-pixel locations are evaluated according to a pattern selected from at least a plurality of patterns; Here, the plurality of patterns includes a horizontal pattern and a vertical pattern. It is characterized by:

[0025] According to another aspect of the present invention there is provided a decoding device for decoding video data having frames each divided into blocks of pixels, the decoding device comprising: a processor configured to decode a block of pixels, the processor comprising: Derive a motion vector list of motion vectors using a mode of obtaining motion information by a decoder-side motion vector derivation method; Evaluate the list of motion vectors to select one motion vector; determining to refine the selected motion vector by evaluating motion vectors at sub-pixel locations neighboring the selected motion vector based on signal content of at least a block of neighboring pixels; It is characterized by:

[0026] According to another aspect of the present invention there is provided a decoding device for decoding video data having frames each divided into blocks of pixels, the decoding device comprising: a processor configured to decode a block of pixels, the processor comprising: Derive a motion vector list of motion vectors using a mode of obtaining motion information by a decoder-side motion vector derivation method; Evaluate the list of motion vectors to select one motion vector; where the evaluation of the motion vector list of motion vectors is based on a template defined by a pattern of pixels in the neighborhood of a block of pixels; The template used to derive the motion vector list of motion vectors is determined based on the signal content of the template. It is characterized by:

[0027] At least some of the methods according to the invention may be computer-implemented. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.), or an embodiment combining software and hardware aspects, all of which may be referred to generally herein as a "circuit," "module," or "system." Furthermore, the present invention may take the form of a computer program product embodied in any tangible medium of expression having computer usable program code embodied in the medium.

[0028] Since the present invention can be implemented in software, the present invention can be implemented as computer readable code for provision to a programmable device on any suitable carrier medium. Tangible non-transitory carrier media can include storage media such as floppy disks, CD-ROMs, hard disk drives, magnetic tape devices, or solid-state memory devices. Transient carrier media can include signals such as electrical, electronic, optical, acoustic, magnetic, or electromagnetic signals, e.g., microwave or RF signals.

[0029] Embodiments of the invention will now be described, by way of example only, with reference to the following drawings, in which: [Brief description of the drawings]

[0030] [Figure 1] A diagram showing the HEVC encoder architecture. [Diagram 2] FIG. 1 is a diagram showing the principle of a decoder. [Diagram 3] FIG. 13 is a diagram showing template matching and bilateral matching in FRUC merge mode. [Figure 4] FIG. 13 shows decoding of FRUC merge information. [Diagram 5] 13 shows an encoder evaluation for merge mode and merge FRUC mode. [Figure 6] A diagram showing merge FRUC mode derivation at coding unit and sub-coding unit levels for JEM. [Figure 7] FIG. 13 is a diagram showing templates surrounding a current block in the JEM template matching method. [Figure 8] 1 illustrates motion vector refinement. [Figure 9] 4 is a diagram illustrating adaptive sub-pixel resolution of motion vector refinement in accordance with an embodiment of the present invention; [Figure 10] FIG. 1 shows an example of the prior art and the results obtained with an embodiment of the present invention. [Figure 11] 4A-4D illustrate several motion vector refinement search shapes utilized in one embodiment of the present invention. [Figure 12] 4 illustrates an adaptive search shape for motion vector refinement in one embodiment of the present invention. [Figure 13] 4 illustrates adaptive motion vector refinement in one embodiment of the present invention. [Figure 14] FIG. 4 illustrates template selection for motion vector refinement in one embodiment of the present invention. [Figure 15] 1 is a schematic block diagram of a computing device for implementing one or more embodiments of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0031] Figure 1 shows the HEVC encoder architecture. In a video encoder, an original sequence 101 is divided into blocks of pixels 102, called coding units. A coding mode is then applied to each block. There are two families of coding modes typically used in HEVC: modes based on spatial prediction, i.e., INTRA modes 103, and modes based on temporal prediction, i.e., INTER modes, based on motion estimation 104 and motion compensation 105. INTRA coding units are generally predicted from the coded pixels at their causal boundaries by a process called INTRA prediction.

[0032] Temporal prediction first consists in finding, in a motion estimation step 104, a reference area in a previous or future frame, called reference frame 116, that is closest to the coding unit. This reference area constitutes a prediction block. This coding unit is then predicted using the prediction block and a residual is calculated in a motion compensation step 105.

[0033] In both cases of spatial and temporal prediction, the residual is computed by subtracting the coding unit from the original predictor block.

[0034] In INTRA prediction, the prediction direction is coded. In temporal prediction, at least one motion vector is coded. However, to further reduce the bitrate cost associated with motion vector coding, the motion vector is not coded directly. Indeed, assuming uniform motion, it is particularly interesting to code a motion vector as the difference between this motion vector and its surrounding motion vectors. For example, in the H.264 / AVC coding standard, a motion vector is coded with respect to a median vector calculated between the three blocks located above and to the left of the current block. Only the difference calculated between the median vector and the current block motion vector (also called residual motion vector) is coded into the bitstream. This is processed in the module "Mv prediction and coding" 117. The value of each coded vector is stored in the motion vector field 118. The neighboring motion vectors used for prediction are extracted from the motion vector field 118.

[0035] Then, in module 106, a mode that optimizes the rate-distortion performance is selected. To further reduce redundancy, a transform, typically a DCT, is applied to the residual block in module 107, and then quantization is applied to its coefficients in module 108. The quantized coefficient block is then entropy coded in module 109 and the result is inserted into the bitstream 110.

[0036] The encoder then performs decoding of the coded frame for future motion estimation in modules 111 to 116. These steps allow the encoder and decoder to have the same reference frame. To reconstruct the coded frame, the residual is dequantized in module 111 and inverse transformed in module 112 to provide a "reconstructed" residual in the pixel domain. Depending on the coding mode (INTER or INTRA), this residual is applied to an INTER predictor 114 or an INTRA predictor 113.

[0037] This first reconstruction is then filtered in module 115 by one or more types of post-filtering. These post-filters are integrated into the encoding and decoding loop. This means that they have to be applied to the reconstructed frames at the encoder and decoder side in order to use the same reference frames at the encoder and decoder side. The purpose of this post-filtering is to remove compression artifacts.

[0038] The principle of the decoder is illustrated in Fig. 2. The video stream 201 is first entropy decoded in module 202. The residual data is then dequantized in module 203 and inverse transformed in module 204 to obtain pixel values. The mode data is also entropy decoded as a function of the mode, and either INTRAA type decoding or INTER type decoding is performed. In case of INTRA mode, an INTRA predictor is determined as a function of the INTRA prediction mode specified in the bitstream 205. In case of the mode INTER, motion information is extracted from the bitstream 202. It consists of a reference frame index and a motion vector residual. The motion vector predictor is added to the motion vector residual to obtain a motion vector 210. The motion vector is then used to locate a reference area in a reference frame 206. It is noted that the motion vector field data 211 is updated with the decoded motion vector in order to use it for the prediction of the next decoded motion vector. This first reconstruction of the decoded frame is postfiltered 207 with exactly the same postfilter as used on the encoder side. The output of the decoder is the decompressed video 209 .

[0039] The HEVC standard uses three different INTER modes: Inter mode, Merge mode, and Merge Skip mode. The main difference between these modes is the data signaling in the bitstream. For motion vector coding, the current HEVC standard, compared to its prior art, includes a contention-based scheme for motion vector prediction. It means that several candidates are competing with a rate-distortion criterion at the encoder side to find the best motion vector predictor or best motion information for each Inter mode or Merge mode. An index corresponding to the best candidate for the best predictor or motion information is inserted into the bitstream. The decoder can derive the same set of predictors or candidates and will use the best one according to the decoded index.

[0040] The design of predictor and candidate derivation is very important to achieve the best coding efficiency without a large impact on the complexity. In HEVC, two motion vector derivations are used: one for inter mode (Advanced Motion Vector Prediction (AMVP)) and one for merge mode (Merge derivation process).

[0041] As already mentioned, a merge mode candidate (either "classical" or skip) represents all the motion information: direction, list, reference frame index, and motion vector. Several candidates are generated by the merge derivation process described below, each with its own index. In the current HEVC design, the maximum candidates for both merge modes is equal to 5.

[0042] In the current version of JEM, two types of search are possible: template matching and bilateral matching. Figure 3 illustrates these two methods. The principle of bilateral matching 301 is to find the best match between two blocks, sometimes also called templates by analogy with template matching described below, along the motion trajectory of the current coding unit.

[0043] The principle of template matching 302 is to derive motion information for the current coding unit by calculating the matching cost between the reconstructed pixels around the current block and the neighboring pixels around the block pointed to by the estimated motion vector. The template corresponds to a pattern of neighboring pixels around the current block and a corresponding pattern of neighboring pixels around the predicted block.

[0044] For both matching types (template or bilateral), the different calculated matching costs are compared to find the best matching cost. The motion vector or pair of motion vectors that obtains the best match is selected as the derived motion information. Further details can be found in JVET-F1001.

[0045] Both matching methods offer the possibility to derive the entire motion information, motion vectors, reference frames and type of prediction. Decoder-side motion information derivation, denoted as "FRUC" in the JEM, applies to all HEVC inter modes, i.e. AMVP, Merge and Merge Skip.

[0046] In the case of AMVP, all the motion information, i.e. uni or bi prediction, reference frame index, predictor index motion vector, and residual motion vector, are signaled and the FRUC method is applied to determine a new predictor which, if it is a list of predictors, is set to the first predictor, hence it has index 0.

[0047] For merge and merge skip modes, the FRUC flag is signaled to the CU. If FRUC is false, a merge index is signaled and normal merge mode is used. When the FRUC flag is true, an additional FRUC mode flag is signaled to indicate which method (bilateral matching or template matching) should be used to derive the motion information of the block. Note that bilateral matching only applies to B frames, not P frames.

[0048] For merge and merge skip modes, a motion vector field is defined for the current block, which means that the vector is defined for a sub-coding unit smaller than the current coding unit. Furthermore, as for classical merge, one motion vector for each list can form the motion information for the block.

[0049] 4 is a flow chart illustrating the signaling of FRUC flags for block merging modes. A block may be a coding unit or a prediction unit according to the HEVC representation.

[0050] In a first step 401, the skip flag is decoded to know if the coding unit is coded according to the skip mode. If this flag is false in the test in step 402, the merge flag is decoded in step 403 and tested in step 405. When the coding unit is coded according to the skip or merge mode, the merge FRUC flag is decoded in step 404. If the coding unit is not coded according to the skip or merge mode, the intra prediction information of the classical AMVP inter mode is decoded in step 406. If the FRUC flag of the current coding unit is true and the current slice is a B slice, the matching mode flag is decoded in step 408. It should be noted that bilateral matching in FRUC is only available for B slices. If the slice is not a B slice and FRUC is selected, the mode is necessarily template matching and there is no matching mode flag. If the coding unit is not FRUC, the classical merge index is decoded in step 409.

[0051] The FRUC merge mode competes with the classical merge mode (and other possible merges) at the encoder side. Figure 5 shows the current coding mode evaluation method in JEM. First, in step 501, the classical merge mode of HEVC is evaluated. The candidate list is first evaluated with a simple SAD (sum of absolute differences) between the original block and each candidate in the list in step 50. Next, the actual rate distortion (RD) cost of each candidate in the list of restricted candidates is evaluated, as shown by steps 504-508. The evaluation evaluates the rate distortion with residual in step 505 and without residual in step 506. Finally, in step 509, the best merge candidate is determined, which may or may not have residual.

[0052] Next, the FRUC merge modes are evaluated in steps 510-516. For each matching method, i.e., bidirectional matching and template matching, in step 510, the motion vector field of the current block is obtained in step 511 and a full rate-distortion cost evaluation with and without residual is calculated in steps 512 and 513. The best motion vector 516, with or without residual, is determined based on these rate-distortion costs in step 515. Finally, the best mode between the classical and FRUC merge modes is determined in step 517, before the possible evaluation of other modes.

[0053] 6 shows the FRUC merge evaluation method at the encoder side. In step 601, for each matching type, i.e., template matching type and bilateral type, the coding unit level is evaluated by module 61, and then the sub-coding unit level is evaluated by module 62. The goal is to find the motion information of each sub-coding unit in the current coding unit 603.

[0054] Module 61 handles coding unit level evaluation. In step 611, a list of motion information is derived. In step 612, for each motion information in this list, the distortion cost is calculated and compared with each other. The best motion vector of the template, or the best set for bilateral 613, is the one that minimizes the cost. Then, a motion vector refinement step 614 is applied to improve the accuracy of the obtained motion vector. In the FRUC method, bilinear interpolation is used instead of the classical discrete cosine transform interpolation filter (DCTIF) interpolation filter for template matching estimation. This reduces the memory access around the block to one pixel instead of the seven pixels around the block of the conventional DCTIF. In fact, the bilinear interpolation filter requires only two pixels to obtain the sub-pixel value in one direction.

[0055] After motion vector refinement, a better motion vector for the current coding unit is obtained in step 615. This motion vector is used for sub-coding unit level evaluation.

[0056] In step 602, the current coding unit is subdivided into several sub-coding units, which are square blocks depending on the division depth of the coding unit in the quadtree structure, and whose minimum size is 4x4.

[0057] For each sub-CU (sub-coding unit), the sub-CU level evaluation module 62 evaluates the best motion vector. In step 621, a motion vector list is derived that includes the best motion vector obtained at the CU level in step 615. In step 622, a distortion cost for each motion vector is evaluated, but also including a cost representing the distance between the best motion vector obtained at the coding unit level and the current motion vector in order to avoid divergence of the motion vector field. A best motion vector 623 is obtained based on the minimum cost. This vector 623 is then refined by a MV refinement process 624 in the same way as was done at the CU level in step 614.

[0058] At the end of the process, the motion information for each sub-CU for one matching type is obtained. At the encoder side, the best RD cost between both matching types is compared and the best one is selected. At the decoder side, this information is decoded from the bitstream (step 408 in FIG. 4).

[0059] For template FRUC matching mode, the templates 702, 703 consist of four rows up to and four columns to the left of the block 701 used to estimate the rate-distortion cost, as shown in grey in Figure 7. Two distinct templates are used: left template 702 and top template 703. The current block or matched block 701 is not used in determining the distortion.

[0060] FIG. 8 illustrates the motion vector refinement steps 614 and 624 of FIG. 6 with additional searches around the best predictor identified (613 or 623).

[0061] The method takes as input the best motion vector predictor 801 identified in the list (612 or 622).

[0062] In step 802, a diamond search is applied at a resolution corresponding to quarter pixel positions. The diamond search is based on the diamond pattern shown in diagram 81 at quarter pixel resolution centered on the best motion vector. This step results in a new best motion vector 803 at quarter pixel resolution.

[0063] The best motion vector position 803 obtained from this diamond search becomes the center of a cross search (meaning based on a cross pattern) at quarter pixel resolution in step 804. This cross search pattern is shown in diagram 82 at quarter pixel resolution of the center of the best motion vector 803. This step results in a new best motion vector 805 at quarter pixel resolution.

[0064] The new best motion vector position 805 obtained in this search step 804 becomes the center of a cross search at 1 / 8 pixel resolution in step 806. This step results in a new best motion vector at 1 / 8 pixel resolution 807. Diagram 83 shows, at 1 / 8 pixel resolution, all the positions tested in these three search steps.

[0065] The present invention aims to improve the known refinement step and to improve the coding efficiency by taking into account the matching type in the template and / or the characteristics of the signal.

[0066] In one embodiment of the present invention, the sub-pixel refinement accuracy is increased at each step of the refinement method.

[0067] The refinement step is performed by evaluating the motion vectors at sub-pixel positions. The sub-pixel positions are determined at a given sub-pixel resolution. The sub-pixel resolution determines the number of sub-pixel positions between two pixels. The higher the resolution, the higher the number of sub-pixel positions between two pixels. For example, 1 / 8 pixel resolution corresponds to 8 sub-pixel positions between two pixels.

[0068] Figure 9 illustrates this embodiment. The first diagram 91 shows the 1 / 16 pixel resolution of the prior art pattern shown in Figure 8. As shown in diagram 92, the first step is a 1 / 4th pixel search, then a cross search is 8th pixel and the last cross search is 1 / 16th pixel. This embodiment provides the possibility to obtain a more accurate position around the good position. Moreover, the motion vectors will be, on average, closer to the initial position than with the previous sub-constraint.

[0069] In one additional embodiment, refinement is applied only to template matching and not to bilateral matching.

[0070] Figure 10 is a flow chart illustrating these embodiments. The best motion vector corresponding to the best motion vector obtained in the previous step (613 or 623) is set as the center position of a diamond search 1002 at 1 / 4 pel position. The diamond search 1002 obtains a new best motion vector 1003. If the matching type is template matching, the motion vector obtained by the diamond search 1003 becomes the center of a cross search 1009 with 1 / 8th pixel accuracy that results in a new motion vector 1010. This new best motion vector 1010 is subjected to a cross search 1011 with 1 / 16th pixel accuracy to obtain a final best motion vector 1012.

[0071] If the matching type is not template matching, then in step 1005, a regular cross search at 1 / 4 pixel is performed to obtain a new best motion vector 1006, followed by a 1 / 8 pixel search step 1007 to obtain a final best motion vector 1008.

[0072] This embodiment improves coding efficiency especially for uni-prediction. In the case of bi-prediction, the averaging between two similar blocks may be similar to increasing sub-pixel resolution. For example, if both blocks for bi-prediction are from the same reference frame and the difference between their two motion vectors is equal to a lower sub-pixel resolution, then bi-prediction will correspond to increasing sub-pixel resolution. In the case of uni-prediction, this additional averaging between two blocks does not exist. As a result, it is more important to increase sub-pixel resolution for uni-prediction, especially when this higher resolution does not need to be signaled in the bitstream.

[0073] In one embodiment, the diamond or cross search pattern is replaced by a horizontal, diagonal, or vertical pattern. Figure 11 shows various diagrams that can be used in this embodiment. Diagram 1101 shows positions searched according to a 1 / 8 pixel horizontal pattern. Diagram 1102 shows positions searched according to a 1 / 8 pixel vertical pattern. Diagram 1103 shows positions searched according to a 1 / 8 pixel diagonal pattern. Diagram 1104 shows positions searched according to another 1 / 8 pixel diagonal pattern. Diagram 1105 shows positions searched according to a 1 / 16 pixel horizontal pattern.

[0074] A horizontal pattern is a pattern of horizontally aligned sub-pixel locations, a vertical pattern is a pattern of vertically aligned sub-pixel locations, and a diagonal pattern is a pattern of diagonally aligned sub-pixel locations.

[0075] The advantage of these patterns is mainly interesting when the block contains an edge, since it provides a better refinement of this edge for the prediction. In fact, in classical motion vector estimation, the refinement of the motion vector gives a higher result if additional positions are tested among the perpendicular axis of the detected edge.

[0076] FIG. 12 shows an example of a method for selecting a pattern according to the present embodiment. This flow chart can be used, for example, to modify the pattern search of one or more of modules 802, 804, 806 in FIG. 8. If the matching type is template matching tested in step 1201, the left template of the current block is extracted in step 1202. Then, it is determined whether the block contains an edge. If so, the direction of the edge is determined in step 1203. For example, a gradient on the current block can be calculated to determine the presence of an edge and its direction. If this "directionLeft" is horizontal as tested in step 1204, a vertical pattern, for example pattern 1102, is selected for motion vector refinement in step 1205.

[0077] If there is no edge in the left template or the identified direction is not horizontal, then in step 1206 the top template of the current block is extracted. It is then determined whether the template contains an edge, and if so, its direction is determined in step 1207. If this "directionUp" is vertical as tested in step 1208, then the pattern selected for motion vector refinement in step 1209 is a horizontal pattern, e.g., pattern 1101 or 1105. Otherwise, in step 1210 the initial pattern (81, 82, 83) is selected.

[0078] Note that if the left block contains a horizontal edge, this edge must pass through the current block. Similarly, if the upper block contains a vertical edge, this edge must pass through the current block. Conversely, if the left block contains a vertical edge, this edge should not pass through the current block, etc.

[0079] If in step 1201 it is determined that the matching type is bilateral matching, then in step 1211 one template block is selected. Then in step 1212 it is determined whether the template contains a direction and which direction it is. If the direction is horizontal, as tested in step 1213, then a vertical pattern is selected in step 1205. If the direction is vertical, as tested in step 12147, then a horizontal pattern is selected in step 1209. In case of bilateral matching, some other linear pattern can be used as the diagonal patterns 1103 and 1104. In that case, the linear pattern that is most perpendicular to the direction of the edge, as determined in 1212, is selected. If no edge is detected in step 1212, the initial pattern is kept.

[0080] The advantage of this adaptation of the pattern for motion vector refinement is improved coding efficiency since the pattern is adapted to the signal contained in the template.

[0081] Patterns can also be adapted. For example, diagram 1105 shows a horizontal 1 / 16th pixel pattern, where there are more positions around the initial motion vector due to the high motion vector accuracy.

[0082] In one embodiment, the signal content of the template is used to determine the number of positions to be tested for motion vector refinement. For example, the presence of high frequencies in the template around the current block is used to determine the application of the refinement step, since if there are not enough high frequencies, sub-pixel refinement of the motion vectors is irrelevant.

[0083] FIG. 13 shows an example of this embodiment.

[0084] If the matching mode is template matching, tested in step 1301, a left template is extracted in step 1302, typically the four adjacent rows of the current block. Then, in step 1303, it is determined whether this block contains high frequencies. This determination can be obtained, for example, by comparing the sum of gradients with a threshold. If this left template does contain high frequencies, as tested in step 1304, a motion vector refinement step 1305 is applied, which corresponds to steps 614 and 624 in Figure 6.

[0085] If the left template does not contain a high enough frequency, then a top template is extracted in step 1306. In step 1307 it is determined whether the extracted template contains a high frequency, and the test in step 1308 is yes, if so then a motion vector refinement step is applied in step 1305. Otherwise, in step 1309 the motion vector refinement step is skipped.

[0086] If it is determined in step 1301 that the matching type is bilateral matching, one template is extracted in step 1310. Then, it is determined whether the extracted template contains high frequency in step 1314. If the extracted template does not contain high frequency as tested in step 1313, then motion vector refinement is not applied in step 1309; otherwise, motion vector refinement is applied in step 1305.

[0087] In yet another embodiment, the signal content of the template is used to determine the template used for distortion estimation which is used to determine motion vectors for template matching type FRUC estimation.

[0088] FIG. 14 illustrates this embodiment.

[0089] The process starts at step 1401. A left template and a top template are extracted at steps 1402, 1403. For each extracted template, it is determined in steps 1404 and 1405 whether the extracted template contains high frequencies. Then, in the test at steps 1406 and 1407, if the tested templates contain high frequencies, they are used for distortion estimation in the FRUC evaluation at steps 1408 and 1409. If both templates contain high frequencies, they are both used for FRUC evaluation. If there is no template containing high frequencies, then in step 1411, a top template is selected to be used for distortion estimation.

[0090] All of these embodiments may be combined.

[0091] 15 is a schematic block diagram of a computing device 1500 for implementing one or more embodiments of the present invention. The computing device 1500 can be an apparatus such as a microcomputer, a workstation, or a lightweight portable device. The computing device 1500 comprises a communication bus to which the following are connected: · A central processing unit 1501, such as a microprocessor, called a CPU; a random access memory 1502, denoted RAM; intended to store the executable code of the method of an embodiment of the invention, as well as registers adapted to record variables and parameters necessary for implementing the method of encoding or decoding at least a part of an image according to an embodiment of the invention, the memory capacity of which may be expanded, for example, by an optional RAM connected to an expansion port. A read-only memory 1503, denoted ROM; this stores the computer program for implementing the embodiments of the present invention. · Network interface 1504; this is typically connected to a communications network over which the digital data to be processed is transmitted or received. Network interface 1504 may be a single network interface or may be composed of a set of different network interfaces (e.g., wired and wireless interfaces, or different types of wired or wireless interfaces). Data packets are written to the network interface for transmission or read from the network interface for reception under the control of software applications executing on CPU 1501. · User Interface 1505; this is used to receive input from the user or to display information to the user. · A hard disk 1506, denoted HD; this may be provided as mass storage device. · I / O module 1507; this may be used to receive / send data from / to external devices such as video sources or displays.

[0092] The executable code may be stored either in the read-only memory 1503, in the hard disk 1506 or on a removable digital medium, such as a disk. According to a variant, the executable code of the program can be stored in one of the storage means of the communication device 1500, such as the hard disk 1506, and then received by means of a communication network via the network interface 1504, in order to be executed.

[0093] The central processing unit 1501 is adapted to control and direct the execution of instructions of a program or part of a software code according to an embodiment of the present invention, the instructions being stored in one of the aforementioned storage means. After power-on, the CPU 1501 is capable of executing instructions from the main RAM memory 1502, for example relating to a software application loaded from a program ROM 1503 or a hard disk (HD) 1506. Such a software application, when executed by the CPU 1501, performs the steps of the flowcharts of the present invention.

[0094] Any step of an algorithm of the present invention may be implemented in software by execution of a set of instructions or programs by a programmable computing machine such as a PC ("Personal Computer"), a DSP ("Digital Signal Processor") or a microcontroller, or may be implemented in hardware by a machine or dedicated component such as an FPGA ("Field Programmable Gate Array") or an ASIC ("Application Specific Integrated Circuit").

[0095] Although the present invention has been described with reference to specific embodiments, the present invention is not limited to those embodiments, and modifications that are within the scope of the present invention will be apparent to those skilled in the art.

[0096] Many further modifications and variations will be suggested to those skilled in the art by reference to the foregoing exemplary embodiments, which are given by way of example only and are not intended to limit the scope of the invention, which is determined solely by the appended claims. In particular, different features from different embodiments may be interchanged where appropriate.

[0097] In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. The mere fact that different features are recited in mutually different dependent claims does not indicate that a combination of these features cannot be used to advantage.

Claims

1. 1. A method for decoding video data of an image divided into a plurality of blocks, comprising the steps of: a first motion vector for a block to be decoded included in an image to be decoded, the first motion vector specifying a first region in a first image different from the image to be decoded; a second motion vector for the block to be decoded, the second motion vector specifying a second region in a second image different from the image to be decoded; and determining When a mode capable of refining the first and second motion vectors is used in the decoding method, determining whether to refine the first and second motion vectors in the decoding method using a signal content of at least one of the first region and the second region, without using a signal content of the block to be decoded; refining the first and second motion vectors to generate refined motion vectors with fractional sample accuracy if it is determined to perform the refinement; if the refinement is performed, decoding the current block using the refined first and second motion vectors; having For said refinement, a number of patterns for evaluating fractional sample positions are available in said decoding method, the plurality of patterns includes a horizontal pattern and a vertical pattern; in said horizontal pattern, at least a number of fractional sample positions to the right of a first pixel position to be refined and a number of fractional sample positions to the left of said first pixel position are candidate horizontal positions for said refined motion vector, in the vertical pattern, at least a number of fractional sample positions above the first pixel position and a number of fractional sample positions below the first pixel position are candidate vertical positions for the refined motion vector; The refinement of the first and second motion vectors may include a first refinement and a second refinement subsequent to the first refinement. A decoding method comprising:

2. It is determined whether the signal contains high frequencies, and if it is determined that the signal contains high frequencies, it is determined that the refinement is to be performed.

2. The method of claim 1 .

3. The sum of the gradients is compared to a threshold value to determine whether the high frequencies are included.

3. The method of claim 2.

4. The refined motion vectors are at 1 / 16 fractional sample accuracy. The decoding method according to any one of claims 1 to 3.

5. 1. A decoding device for decoding video data of an image divided into a plurality of blocks, comprising: a first motion vector for a block to be decoded included in an image to be decoded, the first motion vector specifying a first region in a first image different from the image to be decoded; a second motion vector for the block to be decoded, the second motion vector specifying a second region in a second image different from the image to be decoded; A first determination means for determining a second determination means for determining whether to refine the first and second motion vectors in the decoding device by using a signal content of at least one of the first region and the second region, without using a signal content of the block to be decoded, when a mode capable of refining the first and second motion vectors is used in the decoding device; refinement means for refining the first and second motion vectors to generate refined motion vectors with fractional sample accuracy if it is decided to perform the refinement; a decoding means for decoding the block to be decoded using the refined first and second motion vectors when the refinement is performed; having For said refinement, a plurality of patterns for evaluating fractional sample positions are available in said decoding device, the plurality of patterns includes a horizontal pattern and a vertical pattern; in said horizontal pattern, at least a number of fractional sample positions to the right of a first pixel position to be refined and a number of fractional sample positions to the left of said first pixel position are candidate horizontal positions for said refined motion vector, in the vertical pattern, at least a number of fractional sample positions above the first pixel position and a number of fractional sample positions below the first pixel position are candidate vertical positions for the refined motion vector; The refinement of the first and second motion vectors may include a first refinement and a second refinement subsequent to the first refinement. A decoding device comprising:

6. The second determination means determines whether the signal contains high frequencies as its contents, and determines to perform the refinement when it is determined that the signal contains high frequencies.

6. The decoding device according to claim 5.

7. The second determining means compares the sum of the gradients with a threshold value to determine whether the high frequency is included.

7. The decoding device according to claim 6.

8. The refined motion vectors are at 1 / 16 fractional sample accuracy. The decoding device according to any one of claims 5 to 7.

9. A program for causing a computer to function as each of the means of the decoding device according to any one of claims 5 to 8.

Citation Information

Patent Citations

  • Motion vector estimation method

    US20080002772A1

  • Deriving motion information for sub-blocks in video coding

    WO2016160605A1