METHOD AND APPARATUS FOR CODING IMAGES OF A VIDEO SEQUENCE AND TERMINAL DEVICE - Patent application

By constraining the bit depth of reference image blocks in video coding, the method addresses the complexity and time issues in decoder-side motion vector refinement, enhancing processing efficiency and throughput.

JP7556988B2Active Publication Date: 2024-09-26HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023002475
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-01-11
Publication Date
2024-09-26
Estimated Expiration
2038-09-05

AI Technical Summary

Technical Problem

Existing video coding methods, particularly in decoder-side motion vector refinement (DMVR and DMVD), face high computational complexity and time consumption due to the need for complex and time-consuming improvement searches around sub-pixel-accurate motion vectors, especially when dealing with varying bit depths of reference image blocks.

Method used

Constraining the bit depth of sample values of candidate reference image blocks to a predefined depth before motion information improvement, using a cost function to determine optimal motion information, thereby reducing computational complexity and processing time.

Benefits of technology

This approach reduces processing time and computational complexity by limiting the bit depth of reference image blocks, leading to lower buffer size requirements and improved throughput in hardware implementations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007556988000024
    Figure 0007556988000024
  • Figure 0007556988000025
    Figure 0007556988000025
  • Figure 0007556988000023
    Figure 0007556988000023
Patent Text Reader

Abstract

A method and apparatus and a terminal device are provided for coding an image of a video sequence, the image including a current image block. In the method, initial motion information for a current image block is obtained, sample values ​​of at least two candidate reference image blocks corresponding to the current image block are obtained according to the initial motion information, the bit depth of the sample values ​​of each candidate reference image block is constrained to a predefined bit depth, improved motion information is then obtained based on the constrained sample values ​​of the at least two reference image blocks, and a predicted image block for the current image block is determined according to the improved motion information.The method or apparatus for coding images of a video sequence provided in the present disclosure constrains the bit depth of the sample values ​​of each candidate reference image block before improving the motion information, thereby reducing computational complexity and enabling a reduction in processing time.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to the technical field of image coding, and in particular to a method and apparatus for coding images of a video sequence, and a terminal device. [Background technology]

[0002] Video coding (video encoding and decoding) is used in a wide range of digital video applications, e.g., broadcast digital TV, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat, video conferencing, DVD and Blu-ray discs, video content acquisition and editing systems, and camcorders in security applications.

[0003] In video compression, inter-prediction is a process that uses reconstructed samples of already decoded reference pictures by specifying motion vectors for a current image block. These motion vectors may be coded as prediction residuals by using spatial or temporal motion vector predictors. The motion vectors may be sub-pixel accurate. An interpolation filter is applied to derive sub-pixel accurate pixel values ​​in the reference image from the reconstructed integer position values. Bi-prediction refers to a process in which a prediction for a current image block is derived as a weighted combination of two predictive blocks derived using two motion vectors from regions of two reference pictures. In this case, in addition to the motion vectors, reference indices for the reference pictures from which the two predictive blocks are derived also need to be coded. The motion vector for the current image block may also be derived by a merging process in which the motion vectors and reference indices of spatial neighbors are inherited without coding any motion vector residuals. In addition to spatial neighboring blocks, motion vectors of already coded reference pictures are also stored and used as a temporal merging option with appropriate scaling of the motion vectors to take into account the distance to the reference picture relative to the distance of the current image block to the reference picture.

[0004] Several methods have been proposed to perform decoder-side motion vector refinement (DMVR for short) or decoder-side motion vector derivation (DMVD for short) so that the motion vector can be further improved. During both the DMVR and DMVD processes, a search for improvement needs to be performed around a starting point, which may be a sub-pixel accurate motion vector, which is usually complex and time-consuming.

[0005] This background information is provided to identify information believed by the applicant to be of possible relevance to the present disclosure. No admission is necessarily intended, nor should it be construed, that any of the preceding information constitutes prior art to the present disclosure. Summary of the Invention [Means for solving the problem]

[0006] In view of the above, to overcome the above problems, the present disclosure provides a method and apparatus for coding images of a video sequence, and a terminal device.

[0007] These and other objects are achieved by the subject matter of the independent claims. Further implementation forms are evident from the dependent claims, the description and the drawings.

[0008] According to a first aspect, the present disclosure relates to a method for coding an image of a video sequence, the image including a current image block. The method is performed by an apparatus for coding an image of a video sequence. In the method, initial motion information of the current image block is obtained, sample values ​​of at least two candidate reference image blocks corresponding to the current image block are obtained according to the initial motion information, a bit depth of the sample values ​​of each candidate reference image block is constrained to a predefined bit depth, and then improved motion information is obtained based on the constrained sample values ​​of the at least two constrained candidate reference image blocks, and a predicted image block of the current image block is determined according to the improved motion information.

[0009] The method for coding images of a video sequence provided in this disclosure allows the bit depth of sample values ​​of each candidate reference image block to be constrained prior to refining the motion information, thus reducing computational complexity and enabling reduced processing time.

[0010] In a possible implementation form of the method according to the first aspect itself, the step of obtaining improved motion information based on constrained sample values ​​of at least two constrained candidate reference image blocks comprises: using a second cost function to determine the position of the constrained candidate reference image block having the smallest cost; and obtaining improved motion information according to the position of the constrained candidate reference image block having the smallest cost, where the second cost function indicates the difference between the constrained candidate reference image block and a template of the current image block, the template being obtained based on the initial motion information and the position of the current image block, and the bit depth of the sample values ​​of the template being constrained to a predefined bit depth. Here, the template serves as a comparison criterion obtained from a weighted combination of the two constrained candidate reference image blocks. The cost is: If m0 > m1,

number

number

[0011] The above formula aims to restrict the variables in the formula so that they do not exceed the maximum value that can be represented in d bits, and also defines a normative process so that the final absolute difference can be performed with a predefined bit depth between the two quantities, thereby preventing possible overflowing errors.

[0012] In a possible implementation form of the method according to the first aspect itself, using a second cost function to determine a position of the constrained candidate reference image block having the smallest cost, and obtaining improved motion information according to the position of the constrained candidate reference image block having the smallest cost, where the at least two constrained candidate reference image blocks include a set of first constrained candidate reference image blocks and a set of second constrained candidate reference image blocks, and the second cost function indicates a difference between the first constrained candidate reference image block and the second constrained candidate reference image block. The cost is: If m0 > m1,

number

number

