Moving Image Processing Method, Video Processing Apparatus, and Bitstream Generation Method
By sequentially scanning a reduced number of motion vector candidates to determine a reference motion vector, the complexity of the ATMVP technology in video coding is reduced, maintaining performance gains and improving efficiency in motion vector prediction.
Patent Information
- Application Number
- JP2024122098
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-08-31
- Filing Date
- 2024-07-29
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2038-09-25
AI Technical Summary
The current advanced/alternative temporal motion vector prediction (ATMVP) technology in video coding is complex and inefficient in determining motion vectors, particularly in the process of scanning motion vector candidates to obtain a temporal domain vector.
The proposed method reduces the complexity of ATMVP by sequentially scanning only N motion vector candidates out of M, where N is smaller than M, to determine a reference motion vector, and then uses this reference motion vector to construct the motion vector candidate list for the current image block.
This approach simplifies the redundant operations in the conventional ATMVP technology while maintaining the performance gains, reducing the number of scans required to obtain the reference motion vector and thereby improving efficiency.
Smart Images

Figure 0007687554000001 
Figure 0007687554000002 
Figure 0007687554000003
Abstract
Description
Technical Field
[0001] Copyright Notice The content disclosed in this patent document includes materials subject to copyright protection. The copyright is owned by the copyright owner. The copyright owner will raise no objections to any reproduction by anyone of these patent documents or patent disclosures, provided that it is as shown in the official records or files of the Patent Office.
[0002] This application relates to the field of video coding, and more particularly, to a method and apparatus for obtaining motion vectors of video.
Background Art
[0003] Currently, in the main standard specifications for video coding, block-based motion compensation techniques are adopted in the inter-frame prediction part. The main principle is to search for the most similar block in the already encoded images for the current image block, and this process is called motion compensation. For example, for an image of one frame, first, it is divided into coding regions (Coding Tree Units, CTUs) of the same size, such as 64×64 or 128×128. Each CTU can be further divided into square or rectangular coding units (Coding Units, CUs). Each CU searches for the most similar block in the reference frame (usually the reconstructed frame near the temporal region of the current frame) as the predicted block of the current CU. The relative displacement between the current block (i.e., the current CU) and the similar block (i.e., the predicted block of the current CU) is called the motion vector (Motion Vector, MV). The process of searching for the most similar block as the predicted block of the current block in the reference frame is motion compensation.
[0004] In the current technology, usually, based on the motion vectors of the encoded neighboring blocks of the current CU, a motion vector candidate list for the current CU is constructed, which is also called the merge candidate list. From the merge candidate list, one optimal candidate motion vector is selected as the motion vector of the current CU, and the predicted block of the current CU is determined based on the motion vector of the current CU.
[0005] Advanced / Alternative temporal motion vector prediction (ATMVP) is a motion vector prediction mechanism. The basic idea of the ATMVP technology is to perform motion compensation by obtaining the motion information of multiple sub-blocks within the current CU. The ATMVP technology introduces the motion information of multiple sub-blocks within the current CU as candidates in the construction of the candidate list (for example, the merge candidate list or the Advanced Motion Vector Prediction (AMVP) candidate list). The realization of the ATMVP technology can be roughly divided into two steps. In step 1, by scanning the candidate list of the current CU, one temporal domain vector is determined. In step 2, the current CU is divided into N×N (N is 4 by default) sub-blocks (sub-CUs), and based on the temporal domain vector obtained in step 1, the corresponding blocks within the reference frame of each sub-block are determined, and based on the motion vectors of the corresponding blocks within the reference frame of each sub-block, the motion vectors of each sub-block are determined.
[0006] In step 1 of the current ATMVP technology, there is room for improvement in the process of determining the temporal domain vector by scanning the candidate list of the current CU. Summary of the Invention
[0007] This application provides a method and apparatus for obtaining motion vectors of moving images that can reduce the complexity of the ATMVP technology while maintaining the performance gains of the conventional ATMVP technology.
[0008] The first aspect provides a method for obtaining a motion vector of a moving image. The method includes obtaining M motion vector candidates to be included in a motion vector candidate list of a current image block; sequentially scanning N motion vector candidates smaller than M among the M motion vector candidates, and determining a reference motion vector based on a scanning result; determining motion vector candidates to be subsequently included in the motion vector candidate list based on the reference motion vector, the current image block, and a reference image of the current image block; and determining a motion vector of the current image block based on the motion vector candidate list.
[0009] In the solution provided by the present application, in the process of obtaining a reference motion vector of a current image block, only N (N is smaller than M) motion vector candidates among the M motion vector candidates that have already been obtained are sequentially scanned, so that the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced compared with the prior art. It should be understood that by applying the solution provided by the present application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0010] The second aspect provides a method for obtaining a motion vector of a moving image. The method includes obtaining M motion vector candidates to be included in a motion vector candidate list of a current image block; sequentially scanning at least some of the M motion vector candidates, and determining a reference motion vector of the current image block based on a scanning result; dividing the current image block into a plurality of sub-image blocks fixed to pixels with a size of 64 or more; determining associated blocks of the sub-image blocks in a reference image of the current image block based on the reference motion vector; and determining motion vector candidates to be subsequently included in the motion vector candidate list based on motion vectors of the associated blocks.
[0011] In the technical solution provided by the present application, the size of the sub-image block of the current image block is fixed to 64 or more pixels, and it is not necessary to store the information on the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0012] The third aspect provides an apparatus for processing a moving image, the apparatus including an acquisition unit used to acquire M motion vector candidates to be included in a motion vector candidate list of a current image block, and a determination unit used to sequentially scan N motion vector candidates among the M motion vector candidates and determine a reference motion vector based on a scanning result, where N is smaller than M. The determination unit is further used to determine motion vector candidates to be subsequently included in the motion vector candidate list based on the reference motion vector, the current image block, and a reference image of the current image block. The determination unit is further used to determine a motion vector of the current image block based on the motion vector candidate list.
[0013] The fourth aspect provides an apparatus for processing a moving image, the apparatus including an acquisition unit used to acquire M motion vector candidates to be included in a motion vector candidate list of a current image block, a determination unit used to sequentially scan at least some of the M motion vector candidates and determine a reference motion vector of the current image block based on a scanning result, and a division unit used to divide the current image block into a plurality of sub-image blocks with a size of 64 or more pixels. The determination unit is further used to determine a related block of the sub-image block in the reference image of the current image block based on the reference motion vector. The determination unit is further used to determine motion vector candidates to be subsequently included in the motion vector candidate list based on the motion vector of the related block.
[0014] A fifth aspect provides a moving image processing method, the method including: obtaining M neighboring blocks of a current image block; sequentially scanning N neighboring blocks smaller than M among the M neighboring blocks, and determining a target neighboring block based on a scanning result; determining a related block of the current image block based on a motion vector of the target neighboring block, the current image block, and a reference image of the current image block; and encoding / decoding the current image block based on the motion vector of the related block.
[0015] In the solution provided by the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is smaller than M) neighboring blocks among the already obtained M neighboring blocks are sequentially scanned, and compared with the prior art, the number of scans for neighboring block candidates in the process of obtaining the target neighboring block of the current image block can be reduced, thereby reducing complexity.
[0016] A sixth aspect provides a moving image processing method, the method including: obtaining M neighboring blocks of a current image block; sequentially scanning at least some of the M neighboring blocks, and determining a target neighboring block based on a scanning result; dividing the current image block into a plurality of sub-image blocks with a size fixed to 64 or more pixels; determining a related block of the current image block in a reference image of the current image block based on the motion vector of the target neighboring block and the sub-image blocks; and encoding / decoding the current image block based on the motion vector of the related block.
[0017] In the solution provided by the present application, the size of the sub-image blocks of the current image block is fixed to 64 or more pixels, and it is not necessary to store information on the size of the sub-image blocks of the previous encoded image blocks. Therefore, storage space can be saved.
[0018] A seventh aspect provides an apparatus for processing a moving image, the apparatus including: an acquisition unit used to acquire M neighboring blocks of a current image block; a determination unit that sequentially scans N neighboring blocks, which are less than M among the M neighboring blocks, and determines a target neighboring block based on a scanning result, and further determines a related block of the current image block based on a motion vector of the target neighboring block, the current image block, and a reference image of the current image block; and an encoding / decoding unit used to encode / decrypt the current image block based on the motion vector of the related block.
[0019] An eighth aspect provides an apparatus for processing a moving image, the apparatus including: an acquisition unit used to acquire M neighboring blocks of a current image block; a determination unit that sequentially scans at least some of the M neighboring blocks and determines a target neighboring block based on a scanning result, and further determines a related block of the current image block in a reference image of the current image block based on a motion vector of the target neighboring block and a sub-image block thereof; a division unit used to divide the current image block into a plurality of sub-image blocks with a size fixed to 64 or more pixels; and an encoding / decoding unit used to encode / decrypt the current image block based on the motion vector of the related block.
[0020] A ninth aspect provides an apparatus for processing a moving image, the apparatus including a memory and a processor. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. By executing the instructions stored in the memory, the processor is caused to execute the method provided in the first aspect, the second aspect, the fifth aspect, or the sixth aspect.
[0021] The tenth aspect provides a chip having a processing module and a communication interface, where the processing module is used to control the communication interface to communicate with the outside, and the processing module is used to implement the method provided in the first aspect, the second aspect, the fifth aspect, or the sixth aspect.
[0022] The eleventh aspect provides a computer-readable storage medium storing a computer program, where when the computer program is executed by a computer, the computer is caused to implement the method provided in the first aspect, the second aspect, the fifth aspect, or the sixth aspect.
[0023] The twelfth aspect provides a computer program product including instructions, where when the instructions are executed by a computer, the computer is caused to implement the method provided in the first aspect, the second aspect, the fifth aspect, or the sixth aspect.
Brief Description of Drawings
[0024]
Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Embodiments for Carrying Out the Invention
[0025] To facilitate understanding of the following description, the motion vector is interpreted here. The motion vector of one image block can include two pieces of information: 1) the image pointed to by the motion vector, and 2) the displacement. The motion vector of one image block means an image block having the displacement and the image block in the image pointed to by the motion vector. For an encoded / decoded image block, the meaning of its motion vector includes the reference image of the encoded / decoded image block and the displacement of the reference block of the encoded / decoded image block with respect to the encoded / decoded image block. Note that the reference block of one image block described here means the image block used to calculate the residual of the image block.
[0026] FIG. 1 is a schematic flowchart of a method for obtaining a moving image motion vector provided by an embodiment of the present application. The method includes the following steps.
[0027] S110. Obtain M motion vector candidates to be included in the motion vector candidate list of the current image block.
[0028] The current image block is an image block to be encoded (or decoded). The image frame in which the current image block is located is called the current frame.
[0029] For example, the current image block is one coding unit (CU).
[0030] For example, the motion vector candidate list of the current image block may be a Merge candidate list or an AMVP candidate list.
[0031] It should be understood that the motion vector candidate list may have another name.
[0032] The M motion vector candidates may be determined based on the motion vectors of M neighboring blocks within the current frame of the current image block. The neighboring blocks may be image blocks adjacent to the position of the current image block in the current frame or having a certain position pitch. Note that these M neighboring blocks should be understood as coded (or decoded) image blocks within the current frame.
[0033] As an example, as shown in FIG. 2, the M neighboring blocks of the current image block are the four positions A 1 (left) → B 1 (up) → B 0 (upper right) → A 0 (lower left) located image blocks. The motion vectors of the image blocks at these four positions are used as the M (i.e., M is equal to 4) motion vector candidates of the current image block.
[0034] As one possible embodiment, after step S110 is completed, the M motion vector candidates have already been put into the motion vector candidate list. In step S120, the motion vector candidate list can be directly scanned.
[0035] In S120, N motion vector candidates out of the M motion vector candidates are sequentially scanned, and based on the scanning results, a reference motion vector is determined, where N is smaller than M.
[0036] Based on the scanning results of N motion vector candidates, the process of determining the reference motion vector may be a process of sequentially determining the N motion vector candidates based on preset conditions and then determining the reference motion vector based on the determination results.
[0037] As an example, the definition of the preset condition is that the reference frame pointed to by the motion vector candidate is the same as the reference image of the current image block.
[0038] Here, the reference image of the current image block is the reference image with the closest temporal distance to the image where the current image block is located, or the reference image of the current image block is a preset reference image on the encoding side and the decoding side, or the reference image of the current image block is the reference image specified in the moving picture parameter set, sequence header, sequence parameter set, picture header, picture parameter set, slice header.
[0039] For example, the reference image of the current image block is the co-located frame of the current image block, and the co-located frame is a frame for obtaining and predicting the motion information set in the information header at the slice level. In some application scenarios, the co-located frame is also called a collocated picture.
[0040] It should be understood that according to the evolution of future technologies, this preset condition may give other different definitions, and the corresponding solutions also fall within the protection scope of this application.
[0041] Hereinafter, the process of determining the reference motion vector based on the scanning results of N motion vector candidates will be described in detail.
[0042] In step S120, only N of the M motion vector candidates obtained in step S110 are scanned, and in this way, the number of scans can be reduced.
[0043] Optionally, in step S120, the first N motion vector candidates among the M motion vector candidates may be sequentially scanned.
[0044] Optionally, in step S120, the last N motion vector candidates among the M motion vector candidates may be sequentially scanned. Alternatively, the middle N motion vector candidates among the M motion vector candidates may be sequentially scanned. The present application is not limited thereto.
[0045] As an example, in step S120, some of the M motion vector candidates are sequentially scanned.
[0046] As another example, in step S120, some of the motion vector candidates that have already been included in the motion vector candidate list are sequentially scanned.
[0047] S130. Based on the reference motion vector, the current image block, and the reference image of the current image block, determine the motion vector candidates that will continue to be included in the motion vector candidate list.
[0048] It should be understood that after completing step S130, the construction of the motion vector candidate list for the current image block is completed. The motion vector candidate list for the current image block includes the M motion vector candidates determined in step S110 and the motion vector candidates determined in step S130.
[0049] As shown in FIG. 1, the method further includes S140 of determining the motion vector of the current image block based on the motion vector candidate list obtained in S130.
[0050] It should be understood that the solution provided in the present application can be applied to the ATMVP technology. For example, step S120 can implement step 1 in the conventional ATMVP technology.
[0051] In step 1 of the conventional ATMVP technology, the temporal vector of the current image block is obtained by scanning all the motion vector candidates that have already been inserted in the motion vector candidate list. For example, if the motion vector candidate list is usually filled with four motion vector candidates, the following situation may occur. To obtain the temporal vector of the current image block, it is necessary to scan four motion vector candidates.
[0052] On the other hand, in the embodiment of the present application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) of the M motion vector candidates that have already been obtained are sequentially scanned, and compared with the prior art, the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that by applying the solution provided by the present application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0053] The applicant selected the official common test sequence as the test sequence on the latest reference software VTM-2.0 of the next-generation video coding (Versatile Video Coding), and tested the solution provided by the present application in the test configurations of the RA configuration and the LDB configuration. According to the test results, after reducing the number of scans, the performance gain of the ATMVP technology can be maintained.
[0054] Therefore, the solution provided by the present application can reduce the complexity of the ATMVP technology while maintaining the performance gain of the conventional ATMVP technology.
[0055] It should be understood that the solution provided by the present application regarding the construction of the motion vector candidate list can be applied to both the encoding side and the decoding side. In other words, the execution subject of the method provided by the present application may be the encoding side or the decoding side.
[0056] As an example, on the encoding side, after obtaining a motion vector candidate list by the method according to the embodiment of the present application, the encoding of the current image block can be completed by the following steps.
[0057] 1) Select the optimal motion vector (denoted as MV1) from the motion vector candidate list, set the selected MV1 as the motion vector of the current image block, and obtain the index of the MV1 in the motion vector candidate list.
[0058] 2) Based on the motion vector MV1 of the current image block, determine the predicted image block of the current image block from the reference image (i.e., the reference frame). That is, determine the position of the predicted image block of the current image block in the reference frame.
[0059] 3) Obtain the residual between the current image block and the predicted image block.
[0060] 4) Transmit the index of the motion vector MV1 of the current image block in the motion vector candidate list and the residual obtained in step 3) to the decoding side.
[0061] As an example, on the decoding side, the current image block can be decoded by the following steps.
[0062] 1) Receive the residual and the index of the motion vector of the current image block in the motion vector candidate list from the encoding side.
[0063] 2) Obtain a motion vector candidate list by the method according to the embodiment of the present application. The motion vector candidate list obtained on the decoding side is the same as the motion vector candidate list obtained on the encoding side.
[0064] 3) Based on the index, obtain the motion vector MV1 of the current image block from the motion vector candidate list.
[0065] 4) Based on the motion vector MV1, obtain the predicted image block of the current image block, and combine it with the residual to obtain the current image block by decoding.
[0066] Optionally, in this embodiment, in step S110, based on the motion vectors of the four neighboring blocks of the current image block within the current frame, determine four motion vector candidates for inclusion in the motion vector candidate list of the current image block, that is, M is equal to 4. In step S120, scan N of the four motion vector candidates, where N is smaller than 4.
[0067] For example, N is equal to 1. For example, in step S120, scan only the first motion vector candidate in the motion vector candidate list.
[0068] Also, for example, N is equal to 2 or 3.
[0069] Hereinafter, a method for determining the reference motion vector of the current image block based on the scanning results of the N motion vector candidates in step S120 will be described.
[0070] In step S120, determine one by one whether N of the M motion vector candidates satisfy the preset conditions, and based on the determination results, determine the reference motion vector. Here, the definition of the preset conditions will be described by taking the example that the reference frame pointed to by the motion vector candidate is the same as the reference image of the current image block.
[0071] Optionally, in step S120, sequentially scan the N motion vector candidates. When scanning reaches the motion vector candidate that meets the first preset condition, that is, when scanning reaches the motion vector candidate whose first reference frame is the same as the co-located frame of the current frame, stop the scanning, and based on the first motion vector candidate that meets the preset condition that has been scanned, determine the reference motion vector.
[0072] When scanning up to the motion vector candidate that meets the first preset condition, the number of scans may be equal to N or less than N.
[0073] For example, if the first motion vector candidate scanned meets the preset condition, the scanning is stopped, and this motion vector candidate is set as the reference motion vector of the current image block.
[0074] Optionally, in step S120, when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, that is, when all the reference frames pointed to by the N motion vector candidates are different from the co-located frame of the current image block, a default value is used as the value of the reference motion vector.
[0075] For example, the default value is (0, 0), that is, the reference motion vector is (0, 0).
[0076] It should be understood that depending on the actual situation, the default value may have other definitions.
[0077] Optionally, in step S120, when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, that is, when all the reference frames pointed to by the N motion vector candidates are different from the co-located frame of the current image block, scaling processing is performed on a specific motion vector candidate in the motion vector candidate list, and based on the specific motion vector candidate after the scaling processing, the reference motion vector is determined.
[0078] The specific motion vector candidate may be the first motion vector or the last motion vector obtained in the scanning order among the N motion vector candidates.
[0079] The specific motion vector candidate may further be a motion vector obtained in other scanning orders among the N motion vector candidates.
[0080] When the pre-set condition is defined such that the reference frame pointed to by the motion vector candidate is the same as the reference frame of the current image block, scaling processing is performed on a specific motion vector candidate in the motion vector candidate list, and based on the specific motion vector candidate after the scaling processing, determining the reference motion vector includes performing scaling processing on the specific motion vector candidate in the motion vector candidate list so that the reference frame pointed to by the specific motion vector candidate after the scaling processing is the same as the reference image of the current image block, and using the specific motion vector candidate after the scaling processing as the reference motion vector.
[0081] As shown in FIG. 3, curr_pic represents the image where the current image block is located, col_pic represents the collocated picture of the current image block, and neigh_ref_pic represents the reference frame pointed to by the specific motion vector candidate. In one embodiment, based on the time distance between the reference image neigh_ref_pic pointed to by the specific motion vector candidate and the image curr_pic where the image block corresponding to the specific motion vector is located, and the time distance between the reference image col_pic of the current image block and the image curr_pic where the current image block is located, the scale of the specific motion vector is determined.
[0082] When the difference in the degree of motion between image frames is poor and there is intense motion between the current frame and its collocated frame, if the motion vector (0, 0) is used as the basis for positioning the corresponding block of the current block, it is assumed that without considering the motion between frames, the absolute coordinates in the collocated frame of the current block remain unchanged as they are. However, in reality, since the probability that the coordinates in the collocated frame of the current block are different from its coordinates in the current frame is very high, it should be understood that large variations will occur.
[0083] In an embodiment of the present application, when a motion vector candidate among N motion vector candidates, for which the co-located frames of the reference frame and the current frame are the same, has not been scanned, scaling processing is performed on one of the N motion vector candidates so that the co-located frames of its reference frame and the current frame become the same, and subsequently, this scaled motion vector candidate is used as the motion vector of the current image block. In this way, the accuracy of the motion vector of the current image block can be improved.
[0084] Optionally, when N is an integer smaller than M and greater than 1, the specific motion vector candidate in this embodiment may be the motion vector candidate among the N motion vector candidates for which the distance in the time domain between the co-located frames of the reference frame and the current image block is the closest.
[0085] Select one motion vector candidate among the N motion vector candidates for which the distance between the co-located frames of the reference frame and the current frame is the closest, and perform scaling processing on it, thereby reducing the time taken for the scaling processing and improving the efficiency of obtaining the motion vector of the current image block.
[0086] Optionally, when N is an integer smaller than M and greater than 1, the specific motion vector candidate in this embodiment may be any one of the N motion vector candidates.
[0087] Note that when N is equal to 1, the specific motion vector candidate in this embodiment is this motion vector candidate to be scanned.
[0088] Optionally, as an example, when N is equal to 1, in step S120, the reference motion vector of the current image block is obtained by scanning one motion vector candidate in the motion vector candidate list. If the reference frame pointed to by the motion vector candidate being scanned is different from the co-located frame of the current frame where the current image block is located, scaling processing is performed on this motion vector candidate so that the reference frame of the scaled motion vector candidate is the same as the co-located frame of the current frame, and the motion vector candidate after the scaling processing is used as the reference motion vector of the current image block. If the reference frame of the motion vector candidate being scanned is the same as the co-located frame of the current frame, this motion vector candidate is used as the motion vector of the current image block.
[0089] In this embodiment, by scanning one motion vector candidate in the motion vector candidate list, the motion vector of the current image block is obtained, and the number of times of scanning the motion vector candidate in the process of obtaining the motion vector of the current image block is effectively reduced. If the reference frame of the motion vector candidate being scanned is different from the co-located frame of the current frame, scaling processing is performed on this motion vector candidate so that its reference frame is the same as the co-located frame of the current frame, and then the motion vector candidate after this scaling processing is used as the motion vector of the current image block. In this way, the accuracy of the motion vector of the current image block can be improved. Therefore, compared with the prior art, the solution provided by the embodiment of the present application can not only simplify the process of determining the motion vector of the current image block, but also improve the accuracy of the motion vector of the current image block.
[0090] It should be understood that when the definition of the preset conditions changes, the process of performing scaling processing on a specific motion vector candidate in the motion vector candidate list also changes correspondingly, that is, it is necessary to ensure that the specific motion vector candidate after the scaling processing meets the preset conditions.
[0091] Next, in step S130, a process of determining motion vector candidates to be continuously included in the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block will be described.
[0092] Optionally, as one implementation method, determining motion vector candidates to be continuously included in the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block includes dividing the current image block into a plurality of sub-image blocks, determining related blocks of the sub-image blocks in the reference image of the current image block based on the reference motion vector, and determining motion vector candidates to be continuously included in the motion vector candidate list based on the motion vectors of the related blocks.
[0093] The related blocks may be called collocated blocks or corresponding blocks.
[0094] For example, the current image block is one CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0095] Optionally, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks are fixed to be 64 pixels or more.
[0096] Optionally, both the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks are fixed to 8×8 pixels.
[0097] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of sub-image blocks. The size of the sub-image blocks is 4×4 by default, and when a certain condition is met, the size of the sub-image blocks is set to 8×8. For example, on the encoding side, when encoding the current image block, the average block size of each sub-image block in the CU is calculated during the encoding of the ATMVP mode of the previous encoded image block in the same temporal layer. If the average block size is larger than the threshold, the size of the sub-image blocks of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. Currently, in the next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in the size of 8×8. It should be understood that when the size of the sub-image blocks is set to 4×4, the size of the motion vectors of the sub-image blocks (also 4×4) does not conform to the storage granularity of the motion vectors in the current standard. Also, in the current ATMVP technology, when encoding the current image block, it is further necessary to store the information on the size of the sub-image blocks of the previously encoded image blocks in the same temporal layer.
[0098] In the embodiments of the present application, the size of the sub-image blocks of the current image block can be set to 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard VVC, while there is no need to store the information on the size of the sub-image blocks of the previous encoded image blocks, so that the storage space can be saved.
[0099] Note that on the premise of ensuring that the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks is fixed at 64 pixels, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks can further be other dimensions. For example, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks is A×B, where A≤64, B≤64, and both A and B are integers of 4. For example, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks is 4×16 pixels or 16×4 pixels.
[0100] Optionally, as another implementation method, determining the motion vector candidates that are subsequently included in the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block includes determining the related block of the current image block in the reference image of the current image block based on the reference motion vector, and determining the motion vector candidates that are subsequently included in the motion vector candidate list based on the motion vectors of the related blocks.
[0101] In encoding / decoding technology, generally, the encoded / decoded image is used as the reference image for the current encoding / decoding target. In some embodiments, furthermore, one reference image can be constructed to improve the similarity between the reference image and the current image to be encoded / decoded.
[0102] For example, in moving image content, there are specific encoding / decoding scenes where the background hardly changes and only the foreground of the moving image changes or moves. For example, video monitoring belongs to such a scene. In the video monitoring scene, usually, the monitoring camera is fixed or only moves slowly, and it is considered that the background hardly changes. On the contrary, objects such as people and cars captured by the video monitoring camera are always moving or changing, and the foreground is always changing. In such a scene, a specific reference image including only high-quality background information can be created. The specific reference image may include a plurality of image blocks, and any image block is also taken from a certain decoded image, and different image blocks in the specific reference image may be obtained from different decoded images. When performing inter-frame prediction, the background part of the current image to be encoded / decoded refers to the specific reference image, thereby reducing the residual information of the inter-frame prediction and improving the encoding / decoding efficiency.
[0103] The above are specific examples of specific reference images. In some embodiments, the specific reference image has at least one property of a composite reference, a long-term reference image, or a non-output image. Here, the non-output image refers to an image that is output but not displayed. Generally, the non-output image exists as a reference image for other images. For example, the specific reference image may be a constructed long-term reference image, a non-output composite reference, or a non-output long-term reference image. In some embodiments, the composite reference is also referred to as a composite reference frame.
[0104] In some embodiments, the non-specific reference image may be a reference image that does not have at least one property of a composite reference, a long-term reference image, or a non-output image. For example, the specific reference image may include a reference image other than a composite reference, or a reference image other than a long-term reference image, or a reference image other than a non-output image, or a reference image other than a constructed long-term reference image, or a reference image other than a non-output composite reference, or a reference image other than a non-output long-term reference image, etc.
[0105] In some embodiments, when an image in a moving image can be used as a reference image, the long-term reference image and the short-term reference image can be distinguished. Here, the short-term reference image is a concept corresponding to the long-term reference image. The short-term reference image exists in the reference image buffer for a certain period of time. After some in-and-out operations of the decoded reference image behind the short-term reference image in the reference image buffer, the short-term reference image is removed from the reference image buffer. The reference image buffer may also be referred to as a reference image list cache, a reference image list, a reference frame list cache, or a reference frame list, etc., and is collectively referred to as the reference image buffer here.
[0106] The long-term reference image (or a part of the data in the long-term reference image) can always exist in the reference image buffer. The long-term reference image (or a part of the data in the long-term reference image) is not affected by the entry and exit operations in the reference image buffer of the decoded reference image, and the long-term reference image (or a part of the data in the long-term reference image) is moved out of the reference image buffer only when an update command is sent on the decoding side.
[0107] The names of the short-term reference image and the long-term reference image may be different in different standard specifications. For example, in standards such as H.264 / Advanced Video Coding (AVC) or H.265 / HEVC, the short-term reference image is called a short-term reference frame, and the long-term reference image is called a long-term reference frame. Also, in standards such as Audio Video Coding Standard (AVS) 1-P2, AVS2-P2, Institute of Electrical and Electronics Engineers (IEEE) 1857.9-P4, the long-term reference image is called a background picture. Also, in standards such as VP8 and VP9, the long-term reference image is called a golden frame.
[0108] Note that although specific terms are used in the embodiments of this application, it does not mean that they must be applied to a specific scene. For example, calling the long-term reference image a long-term reference frame does not mean that it must be applied to technologies corresponding to standards such as H.264 / AVC or H.265 / HEVC.
[0109] The long-term reference image as described above may be obtained from an image block structure extracted from a plurality of decoded images, or may be obtained by updating an existing reference frame (for example, a reference frame stored in advance) using a plurality of decoded images. Naturally, the structural specific reference image may also be a short-term reference image. Or, the long-term reference image may not be a structural reference image.
[0110] In the above embodiment, the specific reference image may include a long-term reference image, and the non-specific reference image may include a short-term reference image.
[0111] Optionally, the type of the reference frame can be identified within the code stream structure by a special field.
[0112] Optionally, when the reference image is determined to be a long-term reference image, the reference image is determined to be a specific reference image, or when the reference image is determined to be a non-output frame, the reference image is determined to be a specific reference image, or when the reference image is determined to be a structural frame, the reference image is determined to be a specific reference image, or when the reference image is determined to be a non-output frame and further the reference image is determined to be a structural frame, the reference image is determined to be a specific reference image.
[0113] Optionally, various reference images may each have their own identifiers. In this case, for the decoding side, based on the identifier of the reference image, it can be determined whether the reference image is a specific reference image.
[0114] In some embodiments, when it is determined that the reference image has an identifier of a long-term reference image, it is determined that the reference image is a specific reference image.
[0115] In some embodiments, when it is determined that the reference image has a non-output identifier, it is determined that the reference image is a specific reference image.
[0116] In some embodiments, when it is determined that the reference image has an identifier of the structural frame, it is determined that the reference image is a specific reference image.
[0117] In some embodiments, when it is determined that the reference image has at least two of the three identifiers: the identifier of the long-term reference image, the non-output identifier, the identifier of the structural frame, or the identifier of the composite reference frame, it is determined that the reference image is a specific reference image. For example, when it is determined that the reference image has a non-output identifier and it is determined that the reference image has an identifier of the structural frame, it is determined that the reference image is a specific reference image.
[0118] Specifically, the image may have an identifier indicating whether it is an output frame. When it is indicated that a certain image is not output, it indicates that the frame is a reference image. Further, it is determined whether the frame has an identifier of the structural frame. If so, it is determined that the reference image is a specific reference image. When it is indicated that a certain image is output, the determination as to whether it is a structural frame is not made, and it can be directly determined that the frame is not a specific reference image. Alternatively, even if it is indicated that an image is not output, when it has an identifier indicating that it is not a structural frame, it can be determined that the frame is not a specific reference image.
[0119] Optionally, when it is determined by analyzing parameters from a picture header, a picture parameter set (PPS), or a slice header that the reference image satisfies one of the following conditions, it is determined that the reference image is a specific reference image.
[0120] That is, the reference image is a long-term reference image, the reference image is a structural reference image, the reference image is a non-output image, When the reference image is a non-output image, it is further determined that the reference image is a structural reference image.
[0121] In some embodiments of the embodiments of the present application, in the process of determining the motion vector of the current image block, it is related to determining the motion vector of the image block by using the motion vector of an image block on another image. For the convenience of description, the image block is called the first image block, and an image block on another image to be used is called the temporal reference block or related block of the first image block. It can be understood that the first image block and the temporal reference block (or related block) of the first image block are located on different images. Therefore, in the process of determining the motion vector of the first image block by using the motion vector of the temporal reference block (or related block), it may be necessary to scale the motion vector of the temporal reference block (or related block). For the convenience of description, in this specification, the term "related block" is uniformly used.
[0122] For example, when applying the ATMVP technology to the construction of the AMVP candidate list, based on the ATMVP technology, when determining the motion vector of the related block of the current image block, it is necessary to scale the motion vector of the related block, and then determine the motion vector of the current image block based on the scaled motion vector. Generally, the scale of the motion vector of the related block is determined based on the temporal distance between the reference image pointed to by the motion vector of the related block and the image where the related block is located, and the temporal distance between the reference image of the current image block and the image where the current image block is located.
[0123] In one example, the motion vector of the related block is called MV2, and the reference frame index value of the reference picture pointed to by the motion vector MV2 is called x. Here, the reference frame index value x is the difference between the sequence number (e.g., POC) of the reference picture pointed to by MV2 and the sequence number of the picture where the related block is located. The reference frame index value of the reference picture of the first image block is called y. Here, the reference frame index value y is the difference between the sequence number of the reference picture of the first image block and the sequence number of the picture where the first image block is located. Therefore, the scale for the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be used as the motion vector of the first image block.
[0124] However, when the motion vector MV2 of the related block points to a specific reference picture, or when the reference picture of the first image block is the specific reference picture, since the definition of the temporal distance between the specific reference picture and the picture where the first image block is located is ambiguous, there is no meaning in scaling the motion vector MV2 of the related block.
[0125] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the related block, specifically, when the motion vector of the related block points to a specific reference picture, or when the reference picture of the current image block is the specific reference picture, determine the motion vector of the current image block based on the motion vector of the related block after processing. Here, the motion vector of the related block after processing is the same as the motion vector of the related block before processing.
[0126] For example, the motion vector of the related block after processing includes the motion vector obtained by scaling the motion vector of the related block with a scale of 1 in value, or the motion vector of the related block with the scaling step skipped.
[0127] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vectors of the related blocks, specifically, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, determining the motion vector of the current image block based on the motion vector of the related block is abandoned.
[0128] In some embodiments, step S120 includes: when a motion vector candidate that meets the preset conditions among the N motion vector candidates has not been scanned, performing scaling processing on a specific motion vector candidate in the motion vector candidate list, and determining a reference motion vector based on the specific motion vector candidate after the scaling processing. In this case, optionally, the method further includes: when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, determining a motion vector candidate that continues to be inserted into the motion vector candidate list based on the specific motion vector candidate after processing, where the specific motion vector candidate after processing is the same as the specific motion vector candidate before processing.
[0129] Here, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block that skips the scaling step.
[0130] In some embodiments, step S120 includes: when a motion vector candidate that meets the preset conditions among the N motion vector candidates has not been scanned, performing scaling processing on a specific motion vector candidate in the motion vector candidate list, and determining a reference motion vector based on the specific motion vector candidate after the scaling processing. In this case, optionally, the method further includes: when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, abandoning the determination of a motion vector candidate that continues to be inserted into the motion vector candidate list based on the specific motion vector candidate.
[0131] As can be seen from the above, in the embodiments of the present application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) of the M motion vector candidates that have already been obtained are sequentially scanned. Compared with the prior art, the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that by applying the solution provided by the present application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0132] If the motion vector candidates with the same corresponding frame between the reference frame and the current frame among the N motion vector candidates have not been scanned, scaling processing is performed on one of the N motion vector candidates so that its reference frame becomes the same as the corresponding frame of the current frame. Subsequently, by using the scaled motion vector candidate as the motion vector of the current image block, the accuracy of the motion vector of the current image block can be improved.
[0133] The current image block can be divided into sub-image blocks of size 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, it is not necessary to store the information about the size of the sub-blocks of the previous encoded image block, so the storage space can be saved.
[0134] As shown in FIG. 4, the embodiments of the present application further provide a method for obtaining a video motion vector, and the method includes the following steps.
[0135] S410. Obtain M motion vector candidates to be included in the motion vector candidate list of the current image block.
[0136] Step S410 corresponds to step S110 described above. For specific descriptions, refer to the above description and will not be repeated here.
[0137] S420. Sequentially scan at least some of the M motion vector candidates, and based on the scan results, determine the reference motion vector of the current image block.
[0138] As an optional embodiment, sequentially scan some of the M motion vector candidates, and based on the scan results, determine the reference motion vector of the current image block. In such an embodiment, step S420 can correspond to step S120 described above, and for a specific description, refer to the above description.
[0139] As another optional embodiment, sequentially scan all of the M motion vector candidates, and based on the scan results, determine the reference motion vector of the current image block.
[0140] Note that in step S420, for the specific method of determining the reference motion vector of the current image block based on the scan results, reference can be made to the related descriptions in the above embodiments, and no further description will be given here.
[0141] S430. Divide the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed to 64 or more pixels.
[0142] For example, the current image block is one CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0143] S440. Based on the reference motion vector, determine the related block of the sub-image block in the reference image of the current image block.
[0144] The reference image of the current image block may be the same frame as the current image block.
[0145] S450. Based on the motion vectors of the related blocks, determine the motion vector candidates to be continuously added to the motion vector candidate list.
[0146] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when a certain condition is met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, when encoding the ATMVP mode of the previous encoded image block in the same temporal layer, the average block size of each sub-image block in the CU is calculated. If the average block size is larger than the threshold, the size of the sub-image block of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. That is, in the prior art, when encoding the current image block, it is necessary to further store the information on the size of the sub-image block of the previous encoded image block in the same temporal layer.
[0147] In the embodiment of the present application, the size of the sub-image block of the current image block is fixed to 64 or more pixels, and there is no need to store the information on the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0148] Optionally, in this embodiment, both the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels.
[0149] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of sub-image blocks. The size of the sub-image blocks is 4×4 by default, and when a certain condition is met, the size of the sub-image blocks is set to 8×8. For example, on the encoding side, when encoding the current image block, the average block size of each sub-image block in the CU is calculated during the encoding of the ATMVP mode of the previous encoded image block in the same temporal layer. If the average block size is larger than the threshold, the size of the sub-image blocks of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. Currently, in the next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. It should be understood that when the size of the sub-image blocks is set to 4×4, the size of the motion vectors of the sub-image blocks (also 4×4) does not conform to the storage granularity of the motion vectors in the current standard. Also, in the current ATMVP technology, when encoding the current image block, it is further necessary to store the information on the size of the sub-image blocks of the previously encoded image block in the same temporal layer.
[0150] In the embodiments of the present application, the size of the sub-image blocks of the current image block can be set to 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard VVC, while there is no need to store the information on the size of the sub-image blocks of the previous encoded image block, so that the storage space can be saved.
[0151] Note that on the premise of ensuring that the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks are fixed at 64 pixels, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks can further be other dimensions. For example, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks is A×B, where A≤64, B≤64, and both A and B are integers of 4. For example, the size of the sub-image blocks and / or the size of the related blocks of the sub-image blocks is 4×16 pixels, or 16×4 pixels.
[0152] Optionally, in step S420, when at least some of the motion vector candidates are sequentially scanned and the scanning stops when a motion vector candidate that meets the first preset condition is scanned, and a reference motion vector is determined based on the first scanned motion vector candidate that meets the preset condition.
[0153] Determining a reference motion vector based on the first scanned motion vector candidate that meets the preset condition includes using the motion vector candidate that meets the first preset condition as a target neighborhood block.
[0154] Optionally, the preset condition includes that the reference image of the motion vector candidate is the same as the reference image of the current image block.
[0155] Optionally, in step S450, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, determining a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the processed related block, where the motion vector of the processed related block is the same as the motion vector of the related block before processing.
[0156] For example, the motion vector of the processed related block includes the motion vector obtained after scaling the motion vector of the related block by a scale factor of 1, or the motion vector of the related block with the scaling step skipped.
[0157] Optionally, in step S450, when the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, it includes abandoning the determination of a motion vector candidate to be continuously included in the vector candidate list based on the motion vector of the related block.
[0158] Therefore, in the embodiment shown in FIG. 4, the current image block can be divided into sub-image blocks of size 8×8 and adapted to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, it is not necessary to store the information on the size of the sub-blocks of the previous encoded image block, and thus, the storage space can be saved.
[0159] As described above, the embodiments of the method of the present application have been described in connection with FIGS. 1 and 4. Hereinafter, embodiments of an apparatus corresponding to the embodiments of the above method will be described. Note that since the description of the embodiments of the apparatus corresponds to the description of the embodiments of the method, for those not described in detail, reference may be made to the embodiments of the above method. For the sake of simplicity, they will not be described again here.
[0160] FIG. 5 is a schematic block diagram of a video processing apparatus 500 provided according to an embodiment of the present application. The apparatus 500 is used to execute the embodiment of the method shown in FIG. 1. The apparatus 500 includes the following units.
[0161] An acquisition unit 510, which is used to acquire M motion vector candidates to be included in the motion vector candidate list of the current image block.
[0162] A determination unit 520, which is used to sequentially scan N motion vector candidates out of the M motion vector candidates and determine a reference motion vector based on the scanning result, where N is smaller than M.
[0163] The determination unit 520 is further used to determine motion vector candidates to be subsequently included in the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block.
[0164] The determination unit 520 is further used to determine the motion vector of the current image block based on the motion vector candidate list.
[0165] In step 1 of the conventional ATMVP technology, the temporal vector of the current image block is obtained by scanning all the motion vector candidates that have already been inserted in the motion vector candidate list. For example, if the motion vector candidate list is usually filled with four motion vector candidates, the following situation may occur. To obtain the temporal vector of the current image block, it is necessary to scan four motion vector candidates.
[0166] On the other hand, in the embodiment of the present application, in the process of obtaining the reference motion vector of the current image block, only N (N is smaller than M) of the M motion vector candidates that have already been obtained are sequentially scanned, and compared with the prior art, the number of scans for the motion vector candidates in the process of obtaining the reference motion vector of the current image block can be reduced. It should be understood that by applying the solution provided by the present application to step 1 of the conventional ATMVP technology, the redundant operations therein can be simplified.
[0167] The applicant selects the official common test sequence as the test sequence on the latest reference software VTM-2.0 of the next-generation video coding (Versatile Video Coding), and tests the solution provided by the present application in the test configurations of the RA configuration and the LDB configuration. According to the test results, after reducing the number of scans, the performance gain of the ATMVP technology can be maintained.
[0168] Therefore, the solution provided by the present application can reduce the complexity of the ATMVP technology while maintaining the performance gain of the conventional ATMVP technology.
[0169] Optionally, as an example, the acquisition unit 510 is used to obtain M motion vector candidates to be inserted into the motion vector candidate list of the current image block based on the motion vectors of M neighboring blocks within the current frame of the current image block.
[0170] Optionally, as an example, a neighboring block is an image block that is adjacent to the position of the current image block on the current frame or has a certain position pitch.
[0171] Optionally, as an example, the determination unit 520 is used to sequentially scan the previous N motion vector candidates among the M motion vector candidates.
[0172] Optionally, as an example, M is equal to 4 and N is less than 4.
[0173] Optionally, as an example, N is equal to 1 or 2.
[0174] Optionally, as an example, the determination unit 520 is used to sequentially scan N motion vector candidates among the M motion vector candidates based on preset conditions, and determine a reference motion vector based on the scanning result.
[0175] Optionally, as an example, the preset conditions include motion vector candidates whose indicated reference frame is the same as the reference image of the current image block.
[0176] Optionally, as an example, when the determination unit 520 sequentially scans N motion vector candidates and stops scanning when it reaches the motion vector candidate that meets the first preset condition, and determines a reference motion vector based on the first motion vector candidate that meets the preset condition that has been scanned.
[0177] Optionally, as an example, when there is no motion vector candidate that meets the preset conditions among the N motion vector candidates, the determination unit 520 performs scaling processing on a specific motion vector candidate in the motion vector candidate list, and determines a reference motion vector based on the scaled specific motion vector candidate.
[0178] Optionally, as one example, a specific motion vector candidate is the first motion vector or the last motion vector obtained in the scanning order among the N motion vector candidates.
[0179] Optionally, as one example, the determination unit 520 performs a scaling process on a specific motion vector candidate in the motion vector candidate list so that the reference frame pointed to by the scaled specific motion vector candidate is the same as the reference image of the current image block, and is used to set the scaled specific motion vector candidate as the reference motion vector.
[0180] Optionally, as one example, when a motion vector candidate that meets a preset condition among the N motion vector candidates has not been scanned, the determination unit 520 is used to set a default value as the reference motion vector.
[0181] Optionally, as one example, the default value is the motion vector (0, 0).
[0182] Optionally, as one example, the determination unit 520 divides the current image block into a plurality of sub-image blocks, determines the related blocks of the sub-image blocks in the reference image of the current image block based on the reference motion vector, and is used to determine the motion vector candidates to be continuously inserted into the motion vector candidate list based on the motion vectors of the related blocks.
[0183] Optionally, as one example, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels.
[0184] Optionally, as one example, the current image block is one coding unit CU.
[0185] Optionally, as one example, the determination unit 520 is used to determine, based on the reference motion vector, the associated block of the current image block among the reference images of the current image block, and to determine, based on the motion vector of the associated block, the motion vector candidates to be successively included in the motion vector candidate list.
[0186] Optionally, as one example, when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit 520 is used to determine, based on the motion vector of the processed associated block, the motion vector candidates to be successively included in the motion vector candidate list, where the motion vector of the processed associated block is the same as the motion vector of the unprocessed associated block.
[0187] Optionally, as one example, the motion vector of the processed associated block includes the motion vector obtained after scaling the motion vector of the associated block by a scale factor of 1, or the motion vector of the associated block with the scaling step skipped.
[0188] Optionally, as one example, when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit 520 is used to abandon the determination of the motion vector candidates to be successively included in the motion vector candidate list based on the motion vector of the associated block.
[0189] Optionally, as one example, when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit 520 is used to determine, based on the processed specific motion vector candidate, the motion vector candidates to be successively included in the motion vector candidate list, where the processed specific motion vector candidate is the same as the unprocessed specific motion vector candidate.
[0190] Optionally, as an example, the motion vector of the related block after processing is the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block skipping the scaling step.
[0191] Optionally, as an example, the determination unit 520 is used to abandon determining a motion vector candidate to be continuously included in the candidate list of vectors based on the specific motion vector candidate when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image.
[0192] Optionally, as an example, the motion vector candidate list is a Merge candidate list.
[0193] Optionally, as an example, the reference image of the current image block is the same position frame of the current image block.
[0194] Optionally, as an example, both the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 8×8 pixels.
[0195] Note that both the acquisition unit 510 and the determination unit 520 in this embodiment can be realized by a processor.
[0196] As shown in FIG. 6, the embodiment of the present application further provides a moving image processing apparatus 600. The apparatus 600 is used to execute the embodiment of the method shown in FIG. 4. The apparatus 600 includes the following units.
[0197] A determination unit 610, which is used to obtain M motion vector candidates to be included in the motion vector candidate list of the current image block.
[0198] A determination unit 620 that sequentially scans at least some of the M motion vector candidates among the M motion vector candidates and is used to determine the reference motion vector of the current image block based on the scan result.
[0199] A splitting unit 630 that is used to split the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed to 64 or more pixels.
[0200] The determination unit 620 is further used to determine the associated block of the sub-image block in the reference image of the current image block based on the reference motion vector.
[0201] The determination unit 620 is further used to determine the motion vector candidate to be continuously inserted into the motion vector candidate list based on the motion vector of the associated block.
[0202] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when a certain condition is met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, when encoding in the ATMVP mode of the previous encoded image block in the same temporal layer, calculate the average block size of each sub-image block in the CU. If the average block size is larger than the threshold, the size of the sub-image block of the current image block is set to 8×8, otherwise the default value 4×4 is used. That is, in the prior art, when encoding the current image block, it is necessary to further store the information on the size of the sub-image block of the previous encoded image block in the same temporal layer.
[0203] In the embodiment of the present application, the size of the sub-image block of the current image block is fixed to 64 or more pixels, and there is no need to store the information on the size of the sub-image block of the previous encoded image block, so the storage space can be saved.
[0204] Optionally, as an example, the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed at 8×8 pixels.
[0205] Currently, in the next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. In the embodiments of the present application, the size of the sub-image block of the current image block can be set to 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, it is not necessary to store the information about the size of the sub-image block of the previous encoded image block, so that the storage space can be saved.
[0206] Optionally, as an example, the determination unit 620 sequentially scans at least some of the motion vector candidates. When it scans to the motion vector candidate that meets the first preset condition, the scanning stops, and it is used to determine the reference motion vector based on the first scanned motion vector candidate that meets the preset condition.
[0207] Optionally, as an example, the determination unit 620 is used to make the motion vector candidate that meets the first preset condition be the target neighborhood block.
[0208] Optionally, as an example, the preset condition includes that the reference image of the motion vector candidate is the same as the reference image of the current image block.
[0209] It should be noted that the acquisition unit 610, the determination unit 620, and the division unit 630 in this embodiment can all be realized by a processor.
[0210] In the above description, the motion vector of an image block can include two pieces of information: 1) the image pointed to by the motion vector, and 2) the displacement. In some application scenarios, the motion vector of one image block includes only the information of "displacement". The image block also provides index information for indicating the reference image of the image block. For an encoded / decoded image block, the meaning of its motion vector is that the position of the encoded / decoded image block on the reference image of the reference block of the encoded / decoded image block is the same as that of the image block located on the reference image and includes the displacement with respect to the image block located on the reference image. When determining the reference block of the encoded / decoded image block, it is necessary to determine the reference block of the encoded / decoded image block according to the index information of the reference image of the encoded / decoded image block and the motion vector of the encoded / decoded image block. Hereinafter, a moving image processing method is provided for the new definition of the motion vector (that is, including the "displacement" information but not including the "pointed image").
[0211] As shown in FIG. 7, an embodiment of the present application provides a moving image processing method, and the method includes the following steps.
[0212] S710, Determine M neighboring blocks of the current image block.
[0213] The current image block is an image block to be encoded (or decoded). For example, the current image block is one coding unit (CU).
[0214] The image frame where the current image block is located is called the current frame.
[0215] A neighboring block is an image block adjacent to the position of the current image block in the current image or having a certain position pitch.
[0216] The M neighboring blocks are encoded (or decoded) image blocks within the current frame.
[0217] As an example, as shown in FIG. 2, four positions A around the current image block shown in FIG. 2 1 (left) → B 1 (above) → B 0 (upper right) → A 0 In the order of the image blocks located at (lower left), four neighboring blocks of the current image block are sequentially determined.
[0218] S720, sequentially scan N out of M neighboring blocks among the M neighboring blocks, and based on the scan results, determine the target neighboring block, where N is smaller than M.
[0219] The process of determining the target neighboring block based on the scan results of the N neighboring blocks may be a process of sequentially determining the N neighboring blocks based on preset conditions and determining the target neighboring block based on the determination results.
[0220] As an example, the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block.
[0221] Here, the reference image of the current image block is the reference image with the closest time distance to the image where the current image block is located, or the reference image of the current image block is a reference image preset on the encoding side and the decoding side, or the reference image of the current image block is the reference image specified in the moving image parameter set, sequence header, sequence parameter set, image header, image parameter set, slice header.
[0222] For example, the reference image of the current image block is the same-position frame of the current image block, and the same-position frame is a frame for obtaining and predicting the motion information set in the information header at the slice level.
[0223] It should be understood that in response to the evolution of future technologies, this preset condition may give other different definitions, and the corresponding solutions also fall within the protection scope of this application.
[0224] The process of determining a target neighboring block based on the scanning results of N neighboring blocks will be described in detail below.
[0225] In step S720, only N out of the M neighboring blocks obtained in step S710 are scanned, and in this way, the number of scans can be reduced.
[0226] Optionally, in step S720, the first N of the M neighboring blocks may be sequentially scanned.
[0227] In step S710, when sequentially determining the M neighboring blocks of the current image block in a preset order, the previous N neighboring blocks obtained in step S720 refer to the first N neighboring blocks determined in the preset order.
[0228] Optionally, in step S720, the last N of the M neighboring blocks may be sequentially scanned. Or, N of the M neighboring blocks can be sequentially scanned. The present application is not limited thereto.
[0229] S730. Based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block, determine the related block of the current image block.
[0230] S740. Encode / Decode the current image block based on the motion vector of the related block.
[0231] Optionally, step S740 includes determining the reference block of the current image block based on the motion vector of the related block and the reference image.
[0232] For example, step S740 includes constructing a candidate block list for the current image block, where the candidate blocks in the candidate block list include M neighboring blocks and associated blocks, and encoding and decoding the current image block based on the reference blocks of the candidate blocks in the candidate block list.
[0233] In one example, the candidate block list is the merge candidate list of the current image block. In one example, the candidate block list is the AMVP candidate list of the current image block.
[0234] On the encoding side, write the index of the candidate block of the current block into the code stream. On the decoding side, after obtaining the index, find the candidate block corresponding to the index from the candidate block list, and based on the reference block of the candidate block, determine the reference block of the current image block, or based on the motion vector of the candidate block, determine the motion vector of the current image block.
[0235] For example, directly determine the reference block of the candidate block as the reference block of the current image block, or directly determine the motion vector of the candidate block as the motion vector of the current image block. Also, for example, the encoding side writes the MVD of the current block into the code stream. After the decoding side obtains the MVD, add the MVD to the motion vector of the candidate block to obtain the motion vector of the current block, and then based on the motion vector and the reference image of the current block, determine the reference block of the current block.
[0236] In the embodiments of the present application, in the process of obtaining the target neighboring blocks of the current image block, only N (N is smaller than M) of the M neighboring blocks that have already been obtained are sequentially scanned, which can reduce the number of scans for candidate neighboring blocks in the process of obtaining the target neighboring blocks of the current image block compared with the prior art, thereby reducing the complexity.
[0237] Optionally, in this embodiment, in step S710, four neighboring blocks within the current frame of the current image block are determined, that is, M is equal to 4. In step S720, N neighboring blocks out of the four neighboring blocks are scanned, where N is less than 4.
[0238] For example, N is equal to 1. For example, in step S720, only the first neighboring block out of the four neighboring blocks is scanned.
[0239] Also, for example, N is equal to 2 or 3.
[0240] Hereinafter, in step S720, a method for determining a target neighboring block based on the scanning results of the N neighboring blocks will be described.
[0241] Optionally, in step S720, the N neighboring blocks are sequentially scanned. When scanning reaches the neighboring block that meets the first preset condition, the scanning stops, and based on the first scanned neighboring block that meets the preset condition, the target neighboring block is determined.
[0242] For example, the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block.
[0243] It should be understood that in future evolving technologies, the preset conditions may be defined otherwise.
[0244] Here, the definition of the preset condition that the reference image of the neighboring block is the same as the reference image of the current image block will be described as an example.
[0245] For example, the neighboring block that meets the first preset condition is taken as the target neighboring block.
[0246] Optionally, in step S720, if no neighboring block that meets the preset condition is scanned among the N neighboring blocks, the method further includes performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks, and encoding / decoding the current image block based on the motion vector after the scaling processing.
[0247] For example, based on the motion vector after the scaling processing and the reference image of the current image block, a reference block of the current image block is determined.
[0248] Optionally, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks.
[0249] The specific neighboring block may be a neighboring block obtained in another scanning order among the N neighboring blocks.
[0250] Optionally, encoding / decoding the current image block based on the motion vector after the scaling processing includes performing scaling processing on the motion vector of the specific neighboring block, making the reference frame pointed to by the motion vector after the scaling processing the same as the reference image of the current image block, and using the image block pointed to by the motion vector after the scaling processing in the reference image of the current image block as the reference block of the current image block.
[0251] Optionally, in step S720, if no neighboring block that meets the preset condition is scanned among the N neighboring blocks, a default block is used as the candidate reference block of the current image block.
[0252] For example, the default block is an image block pointed to by the motion vector (0, 0).
[0253] Next, in step S730, a process of determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block will be described.
[0254] Optionally, as an embodiment, determining the related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block includes dividing the current image block into a plurality of sub-image blocks and determining the related blocks of the sub-image blocks in the reference image of the current image block based on the motion vector of the target neighboring block, and the related block of the current image block includes the related blocks of the sub-image blocks.
[0255] The related block may be called a collocated block or a corresponding block.
[0256] For example, the current image block is one CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0257] Optionally, the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to be 64 pixels or more.
[0258] Optionally, both the size of the sub-image block and the size of the related block of the sub-image block are fixed to 8×8 pixels.
[0259] In the current ATMVP technology, an adaptive setting at the frame level is performed for the size of the sub-image block. The size of the sub-image block is 4×4 by default, and when a certain condition is met, the size of the sub-image block is set to 8×8. For example, on the encoding side, when encoding the current image block, the average block size of each sub-image block in the CU is calculated during the encoding of the ATMVP mode of the previous encoded image block in the same temporal layer. When the average block size is larger than the threshold, the size of the sub-image block of the current image block is set to 8×8; otherwise, the default value of 4×4 is used. Currently, in the next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. It should be understood that when the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also 4×4) does not conform to the storage granularity of the motion vector in the current standard. Also, in the current ATMVP technology, when encoding the current image block, it is further necessary to store the information on the size of the sub-image block of the previously encoded image block in the same temporal layer.
[0260] In the embodiments of the present application, the size of the sub-image block of the current image block can be set to 8×8 to adapt to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store the information on the size of the sub-image block of the previous encoded image block, so that the storage space can be saved.
[0261] Note that on the premise of ensuring that the size of the sub-image block and / or the size of the related block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may further be other dimensions. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, where A≤64, B≤64, and both A and B are integers of 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0262] Optionally, as another embodiment, determining the associated block of the current image block based on the motion vector of the neighboring block of interest, the current image block, and the reference image of the current image block includes determining the associated block of the current image block in the reference image of the current image block based on the motion vector of the neighboring block of interest.
[0263] Optionally, step S740 includes determining a candidate reference block of the current image block based on the motion vector of the processed associated block and the reference image of the current image block when the reference image of the associated block is a specific reference image or the reference image of the current image block is a specific reference image, where the motion vector of the processed associated block is the same as the motion vector of the unprocessed associated block.
[0264] For example, the motion vector of the processed associated block includes the motion vector obtained after scaling the motion vector of the associated block by a scale factor of 1, or the motion vector of the associated block with the scaling step skipped.
[0265] Optionally, step S740 includes foregoing determining a candidate reference block of the current image block based on the motion vector of the associated block when the reference image of the associated block is a specific reference image or the reference image of the current block is a specific reference image.
[0266] In some embodiments, step S720 includes determining a reference block of the current image block based on the motion vector of the processed associated block and the reference image of the current image block when the motion vector of the specific neighboring block points to a specific reference image or the reference image of the current image block is a specific reference image, where the motion vector of the processed associated block is the same as the motion vector of the unprocessed associated block.
[0267] Here, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block that skips the scaling step.
[0268] As can be seen from the above, in the embodiment of the present application, in the process of obtaining the target neighboring blocks of the current image block, only N (N is smaller than M) of the M neighboring blocks that have already been obtained are sequentially scanned. Compared with the prior art, the number of scans for neighboring block candidates in the process of obtaining the target neighboring blocks of the current image block can be reduced, thereby reducing the complexity.
[0269] If the neighboring block among the N neighboring blocks whose reference frame is the same as the current frame has not been scanned, scaling processing is performed on the motion vector of one of the N neighboring blocks so that its reference frame becomes the same as the current frame. Subsequently, by using this scaled motion vector as the motion vector of the current image block, the accuracy of the motion vector of the current image block can be improved.
[0270] The current image block can be divided into sub-image blocks of size 8×8 to adapt to the storage granularity of the motion vector defined in the video standard specification VVC. On the other hand, it is not necessary to store the information on the size of the sub-blocks of the previous encoded image block, so the storage space can be saved.
[0271] In some embodiments of the examples of this application, in the process of determining the motion vector of the current image block, it is related to determining the motion vector of the image block by using the motion vector of an image block on another image. For the convenience of description, the image block is called the first image block, and an image block on another image to be used is called the temporal reference block or related block of the first image block. It can be understood that the first image block and the temporal reference block (or related block) of the first image block are located on different images. Therefore, in the process of determining the motion vector of the first image block by using the motion vector of the temporal reference block (or related block), it may be necessary to scale the motion vector of the temporal reference block (or related block). For the convenience of description, in this specification, the term "related block" is uniformly used.
[0272] For example, when applying the ATMVP technology to the construction of the AMVP candidate list, after determining the related block of the current image block based on the ATMVP technology, the motion vector of the current image block is determined based on the motion vector of the related block, the motion vector of the related block is scaled, and then it is necessary to determine the motion vector of the current image block based on the scaled motion vector. Generally, the scale of the motion vector of the related block is determined based on the temporal distance between the reference image pointed to by the motion vector of the related block and the image where the related block is located, and the temporal distance between the reference image of the current image block and the image where the current image block is located.
[0273] In one example, the motion vector of the related block is called MV2, and the reference frame index value of the reference picture pointed to by the motion vector MV2 is called x. Here, the reference frame index value x is the difference between the sequence number of the reference picture pointed to by MV2 (for example, POC) and the sequence number of the picture where the related block is located. The reference frame index value of the reference picture of the first image block is called y. Here, the reference frame index value y is the difference between the sequence number of the reference picture of the first image block and the sequence number of the picture where the first image block is located. Therefore, the scale for the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be used as the motion vector of the first image block.
[0274] However, when the motion vector MV2 of the related block points to a specific reference picture, or when the reference picture of the first image block is the specific reference picture, since the definition of the temporal distance between the specific reference picture and the picture where the first image block is located is ambiguous, scaling the motion vector MV2 of the related block has no meaning.
[0275] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the related block, specifically, when the motion vector of the related block points to a specific reference picture, or when the reference picture of the current image block is the specific reference picture, determine the motion vector of the current image block based on the motion vector of the related block after processing. Here, the motion vector of the related block after processing is the same as the motion vector of the related block before processing.
[0276] For example, the motion vector of the related block after processing includes the motion vector obtained by scaling the motion vector of the related block with a scale of 1, or the motion vector of the related block that skips the scaling step.
[0277] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vectors of the related blocks, specifically, if the motion vector of the related block points to a specific reference image or the reference image of the current image block is the specific reference image, then determining the motion vector of the current image block based on the motion vector of the related block is abandoned.
[0278] As shown in FIG. 8, the embodiment of the present application further provides a moving image processing method, and the method includes the following steps.
[0279] S810. Determine M neighboring blocks of the current image block.
[0280] Step S810 can correspond to step S710 in the above embodiment.
[0281] S820. Sequentially scan at least some of the M neighboring blocks, and determine a target neighboring block based on the scanning result.
[0282] Optionally, sequentially scan some of the M neighboring blocks, and determine a target neighboring block based on the scanning result.
[0283] Optionally, sequentially scan all of the M neighboring blocks, and determine a target neighboring block based on the scanning result.
[0284] S830. Divide the current image block into a plurality of sub-image blocks, where the size of the sub-image block is fixed to 64 or more pixels.
[0285] S840. Based on the motion vector of the target neighboring block and the sub-image block, determine a related block of the current image block in the reference image of the current image block.
[0286] Optionally, the reference image of the current image block is the reference image with the closest temporal distance to the image where the current image block is located.
[0287] Optionally, the reference image of the current image block is a reference image preset on the encoding side and the decoding side.
[0288] Optionally, the reference image of the current image block is a reference image specified in the moving picture parameter set, sequence header, sequence parameter set, picture header, picture parameter set, slice header.
[0289] S850, encode / decode the current image block based on the motion vectors of the related blocks.
[0290] In the embodiments of the present application, the size of the sub-image block of the current image block is fixed to 64 or more pixels, and there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0291] Optionally, in this embodiment, both the size of the sub-image block and / or the size of the temporal region reference block of the sub-image block are fixed to 8×8 pixels.
[0292] Currently, in the next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. In the embodiments of the present application, the size of the sub-image block of the current image block can be set to 8×8 to adapt to the storage granularity of the motion vectors defined in the video standard VVC. On the other hand, there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0293] On the premise of ensuring that the size of the sub-image block and / or the size of the related block of the sub-image block are fixed at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may be other dimensions. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, where A≤64 and B≤64, and both A and B are integers divisible by 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels or 16×4 pixels.
[0294] Optionally, step S820 includes sequentially scanning at least some of the neighboring blocks. When scanning reaches the neighboring block that meets the first preset condition, the scanning stops, and based on the first scanned neighboring block that meets the preset condition, the target neighboring block is determined.
[0295] For example, the neighboring block that meets the first preset condition is used as the target neighboring block.
[0296] For example, the definition of the preset condition is that the reference image of the neighboring block is the same as the reference image of the current image block.
[0297] Optionally, step S840 includes determining the related block of the sub-image block in the reference image of the current image block based on the motion vector of the target neighboring block and the sub-image block. Here, the related block of the current image block includes the related block of the sub-image block.
[0298] Above, in relation to FIGS. 7 and 8, embodiments of the method of the present application have been described. Hereinafter, embodiments of the apparatus corresponding to the embodiments of the method shown in FIGS. 7 and 8 will be described. Note that the description of the embodiments of the apparatus corresponds to the description of the embodiments of the method. Therefore, for those not described in detail, reference may be made to the above embodiments of the method. For the sake of simplicity, they will not be described again here.
[0299] FIG. 9 is a schematic block diagram of a moving image processing apparatus 900 provided by an embodiment of the present application. The apparatus 900 is used to execute an embodiment of the method shown in FIG. 7. The apparatus 900 includes the following units.
[0300] An acquisition unit 910, which is used to acquire M neighboring blocks of a current image block.
[0301] An acquisition unit 920, which is used to sequentially scan N neighboring blocks out of the M neighboring blocks and determine a target neighboring block based on the scanning result, where N is smaller than M.
[0302] The determination unit 920 is further used to determine a related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.
[0303] An encoding / decoding unit 930, which is used to encode / decrypt the current image block based on the motion vector of the related block.
[0304] In an embodiment of the present application, in the process of acquiring the target neighboring block of the current image block, only N (N is smaller than M) neighboring blocks out of the already acquired M neighboring blocks are sequentially scanned, so that the number of scans for neighboring block candidates in the process of acquiring the target neighboring block of the current image block can be reduced compared with the prior art, thereby reducing the complexity.
[0305] Optionally, as one embodiment, M is equal to 4 and N is smaller than 4.
[0306] Optionally, as one embodiment, N is equal to 1 or 2.
[0307] Optionally, as one embodiment, the determination unit 920 is used to sequentially scan the previous N neighboring blocks among the M neighboring blocks.
[0308] Optionally, as one example, the acquisition unit 910 sequentially acquires M neighboring blocks of the current image block in a preset order, and the previous N neighboring blocks refer to the first N neighboring blocks determined in the preset order.
[0309] Optionally, as one example, the determination unit 920 sequentially scans the N neighboring blocks. When the scan stops when it reaches the neighboring block that meets the first preset condition, it is used to determine the target neighboring block based on the first neighboring block that meets the preset condition that has been scanned.
[0310] Optionally, as one example, the determination unit 920 is used to set the neighboring block that meets the first preset condition as the target neighboring block.
[0311] Optionally, as one example, the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block.
[0312] Optionally, as one example, the encoding / decoding unit 930 is used to determine the reference block of the current image block based on the motion vector and reference image of the related block.
[0313] Optionally, as one example, the encoding / decoding unit 930 constructs a candidate block list for the current image block. The candidate blocks in the candidate block list include M neighboring blocks and related blocks, and it is used to encode and decode the current image block based on the reference blocks of the candidate blocks in the candidate block list.
[0314] Optionally, as an example, if the neighboring blocks that meet the preset conditions in the N neighboring blocks have not been scanned, the encoding / decoding unit 930 further performs scaling processing on the motion vectors of the specific neighboring blocks among the M neighboring blocks, and based on the motion vectors after the scaling processing, is used to encode / decrypt the current image block.
[0315] Optionally, as an example, the encoding / decoding unit 930 is used to determine the reference block of the current image block based on the motion vector after the scaling processing and the reference image of the current image block.
[0316] Optionally, as an example, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks.
[0317] Optionally, as an example, the encoding / decoding unit 930 performs scaling processing on the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling processing is the same as the reference image of the current image block, and is used to set the image block pointed to by the motion vector after the scaling processing in the reference image of the current image block as the reference block of the current image block.
[0318] Optionally, as an example, if the neighboring blocks that meet the preset conditions in the N neighboring blocks have not been scanned, the determination unit 920 is used to set the default block as the reference block of the current image block.
[0319] Optionally, as an example, the default block is the image block pointed to by the motion vector (0, 0).
[0320] Optionally, as an example, the determination unit 920 divides the current image block into a plurality of sub-image blocks, It is used to determine the associated block of the sub-image block in the reference image of the current image block based on the motion vector of the target neighboring block, and the associated block of the current image block includes the associated block of the sub-image block.
[0321] Optionally, as one example, the size of the sub-image block and / or the size of the associated block of the sub-image block are fixed to 64 or more pixels.
[0322] Optionally, as one example, the current image block is one coding unit CU.
[0323] Optionally, as one example, the determination unit 920 is used to determine the associated block of the current image block in the reference image of the current image block based on the motion vector of the target neighboring block.
[0324] Optionally, as one example, the neighboring block is an image block adjacent to the position of the current image block on the current image or having a certain position pitch.
[0325] Optionally, as one example, the encoding / decoding unit 930 is used to determine the reference block of the current image block based on the motion vector of the processed associated block and the reference image of the current image block when the reference image of the associated block is a specific reference image or the reference image of the current image block is a specific reference image. Here, the motion vector of the processed associated block and the motion vector of the unprocessed associated block are the same.
[0326] Optionally, as one example, the motion vector of the processed associated block includes the motion vector obtained after scaling the motion vector of the associated block at a scale of 1 in terms of value, or the motion vector of the associated block with the scaling step skipped.
[0327] Optionally, as an example, the encoding / decoding unit 930 is used to abandon determining the reference block of the current image block based on the motion vector of the associated block when the reference image of the associated block is the specific reference image, or when the reference image of the current block is the specific reference image.
[0328] Optionally, as an example, the determination unit 920 is used to determine the reference block of the current image block based on the motion vector of the processed associated block and the reference image of the current image block when the motion vector of the specific neighboring block points to the specific reference image, or when the reference image of the current image block is the specific reference image, where the motion vector of the processed associated block is the same as the motion vector of the unprocessed associated block.
[0329] Optionally, as an example, the motion vector of the processed associated block includes the motion vector obtained after scaling the motion vector of the associated block by a scale of 1, or the motion vector of the associated block with the scaling step skipped.
[0330] It should be noted that the acquisition unit 910, the determination unit 920, and the encoding / decoding unit 930 in this embodiment can all be realized by a processor.
[0331] As shown in FIG. 10, the embodiment of the present application further provides a video processing apparatus 1000. The apparatus 1000 is used to execute the method embodiment shown in FIG. 8. The apparatus 1000 includes the following units.
[0332] An acquisition unit 1010, which is used to acquire M neighboring blocks of the current image block.
[0333] A determination unit 1020, which is used to sequentially scan at least some of the M neighboring blocks and determine the target neighboring block based on the scanning result.
[0334] The splitting unit 1030 is used to split the current image block into a plurality of sub-image blocks. Here, the size of the sub-image block is fixed at 64 or more pixels.
[0335] The determination unit 1020 is further used to determine the related block of the current image block in the reference image of the current image block based on the motion vector of the target neighboring block and the sub-image block.
[0336] The encoding / decoding unit 1040 is used to encode / decrypt the current image block based on the motion vector of the related block.
[0337] In the embodiment of the present application, the size of the sub-image block of the current image block is fixed at 64 or more pixels, and there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0338] Optionally, as an example, both the size of the sub-image block and / or the size of the time-domain reference block of the sub-image block are fixed at 8×8 pixels.
[0339] Currently, in the next-generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored in a size of 8×8. In the embodiment of the present application, the size of the sub-image block of the current image block can be set to 8×8 to adapt to the storage granularity of the motion vector defined in the video standard VVC. On the other hand, there is no need to store the information of the size of the sub-image block of the previous encoded image block. Therefore, the storage space can be saved.
[0340] On the premise of ensuring that the size of the sub-image block and / or the size of the related block of the sub-image block are fixed at 64 pixels, the size of the sub-image block and / or the size of the related block of the sub-image block may further be other dimensions. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is A×B, A≤64, B≤64, and both A and B are integers divisible by 4. For example, the size of the sub-image block and / or the size of the related block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0341] Optionally, as an example, sequentially scanning at least some of the M neighboring blocks among the M neighboring blocks and determining the target neighboring block based on the scanning result includes sequentially scanning at least some of the neighboring blocks, stopping the scanning when reaching the neighboring block that meets the first preset condition, and determining the target neighboring block based on the first neighboring block that meets the preset condition that has been scanned.
[0342] Optionally, as an example, the determination unit 1020 is used to set the neighboring block that meets the first preset condition as the target neighboring block.
[0343] Optionally, as an example, the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block.
[0344] Optionally, as an example, the determination unit 1020 is used to determine the related block of the sub-image block in the reference image of the current image block based on the motion vector of the target neighboring block and the sub-image block. Here, the related block of the current image block includes the related block of the sub-image block.
[0345] It should be noted that the acquisition unit 1010, the determination unit 1020, the division unit 1030, and the encoding / decoding unit 1040 in this embodiment can all be realized by a processor.
[0346] As shown in FIG. 11, an embodiment of the present application further provides a moving image processing apparatus 1100. The apparatus 1100 may be used to execute the method embodiments described above. The apparatus 1100 includes a processor 1110 and a memory 1120. The memory 1120 is used to store instructions, and the processor 1110 executes the instructions stored in the memory 1120 and is used to cause the processor 1110 to execute the method according to the method embodiments described above by executing the instructions stored in the memory 1120.
[0347] Optionally, as shown in FIG. 11, the apparatus 1100 may include a communication interface 1130 for communicating with an external device. For example, the processor 1110 is used to control the communication interface 1130 to receive and / or transmit signals.
[0348] The apparatuses 500, 600, 900, 1000, and 1100 provided in the present application may be applied to an encoder or a decoder.
[0349] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a computer, the computer is caused to execute the method provided in the method embodiments described above.
[0350] An embodiment of the present application further provides a computer program product including instructions, and when the instructions are executed by a computer, the computer is caused to execute the method provided in the method embodiments described above.
[0351] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are uploaded to and executed by a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a certain website, computer, server, or data center to another website, computer, server, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium may be any available medium accessible by a computer, or may be a data storage device such as a server or data center integrated with one or more available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0352] A person skilled in the art can recognize that each unit and algorithm step of each example described in relation to the embodiments disclosed in this specification can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application of the technical solution and the design constraints. A person skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered outside the scope of this application.
[0353] In some embodiments provided in this specification, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the embodiments of the devices described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division, and there may be other division methods when actually implemented. For example, a plurality of units or assemblies may be combined, or integrated into other systems, or some features may be ignored or not executed. And the displayed or considered mutual coupling, direct coupling, or communication connection may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be in electrical, mechanical, or other forms.
[0354] The units described as the separation members may or may not be physically separated. The members represented as units may or may not be physical units, that is, they may be located in one place, or distributed in a plurality of network units. According to actual needs, some or all of these units can be selected to achieve the purpose of the solution of this embodiment.
[0355] Also, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may physically exist individually, or two or more units may be integrated into one unit.
[0356] As described above, it is merely a form for implementing the invention of the present application, and the protection scope of the present application is not limited thereto. For those skilled in the art, as long as it can be easily changed or replaced within the technical scope disclosed in the present application, it is included in the protection scope of the present application. Therefore, the protection scope of the present application shall be in accordance with the scope of the above-mentioned claims. (Item 1) A method for obtaining a motion vector of a moving image, comprising: obtaining M motion vector candidates to be included in the motion vector candidate list of the current image block; sequentially scanning N motion vector candidates smaller than M among the M motion vector candidates, and determining a reference motion vector based on the scanning result; determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block; and determining the motion vector of the current image block based on the motion vector candidate list. A method for obtaining a motion vector of a moving image. (Item 2) The obtaining of M motion vector candidates to be included in the motion vector candidate list of the current image block comprises: obtaining M motion vector candidates to be included in the motion vector candidate list of the current image block based on the motion vectors of M neighboring blocks within the current frame of the current image block. The method according to Item 1. (Item 3) The method according to Item 2, wherein the neighboring blocks are image blocks adjacent to the position of the current image block in the current frame or having a certain position pitch. (Item 4) The sequentially scanning of N motion vector candidates among the M motion vector candidates comprises: sequentially scanning the first N motion vector candidates among the M motion vector candidates. The method according to Item 2 or 3. (Item 5) M is equal to 4, and the method according to any one of items 1 to 4 where N is less than 4. (Item 6) The method according to item 5 where N is equal to 1 or 2. (Item 7) Sequentially scanning N of the M motion vector candidates among the M motion vector candidates and determining a reference motion vector based on the scanning result is The method according to any one of items 1 to 6, including sequentially scanning N of the M motion vector candidates among the M motion vector candidates based on a preset condition and determining the reference motion vector based on the scanning result. (Item 8) The preset condition is The method according to item 7, including a motion vector candidate whose reference frame pointed to is the same as the reference image of the current image block. (Item 9) Based on the preset condition, sequentially scanning N of the M motion vector candidates among the M motion vector candidates and determining the reference motion vector based on the scanning result is Sequentially scanning the N motion vector candidates, stopping the scanning when reaching the first motion vector candidate that meets the first preset condition, and determining the reference motion vector based on the first motion vector candidate that meets the preset condition among the scanned ones. The method according to item 7 or 8. (Item 10) Based on the preset condition, sequentially scanning N of the M motion vector candidates among the M motion vector candidates and determining the reference motion vector based on the scanning result is When a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, performing a scaling process on a specific motion vector candidate in the motion vector candidate list and determining the reference motion vector based on the scaled specific motion vector candidate. The method according to item 7 or 8. (Item 11) The method according to item 10, wherein the specific motion vector candidate is the first motion vector or the last motion vector obtained in the scanning order among the N motion vector candidates. (Item 12) Performing scaling processing on the specific motion vector candidate in the motion vector candidate list, and determining the reference motion vector based on the specific motion vector candidate after the scaling processing, Performing scaling processing on the specific motion vector candidate in the motion vector candidate list so that the reference frame pointed to by the specific motion vector candidate after the scaling processing is the same as the reference image of the current image block, The method according to item 10 or 11, including using the specific motion vector candidate after the scaling processing as the reference motion vector. (Item 13) Sequentially scanning N motion vector candidates out of the M motion vector candidates based on the preset conditions, and determining the reference motion vector based on the scanning result, The method according to item 7 or 8, including using a default value as the reference motion vector when a motion vector candidate that meets the preset conditions among the N motion vector candidates has not been scanned. (Item 14) The method according to item 13, wherein the default value is a motion vector (0, 0). (Item 15) Determining a motion vector candidate to be continuously inserted into the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block, Dividing the current image block into a plurality of sub-image blocks, Determining a related block of the sub-image block in the reference image of the current image block based on the reference motion vector, The method according to any one of items 1 to 14, including determining a motion vector candidate to be continuously inserted into the motion vector candidate list based on the motion vector of the related block. (Item 16) The method according to item 15, wherein the size of the sub-image block and / or the size of the related block of the sub-image block is fixed to 64 or more pixels. (Item 17) The method according to item 15, wherein the current image block is one coding unit CU. (Item 18) Determining a motion vector candidate to be continuously included in the motion vector candidate list based on the reference motion vector, the current image block, and the reference image of the current image block includes determining a related block of the current image block in the reference image of the current image block based on the reference motion vector; and determining a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the related block, according to the method described in any one of items 1 to 14. (Item 19) Determining a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the related block includes when the motion vector of the related block points to a specific reference image or the reference image of the current image block is a specific reference image, determining a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the related block after processing, and the motion vector of the related block after processing is the same as the motion vector of the related block before processing, according to the method described in any one of items 15 to 18. (Item 20) The motion vector of the related block after processing is a motion vector obtained after scaling the motion vector of the related block at a scale of 1, or the motion vector of the related block with the scaling step skipped, according to the method described in item 19. (Item 21) Determining motion vector candidates to be continuously included in the motion vector candidate list based on the motion vectors of the related blocks described above, The method according to any one of items 15 to 18, including abandoning determining motion vector candidates to be continuously included in the motion vector candidate list based on the motion vectors of the related blocks when the motion vectors of the related blocks point to a specific reference image or the reference image of the current image block is the specific reference image. (Item 22) The method further includes When the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, determining motion vector candidates to be continuously included in the motion vector candidate list based on the processed specific motion vector candidate, The method according to any one of items 10 to 12, wherein the processed specific motion vector candidate is the same as the specific motion vector candidate before processing. (Item 23) The motion vector of the related block after processing is A motion vector obtained after scaling the motion vector of the related block at a scale of 1, or The method according to item 22, including the motion vector of the related block with the scaling step skipped. (Item 24) The method further includes When the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, abandoning determining motion vector candidates to be continuously included in the motion vector candidate list based on the specific motion vector candidate, the method according to any one of items 10 to 12. (Item 25) The method according to any one of items 1 to 24, wherein the motion vector candidate list is a Merge candidate list. (Item 26) The method according to any one of items 1 to 25, wherein the reference image of the current image block is the same frame as the current image block. (Item 27) The method described in item 15, in which the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed at 8×8 pixels. (Item 28) A method for obtaining a motion vector of a moving image, comprising: obtaining M motion vector candidates to be included in the motion vector candidate list of the current image block; sequentially scanning at least some of the M motion vector candidates, and determining a reference motion vector of the current image block based on the scanning result; dividing the current image block into a plurality of sub-image blocks with a size fixed at 64 or more pixels; determining a related block of the sub-image block in the reference image of the current image block based on the reference motion vector; and determining a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the related block. A method for obtaining a motion vector of a moving image. (Item 29) The method described in item 28, in which the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed at 8×8 pixels. (Item 30) Sequentially scanning at least some of the M motion vector candidates and determining a reference motion vector based on the scanning result means: sequentially scanning at least some of the motion vector candidates, stopping the scanning when reaching a motion vector candidate that meets the first preset condition, and determining a reference motion vector based on the scanned motion vector candidate that meets the first preset condition. The method described in item 28. (Item 31) Determining a reference motion vector based on the scanned motion vector candidate that meets the first preset condition means: The method according to item 30, comprising using, as the target neighboring block, a motion vector candidate that meets the first preset condition. (Item 32) The preset condition includes that the reference image of the motion vector candidate is the same as the reference image of the current image block, according to the method described in item 30. (Item 33) A moving image processing method, comprising: obtaining M neighboring blocks of a current image block; sequentially scanning N neighboring blocks, which are less than M among the M neighboring blocks, and determining a target neighboring block based on a scanning result; determining a related block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block; encoding / decoding the current image block based on the motion vector of the related block. (Item 34) The method according to item 33, wherein M is equal to 4 and N is less than 4. (Item 35) The method according to item 34, wherein N is equal to 1 or 2. (Item 36) The sequential scanning of N neighboring blocks among the M neighboring blocks of the current image block includes sequentially scanning the first N neighboring blocks among the M neighboring blocks, according to the method described in any one of items 33 to 35. (Item 37) The obtaining of M neighboring blocks of the current image block includes sequentially obtaining M neighboring blocks of the current image block in a preset order, and the first N neighboring blocks refer to the first N neighboring blocks determined in the preset order, according to the method described in item 36. (Item 38) Sequentially scanning N of the M neighboring blocks among the foregoing neighboring blocks, and determining a target neighboring block based on the scanning result, Scanning the N neighboring blocks sequentially, stopping the scanning when reaching a neighboring block that meets the first preset condition, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition, which is included in any one of items 33 to 37. (Item 39) Determining a target neighboring block based on the scanned neighboring block that meets the first preset condition among the foregoing is Including setting the neighboring block that meets the first preset condition as the target neighboring block, which is the method described in item 38. (Item 40) The preset condition is Including that the reference image of the neighboring block is the same as the reference image of the current image block, which is the method described in item 39. (Item 41) Encoding / decoding the current image block based on the motion vector of the foregoing related block is Including determining a reference block of the current image block based on the motion vector of the related block and a reference image, which is the method described in any one of items 33 to 40. (Item 42) Encoding / decoding the current image block based on the motion vector of the foregoing related block is Constructing a candidate block list for the current image block, where the candidate blocks in the candidate block list include the M neighboring blocks and the related block, Encoding / decoding the current image block based on the reference blocks of the candidate blocks in the candidate block list, which is the method described in item 41. (Item 43) The method further includes When no neighboring block that meets the preset conditions has been scanned among the N neighboring blocks, perform scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks, and encode / decrypt the current image block based on the motion vector after the scaling processing. The method according to any one of items 33 to 42. (Item 44) Encoding / decrypting the current image block based on the motion vector after the scaling processing described above includes Determining a reference block of the current image block based on the motion vector after the scaling processing and a reference image of the current image block. The method according to item 43. (Item 45) The method according to item 43, wherein the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scanning order among the N neighboring blocks. (Item 46) Performing scaling processing on the motion vector of a specific neighboring block among the M neighboring blocks described above, and encoding / decrypting the current image block based on the motion vector after the scaling processing includes Performing scaling processing on the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling processing is the same as the reference image of the current image block; and Using the image block pointed to by the motion vector after the scaling processing in the reference image of the current image block as the reference block of the current image block. The method according to item 43. (Item 47) The method further includes When no neighboring block that meets the preset conditions has been scanned among the N neighboring blocks, using a default block as the reference block of the current image block. The method according to any one of items 33 to 42. (Item 48) The method according to item 47, wherein the default block is an image block pointed to by a motion vector (0, 0). (Item 49) Determining the associated block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block is dividing the current image block into a plurality of sub-image blocks, and determining the associated block of the sub-image block in the reference image of the current image block based on the motion vector of the target neighboring block, wherein the associated block of the current image block includes the associated block of the sub-image block, and is the method according to any one of Items 33 to 48. (Item 50) The method according to Item 49, wherein the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed to 64 or more pixels. (Item 51) The method according to any one of Items 33 to 50, wherein the current image block is one coding unit CU. (Item 52) Determining the associated block of the current image block based on the motion vector of the target neighboring block, the current image block, and the reference image of the current image block is determining the associated block of the current image block in the reference image of the current image block based on the motion vector of the target neighboring block, and is the method according to any one of Items 33 to 45. (Item 53) The method according to any one of Items 33 to 52, wherein the neighboring block is an image block adjacent to the position of the current image block in the current image or having a certain position pitch. (Item 54) Encoding / decoding the current image block based on the motion vector of the associated block is when the reference image of the associated block is a specific reference image or the reference image of the current image block is a specific reference image, determining the reference block of the current image block based on the motion vector of the processed associated block and the reference image of the current image block, The method according to any one of items 33 to 53, wherein the motion vector of the related block after the processing is the same as the motion vector of the related block before the processing. (Item 55) The motion vector of the related block after the processing is a motion vector obtained after scaling the motion vector of the related block by a scale of 1, or the method according to item 54, characterized by the motion vector of the related block skipping the scaling step. (Item 56) Encoding / decoding the current image block based on the motion vector of the related block includes when the reference image of the related block is a specific reference image, or the reference image of the current block is a specific reference image, giving up determining the reference block of the current image block based on the motion vector of the related block, the method according to any one of items 33 to 53. (Item 57) The method further includes when the motion vector of the specific neighboring block points to a specific reference image, or the reference image of the current image block is a specific reference image, further including determining the reference block of the current image block based on the motion vector of the related block after the processing and the reference image of the current image block, the method according to any one of items 43 to 46, wherein the motion vector of the related block after the processing is the same as the motion vector of the related block before the processing. (Item 58) The motion vector of the related block after the processing is a motion vector obtained after scaling the motion vector of the related block by a scale of 1, or the method according to item 57, including the motion vector of the related block skipping the scaling step. (Item 59) A moving image processing method, comprising: obtaining M neighboring blocks of a current image block; Sequentially scan at least some of the M neighboring blocks, and based on the scan results, determine the target neighboring block; Divide the current image block into a plurality of sub-image blocks fixed to pixels with a size of 64 or more; Based on the motion vector of the target neighboring block and the sub-image block, determine the related block of the current image block in the reference image of the current image block; Encode / Decode the current image block based on the motion vector of the related block. A moving image processing method including this. (Item 60) The method according to item 59, wherein the size of the sub-image block and / or the size of the temporal region reference block of the sub-image block are both fixed to 8×8 pixels, or 16×4 pixels or 4×16 pixels. (Item 61) Sequentially scan at least some of the M neighboring blocks, and based on the scan results, determine the target neighboring block. This is Sequentially scan at least some of the neighboring blocks. When scanning reaches a neighboring block that meets the first preset condition, stop the scan, and based on the scanned neighboring block that meets the first preset condition, determine the target neighboring block. The method according to item 59 including this. (Item 62) Based on the scanned neighboring block that meets the first preset condition, determine the target neighboring block. This is The method according to item 61, including using the neighboring block that meets the first preset condition as the target neighboring block. (Item 63) The preset condition is The method according to item 61, including that the reference image of the neighboring block is the same as the reference image of the current image block. (Item 64) Based on the motion vector of the block near the target and the sub-image block, determining the related block of the current image block in the reference image of the current image block is including determining the related block of the sub-image block in the reference image of the current image block based on the motion vector of the block near the target and the sub-image block, The method according to item 59, wherein the related block of the current image block includes the related block of the sub-image block. (Item 65) An apparatus for obtaining a motion vector of a moving image, an acquisition unit used to obtain M motion vector candidates to be included in a motion vector candidate list of a current image block; a determination unit that sequentially scans N motion vector candidates among the M motion vector candidates and is used to determine a reference motion vector based on a scan result, where N is smaller than M; The determination unit is further used to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the reference motion vector, the current image block, and a reference image of the current image block, The determination unit is further an apparatus for obtaining a motion vector of a moving image, which is used to determine a motion vector of the current image block based on the motion vector candidate list. (Item 66) The acquisition unit according to item 65 is used to obtain M motion vector candidates to be included in the motion vector candidate list of the current image block based on motion vectors of M neighboring blocks within the current frame of the current image block. (Item 67) The apparatus according to item 66, wherein the neighboring block is an image block adjacent to the position of the current image block in the current frame or having a certain position pitch. (Item 68) The determination unit is the apparatus according to item 66 or 67 used for sequentially scanning the first N motion vector candidates among the M motion vector candidates. (Item 69) The apparatus according to any one of items 65 to 68, where M is equal to 4 and N is less than 4. (Item 70) The apparatus according to item 69, where N is equal to 1 or 2. (Item 71) The determination unit is the apparatus according to any one of items 65 to 70 used for sequentially scanning N motion vector candidates among the M motion vector candidates based on preset conditions and determining the reference motion vector based on the scanning result. (Item 72) The preset conditions are The apparatus according to item 71 including a motion vector candidate whose reference frame pointed to is the same as the reference image of the current image block. (Item 73) The determination unit is the apparatus according to item 71 or 72 used for sequentially scanning the N motion vector candidates, stopping the scanning when reaching the first motion vector candidate that meets the first preset condition, and determining the reference motion vector based on the first motion vector candidate that meets the first preset condition among the scanned ones. (Item 74) The determination unit is the apparatus according to item 71 or 72 used for performing scaling processing on a specific motion vector candidate in the motion vector candidate list when a motion vector candidate that meets the preset condition among the N motion vector candidates has not been scanned, and determining the reference motion vector based on the specific motion vector candidate after the scaling processing. (Item 75) The specific motion vector candidate is the first motion vector or the last motion vector obtained in the scanning order among the N motion vector candidates in the apparatus according to item 74. (Item 76) The determination unit performs scaling processing on a specific motion vector candidate in the motion vector candidate list so that the reference frame pointed to by the scaled specific motion vector candidate is the same as the reference image of the current image block, and is used to set the scaled specific motion vector candidate as the reference motion vector. The device according to item 74 or 75. (Item 77) When a motion vector candidate that meets the preset conditions among the N motion vector candidates has not been scanned, the determination unit is the device according to item 71 or 72 that is used to set a default value as the reference motion vector. (Item 78) The device according to item 77, wherein the default value is a motion vector (0, 0). (Item 79) The determination unit divides the current image block into a plurality of sub-image blocks, determines related blocks of the sub-image blocks in the reference image of the current image block based on the reference motion vector, and continues to put the motion vector candidates into the motion vector candidate list based on the motion vectors of the related blocks. The device according to any one of items 65 to 78 for determining the motion vector candidates to be included. (Item 80) The device according to item 79, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels. (Item 81) The device according to item 79, wherein the current image block is one coding unit CU. (Item 82) The determination unit determines related blocks of the current image block in the reference image of the current image block based on the reference motion vector, and continues to put the motion vector candidates into the motion vector candidate list based on the motion vectors of the related blocks. The device according to any one of items 65 to 78 for determining the motion vector candidates to be included. (Item 83) When the motion vector of the associated block points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit is used to determine a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the associated block after processing, and the apparatus according to any one of items 79 to 82, wherein the motion vector of the associated block after processing is the same as the motion vector of the associated block before processing. (Item 84) The motion vector of the associated block after processing is a motion vector obtained after scaling the motion vector of the associated block by a scale of 1, or the apparatus according to item 83, including the motion vector of the associated block for which the scaling step is skipped. (Item 85) When the motion vector of the associated block points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit is used to abandon determining a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the associated block, and the apparatus according to any one of items 79 to 82. (Item 86) When the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, the determination unit is used to determine a motion vector candidate to be continuously included in the motion vector candidate list based on the specific motion vector candidate after processing, and the apparatus according to any one of items 74 to 76, wherein the specific motion vector candidate after processing is the same as the specific motion vector candidate before processing. (Item 87) The motion vector of the associated block after processing is a motion vector obtained after scaling the motion vector of the associated block by a scale of 1, or the apparatus according to item 86, including the motion vector of the associated block for which the scaling step is skipped. (Item 88) The determination unit is used to abandon determining a motion vector candidate to be continuously included in the motion vector candidate list based on the specific motion vector candidate when the specific motion vector candidate points to a specific reference image or the reference image of the current image block is the specific reference image, and is an apparatus according to any one of items 74 to 76. (Item 89) The apparatus according to any one of items 65 to 88, wherein the motion vector candidate list is a Merge candidate list. (Item 90) The apparatus according to any one of items 65 to 89, wherein the reference image of the current image block is the same position frame of the current image block. (Item 91) The apparatus according to item 79, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed to 8×8 pixels. (Item 92) An apparatus for obtaining a motion vector of a moving image, an acquisition unit used to acquire M motion vector candidates to be included in a motion vector candidate list of a current image block; a determination unit that sequentially scans at least some of the M motion vector candidates and determines a reference motion vector of the current image block based on a scan result; and a division unit used to divide the current image block into a plurality of sub-image blocks whose size is fixed to 64 or more pixels, wherein the determination unit is further used to determine a related block of the sub-image block in the reference image of the current image block based on the reference motion vector; and the determination unit is further an apparatus for obtaining a motion vector of a moving image, which is used to determine a motion vector candidate to be continuously included in the motion vector candidate list based on the motion vector of the related block. (Item 93) The device according to item 92, wherein the size of the sub-image block and / or the size of the related block of the sub-image block are both fixed at 8×8 pixels. (Item 94) The device according to item 92, wherein the determination unit sequentially scans the at least some of the motion vector candidates, stops scanning when it scans a motion vector candidate that meets the first preset condition, and determines a reference motion vector based on the scanned motion vector candidate that meets the first preset condition. (Item 95) The device according to item 94, wherein the determination unit uses the motion vector candidate that meets the first preset condition as the target neighboring block. (Item 96) The device according to item 94, wherein the preset condition includes that the reference image of the motion vector candidate is the same as the reference image of the current image block. (Item 97) A moving image processing device, An acquisition unit used to acquire M neighboring blocks of a current image block, A determination unit that sequentially scans N neighboring blocks smaller than M among the M neighboring blocks and determines a target neighboring block based on the scanning result, and further uses the motion vector of the target neighboring block, the current image block, and the reference image of the current image block to determine a related block of the current image block, A moving image processing device including an encoding / decoding unit used to encode / decode the current image block based on the motion vector of the related block. (Item 98) The device according to item 97, wherein M is equal to 4 and N is smaller than 4. (Item 99) The device according to item 98, wherein N is equal to 1 or 2. (Item 100) The determination unit is the apparatus according to any one of items 97 to 99 used for sequentially scanning the first N neighboring blocks among the M neighboring blocks. (Item 101) The acquisition unit is used for sequentially acquiring M neighboring blocks of the current image block in a preset order. The apparatus according to item 100, wherein the first N neighboring blocks refer to the first N neighboring blocks determined first in the preset order. (Item 102) The determination unit sequentially scans the N neighboring blocks. When the scanning stops when reaching the neighboring block that meets the first preset condition, and based on the neighboring block that meets the first preset condition that has been scanned, it is used to determine the target neighboring block, which is the apparatus according to any one of items 97 to 101. (Item 103) The determination unit is the apparatus according to item 102 used for setting the neighboring block that meets the first preset condition as the target neighboring block. (Item 104) The preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block, which is the apparatus according to item 103. (Item 105) The encoding / decoding unit is the apparatus according to any one of items 97 to 104 used for determining the reference block of the current image block based on the motion vector and reference image of the related block. (Item 106) The encoding / decoding unit constructs a candidate block list for the current image block. The candidate blocks in the candidate block list include the M neighboring blocks and the related block. Based on the reference blocks of the candidate blocks in the candidate block list, it is used to encode / decrypt the current image block, which is the apparatus according to item 105. (Item 107) When the neighborhood blocks that meet the preset conditions among the N neighborhood blocks have not been scanned, the encoding / decoding unit further performs scaling processing on the motion vectors of specific neighborhood blocks among the M neighborhood blocks, and based on the motion vectors after the scaling processing, the apparatus according to any one of items 97 to 106 used for encoding / decoding the current image block. (Item 108) The encoding / decoding unit is the apparatus according to item 107, which is used to determine the reference block of the current image block based on the motion vector after the scaling processing and the reference image of the current image block. (Item 109) The specific neighborhood block is the apparatus according to item 107, which is the first neighborhood block or the last neighborhood block obtained in the scanning order among the N neighborhood blocks. (Item 110) The encoding / decoding unit performs scaling processing on the motion vector of the specific neighborhood block so that the reference frame pointed to by the motion vector after the scaling processing is the same as the reference image of the current image block, and the image block pointed to in the reference image of the current image block by the motion vector after the scaling processing is used as the reference block of the current image block, which is the apparatus according to item 107. (Item 111) When the neighborhood blocks that meet the preset conditions among the N neighborhood blocks have not been scanned, the determination unit is the apparatus according to any one of items 97 to 106, which is used to set the default block as the reference block of the current image block. (Item 112) The default block is the apparatus according to item 111, which is the image block pointed to by the motion vector (0, 0). (Item 113) The determination unit divides the current image block into a plurality of sub-image blocks, It is used to determine the related block of the sub-image block in the reference image of the current image block based on the motion vector of the object neighboring block, and the related block of the current image block includes the related block of the sub-image block. The apparatus according to any one of items 97 to 112. (Item 114) The size of the sub-image block and / or the size of the related block of the sub-image block are fixed to 64 or more pixels. The apparatus according to item 113. (Item 115) The current image block is one coding unit CU. The apparatus according to any one of items 97 to 114. (Item 116) The determination unit is used to determine the related block of the current image block in the reference image of the current image block based on the motion vector of the object neighboring block. The apparatus according to any one of items 97 to 109. (Item 117) The neighboring block is an image block adjacent to the position of the current image block in the current image or having a certain position pitch. The apparatus according to any one of items 97 to 116. (Item 118) The encoding / decoding unit is used to determine the reference block of the current image block based on the motion vector of the related block after processing and the reference image of the current image block when the reference image of the related block is a specific reference image or the reference image of the current image block is a specific reference image. The motion vector of the related block after processing and the motion vector of the related block before processing are the same. The apparatus according to any one of items 97 to 117. (Item 119) The motion vector of the related block after processing is The motion vector obtained after scaling the motion vector of the related block at a scale of 1, or The motion vector of the related block including skipping the scaling step. The apparatus according to item 118. (Item 120) The encoding / decoding unit is an apparatus according to any one of Items 97 to 117 used to abandon determining a reference block of the current image block based on a motion vector of the associated block when a reference image of the associated block is a specific reference image or a reference image of the current block is a specific reference image. (Item 121) The determination unit is used to determine a reference block of the current image block based on a motion vector of the processed associated block and a reference image of the current image block when a motion vector of the neighboring block points to a specific reference image or a reference image of the current image block is a specific reference image, and is an apparatus according to any one of Items 107 to 110 in which the motion vector of the processed associated block and the motion vector of the associated block before processing are the same. (Item 122) The motion vector of the processed associated block is a motion vector obtained after scaling the motion vector of the associated block at a scale of 1, or is an apparatus according to Item 121 including the motion vector of the associated block with the scaling step skipped. (Item 123) A moving image processing apparatus, an acquisition unit used to acquire M neighboring blocks of a current image block, a determination unit used to sequentially scan at least some of the M neighboring blocks and determine a target neighboring block based on a scan result, and further used to determine an associated block of the current image block in a reference image of the current image block based on a motion vector of the target neighboring block and the sub-image block, and a division unit used to divide the current image block into a plurality of sub-image blocks fixed to pixels with a size of 64 or more. A moving image processing apparatus including an encoding / decoding unit used to encode / decode the current image block based on the motion vector of the associated block. (Item 124) The apparatus according to item 123, wherein the size of the sub-image block and / or the size of the temporal region reference block of the sub-image block are both fixed to 8×8 pixels. (Item 125) Sequentially scanning at least some of the M neighboring blocks among the neighboring blocks, and determining a target neighboring block based on the scanning result. The apparatus according to item 123, including sequentially scanning at least some of the neighboring blocks, stopping the scanning when reaching a neighboring block that meets the first preset condition, and determining a target neighboring block based on the neighboring block that meets the first preset condition among the scanned blocks. (Item 126) The apparatus according to item 125, wherein the determination unit is used to use the neighboring block that meets the first preset condition as the target neighboring block. (Item 127) The apparatus according to item 125, wherein the preset condition includes that the reference image of the neighboring block is the same as the reference image of the current image block. (Item 128) The apparatus according to item 123, wherein the determination unit is used to determine an associated block of the sub-image block in the reference image of the current image block based on the motion vector of the target neighboring block and the sub-image block, and the associated block of the current image block includes the associated block of the sub-image block. (Item 129) A moving image processing apparatus including a memory and a processor, wherein the memory is used to store instructions, the processor executes the instructions stored in the memory, and by executing the instructions stored in the memory, the processor is used to execute the method according to any one of items 1 to 64. (Item 130) A computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a computer, the computer is caused to execute the method according to any one of Items 1 to 64. (Item 131) A computer program product including instructions, wherein when the instructions are executed by a computer, the computer is caused to execute the method according to any one of Items 1 to 64.
Claims
1. Obtaining a motion vector of one particular neighboring block of a current image block; Dividing the current image block into a plurality of sub-blocks; Determining a plurality of associated blocks of the plurality of sub-blocks in a same frame of the current image block according to the motion vector of the neighboring block satisfying a preset condition; and encoding or decoding the sub-blocks of the current image block based on the motion vectors of the associated blocks.
2. The video processing method according to claim 1 , wherein the neighboring block is one specific left neighboring block.
3. 3. The video processing method of claim 2, further comprising: encoding or decoding the sub-blocks by using default blocks as the associated blocks of the sub-blocks in response to the left neighboring block not satisfying the preset condition.
4. 4. The video processing method of claim 3, wherein the default block is pointed to by a motion vector (0,0).
5. predicting the current image block based on the motion vectors of the plurality of associated blocks, A moving image processing method according to any one of claims 1 to 4, comprising: when the reference images of the plurality of associated blocks are specific reference images and / or when the reference image of the current image block is a specific reference image, the motion vector of the sub-block is determined according to the motion vectors of the plurality of associated blocks after processing.
6. The video processing method according to claim 5 , wherein the motion vectors of the plurality of related blocks after the processing include motion vectors of the plurality of related blocks in which a scaling step has been skipped.
7. predicting the current image block based on the motion vectors of the plurality of associated blocks, A moving image processing method according to any one of claims 1 to 6, comprising: when the reference images of the plurality of associated blocks are specific reference images, or when the reference image of the current image block is a specific reference image, the motion vector of the sub-block is determined without reference to the motion vectors of the plurality of associated blocks.
8. The method of claim 1 , further comprising: outputting a codestream obtained by encoding the current image block.
9. A processor; obtaining a motion vector of one particular neighboring block of a current image block; Dividing the current image block into a plurality of sub-blocks; Determining a plurality of associated blocks of the plurality of sub-blocks in a same frame of the current image block according to the motion vector of the neighboring block satisfying a preset condition; and encoding or decoding the plurality of sub-blocks of the current image block based on the motion vectors of the plurality of related blocks.
10. The apparatus of claim 9 , further comprising: outputting a codestream obtained by encoding the current image block.
11. Obtaining a motion vector of one particular neighboring block of a current image block; Dividing the current image block into a plurality of sub-blocks; Determining a plurality of associated blocks of the plurality of sub-blocks in a same frame of the current image block according to the motion vector of the neighboring block satisfying a preset condition; encoding the sub-blocks of the current image block based on the motion vectors of the associated blocks to generate a bitstream including motion information of the current image block.
Citation Information
Patent Citations
Sub-prediction unit (pu)-based temporal motion vector prediction in hevc and sub-pu design in 3d-hevc
JP2016537839A
Video processing method and apparatus based on inter-prediction mode
JP2021517798A
JPP7294753B
Sub-prediction unit (PU) based temporal motion vector prediction in HEVC and sub-PU design in 3d-hevc
US20150085929A1