Video processing method and device
By generating a candidate list based on historical motion information and encoding or decoding the image blocks, the problem of strong dependence of the image blocks is solved, independent encoding and decoding is realized, and efficiency is improved.
Patent Information
- Application Number
- CN202111243540.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-29
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2038-12-29
AI Technical Summary
In the prior art, the dependence between multiple image blocks is strong, making it difficult for them to independently encode or decode.
By obtaining a candidate list of historical motion information, multiple image blocks in the current frame are encoded or decoded using this list. The historical motion information candidate list is generated based on motion information of the encoded or decoded image blocks except the current area image block.
The dependence between image blocks is overcome, so that multiple image blocks can be encoded or decoded independently, improving the efficiency of encoding and decoding.
Smart Images

Figure CN113905239B_ABST
Abstract
Description
[0001] Copyright Notice
[0002] The disclosure of this patent document contains material that is subject to copyright protection. The copyright is reserved by the copyright owner. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it exists in the official records and files of the Patent and Trademark Office. Technical Field
[0003] The present application relates to the field of image processing, and more specifically, to a video processing method and device. Background Art
[0004] Prediction is an important module of the mainstream video coding framework, and prediction can include intra-frame prediction and inter-frame prediction. Inter-frame prediction modes can include Advanced Motion Vector Prediction (AMVP) mode and Merge mode. In Merge mode, the MVP can be determined in the motion vector prediction value (Motion Vector Prediction, MVP) candidate list, and the MVP can be directly determined as the MV, and the MVP and reference frame index can be transmitted to the decoding end in the bitstream for decoding by the decoding end.
[0005] When constructing the above MVP candidate list, a candidate HMVP may be selected from a history-based motion vector prediction (History-based motion vector prediction, HMVP) candidate list as a candidate MVP in the MVP candidate list.
[0006] The HMVP candidate list is generated based on the motion information of the coded or decoded blocks. Specifically, when the encoding or decoding of a coded or decoded block is completed, the motion information of the coded or decoded block is used to update the HMVP list of the next block to be coded or decoded, so that the dependency between the image blocks is strong. Summary of the invention
[0007] The embodiments of the present application provide a video processing method and device, which can overcome the dependency between multiple image blocks, so that the multiple image blocks can be encoded or decoded independently.
[0008] In a first aspect, a video processing method is provided, comprising: obtaining a historical motion information candidate list, wherein the historical motion information candidate list is used to encode or decode each first image block of a plurality of first image blocks included in a first area in a current frame, wherein the historical motion information candidate list is obtained based on motion information of a second image block, and the second image block is an encoded or decoded image block other than the image block included in the first area; and encoding or decoding each first image block respectively according to the historical motion information candidate list.
[0009] In a second aspect, a video processing method is provided, comprising: using a historical motion information candidate list to encode or decode at least one second image block in a second area of a current frame; updating the historical motion information candidate list based on the motion information of at least part of the second image block in the second area after encoding or decoding to obtain an updated historical motion information candidate list; using the updated historical motion information candidate list to encode or decode multiple first image blocks in the first area of the current frame.
[0010] In a third aspect, a video processing device is provided, comprising: an acquisition unit, configured to acquire a historical motion information candidate list, wherein the historical motion information candidate list is used to encode or decode each first image block of a plurality of first image blocks included in a first area in a current frame, wherein the historical motion information candidate list is acquired based on motion information of a second image block, and the second image block is an encoded or decoded image block other than an image block included in the first area; and an encoding or decoding unit, configured to encode or decode each first image block respectively according to the historical motion information candidate list.
[0011] In a fourth aspect, a video processing device is provided, characterized in that it includes an encoding or decoding unit and an updating unit; the encoding or decoding unit is used to: use the historical motion information candidate list to encode or decode at least one second image block in the second area of the current frame; the updating unit is used to: based on the motion information of at least part of the second image block in the second area after encoding or decoding, update the historical motion information candidate list to obtain the updated historical motion information candidate list; the encoding or decoding unit is further used to: use the updated historical motion information candidate list to encode or decode multiple first image blocks in the first area of the current frame.
[0012] In a fifth aspect, a computer system is provided, comprising: a memory for storing computer executable instructions; and a processor for accessing the memory and executing the computer executable instructions to perform the operations in the method of the first or second aspect above.
[0013] In a sixth aspect, a computer storage medium is provided, in which a program code is stored. The program code can be used to instruct execution of the method of the first or second aspect.
[0014] In a seventh aspect, a computer program product is provided, the program product comprising a program code, and the program code can be used to instruct execution of the method of the first or second aspect.
[0015] In an embodiment of the present application, a historical motion information candidate list can be constructed using the motion information of the encoded or decoded second image block, and the constructed historical motion information candidate list can be used to encode or decode multiple first image blocks in the first area, which can overcome the dependency of the multiple first image blocks, so that the multiple first image blocks in the first area can remain independently encoded or decoded. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is an architectural diagram of the technical solution according to the embodiment of the present application.
[0018] Figure 2 It is a schematic flow chart of a video processing method according to an embodiment of the present application.
[0019] Figure 3 It is a schematic flow chart of a video processing method according to an embodiment of the present application.
[0020] Figure 4 It is a diagram of the structure of MER according to an embodiment of the present application.
[0021] Figure 5 is a schematic diagram of a video processing method according to an embodiment of the present application.
[0022] Figure 6 It is a schematic diagram of HMVP update according to an embodiment of the present application.
[0023] Figure 7 is a schematic diagram of adjacent blocks of an image block according to an embodiment of the present application.
[0024] Figure 8 It is a schematic diagram of spatial domain candidates for an image block according to an embodiment of the present application.
[0025] Fig. 9It is a schematic block diagram of a video processing device according to an embodiment of the present application.
[0026] Fig.10 It is a schematic block diagram of a video processing device according to an embodiment of the present application.
[0027] Fig.11 It is a schematic block diagram of a computer system according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] Unless otherwise specified, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art of the present application. The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit the scope of this application.
[0030] Figure 1 It is an architectural diagram of the technical solution of the embodiment of the present application.
[0031] like Figure 1 As shown, the system 100 can receive data to be processed 102, process the data to be processed 102, and generate processed data 108. For example, the system 100 can receive data to be encoded, encode the data to be encoded to generate encoded data, or the system 100 can receive data to be decoded, and decode the data to be decoded to generate decoded data. In some embodiments, the components in the system 100 can be implemented by one or more processors, which can be a processor in a computing device or a processor in a mobile device (such as a drone). The processor can be any type of processor, and the embodiment of the present invention does not limit this. In some possible designs, the processor can include an encoder, a decoder, or a codec, etc. The system 100 can also include one or more memories. The memory can be used to store instructions and data, for example, computer executable instructions for implementing the technical solution of the embodiment of the present invention, data to be processed 102, processed data 108, etc. The memory can be any type of memory, and the embodiment of the present invention does not limit this.
[0032] The data to be encoded may include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded. In some cases, the data to be encoded may include sensory data from a sensor, which may be a visual sensor (e.g., a camera, an infrared sensor), a microphone, a near-field sensor (e.g., an ultrasonic sensor, a radar), a position sensor, a temperature sensor, a touch sensor, etc. In some cases, the data to be encoded may include information from a user, such as biometric information, which may include facial features, fingerprint scans, retinal scans, voice recordings, DNA samples, etc.
[0033] Wherein, when encoding each image, the image may be initially divided into a plurality of image blocks. In some embodiments, the image may be divided into a plurality of image blocks, which are referred to as macroblocks or largest coding units (LCUs) in some coding standards. Image blocks may or may not have any overlapping parts. The image may be divided into any number of image blocks. For example, the image may be divided into an m×n image block array. Image blocks may have a rectangular shape, a square shape, a circular shape, or any other shape. Image blocks may have any size, such as p×q pixels. In modern video coding standards, images of different resolutions may be encoded by first dividing the image into a plurality of small blocks. For H.264, image blocks are referred to as macroblocks, which may be 16×16 pixels in size, and for HEVC, image blocks are referred to as largest coding units, which may be 64×64 in size. Each image block may have the same size and / or shape. Alternatively, two or more image blocks may have different sizes and / or shapes. In some embodiments, an image block may not be a macroblock or a maximum coding unit, but may include a portion of a macroblock or a maximum coding unit, or include at least two complete macroblocks (or maximum coding units), or include at least one complete macroblock (or maximum coding unit) and a portion of a macroblock (or maximum coding unit), or include at least two complete macroblocks (or maximum coding units) and some portions of macroblocks (or maximum coding units). In this way, after the image is divided into a plurality of image blocks, these image blocks in the image data may be encoded separately.
[0034] In the encoding process, in order to remove redundancy, the image can be predicted. Different images in the video can use different prediction methods. According to the prediction method used by the image, the image can be divided into intra-frame prediction images and inter-frame prediction images, where the inter-frame prediction images include forward prediction images and bidirectional prediction images. I image is an intra-frame prediction image, also known as a key frame; P image is a forward prediction image, that is, a previously encoded P image or I image is used as a reference image; B image is a bidirectional prediction image, that is, the previous and next images are used as reference images. One implementation method is that the encoding end encodes multiple images and generates a group of pictures (GOP) one by one. The GOP is an image group consisting of an I image, and multiple B images (or bidirectional prediction images) and / or P images (or forward prediction images). When playing, the decoding end reads the GOP one by one, decodes it, reads the picture, and then renders it for display.
[0035] When performing inter-frame prediction, the most similar block can be found in the reference frame (generally a reconstructed frame near the time domain) for each image block as the prediction block of the current image block. The relative displacement between the current block and the prediction block is the motion vector (MV).
[0036] The inter-frame prediction modes in the video coding standard may include the AMVP mode and the Merge mode.
[0037] For the AMVP mode, the MVP can be determined first. After obtaining the MVP, the starting point of motion estimation can be determined according to the MVP. Motion search can be performed near the starting point. After the search is completed, the optimal MV is obtained. The position of the reference block in the reference image is determined by the MV. The reference block is subtracted from the current block to obtain the residual block. The MV is subtracted from the MVP to obtain the motion vector difference (Motion Vector Difference, MVD), and the MVD is transmitted to the decoding end through the bit stream.
[0038] For the Merge mode, the MVP can be determined first, and the MVP can be directly determined as the MV. In order to obtain the MVP, an MVP candidate list (mergecandidatelist) can be constructed first. The MVP candidate list can include at least one candidate MVP. Each candidate MVP can correspond to an index. After the encoder selects the MVP from the MVP candidate list, the encoder can write the MVP index into the bitstream. The decoder can find the MVP corresponding to the index from the MVP candidate list according to the index to realize decoding of the image block.
[0039] In order to understand the Merge mode more clearly, the following will introduce the operation process of encoding using the Merge mode.
[0040] Step 1: Get the MVP candidate list;
[0041] Step 2: Select the best MVP from the MVP candidate list, and get the index of the MVP in the MVP candidate list;
[0042] Step 3: Use the MVP as the MV of the current block;
[0043] Step 4: Determine the position of the reference block in the reference image according to the MV;
[0044] Step 5: Subtract the current block from the reference block to obtain a residual block;
[0045] Step 6: Pass the residual data and MVP index to the decoder.
[0046] It should be understood that the following process is only a specific implementation of the Merge mode. The Merge mode may also have other implementations.
[0047] For example, the Skip mode is a special case of the Merge mode. After obtaining the MV according to the Merge mode, if the encoder determines that the current block is basically the same as the reference block, then there is no need to transmit the residual data, only the index of the MV needs to be transmitted, and further, a flag can be transmitted, which can indicate that the current block can be directly obtained from the reference block.
[0048] That is to say, the characteristic of the Merge mode is: MV=MVP (MVD=0); and the Skip mode has one more characteristic, namely: the reconstructed value rec=prediction value pred (residual value resi=0).
[0049] When constructing the above MVP candidate list, a candidate HMVP may be selected from the HMVP candidate list as a candidate MVP in the MVP candidate list.
[0050] For the HMVP mentioned above, when the encoding of an encoded block is completed, the motion information of the encoded block can be used to update the HMVP list of the next block to be encoded, which will make the dependency between image blocks stronger.
[0051] In hardware implementation, in order to increase throughput, the encoding (eg motion estimation, etc.) process of adjacent blocks can be performed in parallel. However, when constructing the HMVP candidate list, this dependency will make parallel processing impossible.
[0052] To this end, the following solution provided in the embodiment of the present application can overcome the dependency between image blocks.
[0053] It should be understood that the solution of the embodiments of the present application may not be limited to the Merge mode mentioned above, but may also be used in other coding modes, that is, it may be applicable to any coding mode that uses a historical motion information candidate list (e.g., HMVP candidate list) during the coding process.
[0054] It should also be understood that the solution of the embodiment of the present application can overcome the dependencies between image blocks, and thus can be used in scenarios where image blocks are processed in parallel, but it should be understood that the embodiment of the present application can also be used in scenarios where non-parallel processing is performed, that is, overcoming the dependencies between image blocks can be used for other purposes.
[0055] Figure 2 2 is a schematic flow chart of a video processing method 200 according to an embodiment of the present application. The method 200 includes at least part of the following contents. The following method 200 can be used at the encoding end or at the decoding end.
[0056] In 210, a historical motion information candidate list is obtained, where the historical motion information candidate list is used to encode or decode each first image block of a plurality of first image blocks included in a first region in a current frame, wherein the historical motion information candidate list is obtained based on motion information of a second image block, where the second image block is an encoded or decoded image block other than the image block included in the first region;
[0057] In 220, each of the first image blocks is encoded or decoded according to the historical motion information candidate list.
[0058] Figure 3 3 is a schematic flow chart of a video processing method 300 according to an embodiment of the present application. The method 300 includes at least part of the following contents. The following method 300 can be used at the encoding end or at the decoding end.
[0059] In 310, at least one second image block in a second region of the current frame is encoded or decoded using the historical motion information candidate list;
[0060] In 320, based on the motion information of at least part of the second image blocks in the second region that is encoded or decoded, the historical motion information candidate list is updated to obtain an updated historical motion information candidate list;
[0061] In 330 , a plurality of first image blocks in the first area of the current frame are encoded or decoded using the updated historical motion information candidate list.
[0062] In the above method 200 or 300, the motion information of the encoded or decoded second image block can be used to construct a historical motion information candidate list, and the constructed historical motion information candidate list is used to encode or decode multiple first image blocks in the first area, which can overcome the mutual dependence between the multiple first image blocks, so that the multiple first image blocks in the first area can remain independently encoded or decoded.
[0063] In order to more clearly understand the present application, the specific implementation of the embodiment of the present application will be described below. It should be understood that the following description can be applied to the above methods 200 and 300.
[0064] In the embodiment of the present application, the historical motion information candidate list may include at least one candidate historical motion information, which may be selected to construct a motion information list, so that the encoder or decoder can select the motion information of the current image block from the motion information list. The candidate historical motion information may be obtained based on the motion information of the encoded or decoded image block.
[0065] Optionally, the motion information in the embodiment of the present application may represent a combination of one or more of a motion vector, a reference frame index value, a motion vector difference, and a motion vector prediction value.
[0066] The historical motion information candidate list in the embodiment of the present application may be an HMVP candidate list, and the HMVP candidate list may optionally include at least one candidate MVP.
[0067] The region (eg, the first region or the second region) in the embodiment of the present application may be a motion estimation region (MER). The MER may be a rectangular region or a non-rectangular region, for example, a non-rectangular region composed of a plurality of squares and / or rectangles.
[0068] The encoding process of the image blocks within each region can be processed in parallel.
[0069] The sizes of the various regions in the embodiments of the present application may be the same or different. The regions may be square, rectangular, diamond, triangle, trapezoid or circular.
[0070] In the embodiment of the present application, a region may belong to only one CTU, that is, the region may not cross CTUs, and a CTU may include one or more regions. Of course, a region may also include one or more CTUs, or include a non-integer number of CTUs, that is, there is a CTU that belongs to multiple regions.
[0071] In the embodiment of the present application, each region may include one or more image blocks, and the sizes of the image blocks may be the same or different. The number of image blocks included in each region may be the same or different. The pixels in each region may not have overlapping parts.
[0072] The image block in the embodiment of the present application may be a coding unit (Coding Unit, CU), and of course, may also be a prediction unit (prediction unit, PU), which is not specifically limited in the embodiment of the present application.
[0073] For example, Figure 4 The four MERs shown are MER1, MER2, MER3 and MER4, wherein the sizes of the four MERs may be the same, and the number of image blocks included in each MER may be different, wherein MER1 includes four CUs, namely CU0, CU1, CU2 and CU3, MER2 includes five CUs, namely CU4, CU5, CU6, CU7 and CU8, MER3 includes CU9, and MER4 includes CU10, CU11 and CU12, and the sizes of the various CUs may not be exactly the same.
[0074] Optionally, in the embodiments of the present application, Figure 5 As shown, the motion information of the coded or decoded image blocks of the previous region (the second region) can be used to update the historical motion information candidate list, and the image blocks of the current region (the first region) can be coded or decoded using the updated historical motion information candidate list. Further, the motion information of the coded or decoded image blocks of the current region can be used to update the historical motion information candidate list again for coding or decoding of the image blocks of the next region.
[0075] Optionally, in an embodiment of the present application, for the first area, when encoding or decoding different first image blocks, the candidate historical motion information included in the historical motion information candidate list used and the order of the candidate historical motion information in the historical motion information candidate list are the same.
[0076] Taking the region MER as an example, after all the image blocks in the current MER are encoded or decoded, in order to ensure that the historical motion information candidate list used for encoding or decoding the CU in the next MER is different from the historical motion information candidate list used by the current MER, the motion information of the image blocks in the current MER can be used to update the historical motion information candidate list. When encoding or decoding the CU in the next MER, the updated historical motion information candidate list is used to construct the motion information list.
[0077] For example, Figure 4As shown, after all image blocks (CU0-CU3) in MER1 are encoded or decoded, before encoding or decoding image blocks in MER2, the motion information of CU0-CU3 can be used to update the candidate list of historical motion information. After the update of the candidate list of historical motion information is completed, the candidate list of historical motion information used in the process of encoding or decoding all image blocks (CU4-CU8) in MER2 is no longer updated, and the same candidate list of historical motion information is used. After all image blocks (CU9) in MER3 are encoded or decoded, before encoding or decoding image blocks in MER4, the motion information of CU9 needs to be used to update the candidate list of historical motion information. After the update of the candidate list of historical motion information is completed, the candidate list of historical motion information used in the process of encoding or decoding all image blocks (CU10-CU12) in MER4 is no longer updated, and the same candidate list of historical motion information is used.
[0078] Optionally, in an embodiment of the present application, when constructing a motion information list using the historical motion information candidate list, a first-in-first-out principle may be adopted, that is, the historical motion information that is added first is selected first for constructing the motion information list.
[0079] Specifically, the first motion information (obtained based on the motion information of the encoded or decoded image block of the second region) can be added to the header of the historical motion information candidate list, where the header here refers to the position in the historical motion information candidate list that is first selected for constructing the motion information list, so that the historical motion information that is first added to the historical motion information candidate list can be preferentially selected for constructing the motion information list.
[0080] Optionally, in an embodiment of the present application, the number of candidate historical motion information included in the historical motion information candidate list can be preset, that is, the size of the historical motion information candidate list is fixed. For example, the number of candidate historical motion information included in the historical motion information candidate list can be fixed to 6.
[0081] In this way, adding the motion information of the encoded or decoded image block to the historical motion information candidate list will increase the number of candidate historical motion information included in the historical motion information candidate list, so that the same number of candidate historical motion information can be deleted from the historical motion information candidate list at the same time.
[0082] When deleting candidate historical motion information from the historical motion information candidate list, the deleted candidate historical motion information may be the candidate historical motion information at the end of the historical motion information candidate list, wherein the candidate historical motion information at the end of the table refers to the candidate historical motion information that is finally selected to construct the motion information list.
[0083] Alternatively, other methods may be used to delete the candidate historical motion information from the historical motion information candidate list.
[0084] For example, if the candidate historical motion information added to the candidate historical motion information list is the same as the candidate historical motion information already in the candidate historical motion information list, the same candidate historical motion information can be deleted. Here, it can also be understood that the position of the same candidate historical motion information in the candidate historical motion information list is moved to the head of the candidate historical motion information list.
[0085] For example, Figure 6 As shown, the HMVP candidate list before the update includes L candidate historical motion information, and the candidate historical motion information to be added is HMVP2. After checking the HMVP candidate list, it is found that the same HMVP2 exists in the HMVP candidate list before the update. At this time, the HMVP2 can be moved to the head of the HMVP candidate list, and the positions of other candidate historical motion information are adjusted accordingly. Or, Figure 6 It can also be understood as adding HMVP2 to the HMVP candidate list before updating, and deleting HMVP2 from the HMVP candidate list before updating.
[0086] It should be understood that the above-mentioned operations of deleting the candidate historical motion information at the end of the table and deleting the candidate historical motion information that is the same as the added candidate historical motion information may exist at the same time.
[0087] For example, there are two candidate historical motion information that need to be added, one candidate historical motion information is the same as a candidate historical motion information in the list before update, and the other candidate historical motion information does not exist in the list before update. At this time, the same candidate historical motion information can be deleted from the list, and the candidate historical motion information at the end of the table can be deleted, so that the number of added candidate historical motion information is the same as the number of deleted candidate historical motion information.
[0088] Optionally, in an embodiment of the present application, in each update of the historical motion information candidate list, the number of candidate historical motion information added and / or the number of candidate historical motion information deleted from the historical motion information candidate list may be less than a preset value, which may be less than or equal to the number of candidate historical motion information allowed to be included in the historical motion information candidate list.
[0089] Optionally, in an embodiment of the present application, the motion information of all encoded or decoded image blocks in the second area can be used to update the historical motion information candidate list, or the motion information of part of the encoded or decoded image blocks can be used to update the historical motion information candidate list.
[0090] Optionally, in an embodiment of the present application, the second image block used to update the historical motion information candidate list may be the last encoded or decoded image block in the second region, and / or include an image block at a specified position in the second region.
[0091] The image blocks at the specified positions in the second area include image blocks located at at least one of the following positions:
[0092] The upper left corner of the second area, the upper right corner of the second area, the lower left corner of the second area, the lower right corner of the second area, and the center point of the second area.
[0093] Optionally, in the embodiment of the present application, the second image blocks in the second area that can be used to update the historical motion information candidate list can be selected according to the position coordinates and / or encoding order of each second image block.
[0094] The priority of the image block on the right side of the second region is higher than the priority of the image block on the left side of the second region, and / or the priority of the image block on the lower side of the second region is higher than the priority of the image block on the upper side of the second region. The lower side and the side mentioned here may be relative positions, not necessarily directly above or directly below. Alternatively, the priority of the motion information of the image block encoded earlier is higher than the priority of the image block encoded later.
[0095] For example, Figure 4 As shown, taking MER2 as the current region (ie, the first region), the priorities of CU1 and CU3 of MER1 are higher than those of CU0 and CU2, and the priority of CU3 is higher than that of CU1.
[0096] It should be understood that in the embodiment of the present application, the priority of each second image block in the second area may be determined based on other factors in addition to the position coordinates and / or encoding order of the second image block, and the embodiment of the present application does not specifically limit this.
[0097] Optionally, in one implementation of the embodiment of the present application, a coded or decoded image block can be selected from the second area according to the amount of historical motion information that needs to be updated each time, and the motion information of the selected coded or decoded image block is used to update the historical motion information candidate list, wherein the amount of historical motion information that needs to be updated can be equal to the number of selected coded or decoded image blocks.
[0098] For example, if two candidate historical motion information need to be updated in the historical motion information candidate list, two encoded or decoded image blocks can be selected from the second area, and the motion information of the two selected encoded or decoded image blocks can be added to the historical motion information candidate list, and the two candidate historical motion information can be deleted.
[0099] Optionally, in another implementation of the embodiment of the present application, the number of selected coded or decoded image blocks may be greater than the number of historical motion information that needs to be updated. In this case, weighted processing may be performed on the motion information of all or part of the selected coded or decoded image blocks so that the number of available historical motion information is equal to the number of candidate historical motion information that needs to be updated.
[0100] For example, the number of historical motion information that needs to be updated in the historical motion information candidate list is 1, and the number of selected encoded or decoded image blocks is 3. Then, the motion information of the 3 encoded or decoded image blocks can be weighted to obtain 1 candidate historical motion information, and the 1 candidate historical motion information is added to the historical motion information candidate list, and 1 candidate historical motion information is deleted from the historical motion information candidate list.
[0101] For example, the number of historical motion information that needs to be updated in the historical motion information candidate list is 2, and the number of selected encoded or decoded image blocks is 3, then the motion information of 2 of the encoded or decoded image blocks can be weighted to obtain 1 candidate historical motion information, the weighted candidate historical motion information and the unprocessed candidate historical motion information are added to the historical motion information candidate list, and 2 candidate historical motion information are deleted from the historical motion information candidate list.
[0102] When weighting the motion information of multiple encoded or decoded image blocks, averaging may be performed or not.
[0103] The weight of each piece of motion information may be determined according to the positional relationship between each encoded or decoded image block and the first region and / or the encoding or decoding order of each encoded or decoded image block.
[0104] For example, the priority of motion information of an image block belonging to the second area and located on the left side of the first area is higher than the priority of motion information of the upper left and lower left image blocks.
[0105] For example, the priority of motion information of an image block coded earlier is higher than the priority of motion information of an image block coded later.
[0106] Optionally, in an embodiment of the present application, when there are multiple motion information that need to be added to the historical motion information candidate list, the multiple motion information may have priorities, with motion information with higher priorities being added to a front position of the header, and motion information with lower priorities being added to a back position of the header.
[0107] The priority of the motion information of the encoded or decoded image block may be determined according to the positional relationship between the encoded or decoded image block and the current region.
[0108] For example, the priority of motion information of an image block located on the left side of the current region is higher than the priority of motion information of an image block located on the upper left and lower left sides.
[0109] Optionally, in an embodiment of the present application, the image block in the second region that can be used to update the historical motion information candidate list can be an image block in an affine transformation motion compensation mode (affine mode). The affine mode optionally describes the affine motion (irregular motion such as enlargement / reduction, rotation, etc.) field of the entire image block based on the motion information of the control point.
[0110] Optionally, in an embodiment of the present application, one or more second regions may be selected to update the historical motion information candidate list, wherein when selecting a second region to update the historical motion information candidate list, the second region may be a previously encoded or decoded region of the first region.
[0111] Optionally, in an embodiment of the present application, the second area and the first area are arranged along a row direction of the image, or along a column direction of the image.
[0112] That is, when the historical motion information candidate list used by the current region is updated, the region used needs to have the same row arrangement or the same column arrangement as the current region.
[0113] For example, Figure 4 As shown, MER1 can be used to update the HMVP candidate list for encoding or decoding of MER2, and MER3 can be used to update the HMVP candidate list for encoding or decoding of MER4. However, MER2 cannot be used to update the HMVP candidate list for encoding or decoding of MER3.
[0114] Or, if Figure 4 As shown, MER1 can be used to update the HMVP candidate list for encoding or decoding of MER3, and MER2 can be used to update the HMVP candidate list for encoding or decoding of MER4. However, MER3 cannot be used to update the HMVP candidate list for encoding or decoding of MER2.
[0115] Optionally, in an embodiment of the present application, when the second region is the earliest encoded or decoded region arranged in a row direction or a column direction of the image, the HMVP candidate list used when encoding or decoding the second region is empty.
[0116] Specifically, the encoder may clear the historical motion information candidate list each time it finishes encoding a row (or column) by row (or column), and when encoding the next row (or column), the historical motion information candidate list is empty.
[0117] The rows (or columns) mentioned here may include multiple regions. After encoding multiple regions of a row (column), multiple regions of the next row (column) may be encoded, wherein the ranges of row (or column) coordinates of each row (or column) are the same, and the ranges of column (or row) coordinates are different.
[0118] The above-mentioned rows or columns may be CTU rows or columns, each CTU row or CTU column includes at least one CTU, and each CTU includes at least one region.
[0119] At this time, when one CTU row or column is encoded, the HMVP list can be cleared, and then the next CTU row or column is encoded.
[0120] For example, Figure 4 As shown, when encoding the CU in MER1, if MER1 is the first MER in the current CTU row, the historical motion information candidate list used by all image blocks in MER1 is empty; if MER1 is not the first MER in the current CTU row, the historical motion information candidate list used by all image blocks in MER1 is the historical motion information candidate list updated according to the motion information of the image blocks in the previous MER.
[0121] It should be understood that the embodiments of the present application are not limited to the above description. For example, the historical motion information candidate list is empty only when the first area of the current frame is encoded or decoded, and the historical motion information candidate lists of other areas can be updated based on the motion information of the image block of the previous area.
[0122] For example, Figure 4 As shown, when encoding the CU in MER1, if MER1 is the first MER in the current frame, the historical motion information candidate list used by all image blocks in MER1 is empty; if MER1 is not the first MER in the current frame, the historical motion information candidate list used by all image blocks in MER1 is the historical motion information candidate list updated according to the motion information of the image blocks in the previous MER.
[0123] Optionally, in an embodiment of the present application, when updating the historical motion information candidate list, the historical motion information selected for updating can be compared (pruning) with the selectable candidate motion information in other higher priority lists (that is, compared with the historical motion information candidate list, the candidate motion information in this list is preferentially used to construct the motion information list).
[0124] If the motion information list has been constructed using other lists with higher priorities, the historical motion information selected for updating may be compared with the candidate motion information already in the motion information list.
[0125] If it is found that candidate motion information in other lists with higher priorities (or candidate motion information already in the motion information list) is different from the historical motion information selected for updating, the historical motion information may be added to the historical motion information candidate list.
[0126] If they are the same, the historical motion information may not be added to the historical motion information candidate list, and new historical motion information may be selected to be added to the historical motion information candidate list.
[0127] For example, motion information of image blocks with lower priority in the second region is selected as historical motion information and added to the historical motion information candidate list. Alternatively, the historical motion information candidate list may not be updated, or a smaller number of candidate historical motion information may be updated.
[0128] In order to reduce the number of comparisons to reduce software and hardware resource overhead, the number of comparisons may be limited.
[0129] The maximum number of comparisons may be determined according to the following parameters: the number of candidate motion information in other lists with higher priority (or, the candidate motion information already in the motion information list), and the number of candidate historical motion information included in the historical motion information candidate list.
[0130] The specific limitation of the maximum value L may be, for example, as follows:
[0131] L=(N<=4)?M:(8-N)
[0132] Wherein, L represents the number of comparisons, N represents the number of candidate motion information in other lists with higher priority (or, the number of candidate motion information already in the motion information list), and M represents the number of candidate historical motion information in the historical motion information candidate list.
[0133] The meaning of the above formula can be understood as: if N is less than or equal to 4, the maximum number of comparisons is equal to M, otherwise, the maximum number of comparisons is 8-N.
[0134] Optionally, in an embodiment of the present application, the above-mentioned historical motion information candidate list can be stored in a storage space. Optionally, in this case, updating the historical motion information candidate list using motion information of at least one second image block included in the second area of the current frame is performed after the second area is encoded or decoded.
[0135] Specifically, the above-mentioned historical motion information candidate list is stored in a storage space, which can be understood as the number of historical motion information candidate lists can be 1. At this time, after the encoding or decoding of the previous area is completed using the historical motion information candidate list, the historical motion information candidate list is updated using the motion information of the corresponding image block, and the image block of the current area is encoded or decoded using the updated historical motion information candidate list. After the encoding or decoding of the image block of the current area is completed, the historical motion information candidate list is updated again, and the updated historical motion information candidate list can be used for encoding or decoding of the next area.
[0136] Optionally, in an embodiment of the present application, the above-mentioned historical motion information candidate list may also be stored in a first storage space and a second storage space other than the first storage space, respectively. In this case, the historical motion information candidate list stored in one of the storage spaces may be used to encode or decode the image blocks of the second region, and during the encoding or decoding of the second region, the historical motion information candidate list stored in another storage space may be updated using the encoded or decoded second image blocks of the second region, thereby achieving synchronization of the encoding or decoding process and the historical motion information candidate list.
[0137] For ease of understanding, two implementations are provided below to illustrate how to use the historical motion information candidate list when the historical motion information candidate list is stored in the first storage space and the second storage space respectively.
[0138] Implementation 1
[0139] The historical motion information candidate list is stored in a first storage space and a second storage space respectively, and the second area is encoded or decoded using the historical motion information candidate list in the second storage space; during the encoding process or decoding process of the second area, the historical motion information candidate list in the first storage space is updated using the motion information of at least one second image block included in the second area; and each of the first image blocks is encoded or decoded respectively according to the updated historical motion information candidate list in the first storage space.
[0140] Furthermore, after the encoding or decoding of the second region is completed, the updated historical motion information candidate list in the first storage space is used to update the historical motion information candidate list in the second storage space; and the updated historical motion information candidate list in the second storage space is used to encode or decode at least one third image block in the third region. The historical motion information candidate list in the second storage space is updated so that the updated historical motion information candidate list in the second storage space is the same as the updated historical motion information candidate list in the first storage space.
[0141] Specifically, when encoding or decoding the first area, area 1 (the first area of the current frame or the current CTU row), storage space A and storage space B respectively store the same historical motion information candidate list (the list may be empty), and area 1 may be encoded or decoded using the historical motion information candidate list in storage space A. Since the encoding or decoding of the image blocks in area 1 is completed in a certain order, the motion information of the image blocks that have been encoded or decoded may be used to update the historical motion information candidate list in storage space B. After the encoding or decoding process of area 1 is completed, the historical motion information candidate list in storage space B may have been updated. At this time, the updated historical motion information candidate list in storage space B may be used to encode or decode the second area, area 2, and at the same time, the updated historical motion information candidate list in storage space B may be used. The historical motion information candidate list in storage space A is updated; after the historical motion information candidate list in storage space A is updated based on the updated historical motion information candidate list in storage space B, the historical motion information candidate list in storage space A can be updated again using the encoded or decoded image blocks in region 2 during the encoding or decoding process of region 2; after the encoding or decoding process of region 2 is completed, the historical motion information candidate list in storage space A may have been updated again, and the image blocks in the third region, region 3, can be encoded or decoded using the updated historical motion information candidate list in storage space A, and the historical motion information candidate list in storage space B can be updated again using the updated historical motion information candidate list in storage space A, and subsequent operations can refer to the previous description and so on.
[0142] In this implementation, the historical motion information candidate list is stored in two storage spaces, and the historical motion information candidate list in each storage space is used alternately for encoding or decoding of the region, and during the encoding or decoding process of the region, the currently unused historical motion information candidate list can be updated (including updating the used historical motion information candidate list to the currently unused historical motion information candidate list, and updating the motion information of the currently encoded or decoded image block to the currently unused historical motion information candidate list), so that the updating of the historical motion information candidate list and the encoding or decoding of the image block can be synchronized, thereby improving the encoding or decoding efficiency.
[0143] Implementation 2
[0144] The historical motion information candidate list is stored in a first storage space and a second storage space respectively, and the second region is encoded or decoded using the historical motion information candidate list in the second storage space; during the encoding or decoding process of the second region, the historical motion information candidate list in the first storage space is updated using the motion information of at least one second image block included in the second region; after the encoding or decoding of the second region is completed, the historical motion information candidate list in the second storage space is updated using the updated historical motion information candidate list in the first storage space; and each of the first image blocks is encoded or decoded according to the updated historical motion information candidate list in the second storage space. Further, during the encoding or decoding process of the first region, the historical motion information candidate list in the first storage space is updated again using the motion information of at least one first image block included in the first region; after the encoding or decoding of the first region is completed, the historical motion information candidate list in the second storage space is updated again using the updated historical motion information candidate list in the first storage space; and at least one third image block in the third region is encoded or decoded according to the updated historical motion information candidate list in the second storage space. The historical motion information candidate list in the second storage space is updated so that the updated historical motion information candidate list in the second storage space is the same as the updated historical motion information candidate list in the first storage space.
[0145] Specifically, when encoding or decoding the first area, area 1 (the first area of the current frame or the current CTU row), storage space A and storage space B respectively store the same historical motion information candidate list (the list can be empty), and the historical motion information candidate list in storage space A can be used to encode or decode the area 1. Since the encoding or decoding of the image blocks in area 1 is completed in a certain order, the motion information of the image blocks that have been encoded or decoded can be used to update the historical motion information candidate list in storage space B. After the encoding or decoding process of area 1 is completed, the historical motion information candidate list in storage space B may have been updated. At this time, the historical motion information candidate list in storage space B can be used to update the historical motion information in storage space A. The candidate list is updated to obtain an updated historical motion information candidate list of storage space A; and the updated historical motion information candidate list of storage space A is used to encode or decode the second area, area 2, and in the process of encoding or decoding area 2, the historical motion information candidate list in storage space B is updated again. After the encoding or decoding process of area 2 is completed, the historical motion information candidate list in storage space B may have been updated again. At this time, the historical motion information candidate list in storage space B can be used to update the historical motion information candidate list in storage space A again. The updated historical motion information candidate list in storage space A can encode or decode area 3, and subsequent operations can be deduced according to the above description.
[0146] In this implementation, the historical motion information candidate list is stored in two storage spaces, wherein the historical motion information candidate list in one storage space is always used for encoding or decoding of the region, and during the encoding or decoding process of the region, the historical motion information candidate list in the other storage space is updated, and after the encoding or decoding of the region, the historical motion information candidate list in the other storage space is updated using the updated historical motion information candidate list. Since the time taken to update another historical motion information candidate list using an updated historical motion information candidate list is very likely to be less than the time taken to update the historical motion information candidate list using the motion information of the image block, in this implementation, after the encoding or decoding of the region is completed, only one updated historical motion information candidate list needs to be used to update another historical motion information candidate list, and the time required for the update here is shorter, thereby improving the encoding or decoding efficiency.
[0147] The above describes how to update the historical motion information candidate list. The following describes how to use the updated historical motion information candidate list for encoding or decoding.
[0148] Specifically, the updated historical motion information candidate list can be used to generate a motion information list for each first image block in the first region; and the motion information list generated for each first image block can be used to select motion information for each first image block.
[0149] Among them, for the encoding end, when selecting motion information from the motion information list, the first image block to be encoded can be matched with the image blocks corresponding to the various motion information in the motion information list, and the motion information corresponding to the image block with the smallest matching cost can be selected as the selected motion information, and the index of the motion information can be written into the bitstream.
[0150] The decoding end can construct a motion information list in the same way, and read the index of the motion information from the bitstream, and directly select the motion information of the current image block from the motion information list according to the index, so as to further perform decoding based on the motion information.
[0151] The following describes how to construct a motion information list by taking the Merge mode and the motion information list as the MVP candidate list as an example.
[0152] The composition of the MVP candidate list may include at least part of the following (1) to (5).
[0153] Specifically, the spatial domain candidate MV in (1) can be used to construct an MVP candidate list. If the number of candidate MVPs included in the MVP candidate list constructed at this time does not reach the preset number, the time domain candidate MV in (2) can be added to the MVP candidate list including the spatial domain candidate MV. If the number of candidate MVPs included in the MVP candidate list constructed at this time does not reach the preset number, the paired average candidate MV in (3) can be added to the MVP candidate list including the spatial domain candidate MV and the time domain candidate MV. If the number of candidate MVPs included in the MVP candidate list constructed at this time does not reach the preset number, the HMVP in (4) can be added to the MVP candidate list including the spatial domain candidate MV, the time domain candidate MV and the paired average candidate MV. If the number of candidate MVPs included in the MVP candidate list constructed at this time does not reach the preset number, the zero vector in (5) can be added to the MVP candidate list including the spatial domain candidate MV, the time domain candidate MV, the paired average candidate MV and the HMVP until the number of candidate MVPs in the MVP candidate list reaches the preset value.
[0154] When some candidates of the following items are added to the MVP candidate list, the number of MVP candidates included in the list has reached a preset number, and at this time, the remaining elements of the item can be stopped from being added to the MVP candidate list.
[0155] The following is an introduction to the various components that make up the MVP candidate list.
[0156] (1) Airspace candidate MV
[0157] Specifically, the MV of the image block spatially adjacent to the current image block may be used as the candidate MVP that can be added to the MVP candidate list.
[0158] For example, Figure 7 As shown, assuming that the image block in the lower left corner of the current image block is A0, the image block on the left is A1, the image block in the upper left corner is B2, the image block above is B1, and the upper right corner is B0, then the order of candidate MVPs from high to low priority is A1->B1->B0->A0->B2.
[0159] (2) Time Domain Candidate MV
[0160] Specifically, the MV of an image block adjacent to the current image block in the time domain may be used as a candidate MVP that can be added to the MVP candidate list.
[0161] Different from the spatial domain candidate MV, the temporal domain candidate MV may not directly use the motion information of the candidate block, and may make corresponding scaling adjustments based on the temporal position relationship between the current frame and the reference frame.
[0162] (3) Pairwise average candidate MV
[0163] Based on the candidate MVPs that currently constitute the MVP candidate list, the pairwise average candidate MV is derived by averaging the predefined pairings.
[0164] The predefined pairing method and order can be: (0,1), (0,2), (1,2), (0,3), (1,3), (2,3), where 0, 1, 2 and 3 represent the 1st, 2nd, 3rd and 4th candidate MVPs in the HMVP candidate list respectively, and each bracket represents the averaging of the MVP candidates therein.
[0165] (4)HMVP
[0166] The MV of the encoded image block may be used to construct an HMVP candidate list, and the candidate HMVP in the HMVP candidate list may be selected as the candidate MVP added to the MVP candidate list.
[0167] (5) Zero vector
[0168] When adding each item of (1)-(4) to the MVP candidate list, if the number of MVP candidates in the MVP candidate list still does not reach the predetermined number, a zero vector may be used for padding until the number of MVP candidates in the MVP candidate list reaches a preset value.
[0169] It should be understood that the motion information list introduced above is merely a specific implementation method of the embodiment of the present application and should not constitute a special limitation on the embodiment of the present application.
[0170] Optionally, in the embodiment of the present application, when constructing the spatial motion information candidate list, it is also possible to avoid using the motion information of the image blocks in the same region to construct it. Specifically, the image block corresponding to the motion information in the spatial motion information candidate list corresponding to each first image block does not belong to the first region.
[0171] For example, Figure 8 As shown, for the first MER, all possible spatial candidate motion information of the image block CU0 (motion information of the image block where the gray filling block is located) is available, because the image blocks corresponding to these spatial candidate motion information are all outside the MER where CU0 is located. For CU5 of the second MER, the spatial candidate motion information should originally include the motion information of the image blocks corresponding to the surrounding 3 black filling blocks and 1 white filling block, but because the image block corresponding to the 1 white filling block has not been encoded, the image blocks corresponding to the 3 black filling blocks belong to the same MER as CU5, and the spatial candidate motion information in CU5 may not include the motion information of these blocks. At this time, the spatial candidate motion information list of CU5 can be empty, or the motion information of the image blocks of other MERs can be selected as candidates for the spatial candidate motion information list. For CU9, the spatial candidate motion information should originally include the motion information of the image blocks corresponding to the surrounding 2 gray filling blocks, 1 black filling block and 2 white filling blocks. However, since the image block corresponding to the white filling block has not been encoded, the image block corresponding to the 1 black filling block belongs to the same MER as CU9, then the spatial candidate motion information list of CU9 can include the motion information of the image blocks corresponding to the 2 gray filling blocks.
[0172] In an embodiment of the present application, a historical motion information candidate list can be constructed using the motion information of the encoded or decoded second image block, and the constructed historical motion information candidate list can be used to encode or decode multiple first image blocks in the first area, which can overcome the dependency of the multiple first image blocks, so that the multiple first image blocks in the first area can remain independently encoded or decoded.
[0173] Fig. 9 4 is a schematic block diagram of a video processing device 400 according to an embodiment of the present application. The device 400 includes an acquisition unit 410 and an encoding or decoding unit 420.
[0174] Among them, the acquisition unit 410 is used to obtain a historical motion information candidate list, and the historical motion information candidate list is used to encode or decode each first image block among multiple first image blocks included in the first area in the current frame, wherein the historical motion information candidate list is obtained based on the motion information of the second image block, and the second image block is an encoded or decoded image block other than the image block included in the first area; the encoding or decoding unit 420 is used to encode or decode each of the first image blocks according to the historical motion information candidate list.
[0175] Optionally, in the embodiment of the present application, the encoding or decoding unit 420 is further configured to:
[0176] The plurality of first image blocks are encoded or decoded in parallel according to the historical motion information candidate list.
[0177] Optionally, in an embodiment of the present application, when encoding or decoding different first image blocks, the candidate historical motion information included in the historical motion information candidate list used and the order of the candidate historical motion information in the historical motion information candidate list are the same.
[0178] Optionally, in the embodiment of the present application, the acquisition unit 410 is further used to:
[0179] Using the motion information of at least one second image block included in the second area of the current frame, the historical motion information candidate list is updated, and the updated historical motion information candidate list is used to encode or decode the multiple first image blocks;
[0180] Optionally, in an embodiment of the present application, the encoding or decoding process of the second region is earlier than that of the first region, and the image blocks of the second region are encoded or decoded using the historical motion information candidate list that has not been updated.
[0181] Optionally, in an embodiment of the present application, when the historical motion information candidate list is updated, the number of candidate historical motion information added to the historical motion information candidate list is less than a preset value, and / or the number of candidate historical motion information deleted from the historical motion information candidate list is less than a preset value.
[0182] Optionally, in the embodiment of the present application, the device 400 further includes a selection unit 430, which is used to:
[0183] The at least one second image block is selected from the image blocks included in the second area based on the position coordinates of the image blocks in the second area.
[0184] Optionally, in the embodiment of the present application, in the process of selecting the at least one second image block from the image blocks included in the second area:
[0185] The priority of the image block on the right side in the second region is higher than the priority of the image block on the left side in the second region, and / or the priority of the image block on the bottom side in the second region is higher than the priority of the image block on the top side in the second region.
[0186] Optionally, in this embodiment of the present application, the at least one second image block includes the last encoded or decoded image block in the second region, and / or includes an image block at a specified position in the second region.
[0187] Optionally, in the embodiment of the present application, the image block at the specified position in the second area includes an image block located at at least one of the following positions:
[0188] The upper left corner of the second area, the upper right corner of the second area, the lower left corner of the second area, the lower right corner of the second area, and the center point of the second area.
[0189] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0190] performing weighted processing on motion information of the plurality of second image blocks;
[0191] The historical motion information candidate list is updated using the weighted motion information.
[0192] Optionally, in an embodiment of the present application, the first area and the second area are arranged along a row direction of the image, or along a column direction of the image.
[0193] Optionally, in an embodiment of the present application, the first region and the second region belong to the same coding tree unit CTU row or CTU column, each CTU row or CTU column includes at least one CTU, and each CTU includes at least one region.
[0194] Optionally, in an embodiment of the present application, when the second region is the earliest encoded or decoded region arranged in the row direction or the column direction of the image, the historical motion information candidate list used when encoding or decoding the second region is empty.
[0195] Optionally, in this embodiment of the present application, the second region is a previously encoded or decoded region of the first region.
[0196] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0197] The first candidate historical motion information to be added is added to the header of the historical motion information candidate list.
[0198] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0199] The candidate historical motion information at the end of the historical motion information candidate list is deleted, or the candidate historical motion information in the historical motion information table that is the same as the first candidate historical motion information is deleted.
[0200] Optionally, in this embodiment of the present application, the second image block is an image block in a non-affine transformation motion compensation mode.
[0201] Optionally, in the embodiment of the present application, the encoding or decoding unit 420 is further configured to:
[0202] Using the historical motion information candidate list, generating a motion information list for each first image block respectively;
[0203] Motion information is selected for each of the first image blocks using the motion information lists generated for each of the first image blocks respectively.
[0204] Optionally, in the embodiment of the present application, the encoding or decoding unit 420 is further configured to:
[0205] Using the historical motion information candidate list and the spatial domain motion information candidate list corresponding to each first image block, respectively generate a motion information list for each first image block;
[0206] The image block corresponding to the motion information in the spatial motion information candidate list corresponding to each first image block does not belong to the first area.
[0207] Optionally, in an embodiment of the present application, the historical motion information candidate list is a historical motion vector prediction HMVP candidate list.
[0208] Optionally, in an embodiment of the present application, the historical motion information candidate list is stored in a storage space.
[0209] Optionally, in an embodiment of the present application, updating the historical motion information candidate list using motion information of at least one second image block included in the second region of the current frame is performed after encoding or decoding of the second region is completed.
[0210] Optionally, in an embodiment of the present application, the historical motion information candidate list is stored in a first storage space and a second storage space respectively, the second area is encoded or decoded using the historical motion information candidate list in the second storage space, and the acquisition unit is further used to:
[0211] In an encoding process or a decoding process of the second region, the historical motion information candidate list in the first storage space is updated by using motion information of at least one second image block included in the second region;
[0212] The encoding or decoding unit 420 is further configured to:
[0213] Each of the first image blocks is encoded or decoded according to the updated historical motion information candidate list in the first storage space.
[0214] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0215] After encoding or decoding of the second region is completed, the historical motion information candidate list in the second storage space is updated using the updated historical motion information candidate list in the first storage space.
[0216] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0217] The historical motion information candidate list in the second storage space is updated so that the updated historical motion information candidate list in the second storage space is the same as the updated historical motion information candidate list in the first storage space.
[0218] Optionally, in the embodiment of the present application, the historical motion information candidate list is stored in a first storage space and a second storage space respectively, the second area is encoded or decoded using the historical motion information candidate list in the second storage space, and the acquisition unit 410 is further used to:
[0219] In an encoding process or a decoding process of the second region, the historical motion information candidate list in the first storage space is updated by using motion information of at least one second image block included in the second region;
[0220] After the encoding or decoding of the second region is completed, the historical motion information candidate list in the second storage space is updated by using the updated historical motion information candidate list in the first storage space;
[0221] The encoding or decoding unit 420 is further configured to:
[0222] According to the updated historical motion information candidate list in the second storage space, each of the first image blocks is encoded or decoded respectively.
[0223] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0224] During the encoding process or the decoding process of the first region, the historical motion information candidate list in the first storage space is updated again by using the motion information of at least one first image block included in the first region;
[0225] After the encoding or decoding of the first region is completed, the historical motion information candidate list in the second storage space is updated again by using the historical motion information candidate list in the first storage space that has been updated again.
[0226] Optionally, in the embodiment of the present application, the acquiring unit 410 is further configured to:
[0227] The historical motion information candidate list in the second storage space is updated so that the updated historical motion information candidate list in the second storage space is the same as the updated historical motion information candidate list in the first storage space.
[0228] It should be understood that the video processing device 400 can implement the corresponding operations implemented by the encoding end or the decoding end in the above method embodiments, which will not be described in detail for the sake of brevity.
[0229] Fig.10 is a schematic block diagram of a video processing device 500 according to an embodiment of the present application. The device 500 includes an encoding or decoding unit 510 and an updating unit 520;
[0230] The encoding or decoding unit 510 is used to: encode or decode at least one second image block in the second area of the current frame using the historical motion information candidate list;
[0231] The updating unit 520 is used to: update the historical motion information candidate list based on the motion information encoded or decoded by at least part of the second image blocks in the second area to obtain the updated historical motion information candidate list;
[0232] The encoding or decoding unit 510 is further configured to: use the updated historical motion information candidate list to encode or decode a plurality of first image blocks in the first area of the current frame.
[0233] Optionally, in the embodiment of the present application, the encoding or decoding unit 510 is further configured to:
[0234] The updated historical motion information candidate list is used to encode or decode the multiple first image blocks in parallel.
[0235] Optionally, in an embodiment of the present application, when encoding or decoding different first image blocks, the candidate historical motion information included in the historical motion information candidate list used and the order of the candidate historical motion information in the historical motion information candidate list are the same.
[0236] Optionally, in an embodiment of the present application, when the historical motion information candidate list is updated, the number of candidate historical motion information added to the historical motion information candidate list is less than a preset value, and / or the number of candidate historical motion information deleted from the historical motion information candidate list is less than a preset value.
[0237] Optionally, in the embodiment of the present application, the device 500 further includes a selection unit 530, configured to:
[0238] The at least part of the second image blocks are selected from the image blocks included in the second area based on the position coordinates of the image blocks in the second area.
[0239] Optionally, in the embodiment of the present application, in the process of selecting the at least part of the second image blocks from the image blocks included in the second area:
[0240] The priority of the image block on the right side in the second region is higher than the priority of the image block on the left side in the second region, and / or the priority of the image block on the bottom side in the second region is higher than the priority of the image block on the top side in the second region.
[0241] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0242] performing weighted processing on the motion information of at least part of the second image block;
[0243] The historical motion information candidate list is updated using the weighted motion information.
[0244] Optionally, in an embodiment of the present application, the second area and the first area are arranged along a row direction of the image, or along a column direction of the image.
[0245] Optionally, in an embodiment of the present application, the second region and the first region belong to the same coding tree unit CTU row or CTU column, each CTU row or CTU column includes at least one CTU, and each CTU includes at least one region.
[0246] Optionally, in an embodiment of the present application, when the second region is the earliest encoded or decoded region arranged in the row direction or the column direction of the image, the historical motion information candidate list used when encoding or decoding the second region is empty.
[0247] Optionally, in this embodiment of the present application, the second region is a previously encoded or decoded region of the first region.
[0248] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0249] The first candidate historical motion information to be added is added to the header of the historical motion information candidate list.
[0250] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0251] The candidate historical motion information at the end of the historical motion information candidate list is deleted, or the candidate historical motion information in the historical motion information table that is the same as the first candidate historical motion information is deleted.
[0252] Optionally, in this embodiment of the present application, the second image block is an image block in a non-affine transformation motion compensation mode.
[0253] Optionally, in the embodiment of the present application, the encoding or decoding unit 510 is further configured to:
[0254] Using the updated historical motion information candidate list, respectively generating a motion information list for each first image block;
[0255] Motion information is selected for each of the first image blocks using the motion information lists generated for each of the first image blocks respectively.
[0256] Optionally, in the embodiment of the present application, the encoding or decoding unit 510 is further configured to:
[0257] Using the updated historical motion information candidate list and the spatial domain motion information candidate list corresponding to each first image block, respectively generate the motion information list for each first image block;
[0258] The image block corresponding to the motion information in the spatial motion information candidate list corresponding to each first image block does not belong to the first area.
[0259] Optionally, in an embodiment of the present application, the historical motion information candidate list is a historical motion vector prediction HMVP candidate list.
[0260] Optionally, in this embodiment of the present application, the at least part of the second image block includes the last encoded or decoded image block in the second region, and / or includes an image block at a specified position in the second region.
[0261] Optionally, in the embodiment of the present application, the image block at the specified position in the second area includes an image block located at at least one of the following positions:
[0262] The upper left corner of the second area, the upper right corner of the second area, the lower left corner of the second area, the lower right corner of the second area, and the center point of the second area.
[0263] Optionally, in an embodiment of the present application, the historical motion information candidate list is stored in a storage space.
[0264] Optionally, in the embodiment of the present application, the updating of the historical motion information candidate list using the motion information of at least a portion of the second image block included in the second area of the current frame is performed after encoding or decoding of the second area is completed.
[0265] Optionally, in an embodiment of the present application, the historical motion information candidate list is stored in a first storage space and a second storage space respectively, the second area is encoded or decoded using the historical motion information candidate list in the second storage space, and the updating unit is further used to:
[0266] In an encoding process or a decoding process of the second region, the historical motion information candidate list in the first storage space is updated by using the motion information of the at least part of the second image block included in the second region;
[0267] The encoding or decoding unit 520 is further configured to:
[0268] Each of the first image blocks is encoded or decoded according to the updated historical motion information candidate list in the first storage space.
[0269] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0270] After encoding or decoding of the second region is completed, the historical motion information candidate list in the second storage space is updated using the updated historical motion information candidate list in the first storage space.
[0271] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0272] The historical motion information candidate list in the second storage space is updated so that the updated historical motion information candidate list in the second storage space is the same as the updated historical motion information candidate list in the first storage space.
[0273] Optionally, in the embodiment of the present application, the historical motion information candidate list is stored in a first storage space and a second storage space respectively, the second area is encoded or decoded using the historical motion information candidate list in the second storage space, and the updating unit 520 is further used to:
[0274] In an encoding process or a decoding process of the second region, the historical motion information candidate list in the first storage space is updated by using the motion information of the at least part of the second image block included in the second region;
[0275] After the encoding or decoding of the second region is completed, updating the historical motion information candidate list in the second storage space by using the updated historical motion information candidate list in the first storage space;
[0276] The encoding or decoding unit 510 is further configured to: encode or decode each of the first image blocks respectively according to the updated historical motion information candidate list in the second storage space.
[0277] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0278] During the encoding process or the decoding process of the first region, the historical motion information candidate list in the first storage space is updated again by using the motion information of at least one first image block included in the first region;
[0279] After the encoding or decoding of the first region is completed, the historical motion information candidate list in the second storage space is updated again by using the historical motion information candidate list in the first storage space that has been updated again.
[0280] Optionally, in the embodiment of the present application, the updating unit 520 is further configured to:
[0281] The historical motion information candidate list in the second storage space is updated so that the updated historical motion information candidate list in the second storage space is the same as the updated historical motion information candidate list in the first storage space.
[0282] It should be understood that the video processing device 500 can implement the corresponding operations implemented by the encoding end or the decoding end in the above method embodiments, which will not be described in detail for the sake of brevity.
[0283] Fig.11 A schematic block diagram of a computer system 600 according to an embodiment of the present application is shown.
[0284] like Fig.11 As shown, the computer system 600 may include a processor 610 and may further include a memory 620 .
[0285] It should be understood that the computer system 600 may also include components commonly included in other computer systems, such as input and output devices, communication interfaces, etc., and the embodiments of the present application are not limited to this.
[0286] The memory 620 is used to store computer executable instructions.
[0287] The memory 620 may be various types of memories, for example, it may include high-speed random access memory (RAM), and it may also include non-volatile memory (non-volatile memory), such as at least one disk memory, which is not limited in the embodiments of the present application.
[0288] The processor 610 is used to access the memory 620 and execute the computer executable instructions to perform the operations in the method for video processing in the embodiment of the present application.
[0289] The processor 610 may include a microprocessor, a field-programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), etc., which is not limited in the embodiments of the present application.
[0290] The device and computer system for video processing of the embodiments of the present application may correspond to the execution subject of the method for video processing of the embodiments of the present application, and the above-mentioned and other operations and / or functions of each module in the device and computer system for video processing are respectively for implementing the corresponding processes of the aforementioned methods, which will not be repeated here for the sake of brevity.
[0291] An embodiment of the present application further provides an electronic device, which may include the device or computer system for video processing according to the various embodiments of the present application described above.
[0292] An embodiment of the present application further provides a computer storage medium, in which a program code is stored. The program code can be used to instruct the execution of the loop filtering method of the above-mentioned embodiment of the present application.
[0293] It should be understood that in the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0294] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0295] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0296] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0297] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0298] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0299] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0300] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A video processing method, characterized in that: include: Acquire a historical motion information candidate list, where the historical motion information candidate list is used to encode each first image block of a plurality of first image blocks included in a first area in a current frame; encoding each of the first image blocks respectively according to the historical motion information candidate list; The historical motion information candidate list is not updated when encoding multiple first image blocks in the first area.
2. The method according to claim 1, characterized in that When encoding different first image blocks, the candidate historical motion information included in the adopted candidate list of historical motion information and the order of the candidate historical motion information in the candidate list of historical motion information are the same.
3. The method according to claim 1, characterized in that: The historical motion information candidate list is a historical motion vector prediction HMVP candidate list, and the method further includes: A candidate HMVP is obtained according to the historical motion information candidate list; the candidate HMVP is a candidate in the historical motion information candidate list.
4. The method according to claim 1, characterized in that: The historical motion information candidate list is stored in a storage space.
5. A video processing method, characterized in that: include: Acquire a historical motion information candidate list, where the historical motion information candidate list is used to decode each first image block of a plurality of first image blocks included in a first area in a current frame; Decoding each of the first image blocks respectively according to the historical motion information candidate list; The historical motion information candidate list is not updated when a plurality of first image blocks in the first area are decoded.
6. The method according to claim 5, characterized in that When decoding different first image blocks, the candidate historical motion information included in the adopted candidate list of historical motion information and the order of the candidate historical motion information in the candidate list of historical motion information are the same.
7. The method according to claim 5, characterized in that The historical motion information candidate list is a historical motion vector prediction HMVP candidate list, and the method further includes: A candidate HMVP is obtained according to the historical motion information candidate list; the candidate HMVP is a candidate in the historical motion information candidate list.
8. The method according to claim 5, characterized in that The historical motion information candidate list is stored in a storage space.
9. A video encoding device, characterized in that: The device comprises a processor configured to process the following operations: Acquire a historical motion information candidate list, where the historical motion information candidate list is used to encode each first image block of a plurality of first image blocks included in a first area in a current frame; encoding each of the first image blocks respectively according to the historical motion information candidate list; The historical motion information candidate list is not updated when encoding multiple first image blocks in the first area.
10. The device according to claim 9, characterized in that When encoding different first image blocks, the candidate historical motion information included in the adopted candidate list of historical motion information and the order of the candidate historical motion information in the candidate list of historical motion information are the same.
11. A video decoding device, characterized in that: The device comprises a processor configured to process the following operations: Acquire a historical motion information candidate list, where the historical motion information candidate list is used to decode each first image block of a plurality of first image blocks included in a first area in a current frame; Decoding each of the first image blocks respectively according to the historical motion information candidate list; The historical motion information candidate list is not updated when a plurality of first image blocks in the first area are decoded.
12. The device according to claim 11, characterized in that When decoding different first image blocks, the candidate historical motion information included in the adopted candidate list of historical motion information and the order of the candidate historical motion information in the candidate list of historical motion information are the same.
13. A computer-readable storage medium, characterized in that: A code stream formed by a computer program is stored thereon, and when the computer program is executed by a computer, the computer executes the method according to any one of claims 1 to 8.
14. A video processing method, characterized in that: include: Acquire a historical motion information candidate list, where the historical motion information candidate list is used to encode each first image block of a plurality of first image blocks included in a first area in a current frame; encoding each of the first image blocks respectively according to the historical motion information candidate list; Output the encoding result as a code stream; The historical motion information candidate list is not updated when encoding multiple first image blocks in the first area.
Citation Information
Patent Citations
Image decoding method, image encoding method, image decoding device, image encoding device, and image encoding / decoding device
CN103535039A
Method and device for determining motion vector for video coding or video decoding
CN103931192A