[0013] The above formula aims to restrict the variables in the formula so that they do not exceed the maximum value that can be represented in d bits, and also specifies a normative process by which the final absolute difference can be performed between the two quantities with a predefined bit depth, thereby preventing possible overflow errors.

[0014] According to a second aspect, the present disclosure relates to an apparatus for coding an image of a video sequence. The apparatus includes an acquisition module, a constraint module, and a determination module, where the acquisition module is configured to acquire initial motion information of a current image block, acquire sample values ​​of at least two candidate reference image blocks corresponding to the current image block according to the initial motion information, and further acquire improved motion information based on the constrained sample values ​​of the at least two constrained candidate reference image blocks. The constraint module is configured to constrain a bit depth of the sample values ​​of each candidate reference image block to a predefined bit depth, and the determination module is configured to determine a predicted image block of the current image block according to the improved motion information.

[0015] The apparatus for coding images of a video sequence provided in the present disclosure constrains the bit depth of sample values ​​of each candidate reference image block prior to refining motion information, thus reducing computational complexity and enabling reduced processing time.

[0016] In a possible implementation form of the device according to the second aspect itself, the acquisition module is particularly configured to use a second cost function to determine the position of the constrained candidate reference image block having the smallest cost, and to acquire the improved motion information according to the position of the constrained candidate reference image block having the smallest cost, where the second cost function indicates the difference between the constrained candidate reference image block and a template of the current image block, the template being obtained based on the initial motion information and the position of the current image block, and the bit depth of the sample values ​​of the template being constrained to a predefined bit depth, where the template serves as a comparison criterion obtained from a weighted combination of the two constrained candidate reference image blocks. The cost is: If m0 > m1,

number

number

[0017] The above formula aims to restrict the variables in the formula so that they do not exceed the maximum value that can be represented in d bits. The above formula specifies a normative process by which the final absolute difference can be performed between the two quantities with a predefined bit depth, thereby preventing possible overflow errors.

[0018] In a possible implementation form of the device according to the second aspect itself, the acquisition module is particularly configured to use a second cost function to determine a position of the constrained candidate reference image block having the smallest cost, and to acquire the improved motion information according to the position of the constrained candidate reference image block having the smallest cost, where the at least two constrained candidate reference image blocks include a set of a first constrained candidate reference image block and a set of a second constrained candidate reference image block, and the second cost function indicates a difference between the first constrained candidate reference image block and the second constrained candidate reference image block. The cost is: If m0 > m1,

number

number

[0019] The above formula defines a normative process by which the final absolute difference can be performed at a predefined bit depth between the two quantities, thereby preventing possible overflow errors.

[0020] The method according to the first aspect of the present disclosure may be performed by an apparatus according to the second aspect of the present disclosure. Further features and implementation forms of the method according to the first aspect of the present disclosure result directly from the functionality of the apparatus according to the third aspect of the present disclosure and its different implementation forms.

[0021] According to a third aspect, the present disclosure relates to an apparatus for coding images of a video sequence, comprising a processor and a memory storing instructions for causing the processor to perform the method according to the first aspect.

[0022] According to a fourth aspect, a computer-readable storage medium is proposed having stored thereon instructions which, when executed, cause one or more processors configured to code images of a video sequence, the instructions causing the one or more processors to perform a method according to the first aspect or any possible embodiment of the first aspect.

[0023] According to a fifth aspect, the present disclosure relates to an encoder comprising an apparatus for coding images of a video sequence according to the second or third aspect.

[0024] According to a sixth aspect, the present disclosure relates to a decoder including an apparatus for coding images of a video sequence according to the second or third aspect.

[0025] According to a seventh aspect, the present disclosure relates to a terminal device including an encoder according to the fifth aspect and a decoder according to the sixth aspect.

[0026] The method or apparatus for coding images of a video sequence provided in the present disclosure constrains the bit depth of sample values ​​of each candidate reference image block prior to refining motion information, thus reducing computational complexity and enabling reduced processing time.

[0027] The accompanying drawings are used to provide a further understanding of the present disclosure, constitute a part of the specification, and are used to explain the present disclosure together with the following specific embodiments, but should not be construed as limiting the present disclosure. [Brief description of the drawings]

[0028] [Figure 1] FIG. 1 is a schematic diagram of decoder-side motion vector derivation (DMVD) based on template matching (TM). [Diagram 2] FIG. 1 is a schematic diagram of DMVD based on bilateral matching (BM). [Diagram 3] FIG. 1 is a schematic diagram of decoder-side motion vector refinement (DMVR) based on bilateral template matching. [Figure 4] 1 is a schematic flow diagram of a method for coding images of a video sequence according to an embodiment of the present disclosure. [Diagram 5] 1 is a schematic flow diagram of a method for coding images of a video sequence according to an embodiment of the present disclosure. [Figure 6] FIG. 2 is a structural diagram of an apparatus for coding images of a video sequence according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0029] In the following description, reference is made to the accompanying drawings which form a part of this disclosure and which show by way of example certain aspects of the disclosed embodiments or in which the disclosed embodiments may be used. It is understood that the disclosed embodiments may be used in other ways and may include structural or logical changes not shown in the drawings. Therefore, the following detailed description should not be taken in a limiting sense, and the scope of the present disclosure is defined by the appended claims.

[0030] For example, it is understood that disclosure related to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, the corresponding device may include one or more units, e.g., functional units, for performing the described one or more method steps (e.g., one unit performing one or more steps, or multiple units each performing one or more of the multiple steps), even if such one or more units are not explicitly described or shown in the figures. On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the function of the one or more units (e.g., one step performing the function of the one or more units, or multiple steps each performing one or more of the functions of the multiple units), even if such one or more steps are not explicitly described or shown in the figures. Furthermore, it is understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other unless expressly stated otherwise.

[0031] Video coding generally refers to the processing of a sequence of pictures that form a video or a video sequence. Instead of the term "picture", the terms "frame" or "image" may be used synonymously in the field of video coding. Video coding as used in this disclosure (or in this disclosure) refers to either video encoding or video decoding. Video encoding is performed at the source side and generally involves processing an original video picture (e.g., by compression) to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and generally involves the reverse processing compared to an encoder to reconstruct a video picture. An embodiment referring to "coding" a video picture (or broadly a picture as described later) is understood to relate to either "encoding" or "decoding" a video sequence. The combination of the encoding and decoding parts is also called a codec (encoding and decoding).

