Video processing method, video processing device, and bitstream generation method
By sequentially scanning fewer motion vector candidates and fixing sub-image block sizes, the method simplifies the motion vector determination process in video coding, reducing complexity and conserving storage space while maintaining performance in Advanced Temporal Motion Vector Prediction.
Patent Information
- Application Number
- JP2024122098
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-08-31
- Filing Date
- 2024-07-29
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2038-09-25
AI Technical Summary
Current video coding standards face inefficiencies in the block-based motion compensation process, particularly in the construction of motion vector candidate lists, leading to increased complexity and redundant operations in Advanced Temporal Motion Vector Prediction (ATMVP) techniques.
The method reduces complexity by sequentially scanning fewer motion vector candidates and fixing the size of sub-image blocks to 64 pixels or more, eliminating the need to store previous encoded block sizes, thereby simplifying the process and maintaining performance gains.
This approach reduces the number of scans required for motion vector determination, decreases computational complexity, and conserves storage space while maintaining the performance of conventional ATMVP techniques.
Smart Images

Figure 2024147810000001_ABST
Abstract
Description
[Technical field]
[0001] Copyright Notice The subject matter disclosed in this patent document contains material that is subject to copyright protection. Such copyright is owned by the Copyright Owner. The Copyright Owner has no objection to the facsimile reproduction by anyone of these patent documents or the patent disclosure, as it appears in the Patent and Trademark Office official records or files.
[0002] The present application relates to the field of video coding, and in particular to a method and apparatus for obtaining motion vectors of a video. [Background technology]
[0003] Currently, all major video coding standards adopt block-based motion compensation technology in the inter-frame prediction part, and its main principle is to search for the most similar block in the already coded image for the current image block, and this process is called motion compensation. For example, for a frame image, it is first divided into coding tree units (CTUs) with the same size, for example, 64×64 or 128×128 in size. Each CTU can be further divided into square or rectangular coding units (CUs). Each CU searches for the most similar block in a reference frame (usually a reconstructed frame in the vicinity of the time domain of the current frame) as the prediction block of the current CU. The relative displacement between the current block (i.e., the current CU) and the similar block (i.e., the prediction block of the current CU) is called the motion vector (MV). The process of searching for the most similar block in the reference frame as the prediction block of the current block is motion compensation.
[0004] In the current technology, a motion vector candidate list of the current CU is usually constructed based on the motion vectors of the coded neighboring blocks of the current CU, which is also called a merge candidate list. From the merge candidate list, a most suitable candidate motion vector is selected as the motion vector of the current CU, and a prediction 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 ATMVP technology is to perform motion compensation by obtaining motion information of multiple sub-blocks in the current CU. ATMVP technology introduces motion information of multiple sub-blocks in the current CU as candidates in constructing a candidate list (e.g., merge candidate list or AMVP (Advanced Motion Vector Prediction) candidate list). The realization of ATMVP technology is roughly divided into two steps. In step 1, one time domain vector is determined by scanning the candidate list of the current CU. In step 2, the current CU is divided into N×N (N is 4 by default) sub-blocks (sub-CUs), and the corresponding block in the reference frame of each sub-block is determined based on the time domain vector obtained in step 1, and the motion vector of each sub-block is determined based on the motion vector of the corresponding block in the reference frame of each sub-block.
[0006] In step 1 of the current ATMVP technique, the process of determining the time domain vector by scanning the candidate list of the current CU leaves room for improvement. Summary of the Invention
[0007] The present application provides a method and apparatus for acquiring motion vectors of a video image, which can reduce the complexity of the ATMVP technique while maintaining the performance gain of the conventional ATMVP technique.
[0008] A first aspect provides a method for obtaining a motion vector of a moving image, the method including: 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 among the M motion vector candidates, the N motion vector candidates being less than M, 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 a reference image of the current image block; and determining a motion vector for 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 already obtained M motion vector candidates are sequentially scanned, and the number of scanning times for the motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0010] A second aspect provides a method for obtaining a motion vector of a moving image, the method including: obtaining M motion vector candidates to be included in a motion vector candidate list of a current image block; sequentially scanning at least a portion 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 having a fixed size of 64 pixels or more; determining an associated block of the sub-image block in a reference image of the current image block based on the reference motion vector; and determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block.
[0011] In the technical solution provided by the present application, the size of the sub-image block of the current image block is fixed at 64 pixels or more, and there is no need to store information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0012] A third aspect provides an apparatus for processing a moving image, the apparatus including: an acquisition unit used for acquiring M motion vector candidates to be put into a motion vector candidate list of a current image block; and a determination unit used for sequentially scanning N motion vector candidates among the M motion vector candidates and determining a reference motion vector based on a scanning result, where N is less than M, the determination unit is further used for determining a motion vector candidate to be subsequently put into 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 for determining a motion vector of the current image block based on the motion vector candidate list.
[0013] A fourth aspect provides an apparatus for processing a moving image, the apparatus including: an acquisition unit used for acquiring M motion vector candidates to be put into a motion vector candidate list of a current image block; a determination unit used for sequentially scanning at least a part of the M motion vector candidates and determining a reference motion vector of the current image block based on a scanning result; and a division unit used for dividing the current image block into a plurality of sub-image blocks, each having a size fixed to 64 pixels or more, the determination unit being further used for determining an associated block of the sub-image block in a reference image of the current image block based on the reference motion vector, the determination unit being further used for determining a motion vector candidate to be subsequently put into the motion vector candidate list based on a motion vector of the associated block.
[0014] A fifth aspect provides a video processing method, which includes: obtaining M neighboring blocks of a current image block; sequentially scanning N neighboring blocks among the M neighboring blocks, the N neighboring blocks being less than M, and determining a target neighboring block based on the scanning result; determining an associated 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 associated 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 less than M) neighboring blocks among the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans for neighboring block candidates in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0016] A sixth aspect provides a video processing method, the method including: obtaining M neighboring blocks of a current image block; sequentially scanning at least a portion of the neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result; dividing the current image block into a plurality of sub-image blocks having a fixed size of 64 pixels or more; determining 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 encoding / decoding the current image block based on the motion vector of the associated block.
[0017] In the 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 there is no need to store information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0018] A seventh aspect provides an apparatus for processing a moving image, the apparatus including: an acquisition unit used for acquiring M neighboring blocks of a current image block; a determination unit used for sequentially scanning N neighboring blocks among the M neighboring blocks, the N neighboring blocks being smaller than M, and determining a target neighboring block based on the scanning result, further used for determining an associated 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 for encoding / decoding the current image block based on the motion vector of the associated block.
[0019] An eighth aspect provides an apparatus for processing a moving image, the apparatus including: an acquisition unit used for acquiring M neighboring blocks of a current image block; a determination unit used for sequentially scanning at least a portion of the neighboring blocks among the M neighboring blocks and determining a target neighboring block based on the scanning result, the determination unit being further used for determining 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 its sub-image block; a division unit used for dividing the current image block into a plurality of sub-image blocks having a fixed size of 64 pixels or more; and an encoding / decoding unit used for encoding / decoding the current image block based on the motion vector of the associated block.
[0020] A ninth aspect provides an apparatus for processing moving images, the apparatus comprising a memory and a processor, the memory adapted to store instructions and the processor adapted to execute the instructions stored in the memory, whereby executing the instructions stored in the memory causes the processor to perform a method provided in the first, second, fifth or sixth aspect.
[0021] A tenth aspect provides a chip having a processing module and a communication interface, the processing module being used to control the communication interface to communicate with the outside, the processing module being used to realize a method provided in the first, second, fifth or sixth aspect.
[0022] An eleventh aspect provides a computer-readable storage medium having stored thereon a computer program which, when executed by a computer, causes the computer to realise a method provided in the first, second, fifth or sixth aspect.
[0023] A twelfth aspect provides a computer program product comprising instructions which, when executed by a computer, cause the computer to perform a method provided in the first, second, fifth or sixth aspect. [Brief description of the drawings]
[0024] [Figure 1] 4 is a schematic flow chart of a method for obtaining video motion vectors provided by an embodiment of the present application; [Diagram 2] FIG. 2 is a schematic diagram of obtaining motion vector candidates for a current block according to neighboring blocks of the current image block; [Diagram 3] FIG. 2 is a schematic diagram of a scaling process performed on candidate motion vectors; [Figure 4] 4 is another schematic flow chart of the method for obtaining video motion vectors provided by an embodiment of the present application; [Diagram 5] 1 is a schematic block diagram of a video processing device provided by an embodiment of the present application; [Figure 6] FIG. 2 is another schematic block diagram of a video processing device provided by an embodiment of the present application; [Figure 7] 1 is a schematic flow chart of a video processing method provided by an embodiment of the present application. [Figure 8]4 is another schematic flow chart of a video processing method provided by an embodiment of the present application; [Figure 9] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 10] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; [Figure 11] FIG. 2 is a schematic block diagram of a further moving image processing device provided by an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] In order to facilitate understanding of the following description, a motion vector will be interpreted here. The motion vector of an image block can include two pieces of information: 1) the image pointed to by the motion vector, and 2) a displacement. The motion vector of an image block means an image block having the displacement with the image block in the image pointed to by the motion vector. For an encoded / decoded image block, the meaning of the 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 relative to the encoded / decoded image block. Note that the reference block of an image block described here means an image block used to calculate the residual of the image block.
[0026] 1 is a schematic flow chart of a method for obtaining video motion vectors provided by an embodiment of the present application. The method includes the following steps:
[0027] S110, obtain M motion vector candidates to be put into a motion vector candidate list of the current image block.
[0028] The current image block is the image block to be coded (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 other names.
[0032] The M motion vector candidates may be determined based on the motion vectors of M neighboring blocks in a current frame of the current image block, which may be image blocks adjacent to or having a certain position pitch of the current image block in the current frame, and it should be understood that the M neighboring blocks are image blocks that have been coded (or decoded) in the current frame.
[0033] As an example, as shown in Fig. 2, the M neighboring blocks of the current image block are image blocks located at four positions A1 (left) → B1 (top) → B0 (top right) → A0 (bottom left) around the current image block shown in Fig. 2. The motion vectors of the image blocks at these four positions are set as M (i.e., M is equal to 4) motion vector candidates of the current image block.
[0034] As one possible embodiment, after completing step S110, M motion vector candidates have already been put into the motion vector candidate list, and in step S120, the motion vector candidate list can be scanned directly.
[0035] S120, sequentially scanning N motion vector candidates among the M motion vector candidates, and determining a reference motion vector according to the scanning result, where N is less than M;
[0036] The process of determining a reference motion vector based on the scanning result of the N motion vector candidates may be a process of sequentially judging the N motion vector candidates based on a preset condition, and determining a reference motion vector based on the judgment result.
[0037] As an example, the preset condition is defined as the reference frame pointed to by the motion vector candidate and the reference image of the current image block being the same.
[0038] Here, the reference image of the current image block is a reference image that is closest in time to the image in which the current image block is located, or the reference image of the current image block is a reference image that is preset on the encoding side and the decoding side, or the reference image of the current image block is a reference image specified in the current image parameter set, sequence header, sequence parameter set, image header, image parameter set, or slice header.
[0039] For example, the reference image of the current image block is a collocated frame of the current image block, and the collocated frame is a frame for obtaining and predicting the motion information set in the slice level information header. In some application scenarios, the collocated frame is also called a collocated picture.
[0040] It should be understood that, depending on future technological evolution, this pre-set condition may be given other different definitions, and the corresponding solutions also fall within the scope of protection of the present application.
[0041] The process of determining a reference motion vector based on the scanning result of N motion vector candidates will now be described in detail.
[0042] In step S120, only N motion vectors among the M motion vector candidates obtained in step S110 are scanned, thus reducing the number of scans.
[0043] Optionally, in step S120, the previous 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, or the middle N motion vector candidates among the M motion vector candidates may be sequentially scanned, although 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, a part of the motion vector candidates that are already included in the motion vector candidate list are sequentially scanned.
[0047] S130, determining a motion vector candidate to be subsequently put into the motion vector candidate list according to the reference motion vector, the current image block and the reference image of the current image block.
[0048] It should be understood that after completing step S130, the construction of the motion vector candidate list of the current image block is completed, where the motion vector candidate list of the current image block includes the M motion vector candidates determined in step S110 and the motion vector candidate determined in step S130.
[0049] As shown in FIG. 1, the method further includes determining S140 a motion vector for the current image block based on the motion vector candidate list obtained in S130.
[0050] It should be understood that the solution provided in this application can be applied to the ATMVP technology. For example, step S120 can realize step 1 in the conventional ATMVP technology.
[0051] In step 1 of the conventional ATMVP technique, the time domain vector of the current image block is obtained by scanning all the motion vector candidates currently already entered in the motion vector candidate list. For example, when the motion vector candidate list is usually filled with four motion vector candidates, the following situation may occur: to obtain the time domain vector of the current image block, it is necessary to scan the four motion vector candidates.
[0052] Meanwhile, in the embodiment of 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 already obtained are sequentially scanned, so that the number of scans of the motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0053] The applicant selected the official common test sequence as the test sequence on the latest reference software VTM-2.0 for next-generation video coding (Versatile Video Coding), and conducted tests on the solution provided in this application in the test configurations of RA configuration and LDB configuration. The test results show that the performance gains of ATMVP technology can be maintained after reducing the number of scans.
[0054] Therefore, the solution provided in this application can reduce the complexity of the ATMVP technology while maintaining the performance gains of the conventional ATMVP technology.
[0055] It should be understood that the solution for constructing a motion vector candidate list provided in the present application can be applied to the encoding side and the decoding side, in other words, the method provided in the present application can be performed by either the encoding side or the decoding side.
[0056] As an example, on the encoding side, after obtaining the 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 an 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) Determine a predicted image block of the current image block from a reference image (ie, a reference frame) according to the motion vector MV1 of the current image block, that is, determine the position of the predicted image block of the current image block in the reference frame.
[0059] 3) Obtaining the residual between the current image block and the predicted image block.
[0060] 4) The motion vector MV1 of the current image block is sent to the decoding side, along with its index in the motion vector candidate list and the residual obtained in step 3).
[0061] As an example, on the decoding side, the current image block can be decoded in the following steps.
[0062] 1) Receive a residual and an index in a motion vector candidate list of a motion vector of a current image block from an encoding side.
[0063] 2) Obtain a motion vector candidate list according to the method of the embodiment of the present application, and the motion vector candidate list obtained on the decoding side is consistent with the motion vector candidate list obtained on the encoding side.
[0064] 3) Obtain the motion vector MV1 of the current image block from the motion vector candidate list based on the index.
[0065] 4) Obtain a predicted image block of the current image block according to the motion vector MV1, 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 four neighboring blocks in the current frame of the current image block, determine four motion vector candidates to be put into the motion vector candidate list of the current image block, i.e., M is equal to 4. In step S120, scan N motion vector candidates among the four motion vector candidates, where N is less than 4.
[0067] For example, N is equal to 1. For example, in step S120, only the first motion vector candidate in the motion vector candidate list is scanned.
[0068] Also, for example, N is equal to 2 or 3.
[0069] The method of determining the reference motion vector of the current image block based on the scanning result of the N motion vector candidates in step S120 will be described below.
[0070] In step S120, determine whether N motion vector candidates among M motion vector candidates satisfy a preset condition one by one, and determine a reference motion vector according to the determination result. Here, the definition of the preset condition is taken as an example that the reference frame indicated by the motion vector candidate is the same as the reference image of the current image block.
[0071] Optionally, in step S120, the N motion vector candidates are sequentially scanned, and when a motion vector candidate that meets the first preset condition is scanned, i.e., when a motion vector candidate whose first reference frame and the same frame of the current frame are the same is scanned, the scanning is stopped, and a reference motion vector is determined based on the scanned motion vector candidate that meets the first preset condition.
[0072] When scanning until a motion vector candidate that meets the first preset condition is reached, the number of scans may be equal to or less than N.
[0073] For example, if the first motion vector candidate scanned satisfies a 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 no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, i.e., when the reference frames pointed to by the N motion vector candidates are all different from the same frame of the current image block, a default value is set as the value of the reference motion vector.
[0075] For example, the default value is (0,0), ie, the reference motion vector is (0,0).
[0076] It should be understood that the default values may have different definitions depending on the context.
[0077] Optionally, in step S120, when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, i.e., when the reference frames pointed to by the N motion vector candidates are all different from the same frame of the current image block, a scaling process is performed on a specific motion vector candidate in the motion vector candidate list, and a reference motion vector is determined based on the specific motion vector candidate after the scaling process.
[0078] The specific motion vector candidate may be the first or last motion vector obtained in scanning order among the N motion vector candidates.
[0079] The specific motion vector candidate may also be a motion vector obtained in another scanning order among the N motion vector candidates.
[0080] When the preset condition is defined as the reference frame pointed to by the motion vector candidate being the same as the reference frame of the current image block, performing a scaling process 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 process includes performing a scaling process 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 process is the same as the reference image of the current image block, and setting the specific motion vector candidate after the scaling process as the reference motion vector.
[0081] As shown in Figure 3, curr_pic represents the image in which 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 a specific motion vector candidate. In one embodiment, the scale of the specific motion vector is determined based on the time distance between the reference picture neigh_ref_pic pointed to by the specific motion vector candidate and the picture curr_pic in which the image block corresponding to the specific motion vector is located, and the time distance between the reference picture col_pic of the current image block and the picture curr_pic in which the current image block is located.
[0082] When the difference in the degree of motion between image frames is not large and there is a lot of motion between the current frame and its corresponding frame, if the motion vector (0,0) is used as the basis for positioning the corresponding block of the current block, the motion between frames is not taken into consideration and it is assumed that the absolute coordinates of the current block in the corresponding frame have not changed. However, it should be understood that in reality, there is a very high probability that the coordinates of the current block in the corresponding frame will differ from its coordinates in the current frame, resulting in large variations.
[0083] In the embodiment of the present application, if the motion vector candidate whose reference frame and the same frame of the current frame are not scanned among the N motion vector candidates, one of the N motion vector candidates is scaled so that its reference frame and the same frame of the current frame are the same, and then the scaled motion vector candidate is taken as the motion vector of the current image block, thus improving the accuracy of the motion vector of the current image block.
[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 whose reference frame and the same frame of the current image block are closest in distance in the time domain.
[0085] Among the N motion vector candidates, one motion vector candidate having the closest distance between the reference frame and the same frame of the current frame is selected and a scaling process is performed on it, thereby reducing the time required for the scaling process and thereby improving the efficiency of obtaining the motion vector of the current image block.
[0086] Optionally, when N is an integer smaller than M and larger 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 the motion vector candidate to be scanned.
[0088] Optionally, as an embodiment, N is equal to 1, and in step S120, obtain the reference motion vector of the current image block by scanning one motion vector candidate in the motion vector candidate list. If the reference frame indicated by the scanned motion vector candidate is different from the same frame of the current frame where the current image block is located, perform scaling on the motion vector candidate, so that the reference frame of the scaled motion vector candidate is the same as the same frame of the current frame, and the motion vector candidate after the scaling is taken as the reference motion vector of the current image block. If the reference frame of the scanned motion vector candidate is the same as the same frame of the current frame, the motion vector candidate is taken as the motion vector of the current image block.
[0089] In this embodiment, the motion vector of the current image block is obtained by scanning one motion vector candidate in the motion vector candidate list, and the number of scanning motion vector candidates in the process of obtaining the motion vector of the current image block is effectively reduced, and when the reference frame of the scanned motion vector candidate is different from the same frame of the current frame, the motion vector candidate is scaled to make its reference frame and the same frame of the current frame, and then the motion vector candidate after the scaling process is taken as the motion vector of the current image block, thus improving the accuracy of the motion vector of the current image block.Therefore, compared with the prior art, the solution provided by the embodiment of the present application not only simplifies the process of determining the motion vector of the current image block, but also improves the accuracy of the motion vector of the current image block.
[0090] It should be understood that if the definition of the preset condition changes, the process of performing a scaling process on a specific motion vector candidate in the motion vector candidate list also changes correspondingly, i.e., it is necessary to ensure that the specific motion vector candidate after the scaling process satisfies the preset condition.
[0091] The following describes the process of determining the motion vector candidate to be continued into the motion vector candidate list according to the reference motion vector, the current image block and the reference image of the current image block in step S130.
[0092] Optionally, as one implementation method, determining a motion vector candidate to be subsequently included in the motion vector candidate list based on a reference motion vector, a current image block and a reference image of the current image block includes: dividing the current image block into a plurality of sub-image blocks; determining an associated 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 subsequently included in the motion vector candidate list based on the motion vector of the associated block.
[0093] The associated block may be called a collocated block or a corresponding block.
[0094] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0095] Optionally, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0096] Optionally, the size of the sub-image block and / or the size of the associated block of the sub-image block are both fixed at 8x8 pixels.
[0097] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, in the encoding side, when encoding a current image block, the average block size of each sub-image block in a CU is calculated during the encoding of the previous encoded image block in the same time domain layer in ATMVP mode, and if the average block size is greater than a 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 encoding standard (Versatile Video Coding, VVC), the motion vector is stored with a size of 8×8. It should be understood that if the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also referred to as 4×4) does not match the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding a current image block, it is further necessary to store the information of the size of the sub-image block of the previous encoded image block in the same time domain layer.
[0098] In an embodiment of the present application, the size of the sub-image block of the current image block is set to 8×8, which can adapt to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previous encoded image block, thereby saving storage space.
[0099] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0100] Optionally, as another implementation method, 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 a reference image of the current image block includes determining an associated 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 subsequently included in the motion vector candidate list based on the motion vector of the associated block.
[0101] In encoding / decoding technology, a picture that has already been encoded / decoded is generally used as a reference picture for the current encoding / decoding target. In some embodiments, a reference picture can be further constructed to improve the similarity between the reference picture and the current encoding / decoding target picture.
[0102] For example, in video content, there are certain encoding / decoding scenes where the background hardly changes, and only the foreground of the video changes or moves. For example, video monitoring belongs to such a scene. In a video monitoring scene, a surveillance camera is usually fixed or moves slowly, and the background is considered to be almost unchanged. In contrast, objects such as people and cars captured by a video surveillance camera are always moving or changing, and the foreground is always changing. In such a scene, a specific reference image containing only high-quality background information can be created. The specific reference image may include multiple image blocks, and any image block may be 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 image to be currently encoded / decoded can refer to the specific reference image to reduce residual information of inter-frame prediction, thereby improving encoding / decoding efficiency.
[0103] The above is a specific example of a specific reference image. In some embodiments, the specific reference image has at least one of the following properties: a composite reference, a long-term reference image, and a non-output image. Here, the non-output image refers to an image that is not output and displayed, and 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 frame, or a non-output long-term reference image. In some embodiments, the composite reference frame is also called 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 of the properties of a structural frame, a long-term reference image, and a non-output image. For example, the specific reference image may include a reference image other than a structural frame, or may include a reference image other than a long-term reference image, or may include a reference image other than a non-output image, or may include a reference image other than a constructed long-term reference image, or may include a reference image other than a non-output structural frame, or may include a reference image other than a non-output long-term reference image, etc.
[0105] In some embodiments, when a picture in a video sequence can be a reference picture, a distinction can be made between long-term and short-term reference pictures, where the short-term reference picture is a concept corresponding to the long-term reference picture. The short-term reference picture resides in the reference picture buffer for a certain period of time, and after some movement in and out of the reference picture buffer of the decoded reference picture behind the short-term reference picture, the short-term reference picture is moved out of the reference picture buffer. The reference picture buffer may also be called a reference picture list cache, a reference picture list, a reference frame list cache, a reference frame list, etc., and are collectively referred to herein as a reference picture buffer.
[0106] The long-term reference picture (or a portion of the data in the long-term reference picture) can always reside in the reference picture buffer, and the long-term reference picture (or a portion of the data in the long-term reference picture) is not affected by the entry and exit movement of the decoded reference picture into and out of the reference picture buffer, and the long-term reference picture (or a portion of the data in the long-term reference picture) is moved out of the reference picture buffer only when an operation to send an update command is performed on the decoding side.
[0107] The short-term reference picture and the long-term reference picture may be called differently in different standards. For example, in standards such as H.264 / advanced video coding (AVC) or H.265 / HEVC, the short-term reference picture is called a short-term reference frame, and the long-term reference picture is called a long-term reference frame. In standards such as audio video coding standard (AVS) 1-P2, AVS2-P2, and Institute of Electrical and Electronics Engineers (IEEE) 1857.9-P4, the long-term reference picture is called a background picture. In standards such as VP8 and VP9, the long-term reference picture is called a golden frame.
[0108] In addition, although specific terms are used in the embodiments of the present application, this does not mean that they must be applied to a specific scene. For example, calling a long-term reference image a long-term reference frame does not mean that it must be applied to a technology corresponding to a standard such as H.264 / AVC or H.265 / HEVC.
[0109] Such a long-term reference image may be obtained from an image block structure extracted from a number of previously decoded images, or may be obtained by updating an existing reference frame (e.g., a pre-stored reference frame) using a number of previously decoded images. Of course, the structural specific reference image may 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 reference frame may be identified in the codestream structure by a special field.
[0112] Optionally, if the reference image is determined to be a long-term reference image, the reference image is determined to be a specific reference image, or if the reference image is determined to be a non-output frame, the reference image is determined to be a specific reference image, or if the reference image is determined to be a structural frame, the reference image is determined to be a specific reference image, or if 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, each type of reference picture may have its own identifier, in which case the decoding side can determine whether a reference picture is a specific reference picture according to the identifier that the reference picture has.
[0114] In some embodiments, a reference image is determined to be a particular reference image if the reference image is determined to have a long-term reference image identifier.
[0115] In some embodiments, if a reference image is determined to have a non-output identifier, then the reference image is determined to be a particular reference image.
[0116] In some embodiments, a reference image is determined to be a particular reference image if the reference image is determined to have a structural frame identifier.
[0117] In some embodiments, when the reference image is determined to have at least two of the following three identifiers: a long-term reference image identifier, a non-output identifier, and a structural frame or synthetic reference frame identifier, the reference image is determined to be a specific reference image. For example, when the reference image is determined to have a non-output identifier and the reference image is determined to have a structural frame identifier, the reference image is determined to be a specific reference image.
[0118] Specifically, an image may have an identifier indicating whether it is an output frame, and when an image is indicated not to be output, it indicates that the frame is a reference image, and further determines whether the frame has an identifier of a structural frame, and if so, determines that the reference image is a specific reference image.When an image is indicated to be output, it can be directly determined that the frame is not a specific reference image without determining whether it is a structural frame.Or, when an image is indicated not to be output but 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, determining that the reference picture is a specific reference picture by analyzing parameters from a picture header, a picture parameter set (PPS), and a slice header to determine that the reference picture satisfies one of the following conditions:
[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; If 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 embodiment of the present application, in the process of determining the motion vector of a current image block, the motion vector of the image block is related to using the motion vector of an image block on another image. For convenience of explanation, the image block is called a first image block, and the image block on the other image to be used is called the time-domain reference block or associated block of the first image block. It can be understood that the first image block and the time-domain reference block (or associated 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 using the motion vector of the time-domain reference block (or associated block), the motion vector of the time-domain reference block (or associated block) may need to be scaled. For convenience of explanation, the term "associated block" is used uniformly in this specification.
[0122] For example, when the ATMVP technology is applied to construct an AMVP candidate list, when determining the motion vector of the associated block of the current image block based on the ATMVP technology, the motion vector of the associated block needs to be scaled, and then the motion vector of the current image block needs to be determined based on the motion vector after scaling. In general, the scale of the motion vector of the associated block is determined based on the time distance between the reference image pointed to by the motion vector of the associated block and the image in which the associated block is located, and the time distance between the reference image of the current image block and the image in which the current image block is located.
[0123] In one example, the motion vector of the relevant block is called MV2, and the reference frame index value of the reference image that the motion vector MV2 points to is called x. Here, the reference frame index value x is the difference between the sequence number of the reference image that MV2 points to (e.g. POC) and the sequence number of the image in which the relevant block is located. The reference frame index value of the reference image 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 image of the first image block and the sequence number of the image in which the first image block is located. Then, the scale for the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be the motion vector of the first image block.
[0124] However, if the motion vector MV2 of the associated block points to a specific reference picture, or if the reference picture of the first image block is a specific reference picture, scaling to the motion vector MV2 of the associated block is meaningless because the definition of the temporal distance between the specific reference picture and the picture in which the first image block is located is ambiguous.
[0125] Optionally, in this embodiment, when the motion vector of the current image block is determined based on the motion vector of the associated block, specifically, when the motion vector of the associated block points to a specific reference image, or the reference image of the current image block is a specific reference image, the motion vector of the current image block is determined based on the motion vector of the associated block after processing, in which the motion vector of the associated block after processing is the same as the motion vector of the associated block before processing.
[0126] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0127] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the associated block, specifically, if the motion vector of the associated block points to a specific reference image, or the reference image of the current image block is a specific reference image, then abandon determining the motion vector of the current image block based on the motion vector of the associated block.
[0128] In some embodiments, step S120 includes performing a scaling process on a specific motion vector candidate in the motion vector candidate list when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, and determining a reference motion vector based on the specific motion vector candidate after the scaling process. 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 to be subsequently included in the motion vector candidate list based on the specific motion vector candidate after the processing, where the specific motion vector candidate after the processing is the same as the specific motion vector candidate before the processing.
[0129] Here, the motion vector of the relevant block after processing includes the motion vector obtained after scaling the motion vector of the relevant block with a scale value of 1, or the motion vector of the relevant block skipping the scaling step.
[0130] In some embodiments, step S120 includes performing a scaling process on a specific motion vector candidate in the motion vector candidate list when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, and determining a reference motion vector based on the specific motion vector candidate after the scaling process. In this case, optionally, the method further includes abandoning determining a motion vector candidate to be subsequently 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.
[0131] As can be seen from the above, in the embodiment of 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 M motion vector candidates already obtained are sequentially scanned, and the number of scannings of motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0132] If no motion vector candidate among the N motion vector candidates has a reference frame and a peer frame of the current frame that are the same, a scaling process is performed on one of the N motion vector candidates so that its reference frame is the same as the peer frame of the current frame, and then this scaled motion vector candidate is set as the motion vector of the current image block, thereby improving the accuracy of the motion vector of the current image block.
[0133] The current image block is divided into sub-image blocks of size 8×8 to accommodate the storage granularity of motion vectors defined in the video standard VVC, while eliminating the need to store information about the size of the sub-blocks of the previous coded image block, thereby saving storage space.
[0134] As shown in FIG. 4, an embodiment of the present application further provides a method for obtaining a video motion vector, which includes the following steps.
[0135] S410, obtain M motion vector candidates to be put into a motion vector candidate list for the current image block.
[0136] Step S410 corresponds to step S110 described above, and the specific description can be referred to the above description and will not be described again here.
[0137] S420, sequentially scan at least some of the M motion vector candidates, and determine a reference motion vector of the current image block according to the scanning result.
[0138] As an optional embodiment, some of the M motion vector candidates are sequentially scanned, and a reference motion vector of the current image block is determined according to the scanning result. In this embodiment, step S420 can correspond to step S120 described above, and reference is made to the above description for a detailed description.
[0139] As another optional embodiment, all the motion vector candidates among the M motion vector candidates are sequentially scanned, and the reference motion vector of the current image block is determined based on the scanning result.
[0140] It should be noted that in step S420, the specific manner of determining the reference motion vector of the current image block based on the scanning result can be referred to the relevant description in the above embodiment, and will not be described again 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 at 64 pixels or more.
[0142] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0143] S440, determining an associated block of the sub-image block in the reference image of the current image block according to the reference motion vector.
[0144] The reference image of the current image block may be a peer frame of the current image block.
[0145] S450, determining a motion vector candidate to be continuously added to the motion vector candidate list according to the motion vector of the associated block.
[0146] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, when the encoding side encodes the current image block, it calculates the average block size of each sub-image block in the CU during the encoding of the previous encoded image block in the same time domain layer in ATMVP mode, and if the average block size is greater than a threshold, the dimension of the sub-image block of the current image block is set to 8×8, otherwise it uses the default value of 4×4. That is, in the prior art, when encoding the current image block, it is necessary to further store the information of the size of the sub-image block of the previous encoded image block in the same time domain layer.
[0147] In an 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0148] Optionally, in this embodiment, the size of a sub-image block and / or the size of its associated block are both fixed to 8x8 pixels.
[0149] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, in the encoding side, when encoding a current image block, the average block size of each sub-image block in a CU is calculated during the encoding of the previous encoded image block in the same time domain layer in ATMVP mode, and if the average block size is greater than a 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 encoding standard (Versatile Video Coding, VVC), the motion vector is stored with a size of 8×8. It should be understood that if the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also referred to as 4×4) does not match the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding a current image block, it is further necessary to store the information of the size of the sub-image block of the previous encoded image block in the same time domain layer.
[0150] In an embodiment of the present application, the size of the sub-image block of the current image block is set to 8×8, which can adapt to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previous encoded image block, thereby saving storage space.
[0151] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0152] Optionally, in step S420, at least some of the motion vector candidates are sequentially scanned, and when a motion vector candidate that meets a first preset condition is found, the scanning is stopped, and a reference motion vector is determined based on the scanned motion vector candidate that meets the first preset condition.
[0153] Determining a reference motion vector based on the scanned motion vector candidates that meet the first preset condition includes determining the motion vector candidate that meets the first preset condition as a target neighboring block.
[0154] Optionally, the pre-set condition includes that a reference image of the motion vector candidate and a reference image of the current image block are the same.
[0155] Optionally, step S450 includes: when the motion vector of the associated 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 subsequently included in the motion vector candidate list based on the motion vector of the associated block after processing, where the motion vector of the associated block after processing and the motion vector of the associated block before processing are the same.
[0156] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0157] Optionally, step S450 includes abandoning determining the motion vector candidate to be subsequently included in the vector candidate list based on the motion vector of the associated block if the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image.
[0158] Thus, in the embodiment shown in FIG. 4, the current image block is divided into sub-image blocks of size 8×8 to accommodate the storage granularity of motion vectors defined in the video standard VVC, while there is no need to store information about the size of the sub-blocks of the previous encoded image block, thereby saving storage space.
[0159] Above, the method embodiment of the present application has been described in relation to Figures 1 and 4. Hereinafter, the device embodiment corresponding to the above method embodiment will be described. Note that the description of the device embodiment and the description of the method embodiment correspond to each other, so that the above method embodiment may be referred to for those that are not described in detail. For the sake of simplicity, they will not be described again here.
[0160] 5 is a schematic block diagram of a video processing apparatus 500 provided by an embodiment of the present application. The apparatus 500 is used to perform the embodiment of the method shown in FIG 1. The apparatus 500 includes the following units:
[0161] An obtaining unit 510 is used for obtaining M motion vector candidates to be put into the motion vector candidate list of the current image block.
[0162] A determination unit 520 is used for sequentially scanning N motion vector candidates among the M motion vector candidates, and determining a reference motion vector based on the scanning result, where N is less than M.
[0163] The determining unit 520 is further used for determining, based on the reference motion vector, the current image block and the reference image of the current image block, a motion vector candidate to be subsequently put into the motion vector candidate list.
[0164] The determining unit 520 is further used for determining the motion vector of the current image block based on the motion vector candidate list.
[0165] In step 1 of the conventional ATMVP technique, the time domain vector of the current image block is obtained by scanning all the motion vector candidates currently already entered in the motion vector candidate list. For example, when the motion vector candidate list is usually filled with four motion vector candidates, the following situation may occur: to obtain the time domain vector of the current image block, it is necessary to scan the four motion vector candidates.
[0166] Meanwhile, in the embodiment of 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 already obtained are sequentially scanned, so that the number of scans of the motion vector candidates in the process of obtaining a reference motion vector of a current image block can be reduced compared with the prior art. It should be understood that the solution provided by the present application can be applied to step 1 of the prior art ATMVP technology to simplify redundant operations therein.
[0167] The applicant selected the official common test sequence as the test sequence on the latest reference software VTM-2.0 for next-generation video coding (Versatile Video Coding), and conducted tests on the solution provided in this application in the test configurations of RA configuration and LDB configuration. The test results show that the performance gains of ATMVP technology can be maintained after reducing the number of scans.
[0168] Therefore, the solution provided in this application can reduce the complexity of the ATMVP technology while maintaining the performance gains of the conventional ATMVP technology.
[0169] Optionally, as one embodiment, the acquisition unit 510 is used to acquire M motion vector candidates to be put into a motion vector candidate list of the current image block based on the motion vectors of M neighboring blocks in the current frame of the current image block.
[0170] Optionally, as one embodiment, the neighboring block is an image block adjacent to or having a certain position pitch with respect to the position of the current image block on the current frame.
[0171] Optionally, as one embodiment, the determination unit 520 is used to sequentially scan the previous N motion vector candidates of the M motion vector candidates.
[0172] Optionally, in one embodiment, M is equal to four and N is less than four.
[0173] Optionally, in one embodiment, N is equal to 1 or 2.
[0174] Optionally, as one embodiment, the determination unit 520 is used to sequentially scan N motion vector candidates among the M motion vector candidates based on a preset condition, and determine a reference motion vector based on the scanning result.
[0175] Optionally, as one embodiment, the pre-set conditions include a motion vector candidate whose reference frame it points to and whose reference image of the current image block are the same.
[0176] Optionally, as one embodiment, the determination unit 520 is used to sequentially scan the N motion vector candidates, stop scanning when it scans to a motion vector candidate that meets a first preset condition, and determine a reference motion vector based on the scanned motion vector candidate that meets the first preset condition.
[0177] Optionally, as one embodiment, the determination unit 520 is used to perform a scaling process on a specific motion vector candidate in the motion vector candidate list when no motion vector candidate that meets a preset condition is scanned among the N motion vector candidates, and determine a reference motion vector based on the specific motion vector candidate after the scaling process.
[0178] Optionally, as one embodiment, the specific motion vector candidate is the first motion vector or the last motion vector obtained in scan order among the N motion vector candidates.
[0179] Optionally, as one embodiment, 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 specific motion vector candidate after the scaling process as the reference motion vector.
[0180] Optionally, as one embodiment, the determination unit 520 is used to set a default value as the reference motion vector when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates.
[0181] Optionally, as one embodiment, the default value is the motion vector (0,0).
[0182] Optionally, as one embodiment, the determination unit 520 is used to divide the current image block into multiple sub-image blocks, determine an associated block of the sub-image block in the reference image of the current image block based on the reference motion vector, and determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block.
[0183] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0184] Optionally, in one embodiment, the current image block is one coding unit CU.
[0185] Optionally, as one embodiment, the determination unit 520 is used to determine an associated block of the current image block in the reference image of the current image block based on the reference motion vector, and to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block.
[0186] Optionally, as one embodiment, the determination unit 520 is used to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block after processing when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image, in which the motion vector of the associated block after processing and the motion vector of the associated block before processing are the same.
[0187] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0188] Optionally, as one embodiment, the determination unit 520 is used to abandon determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image.
[0189] Optionally, as one embodiment, the determination unit 520 is used to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the specific motion vector candidate after processing when the specific motion vector candidate refers to a specific reference image or the reference image of the current image block is a specific reference image, where the specific motion vector candidate after processing and the specific motion vector candidate before processing are the same.
[0190] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0191] Optionally, as one embodiment, the determination unit 520 is used to abandon determining a motion vector candidate to be subsequently included in the vector candidate list based on a 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 a specific reference image.
[0192] Optionally, as one embodiment, the motion vector candidate list is a Merge candidate list.
[0193] Optionally, as one embodiment, the reference image of the current image block is a peer frame of the current image block.
[0194] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block are both fixed at 8x8 pixels.
[0195] In addition, 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, an embodiment of the present application further provides a video processing device 600. The device 600 is used to perform the embodiment of the method shown in Fig. 4. The device 600 includes the following units:
[0197] A determination unit 610 is used to obtain M motion vector candidates to be put into the motion vector candidate list of the current image block.
[0198] A determination unit 620 is used for sequentially scanning at least some of the motion vector candidates among the M motion vector candidates, and determining a reference motion vector of the current image block according to the scanning result.
[0199] A division unit 630 is used to divide the current image block into multiple sub-image blocks, where the size of the sub-image blocks is fixed at 64 pixels or more.
[0200] The determining unit 620 is further used for determining, based on the reference motion vector, an associated block of the sub-image block in the reference image of the current image block.
[0201] The determining unit 620 is further used for determining, based on the motion vector of the associated block, the motion vector candidate to be continued into the motion vector candidate list.
[0202] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, when the encoding side encodes the current image block, it calculates the average block size of each sub-image block in the CU during the encoding of the previous encoded image block in the same time domain layer in ATMVP mode, and if the average block size is greater than a threshold, the dimension of the sub-image block of the current image block is set to 8×8, otherwise it uses the default value of 4×4. That is, in the prior art, when encoding the current image block, it is necessary to further store the information of the size of the sub-image block of the previous encoded image block in the same time domain layer.
[0203] In an 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0204] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block are both fixed at 8x8 pixels.
[0205] Currently, in the next generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored with a size of 8 x 8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8 x 8, which can be adapted to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previously coded image block, thereby saving storage space.
[0206] Optionally, as one embodiment, the determination unit 620 is used to sequentially scan at least some of the motion vector candidates, stop scanning when scanning to a motion vector candidate that meets a first preset condition, and determine a reference motion vector based on the scanned motion vector candidate that meets the first preset condition.
[0207] Optionally, as one embodiment, the determining unit 620 is used to determine a motion vector candidate that meets a first preset condition as a target neighboring block.
[0208] Optionally, as one embodiment, the pre-set condition includes that a reference image of the motion vector candidate and a reference image of the current image block are the same.
[0209] In addition, 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) displacement. In some application scenarios, the motion vector of an image block only includes 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 the motion vector includes the displacement of the reference block of the encoded / decoded image block, which is located in the same position as the encoded / decoded image block on the reference image and is located in 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 by 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 video processing method is provided for the new definition of the motion vector (i.e., including "displacement" information but not including "pointed image").
[0211] As shown in FIG. 7, an embodiment of the present application provides a video processing method, which includes the following steps.
[0212] S710, M neighboring blocks of the current image block are determined.
[0213] The current image block is the image block to be coded (or decoded). For example, the current image block is a coding unit (CU).
[0214] The image frame in which the current image block is located is called the current frame.
[0215] A neighboring block is an image block that is adjacent to or has a certain position pitch with respect to the position of the current image block in the current image.
[0216] The M neighboring blocks are image blocks that have been coded (or decoded) in the current frame.
[0217] As an example, as shown in Figure 2, the four neighboring blocks of the current image block are determined sequentially in the order of image blocks located at four positions A1 (left) → B1 (top) → B0 (top right) → A0 (bottom left) around the current image block shown in Figure 2.
[0218] S720, sequentially scanning N neighboring blocks among the M neighboring blocks, and determining a target neighboring block based on the scanning result, where N is less than M;
[0219] The process of determining the target neighboring block based on the scanning result of the N neighboring blocks may be a process of sequentially judging the N neighboring blocks based on a preset condition, and determining the target neighboring block based on the judgment result.
[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 a reference image that is closest in time to the image in which the current image block is located, or the reference image of the current image block is a reference image that is preset on the encoding side and the decoding side, or the reference image of the current image block is a reference image specified in the current image parameter set, sequence header, sequence parameter set, image header, image parameter set, or slice header.
[0222] For example, the reference image of the current image block is a same-order frame of the current image block, and the same-order frame is a frame for obtaining and predicting motion information set in the slice-level information header.
[0223] It should be understood that, depending on future technological evolution, this pre-set condition may be given other different definitions, and the corresponding solutions also fall within the scope of protection of the present application.
[0224] The process of determining the target neighboring block based on the scanning result of N neighboring blocks will be described in detail below.
[0225] In step S720, only N neighboring blocks among the M neighboring blocks obtained in step S710 are scanned, thus reducing the number of scans.
[0226] Optionally, in step S720, the previous N neighboring blocks of the M neighboring blocks may be scanned sequentially.
[0227] In step S710, when M neighboring blocks of the current image block are sequentially determined in a preset order, the previous N neighboring blocks obtained in step S720 refer to the N neighboring blocks that were first determined in the preset order.
[0228] Optionally, in step S720, the last N neighboring blocks of the M neighboring blocks may be scanned sequentially. Or, the N neighboring blocks of the M neighboring blocks may be scanned sequentially. The present application is not limited thereto.
[0229] S730, determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block.
[0230] S740, encoding / decoding the current image block according to the motion vector of the associated block.
[0231] Optionally, step S740 includes determining a reference block of the current image block according to the motion vector of the related block and the reference image.
[0232] For example, step S740 includes: constructing a candidate block list for a current image block, where the candidate blocks in the candidate block list include M neighboring blocks and associated blocks; and performing encoding and decoding on 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 a merge candidate list for the current image block. In one example, the candidate block list is an AMVP candidate list for the current image block.
[0234] At the encoding side, an index of a candidate block of a current block is written into a code stream. At the decoding side, after obtaining the index, a candidate block corresponding to the index is found from a candidate block list, and a reference block of the current image block is determined according to the reference block of the candidate block, or a motion vector of the current image block is determined according to the motion vector of the candidate block.
[0235] For example, the reference block of the candidate block is directly determined as the reference block of the current image block, or the motion vector of the candidate block is directly determined 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 obtaining the MVD, the decoding side adds the motion vector of the candidate block to the MVD to determine the motion vector of the current block, and then determines the reference block of the current block based on the motion vector and the reference image of the current block.
[0236] In an embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks among the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans for the candidate neighboring blocks in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0237] Optionally, in this embodiment, in step S710, determine 4 neighboring blocks in the current frame of the current image block, that is, M is equal to 4. In step S720, scan N neighboring blocks of the 4 neighboring blocks, where N is less than 4.
[0238] For example, N is equal to 1. For example, in step S720, only the first neighboring block of the four neighboring blocks is scanned.
[0239] Also, for example, N is equal to 2 or 3.
[0240] The manner of determining the target neighboring block based on the scanning result of the N neighboring blocks in step S720 will be described below.
[0241] Optionally, in step S720, sequentially scan the N neighboring blocks, and when a neighboring block that meets a first preset condition is found, the scanning is stopped, and a target neighboring block is determined based on the scanned neighboring block that meets the first preset condition.
[0242] For example, the preset condition is defined as the reference image of the neighboring block and the reference image of the current image block being the same.
[0243] It should be understood that in future evolving technologies, the preconditions may be given other definitions.
[0244] Here, the definition of the preset condition is taken as an example that the reference image of the neighboring block is the same as the reference image of the current image block.
[0245] For example, a neighboring block that meets a first preset condition is determined as a 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 a scaling process 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 process.
[0247] For example, the reference block of the current image block is determined based on the motion vector after scaling and the reference image of the current image block.
[0248] Optionally, the particular neighboring block is the first neighboring block or the last neighboring block obtained in scan order among the N neighboring blocks.
[0249] The specific neighboring block may be one of the N neighboring blocks obtained in another scan order.
[0250] Optionally, encoding / decoding the current image block based on the motion vector after the scaling process includes performing a scaling process on the motion vector of a specific neighboring block so that the reference frame pointed to by the motion vector after the scaling process is the same as the reference image of the current image block, and setting the image block pointed to by the motion vector after the scaling process 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, the default block is taken as the candidate reference block of the current image block.
[0252] For example, the default block is the image block pointed to by the motion vector (0,0).
[0253] The following describes the process of determining the related block of the current image block according to the motion vector of the target neighboring block, the current image block, and the reference image of the current image block in step S730.
[0254] Optionally, as an embodiment, determining an associated block of the current image block based on the motion vector of the target neighboring block, the current image block and a reference image of the current image block includes dividing the current image block into a plurality of sub-image blocks, and determining 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, where the associated block of the current image block includes an associated block of the sub-image block.
[0255] The associated block may be called a collocated block or a corresponding block.
[0256] For example, the current image block is a CU, and the sub-image blocks obtained after dividing it may be called sub-CUs.
[0257] Optionally, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0258] Optionally, the size of the sub-image block and / or the size of the associated block of the sub-image block are both fixed at 8x8 pixels.
[0259] In the current ATMVP technology, the size of the sub-image block is adaptively set at the frame level, 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, in the encoding side, when encoding a current image block, the average block size of each sub-image block in a CU is calculated during the encoding of the previous encoded image block in the same time domain layer in ATMVP mode, and if the average block size is greater than a 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 encoding standard (Versatile Video Coding, VVC), the motion vector is stored with a size of 8×8. It should be understood that if the size of the sub-image block is set to 4×4, the size of the motion vector of the sub-image block (also referred to as 4×4) does not match the storage granularity of the motion vector in the current standard. In addition, in the current ATMVP technology, when encoding a current image block, it is further necessary to store the information of the size of the sub-image block of the previous encoded image block in the same time domain layer.
[0260] In an embodiment of the present application, the size of the sub-image block of the current image block is set to 8×8, which can adapt to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previous encoded image block, thereby saving storage space.
[0261] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0262] Optionally, as another embodiment, determining an associated block of the current image block based on the motion vector of the target neighboring block, the current image block and a reference image of the current image block includes determining an 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.
[0263] Optionally, step S740 includes, 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 a candidate reference block for the current image block based on the motion vector of the associated block after processing and the reference image of the current image block, where the motion vector of the associated block after processing and the motion vector of the associated block before processing are the same.
[0264] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0265] Optionally, step S740 includes abandoning determining a candidate reference block for the current image block based on the motion vector of the associated block if the reference image of the associated block is a specific reference image, or if the reference image of the current block is a specific reference image.
[0266] In some embodiments, step S720 includes, when the motion vector of a specific neighboring block points to a specific reference image or the reference image of the current image block is a specific reference image, determining a 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, where the motion vector of the related block after processing and the motion vector of the related block before processing are the same.
[0267] Here, the motion vector of the relevant block after processing includes the motion vector obtained after scaling the motion vector of the relevant block with a scale value of 1, or the motion vector of the relevant block skipping the scaling step.
[0268] As can be seen from the above, in the embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks out of the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans for neighboring block candidates in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0269] If a neighboring block among the N neighboring blocks whose reference frame and the same frame of the current frame are the same is not scanned, a motion vector of one of the N neighboring blocks is scaled so that its reference frame is the same as the same frame of the current frame, and then this scaled motion vector is used as the motion vector of the current image block, thereby improving the accuracy of the motion vector of the current image block.
[0270] The current image block is divided into sub-image blocks of size 8×8 to accommodate the storage granularity of motion vectors defined in the video standard VVC, while eliminating the need to store information about the size of the sub-blocks of the previous coded image block, thereby saving storage space.
[0271] In some embodiments of the embodiment of the present application, in the process of determining the motion vector of a current image block, the motion vector of the image block is related to using the motion vector of an image block on another image. For convenience of description, the image block is called a first image block, and the image block on the other image to be used is called the time-domain reference block or associated block of the first image block. It can be understood that the first image block and the time-domain reference block (or associated 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 using the motion vector of the time-domain reference block (or associated block), the motion vector of the time-domain reference block (or associated block) may need to be scaled. For convenience of description, the term "associated block" is used uniformly in this specification.
[0272] For example, when the ATMVP technology application is applied to construct an AMVP candidate list, it is necessary to determine an associated block of a current image block based on the ATMVP technology, determine a motion vector of the current image block based on the motion vector of the associated block, scale the motion vector of the associated block, and then determine a motion vector of the current image block based on the motion vector after scaling. In general, the scale of the motion vector of the associated block is determined based on the time distance between the reference image pointed to by the motion vector of the associated block and the image in which the associated block is located, and the time distance between the reference image of the current image block and the image in which the current image block is located.
[0273] In one example, the motion vector of the relevant block is called MV2, and the reference frame index value of the reference image that the motion vector MV2 points to is called x. Here, the reference frame index value x is the difference between the sequence number of the reference image that MV2 points to (e.g. POC) and the sequence number of the image in which the relevant block is located. The reference frame index value of the reference image 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 image of the first image block and the sequence number of the image in which the first image block is located. Then, the scale for the motion vector MV2 is y / x. Optionally, the product of the motion vector MV2 and y / x can be the motion vector of the first image block.
[0274] However, if the motion vector MV2 of the associated block points to a specific reference picture, or if the reference picture of the first image block is a specific reference picture, scaling to the motion vector MV2 of the associated block is meaningless because the definition of the temporal distance between the specific reference picture and the picture in which the first image block is located is ambiguous.
[0275] Optionally, in this embodiment, when the motion vector of the current image block is determined based on the motion vector of the associated block, specifically, when the motion vector of the associated block points to a specific reference image, or the reference image of the current image block is a specific reference image, the motion vector of the current image block is determined based on the motion vector of the associated block after processing, in which the motion vector of the associated block after processing is the same as the motion vector of the associated block before processing.
[0276] For example, the motion vector of the related block after processing includes the motion vector obtained after scaling the motion vector of the related block with a scale value of 1, or the motion vector of the related block skipping the scaling step.
[0277] Optionally, in this embodiment, when determining the motion vector of the current image block based on the motion vector of the associated block, specifically, if the motion vector of the associated block points to a specific reference image, or the reference image of the current image block is a specific reference image, then abandon determining the motion vector of the current image block based on the motion vector of the associated block.
[0278] As shown in FIG. 8 , an embodiment of the present application further provides a video processing method, which includes the following steps.
[0279] S810, M neighboring blocks of the current image block are determined.
[0280] Step S810 corresponds to step S710 in the above embodiment.
[0281] S820, sequentially scanning at least some of the M neighboring blocks, and determining a target neighboring block based on the scanning result.
[0282] Optionally, the partial neighboring blocks among the M neighboring blocks are scanned sequentially, and the target neighboring block is determined based on the scanning result.
[0283] Optionally, all neighboring blocks among the M neighboring blocks are scanned sequentially, and the target neighboring block is determined based on the scanning result.
[0284] S830, divide the current image block into a number of sub-image blocks, where the size of the sub-image block is fixed at 64 pixels or more.
[0285] S840, determining a related block of the current image block in the reference image of the current image block according to the motion vector and the sub-image block of the target neighboring block.
[0286] Optionally, the reference image of the current image block is the reference image that has the closest time distance to the image in which the current image block is located.
[0287] Optionally, the reference image of the current image block is a reference image preset at the encoding side and the decoding side.
[0288] Optionally, the reference image of the current image block is a reference image specified in the current picture parameter set, the sequence header, the sequence parameter set, the picture header, the picture parameter set, the slice header.
[0289] S850, encoding / decoding the current image block according to the motion vector of the associated block.
[0290] In an 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0291] Optionally, in this embodiment, the size of a sub-image block and / or the size of a time-domain reference block of a sub-image block are both fixed to 8×8 pixels.
[0292] Currently, in the next generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored with a size of 8 x 8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8 x 8, which can be adapted to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previously coded image block, thereby saving storage space.
[0293] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated 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, stopping the scanning when a neighboring block that meets a first preset condition is reached, and determining the target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0295] For example, a neighboring block that meets a first preset condition is determined as a target neighboring block.
[0296] For example, the preset condition is defined as the reference image of the neighboring block and the reference image of the current image block being the same.
[0297] Optionally, step S840 includes determining an associated block of the sub-image block in the reference image of the current image block based on the motion vector and the sub-image block of the target neighboring block, where the associated block of the current image block includes the associated block of the sub-image block.
[0298] Above, the method embodiment of the present application has been described in relation to Figures 7 and 8. Hereinafter, the device embodiment corresponding to the method embodiment shown in Figures 7 and 8 will be described. Note that the description of the device embodiment and the description of the method embodiment correspond to each other, so that the above method embodiment may be referred to for those that are not described in detail. For the sake of simplicity, they will not be described again here.
[0299] 9 is a schematic block diagram of a video processing apparatus 900 provided by an embodiment of the present application. The apparatus 900 is used to implement the embodiment of the method shown in FIG 7. The apparatus 900 includes the following units:
[0300] An acquisition unit 910 is used to acquire M neighboring blocks of a current image block.
[0301] An obtaining unit 920 is used for sequentially scanning N neighboring blocks of the M neighboring blocks, and determining a target neighboring block based on the scanning result, where N is less than M.
[0302] The determining unit 920 is further used for determining a related block of the current image block according to 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 is used to encode / decode the current image block based on the motion vector of the associated block.
[0304] In an embodiment of the present application, in the process of obtaining a target neighboring block of a current image block, only N (N is less than M) neighboring blocks among the M neighboring blocks already obtained are sequentially scanned, and compared with the prior art, the number of scans for neighboring block candidates in the process of obtaining a target neighboring block of a current image block can be reduced, thereby reducing the complexity.
[0305] Optionally, in one embodiment, M is equal to four and N is less than four.
[0306] Optionally, in one embodiment, N is equal to 1 or 2.
[0307] Optionally, as one embodiment, the determining unit 920 is used to sequentially scan the previous N neighboring blocks in the M neighboring blocks.
[0308] Optionally, as one embodiment, 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 N neighboring blocks that are first determined in the preset order.
[0309] Optionally, as one embodiment, the determination unit 920 is used to sequentially scan the N neighboring blocks, stop scanning when scanning to a neighboring block that meets a first preset condition, and determine a target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0310] Optionally, as one embodiment, the determining unit 920 is used to determine a neighboring block that meets a first preset condition as a target neighboring block.
[0311] Optionally, as one embodiment, the pre-set condition includes that the reference image of the neighboring block and the reference image of the current image block are the same.
[0312] Optionally, as one embodiment, the encoding / decoding unit 930 is used to determine a reference block of the current image block according to the motion vector of the related block and the reference image.
[0313] Optionally, as one embodiment, the encoding / decoding unit 930 constructs 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 are 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 one embodiment, the encoding / decoding unit 930 is further used to perform a scaling process on the motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block that meets the preset condition is scanned among the N neighboring blocks, and to encode / decode the current image block based on the motion vector after the scaling process.
[0315] Optionally, as one embodiment, the encoding / decoding unit 930 is used to determine a reference block of the current image block according to the motion vector after the scaling process and the reference image of the current image block.
[0316] Optionally, as one embodiment, the specific neighboring block is the first neighboring block or the last neighboring block obtained in the scan order among the N neighboring blocks.
[0317] Optionally, as one embodiment, the encoding / decoding unit 930 is used to perform a scaling process on the motion vector of a specific neighboring block, so that the reference frame pointed to by the motion vector after the scaling process is the same as the reference image of the current image block, and the image block pointed to by the motion vector after the scaling process in the reference image of the current image block is the reference block of the current image block.
[0318] Optionally, as one embodiment, the determination unit 920 is used to set a default block as a reference block of the current image block if no neighboring block that meets the preset condition is scanned among the N neighboring blocks.
[0319] Optionally, as one embodiment, the default block is the image block pointed to by the motion vector (0,0).
[0320] Optionally, as one embodiment, the determining unit 920: Dividing a current image block into a plurality of sub-image blocks; Based on the motion vector of the target neighboring block, the motion vector is used to determine the associated block of the sub-image block in the reference image of the current image block, where the associated block of the current image block includes the associated block of the sub-image block.
[0321] Optionally, as one embodiment, the size of a sub-image block and / or the size of its associated block is fixed at 64 pixels or more.
[0322] Optionally, in one embodiment, the current image block is one coding unit CU.
[0323] Optionally, as one embodiment, the determining unit 920 is used for determining a related block of the current image block in the reference image of the current image block according to the motion vector of the target neighboring block.
[0324] Optionally, as one embodiment, the neighboring block is an image block adjacent to or having a certain position pitch with respect to the position of the current image block on the current image.
[0325] Optionally, as an embodiment, the encoding / decoding unit 930 is used to determine a reference block of the current image block according to 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; Here, the motion vector of the related block after processing is the same as the motion vector of the related block before processing.
[0326] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0327] Optionally, as one embodiment, 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 if 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.
[0328] Optionally, as one embodiment, the determination unit 920 is used to determine a 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 motion vector of a specific neighboring block points to a specific reference image or the reference image of the current image block is a specific reference image, in which the motion vector of the related block after processing and the motion vector of the related block before processing are the same.
[0329] Optionally, as one embodiment, the motion vector of the associated block after processing includes a motion vector obtained after scaling the motion vector of the associated block with a scale value of 1, or a motion vector of the associated block skipping the scaling step.
[0330] In addition, 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, an embodiment of the present application further provides a video processing apparatus 1000. The apparatus 1000 is used to perform the embodiment of the method shown in Fig. 8. The apparatus 1000 includes the following units:
[0332] An acquisition unit 1010 is used to acquire M neighboring blocks of a current image block.
[0333] A determining unit 1020 is used for sequentially scanning at least some of the M neighboring blocks, and determining a target neighboring block based on the scanning result.
[0334] A division unit 1030 is used to divide the current image block into multiple sub-image blocks, where the size of the sub-image blocks is fixed at 64 pixels or more.
[0335] The determining unit 1020 is further used for determining, according to the motion vector and the sub-image block of the target neighboring block, a related block of the current image block in the reference image of the current image block.
[0336] An encoding / decoding unit 1040 is used to encode / decode a current image block based on the motion vector of an associated block.
[0337] In an 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 information on the size of the sub-image block of the previously encoded image block, thus saving storage space.
[0338] Optionally, as one embodiment, the size of a sub-image block and / or the size of a time-domain reference block of a sub-image block are both fixed to 8x8 pixels.
[0339] Currently, in the next generation video coding standard (Versatile Video Coding, VVC), motion vectors are stored with a size of 8 x 8. In the embodiment of the present application, the size of the sub-image block of the current image block is set to 8 x 8, which can be adapted to the storage granularity of the motion vector defined in the video standard VVC, while there is no need to store information on the size of the sub-image block of the previously coded image block, thereby saving storage space.
[0340] However, under the premise of ensuring that the size of the sub-image block and / or the size of the associated block of the sub-image block is fixed at 64 pixels, the size of the sub-image block and / or the size of the associated 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 associated block of the sub-image block is A×B, A≦64, B≦64, where A and B are both integers equal to 4. For example, the size of the sub-image block and / or the size of the associated block of the sub-image block is 4×16 pixels, or 16×4 pixels.
[0341] Optionally, as one embodiment, sequentially scanning at least some of the 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 scanning to a neighboring block that meets a first preset condition, and determining the target neighboring block based on the scanned neighboring block that meets the first preset condition.
[0342] Optionally, as one embodiment, the determining unit 1020 is used to determine a neighboring block that meets a first preset condition as a target neighboring block.
[0343] Optionally, as one embodiment, the pre-set condition includes that a reference image of the neighboring block and a reference image of the current image block are the same.
[0344] Optionally, as one embodiment, the determination unit 1020 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 and the sub-image block of the target neighboring block, where the associated block of the current image block includes the associated block of the sub-image block.
[0345] In addition, 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 video processing apparatus 1100. The apparatus 1100 may be used to perform the method embodiments described above. The apparatus 1100 includes a processor 1110 and a memory 1120, where the memory 1120 is used to store instructions, and the processor 1110 is used to execute the instructions stored in the memory 1120 and to cause the processor 1110 to perform 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 device 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 devices 500, 600, 900, 1000 and 1100 provided in this application may be applied in a coder or in a decoder.
[0349] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which when executed by a computer causes the computer to perform the methods provided in the above method embodiments.
[0350] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, cause the computer to perform the methods provided in the method embodiments above.
[0351] The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the embodiments may 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 a computer and executed, the computer instructions generate all or a portion of the process or function according to the embodiments of the present application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, radio, microwave, etc.) transmission. 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, data center, in which one or more available media are integrated. The available medium may be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., digital video disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).
[0352] Those skilled in the art can recognize that each example unit and algorithm step described in connection with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to realize the described functions, but such realization should not be considered as being outside the scope of this application.
[0353] In some embodiments provided herein, it should be understood that the disclosed system, device, and method can be realized in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical functional division, and in actual implementation, there may be other division methods, for example, multiple units or assemblies may be combined or integrated into other systems, or some features may be omitted or not implemented. And, the shown or discussed mutual couplings or direct couplings or communication connections may be indirect couplings or communication connections via some interfaces, devices or units, and may be electrical, mechanical, or other forms.
[0354] The units described as separate components may or may not be physically separated, and the components represented as units may or may not be physical units, i.e., they may be located in one place or distributed among multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the solution of this embodiment.
[0355] Furthermore, each functional unit in each embodiment of this specification may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0356] As described above, the present application is merely a form for carrying out the invention, and the scope of protection of the present application is not limited thereto, and if a person skilled in the art can easily make modifications or replacements within the technical scope disclosed in the present application, they will be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall conform to the scope of the claims. (Item 1) A method for acquiring a motion vector of a moving image, comprising the steps of: Obtaining M motion vector candidates to be put into a motion vector candidate list for a current image block; Sequentially scanning N motion vector candidates among the M motion vector candidates, which is smaller than M, and determining a reference motion vector based on a scanning result; determining a motion vector candidate to be subsequently entered into the motion vector candidate list according to the reference motion vector, the current image block, and a reference image of the current image block; determining a motion vector of the current image block based on the motion vector candidate list. (Item 2) Obtaining M motion vector candidates to be put into a motion vector candidate list of the current image block includes: 2. The method according to item 1, comprising obtaining M motion vector candidates to be put into a motion vector candidate list for a current image block based on motion vectors of M neighboring blocks in a current frame of the current image block. (Item 3) 3. The method according to item 2, wherein the neighbouring 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) Sequentially scanning N motion vector candidates among the M motion vector candidates includes: 4. The method according to item 2 or 3, comprising sequentially scanning the previous N motion vector candidates of the M motion vector candidates. (Item 5) 5. The method according to any one of items 1 to 4, wherein M is equal to 4 and said N is less than 4. (Item 6) 6. The method according to item 5, wherein N is equal to 1 or 2. (Item 7) Sequentially scanning N motion vector candidates among the M motion vector candidates, and determining a reference motion vector based on a scanning result, 7. The method according to any one of items 1 to 6, comprising sequentially scanning N motion vector candidates among the M motion vector candidates based on a preset condition, and determining the reference motion vector based on a scanning result. (Item 8) The preset condition is: 8. The method according to item 7, comprising motion vector candidates whose reference frame and the reference image of the current image block are the same. (Item 9) Sequentially scanning N motion vector candidates among the M motion vector candidates based on the preset condition, and determining the reference motion vector based on a scanning result, The method according to item 7 or 8, comprising sequentially scanning the N motion vector candidates, stopping the scanning when the first motion vector candidate that meets the preset condition is scanned, and determining the reference motion vector based on the first scanned motion vector candidate that meets the preset condition. (Item 10) Sequentially scanning N motion vector candidates among the M motion vector candidates based on the preset condition, and determining the reference motion vector based on a scanning result, The method according to item 7 or 8, comprising, when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, 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 specific motion vector candidate after the scaling process. (Item 11) 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 scanning order among the N motion vector candidates. (Item 12) 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 specific motion vector candidate after the scaling process; performing a scaling process on the specific motion vector candidate in the motion vector candidate list so that a reference frame pointed to by the specific motion vector candidate after the scaling process is the same as a reference image of the current image block; 12. The method according to item 10 or 11, further comprising setting the specific motion vector candidate after the scaling process as the reference motion vector. (Item 13) Sequentially scanning N motion vector candidates among the M motion vector candidates based on the preset condition, and determining the reference motion vector based on a scanning result, 9. The method according to item 7 or 8, comprising: when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates, a default value is set as the reference motion vector. (Item 14) Item 14. The method according to item 13, wherein the default value is a motion vector of (0,0). (Item 15) 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 a 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 a reference image of the current image block according to the reference motion vector; 15. The method according to any one of items 1 to 14, comprising determining a motion vector candidate for continued in the motion vector candidate list based on the motion vector of the associated block. (Item 16) Item 16. The method according to item 15, wherein the size of the sub-image block and / or the size of its associated block are fixed at 64 pixels or more. (Item 17) Item 16. 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 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; determining a related block of the current image block in a reference image of the current image block according to the reference motion vector; 15. The method according to any one of items 1 to 14, comprising determining a motion vector candidate for continued in the motion vector candidate list based on the motion vector of the associated block. (Item 19) determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block; When the motion vector of the associated 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 added to the motion vector candidate list according to the motion vector of the associated block after processing; 19. The method according to any one of items 15 to 18, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. (Item 20) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or 20. The method according to item 19, including skipping a scaling step for the motion vectors of the relevant blocks. (Item 21) determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block; A method according to any one of items 15 to 18, comprising abandoning determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image. (Item 22) The method further comprises: When the specific motion vector candidate indicates 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 subsequently included in the motion vector candidate list based on the specific motion vector candidate after the processing; 13. The method according to any one of items 10 to 12, wherein the specific motion vector candidate after the processing is the same as the specific motion vector candidate before the processing. (Item 23) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or 23. The method according to item 22, including skipping the scaling step for the motion vectors of the relevant blocks. (Item 24) The method further comprises: The method according to any one of items 10 to 12, further comprising abandoning determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the specific motion vector candidate when the specific motion vector candidate indicates a specific reference image or the reference image of the current image block is a specific reference image. (Item 25) 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) 26. The method according to any one of items 1 to 25, wherein the reference image of the current image block is a peer frame of the current image block. (Item 27) Item 16. The method according to item 15, wherein the size of the sub-image block and / or the size of its associated block are both fixed at 8x8 pixels. (Item 28) A method for acquiring a motion vector of a moving image, comprising the steps of: Obtaining M motion vector candidates to be put into a motion vector candidate list for a current image block; Sequentially scanning at least some of the motion vector candidates among the M motion vector candidates, and determining a reference motion vector of the current image block according to the scanning result; Dividing the current image block into a plurality of sub-image blocks, each sub-block having a fixed size of 64 pixels or more; determining a related block of the sub-image block in a reference image of the current image block according to the reference motion vector; determining a motion vector candidate for continued in the motion vector candidate list according to the motion vector of the associated block. (Item 29) 29. The method according to item 28, wherein the size of the sub-image block and / or the size of its associated block are both fixed at 8x8 pixels. (Item 30) Sequentially scanning at least a part of the M motion vector candidates and determining a reference motion vector based on a scanning result, The method according to item 28, comprising sequentially scanning at least some of the motion vector candidates, stopping the scanning when a motion vector candidate that meets a first preset condition is reached, and determining a reference motion vector based on the scanned motion vector candidate that meets the first preset condition. (Item 31) determining a reference motion vector based on the scanned motion vector candidates that meet the first preset condition, 31. The method according to claim 30, further comprising determining a motion vector candidate that meets the first preset condition as the target neighboring block. (Item 32) The preset condition is: 31. The method according to item 30, comprising the reference image of the motion vector candidate and the reference image of the current image block being the same. (Item 33) A moving image processing method, comprising: Obtaining M neighboring blocks of a current image block; Sequentially scanning N neighboring blocks among the M neighboring blocks, N being smaller than M, and determining a target neighboring block based on the scanning result; determining a related block of the current image block according to the 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 associated block. (Item 34) Item 34. The method according to item 33, wherein M is equal to 4 and said N is less than 4. (Item 35) 35. The method according to item 34, wherein N is equal to 1 or 2. (Item 36) Sequentially scanning N neighboring blocks among the M neighboring blocks includes: 36. The method according to any one of items 33 to 35, comprising sequentially scanning the previous N neighboring blocks of the M neighboring blocks. (Item 37) The obtaining of the M neighboring blocks of the current image block includes: Sequentially obtaining M neighboring blocks of the current image block in a preset order; Item 37. The method according to item 36, wherein the previous N neighboring blocks refer to the N neighboring blocks that are determined first in the preset order. (Item 38) Sequentially scanning N neighboring blocks among the M neighboring blocks, and determining a target neighboring block based on the scanning result, The method according to any one of items 33 to 37, comprising sequentially scanning the N neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is reached, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition. (Item 39) determining a target neighboring block based on the scanned neighboring block that meets the first preset condition; Item 39. The method according to item 38, comprising determining a neighboring block that meets the first preset condition as the target neighboring block. (Item 40) The preset condition is: 40. The method according to item 39, comprising the reference image of the neighbouring blocks and the reference image of the current image block being the same. (Item 41) encoding / decoding the current image block based on the motion vector of the associated block, 41. The method according to any one of items 33 to 40, comprising determining a reference block for the current image block according to a motion vector of the related block and a reference image. (Item 42) encoding / decoding the current image block based on the motion vector of the associated block, Construct a candidate block list for the current image block, the candidate blocks in the candidate block list including the M neighboring blocks and the associated block; Item 42. The method of item 41, comprising encoding / decoding the current image block based on reference blocks of candidate blocks in the candidate block list. (Item 43) The method further comprises: 43. The method according to any one of items 33 to 42, comprising: performing a scaling process on a motion vector of a specific neighboring block among the M neighboring blocks when no neighboring block that meets the preset condition is scanned among the N neighboring blocks; and encoding / decoding the current image block based on the motion vector after the scaling process. (Item 44) The encoding / decoding of the current image block based on the motion vector after the scaling process includes: Item 44. The method according to item 43, comprising determining a reference block for the current image block based on the motion vector after the scaling process and a reference image for the current image block. (Item 45) Item 44. The method according to item 43, wherein the specific neighboring block is a first neighboring block or a last neighboring block obtained in a scan order among the N neighboring blocks. (Item 46) performing a scaling process on a 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 process; performing a scaling process on the motion vector of the specific neighboring block so that a reference frame indicated by the motion vector after the scaling process is the same as a reference image of the current image block; Item 44. The method according to item 43, further comprising: setting an image block pointed to in a reference image of the current image block by the motion vector after the scaling process as a reference block of the current image block. (Item 47) The method further comprises: 43. The method according to any one of items 33 to 42, comprising: if no neighboring block matching the preset condition is scanned among the N neighboring blocks, setting a default block as a reference block for the current image block. (Item 48) Item 48. The method according to item 47, wherein the default block is the image block pointed to by the motion vector (0,0). (Item 49) Determining a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block includes: Dividing the current image block into a plurality of sub-image blocks; A method according to any one of items 33 to 48, comprising determining an associated block of a sub-image block in a reference image of the current image block based on the motion vector of the target neighboring block, the associated block of the current image block including the associated block of the sub-image block. (Item 50) 50. The method according to item 49, wherein the size of the sub-image block and / or the size of its associated block are fixed at 64 pixels or more. (Item 51) 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 a related block of the current image block according to the motion vector of the target neighboring block, the current image block, and a reference image of the current image block includes: Item 46. The method according to any one of items 33 to 45, further comprising determining, in a reference image of the current image block, a related block of the current image block based on a motion vector of the target neighboring block. (Item 53) 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, determining a reference block for the current image block based on the processed motion vector of the related block 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; 54. A method according to any one of items 33 to 53, wherein the motion vector of the relevant block after the processing and the motion vector of the relevant block before the processing are the same. (Item 55) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or 55. The method according to item 54, characterized in that the motion vectors of the relevant blocks skip a scaling step. (Item 56) encoding / decoding the current image block based on the motion vector of the associated block, A method according to any one of items 33 to 53, comprising abandoning determining a reference block for the current image block based on a motion vector of the related block 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. (Item 57) The method further comprises: 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, determining a reference block of the current image block according to the motion vector of the related block after processing and the reference image of the current image block; Item 47. The method according to any one of Items 43 to 46, wherein the motion vector of the relevant block after the processing is the same as the motion vector of the relevant block before the processing. (Item 58) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or 58. The method according to item 57, including skipping a scaling step for the motion vectors of the relevant blocks. (Item 59) A moving image processing method, comprising: Obtaining M neighboring blocks of a current image block; Sequentially scanning at least a portion 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, each sub-block having a fixed size of 64 pixels or more; determining a related block of the current image block in a reference image of the current image block according to the motion vector of the target neighboring block and the sub-image block; and encoding / decoding the current image block based on the motion vector of the associated block. (Item 60) 60. The method of claim 59, wherein the size of the sub-image blocks and / or the size of the time domain reference blocks of the sub-image blocks are both fixed to 8x8 pixels, or 16x4 pixels or 4x16 pixels. (Item 61) The step of sequentially scanning at least a part of the M number of neighboring blocks and determining a target neighboring block based on a scanning result includes: Item 59. The method of item 59, comprising sequentially scanning at least some of the neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is reached, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition. (Item 62) determining a target neighboring block based on the scanned neighboring block that meets the first preset condition, Item 62. The method according to item 61, comprising determining a neighboring block that meets the first preset condition as the target neighboring block. (Item 63) The preset condition is: Item 62. The method according to item 61, wherein the reference image of the neighboring block and the reference image of the current image block are the same. (Item 64) Determining a related block of the current image block in a reference image of the current image block according to the motion vector of the target neighboring block and its sub-image block includes: determining a related block of the sub-image block in a reference image of the current image block according to the motion vector of the target neighboring block and the sub-image block; Item 59. The method according to item 59, wherein the associated block of the current image block comprises an associated block of the sub-image block. (Item 65) An apparatus for acquiring a motion vector of a moving image, comprising: an acquisition unit used to acquire M motion vector candidates to be put into a motion vector candidate list of a current image block; a determination unit for sequentially scanning N motion vector candidates among the M motion vector candidates and determining a reference motion vector based on a scanning result, where N is less than M; the determining unit is further used for determining a motion vector candidate to be subsequently put into the motion vector candidate list according to the reference motion vector, the current image block and a reference image of the current image block; The determining unit further obtains, based on the motion vector candidate list, a motion vector of a video sequence used to determine a motion vector of the current image block. (Item 66) The apparatus according to item 65, wherein the acquisition unit is used to acquire M motion vector candidates to be put into a motion vector candidate list for a current image block based on motion vectors of M neighboring blocks in a current frame of the current image block. (Item 67) Item 67. The apparatus according to item 66, wherein the neighboring block is an image block adjacent to or having a certain position pitch of the current image block in a current frame. (Item 68) Item 68. The apparatus according to item 66 or 67, wherein the determination unit is used for sequentially scanning the previous N motion vector candidates among the M motion vector candidates. (Item 69) 69. The apparatus according to any one of items 65 to 68, wherein M is equal to 4 and said N is less than 4. (Item 70) 70. The apparatus according to item 69, wherein N is equal to 1 or 2. (Item 71) The device according to any one of items 65 to 70, wherein the determination unit is used to sequentially scan N motion vector candidates among the M motion vector candidates based on a preset condition, and determine the reference motion vector based on a scanning result. (Item 72) The preset condition is: Item 72. The apparatus according to item 71, wherein the motion vector candidate includes a reference frame that points to a reference image of the current image block that is the same as the reference frame that points to the current image block. (Item 73) The apparatus described in item 71 or 72, wherein the determination unit sequentially scans the N motion vector candidates, stops scanning when it scans to the first motion vector candidate that meets the preset condition, and is used to determine a reference motion vector based on the first scanned motion vector candidate that meets the preset condition. (Item 74) The apparatus described in item 71 or 72, wherein the determination unit is used to perform a scaling process on a specific motion vector candidate in the motion vector candidate list when a motion vector candidate that meets the preset condition is not scanned among the N motion vector candidates, and to determine the reference motion vector based on the specific motion vector candidate after the scaling process. (Item 75) Item 75. The apparatus according to item 74, wherein the specific motion vector candidate is the first motion vector or the last motion vector obtained in scan order among the N motion vector candidates. (Item 76) The apparatus described in item 74 or 75, wherein the determination unit is used to perform a scaling process on a 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 process is the same as the reference image of the current image block, and to set the specific motion vector candidate after the scaling process as the reference motion vector. (Item 77) The apparatus according to item 71 or 72, wherein the determination unit is used to set a default value as the reference motion vector when no motion vector candidate that meets the preset condition is scanned among the N motion vector candidates. (Item 78) Item 78. The apparatus of item 77, wherein the default value is a motion vector of (0,0). (Item 79) An apparatus according to any one of items 65 to 78, wherein the determination unit is used for dividing the current image block into a plurality of sub-image blocks, determining an associated block of the sub-image block in a reference image of the current image block based on the reference motion vector, and determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block. (Item 80) 80. The device according to item 79, wherein the size of the sub-image block and / or the size of its associated block are fixed at 64 pixels or more. (Item 81) 80. The apparatus according to item 79, wherein the current image block is one coding unit CU. (Item 82) An apparatus according to any one of items 65 to 78, wherein the determination unit is used to determine an associated block of the current image block in a reference image of the current image block based on the reference motion vector, and to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block. (Item 83) An apparatus described in any one of items 79 to 82, wherein the determination unit is used to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block after processing when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image, and the motion vector of the associated block after processing and the motion vector of the associated block before processing are the same. (Item 84) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or Item 84. The apparatus according to item 83, comprising motion vectors of the relevant blocks for which a scaling step has been skipped. (Item 85) An apparatus described in any one of items 79 to 82, wherein the determination unit is used to abandon determining a motion vector candidate to be subsequently included in the motion vector candidate list based on the motion vector of the associated block when the motion vector of the associated block points to a specific reference image or the reference image of the current image block is a specific reference image. (Item 86) The device described in any one of items 74 to 76, wherein the determination unit is used to determine a motion vector candidate to be subsequently included in the motion vector candidate list based on the specific motion vector candidate after processing when the specific motion vector candidate indicates a specific reference image or the reference image of the current image block is a specific reference image, and 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 the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or 87. The apparatus according to item 86, comprising motion vectors of the relevant blocks for which a scaling step has been skipped. (Item 88) An apparatus described in any one of items 74 to 76, wherein the determination unit is used to abandon determining a motion vector candidate to be subsequently 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 a specific reference image. (Item 89) The device according to any one of items 65 to 88, wherein the motion vector candidate list is a Merge candidate list. (Item 90) 89. The device according to any one of items 65 to 89, wherein a reference image of the current image block is a peer frame of the current image block. (Item 91) 80. The apparatus of item 79, wherein the size of the sub-image block and / or the size of its associated block are both fixed at 8x8 pixels. (Item 92) An apparatus for acquiring motion vectors of a moving image, comprising: an acquisition unit used to acquire M motion vector candidates to be put into a motion vector candidate list of a current image block; a determining unit, which is used for sequentially scanning at least some of the motion vector candidates among the M motion vector candidates, and determining a reference motion vector of the current image block according to a scanning result; a division unit used for dividing the current image block into a plurality of sub-image blocks, the size of which is fixed at 64 pixels or more; the determining unit is further used for determining an associated block of the sub-image block in a reference image of the current image block according to the reference motion vector; The determining unit further comprises a device for obtaining a motion vector of a video image, which is used for determining a motion vector candidate to be subsequently included in the motion vector candidate list according to the motion vector of the relevant block. (Item 93) Item 93. The apparatus of item 92, wherein the size of the sub-image block and / or the size of its associated block are both fixed at 8x8 pixels. (Item 94) The apparatus described in Item 92, wherein the determination unit is used to sequentially scan at least some of the motion vector candidates, stop scanning when it scans to a motion vector candidate that meets a first preset condition, and determine a reference motion vector based on the scanned motion vector candidate that meets the first preset condition. (Item 95) Item 95. The apparatus according to item 94, wherein the determination unit is used to determine a motion vector candidate that meets the first preset condition as the target neighboring block. (Item 96) Item 95. The apparatus according to item 94, wherein the pre-set condition includes that a reference image of a motion vector candidate and a reference image of the current image block are the same. (Item 97) A moving image processing device, an acquisition unit used to acquire M neighboring blocks of a current image block; A determination unit is used to sequentially scan N neighboring blocks, which is less than M, among the M neighboring blocks, and determine a target neighboring block according to a scanning result, and is further used to determine a related block of the current image block according to a motion vector of the target neighboring block, the current image block, and a reference image of the current image block; an encoding / decoding unit used for encoding / decoding the current image block based on the motion vector of the associated block. (Item 98) Item 98. The apparatus according to item 97, wherein M is equal to 4 and said N is less than 4. (Item 99) 99. The apparatus according to item 98, wherein N is equal to 1 or 2. (Item 100) 100. The apparatus according to any one of items 97 to 99, wherein the determination unit is used for sequentially scanning the previous N neighboring blocks among the M neighboring blocks. (Item 101) The acquisition unit is used for sequentially acquiring M neighboring blocks of a current image block in a preset order; Item 101. The apparatus according to item 100, wherein the previous N neighboring blocks refer to the N neighboring blocks that are determined first in the preset order. (Item 102) The device according to any one of items 97 to 101, wherein the determination unit sequentially scans the N neighboring blocks, stops scanning when it scans to a neighboring block that meets a first preset condition, and is used to determine a target neighboring block based on the scanned neighboring block that meets the first preset condition. (Item 103) Item 103. The apparatus according to item 102, wherein the determination unit is used to determine a neighboring block that meets the first preset condition as the target neighboring block. (Item 104) The preset condition is: Item 104. The apparatus according to item 103, wherein the reference image of the neighboring block and the reference image of the current image block are the same. (Item 105) The apparatus according to any one of items 97 to 104, wherein the encoding / decoding unit is used to determine a reference block of the current image block based on a motion vector of the related block and a reference image. (Item 106) The encoding / decoding unit constructs a candidate block list for the current image block, the candidate blocks in the candidate block list including the M neighboring blocks and the associated block, and is used to encode / decode the current image block based on the reference blocks of the candidate blocks in the candidate block list. (Item 107) The apparatus described in any one of items 97 to 106, wherein the encoding / decoding unit is further used to perform a scaling process on a motion vector of a specific neighboring block among the M neighboring blocks if no neighboring block that meets the preset condition is scanned among the N neighboring blocks, and to encode / decode the current image block based on the motion vector after the scaling process. (Item 108) The apparatus according to item 107, wherein the encoding / decoding unit is used to determine a reference block of the current image block based on the motion vector after the scaling process and a reference image of the current image block. (Item 109) Item 108. The apparatus according to item 107, wherein the specific neighboring block is the first neighboring block or the last neighboring block obtained in scan order among the N neighboring blocks. (Item 110) The device described in item 107, wherein the encoding / decoding unit is used to perform a scaling process on the motion vector of the specific neighboring block so that the reference frame pointed to by the motion vector after the scaling process is the same as the reference image of the current image block, and to set the image block pointed to in the reference image of the current image block by the motion vector after the scaling process as the reference block of the current image block. (Item 111) An apparatus according to any one of items 97 to 106, wherein the determination unit is used to set a default block as a reference block for the current image block if no neighboring block matching the pre-set condition is scanned among the N neighboring blocks. (Item 112) Item 112. The apparatus according to item 111, wherein the default block is the image block pointed to by motion vector (0,0). (Item 113) The determination unit is Dividing the current image block into a plurality of sub-image blocks; An apparatus described in any one of items 97 to 112, which is used for determining an associated block of a sub-image block in a reference image of the current image block based on the motion vector of the target neighboring block, the associated block of the current image block including the associated block of the sub-image block. (Item 114) Item 114. The device according to item 113, wherein the size of the sub-image block and / or the size of its associated block are fixed at 64 pixels or more. (Item 115) Item 115. The apparatus according to any one of items 97 to 114, wherein the current image block is one coding unit CU. (Item 116) The device according to any one of items 97 to 109, wherein the determination unit is used for 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. (Item 117) Item 117. The device according to any one of items 97 to 116, wherein the neighboring block is an image block adjacent to a position of the current image block in the current image or having a certain position pitch. (Item 118) The encoding / decoding unit is used to determine a reference block of the current image block according to 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; Item 118. The device according to any one of items 97 to 117, wherein a motion vector of the relevant block after the processing is the same as a motion vector of the relevant block before the processing. (Item 119) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or Item 119. The apparatus according to item 118, comprising motion vectors of the relevant blocks for which a scaling step has been skipped. (Item 120) An apparatus described in any one of items 97 to 117, wherein the encoding / decoding unit is used to abandon determining a 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. (Item 121) The determination unit is When the motion vector of the neighboring block points to a specific reference image or the reference image of the current image block is a specific reference image, the motion vector of the neighboring block is used to determine the reference block of the current image block according to the motion vector of the related block after processing and the reference image of the current image block; The device according to any one of items 107 to 110, wherein a motion vector of the relevant block after the processing is the same as a motion vector of the relevant block before the processing. (Item 122) The motion vector of the associated block after the processing is a motion vector obtained after scaling the motion vector of said relevant block by a scale of value 1, or Item 122. The apparatus according to item 121, comprising motion vectors of the relevant blocks for which a scaling step has been skipped. (Item 123) A moving image processing device, an acquisition unit used to acquire M neighboring blocks of a current image block; a determining unit used for sequentially scanning at least some of the neighboring blocks among the M neighboring blocks, and determining a target neighboring block according to a scanning result, further used for determining an associated block of the current image block in a reference image of the current image block according to a motion vector of the target neighboring block and the sub-image block; a division unit used for dividing the current image block into a plurality of sub-image blocks, each sub-block having a fixed size of 64 pixels or more; an encoding / decoding unit used for encoding / decoding the current image block based on the motion vector of the associated block. (Item 124) 124. The apparatus of claim 123, wherein a size of the sub-image block and / or a size of a time domain reference block for the sub-image block are both fixed to 8x8 pixels. (Item 125) The step of sequentially scanning at least a part of the M number of neighboring blocks and determining a target neighboring block based on a scanning result includes: The apparatus of item 123 includes sequentially scanning at least some of the neighboring blocks, stopping the scanning when a neighboring block that meets a first preset condition is reached, and determining a target neighboring block based on the scanned neighboring block that meets the first preset condition. (Item 126) Item 126. The apparatus according to item 125, wherein the determination unit is used to determine a neighboring block that meets the first preset condition as the target neighboring block. (Item 127) Item 126. The apparatus according to item 125, wherein the pre-set condition includes that the reference image of the neighboring block and the reference image of the current image block are the same. (Item 128) The apparatus described in item 123, wherein the determination unit is used to determine an associated block of the sub-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 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 device comprising a memory and a processor, the memory being used for storing instructions, the processor executing the instructions stored in the memory, and by executing the instructions stored in the memory, the processor being used for executing the method according to any one of items 1 to 64. (Item 130) A computer storage medium having a computer program stored thereon, the computer program causing the computer to execute the method according to any one of items 1 to 64 when executed by a computer. (Item 131) A computer program product comprising instructions, which when executed by a computer, cause the computer to perform 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
Moving image processing method and moving image processing device
JP7294753B2
Sub-prediction unit (PU) based temporal motion vector prediction in HEVC and sub-PU design in 3d-hevc
US20150085929A1