[0032] In the case of lossless video coding, the original video picture can be reconstructed (assuming there is no transmission loss or other data loss during storage or transmission), i.e. the reconstructed video picture has the same quality as the original video picture. In the case of lossy video coding, further compression, e.g. by quantization, is performed to reduce the amount of data representing the video picture, which cannot be completely reconstructed at the decoder, i.e. the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.

[0033] Some video coding standards after H.261 belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each picture of a video sequence is generally partitioned into a set of non-overlapping blocks, and coding is generally performed at the block level. In other words, in an encoder, a video is generally processed, i.e., encoded, at the block (video block) level, for example, by generating a predictive block using spatial (intra-picture) prediction and temporal (inter-picture) prediction, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transform domain to reduce the amount of data to be transmitted (compression), while in a decoder, a reverse process is partially applied to the coded or compressed block compared to the encoder in order to reconstruct the current block for representation. Furthermore, the encoder mimics the decoder's processing loop to process subsequent blocks, ie, to generate both identical predictions (eg, intra- and inter-predictions) and / or reconstructions for coding.

[0034] As used herein, the term "block" may be a portion of a picture or a frame. For ease of explanation, embodiments of the present disclosure are described herein with reference to High-Efficiency Video Coding (HEVC) or Versatile video coding (VVC) reference software developed by the ITU-T Video Coding Experts Group (VCEG) and the Joint Collaboration Team on Video Coding (JCT-VC) of the ISO / IEC Motion Picture Experts Group (MPEG). Those skilled in the art will understand that embodiments of the present disclosure are not limited to HEVC or VVC. It may refer to CUs, PUs, and TUs. In HEVC, a CTU is divided into CUs by using a quadtree structure represented as a coding tree. The decision of whether to code a picture area using inter-picture (temporal) prediction or intra-picture (spatial) prediction is made at the CU level. Each CU may be further divided into one, two, or four PUs according to the PU partition type. Within one PU, the same prediction process is applied, and related information is sent to the decoder based on the PU. After obtaining the residual block by applying the prediction process based on the PU partition type, the CU may be partitioned into transform units (TUs) by another quadtree structure similar to the coding tree for the CU. In the latest development of video compression technology, a quadtree and binary tree (QTBT) partitioning frame is used to partition the coding block. In the QTBT block structure, the CU may have either a square or a rectangular shape. For example, the coding tree unit (CTU) is first partitioned by a quadtree structure. The leaf nodes of the quadtree are further partitioned by a binary tree structure.The leaf nodes of the binary tree are called coding units (CUs), and the segments are used for prediction and transformation processes without any further partitioning. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. In parallel, multi-partitions, such as ternary tree partitions, have also been proposed to be used with the QTBT block structure.

[0035] For clarity, some terms included in this disclosure will first be explained.

[0036] The term "coding" in this disclosure may refer to either encoding or decoding, and is not limited to any of the embodiments of the present disclosure unless otherwise specified.

[0037] The term "current image block" in this disclosure refers to an image block currently being processed; for example, during an encoding process, the current image block may be the image block currently being encoded, while during a decoding process, the current image block may be the image block currently being decoded.

[0038] The term "reference image block" in this disclosure refers to an image block that provides reference information for a current image block, and during the search process, a scanning operation needs to find the best matching reference image block among multiple reference image blocks.

[0039] The term "current image" in this disclosure refers to the image in which the current image block resides. Correspondingly, the term "reference image" in this disclosure refers to the image in which the reference image block resides.

[0040] The term "predictive image block" in this disclosure refers to an image block that provides a prediction for a current image block. For example, a best-matching reference image block may be found among multiple reference image blocks, and the best-matching reference image block may serve as the predictive image block for the current image block.

[0041] The term "motion vector (MV)" in this disclosure refers to a position offset of a reference image block relative to a current image block.

[0042] The "motion information" of an image block in this disclosure refers to information about the motion of the image block, and in some embodiments, the motion information may include two kinds of information, such as an indication of a reference image and a motion vector of a reference image block in the reference image, and in some embodiments, the motion information may only include a motion vector of the reference image block. The content of the motion information is not limited in this disclosure and may vary with a specific application scenario.

[0043] The term "sample values" of an image block refers to the pixel values ​​at the sample points of the image block.

[0044] The terminal device may be any one of the following devices: a smartphone, a mobile phone, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a wireless communication enabled handheld device, a vehicle mounted equipment, a wearable device, a computing device, or any other processing device connected to a wireless modem.

[0045] As can be understood from the above description, motion information needs to be coded and transmitted to the decoder side. There are two main techniques for MV coding, including merge technique and advanced motion vector prediction (AMVP). The principles of these two techniques are the same as those in the prior art, and therefore will not be shown in detail in this document.

[0046] Furthermore, several methods have been proposed for performing the DMVD or DMVR process so that the residual coding bits of the motion vectors can be further reduced.

[0047] A class of methods called template matching (TM) methods that uses an L-shaped region adjacent to the current block already reconstructed (shown in FIG. 1) and identifies the best matching L-shaped region using a cost function such as sum of absolute differences (SAD) or mean-removed sum of absolute differences (MR-SAD) in each reference image (denoted as Ref0 in FIG. 1) using multiple appropriately scaled spatial and temporal motion vector candidates. Further refinements are then performed centered on the best matching candidate within a certain refinement distance around the center. At the encoder side, a rate distortion optimized cost is calculated to decide between uni-prediction (i.e., prediction using the best matching reference) or bi-prediction (prediction derived by averaging the top two best matching references).

[0048] Another class of methods is called BM method. As shown in Fig. 2, the motion information of the current CU is derived by finding the closest match between two blocks along the motion trajectory of the current CU in two different reference images (represented as Ref0 and Ref1 in Fig. 2). Under the assumption of continuous motion trajectory, the motion vectors MV0 and MV1, which point to the two reference blocks Ref0 and Ref1 respectively, are proportional to the temporal distance between the current image and the two reference images, i.e., TD0 and TD1. When the current image is between the two reference images in time and the temporal distance from the current image to the two reference images is the same, the bilateral matching becomes a two-way MV based on mirror.

[0049] In BM merge mode, bi-prediction is always applied since the motion information of a CU is derived based on the closest match between two blocks along the motion trajectory of the current CU in two different reference pictures.

[0050] In some embodiments, the temporal distance is ignored and bilateral matching is performed using equal and opposite motion vectors in past and future reference images, respectively.

[0051] In the variation of the bilateral matching mode, i.e., in the above-mentioned DMVR method, as shown in FIG. 3, first, a two-sided average template is generated using the prediction blocks referenced by the initial MV0 and MV1 in the first candidate reference image block list L0 and the second initial candidate reference image block list L1 obtained from the explicitly signaled merge index (represented as step 1 in FIG. 3), and BM is performed on this template to find the best matching block referenced by the updated MV0' and MV1' (represented as step 2 in FIG. 3). If there is any motion, the template is updated. Also, in some embodiments, a refinement is performed in one reference, and the motion vector in the other reference is obtained by mirroring this refined motion vector. The refinement alternates between the two references until the center position has the smallest error or the maximum number of iterations is reached.

[0052] In some of the refinement methods, refinement at the CU level is performed first. Then, evaluation of multiple candidates at the sub-CU level is performed together with the refined MV at the CU level as candidates. Optionally, each sub-CU can perform its own refinement with respect to the best-matching candidate.

[0053] In a default merge mode, no DMVD is required, while in an explicit merge mode, the merge mode (whether TM or BM merge) may be signaled. In some embodiments, the merge index is not signaled, while in other embodiments, an explicit merge index is signaled to reduce the complexity of decoders that perform multiple motion compensation.

[0054] Given an implicit DMVD or DMVR process, the encoder needs to perform these steps in exactly the same way as the decoder in order for the encoder-side reconstruction to match the decoder-side reconstruction.

[0055] In fact, DMVD does not need a merge index, while DMVR needs a merge index to obtain the initial motion information of the current image block.

[0056] Whenever an explicit merge index is signaled, DMVR starts from the motion vector and reference index estimated according to the norm from the signaled merge index. When an explicit merge mode index is not signaled, it is the case of DMVD, a set of initial motion vector candidates is evaluated in the decoder using a cost function, and the candidate with the lowest cost is selected as the starting point for improvement. Therefore, regardless of whether the method of DMVD is based on TM or BM, there is a search for improvement that needs to be performed around the starting point, which may be a sub-pixel accurate motion vector, by minimizing the difference between equally displaced and oppositely displaced blocks in the first candidate reference image block list L0 and the second candidate reference image block list L1 (usually called BM cost), or based on the difference between the averaged version of the corresponding patch in the first candidate reference image block list L0 and the second candidate reference image block list L1 and the displacement at L0 / L1 (usually called DMVR cost).

[0057] To evaluate the cost function, an interpolation may need to be performed to derive sub-pixel accurate center sample values ​​based on integer position reference image sample values. The interpolation filter can be as simple as a bilinear interpolation filter, or it can be a longer filter, such as a 2-D DCT based separable interpolation filter. To reduce the complexity of repeatedly deriving candidate reference image blocks for the current image block at each position considered during refinement, an integer-pixel distance grid of refinement points centered on sub-pixel accurate positions in the first candidate reference image block list L0 and / or the second candidate reference image block list L1 is proposed in another invention. Thereby, when a new position close to the current best cost position is considered, incremental interpolation only needs to be performed. After the refinement of the integer-pixel distance grid is completed, the best integer difference MV is obtained in relation to the merge MV.

[0058] To further improve the compression gain, sub-pixel distance refinement can be performed. Half-pixel distance refinement requires candidate reference image blocks at half-pixel distance from the best integer distance MV location in the reference image. Sub-pixel accuracy refinement can be performed using BM cost or DMVR cost. When going to quarter-pixel distance and lower sub-pixel accuracy, the interpolation filter required at each location is different because the sub-pixel locations are not in phase. In another application, a parametric error surface is fitted using the costs evaluated at integer distance locations centered on the location with the smallest cost, and the sub-pixel accuracy displacement with the smallest cost is calculated.

[0059] However, there may still be problems of complexity and time consumption regarding the above process. It is known that the bit depth of the reference image is generally in the range of 8 bits to 12 bits. Therefore, during the iterations of the refinement of the integer distance and the evaluation of the cost for calculating the parameters of the error surface described above, the candidate reference image blocks of L0 and L1 are held in buffers. The total storage requirement for these buffers depends on the bit depth of the candidate reference image blocks. In software, for example, a 10-bit value occupies 16 bits of storage to avoid unnecessary packing (into a supported data type) and corresponding unpacking operations. Also, the cost calculation for refinement is generally performed using SAD or a variant of SAD such as MR-SAD, in which the sum of absolute differences is calculated after adjustment for the mean difference between two blocks (at the sample level). The complexity of the cost calculation and the throughput of vector operations (single instruction multiple data (SIMD)) depend on the bit depth of the candidate reference image blocks. For example, in software, 8-bit SAD can be performed in roughly half the cycles it takes to perform 9-16-bit SAD. Also, many smartphone chipsets include hardware engines for encoding and decoding. As part of the encoder hardware engine, those chipsets tend to have 8-bit SAD computation primitives.

[0060] Therefore, taking aim at the above problem, the present disclosure provides a method for coding images of a video sequence in which the bit depth of candidate reference image blocks is constrained, thereby enabling lower buffer size requirements and fewer gates in hardware or higher throughput in terms of cost evaluation, without affecting the bit rate savings brought by decoder-side motion vector improvements. The present disclosure provides a normative method (used on both the encoder and decoder sides) for constraining the bit depth of candidate reference image blocks used in the evaluation of the cost function to a predefined bit depth.

[0061] The embodiments of the present disclosure are described in detail as follows.

[0062] 4 is a schematic flow diagram of a method for coding an image of a video sequence according to an embodiment of the present disclosure, where the image includes a current image block. The method can be implemented by an apparatus for an image of a video sequence at an encoder side or a decoder side. Furthermore, the method can be combined with a DMVD or DMVR process, or any other process for improving the motion information of a current image block, which is not limited in this specification.

[0063] The method includes the following steps. S401: Obtain initial motion information of the current image block.

[0064] First, initial motion information of the current image block may be obtained to determine a candidate reference image block corresponding to the current image block.

[0065] In the DMVD process, as mentioned above, there is no merge index, so a merge candidate list may be constructed based on the motion information of the neighboring blocks of the current image block. Then, a first cost function may be used to determine the motion information with the smallest cost from the merge candidate list as the initial motion information. Here, the merge candidate list may be constructed using an existing method that is not shown in detail in this specification. The first cost function may be one of the following: SAD, MR-SAD, or sum of squared differences (SSD).

[0066] In the DMVR process, as described above, a merge index indicating the best motion information in the merge candidate list is available. Therefore, in this case, the motion information specified by the merge index may be determined as the initial motion information from the merge candidate list, and the merge candidate list may be constructed using an existing method in the same way as in the DMVD process.

[0067] S402: Obtain sample values ​​of at least two candidate reference image blocks corresponding to a current image block according to initial motion information.

[0068] After obtaining the initial motion information of the current image block, at least two candidate reference image blocks may be obtained according to the initial motion information, and the candidate reference image blocks serve as candidates for selection.

[0069] In practice, before obtaining the sample values ​​of at least two candidate reference image blocks corresponding to the current image block, the positions of the at least two candidate reference image blocks should be determined first. As mentioned above, the candidate reference image blocks are in the reference image, so the reference image needs to be identified first.

[0070] In one possible implementation, the initial motion information includes an initial motion vector of the current image block and an indication of a reference image, and thus the reference image may be determined based on the indication, which in some embodiments may be an index of the reference image. In another possible implementation, the initial motion information includes an initial motion vector of the current image block, and the reference image may be a predefined image or based on a predefined algorithm, i.e. an algorithm known to both the encoder side and the decoder side for determining a reference image, for example, the image closest to the current image is the reference image.

[0071] In an embodiment, the positions of at least two candidate reference image blocks may be determined according to the initial motion information and the position of the current image block. For example, the initial candidate reference image block may be determined as a starting point based on the initial motion vector and the position of the current image block. Then, the positions of the candidate reference image blocks may be determined based on a search step, which may be predefined according to actual requirements and may be sub-pixel accurate. For example, if the search step is equal to 1, then the candidate reference image blocks may be obtained by moving the initial candidate reference image block by a distance of one pixel in different directions. At least two candidate reference image blocks may be obtained by moving iteratively according to the search step. Also, a search range may be predefined, and thus a reference image block within the predefined search range may be determined as the candidate reference image block.

[0072] Then, after determining the position of each candidate reference image block, sample values ​​of these candidate reference image blocks may be further determined based on the position. Only sample values ​​of integer pixel positions of the reference image may be known. For each candidate reference image block, if the sample values ​​of the candidate reference image block are available, i.e., the sample values ​​of this candidate reference image block can be obtained from the sample values ​​of the reference image, this may be the case when the sample points of said candidate reference image block are at integer pixel positions of the reference image, and thus the sample values ​​of the candidate reference image block may be obtained by simply copying the sample values ​​of the reference image. Otherwise, i.e., if the sample values ​​of the candidate reference image block are unavailable, an interpolation operation may be performed to determine these unavailable sample values ​​in order to obtain the sample values ​​of the candidate reference image block. The interpolation operation may be performed using any existing method and will not be shown in detail in this specification. For example, given the position of the current image block, a bilinear interpolation may be performed to obtain sample values ​​of integer distance positions within a predefined search range.

[0073] S403: Constrain the bit depth of the sample values ​​of each candidate reference image block to a predefined bit depth.

[0074] As mentioned above, the bit depth of the candidate reference image blocks may affect the overall processing speed and complexity, and therefore it is better to constrain the bit depth of the sample values ​​of each candidate reference image block before performing motion information refinement.

[0075] It should be noted that for each candidate reference image block, the bit depth of the sample values ​​is the same and the bit depth of the reference image, i.e. the reference image in which the candidate reference image block is located, may also be the bit depth of the sample values ​​of each candidate reference image block. Thus, constraining the bit depth of the sample values ​​of each candidate reference image block to a predefined bit depth is intended to constrain the bit depth of each sample value of each candidate reference image block to the predefined bit depth.

[0076] In an embodiment, the constraint may be realized by performing a right shift of an amount of (bd) on the bit depth of the sample value of each candidate reference image block, where b is the bit depth of the sample value of the candidate reference image block, d is a predefined bit depth, and b is greater than d. Those skilled in the art will understand that the value of d can be selected according to actual requirements.

[0077] Interpolation generally refers to performing the following operations to derive sample values ​​after Q-format adjustment resulting from the weights of the interpolation filters:

number

number

[0078] Assuming that b is the bit depth of the sample values ​​of the first candidate reference image block and d is a predefined bit depth (less than b), then the bit depth constrained sample values ​​are derived as follows: L' = L >> (b - d) (2) where L' is the constrained sample value of the candidate reference image block. Any right shift required by the interpolation process (from the increased internal bit depth required during 2-D interpolation) may be combined with this right shift.

[0079] The bit depth constraint process can then be combined as follows:

number

[0080] For example, if b is 10 bits and d is 8 bits, then after constraining the bit depth to 8 bits, when the 10 bits are stored in a 16-bit data type, the buffer size for the 10-bit data is reduced by half. Otherwise, the buffer size requirement is reduced by 20%. By using byte-wise SIMD operations on the software platform, the number of cycles for evaluating the cost function can be halved. On the hardware platform, the cost evaluation operation can use 20% fewer bit planes, which results in reduced gate count and area.

[0081] S404: Obtain refined motion information based on constrained sample values ​​of at least two constrained candidate reference image blocks.

[0082] After the constraining operation of S403, improved motion information may be obtained based on the constrained sample values ​​of at least two constrained candidate reference image blocks, where the term "constrained candidate reference image blocks" refers to candidate reference image blocks having constrained sample values.

[0083] In an embodiment, a second cost function may be used to determine the position of the constrained candidate reference image block having the smallest cost, and then the improved motion information may be obtained according to the position of the constrained candidate reference image block. The second cost function is one of SAD, MR-SAD, or SSD.

[0084] In the TM-based DMVD process, the second cost function may indicate the difference between the template of the constrained candidate reference image block (the L-shaped region of Ref0 shown in FIG. 1) and the template of the current image block (the L-shaped region of the current image shown in FIG. 1), where the template actually serves as the comparison reference.

[0085] In the BM-based DMVD process, there is no template, and the second cost function may indicate the difference between two candidate reference image blocks.

[0086] For the case of DMVR, a detailed description may be given in the following section.

[0087] As described in S402, if the initial motion information includes both an initial MV and an indication of a reference picture, the refined motion information may also include an refined MV and an indication of a reference picture.

[0088] S405: Determine a prediction image block of the current image block according to the improved motion information.

[0089] As long as improved motion information is obtained, a predicted image block of the current image block may be determined using the determined reference image.

[0090] In an embodiment, the initial motion information includes the initial motion vector of the current image block, and in this case, the improved motion information also includes the improved motion vector of the current image block. As already described in S402, the reference image may be a reference image that is predefined or obtained based on a predefined algorithm, and thus the predicted image block of the current image block may be determined according to the improved motion vector and the reference image.

[0091] In another embodiment, the initial motion information includes an initial motion vector and an indication of a reference image, in which case the improved motion information also includes an improved motion vector and an indication of a reference image for the current image block, and thus a predicted image block for the current image block may be determined according to the improved motion vector and the indication of the reference image.

[0092] It should be noted that although the terms in this specification are expressed using the singular form in this specification, a person skilled in the art would know without any creative effort that if the method is combined with an improvement process in which several reference images are used for prediction, then the corresponding terms may represent multiple elements, for example, if the method is combined with an improvement process based on BM, the initial vector may include two initial MVs and there may be two reference images.

[0093] The present disclosure provides a method for coding an image of a video sequence, in which initial motion information of a current image block is obtained, sample values ​​of at least two candidate reference image blocks corresponding to the current image block are obtained according to the initial motion information, and the bit depth of the sample values ​​of each candidate reference image block is constrained to a predefined bit depth, and then improved motion information is obtained based on the sample values ​​of the at least two constrained candidate reference image blocks, and a predicted image block of the current image block is determined according to the improved motion information. Since the bit depth of the sample values ​​of each candidate reference image block is constrained before the improvement of the motion information, thus reducing the calculation complexity and enabling the reduction of the processing time.

[0094] In order to more clearly detail the method of the present disclosure, hereinafter, the BM-based DMVR process is taken as an example, and the method is described in more detail in combination with the BM-based DMVR process.

[0095] 5 is a schematic flow diagram of a method for coding images of a video sequence according to an embodiment of the present disclosure. The method includes the following steps: S501: Obtain initial motion information of the current image block.

[0096] The explanation of S401 may be referred to.

[0097] Furthermore, in this embodiment, the initial motion information includes an indication of a first initial motion vector and a second initial motion vector and two reference images, the two reference images including a first reference image corresponding to the first initial motion vector and a second reference image corresponding to the second initial motion vector.

[0098] S502: Obtain a first initial reference image block and a second initial reference image block based on initial motion information and the position of the current image block.

[0099] For example, the first and second reference images may be obtained based on the indication, which may be the indexes of the two reference images respectively. Then, the first initial reference image block may be obtained according to the first initial motion vector and the position of the current image block, and similarly, the second initial reference image block may be obtained according to the second initial motion vector and the position of the current image block.

[0100] S503: The template of the current image block is obtained.

[0101] For example, the template may be a weighted combination of the first initial reference image block and the second initial reference image block, where the weight may be selected according to actual requirements and is not limited in this specification.

[0102] This step is optional, as later cost evaluation by the cost function may be calculated in a directed manner based on reference image blocks rather than using a template.

[0103] S504: Obtain sample values ​​of a set of first candidate reference image blocks and a set of second candidate reference image blocks corresponding to the current image block.

[0104] The first candidate reference image block may be in the reference images in list L0 and may also be called a forward candidate reference image block, and the second candidate reference image block may be in the reference images in list L1 and may also be called a backward candidate reference image block.

[0105] For both the first and second candidate reference image blocks, reference may be made to the description of S402 for obtaining their sample values.

[0106] To illustrate how the interpolation should be performed, an example is briefly described.

[0107] Let the current image block be located at (x, y) and have a dimension of W*H, where W is the width of the current image block and H is the height of the current image block. The first reference image is denoted as L0 and the second reference image is denoted as L1. The first and second initial motion vectors are denoted as MV0 and MV1, respectively, where MV0 and MV1 are sub-pixel accurate motion vectors.

[0108] First, sub-pixel offsets FMV0 and FMV1 and integer parts IMV0 and IMV1 may be derived from the first and second initial motion vectors, where FMV0 and FMV1 are the fractional parts of the first and second initial motion vectors, respectively, while IMV0 and IMV1 are the integer parts of the first and second initial motion vectors, respectively.

[0109] An interpolation operation may then be performed using the sub-pixel phase for each integer distance pixel location required within the search range in the two reference images L0 and L1.

[0110] S505: Constrain the bit depth of the sample values ​​of each first candidate reference image block to a predefined bit depth, and constrain the bit depth of the sample values ​​of each second candidate reference image block to a predefined bit depth.

[0111] For example, in this embodiment, the bit depth of each first candidate reference image block may be constrained to the desired bit depth by performing a right shift (with or without rounding) by an amount equal to the difference between the bit depth of the first reference image and the desired bit depth. A similar operation may be performed to constrain the bit depth of each second candidate reference image block.

[0112] In particular, the sample values ​​of the first and second candidate reference image blocks may be constrained simultaneously or in any order, which is not limited herein.

[0113] S506: Use the second cost function to determine a first location of a first constrained candidate reference image block having the smallest cost.

[0114] For example, a second cost function may be used to determine a first position of the first improved motion vector, where the second cost function indicates a difference between the first constrained candidate reference image block and a template of the current image block, and the bit depth of the sample values ​​of the template is also constrained to a predefined bit depth.

[0115] Thus, the difference between the template and each first constrained candidate reference image block may be calculated, and a first position of the first constrained reference image block having the smallest difference may be determined.

[0116] Here, the cost may be calculated as follows: If m0 > m1,

number

number

[0117] The above formula aims to restrict the variables in the formula so that they do not exceed the maximum value that can be represented in d bits. The above formula specifies a normative process by which the final absolute difference can be performed between the two quantities with a predefined bit depth, thereby preventing possible overflow errors.

[0118] S507: Determine a second position of a second constrained candidate reference image block using a second cost function.

[0119] Similarly, the difference between the template and each second constrained candidate reference image block may be calculated, and the second constrained reference image block having the smallest difference may be selected from the set of second constrained candidate reference image blocks, where the cost may also be calculated in a manner similar to S506.

[0120] In particular, S506 and S507 may be performed simultaneously or in any order, which is not limited herein.

[0121] S508: Determine a prediction image block of the current image block according to the improved motion information.

[0122] For example, the refined motion information may be obtained according to a first position of a first constrained reference image block and a second position of a second constrained reference image block.

[0123] Moreover, as mentioned above, S503 may be an optional step.Indeed, in the above example, the cost is calculated based on the template, which is in fact the DMVR cost mentioned above.

[0124] It is also possible to evaluate the BM cost instead of the DMVR cost. In this case, S503 is omitted. Also, in S507 and S508, the second cost function indicates the difference between the first constrained candidate reference image block and the second constrained candidate reference image block, so the cost may be calculated as follows: If m0 > m1,

number

Number

[0125] The above formula aims to limit the variables in the formula so that they do not exceed the maximum value that can be represented in d bits. It can be understood that the above formula actually aims to constrain the value of (I0(i, j) - MIN((1<<d) - 1, (I1(i, j) + (m0 - m1)) or, in other cases, (m1 - m0))) - I1(i, j) when m0 > m1. In fact, this works to prevent the value from overflowing when stored in the buffer.

[0126] The above formula can be executed with a predefined bit depth between the final absolute differences of two quantities, thereby defining a normalized process to prevent possible overflow errors.

[0127] Even after constraining the bit depth of each candidate reference image block to a predefined bit depth d as in the embodiment shown in Figure 4, the value at which the absolute is performed may exceed d when MS-SAD is used. This requires one more bit in hardware implementation, but can have a double throughput impact in software SIMD (e.g., a 9-bit absolute difference has half the throughput of an 8-bit absolute difference). Also, if the whole process is to be normative, the bit depth in the case of MR-SAD needs to be clearly specified as well to prevent misalignment between the encoder and decoder implementations.

[0128] The present disclosure provides a method for coding an image of a video sequence, which is combined with a DMVR process based on BM. Wherein, initial motion information of a current image block is obtained, sample values ​​of at least two candidate reference image blocks corresponding to the current image block are obtained according to the initial motion information, and the bit depth of the sample values ​​of each candidate reference image block is constrained to a predefined bit depth, and then improved motion information is obtained based on the sample values ​​of the at least two constrained candidate reference image blocks, and a predicted image block of the current image block is determined according to the improved motion information. Since the bit depth of the sample values ​​of each candidate reference image block is constrained before the improvement of the motion information, thus reducing the computational complexity and enabling the reduction of processing time.

[0129] 6 is a structural diagram of an apparatus for coding an image of a video sequence according to an embodiment of the present disclosure, where the image includes a current image block, and the apparatus includes an acquisition module 601, a constraint module 602, and a decision module 603.

[0130] The obtaining module 601 is configured to obtain initial motion information of a current image block.

[0131] The obtaining module 601 is further configured to obtain sample values ​​of at least two candidate reference image blocks corresponding to the current image block according to the initial motion information; The constraint module 602 is configured to constrain the bit depth of the sample values ​​of each candidate reference image block to a predefined bit depth; The obtaining module 601 is further configured to obtain improved motion information based on the constrained sample values ​​of the at least two constrained candidate reference image blocks; The determination module 603 is configured to determine a prediction image block of the current image block according to the refined motion information.

[0132] In an embodiment, the constraint module 602 is specifically configured to perform a right shift by an amount of (bd) on the bit depth of the sample values ​​of each candidate reference image block, where b is the bit depth of the sample values ​​of each candidate reference image block, d is a predefined bit depth, and b is greater than d.

[0133] In an embodiment, the acquisition module 601 is specifically configured to use a first cost function to determine motion information having the smallest cost as initial motion information from a merging candidate list, where the merging candidate list includes motion information of neighboring blocks of the current image block.

[0134] In an embodiment, the obtaining module 601 is specifically configured to determine the motion information identified by the merge index as the initial motion information from the merge candidate list, where the merge candidate list includes the motion information of the neighboring blocks of the current image block.

[0135] In an embodiment, the acquisition module 601 is particularly configured to determine a position of a candidate reference image block according to initial motion information and a position of a current image block, determine whether a sample value of the candidate reference image block is available based on the position of the candidate reference image block, and perform an interpolation operation to obtain the sample value of the candidate reference image block if the sample value of the candidate reference image block is unavailable.

[0136] In an embodiment, the acquisition module 601 is specifically configured to use a second cost function to determine a position of a constrained candidate reference image block having the smallest cost, and to acquire improved motion information according to the position of the constrained candidate reference image block having the smallest cost.

[0137] In an embodiment, the second cost function indicates the difference between the constrained candidate reference image block and a template of the current image block, the template being obtained based on initial motion information and the position of the current image block, and the bit depth of the sample values ​​of the template is constrained to a predefined bit depth.

[0138] In an embodiment, the cost is calculated as follows: If m0 > m1,

number

number

[0139] In an embodiment, the at least two constrained candidate reference image blocks include a set of first constrained candidate reference image blocks and a set of second constrained candidate reference image blocks, and the acquisition module 601 is specifically configured to: acquire a first initial reference image block according to the first initial motion information and the position of the current image block; acquire a second initial reference image block according to the second initial motion information and the position of the current image block; calculate a weighted combination of the first initial reference image block and the second initial reference image block as a template; calculate the difference between the template and each first constrained candidate reference image block, and determine the position of the first constrained reference image block having the smallest difference; calculate the difference between the template and each second constrained candidate reference image block, and determine the position of the second constrained reference image block having the smallest difference. Here, the determination module 603 is specifically configured to acquire improved motion information according to the first position and the second position.

[0140] In an embodiment, the at least two constrained candidate reference image blocks include a set of first constrained candidate reference image blocks and a set of second constrained candidate reference image blocks, and the second cost function indicates a difference between the first constrained candidate reference image blocks and the second constrained candidate reference image blocks.

[0141] In an embodiment, the cost is calculated as follows: If m0 > m1,

number

number

[0142] In an embodiment, the initial motion information includes an improved motion vector of the current image block, and the determination module 603 is specifically configured to determine a predicted image block of the current image block according to the improved motion vector and a reference image, where the reference image is a predefined image or is obtained based on a predefined algorithm.

[0143] In an embodiment, the initial motion information includes an improved motion vector and an indication of a reference image of the current image block, and the determination module 603 is specifically configured to determine a predicted image block of the current image block according to the improved motion vector and the indication of the reference image.

[0144] The apparatus for coding images of a video sequence provided in the present disclosure constrains the bit depth of sample values ​​of each candidate reference image block prior to refining motion information, thus reducing computational complexity and enabling reduced processing time.

[0145] The present disclosure also provides an apparatus for coding images of a video sequence, comprising a processor and a memory, the memory storing instructions for causing the processor to carry out a method according to the method described above.

[0146] The present disclosure also provides a computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors configured to code images of a video sequence, the instructions causing the one or more processors to perform the methods described above.

[0147] The present disclosure also provides an encoder comprising an apparatus for coding images of a video sequence according to the above embodiments.

[0148] The present disclosure also provides a decoder including a device for coding images of a video sequence according to the above embodiments.

[0149] The present disclosure also provides a terminal device including the above-mentioned encoder and the above-mentioned decoder.

[0150] Terms such as "first," "second," and the like in the specification and claims of this disclosure and in the drawings are intended to distinguish between different things and are not intended to define a particular order.

[0151] Terms such as "and / or" in the embodiments of the present disclosure are only used to indicate an association between related things and indicate that there may be a three-way relationship, for example, A and / or B may indicate the presence of A only, both A and B, and B only.

[0152] The terms "a" or "an" are not intended to designate one or a single element; rather, the terms "a" or "an" may be used to refer to multiple elements where appropriate.

[0153] In the embodiments of the present disclosure, phrases such as "exemplary" or "for example" are used to indicate an explanation of an example or case. In the embodiments of the present disclosure, any embodiment or design manner described as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or design manners. In particular, the use of "exemplary" or "for example" is intended to present the relevant concept in a particular manner.

[0154] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or a communication medium, which includes any medium that facilitates transfer of a computer program from one place to another, for example via a communication protocol. Thus, generally, the computer-readable medium may correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0155] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium usable to store desired program code in the form of instructions or data structures and accessible by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if the instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio wave, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio wave, and microwave are included in the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks usually reproduce data magnetically while discs reproduce data optically using a laser. Combinations of the above should also be included within the scope of computer-readable media.

[0156] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the above structures or any other structures suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided in dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Also, the techniques may be implemented entirely in one or more circuits or logic elements.

[0157] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to highlight aspects of the functionality of devices configured to perform the disclosed techniques, but do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or provided by a collection of interoperable hardware units including one or more processors as described above in conjunction with suitable software and / or firmware. [Explanation of symbols]

[0158] 601 Acquisition Module 602 Constraint Module 603 Decision Module

Claims

1. 1. An encoder comprising an apparatus for coding an image of a video sequence, the image comprising a current image block, the apparatus comprising: an acquisition module configured to acquire initial motion information of the current image block, The acquisition module is further configured to acquire constrained sample values ​​of at least two reference image blocks corresponding to the current image block according to the initial motion information, the at least two reference image blocks including a first reference image block and a second reference image block, the first reference image block corresponding to a first reference image, and the second reference image block corresponding to a second reference image; The constrained sample values ​​are obtained by constraining a bit depth of the sample values ​​of each reference image block to a predefined bit depth, and constraining the bit depth of the sample values ​​of each reference image block to a predefined bit depth includes constraining a bit depth of the sample values ​​of the first reference image block to a predefined bit depth and constraining a bit depth of the sample values ​​of the second reference image block to a predefined bit depth; an acquisition module, the acquisition module being further configured to acquire improved motion information based on the constrained sample values ​​of at least two reference image blocks, the constrained sample values ​​of the at least two constrained reference image blocks including constrained sample values ​​of the first reference image block and constrained sample values ​​of the second reference image block; a determination module configured to determine a prediction image block of the current image block according to the improved motion information; Including, an encoder.

2. The acquisition module:

2. The encoder of claim 1, configured to perform a right shift on the bit depth of the sample values ​​of each reference image block by an amount of (bd), where b is the bit depth of the sample values ​​of each reference image block, d is the predefined bit depth, and b is greater than d.

3. To obtain the initial motion information of the current image block, the obtaining module:

3. The encoder of claim 1 or 2, further comprising: a first cost function for determining, as the initial motion information, the motion information having the smallest cost from a merge list, the merge list including motion information of neighboring blocks of the current image block.

4. To obtain the initial motion information of the current image block, the obtaining module:

3. An encoder according to claim 1 or 2, specifically configured to determine motion information identified by a merge index from a merge list as the initial motion information, the merge list comprising motion information of neighbouring blocks of the current image block.

5. The sample values ​​of at least two reference image blocks corresponding to the current image block are calculated by the following steps: determining a position of a reference image block according to the initial motion information and the position of the current image block; determining whether the sample values ​​of the reference image block are available based on the position of the reference image block, and if the sample values ​​of the reference image block are unavailable, performing an interpolation operation to obtain the sample values ​​of the reference image block; 5. The encoder of claim 1 , wherein the encoder is obtained by:

6. To obtain improved motion information based on constrained sample values ​​of the at least two constrained reference image blocks, the obtaining module: using a second cost function to determine the location of the reference image block having the smallest cost; Obtain the refined motion information according to the position of the reference image block having the smallest cost. An encoder according to any one of claims 1 to 5, specifically adapted for:

7. 7. The encoder of claim 6, wherein the second cost function indicates a difference between a reference image block and a template of the current image block, the template being obtained based on the initial motion information and a position of the current image block, and a bit depth of the sample values ​​of the template being constrained to the predefined bit depth.

8. 7. The encoder of claim 6, wherein the at least two reference image blocks include a set of first reference image blocks and a set of second reference image blocks, and the second cost function indicates a difference between the first reference image blocks and the second reference image blocks.

9. the refined motion information comprises a refined motion vector of the current image block; To determine the predicted image block of the current image block, the determination module:

9. The encoder of claim 1 , configured to determine the predicted image block of the current image block according to the improved motion vector and a reference image, the reference image being a predefined image or being obtained based on a predefined algorithm.

10. the refined motion information comprises an refined motion vector of the current image block and an indication of a reference image; To determine a predicted image block of the current image block, the determination module:

9. An encoder according to claim 1, configured to determine the prediction image block of the current image block according to the refined motion vector and the indication of the reference image.

11. 4. The encoder of claim 3, wherein the first cost function is one of sum of absolute differences (SAD), mean subtracted sum of absolute differences (MR-SAD), or sum of squared differences (SSD).

12. 9. The encoder of claim 6, wherein the second cost function is one of a sum of absolute differences (SAD), a mean subtracted sum of absolute differences (MR-SAD), or a sum of squared differences (SSD).

13. 13. An encoder as claimed in claim 1, wherein the reference image block refers to the reference image block having constrained sample values.

Citation Information

Patent Citations

  • Bit depth reduction techniques for low complexity image patch matching

    US20140212046A1

  • Method and apparatus of pattern-based motion vector derivation for video coding

    WO2017157281A1