WO2020043111A1 - Historic candidate list-based image coding and decoding methods, and codec - Google Patents
Historic candidate list-based image coding and decoding methods, and codec Download PDFInfo
- Publication number
- WO2020043111A1 WO2020043111A1 PCT/CN2019/102924 CN2019102924W WO2020043111A1 WO 2020043111 A1 WO2020043111 A1 WO 2020043111A1 CN 2019102924 W CN2019102924 W CN 2019102924W WO 2020043111 A1 WO2020043111 A1 WO 2020043111A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- motion information
- image block
- historical candidate
- list
- historical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/109—Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
Definitions
- the present application relates to the field of video image encoding and decoding, and in particular, to an image encoding method based on a historical candidate list, an image decoding method based on a historical candidate list, and a corresponding image encoding device and image decoding device.
- Video compression technology such as MPEG-1 video, MPEG-2 video, ITU-T H.262 / MPEG-2, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (Advanced Video Coding, AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC) standards in progress
- AVC Advanced Video Coding
- HEVC High Efficiency Video Coding
- VVC Versatile Video Coding
- devices can efficiently transmit and receive digital video information.
- images of a video sequence are divided into image blocks for encoding or decoding.
- the inter prediction mode may include but is not limited to: skip / merge mode (skip / merge mode) and non-skip / merge mode (such as advanced motion vector prediction mode (AMVP mode)), etc., and both use multi-motion
- the information contention method performs inter prediction.
- a candidate motion information list (referred to as a candidate list) including multiple sets of motion information (also referred to as multiple candidate motion information) is introduced.
- the encoder can select a suitable set from the candidate list
- Candidate motion information to predict the motion information (such as a motion vector) of the current coded image block, and then obtain the best reference image block (that is, the prediction block) of the current coded image block.
- a candidate list including multiple sets of motion information (also called block vectors) is sometimes introduced.
- the embodiments of the present application provide an image encoding method based on a historical candidate list, an image decoding method based on a historical candidate list, and a corresponding image encoding device and image decoding device to improve the motion vector prediction efficiency and thus the encoding and decoding performance.
- an embodiment of the present application provides an image decoding method based on a historical candidate list (also referred to as a historical candidate list), where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information
- a historical candidate list also referred to as a historical candidate list
- the motion information of the previously decoded image block (for example, the motion information of the previously decoded image block in the current slice slice or the current image or the current one or more coding tree units CTU), the method includes:
- one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current decoded image block.
- one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction performed on the decoded image block; for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter frame performed on the decoded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more In the process of inter prediction performed by decoding image blocks, this application does not limit this.
- the historical candidate list includes one or more historical candidates, and each historical candidate is motion information of a previously encoded or previously decoded block.
- the historical candidate list may be slice-level, or the historical candidate list may be image-level, or the historical candidate list may be at the level of several CTUs (CTU lines); Alternatively, the historical candidate list may be at the CTU level;
- the historical candidate motion information is motion information of a previously decoded image block in a slice to which the current image block belongs; for another example, the historical candidate motion information is a previously decoded image in an image to which the current image block belongs.
- the historical candidate list is generated and updated during the decoding process of the slice to which the current image block belongs; and for example, the historical candidate list is generated and updated during the decoding process of the image to which the current image block belongs.
- the historical candidate list is generated and updated during the decoding process of the CTU group (for example, one or more CTUs) to which the current image block belongs;
- one or more historical candidate motion information in the historical candidate list is used in an inter prediction process performed on the current decoded image block; in other words, on the current decoded image
- the inter prediction process performed by a block includes performing inter prediction on the current decoded image block based on a candidate motion information list, wherein the candidate motion information list is different from the historical candidate list, and one of the historical candidate lists Or more historical candidate motion information is included in the candidate motion information list.
- the embodiment of the present application considers the inter prediction mode of the currently decoded image block to update the historical candidate list. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the motion information of the currently decoded image block is not used.
- Update the historical candidate list on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, use the motion information of the current decoded image block to update the historical candidate list; in this case, even the original history in the historical candidate list
- the number of candidate motion information is large, which also reduces the operation of finding duplicates and data movement that may be caused by adding motion information of the currently decoded image block to the historical candidate list, and the historical candidate list is used in image decoding. Continuous updates in the process help to improve the efficiency of motion vector prediction, that is, to improve the efficiency of inter-frame prediction, thereby improving the performance of codecs.
- the execution subject of the method in the embodiment of the present application may be a video decoder or an electronic device with a video decoding function.
- the updating the historical candidate list using motion information of the currently decoded image block according to an inter prediction mode of the currently decoded image block includes:
- the inter prediction mode of the currently decoded image block is the first inter prediction mode, using the motion information of the currently decoded image block to update the historical candidate list in a first processing manner;
- the motion candidate information of the currently decoded image block is used to update the history candidate list in a second processing manner, where the first processing manner is different from the second processing manner. Processing method.
- the embodiment of the present application uses different methods to update the historical candidate list under different inter prediction modes.
- the motion vector prediction efficiency will be improved to a certain extent, that is, the inter prediction efficiency will be improved, thereby improving the encoding and decoding performance.
- the first inter prediction mode is a skip mode or a merge mode
- the second inter prediction mode is a non-first inter prediction Inter prediction mode of the mode
- the second inter prediction mode is that the first inter prediction mode is a skip mode or a merge mode; the first inter prediction mode is a non-second inter prediction mode. Inter prediction mode.
- updating the historical candidate list in a first processing manner by using the motion information of the currently decoded image block includes:
- the updating the historical candidate list in a second processing manner by using the motion information of the currently decoded image block includes:
- the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last history candidate) join the history candidate list.
- the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing method is to use the current decoded image block. In the process of updating the historical candidate list of motion information, duplicate items need to be checked. Conversely, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing method is to update the historical candidate with the motion information of the currently decoded image block.
- updating the historical candidate list in a first processing manner by using the motion information of the currently decoded image block includes:
- the target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate
- the motion information is historical candidate motion information previously decoded based on the first inter prediction mode (for example, the target historical candidate motion information is motion of an image block previously decoded based on the first inter prediction mode. information).
- the updating the historical candidate list in a second processing manner by using the motion information of the currently decoded image block includes:
- the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the currently decoded image block is a skip / merge mode, the first processing mode does not use the current decoding Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, by default, the motion candidate information of the currently decoded image block is used to update the historical candidate list, and duplicate entries are checked during the update process.
- the current decoded image block is used.
- the operation of searching for duplicate items can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
- updating the historical candidate list in a first processing manner by using the motion information of the currently decoded image block includes:
- the motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode.
- the updating the historical candidate list in a second processing manner by using the motion information of the currently decoded image block includes:
- the size of the historical candidate list currently reaches the preset list size remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently decoded image block as the latest historical candidate motion information The historical candidate list.
- the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode does not use the current decoding. Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, the historical candidate list is updated by using the motion information of the currently decoded image block by default, and no duplicate check is performed during the update process.
- the current decoded image block is used.
- the operation of searching for duplicates can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
- the motion information of the currently decoded image block is used as the latest historical candidate motion information.
- Joining the historical candidate list includes:
- the motion information of the current decoded image block is taken as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
- the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list.
- the performing an inter prediction process on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain motion information of the currently decoded image block includes:
- the inter prediction mode of the currently decoded image block is the first inter prediction mode
- historical candidate motion information in the historical candidate list is added to the first candidate motion information list of the currently decoded image block; it should be understood Yes, the first candidate motion information list corresponds to the first inter prediction mode, for example, the merge mode corresponds to the merge candidate list;
- the inter prediction mode of the currently decoded image block is the second inter prediction mode
- the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently decoded image block; it should be understood
- the second candidate motion information list corresponds to the second inter prediction mode, for example, the inter mode corresponds to the MVP candidate list.
- the target candidate motion information is determined in the motion information list or the second candidate motion information list; if the length of the first candidate motion information list or the second candidate motion information list is one, there is no need to parse the first identification information (such as an index), Determining the only candidate motion information as target candidate motion information);
- the candidate motion information list (such as the first candidate motion information list or the second candidate motion information list) is different from the historical candidate list; the candidate motion information list is at the image block level (different image blocks have The corresponding candidate motion information list), and the historical candidate list (also known as the historical candidate list) is the current slice (slice) or current image or the current CTU level of one or more coding tree units, for example, under the same slice During the encoding or decoding of multiple image blocks, this continuously updated historical candidate list can be used.
- the historical candidate list is continuously updated during the image decoding process.
- a candidate motion information list such as a merge candidate list or an AMVP candidate list
- the prediction mode of the currently decoded image block To determine whether historical candidates in the historical candidate list are added to the corresponding candidate motion information list, for example, when the inter prediction mode of the currently decoded image block is inter mode, the historical candidate motion information in the historical candidate list is not added To the AMVP candidate list; when the inter prediction mode of the currently decoded image block is the merge / skip mode, the historical candidate motion information in the historical candidate list is added to the fusion candidate list; in this case, once the historical candidate list is constructed
- the process of using the historical candidate list to construct a candidate motion information list can reduce the number of operations to find duplicate items in a certain program, thereby improving the encoding and decoding performance to a certain extent.
- the first candidate motion information list includes motion information of one or more spatial domain reference blocks of the currently decoded image block and / or one or more times of the currently decoded image block.
- Motion information of a domain reference block wherein the spatial domain reference block includes: motion information of an adjacent block adjacent to the spatial domain of the currently decoded image block and / or one or more non-adjacent blocks that are not adjacent to the spatial domain of the currently decoded image block Motion information;
- the time-domain reference block includes: motion information of a neighboring block in a lower right corner of a co-located block at a same position as the current decoded image block in a reference frame, or motion information of a center position of the co-located block ;
- the second candidate motion information list includes a motion vector of a spatial domain reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
- the first candidate motion information list includes motion vectors of one or more spatial domain reference blocks of the currently decoded image block and / or motion vectors of one or more time domain reference blocks of the currently decoded image block;
- the second The candidate motion information list includes motion information of one or more spatial domain reference blocks of the currently decoded image block and / or motion information of one or more time domain reference blocks of the currently decoded image block.
- the spatial reference block here refers to a reference block related to the current image block spatial domain, and may include one or more spatial reference blocks adjacent to the current image block in the image where the current image block is located, and / or , One or more spatial reference blocks in the image where the current image block is located, which are not adjacent to the current image block.
- the one or more spatial reference blocks adjacent to the current decoded image block in the image where the current decoded image block is located include: a fourth spatial domain adjacent block A0 located at the lower left side of the current decoded image block, A first spatial domain neighboring block A1 located on the left side of the current decoded image block, a third spatial domain neighboring block B0 located on the upper right side of the current decoded image block, and a second spatial domain neighboring block B1 located on the upper side of the current decoded image block.
- the fifth spatially adjacent block B2 located on the upper left side of the current decoded image block.
- the time domain reference block here refers to a reference block related to the time domain of the current image block, and may include one or more spatial domain references in the reference image that are adjacent to the co-located block.
- Block, and / or one or more sub-blocks in the collocated block wherein the collocated block is an image block in a reference image having the same size, shape, and coordinates as the current image block, or
- the juxtaposed block is an image block with the same size and shape in the reference image as the current image block with a specified position offset.
- the reference image here refers to a reconstructed image. Specifically, the reference image here refers to a reference image in one or more reference image lists.
- the time-domain reference block includes: a lower-right spatial-domain neighboring block H of a co-located block of the current image block, a co-located block, an upper-left middle block C0, and the parallel The lower right middle block C3 of the collocated block, the upper left block TL of the collocated block, or the lower right block BR of the collocated block.
- the determined motion vector image block also referred to as an encoded image block or a decoded image block.
- adding the historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently decoded image block includes:
- adding the second historical candidate motion information to all The first candidate motion information list is as follows:
- the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list
- the first historical candidate motion information is relative to the second history
- the candidate motion information is first added to the first candidate motion information list.
- the inter prediction efficiency can be further improved, thereby improving the encoding and decoding performance to a certain extent.
- the performing an inter prediction process on the currently decoded image block based on the inter prediction mode of the currently decoded image block includes:
- the target candidate motion information is determined from a candidate motion information list corresponding to the inter prediction mode of the currently decoded image block, and the target candidate motion information is used to predict the motion information of the currently decoded image block, where in the historical candidate list
- One or more historical candidate motion information is included in the candidate motion information list; for example, if the inter prediction mode of the currently decoded image block is a merge mode, the candidate corresponding to the inter prediction mode of the current decoded image block
- the motion information list is a merged motion information candidate list merge and candidate list; if the inter prediction mode of the currently decoded image block is the AMVP mode, the candidate motion information list corresponding to the inter prediction mode of the currently decoded image block is the motion vector prediction candidate list MVP candidate list; the historical candidate list is different from the candidate motion information list.
- Inter prediction is performed on the current decoded image block according to the motion information of the current decoded image block to obtain a predicted image (that is, a predicted pixel value) of the current decoded image block.
- the candidate motion information in the candidate motion information list in the embodiment of the present application may include a motion vector MV and reference image indication information.
- the candidate motion information may also include one or both of them.
- the candidate motion information may include only a motion vector MV.
- Motion vectors generally include horizontal component offsets and vertical component offsets. For example, (x, y) is used for MV, x is for horizontal position offset, and y is for vertical position offset.
- the reference image indication information may include, but is not limited to, a reference image list and a reference image index corresponding to the reference image list.
- the reference image index is used to identify a reference image pointed to by a motion vector in a corresponding reference image list (RefPicList0 or RefPicList1).
- An image may be referred to as a frame, and a reference image may be referred to as a reference frame.
- the historical candidate list is continuously updated during the image decoding process, and historical candidate motion information (history candidate) is added to the candidate motion information list of the currently decoded image block (such as the fused motion information candidate list or the motion vector prediction candidate list).
- the method increases the number of candidate motion information (such as merge / skip fusion motion information candidates or inter-mode motion vector prediction candidates), and improves prediction efficiency.
- the method further includes:
- the Reconstructed image Based on the residual image (that is, the residual value) of the current decoded image block and the predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the inter prediction process, the Reconstructed image. It should be understood that if the predicted image of the currently decoded image block is the same as the original image of the currently decoded image block, there is no residual image (that is, a residual value) of the currently decoded image block, based on the inter prediction The predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the process, and a reconstructed image of the currently decoded image block is obtained.
- the image decoding method based on the historical candidate list in the embodiment of the present application is not only applicable to merge / skip mode and / or advanced motion vector prediction mode (AMVP), but also applicable to And other modes for predicting the motion information of the current image block by using the motion information of the spatial reference block and / or the time domain reference block, thereby improving codec performance.
- AMVP advanced motion vector prediction mode
- an embodiment of the present application provides an image encoding method based on a historical candidate list, where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information is a motion of a previously encoded image block.
- Information for example, the historical candidate motion information is motion information of a previously decoded image block in the current slice or current image or the current one or more coding tree unit CTUs, and the method includes:
- a syntax element used to indicate an inter prediction mode of the current coded image block is coded into a code stream.
- the historical candidate list includes one or more historical candidates, and each historical candidate is motion information of a previously encoded or previously decoded block.
- the historical candidate list may be at the slice level, or the historical candidate list may be at the level of several CTUs (CTU lines); or the historical candidate list may be at the CTU level;
- the historical candidate motion information is the motion information of the previously encoded image block in the slice to which the current image block belongs; for another example, the historical candidate motion information is the previously encoded image in the image to which the current image block belongs.
- Block motion information; for another example, the historical candidate motion information is motion information of a previously encoded image block in a CTU group (eg, one or more CTUs) to which the current image block belongs;
- the historical candidate list is generated and updated in the encoding process of the slice to which the current image block belongs; and for another example, the historical candidate list is generated and updated in the encoding process of the image to which the current image block belongs.
- the historical candidate list is generated and updated during the encoding process of the CTU group (for example, one or more CTUs) to which the current image block belongs;
- one or more historical candidate motion information in the historical candidate list is used in an inter prediction process performed on the current encoded image block; in other words, on the current encoded image
- the inter prediction process performed by a block includes performing inter prediction on the current encoded image block based on a candidate motion information list, where the candidate motion information list is different from the historical candidate list, and one of the historical candidate list or A plurality of historical candidate motion information is included in the candidate motion information list.
- the updating the historical candidate list using motion information of the currently encoded image block according to an inter prediction mode of the currently encoded image block includes:
- the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, using the motion information of the currently-encoded image block to update the historical candidate list in a first processing manner;
- the motion candidate information of the currently-encoded image block is used to update the historical candidate list in a second processing manner, where the first processing manner is different from Two processing methods.
- the first inter prediction mode is a merge merge mode or a skip mode
- the second inter prediction mode is an inter prediction mode that is not the first inter prediction mode.
- the second inter prediction mode is a merge merge mode or a skip skip mode; the first inter prediction mode is an inter prediction mode that is not a second inter prediction mode.
- the updating the historical candidate list in a first processing manner by using the motion information of the currently encoded image block includes:
- using the motion information of the currently encoded image block to update the historical candidate list in a second processing manner includes:
- the updating the historical candidate list in a first processing manner by using the motion information of the currently encoded image block includes:
- target historical candidate motion information is historical candidate motion information obtained based on the first inter prediction mode previously encoded (for example, motion information of an image block obtained based on the first inter prediction mode previously encoded);
- using the motion information of the currently encoded image block to update the historical candidate list in a second processing manner includes:
- the updating the historical candidate list in a first processing manner by using the motion information of the currently encoded image block includes:
- the motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode
- using the motion information of the currently encoded image block to update the historical candidate list in a second processing manner includes:
- the size of the historical candidate list currently reaches the preset list size remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently encoded image block as the latest historical candidate motion information The historical candidate list.
- adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list includes:
- the motion information of the current coded image block is used as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
- the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list.
- the performing an inter prediction process on the current coded image block based on the inter prediction mode of the current coded image block to obtain motion information of the current coded image block includes:
- inter prediction mode of the current encoded image block is the first inter prediction mode, adding historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block;
- the inter prediction mode of the currently encoded image block is the second inter prediction mode
- the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently encoded image block
- Target candidate motion information from the first candidate motion information list or the second candidate motion information list according to a rate distortion cost criterion; for example, the target candidate motion information encodes the current coded image block with the lowest rate distortion cost;
- the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation)
- the motion vector difference value MVD of the image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block.
- the candidate motion information list (for example, the first candidate motion information list or the second candidate motion information list) is different from the historical candidate list.
- the first candidate motion information list includes motion information of a spatial domain reference block of the currently encoded image block and / or motion information of a time domain reference block of the currently encoded image block.
- the spatial domain reference block includes: The motion information of neighboring blocks adjacent to the spatial domain of the coded image block and / or the motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the current coded image block;
- the time-domain reference block includes: The motion information of the neighboring block in the lower right corner of the co-located block at the same position of the current coded image block, or the motion information of the center position of the co-located block;
- the second candidate motion information list includes the A motion vector of a spatial reference block and / or a motion vector of a temporal reference block of a currently coded image block;
- the first candidate motion information list includes a motion vector of a spatial reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block;
- the second candidate motion information list includes the current Motion information of a spatial domain reference block of the coded image block and / or motion information of a time domain reference block of the currently coded image block.
- adding the historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block includes:
- adding the second historical candidate motion information to all The first candidate motion information list is as follows:
- the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list
- the first historical candidate motion information is relative to the second history
- the candidate motion information is first added to the first candidate motion information list.
- the performing an inter prediction process on the current encoded image block based on the inter prediction mode of the currently encoded image block includes:
- the target candidate motion information is determined from the candidate motion information list corresponding to the inter prediction mode of the currently encoded image block, wherein one or more historical candidate motion information in the historical candidate list is included in the The candidate motion information list; for example, the target candidate motion information encodes the currently-distorted image block with the lowest rate distortion cost;
- the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation)
- the candidate motion information list corresponding to the inter prediction mode of the current encoded image block is a merge candidate list; if the inter prediction mode of the current encoded image block is AMVP Mode, the candidate motion information list corresponding to the inter prediction mode of the currently coded image block is an MVP candidate list;
- the historical candidate list is different from the candidate motion information list; the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list is At the current slice or current image or at the current CTU level of one or more image coding units, in other words, during the encoding or decoding of multiple image blocks under the same slice, this continuously updated historical candidate list can be used.
- the performing an inter prediction process on the current coded image block based on the inter prediction mode of the current coded image block further includes:
- Inter prediction is performed on the current coded image block according to the motion information of the current coded image block to obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
- the method further includes:
- the Reconstructed image Based on the residual image (that is, the residual value) of the current encoded image block and the predicted image (that is, the predicted pixel value) of the current encoded image block obtained by the inter prediction process, the Reconstructed image. It should be understood that if the predicted image of the currently-encoded image block is the same as the original image of the currently-encoded image block, there is no residual image (ie, residual value) of the currently-encoded image block, based on the inter prediction The predicted image (that is, the predicted pixel value) of the currently-encoded image block obtained by the process is used to obtain a reconstructed image of the currently-encoded image block.
- the inter prediction mode of the current coding block is a merge merge mode or a skip skip mode
- the method further includes:
- the inter prediction mode of the current coding block is a non-fused merge mode or a non-skip skip mode, and the method further includes:
- An index number corresponding to the target candidate motion information (that is, the target candidate motion vector prediction value MVP) and the motion vector difference MVD are coded into a code stream.
- an embodiment of the present application provides an image decoding device based on a historical candidate list (also referred to as a historical candidate list), where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information Is motion information of a previously decoded image block (for example, it may be current slice slice or current image or motion information of a previously decoded image block in one or more current coding tree units CTU), including for implementing the first aspect Several functional units of either method.
- the image decoding device may include:
- An entropy decoding unit configured to parse syntax elements in the received bitstream to determine an inter prediction mode of a currently decoded image block
- An inter prediction unit configured to perform an inter prediction process on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain motion information of the currently decoded image block;
- the inter prediction unit is further configured to update the historical candidate list by using the motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
- one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current decoded image block.
- one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction performed on the decoded image block; for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter frame performed on the decoded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more In the process of inter prediction performed by decoding image blocks, this application does not limit this.
- an embodiment of the present application provides an image encoding device based on a historical candidate list (also referred to as a historical candidate list), where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information Motion information of previously coded image blocks (for example, the historical candidate motion information is the current slice or current image or motion information of previously decoded image blocks in the current one or more coding tree units CTU), including Several functional units of any one method of the second aspect.
- the image encoding device may include:
- the inter prediction unit is configured to determine an inter prediction mode of a current encoded image block according to a rate distortion cost criterion; and perform an inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block to obtain a current encoding Motion information of an image block; for example, selecting an inter prediction mode with the lowest rate distortion cost from the set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
- the inter prediction unit is further configured to update the historical candidate list using the motion information of the currently encoded image block according to the inter prediction mode of the currently encoded image block;
- the entropy coding unit is configured to code a syntax element for indicating an inter prediction mode of the currently-encoded image block into a code stream.
- one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current encoded image block.
- one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction process performed on the coded image block; for some coded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter-frame performed on the coded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more During the inter prediction process performed by the encoded image block, this application does not limit this.
- an embodiment of the present application provides a video decoding device based on a historical candidate list, where the historical candidate list includes one or more historical candidate motion information, where the historical candidate motion information is a motion of a previously decoded image block Information, the device includes:
- a memory configured to store video data in the form of a bitstream, where the video data includes one or more image blocks;
- a video decoder for parsing syntax elements in a bitstream to determine an inter prediction mode of a currently decoded image block; performing an inter prediction process on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain Motion information of the currently decoded image block; and updating the historical candidate list using the motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
- one or more historical candidate motion information in the historical candidate list is applied in an inter prediction process performed on the current decoded image block.
- the inter prediction process performed on the current decoded image block includes performing inter prediction on the current decoded image block based on a candidate motion information list, where the candidate motion information list is different from the historical candidate list, and all One or more historical candidate motion information in the historical candidate list is included in the candidate motion information list.
- an embodiment of the present application provides a video encoding device based on a historical candidate list, where the device includes:
- a memory for storing video data, the video data including one or more image blocks
- a video encoder for determining an inter prediction mode of a current encoded image block according to a rate distortion cost criterion; performing an inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block to obtain a current encoded image block Update the historical candidate list using the motion information of the current coded image block according to the inter prediction mode of the current coded image block; and syntax for indicating the inter prediction mode of the current coded image block Elements are coded into the code stream.
- one or more historical candidate motion information in the historical candidate list is used in an inter prediction process performed on the current coded image block; in other words, an inter prediction process performed on the current coded image block Including performing inter prediction on the current encoded image block based on a candidate motion information list, wherein the candidate motion information list is different from the historical candidate list, and one or more historical candidate motion information in the historical candidate list are Included in the candidate motion information list.
- a seventh aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the above-mentioned first or second aspect. method.
- An eighth aspect of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method described in the first aspect or the second aspect above.
- a ninth aspect of the present application provides an electronic device including the video encoder according to the fourth aspect, or the video decoder according to the third aspect.
- a tenth aspect of the present application provides an encoding device, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to execute any one of the second aspect Part or all of the steps of a method.
- An eleventh aspect of the present application provides a decoding device, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to execute any one of the first aspects Some or all steps of this method.
- FIG. 1 is a schematic block diagram of a video encoding and decoding system according to an embodiment of the present application
- FIG. 2 is a schematic block diagram of a video encoder according to an embodiment of the present application.
- FIG. 3 is a schematic block diagram of a video decoder according to an embodiment of the present application.
- 4A is an exemplary flowchart of an encoding method performed by a video encoder in a merge mode according to an embodiment of the present application
- 4B is an exemplary flowchart of an encoding method performed by a video encoder in an advanced motion vector prediction mode according to an embodiment of the present application
- FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application
- FIG. 6 is an exemplary schematic diagram of a current image block and a spatial domain reference block and a time domain reference block associated therewith in an embodiment of the present application;
- FIG. 7 is a flowchart of an image encoding method based on a historical candidate list in an embodiment of the present application
- FIG. 8 is a flowchart of an image decoding method based on a historical candidate list according to an embodiment of the present application
- FIG. 9 is an exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application.
- FIG. 10A is another exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application.
- FIG. 10B is a specific exemplary diagram of the historical candidate list before and after the update shown in FIG. 10A in the embodiment of the present application;
- FIG. 10B is a specific exemplary diagram of the historical candidate list before and after the update shown in FIG. 10A in the embodiment of the present application;
- 11A is an exemplary schematic diagram of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application
- 11B is a schematic flowchart of another exemplary process of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application;
- FIG. 12 is a schematic block diagram of a video encoding or decoding system (also referred to as an encoding device or a decoding device) according to an embodiment of the present application;
- FIG. 13 is a schematic block diagram of another encoding device or decoding device according to an embodiment of the present application.
- Intra-prediction coding A coding method that uses surrounding pixel values to predict the current pixel value and then encodes the prediction error.
- Coded picture A coded representation of a picture that contains all the coding tree units of the picture.
- Motion vector A two-dimensional vector used for inter prediction, which provides an offset from coordinates in a decoded picture to coordinates in a reference picture.
- Prediction block A rectangular M ⁇ N sample block on which the same prediction is applied.
- Prediction process Use the predicted value to provide an estimate of the data element (eg, sample value or motion vector) that is currently being decoded.
- data element eg, sample value or motion vector
- Predicted value A specified value or a combination of previously decoded data elements (eg, sample values or motion vectors) used in subsequent data element decoding processes.
- Reference frame A picture or frame used as a short-term reference picture or a long-term reference picture.
- the reference frame contains samples that can be used in the decoding order for inter prediction in the decoding process of subsequent pictures.
- Inter prediction According to the pixels in the reference frame of the current block, the position of the pixels used for prediction in the reference frame is indicated by the motion vector to generate a predicted image of the current block.
- Bidirectional prediction (B) slice A slice that can be decoded using intra prediction or inter prediction to predict the sample value of each block with up to two motion vectors and reference indexes.
- CTU coding tree unit (coding tree unit).
- An image is composed of multiple CTUs.
- a CTU usually corresponds to a square image area, which contains the luma pixels and chroma pixels in this image area (or it can only include luma pixels). (Or may also include only chroma pixels); the CTU also contains syntax elements, which indicate how to divide the CTU into at least one coding unit (coding unit, CU), and a method of decoding each coding unit to obtain a reconstructed image.
- a coding unit corresponding to an A ⁇ B rectangular area in the image, including A ⁇ B brightness pixels or / and its corresponding chroma pixels, A is the width of the rectangle, B is the height of the rectangle, and A and B can be the same It can also be different.
- the values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, and 4.
- a coding unit includes a predicted image and a residual image, and the predicted image and the residual image are added to obtain a reconstructed image of the coding unit.
- the predicted image is generated by intra prediction or inter prediction, and the residual image is generated by inverse quantization and inverse transform processing of the transform coefficients.
- VTM New codec reference software developed by the JVET organization.
- Fusion coding An inter-frame coding method in which motion vectors are not directly transmitted in the code stream.
- the current block can select the corresponding fusion candidate from the merge candidate list according to the merge index, and use the motion information of the fusion candidate as the motion information of the current block, or scale the motion information of the fusion candidate as the motion information of the fusion candidate. Motion information of the current block.
- FIG. 1 is a schematic block diagram of a video encoding and decoding system 10 according to an embodiment of the present application.
- the system 10 includes a source device 12 that generates encoded video data to be decoded by the destination device 14 at a later time.
- Source device 12 and destination device 14 may include any of a wide range of devices, including desktop computers, notebook computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” "Touchpads, TVs, cameras, displays, digital media players, video game consoles, video streaming devices, or the like.
- the source device 12 and the destination device 14 may be equipped for wireless communication.
- the destination device 14 may receive the encoded video data to be decoded via the link 16.
- the link 16 may include any type of media or device capable of moving the encoded video data from the source device 12 to the destination device 14.
- the link 16 may include a communication medium that enables the source device 12 to directly transmit the encoded video data to the destination device 14 in real time.
- the encoded video data may be modulated according to a communication standard (eg, a wireless communication protocol) and transmitted to the destination device 14.
- Communication media may include any wireless or wired communication media, such as a radio frequency spectrum or one or more physical transmission lines. Communication media may form part of a packet-based network, such as a global network of a local area network, a wide area network, or the Internet.
- the communication medium may include a router, a switch, a base station, or any other equipment that may be used to facilitate communication from the source device 12 to the destination device 14.
- the encoded data may be output from the output interface 22 to the storage device 24.
- the encoded data can be accessed from the storage device 24 by an input interface.
- the storage device 24 may include any of a variety of distributed or locally-accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory Or any other suitable digital storage medium for storing encoded video data.
- the storage device 24 may correspond to a file server or another intermediate storage device that may hold the encoded video produced by the source device 12.
- the destination device 14 may access the stored video data from the storage device 24 via streaming or download.
- the file server may be any type of server capable of storing encoded video data and transmitting this encoded video data to the destination device 14.
- the file server includes a web server, a file transfer protocol server, a network attached storage device, or a local disk drive.
- the destination device 14 may access the encoded video data via any standard data connection including an Internet connection.
- This data connection may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on a file server.
- the transmission of the encoded video data from the storage device 24 may be a streaming transmission, a download transmission, or a combination of the two.
- the techniques of this application are not necessarily limited to wireless applications or settings.
- the technology can be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding digital video for use in Digital video or other applications stored on a data storage medium and decoded on the data storage medium.
- the system 10 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
- the source device 12 includes a video source 18, a video encoder 20, and an output interface 22.
- the output interface 22 may include a modulator / demodulator (modem) and / or a transmitter.
- the video source 18 may include a source such as a video capture device (e.g., a video camera), a video archive containing previously captured video, a video feed interface to receive video from a video content provider , And / or a computer graphics system for generating computer graphics data as a source video, or a combination of these sources.
- a video capture device e.g., a video camera
- the source device 12 and the destination device 14 may form a so-called camera phone or video phone.
- the techniques described in this application may be exemplarily applicable to video decoding, and may be applicable to wireless and / or wired applications.
- Captured, pre-captured, or computer-generated video may be encoded by video encoder 20.
- the encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12.
- the encoded video data may also be (or alternatively) stored on the storage device 24 for later access by the destination device 14 or other device for decoding and / or playback.
- the destination device 14 includes an input interface 28, a video decoder 30, and a display device 32.
- the input interface 28 may include a receiver and / or a modem.
- the input interface 28 of the destination device 14 receives the encoded video data via the link 16.
- the encoded video data communicated or provided on the storage device 24 via the link 16 may include various syntax elements generated by the video encoder 20 for use by the video decoder 30 of the video decoder 30 to decode the video data. These syntax elements may be included with the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.
- the display device 32 may be integrated with or external to the destination device 14.
- the destination device 14 may include an integrated display device and also be configured to interface with an external display device.
- the destination device 14 may be a display device.
- the display device 32 displays the decoded video data to a user, and may include any of a variety of display devices, such as a liquid crystal display, a plasma display, an organic light emitting diode display, or another type of display device.
- Video encoder 20 and video decoder 30 may operate according to, for example, the next-generation video codec compression standard (H.266) currently under development and may conform to the H.266 test model (JEM).
- the video encoder 20 and the video decoder 30 may be based on, for example, the ITU-TH.265 standard, also referred to as a high-efficiency video decoding standard, or other proprietary or industrial standards of the ITU-TH.264 standard or extensions of these standards
- the ITU-TH.264 standard is alternatively referred to as MPEG-4 Part 10, also known as advanced video coding (AVC).
- AVC advanced video coding
- the techniques of this application are not limited to any particular decoding standard.
- Other possible implementations of the video compression standard include MPEG-2 and ITU-TH.263.
- video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder, and may include an appropriate multiplexer-demultiplexer (MUX-DEMUX) unit or other hardware and software to handle encoding of both audio and video in a common or separate data stream.
- MUX-DEMUX multiplexer-demultiplexer
- the MUX-DEMUX unit may conform to the ITUH.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
- UDP User Datagram Protocol
- Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, software, hardware, firmware, or any combination thereof.
- DSPs digital signal processors
- ASICs application specific integrated circuits
- FPGA Field Programmable Gate Array
- the device may store the software's instructions in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this application.
- Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and any of them may be integrated as a combined encoder / decoder (CODEC) in a corresponding device. part.
- CDEC combined encoder / decoder
- the present application may, by way of example, relate to video encoder 20 "signaling" certain information to another device, such as video decoder 30. It should be understood, however, that video encoder 20 may signal information by associating specific syntax elements with various encoded portions of video data. That is, video encoder 20 may "signal" the data by storing specific syntax elements to the header information of various encoded portions of the video data. In some applications, these syntax elements may be encoded and stored (eg, stored to storage system 34 or file server 36) before being received and decoded by video decoder 30.
- the term “signaling” may exemplarily refer to the transmission of syntax or other data used to decode compressed video data, regardless of whether this transmission occurs in real-time or near real-time or within a time span, such as may be encoded Occurs when the syntax element is stored to the media, which can then be retrieved by the decoding device at any time after being stored on this media.
- H.265 HEVC
- HM HEVC test model
- the latest standard document of H.265 can be obtained from http://www.itu.int/rec/T-REC-H.265.
- the latest version of the standard document is H.265 (12/16).
- the standard document is in full text.
- the citation is incorporated herein.
- HM assumes that video decoding devices have several additional capabilities over existing algorithms of ITU-TH.264 / AVC. For example, H.264 provides 9 intra-prediction encoding modes, while HM provides up to 35 intra-prediction encoding modes.
- H.266 test model The evolution model of the video decoding device.
- the algorithm description of H.266 can be obtained from http://phenix.int-evry.fr/jvet. The latest algorithm description is included in JVET-F1001-v2.
- the algorithm description document is incorporated herein by reference in its entirety.
- the reference software for the JEM test model can be obtained from https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/, which is also incorporated herein by reference in its entirety.
- HM can divide a video frame or image into a sequence of tree blocks or maximum coding units (LCUs) containing both luminance and chrominance samples.
- LCUs are also known as CTUs.
- the tree block has a similar purpose as the macro block of the H.264 standard.
- a slice contains several consecutive tree blocks in decoding order.
- a video frame or image can be split into one or more slices.
- Each tree block can be split into coding units according to a quadtree. For example, a tree block that is a root node of a quad tree may be split into four child nodes, and each child node may be a parent node and split into another four child nodes.
- the final indivisible child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded video blocks.
- decoding nodes such as decoded video blocks.
- the syntax data associated with the decoded codestream can define the maximum number of times a tree block can be split, and can also define the minimum size of a decoding node.
- the coding unit includes a decoding node and a prediction unit (PU) and a transformation unit (TU) associated with the decoding node.
- the size of the CU corresponds to the size of the decoding node and the shape must be square.
- the size of the CU can range from 8 ⁇ 8 pixels to a maximum 64 ⁇ 64 pixels or larger tree block size.
- Each CU may contain one or more PUs and one or more TUs.
- the syntax data associated with a CU may describe a case where a CU is partitioned into one or more PUs.
- the partitioning mode may be different between cases where the CU is skipped or is encoded in direct mode, intra prediction mode, or inter prediction mode.
- the PU can be divided into non-square shapes.
- the syntax data associated with a CU may also describe a case where a CU is partitioned into one or more TUs according to a quadtree.
- the shape of the TU can be square or non-square.
- the HEVC standard allows transformation based on the TU, which can be different for different CUs.
- the TU is usually sized based on the size of the PUs within a given CU defined for the partitioned LCU, but this may not always be the case.
- the size of the TU is usually the same as or smaller than the PU.
- a quad-tree structure called “residual quad tree” (RQT) can be used to subdivide the residual samples corresponding to the CU into smaller units.
- the leaf node of RQT may be called TU.
- the pixel difference values associated with the TU may be transformed to produce a transformation coefficient, which may be quantized.
- the PU contains data related to the prediction process.
- the PU may include data describing the intra-prediction mode of the PU.
- the PU may include data defining a motion vector of the PU.
- the data defining the motion vector of the PU may describe the horizontal component of the motion vector, the vertical component of the motion vector, the resolution of the motion vector (e.g., quarter-pixel accuracy or eighth-pixel accuracy), motion vector The reference image pointed to, and / or the reference image list of the motion vector (eg, list 0, list 1 or list C).
- TU uses transform and quantization processes.
- a given CU with one or more PUs may also contain one or more TUs.
- video encoder 20 may calculate a residual value corresponding to the PU. Residual values include pixel differences, which can be transformed into transform coefficients, quantized, and scanned using TU to generate serialized transform coefficients for entropy decoding.
- This application generally uses the term "video block" to refer to the decoding node of a CU.
- the term “video block” may also be used in this application to refer to a tree block including a decoding node and a PU and a TU, such as an LCU or a CU.
- a video sequence usually contains a series of video frames or images.
- a group of pictures exemplarily includes a series, one or more video pictures.
- the GOP may include syntax data in the header information of the GOP, the header information of one or more of the pictures, or elsewhere, and the syntax data describes the number of pictures included in the GOP.
- Each slice of the image may contain slice syntax data describing the coding mode of the corresponding image.
- Video encoder 20 typically operates on video blocks within individual video slices to encode video data.
- a video block may correspond to a decoding node within a CU.
- Video blocks may have fixed or varying sizes, and may differ in size according to a specified decoding standard.
- HM supports prediction of various PU sizes. Assuming the size of a specific CU is 2N ⁇ 2N, HM supports intra prediction of PU sizes of 2N ⁇ 2N or N ⁇ N, and symmetric PU sizes of 2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N, or N ⁇ N between frames prediction. HM also supports asymmetric partitioning of PU-sized inter predictions of 2N ⁇ nU, 2N ⁇ nD, nL ⁇ 2N, and nR ⁇ 2N. In asymmetric partitioning, one direction of the CU is not partitioned, and the other direction is partitioned into 25% and 75%.
- 2N ⁇ nU refers to a horizontally divided 2N ⁇ 2NCU, where 2N ⁇ 0.5NPU is at the top and 2N ⁇ 1.5NPU is at the bottom.
- N ⁇ N and “N times N” are used interchangeably to refer to the pixel size of a video block according to vertical and horizontal dimensions, for example, 16 ⁇ 16 pixels or 16 ⁇ 16 pixels.
- an N ⁇ N block has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value.
- Pixels in a block can be arranged in rows and columns.
- the block does not necessarily need to have the same number of pixels in the horizontal direction as in the vertical direction.
- a block may include N ⁇ M pixels, where M is not necessarily equal to N.
- the video encoder 20 may calculate the residual data of the TU of the CU.
- a PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may include transforming (e.g., discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after being applied to the residual video data.
- the residual data may correspond to a pixel difference between a pixel of an uncoded image and a prediction value corresponding to a PU.
- Video encoder 20 may form a TU containing residual data of the CU, and then transform the TU to generate transform coefficients for the CU.
- video encoder 20 may perform quantization of the transform coefficients.
- Quantization exemplarily refers to the process of quantizing coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression.
- the quantization process may reduce the bit depth associated with some or all of the coefficients. For example, n-bit values may be rounded down to m-bit values during quantization, where n is greater than m.
- the JEM model further improves the coding structure of video images.
- a block coding structure called "Quad Tree Combined with Binary Tree” (QTBT) is introduced.
- QTBT Quality Tree Combined with Binary Tree
- a CU can be square or rectangular.
- a CTU first performs a quadtree partition, and the leaf nodes of the quadtree further perform a binary tree partition.
- there are two partitioning modes in binary tree partitioning symmetrical horizontal partitioning and symmetrical vertical partitioning.
- the leaf nodes of a binary tree are called CUs.
- JEM's CUs cannot be further divided during the prediction and transformation process, which means that JEM's CU, PU, and TU have the same block size.
- the maximum size of the CTU is 256 ⁇ 256 luminance pixels.
- video encoder 20 may utilize a predefined scan order to scan the quantized transform coefficients to generate a serialized vector that can be entropy encoded.
- video encoder 20 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 20 may perform context-adaptive variable length decoding (CAVLC), context-adaptive binary arithmetic decoding (CABAC), syntax-based context-adaptive binary Arithmetic decoding (SBAC), probability interval partition entropy (PIPE) decoding, or other entropy decoding methods to entropy decode a one-dimensional vector.
- Video encoder 20 may also entropy encode syntax elements associated with the encoded video data for use by video decoder 30 to decode the video data.
- video encoder 20 may assign a context within a context model to a symbol to be transmitted. Context can be related to whether adjacent values of a symbol are non-zero.
- video encoder 20 may select a variable length code of a symbol to be transmitted. Codewords in variable length decoding (VLC) can be constructed such that relatively short codes correspond to more likely symbols and longer codes correspond to less likely symbols. In this way, the use of VLC can achieve the goal of saving code rates relative to using equal length codewords for each symbol to be transmitted.
- the probability in CABAC can be determined based on the context assigned to the symbol.
- the video encoder may perform inter prediction to reduce temporal redundancy between images.
- a CU may have one or more prediction units PU according to the provisions of different video compression codec standards.
- multiple PUs may belong to a CU, or PUs and CUs are the same size.
- the CU's partitioning mode is not divided, or it is divided into one PU, and the PU is uniformly used for expression.
- the video encoder may signal the video decoder motion information for the PU.
- the motion information of the PU may include: a reference image index, a motion vector, and a prediction direction identifier.
- a motion vector may indicate a displacement between an image block (also called a video block, a pixel block, a pixel set, etc.) of a PU and a reference block of the PU.
- the reference block of the PU may be a part of the reference picture similar to the image block of the PU.
- the reference block may be located in a reference image indicated by a reference image index and a prediction direction identifier.
- the video encoder may generate a candidate motion information list (hereinafter simply referred to as candidate List).
- candidate List Each candidate in the candidate list for a PU may represent a set of motion information.
- the motion information may include motion vector MV and reference image indication information.
- the motion information may also include only one or both of them.
- the motion information may only include a motion vector.
- the motion information represented by some candidates in the candidate list may be based on the motion information of other PUs.
- the candidate represents motion information specifying one of the spatial candidate positions (temporal candidate positions) or temporal candidate positions (temporal candidate positions)
- this application may refer to the candidate as "original" candidate motion information.
- original candidate motion information For example, for a merge mode, also referred to herein as a merge prediction mode, there may be five original spatial candidate positions and one original temporal candidate position.
- the video encoder may also generate additional or additional candidate motion information by some means, such as inserting zero motion vectors as candidate motion information to generate additional candidate motion information. These additional candidate motion information are not considered as original candidate motion information and may be referred to as post- or artificially generated candidate motion information in this application.
- the techniques of this application generally relate to a technique for generating a candidate list at a video encoder and a technique for generating the same candidate list at a video decoder.
- Video encoders and video decoders can produce the same candidate list by implementing the same techniques used to build the candidate list. For example, both a video encoder and a video decoder may build a list with the same number of candidates (e.g., five candidates).
- Video encoders and decoders may first consider spatial candidates (e.g., neighboring blocks in the same image), then consider temporal candidates (e.g., candidates in different images), and finally consider artificially generated candidates until Add the desired number of candidates to the list.
- a pruning operation may be utilized during candidate list construction for certain types of candidate motion information to remove duplicates from the candidate list, while for other types of candidates, pruning may not be used in order to reduce decoder complexity .
- a pruning operation may be performed to exclude candidates with duplicate motion information from the list of candidates.
- the video encoder may select candidate motion information from the candidate list and output an index identifier representing the selected candidate motion information in a code stream.
- the selected candidate motion information may be motion information having a prediction block that produces the closest match to the PU being decoded.
- the aforementioned index identifier may indicate a position of the candidate motion information selected in the candidate list.
- the video encoder may also generate a prediction block for the PU based on a reference block indicated by the motion information of the PU.
- the motion information of the PU may be determined based on the selected candidate motion information. For example, in the merge mode, it is determined that the selected candidate motion information is the motion information of the PU.
- motion information of a PU may be determined based on a motion vector difference of the PU and selected candidate motion information.
- the video encoder may generate one or more residual image blocks (referred to as residual blocks) for the CU based on the predictive image blocks (referred to as prediction blocks) of the PU of the CU and the original image blocks for the CU.
- the video encoder may then encode one or more residual blocks and output a code stream.
- the code stream may include data for identifying selected candidate motion information in a candidate list of the PU.
- the video decoder may determine the motion information of the PU based on the selected candidate motion information in the candidate list of the PU.
- the video decoder may identify one or more reference blocks for the PU based on the motion information of the PU. After identifying one or more reference blocks of the PU, the video decoder may generate a prediction block for the PU based on the one or more reference blocks of the PU.
- the video decoder may reconstruct an image block for a CU based on a prediction block of the PU for the CU and one or more residual blocks for the CU.
- the present application may describe a position or an image block as having various spatial relationships with a CU or a PU. This description can be interpreted to mean that the position or image block and the image block associated with the CU or PU have various spatial relationships.
- a PU currently being decoded by a video decoder may be referred to as a current PU, and may also be referred to as a current image block to be processed.
- This application may refer to the CU that the video decoder is currently decoding as the current CU.
- This application may refer to the image currently being decoded by the video decoder as the current image. It should be understood that this application is applicable to a case where the PU and the CU have the same size, or the PU is the CU, and the PU is used to represent the same.
- video encoder 20 may use inter prediction to generate prediction blocks and motion information for a PU of a CU.
- the motion information of a PU may be the same or similar to the motion information of one or more neighboring PUs (ie, PUs whose image blocks are spatially or temporally near the PU's image blocks). Because neighboring PUs often have similar motion information, video encoder 20 may refer to the motion information of neighboring PUs to encode the motion information of the PU. Encoding the motion information of the PU with reference to the motion information of the neighboring PU can reduce the number of encoding bits required in the code stream to indicate the motion information of the PU.
- Video encoder 20 may refer to the motion information of a neighboring PU in various ways to encode the motion information of that PU. For example, video encoder 20 may indicate that the motion information of the PU is the same as the motion information of nearby PUs. This application may use a merge mode to refer to indicating that the motion information of the PU is the same as that of the neighboring PU or may be derived from the motion information of the neighboring PU. In another feasible implementation manner, the video encoder 20 may calculate a Motion Vector Difference (MVD) for the PU. MVD indicates the difference between the motion vector of this PU and the motion vector of neighboring PUs. Video encoder 20 may include MVD instead of the motion vector of the PU in the motion information of the PU.
- MVD Motion Vector Difference
- This application may use an advanced motion vector prediction mode to refer to using the MVD and an index value identifying a candidate (ie, candidate motion information) to notify the decoding end of the PU's motion information.
- the video encoder 20 may generate a candidate list for the PU.
- the candidate list may include one or more candidates (ie, one or more sets of candidate motion information).
- Each candidate in the candidate list for this PU represents a set of motion information.
- a set of motion information may include a motion vector, a reference image list, and a reference image index corresponding to the reference image list.
- the video encoder 20 may select one of a plurality of candidates from the candidate list for the PU. For example, a video encoder may compare each candidate with a PU that is being decoded and may select a candidate with the required code rate-distortion cost. Video encoder 20 may output a candidate index for a PU. The candidate index identifies the position of the selected candidate in the candidate list.
- the video encoder 20 may generate a prediction block for a PU based on a reference block indicated by the motion information of the PU.
- the motion information of the PU may be determined based on the selected candidate motion information from the candidate list for the PU.
- video decoder 30 may generate a candidate list for each of the PUs of the CU.
- the candidate list generated by video decoder 30 for a PU may be the same as the candidate list generated by video encoder 20 for a PU.
- the syntax element parsed from the code stream may indicate the position of the candidate motion information selected in the candidate list of the PU.
- video decoder 30 may generate a prediction block for the PU based on one or more reference blocks indicated by the motion information of the PU.
- Video decoder 30 may determine motion information of a PU based on candidate motion information selected in a candidate list for the PU.
- Video decoder 30 may reconstruct an image block for a CU based on a prediction block for a PU and a residual block for a CU.
- the construction of the candidate list and the positions of the candidates selected from the code stream parsing in the candidate list are independent of each other and may be performed in any order or in parallel.
- the position of the selected candidate in the candidate list is first parsed from the code stream, and the candidate list is constructed according to the parsed position.
- no construction is required.
- the candidate list at the parsed position needs to be constructed, that is, the candidate at the position can be determined.
- the candidate with the index ID of 3 in the candidate list needs to be constructed only from the candidate list with the index of 0 to 3 to determine the index of the candidate. The candidate can achieve the technical effect of reducing complexity and improving decoding efficiency.
- FIG. 2 is a schematic block diagram of a video encoder 20 according to an embodiment of the present application.
- Video encoder 20 may perform intra-frame decoding and inter-frame decoding of video blocks within a video slice.
- Intra decoding relies on spatial prediction to reduce or remove the spatial redundancy of a video within a given video frame or image.
- Inter-frame decoding relies on temporal prediction to reduce or remove temporal redundancy of video within adjacent frames of a video sequence or video.
- the intra mode (I mode) may refer to any of several space-based compression modes.
- Inter-modes such as unidirectional prediction (P mode) or bidirectional prediction (B mode) may refer to any of several time-based compression modes.
- the video encoder 20 includes a segmentation unit 35, a prediction unit 41, a reference image memory 64, a summer 50, a transformation processing unit 52, a quantization unit 54, and an entropy encoding unit 56.
- the prediction unit 41 includes an inter prediction unit 43 and an intra prediction unit 46.
- the inter prediction unit 43 may include a motion estimation unit 42 and a motion compensation unit 44.
- the video encoder 20 may also include an inverse quantization unit 58, an inverse transform unit 60, and a summer (also referred to as a reconstructor) 62.
- a deblocking filter (not shown in Figure 2) may also be included to filter block boundaries to remove block effect artifacts from the reconstructed video. When needed, the deblocking filter will typically filter the output of the summer 62. In addition to the deblocking filter, additional loop filters (in-loop or post-loop) can be used.
- the video encoder 20 receives video data, and the segmentation unit 35 divides the data into video blocks.
- This segmentation may also include segmentation into slices, image blocks, or other larger units, and video block segmentation, for example, based on the quad-tree structure of the LCU and CU.
- Video encoder 20 exemplarily illustrates the components of a video block encoded within a video slice to be encoded. In general, a slice can be divided into multiple video blocks (and possibly into a collection of video blocks called image blocks).
- the prediction unit 41 may select one of a plurality of possible decoding modes of the current video block, such as one or more of a plurality of intra decoding modes, based on the encoding quality and the cost calculation result (for example, code rate-distortion cost, RDcost). One of the inter-frame decoding modes.
- the prediction unit 41 may provide the obtained intra decoded or inter decoded block to the summer 50 to generate residual block data and provide the obtained intra decoded or inter decoded block to the summer 62 to reconstruct The encoded block is thus used as a reference image.
- the inter prediction unit 43 (such as the motion estimation unit 42 and the motion compensation unit 44) within the prediction unit 41 performs inter-predictive decoding of the current video block with respect to one or more prediction blocks in one or more reference images to Provides time compression.
- the motion estimation unit 42 is configured to determine an inter prediction mode of a video slice according to a predetermined mode of a video sequence.
- the predetermined mode can specify the video slices in the sequence as P slices, B slices, or GPB slices.
- the motion estimation unit 42 and the motion compensation unit 44 can be highly integrated, and are described separately here for the convenience of understanding the concept.
- a process of estimating a motion vector of a video block also referred to as an image block
- a motion vector may indicate a displacement of a PU of a video block within a current video frame or image relative to a predicted block within a reference image.
- the prediction block is a block that is found to closely match the PU of the video block to be decoded according to the pixel difference, and the pixel difference may be determined by a sum of absolute differences (SAD), a sum of squared differences (SSD), or other differences.
- the video encoder 20 may calculate a value of a sub-integer pixel position of a reference image stored in the reference image memory 64. For example, video encoder 20 may interpolate values of quarter pixel positions, eighth pixel positions, or other fractional pixel positions of the reference image. Therefore, the motion estimation unit 42 may perform a motion search with respect to the full pixel position and the fractional pixel position and output a motion vector having a fractional pixel accuracy.
- the motion estimation unit 42 calculates a motion vector of the PU of the video block in the inter-decoded slice by comparing the position of the PU with the position of the prediction block of the reference image.
- Reference images can be selected from the first reference image list (List 0) or the second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 64.
- the motion estimation unit 42 sends the calculated motion vector to the entropy encoding unit 56 and the motion compensation unit 44.
- Motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on a motion vector determined by motion estimation. After receiving the motion vector of the PU of the current video block, the motion compensation unit 44 can locate the prediction block pointed to by the motion vector in one of the reference image lists.
- Video encoder 20 forms a residual video block by subtracting the pixel value of the prediction block from the pixel value of the current video block being decoded, thereby forming a pixel difference value.
- the pixel difference values form the residual data of the block, and may include both luminance and chrominance difference components.
- the summer 50 represents one or more components that perform this subtraction operation.
- Motion compensation unit 44 may also generate syntax elements associated with video blocks and video slices for use by video decoder 30 for decoding video blocks of video slices.
- the picture containing the PU may be associated with two reference picture lists called "List 0" and "List 1".
- an image containing B bands may be associated with a list combination that is a combination of list 0 and list 1.
- the motion estimation unit 42 may perform unidirectional prediction or bidirectional prediction for the PU, where in some feasible implementations, the bidirectional prediction is a reference image list based on the list 0 and the list 1, respectively In other feasible implementations, the bi-directional prediction is a prediction based on a reconstructed future frame and a reconstructed past frame in the display order of the current frame, respectively.
- the motion estimation unit 42 may search a reference image of List 0 or List 1 for a reference block for the PU.
- the motion estimation unit 42 may then generate a reference frame index indicating a reference image containing a reference block in List 0 or List 1 and a motion vector indicating a spatial displacement between the PU and the reference block.
- the motion estimation unit 42 may output a reference frame index, a prediction direction identifier, and a motion vector as motion information of the PU.
- the prediction direction identifier may indicate a reference picture in the reference frame index indication list 0 or list 1. For example, the prediction direction identifier 1 indicates the list list0, the prediction direction identifier 2 indicates the list list1, and the prediction direction identifier 3 indicates the bidirectional prediction, that is, list0 and list1.
- the motion compensation unit 44 may generate a predictive image block of the PU based on a reference block indicated by the motion information of the PU.
- the motion estimation unit 42 may search for a reference block for the PU in the reference image in list 0 and may also search for another for the PU in the reference image in list 1 Reference block.
- the motion estimation unit 42 may then generate a reference index indicating the reference image containing the reference block in List 0 and List 1 and a motion vector indicating the spatial displacement between the reference block and the PU.
- the motion estimation unit 42 may output a reference index and a motion vector of the PU as motion information of the PU.
- the motion compensation unit 44 may generate a predictive image block of the PU based on a reference block indicated by the motion information of the PU.
- the motion estimation unit 42 does not output the complete set of motion information for the PU to the entropy encoding unit 56. Instead, the motion estimation unit 42 may refer to the motion information of another PU to signal the motion information of the PU. For example, the motion estimation unit 42 may determine that the motion information of a PU is sufficiently similar to the motion information of a neighboring PU. In this embodiment, the motion estimation unit 42 may indicate an indication value in the syntax structure associated with the PU, which indicates to the video decoder 30 that the PU has the same motion information as the neighboring PU or has a Neighbor PU derived motion information.
- the motion estimation unit 42 may identify candidates and motion vector differences (MVD) associated with neighboring PUs in a syntax structure associated with the PU.
- MVD indicates the difference between the motion vector of the PU and the indicated candidate associated with the neighboring PU.
- Video decoder 30 may use the indicated candidate and MVD to determine the motion vector of the PU.
- the prediction unit 41 may generate a candidate list for each PU of the CU.
- One or more of the candidate list may include one or more sets of original candidate motion information and one or more sets of additional candidate motion information derived from the original candidate motion information.
- the intra prediction unit 46 within the prediction unit 41 may perform intra predictive decoding of the current video block relative to one or more neighboring blocks in the same image or slice as the current block to be decoded to provide spatial compression . Therefore, instead of the inter prediction (as described above) performed by the motion estimation unit 42 and the motion compensation unit 44, the intra prediction unit 46 may predict the current block intra. Specifically, the intra prediction unit 46 may determine an intra prediction mode used to encode the current block. In some feasible implementations, the intra prediction unit 46 may, for example, encode the current block using various intra prediction modes during separate encoding traversals, and the intra prediction unit 46 (or in some feasible implementations, The mode selection unit 40) may select an appropriate intra prediction mode to use from the tested modes.
- the video encoder 20 forms a residual video block by subtracting the prediction block from the current video block.
- the residual video data in the residual block may be included in one or more TUs and applied to the transform processing unit 52.
- the transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform (eg, a discrete sine transform DST).
- the transform processing unit 52 may transform the residual video data from a pixel domain to a transform domain (for example, a frequency domain).
- the transformation processing unit 52 may send the obtained transformation coefficient to the quantization unit 54.
- the quantization unit 54 quantizes the transform coefficients to further reduce the code rate.
- the quantization process may reduce the bit depth associated with some or all of the coefficients.
- the degree of quantization can be modified by adjusting the quantization parameters.
- the quantization unit 54 may then perform a scan of a matrix containing the quantized transform coefficients.
- the entropy encoding unit 56 may perform scanning.
- the entropy encoding unit 56 may entropy encode the quantized transform coefficients.
- the entropy encoding unit 56 may perform context adaptive variable length decoding (CAVLC), context adaptive binary arithmetic decoding (CABAC), syntax-based context adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy (PIPE) decoding or another entropy coding method or technique.
- CAVLC context adaptive variable length decoding
- CABAC context adaptive binary arithmetic decoding
- SBAC syntax-based context adaptive binary arithmetic decoding
- PIPE probability interval partitioning entropy
- the entropy encoding unit 56 may also entropy encode the motion vector and other syntax elements of the current video slice being decoded.
- the encoded code stream may be transmitted to the video decoder 30 or archived for later transmission or retrieved by the video decoder 30.
- the entropy encoding unit 56 may encode information indicating a selected intra prediction mode according to the techniques of the present application.
- Video encoder 20 may include encoding of various blocks in transmitted stream configuration data that may include multiple intra prediction mode index tables and multiple modified intra prediction mode index tables (also known as codeword mapping tables). Definition of the context and an indication of the MPM, the intra prediction mode index table, and the modified intra prediction mode index table for each of the contexts.
- the inverse quantization unit 58 and the inverse transform unit 60 respectively apply inverse quantization and inverse transform to reconstruct a residual block in the pixel domain for later use as a reference block of a reference image.
- the motion compensation unit 44 may calculate a reconstructed block by adding a residual block to a prediction block of one of the reference images within one of the reference image lists.
- the motion compensation unit 44 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for motion estimation.
- the summer 62 adds the reconstructed residual block and the motion-compensated prediction block generated by the motion compensation unit 44 to generate a reconstruction block, which is used as a reference block for storage in the reference image memory 64.
- the reference block can be used as a reference block by the motion estimation unit 42 and the motion compensation unit 44 to inter-predict a block in a subsequent video frame or image.
- the video encoder 20 may directly quantize the residual signal without processing by the transform unit 52 and correspondingly does not need to be processed by the inverse transform unit 60; or, for some image blocks, Or image frames, the video encoder 20 does not generate residual data, and accordingly does not need to be processed by the transform unit 52, the quantization unit 54, the inverse quantization unit 58, and the inverse transform unit 60; or, the video encoder 20 may convert the reconstructed image
- the blocks are directly stored as reference blocks without being processed by a filter unit; alternatively, the quantization unit 54 and the inverse quantization unit 58 in the video encoder 20 may be merged together.
- the loop filtering unit is optional, and in the case of lossless compression coding, the transform unit 52, the quantization unit 54, the inverse quantization unit 58, and the inverse transform unit 60 are optional. It should be understood that, according to different application scenarios, the inter prediction unit and the intra prediction unit may be selectively enabled, and in this case, the inter prediction unit is enabled.
- FIG. 3 is a schematic block diagram of a video decoder 30 in an embodiment of the present application.
- the video decoder 30 includes an entropy encoding unit 80, a prediction unit 81, an inverse quantization unit 86, an inverse transform unit 88, a summer 90 (ie, a reconstructor), and a reference image memory 92.
- the reference image memory 92 may also be provided outside the video decoder 30.
- the prediction unit 81 includes an inter prediction unit 82 and an intra prediction unit 84.
- the inter prediction unit 82 may be, for example, a motion compensation unit 82.
- video decoder 30 may perform an exemplary reciprocal decoding process with the encoding process described with respect to video encoder 20 from FIG. 4A or 4B.
- video decoder 30 receives from video encoder 20 an encoded video code stream representing video blocks of the encoded video slice and associated syntax elements.
- the entropy encoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors, and other syntax elements.
- the entropy encoding unit 80 forwards the motion vector and other syntax elements to the prediction unit 81.
- Video decoder 30 may receive syntax elements at a video slice level and / or a video block level.
- the intra-prediction unit 84 of the prediction unit 81 may be based on a signaled intra-prediction mode and data from a previously decoded block of the current frame or image The prediction data of the video block of the current video slice is generated.
- the motion compensation unit 82 of the prediction unit 81 When the video image is decoded into inter-decoded (eg, B, P, or GPB) slices, the motion compensation unit 82 of the prediction unit 81 generates the current video based on the motion vector and other syntax elements received from the entropy encoding unit 80 A prediction block of a video block of an image.
- the prediction block may be generated from one of the reference pictures within one of the reference picture lists.
- the video decoder 30 may construct a reference image list (List 0 and List 1) using a default construction technique based on the reference image stored in the reference image memory 92.
- the motion compensation unit 82 determines the prediction information of the video block of the current video slice by analyzing the motion vector and other syntax elements, and uses the prediction information to generate the prediction block of the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) of a video block to decode a video slice, an inter prediction slice type (e.g., B slice, P slice or GPB slice), construction information of one or more of the slice's reference image list, motion vector of each inter-coded video block of the slice, each warped frame of the slice Inter-prediction status of inter-decoded video blocks and other information used to decode video blocks in the current video slice.
- a prediction mode e.g., intra prediction or inter prediction
- an inter prediction slice type e.g., B slice, P slice or GPB slice
- construction information of one or more of the slice's reference image list e.g., motion vector of each inter-coded video block
- the motion compensation unit 82 may also perform interpolation based on an interpolation filter.
- the motion compensation unit 82 may use an interpolation filter as used by the video encoder 20 during encoding of the video block to calculate the interpolation value of the sub-integer pixels of the reference block.
- the motion compensation unit 82 may determine an interpolation filter used by the video encoder 20 from the received syntax elements and use the interpolation filter to generate a prediction block.
- the motion compensation unit 82 may generate a candidate list for the PU.
- the codestream may include data identifying the position of the selected candidate in the candidate list of the PU.
- the motion compensation unit 82 may generate a predictive image block for the PU based on one or more reference blocks indicated by the motion information of the PU.
- a reference block of a PU may be in a temporal image different from the PU.
- the motion compensation unit 82 may determine the motion information of the PU based on the selected motion information in the candidate list of the PU.
- the inverse quantization unit 86 performs inverse quantization (for example, dequantization) on the quantized transform coefficient provided in the code stream and decoded by the entropy encoding unit 80.
- the inverse quantization process may include determining the degree of quantization using the quantization parameters calculated by video encoder 20 for each video block in the video slice, and similarly determining the degree of inverse quantization that should be applied.
- the inverse transform unit 88 applies an inverse transform (for example, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the pixel domain.
- the video decoder 30 calculates the sum of Form decoded video blocks.
- the summer 90 ie, the reconstructor
- the summer 90 represents one or more components that perform this summing operation.
- a deblocking filter may also be applied to filter the decoded blocks in order to remove block effect artifacts.
- Other loop filters in the decoding loop or after the decoding loop
- the decoded video block in a given frame or image is then stored in a reference image memory 92, which stores a reference image for subsequent motion compensation.
- the reference image memory 92 also stores decoded video for later presentation on a display device such as the display device 32 of FIG. 1.
- the techniques of this application exemplarily involve inter-frame decoding. It should be understood that the techniques of this application may be performed by any of the video decoders described in this application.
- the video decoder includes, for example, video encoder 20 and video decoding as shown and described with respect to FIGS. 1-3. ⁇ 30 ⁇ 30. That is, in a feasible implementation manner, the prediction unit 41 described with respect to FIG. 2 may perform a specific technique described below when performing inter prediction during encoding of a block of video data. In another possible implementation, the prediction unit 81 described with respect to FIG. 3 may perform specific techniques described below when performing inter prediction during decoding of a block of video data.
- a reference to a generic "video encoder" or "video decoder” may include video encoder 20, video decoder 30, or another video encoding or coding unit.
- video decoder 30 may be used to decode the encoded video bitstream.
- the video decoder 30 may generate an output video stream without being processed by a filtering unit; or, for certain image blocks or image frames, the entropy decoding unit 80 of the video decoder 30 does not decode the quantized coefficients, and accordingly does not need to Processed by inverse quantization unit 86 and inverse transform unit 88.
- the loop filtering unit is optional; and in the case of lossless compression, the inverse quantization unit 86 and the inverse transform unit 88 are optional.
- the inter prediction unit and the intra prediction unit may be selectively enabled, and in this case, the inter prediction unit is enabled.
- FIG. 4A is an exemplary flowchart of a merge mode in an embodiment of the present application.
- a video encoder eg, video encoder 20
- the video encoder may perform a merge operation different from the merge operation 200.
- the video encoder may perform a merge operation, where the video encoder performs more or fewer steps than the merge operation 200 or steps different from the merge operation 200.
- the video encoder may perform the steps of the merge operation 200 in a different order or in parallel.
- the encoder may also perform a merge operation 200 on a PU encoded in a skip mode.
- the video encoder may generate a candidate list for the current PU (202).
- the video encoder may generate a candidate list for the current PU in various ways. For example, the video encoder may generate a candidate list for the current PU according to one of the example techniques described below with respect to FIGS. 7 to 13.
- the candidate list for the current PU may include temporal candidate motion information (referred to as temporal candidate).
- the temporal candidate motion information may indicate motion information of a co-located PU in the time domain.
- a co-located PU may be spatially in the same position in the image frame as the current PU, but in a reference picture instead of the current picture.
- a reference picture including a PU corresponding to the time domain may be referred to as a related reference picture.
- a reference image index of a related reference image may be referred to as a related reference image index in this application.
- the current image may be associated with one or more reference image lists (eg, list 0, list 1, etc.).
- the reference image index may indicate the reference image by indicating the position of the reference image in a certain reference image list.
- the current image may be associated with a combined reference image list.
- the related reference picture index is the reference picture index of the PU covering the reference index source position associated with the current PU.
- the reference index source location associated with the current PU is adjacent to the left of the current PU or above the current PU. In this application, if an image block associated with a PU includes a specific location, the PU may "cover" the specific location.
- the reference index source location associated with the current PU is within the current CU.
- the PU may need to access motion information of another PU of the current CU in order to determine a reference picture containing a co-located PU. Therefore, these video encoders may use motion information (ie, a reference picture index) of a PU belonging to the current CU to generate a temporal candidate for the current PU. In other words, these video encoders may use temporal information of PUs belonging to the current CU to generate temporal candidates. Therefore, the video encoder cannot generate a candidate list for a current PU and a PU covering a reference index source position associated with the current PU in parallel.
- the video encoder may explicitly set the relevant reference picture index without referring to the reference picture index of any other PU. This may enable the video encoder to generate candidate lists for the current PU and other PUs of the current CU in parallel. Because the video encoder explicitly sets the relevant reference picture index, the relevant reference picture index is not based on the motion information of any other PU of the current CU. In some feasible implementations where the video encoder explicitly sets the relevant reference picture index, the video encoder may always set the relevant reference picture index to a fixed, predefined preset reference picture index (eg, 0). In this way, the video encoder may generate a time candidate based on the motion information of the co-located PU in the reference frame indicated by the preset reference picture index, and may include the time candidate in the candidate list of the current CU.
- a fixed, predefined preset reference picture index eg, 0
- the video encoder may be explicitly used in a syntax structure (e.g., image header, slice header, APS, or another syntax structure)
- the related reference picture index is signaled.
- the video encoder may signal the decoder to the relevant reference picture index for each LCU (ie, CTU), CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the relevant reference picture index for each PU of the CU is equal to "1".
- the relevant reference image index may be set implicitly rather than explicitly.
- the video encoder may use the motion information of the PU in the reference picture indicated by the reference picture index of the PU covering the location outside the current CU to generate each candidate list for the PU of the current CU. A time candidate, even if these locations are not strictly adjacent to the current PU.
- the video encoder may generate predictive image blocks associated with the candidates in the candidate list (204).
- the video encoder may generate a prediction associated with the candidate by determining motion information of the current PU based on the motion information of the indicated candidate and then generating a predictive image block based on one or more reference blocks indicated by the motion information of the current PU.
- Sexual image blocks The video encoder may select one of the candidates from the candidate list (206).
- Video encoders can select candidates in various ways. For example, a video encoder may select one of the candidates based on a rate-distortion cost analysis of each of the predictive image blocks associated with the candidate.
- the video encoder may output the candidate's index (208).
- the index may indicate the position of the selected candidate in the candidate list. In some feasible implementations, this index may be represented as "merge_idx".
- FIG. 4B is an exemplary flowchart of an advanced motion vector prediction (AMVP) mode in an embodiment of the present application.
- a video encoder eg, video encoder 20
- the video encoder may generate one or more motion vectors for the current PU (211).
- the video encoder may perform integer motion estimation and fractional motion estimation to generate motion vectors for the current PU.
- the current image may be associated with two reference image lists (List 0 and List 1).
- the video encoder may generate a list 0 motion vector or a list 1 motion vector for the current PU.
- the list 0 motion vector may indicate a spatial displacement between an image block of the current PU and a reference block in a reference image in list 0.
- the list 1 motion vector may indicate a spatial displacement between an image block of the current PU and a reference block in a reference image in list 1.
- the video encoder may generate a list 0 motion vector and a list 1 motion vector for the current PU.
- the video encoder may generate predictive image blocks (referred to simply as prediction blocks) for the current PU (212).
- the video encoder may generate predictive image blocks for the current PU based on one or more reference blocks indicated by one or more motion vectors for the current PU.
- the video encoder may generate a candidate list for the current PU (213).
- the video decoder may generate a list of candidate prediction motion vectors for the current PU in various ways.
- the video encoder may generate a candidate list for the current PU according to one or more of the possible implementations described below with respect to FIGS. 6 to 13.
- the candidate prediction motion vector list may include two or three candidate prediction motion vectors.
- the list of candidate prediction motion vectors may include more candidate prediction motion vectors (eg, five or seven candidate prediction motion vectors).
- the video encoder may generate one or more motion vector prediction residual values (also known as motion vector difference MVD) for each candidate prediction motion vector in the candidate list (214 ).
- the video encoder may generate a motion vector difference for the candidate prediction motion vector by determining a difference between the motion vector indicated by the candidate prediction motion vector and a corresponding motion vector of the current PU.
- the video encoder may generate a single MVD for each candidate prediction motion vector. If the current PU is bi-predicted, the video encoder may generate two MVDs for each candidate prediction motion vector.
- the first MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the list 0 motion vector of the current PU.
- the second MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the list 1 motion vector of the current PU.
- the video encoder may select one or more of the candidate prediction motion vectors from the candidate prediction motion vector list (215).
- the video encoder may select one or more candidate prediction motion vectors in various ways. For example, a video encoder may select a candidate prediction motion vector with an associated motion vector that matches the motion vector to be encoded with minimal error, which may reduce the number of bits required to represent the motion vector difference for the candidate prediction motion vector.
- the video encoder may output one or more reference image indexes for the current PU, one or more candidate prediction motion vector indexes, and one or more selected candidate motion vectors.
- One or more motion vector differences of the predicted motion vector (216).
- the video encoder may output a reference picture index ("ref_idx_10") for List 0 or for Reference image index of list 1 ("ref_idx_11").
- the video encoder may also output a candidate prediction motion vector index (“mvp_10_flag") indicating the position of the selected candidate prediction motion vector for the list 0 motion vector of the current PU in the candidate prediction motion vector list.
- the video encoder may output a candidate prediction motion vector index (“mvp_11_flag”) indicating the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list.
- the video encoder may also output a list 0 motion vector or a list 1 motion vector MVD for the current PU.
- the video encoder may output the reference picture index ("ref_idx_10") for List 0 and the list Reference image index of 1 ("ref_idx_11").
- the video encoder may also output a candidate prediction motion vector index (“mvp_10_flag") indicating the position of the selected candidate prediction motion vector for the list 0 motion vector of the current PU in the candidate prediction motion vector list.
- the video encoder may output a candidate prediction motion vector index (“mvp_11_flag”) indicating the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list.
- the video encoder may also output the MVD of the list 0 motion vector for the current PU and the MVD of the list 1 motion vector for the current PU.
- FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder (such as video decoder 30) in an embodiment of the present application.
- the video decoder may receive an indication of a selected candidate for the current PU (222). For example, the video decoder may receive a candidate index indicating the position of the selected candidate within the candidate list of the current PU.
- the video decoder may receive the first candidate index and the second candidate index.
- the first candidate index indicates the position of the selected candidate for the list 0 motion vector of the current PU in the candidate list.
- the second candidate index indicates the position of the selected candidate for the list 1 motion vector of the current PU in the candidate list.
- a single syntax element may be used to identify two candidate indexes.
- the video decoder may generate a candidate list for the current PU (224).
- the video decoder can generate this candidate list for the current PU in various ways. For example, the video decoder may use the techniques described below with reference to FIGS. 6 to 10 to generate a candidate list for the current PU.
- the video decoder may explicitly or implicitly set a reference image index identifying a reference image including a co-located PU, as described above with reference to FIG. 4A or FIG. 4B.
- the video decoder may determine the motion information of the current PU based on the motion information indicated by one or more selected candidates in the candidate list for the current PU (225). For example, if the motion information of the current PU is encoded using a merge mode, the motion information of the current PU may be the same as the motion information indicated by the selected candidate. If the motion information of the current PU is encoded using AMVP mode, the video decoder may reconstruct using one or more MVDs indicated in the one or more motion vectors and code streams indicated by the or the selected candidate. One or more motion vectors of the current PU.
- the reference image index and prediction direction identifier of the current PU may be the same as the reference image index and prediction direction identifier of the one or more selected candidates.
- the video decoder may generate a predictive image block for the current PU based on one or more reference blocks indicated by the motion information of the current PU (226).
- FIG. 6 is an exemplary schematic diagram of a current image block (such as a coding unit CU), a spatial neighboring image block, and a temporal neighboring image block associated with the current image block (such as the coding unit CU) in the embodiment of the present application, illustrating CU600 and schematic candidates associated with CU600 Schematic diagram of user positions 1 to 10.
- Candidate positions 1 to 5 indicate spatial candidates in the same image as CU600.
- Candidate position 1 is positioned to the left of CU600.
- Candidate position 2 is positioned above CU600.
- Candidate position 3 is located at the upper right of CU600.
- Candidate position 4 is positioned at the bottom left of CU600.
- Candidate position 5 is located at the upper left of CU600.
- Candidate positions 6 to 7 represent temporal candidates associated with the co-located block 602 of the CU600, where the co-located block is a Image block.
- the candidate position 6 is located in the lower right corner of the co-located block 602.
- the candidate position 7 is positioned at the lower right middle position of the co-located block 602, or at the upper left middle position of the co-located block 602.
- FIG. 6 is a schematic embodiment of a candidate position for providing a candidate list that an inter prediction unit (for example, the motion estimation unit 42 or the motion compensation unit 82) can generate.
- the candidate positions 1 to 5 of FIG. 6 are exemplary embodiments for providing candidate positions that an intra prediction unit can generate a candidate list.
- the spatial candidate position and the temporal candidate position in FIG. 6 are merely schematic, and the candidate positions include, but are not limited to, this.
- the positions of the spatial candidates may also include, for example, positions within a preset distance from the image block to be processed, but not adjacent to the image block to be processed.
- the embodiment of the present application is not only applicable to merge prediction mode (Merge) and / or advanced motion vector prediction mode (advanced motion vector prediction) (AMVP), but also applicable to other motion information using spatial reference blocks and / or time domain reference blocks.
- FIG. 7 is an exemplary flowchart of an image encoding method based on a historical candidate list (also referred to as a historical candidate table) in an embodiment of the present application.
- the historical candidate list includes one or more historical candidate motion information.
- the historical candidate motion information is motion information of a previously encoded image block.
- the method may be performed by a video encoder (such as video encoder 20) or For electronic devices with video encoding functions (for example, devices 1200, 1300), the method may include the following steps:
- an inter prediction mode with the lowest rate-distortion cost is selected from a set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
- S703 Perform an inter prediction process on the current coded image block based on the inter prediction mode of the current coded image block to obtain motion information of the current coded image block.
- performing an encoding process on the currently-encoded image block based on the inter prediction mode of the currently-encoded image block may refer to the prior art, and details are not described herein again;
- S707 Program a syntax element used to indicate an inter prediction mode of the currently-encoded image block into a code stream.
- the embodiment of the present invention may further include:
- a historical candidate list is loaded, in other words, one or more historical candidate motion information in the historical candidate list may be used for frames performed on the currently encoded image block.
- an inter prediction process also referred to as an encoding process performed on the currently encoded image block
- performing the inter prediction process on the current encoded image block based on the inter prediction mode of the currently encoded image block in step S703 may include:
- the target candidate motion information is determined from the candidate motion information list corresponding to the inter prediction mode of the currently encoded image block, wherein one or more historical candidate motion information in the historical candidate list is included in the In the candidate motion information list, for example, the target candidate motion information encodes the rate distortion cost of the current coded image block to be the smallest;
- the target candidate motion information is the motion information of the current encoded image block (for example, in a merge mode); or based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation)
- Motion Estimation To determine a motion vector difference MVD of the currently encoded image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block (for example, in the AMVP mode).
- one or more historical candidate motion information in the historical candidate list may be added to the candidate motion information list.
- step S707 may be performed after step S705, or may be performed before step S705; the above step S702 may be performed after step S701, or may be performed before step S701; the remaining steps are not illustrated here one by one.
- one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current encoded image block.
- the inter-prediction process also referred to as the encoding process
- Historical candidate motion information may be applied to the inter prediction process performed on the encoded image block; for some encoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the encoded image block.
- the information may be applied to an inter prediction process performed on one or more coded image blocks, which is not limited in this application.
- S703 may include:
- the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, using the motion information of the currently-encoded image block to update the historical candidate list in a first processing manner;
- the motion candidate information of the currently encoded image block is used to update the historical candidate list in a second processing manner.
- the first inter prediction mode is a synthetic merge mode or a skip mode
- the second inter prediction mode is an inter prediction mode other than the first inter prediction mode
- the second inter prediction mode is a synthetic merge mode or a skip skip mode; the first inter prediction mode is an inter prediction mode other than the second inter prediction mode.
- step S703 when the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, in step S703, the motion information of the currently-encoded image block is used to update the first processing mode
- the historical candidate list includes:
- step S703 uses the motion information of the currently-encoded image block to adopt the second The processing mode updates the historical candidate list, including:
- the motion information using the currently-encoded image block in step S703 adopts the first The processing mode updates the historical candidate list, including:
- the motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode
- adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list includes:
- the motion information of the current coded image block is used as the latest history Candidate sports information (the last HMVP candidate) is added to the historical candidate list;
- the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list.
- step S703 uses the motion information of the currently encoded image block to adopt the first Updating the historical candidate list in two processing modes includes:
- step S703 uses the motion information of the currently encoded image block to adopt the first Updating the historical candidate list in two processing modes includes:
- the size of the historical candidate list currently reaches the preset list size remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently encoded image block as the latest historical candidate motion information The historical candidate list.
- a historical candidate list is loaded, in other words, one or more historical candidate motion information in the historical candidate list may be used for frames performed on the currently encoded image block.
- an inter prediction process also referred to as an encoding process performed on the currently encoded image block
- the method based on the current The inter prediction mode of the coded image block performs an inter prediction process on the current coded image block to obtain the motion information of the current coded image block, which may include:
- inter prediction mode of the current encoded image block is the first inter prediction mode, adding historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block;
- the inter prediction mode of the currently encoded image block is the second inter prediction mode
- the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently encoded image block
- Target candidate motion information from the first candidate motion information list or the second candidate motion information list according to a rate distortion cost criterion, for example, the target candidate motion information encodes the current coded image block with the lowest rate distortion cost;
- the motion vector difference value MVD of the image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block.
- the first candidate motion information list (for example, merge candidate list) includes motion information of a spatial domain reference block of the current encoded image block (a spatial domain reference block includes motion information of an adjacent block adjacent to the spatial domain of the current encoded image block and And / or motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the currently coded image block) and / or motion information of a time domain reference block of the current coded image block (the time domain reference block includes: in a reference frame The motion information of an adjacent block in the lower right corner of the co-located block at the same position as the current coded image block, or the motion information of the center position of the co-located block);
- the second candidate motion information list includes a motion vector of a spatial domain reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block;
- the first candidate motion information list (for example, AMVP candidate list) includes a motion vector of a spatial domain reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block;
- the second candidate motion information list includes motion information of a spatial domain reference block of the currently encoded image block and / or motion information of a time domain reference block of the currently encoded image block.
- the syntax element included in the code stream also includes an index number indicating the target candidate motion information of the currently coded image block, in other words That is, an index number corresponding to the target candidate motion information may also be coded into a code stream;
- the syntax element included in the code stream further includes an index number used to indicate target candidate motion information of the currently coded image block
- the motion vector difference value MVD in other words, an index number corresponding to the target candidate motion information and the motion vector difference value MVD may also be coded into a code stream, and the target candidate motion information is the current coded image block Motion vector predictor MVP.
- the candidate motion information (illustrated by HMVP) in the historical candidate list is in a first-in-first-out manner (as shown in FIGS. 10A and 10B), and the historical candidate list is included in the historical candidate list.
- Historical candidate motion information is added to the first candidate motion information list of the currently encoded image block, including:
- adding the second historical candidate motion information to all The first candidate motion information list is as follows:
- the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list
- the first historical candidate motion information is relative to the second history
- the candidate motion information is first added to the first candidate motion information list.
- performing the inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block further includes: performing inter prediction on the currently encoded image block according to the motion information of the currently encoded image block. To obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
- the encoding method in the embodiment of the present application may further include:
- the Reconstructed image Based on the residual image (that is, the residual value) of the current encoded image block and the predicted image (that is, the predicted pixel value) of the current encoded image block obtained by the inter prediction process, the Reconstructed image.
- the embodiment of the present application considers the inter prediction mode of the current encoded image block to update the historical candidate list. For example, if the inter prediction mode of the current encoded image block is a skip / merge mode, the motion information of the currently encoded image block is not used. Update the historical candidate list; on the contrary, if the inter prediction mode of the current coded image block is a non-skip / merge mode, use the motion information of the current coded image block to update the historical candidate list; in this case, even the original history in the historical candidate list
- the number of candidate motion information is large, which also reduces the data movement operation caused by adding the motion information of the current coded image block to the historical candidate list, which may result in finding duplicates and moving candidates caused by updates.
- the historical candidate list is continuously updated during the image coding process, which helps to improve the efficiency of motion vector prediction, that is, it helps to improve the efficiency of inter prediction, thereby improving the performance of encoding and decoding.
- FIG. 8 is an exemplary flowchart of an image decoding method based on a historical candidate list (also referred to as a historical candidate table) in an embodiment of the present application.
- the historical candidate list includes one or more historical candidate motion information.
- the historical candidate motion information is motion information of a previously decoded image block.
- the method may be performed by a video decoder (such as video decoder 30) or For an electronic device (for example, devices 1200, 1300) with a video decoding function, the method may include the following steps:
- the syntax elements such as skip_flag, merge_flag, and pred_mode are parsed from the bitstream; in one example, as shown in the following table, one or more of skip_flag, merge_flag, and pred_mode are used to indicate the inter prediction of the currently decoded image block mode.
- the value of cu_skip_flag is 0, which indicates that the inter prediction mode of the current image block is not skip mode
- the value of cu_skip_flag is 1, which indicates that the inter prediction mode of the current image block is skip mode
- the value of pred_mode_flag is 0, which indicates the current The prediction mode of the image block is inter inter prediction mode.
- a value of pred_mode_flag is 1 indicates that the prediction mode of the current image block is intra intra prediction mode.
- a value of merge_flag is 0, which indicates that the inter prediction mode of the current image block is not In merge mode
- the value of merge_flag is 1, indicating that the inter prediction mode of the current image block is the merge mode.
- step S803 may include:
- the inter prediction mode of the currently decoded image block is the first inter prediction mode
- historical candidate motion information in the historical candidate list is added to the first candidate motion information list of the currently decoded image block (the first candidate The motion information list corresponds to the first inter prediction mode, for example, the merge mode corresponds to merge candidate list);
- the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently decoded image block (second The candidate motion information list corresponds to the second inter prediction mode, for example, the inter mode corresponds to MVP (candidate list);
- Predicting motion information of the currently decoded image block based on the target candidate motion information; for example, determining that the target candidate motion information is motion information (such as a merge mode) of the current decoded image block; or,
- the target candidate motion information is a motion vector prediction value, based on the motion vector prediction value and the motion vector residual value MVD (and inter prediction direction, reference frame) of the current image block parsed from the code stream. Index, etc.) to determine motion information (such as inter mode) of the currently decoded image block.
- the first candidate motion information list includes motion information of a spatial domain reference block of the current decoded image block (the spatial domain reference block includes motion information of an adjacent block adjacent to the spatial domain of the currently decoded image block and / or one or more Motion information of a non-adjacent block that is not adjacent to the spatial domain of the currently decoded image block) and / or motion information of a time-domain reference block of the currently-decoded image block (the time-domain reference block includes: The motion information of the adjacent block in the lower right corner of the co-located block at the same position of the image block, or the motion information of the center position of the co-located block);
- the second candidate motion information list includes a motion vector of a spatial domain reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
- the first candidate motion information list includes a motion vector of a spatial reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
- the second candidate motion information list includes motion information of a spatial domain reference block of the currently decoded image block and / or motion information of a time domain reference block of the currently decoded image block.
- adding the historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently decoded image block includes:
- adding the second historical candidate motion information to all The first candidate motion information list is as follows:
- the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list
- the first historical candidate motion information is relative to the second history
- the candidate motion information is first added to the first candidate motion information list.
- adding historical candidate motion information in the historical candidate list to the fused motion information candidate list or the motion vector prediction candidate list may include one of the following three methods, which is not limited in this application.
- Method 1 If the current block is in a merge / skip mode, the historical candidate in the historical candidate list is added to the fusion motion information candidate list. If the current block is in inter mode, the historical candidates in the historical candidate list are not added to the motion vector prediction candidate list.
- Method 3 If the current block is in a merge / skip mode, the historical candidate in the historical candidate list is added to the candidate list of fused motion information. If the current block is in the inter mode, the historical candidates in the historical candidate list are added to the motion vector prediction candidate list.
- the embodiment of the present invention may further include:
- a historical candidate list is loaded, in other words, one or more historical candidate motion information in the historical candidate list may be used for frames performed on the currently decoded image block.
- an inter prediction process also referred to as a decoding process performed on the current decoded image block
- L is a positive integer greater than 0.
- the historical candidate list For the initialization process of the historical candidate list, refer to the prior art. For example, at the beginning of a slice (SLICE), the historical candidate list may be emptied. Other methods for initializing the historical candidate list may also be adopted, which is not limited in this application.
- step S803 may include:
- S803A Determine target candidate motion information from a candidate motion information list corresponding to an inter prediction mode of a currently decoded image block, where the target candidate motion information is used to predict motion information of the currently decoded image block, wherein the historical candidate One or more historical candidate motion information in the list is included in the candidate motion information list;
- the target candidate motion information may be determined from the candidate motion information list according to the first identification information (such as a fusion index or a motion vector prediction value index) parsed from the code stream; if the candidate motion information The length of the list is one, there is no need to parse the first identification information (such as a fusion index or a motion vector prediction value index), and determine that the only candidate motion information is the target candidate motion information;
- the first identification information such as a fusion index or a motion vector prediction value index
- S803B Perform inter prediction on the currently decoded image block according to the motion information of the currently decoded image block to obtain a predicted image (that is, a predicted pixel value) of the currently decoded image block.
- motion compensation is performed according to the motion information to obtain a predicted image. If a residual exists in the current block, the residual information and the predicted image are added to obtain a reconstructed image of the current block; if the current block has no residual, the predicted image is a reconstructed image of the current block.
- S803C based on the residual image (that is, the residual value) of the current decoded image block and the predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the inter prediction process, the obtained The reconstructed image of the currently decoded image block is described. For example, the predicted image and the residual image are added to obtain a reconstructed image of the current block.
- step S802 may be performed after step S801, or may be performed before step S801; the remaining steps are not illustrated here one by one.
- step S805 may include:
- the inter prediction mode of the currently decoded image block is the first inter prediction mode, using the motion information of the currently decoded image block to update the historical candidate list in a first processing manner;
- the motion candidate information of the currently decoded image block is used to update the historical candidate list in a second processing manner.
- the first inter prediction mode is a skip mode or a merge mode
- the second inter prediction mode is an inter prediction mode other than the first inter prediction mode
- the second inter prediction mode is that the first inter prediction mode is a skip mode or a merge mode; the first inter prediction mode is a non-second inter prediction mode.
- the history is updated in the first processing manner using the motion information of the currently decoded image block in step S805.
- Candidate list including:
- the motion information of the current decoded image block (referred to as the current block) is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and Adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
- the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information
- the historical candidate list is described.
- a method for judging or comparing whether the motion information of the current block is the same as a certain historical candidate motion information in the historical candidate list is not limited. It can be that the two pieces of motion information are completely the same, or that the two pieces of motion information are the same after some processing, for example, the results of two motion vectors shifted to the right by 2 bits are the same.
- the motion information using the currently decoded image block described in step S805 is updated in a second processing manner.
- the historical candidate list includes:
- the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last candidate) to join the historical candidate list.
- the motion information of the current block is compared with the historical candidates in the historical candidate list;
- the historical candidates are the same as the current block motion information, and the historical candidates are removed from the historical candidate list.
- the prediction mode of the current block is inter mode, check the historical candidate list size. If the historical candidate list size does not exceed the preset list size (also known as list length or table size), The block's motion information is added to the tail of the historical candidate list as the latest historical candidate motion information; if the historical candidate list size reaches a preset list size (also known as the list length or table size), the historical candidate list is added to the historical candidate list. The historical candidate running information located at the head is removed, and the motion information of the current block is added to the tail of the historical candidate list as the latest historical candidate motion information;
- the preset list size also known as list length or table size
- the step S805 uses the motion information of the currently decoded image block to update the first processing mode.
- Historical candidate list including:
- the motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode
- adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list includes:
- the motion information of the current decoded image block is taken as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
- the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list.
- the second processing method is used in step S805 to use the motion information of the currently decoded image block.
- Updating the historical candidate list includes:
- the motion information of the current block is not added to the historical candidate list or if the prediction mode of the current block is a skip / merge mode, when the SKIP / merge mode exists in the historical candidate list
- the motion information (history candidate) of the image block does not exceed the value of S, then the motion information of the current block is added to the historical candidate list, where S is the threshold, that is, the SKIP / merge mode image block that is allowed to be placed in the historical candidate list.
- S is the threshold
- the process of adding the motion information of the current block to the historical candidate list includes: starting from the head of the historical candidate list, comparing the motion information of the current block with the historical candidate in the historical candidate list; if there is a historical candidate with the current block The motion information is the same, and the historical candidate is removed from the historical candidate list. Then, check the history candidate list size. If the list size exceeds the preset size, the history candidate at the head of the list is removed. Finally, the motion information of the current block is added to the historical candidate list.
- the motion information of the current block is compared with the historical candidate in the historical candidate list starting from the head of the historical candidate list; if there is a certain history If the candidate has the same motion information as the current block, the historical candidate is removed from the historical candidate list. Check the size of the historical candidate list. If the list size exceeds a preset size (for example, the size of the historical candidate list), remove the historical candidate at the head of the list. The motion information of the current block is added to the tail of the historical candidate list. If the size of the list does not exceed the preset size, the motion information of the current block is directly added to the tail of the historical candidate list.
- a preset size for example, the size of the historical candidate list
- the prediction mode of the current image block it is determined whether to add more historical candidates from the historical candidate list to the merge candidate list, especially if the size of the historical candidate list is large, the MV prediction of the current image block
- the accuracy is substantially lossless while reducing the complexity of the method of the embodiment of the present invention.
- the step S805 uses the motion information of the currently decoded image block to update the first processing mode.
- Historical candidate list including:
- the motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode
- the second processing method is adopted in step S805 using the motion information of the currently decoded image block. Updating the historical candidate list includes:
- the size of the historical candidate list currently reaches the preset list size remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently decoded image block as the latest historical candidate motion information The historical candidate list.
- the motion information of the current block is not added to the historical candidate list.
- the prediction mode of the current block is skip / merge mode
- the motion information (history candidate) of the image block in the SKIP / merge mode exists in the historical candidate list, the motion information of the current block is added to the historical candidate list .
- S is a threshold value, that is, the maximum number of motion information of an image block of the SKIP / merge mode that is allowed to be placed in the historical candidate list.
- the process of adding the motion information of the current block to the historical candidate list includes: starting from the head of the historical candidate list, comparing the motion information of the current block with the historical candidate in the historical candidate list; if there is a historical candidate with the current block The motion information is the same, and the historical candidate is removed from the historical candidate list. Then, check the history candidate list size. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the historical candidate list.
- the prediction mode of the current block is inter mode
- check the historical candidate list size If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the tail of the historical candidate list. If the size of the list does not exceed the preset size, the motion information of the current block is added to the tail of the historical candidate list.
- the prediction mode of the current block is inter mode
- a preset list size also known as a list length or table size
- the motion information of the current block is taken as the latest historical candidate motion information.
- the size of the historical candidate list reaches a preset list size (also known as the list length or table size)
- the historical candidate running information at the head of the historical candidate list is removed, and Adding the motion information of the current block as the latest historical candidate motion information to the tail of the historical candidate list;
- the prediction mode of the current image block it is determined whether to check whether the motion information of the current image block is the same as other historical candidates that have been added to the historical candidate list.
- the prediction mode of the current image block is inter In the mode, the probability that the motion information of the current image block is the same as the motion information of the previously encoded or decoded image block is low, so the necessity or significance of the repeatability check is not significant; and
- the MV prediction accuracy of the current image block is basically lossless.
- the complexity of the method of the embodiment of the present invention is reduced.
- the embodiment of the present application first checks the prediction mode of the current block before adding the motion information of the current block to the historical candidate list.
- the prediction mode is inter and merge / skip, different operations are used to find duplicate operations and update operations, respectively.
- the prediction mode of the current image block is checked, and whether the historical candidate is determined according to the prediction mode of the current image block.
- the historical candidates in the list are added to the fusion motion information candidate list, for example: when the prediction mode is inter, the historical candidates in the historical candidate list are not added to the fusion motion information candidate list; when the prediction mode is merge / skip When the historical candidate in the historical candidate list is added to the fusion motion information candidate list; in another design mode, when the prediction mode is inter, the historical candidate in the historical candidate list is added to the fusion motion information candidate list Medium; when the prediction mode is merge / skip, the historical candidates in the historical candidate list are not added to the fusion motion information candidate list.
- the embodiment of the present invention decides whether to perform the repetitive check in consideration of the inter prediction mode of the current image block, and to a certain extent, avoids the operation of transferring historical candidates in the historical candidate list, such as:
- the motion information (Current MV) is the same as a previously added historical candidate (such as MV2)
- the previously added historical candidate such as MV2
- the current newly added The motion information (Current MV) of the current image block is added to the tail of the historical candidate list.
- the subsequent MV4 is moved to the position of the original MV3, so as to postpone, etc .; or if the maximum number of historical candidates already exists in the historical candidate list, and the motion information of the current newly added current image block appears (Current MV) .
- the historical candidate such as MV0
- the previously newly added motion information (Current MV) of the current image block is added to the tail of the historical candidate list, which brings the data movement operation of historical candidates in the historical candidate list. For example, MV1 after MV0 is moved to the original MV0. Position, MV2 after MV1 is moved to the original MV1 position, and so on, and so on.
- FIG. 11A and FIG. 11B illustrate a method of adding history candidates to the fusion motion information candidate list to increase the number of merged / skip fusion motion information candidates and improve prediction efficiency.
- the construction method of the fusion motion information candidate list added to the historical candidate is as follows:
- Steps 1111 and 1113 Add a spatial candidate and a temporal candidate that are adjacent to the spatial domain of the current block to the fusion motion information candidate list of the current block.
- a fusion motion information candidate list is generated. If the current CU or current decoded image block is in inter mode, a motion vector prediction candidate list is generated. The historical candidates in the historical candidate list are added to the fused motion information candidate list or the motion vector prediction candidate list.
- generating a candidate list of fused motion information specifically includes:
- the spatial candidate and the temporal candidate for the current block are added to the fusion motion information candidate list of the current block, and the method is the same as that in HEVC.
- the spatial fusion candidates include A0, A1, B0, B1, and B2, and the time domain fusion candidates include T0 and T1.
- the time-domain fusion candidates also include candidate motion information provided by the adaptive time-domain motion vector prediction (ATMVP) technology.
- ATMVP adaptive time-domain motion vector prediction
- the process of generating the candidate list of fused motion information may be performed by a method in HEVC or VTM, or other methods of generating the candidate list of fused motion information, which are not limited in this application.
- the motion vector prediction candidate list may be generated by using the method in HEVC (High Efficiency Video Coding) or VTM, or other methods of generating a motion vector prediction candidate list.
- HEVC High Efficiency Video Coding
- VTM Video Coding
- Step 1131 Add historical candidates from the historical candidate list to the fusion motion information candidate list, for example, add historical candidates to the fusion motion information candidate list in the order from the tail to the head of the historical candidate list, until the fusion motion information candidate The maximum number of candidates in the list is reached, as shown in Figure 11A.
- the inter prediction mode of the current image block may be considered, starting from the historical candidate at the end of the historical candidate list, and checking the fusion motion with the fusion motion information candidate list obtained in step 1. Whether the information candidates are the same, if they are different, they are added to the fusion motion information candidate list; if they are the same, the next historical candidate in the historical candidate list is checked. For details, refer to the description of the previous embodiment, and details are not described herein again.
- the historical candidates in the historical candidate list are added to the fusion motion information candidate list, and a preset number of historical candidates is checked in the order from the tail to the head of the historical candidate list.
- the preset number may be in the fusion motion information candidate list. The difference between the maximum allowed number of candidates and the number of candidates that have been currently placed in the motion information candidate list;
- the historical candidate list includes one or more historical candidates, and each historical candidate is motion information of a previously encoded or previously decoded block.
- the historical candidate list may be at the slice level, or the historical candidate list may be at the level of several CTUs (CTU lines); or the historical candidate list may be at the CTU level.
- Step 1135 Add other types of fused motion information candidates, such as bi-predictive candidates and zero motion vector candidates.
- the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list is the current slice or current image or the current one or more image coding units At the CTU level, in other words, during the encoding or decoding of multiple image blocks under the same slice, this continuously updated historical candidate list can be used.
- FIG. 10B illustrates the use of motion information of the coded blocks in the current frame to construct a historical candidate list, and access to the historical candidate list in a first-in-first-out manner.
- the overall historical candidate list in the encoding / decoding side is constructed and used as follows:
- Step 1 Initialize the history candidate list at the beginning of SLICE decoding and clear it.
- Step 2 Decode the current CU. If the current CU or current block is in merge or inter inter prediction mode, a fusion motion information candidate list or motion vector prediction candidate list is generated. Based on the inter prediction mode of the current block, the The historical candidate is added to the candidate list of motion information fusion or the candidate list of motion vector prediction.
- Step 3 After decoding the current CU or current block, based on the current prediction mode of the current block, the motion information of the current block is added as a new historical candidate to the historical candidate list to update the historical candidate list, as shown in Figures 9 and 10A. And 10B.
- the motion information of the current block is compared with historical candidates in the historical candidate list. If a certain historical candidate (such as MV2 in FIG. 3) is the same as the motion information of the current block, then this historical candidate MV2 is removed. And, check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the tail of the historical candidate list.
- a certain historical candidate such as MV2 in FIG. 3
- an embodiment of the present application provides an image encoding device based on a historical candidate list, where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information is a previously encoded image block.
- the historical candidate motion information is motion information of a previously decoded image block in a current slice or a current image or a current one or more coding tree units CTU, and the device includes:
- An inter prediction unit (43) configured to determine an inter prediction mode of a current encoded image block according to a rate distortion cost criterion; and perform an inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block, Obtaining the motion information of the currently encoded image block; for example, selecting an inter prediction mode with the lowest rate distortion cost from the set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
- the inter prediction unit (43) is further configured to update the historical candidate list by using the motion information of the currently encoded image block according to the inter prediction mode of the currently encoded image block;
- An entropy coding unit (56) is configured to code a syntax element used to indicate an inter prediction mode of the currently coded image block into a code stream.
- inter prediction unit here may correspond to the inter prediction unit 43 in FIG. 2;
- entropy coding unit here may correspond to the entropy coding unit 56 in FIG. 2.
- the inter prediction unit ( 43) For:
- the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, using the motion information of the currently-encoded image block to update the historical candidate list in a first processing manner;
- the motion candidate information of the currently encoded image block is used to update the historical candidate list in a second processing manner.
- the first inter prediction mode is a merge merge mode or a skip skip mode
- the second inter prediction mode is an inter prediction mode other than the first inter prediction mode
- the second inter prediction mode is a merge merge mode or a skip skip mode; the first inter prediction mode is an inter prediction mode that is not a second inter prediction mode.
- the inter prediction unit (43) is configured to:
- the inter prediction unit is used for:
- the inter prediction unit (43) is configured to:
- the motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode
- Inter prediction units when the inter prediction mode of the currently-encoded image block is the second inter-prediction mode, the aspect of using the motion information of the currently-encoded image block to update the historical candidate list in a second processing manner, said Inter prediction units are used:
- the inter prediction unit (43) is configured to:
- the motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode
- Inter prediction units when the inter prediction mode of the currently-encoded image block is the second inter-prediction mode, the aspect of using the motion information of the currently-encoded image block to update the historical candidate list in a second processing manner, said Inter prediction units are used:
- the size of the historical candidate list currently reaches the preset list size remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently encoded image block as the latest historical candidate motion information The historical candidate list.
- the inter prediction unit (43) is configured to:
- the motion information of the current coded image block is used as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
- the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list.
- the inter prediction process is performed on the current encoded image block based on the inter prediction mode of the current encoded image block to obtain motion information of the currently encoded image block.
- the prediction unit (43) is used for:
- inter prediction mode of the current encoded image block is the first inter prediction mode, adding historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block;
- the inter prediction mode of the currently encoded image block is the second inter prediction mode
- the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently encoded image block
- Target candidate motion information from the first candidate motion information list or the second candidate motion information list according to a rate distortion cost criterion; for example, the target candidate motion information encodes the current coded image block with the lowest rate distortion cost;
- the motion vector difference value MVD of the image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block.
- the first candidate motion information list includes motion information of a spatial domain reference block of the currently encoded image block and / or motion information of a time domain reference block of the currently encoded image block.
- the spatial domain reference block includes: The motion information of neighboring blocks adjacent to the spatial domain of the coded image block and / or the motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the current coded image block;
- the time-domain reference block includes: The motion information of the neighboring block in the lower right corner of the co-located block at the same position of the current coded image block, or the motion information of the center position of the co-located block;
- the second candidate motion information list includes the A motion vector of a spatial reference block and / or a motion vector of a temporal reference block of a currently coded image block;
- the first candidate motion information list includes a motion vector of a spatial reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block;
- the second candidate motion information list includes the current Motion information of a spatial domain reference block of the coded image block and / or motion information of a time domain reference block of the currently coded image block.
- the historical candidate motion information in the historical candidate list is added to the aspect of the first candidate motion information list of the currently encoded image block, and the inter prediction unit (43) is configured to:
- adding the second historical candidate motion information to all The first candidate motion information list is as follows:
- the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list
- the first historical candidate motion information is relative to the second history
- the candidate motion information is first added to the first candidate motion information list.
- the inter prediction unit (43) is configured to:
- the target candidate motion information is determined from the candidate motion information list corresponding to the inter prediction mode of the currently encoded image block, wherein one or more historical candidate motion information in the historical candidate list is included in the The candidate motion information list; for example, the target candidate motion information encodes the currently-distorted image block with the lowest rate distortion cost;
- the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation)
- the inter prediction unit (43) is further configured to:
- Inter prediction is performed on the current coded image block according to the motion information of the current coded image block to obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
- the device further includes:
- a residual image that is, a residual value
- a predicted image that is, a predicted pixel value
- a reconstructed image of the current coded image block is obtained. It should be understood that if the predicted image of the currently-encoded image block is the same as the original image of the currently-encoded image block, there is no residual image (ie, residual value) of the currently-encoded image block, based on the inter prediction
- the predicted image (that is, the predicted pixel value) of the currently-encoded image block obtained by the process is used to obtain a reconstructed image of the currently-encoded image block.
- the inter prediction mode of the current encoding block is a merge merge mode or a skip skip mode
- the entropy encoding unit (56) is specifically configured to: The corresponding merge index number is coded into the code stream;
- the inter-prediction mode of the current coding block is a non-fused merge mode or a non-skip skip mode
- the entropy coding unit (56) is specifically configured to: match the target candidate motion information (that is, the target candidate motion vector prediction value)
- the index number corresponding to MVP) and the motion vector difference MVD are coded into a code stream.
- an embodiment of the present application provides a decoding device based on a historical candidate list (also referred to as a historical candidate list).
- the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion
- the information is the motion information of the previously decoded image block (for example, it may be the current slice slice or the current image or the motion information of the previously decoded image block in the current one or more coding tree units CTU), and the device includes:
- An inter prediction unit (also referred to as a motion compensation unit) (82), configured to perform an inter prediction process on the current decoded image block based on the inter prediction mode of the currently decoded image block to obtain motion information of the currently decoded image block;
- the inter prediction unit (82) is further configured to update the historical candidate list by using the motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
- inter prediction unit here may correspond to the inter prediction unit 82 in FIG. 3; the entropy decoding unit here may correspond to the entropy decoding unit 80 in FIG. 3.
- one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current decoded image block.
- one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction performed on the decoded image block; for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter frame performed on the decoded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more In the process of inter prediction performed by decoding image blocks, this application does not limit this.
- the Inter prediction units are used:
- the inter prediction mode of the currently decoded image block is the first inter prediction mode, using the motion information of the currently decoded image block to update the historical candidate list in a first processing manner; and / or
- the motion candidate information of the currently decoded image block is used to update the historical candidate list in a second processing manner.
- the embodiment of the present application uses different methods to update the historical candidate list under different inter prediction modes.
- the motion vector prediction efficiency will be improved to a certain extent, that is, the inter prediction efficiency will be improved, thereby improving the encoding and decoding performance.
- the first inter prediction mode is a skip mode or a merge mode
- the second inter prediction mode is a non-first Inter prediction mode of one inter prediction mode
- the second inter prediction mode is that the first inter prediction mode is a skip mode or a merge mode; the first inter prediction mode is a non-second inter prediction mode. Inter prediction mode.
- the inter prediction unit in the aspect that the historical candidate list is updated in a first processing manner using the motion information of the currently decoded image block, is configured to:
- the inter prediction unit is configured to:
- the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last history candidate) join the history candidate list.
- the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode uses the In the process of updating the historical candidate list of motion information, duplicate items need to be checked. Conversely, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing method is to update the historical candidate with the motion information of the currently decoded image block.
- the inter prediction unit is configured to:
- the motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode.
- the inter prediction unit is configured to:
- the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode does not use the current decoding. Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, by default, the motion candidate information of the currently decoded image block is used to update the historical candidate list, and duplicate entries are checked during the update process.
- the current decoded image block is used.
- the operation of searching for duplicate items can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
- the inter prediction unit in the aspect that the historical candidate list is updated in a first processing manner using the motion information of the currently decoded image block, is configured to:
- the motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode.
- the inter prediction unit is configured to:
- the size of the historical candidate list currently reaches the preset list size remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently decoded image block as the latest historical candidate motion information The historical candidate list.
- the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode does not use the current decoding. Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, the historical candidate list is updated by using the motion information of the currently decoded image block by default, and no duplicate check is performed during the update process.
- the current decoded image block is used.
- the operation of searching for duplicates can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
- the motion information of the currently decoded image block is regarded as the latest
- the historical candidate motion information is added to the aspect of the historical candidate list, and the inter prediction unit is configured to:
- the motion information of the current decoded image block is taken as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
- the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list.
- an inter prediction process is performed on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain motion information of the currently decoded image block.
- the inter prediction unit is configured to:
- the inter prediction mode of the currently decoded image block is the first inter prediction mode
- historical candidate motion information in the historical candidate list is added to the first candidate motion information list of the currently decoded image block; it should be understood Yes, the first candidate motion information list corresponds to the first inter prediction mode, for example, the merge mode corresponds to the merge candidate list;
- the inter prediction mode of the currently decoded image block is the second inter prediction mode
- the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently decoded image block; it should be understood
- the second candidate motion information list corresponds to the second inter prediction mode, for example, the inter mode corresponds to the MVP candidate list.
- the target candidate motion information is determined in the motion information list or the second candidate motion information list; if the length of the first candidate motion information list or the second candidate motion information list is one, there is no need to parse the first identification information (such as an index), Determining the only candidate motion information as the target candidate motion information);
- the historical candidate list is continuously updated during the image decoding process.
- a candidate motion information list such as a merge candidate list or an AMVP candidate list
- the prediction mode of the currently decoded image block To determine whether historical candidates in the historical candidate list are added to the corresponding candidate motion information list, for example, when the inter prediction mode of the currently decoded image block is inter mode, the historical candidate motion information in the historical candidate list is not added To the AMVP candidate list; when the inter prediction mode of the currently decoded image block is the merge / skip mode, the historical candidate motion information in the historical candidate list is added to the fusion candidate list; in this case, once the historical candidate list is constructed
- the process of using the historical candidate list to construct a candidate motion information list can reduce the number of operations to find duplicate items in a certain program, thereby improving the encoding and decoding performance to a certain extent.
- the first candidate motion information list includes motion information of a spatial reference block of the currently decoded image block and / or time domain reference blocks of the currently decoded image block.
- Motion information wherein the spatial domain reference block includes: motion information of adjacent blocks adjacent to the spatial domain of the currently decoded image block and / or motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the currently decoded image block;
- the time-domain reference block includes: motion information of a neighboring block at a lower right corner of a co-located block at a same position as the current decoded image block in a reference frame, or motion information of a center position of the co-located block;
- the two candidate motion information lists include a motion vector of a spatial domain reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
- the first candidate motion information list includes a motion vector of a spatial reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
- the second candidate motion information list includes the current Motion information of a spatial domain reference block of a decoded image block and / or motion information of a time domain reference block of a currently decoded image block.
- the inter-frame The prediction unit is used to:
- adding the second historical candidate motion information to all The first candidate motion information list is as follows:
- the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list
- the first historical candidate motion information is relative to the second history
- the candidate motion information is first added to the first candidate motion information list.
- the inter prediction efficiency can be further improved, thereby improving the encoding and decoding performance to a certain extent.
- the inter prediction unit ( 82) For:
- the target candidate motion information is determined from a candidate motion information list corresponding to the inter prediction mode of the currently decoded image block, and the target candidate motion information is used to predict the motion information of the currently decoded image block, where in the historical candidate list One or more historical candidate motion information is included in the candidate motion information list;
- Inter prediction is performed on the current decoded image block according to the motion information of the current decoded image block to obtain a predicted image (that is, a predicted pixel value) of the current decoded image block.
- the historical candidate list is continuously updated during the image decoding process, and historical candidate motion information (history candidate) is added to the candidate motion information list of the currently decoded image block (such as the fused motion information candidate list or the motion vector prediction candidate list).
- the device increases the number of candidate motion information (for example, merge / skip fusion motion information candidate or inter-mode motion vector prediction candidate), and improves prediction efficiency.
- the apparatus further includes:
- a reconstructed image of the current decoded image block is obtained. It should be understood that if the predicted image of the currently decoded image block is the same as the original image of the currently decoded image block, there is no residual image (that is, a residual value) of the currently decoded image block, based on the inter prediction
- the predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the process, and a reconstructed image of the currently decoded image block is obtained.
- FIG. 12 is an explanatory diagram of an example of a video encoding system 1200 including the encoder 20 of FIG. 2A and / or the decoder 200 of FIG. 2B according to an exemplary embodiment.
- the system 1200 may implement a combination of various techniques of the present application.
- the video encoding system 1200 may include an imaging device 1201, a video encoder 20, a video decoder 30 (and / or a video encoder implemented by the logic circuit 1207 of the processing unit 1206), an antenna 1202, One or more processors 1203, one or more memories 1204, and / or a display device 1205.
- the imaging device 1201, antenna 1202, processing unit 1206, logic circuit 1207, video encoder 20, video decoder 30, processor 1203, memory 1204, and / or display device 1205 can communicate with each other.
- video encoding system 1200 is shown with video encoder 20 and video decoder 30, in different examples, video encoding system 1200 may include only video encoder 20 or only video decoder 30.
- the video encoding system 1200 may include an antenna 1202.
- the antenna 1202 may be used to transmit or receive an encoded bit stream of video data.
- the video encoding system 1200 may include a display device 1205.
- the display device 1205 may be used to present video data.
- the logic circuit 1207 may be implemented by the processing unit 1206.
- the processing unit 1206 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like.
- the video encoding system 1200 may also include an optional processor 1203, which may similarly include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like.
- ASIC application-specific integrated circuit
- the logic circuit 1207 can be implemented by hardware, such as dedicated hardware for video encoding, and the processor 1203 can be implemented by general software, operating system, and the like.
- the memory 1204 may be any type of memory, such as volatile memory (for example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), etc.) or non-volatile memory Memory (for example, flash memory, etc.).
- the memory 1204 may be implemented by a cache memory.
- the logic circuit 1207 may access the memory 1204 (eg, for implementing an image buffer).
- the logic circuit 1207 and / or the processing unit 1206 may include a memory (eg, a cache, etc.) for implementing an image buffer or the like.
- video encoder 20 implemented by a logic circuit may include an image buffer (eg, implemented by processing unit 1206 or memory 1204) and a graphics processing unit (eg, implemented by processing unit 1206).
- the graphics processing unit may be communicatively coupled to the image buffer.
- the graphics processing unit may include a video encoder 20 implemented by a logic circuit 1207 to implement the various units discussed with reference to FIG. 2A and / or any other encoder system or subsystem described herein.
- Logic circuits can be used to perform various operations discussed herein.
- Video decoder 30 may be implemented in a similar manner through logic circuit 1207 to implement the various units discussed with reference to decoder 200 of FIG. 2B and / or any other decoder system or subsystem described herein.
- video decoder 30 implemented by a logic circuit may include an image buffer (implemented by processing unit 2820 or memory 1204) and a graphics processing unit (eg, implemented by processing unit 1206).
- the graphics processing unit may be communicatively coupled to the image buffer.
- the graphics processing unit may include a video decoder 30 implemented by a logic circuit 1207 to implement the various units discussed with reference to FIG. 2B and / or any other decoder system or subsystem described herein.
- the antenna 1202 of the video encoding system 1200 may be used to receive an encoded bit stream of video data.
- the encoded bitstream may contain data, indicators, index values, mode selection data, etc. related to encoded video frames discussed herein, such as data related to coded segmentation (e.g., transform coefficients or quantized transform coefficients , (As discussed) optional indicators, and / or data defining code partitions).
- Video encoding system 1200 may also include a video decoder 30 coupled to antenna 1202 and used to decode the encoded bitstream.
- the display device 1205 is used to present a video frame.
- FIG. 13 is a schematic block diagram of an implementation manner of an encoding device or a decoding device (referred to as a decoding device 1300) according to an embodiment of the present application.
- the decoding device 1300 may include a processor 1310, a memory 1330, and a bus system 1350.
- the processor and the memory are connected through a bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory.
- the memory of the encoding device stores program code, and the processor can call the program code stored in the memory to perform various video encoding or decoding methods described in this application, especially video encoding in various inter prediction modes or intra prediction modes. Or decoding methods, and methods for predicting motion information in various inter or intra prediction modes. To avoid repetition, it will not be described in detail here.
- the processor 1310 may be a Central Processing Unit (“CPU”), and the processor 1310 may also be another general-purpose processor, digital signal processor (DSP), or special-purpose integration. Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
- the memory 1330 may include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may also be used as the memory 1330.
- the memory 1330 may include code and data 1331 accessed by the processor 1310 using the bus 1350.
- the memory 1330 may further include an operating system 1333 and an application program 1335, which includes a processor 1310 that allows the processor 1310 to perform the video encoding or decoding method described in this application (especially the historical candidate list-based image encoding method or the history-based method described in this application.
- Candidate list image decoding method at least one program.
- the application programs 1335 may include applications 1 to N, which further includes a video encoding or decoding application (referred to as a video decoding application) that executes the video encoding or decoding method described in this application.
- the bus system 1350 may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are marked as the bus system 1350 in the figure.
- the decoding device 1300 may further include one or more output devices, such as a display 1370.
- the display 1370 may be a touch-sensitive display or a touch display, which incorporates the display with a touch-sensitive unit that is operable to sense a touch input.
- the display 1370 may be connected to the processor 1310 via a bus 1350.
- Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol) .
- computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) a communication medium such as a signal or carrier wave.
- a data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures used to implement the techniques described in this application.
- the computer program product may include a computer-readable medium.
- such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or may be used to store instructions or data structures Any form of desired program code and any other medium accessible by a computer.
- any connection is properly termed a computer-readable medium.
- a coaxial cable is used to transmit instructions from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave. Wire, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of media.
- the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other temporary media, but are instead directed to non-transitory tangible storage media.
- magnetic disks and compact discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, and optical discs use lasers to reproduce optically data. Combinations of the above should also be included within the scope of computer-readable media.
- DSPs digital signal processors
- ASICs application specific integrated circuits
- FPGAs field programmable logic arrays
- the term "processor” as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein.
- the functions described by the various illustrative logical blocks, units, and steps described herein may be provided within dedicated hardware and / or software units configured for encoding and decoding, or Into the combined codec.
- the techniques can be fully implemented in one or more circuits or logic elements.
- various illustrative logical boxes, units, and units in the video encoder 20 and the video decoder 30 can be understood as corresponding circuit devices or logic elements.
- the techniques of this application may be implemented in a wide variety of devices or devices, including a wireless handset, an integrated circuit (IC), or a group of ICs (eg, a chipset).
- IC integrated circuit
- a group of ICs eg, a chipset
- Various components, units, or units are described in this application to emphasize functional aspects of the apparatus for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units.
- the various units may be combined in a codec hardware unit in combination with suitable software and / or firmware, or through interoperable hardware units (including one or more processors as described above) provide.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本申请涉及视频图像编解码领域,尤其涉及基于历史候选列表的图像编码方法、基于历史候选列表的图像解码方法以及相应的图像编码装置和图像解码装置。The present application relates to the field of video image encoding and decoding, and in particular, to an image encoding method based on a historical candidate list, an image decoding method based on a historical candidate list, and a corresponding image encoding device and image decoding device.
通过视频压缩技术,例如MPEG-1视频、MPEG-2视频、ITU-T H.262/MPEG-2、ITU-T H.263、ITU-T H.264/MPEG-4第10部分高级视频编码(Advanced Video Coding,AVC)、ITU-T H.265/高效视频编码(High Efficiency Video Coding,HEVC)、正在进行中的ITU-T H.266/多用途视频编码(Versatile Video Coding,VVC)标准和所述标准的扩展部分中所描述的那些视频压缩技术,设备之间可以实现高效地发射及接收数字视频信息。通常情况下,视频序列的图像被划分成图像块进行编码或解码。Through video compression technology, such as MPEG-1 video, MPEG-2 video, ITU-T H.262 / MPEG-2, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (Advanced Video Coding, AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC) standards in progress And those video compression technologies described in the extension of the standard, devices can efficiently transmit and receive digital video information. Generally, images of a video sequence are divided into image blocks for encoding or decoding.
视频压缩技术中,为了减少或去除视频序列中的冗余信息,引入了基于图像块的空间预测(帧内预测,intra prediction)和/或时间预测(帧间预测,inter prediction)。其中,帧间预测模式可以包括但不限于:跳过/融合模式(skip/merge mode)与非跳过/融合模式(例如高级运动矢量预测模式(AMVP mode))等,且均是利用多运动信息竞争的方法进行帧间预测的。In video compression technology, in order to reduce or remove redundant information in a video sequence, spatial prediction (intra prediction) and / or temporal prediction (inter prediction) based on image blocks are introduced. Among them, the inter prediction mode may include but is not limited to: skip / merge mode (skip / merge mode) and non-skip / merge mode (such as advanced motion vector prediction mode (AMVP mode)), etc., and both use multi-motion The information contention method performs inter prediction.
帧间预测过程中,引入了包括多组运动信息(亦称为多个候选运动信息)的候选运动信息列表(简称候选列表),例如,编码器可以利用从该候选列表中选出一组合适的候选运动信息来预测当前编码图像块的运动信息(例如运动矢量),进而得到当前编码图像块的最佳参考图像块(即预测块)。帧内预测过程中,有时候也引入了包括多组运动信息(亦称为block vector)的候选列表。In the inter prediction process, a candidate motion information list (referred to as a candidate list) including multiple sets of motion information (also referred to as multiple candidate motion information) is introduced. For example, the encoder can select a suitable set from the candidate list Candidate motion information to predict the motion information (such as a motion vector) of the current coded image block, and then obtain the best reference image block (that is, the prediction block) of the current coded image block. In the intra prediction process, a candidate list including multiple sets of motion information (also called block vectors) is sometimes introduced.
然而,无论跳过/融合模式还是非跳过/融合模式,如何提高帧间预测效率(亦称为运动矢量预测效率),从而提高编解码性能是持续需要解决的问题。However, no matter the skip / fusion mode or non-skip / fusion mode, how to improve the inter prediction efficiency (also referred to as motion vector prediction efficiency) and thus improve the performance of encoding and decoding is a problem that needs to be solved continuously.
发明内容Summary of the Invention
本申请实施例提供基于历史候选列表的图像编码方法、基于历史候选列表的图像解码方法及相应的图像编码装置和图像解码装置,提高运动矢量预测效率,从而提高编解码性能。The embodiments of the present application provide an image encoding method based on a historical candidate list, an image decoding method based on a historical candidate list, and a corresponding image encoding device and image decoding device to improve the motion vector prediction efficiency and thus the encoding and decoding performance.
第一方面,本申请实施例提供一种基于历史候选列表(亦可称为历史候选表)的图像解码方法,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已解码图像块的运动信息(例如可以为当前条带slice或当前图像或当前一个或多个编码树单元CTU中在先已解码图像块的运动信息),所述方法包括:In a first aspect, an embodiment of the present application provides an image decoding method based on a historical candidate list (also referred to as a historical candidate list), where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information The motion information of the previously decoded image block (for example, the motion information of the previously decoded image block in the current slice slice or the current image or the current one or more coding tree units CTU), the method includes:
解析接收的码流中的语法元素,以确定当前解码图像块的帧间预测模式;Parse the syntax elements in the received bitstream to determine the inter prediction mode of the currently decoded image block;
基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程,得到当前解码图像块的运动信息;Performing an inter prediction process on the currently decoded image block based on the inter prediction mode of the currently decoded image block to obtain motion information of the currently decoded image block;
根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新。Update the historical candidate list according to the inter prediction mode of the currently decoded image block, using the motion information of the currently decoded image block.
应当理解的是,基于历史候选列表的图像解码方法中,在一种示例方式下,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述当前解码图像块执行的帧间预测过程中,在另一种示例方式下,考虑不同解码图像块的帧间预测模式的不同,针对有些解码图像块,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述解码图像块执行的帧间预测过程中;针对有些解码图像块,所述历史候选列表中的一个或多个历史候选运动信息也可以不应用于对所述解码图像块执行的帧间预测过程中;但总的来说,当前条带slice或当前图像或当前一个或多个CTU中,所述历史候选列表中的一个或多个历史候选运动信息将会应用于对一个或多个解码图像块执行的帧间预测过程中,本申请对此不做限定。It should be understood that, in an image decoding method based on a historical candidate list, in one example manner, one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current decoded image block. In the inter prediction process, in another example manner, considering different inter prediction modes of different decoded image blocks, for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction performed on the decoded image block; for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter frame performed on the decoded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more In the process of inter prediction performed by decoding image blocks, this application does not limit this.
历史候选列表包括一个或多个历史候选项,每个历史候选项为在先已编码或在先已解码块的运动信息。在不同示例方式下,所述历史候选列表可以条带slice级别的,或者,所述历史候选列表可以图像级别的,或者,所述历史候选列表可以是若干个CTU(CTU行)的级别的;或者,所述历史候选列表可以是CTU的级别的;The historical candidate list includes one or more historical candidates, and each historical candidate is motion information of a previously encoded or previously decoded block. In different example manners, the historical candidate list may be slice-level, or the historical candidate list may be image-level, or the historical candidate list may be at the level of several CTUs (CTU lines); Alternatively, the historical candidate list may be at the CTU level;
例如,所述历史候选运动信息为当前图像块所属的条带slice中在先已解码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的图像中在先已解码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的CTU组(例如一个或多个CTU)中在先已解码图像块的运动信息;For example, the historical candidate motion information is motion information of a previously decoded image block in a slice to which the current image block belongs; for another example, the historical candidate motion information is a previously decoded image in an image to which the current image block belongs. Block motion information; for another example, the historical candidate motion information is motion information of a previously decoded image block in a CTU group (eg, one or more CTUs) to which the current image block belongs;
换言之,例如,所述历史候选列表是在当前图像块所属的条带的解码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的图像的解码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的CTU组(例如一个或多个CTU)的解码过程中生成且更新的;In other words, for example, the historical candidate list is generated and updated during the decoding process of the slice to which the current image block belongs; and for example, the historical candidate list is generated and updated during the decoding process of the image to which the current image block belongs. For another example, the historical candidate list is generated and updated during the decoding process of the CTU group (for example, one or more CTUs) to which the current image block belongs;
在一种可行的设计方式下,所述历史候选列表中的一个或多个历史候选运动信息被用于对所述当前解码图像块执行的帧间预测过程中;换言之,对所述当前解码图像块执行的帧间预测过程包括:基于候选运动信息列表对所述当前解码图像块执行帧间预测,其中所述候选运动信息列表不同于所述历史候选列表,且所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中。In a feasible design manner, one or more historical candidate motion information in the historical candidate list is used in an inter prediction process performed on the current decoded image block; in other words, on the current decoded image The inter prediction process performed by a block includes performing inter prediction on the current decoded image block based on a candidate motion information list, wherein the candidate motion information list is different from the historical candidate list, and one of the historical candidate lists Or more historical candidate motion information is included in the candidate motion information list.
可见,本申请实施例中考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如,如果当前解码图像块的帧间预测模式为skip/merge模式,不使用当前解码图像块的运动信息更新历史候选列表;相反,如果当前解码图像块的帧间预测模式为非skip/merge模式,使用当前解码图像块的运动信息更新历史候选列表;这样的话,即使历史候选列表中的原有的历史候选运动信息的数目较多,也一定程度上减少了将当前解码图像块的运动信息加入到历史候选列表中可能会引起的查找重复项和数据搬移的操作,而且所述历史候选列表在图像解码过程中不断更新,有助于提高运动矢量预测效率,亦即有助于提高帧间预测效率,从而提高编解码性能。It can be seen that the embodiment of the present application considers the inter prediction mode of the currently decoded image block to update the historical candidate list. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the motion information of the currently decoded image block is not used. Update the historical candidate list; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, use the motion information of the current decoded image block to update the historical candidate list; in this case, even the original history in the historical candidate list The number of candidate motion information is large, which also reduces the operation of finding duplicates and data movement that may be caused by adding motion information of the currently decoded image block to the historical candidate list, and the historical candidate list is used in image decoding. Continuous updates in the process help to improve the efficiency of motion vector prediction, that is, to improve the efficiency of inter-frame prediction, thereby improving the performance of codecs.
应当理解的是,本申请实施例的方法的执行主体可以是视频解码器或具有视频解码功 能的电子设备。It should be understood that the execution subject of the method in the embodiment of the present application may be a video decoder or an electronic device with a video decoding function.
在第一方面的某些实现方式中,所述根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新,包括:In some implementation manners of the first aspect, the updating the historical candidate list using motion information of the currently decoded image block according to an inter prediction mode of the currently decoded image block includes:
在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表;或When the inter prediction mode of the currently decoded image block is the first inter prediction mode, using the motion information of the currently decoded image block to update the historical candidate list in a first processing manner; or
在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,其中第一处理方式不同于第二处理方式。When the inter prediction mode of the currently decoded image block is the second inter prediction mode, the motion candidate information of the currently decoded image block is used to update the history candidate list in a second processing manner, where the first processing manner is different from the second processing manner. Processing method.
可见,相比于无论何种帧间预测模式采用统一的方式更新历史候选列表,本申请实施例在不同的帧间预测模式下采用不同的方式来更新历史候选列表,一旦所述历史候选列表中的一个或多个历史候选运动信息作用于对当前解码图像块执行的帧间预测过程中,将会一定程度上提高运动矢量预测效率,亦即提高帧间预测效率,从而提高编解码性能。It can be seen that, compared to updating the historical candidate list in a uniform manner regardless of the inter prediction mode, the embodiment of the present application uses different methods to update the historical candidate list under different inter prediction modes. When one or more historical candidate motion information are applied to the inter prediction process performed on the currently decoded image block, the motion vector prediction efficiency will be improved to a certain extent, that is, the inter prediction efficiency will be improved, thereby improving the encoding and decoding performance.
在第一方面的某些实现方式中,所述第一帧间预测模式为跳过模式(skip mode)或融合模式(merge mode);所述第二帧间预测模式为非第一帧间预测模式的帧间预测模式;In some implementations of the first aspect, the first inter prediction mode is a skip mode or a merge mode; the second inter prediction mode is a non-first inter prediction Inter prediction mode of the mode;
或者,or,
所述第二帧间预测模式为所述第一帧间预测模式为跳过模式(skip mode)或融合模式(merge mode);所述第一帧间预测模式为非第二帧间预测模式的帧间预测模式。The second inter prediction mode is that the first inter prediction mode is a skip mode or a merge mode; the first inter prediction mode is a non-second inter prediction mode. Inter prediction mode.
在第一方面的某些实现方式中,所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In some implementations of the first aspect, updating the historical candidate list in a first processing manner by using the motion information of the currently decoded image block includes:
当所述当前解码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current decoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list is described.
相应地,所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, the updating the historical candidate list in a second processing manner by using the motion information of the currently decoded image block includes:
如果当前的所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息(直接)加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding the motion information of the currently decoded image block as the latest historical candidate motion information (directly) to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息(the last history candidate)加入所述历史候选列表。If the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last history candidate) join the history candidate list.
可见,本申请实施例考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如如果当前解码图像块的帧间预测模式为skip/merge模式,第一处理方式即使用当前解码图像块的运动信息更新历史候选列表的过程中需要做重复项检查;相反,如果当前解码图像 块的帧间预测模式为非skip/merge模式,第二处理方式即使用当前解码图像块的运动信息更新历史候选列表的过程中无需做重复项检查;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,将当前解码图像块的运动信息加入到历史候选列表中能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。It can be seen that the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing method is to use the current decoded image block. In the process of updating the historical candidate list of motion information, duplicate items need to be checked. Conversely, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing method is to update the historical candidate with the motion information of the currently decoded image block. There is no need to check for duplicates in the process of listing; in this case, once the number of historical candidates in the constructed historical candidate list is large, adding the motion information of the currently decoded image block to the historical candidate list can reduce the search for duplicates to a certain extent. Operation to a certain extent to improve codec performance.
在第一方面的某些实现方式中,所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In some implementations of the first aspect, updating the historical candidate list in a first processing manner by using the motion information of the currently decoded image block includes:
将当前解码图像块的运动信息不加入历史候选列表;或者,Adding the motion information of the currently decoded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的历史候选运动信息(例如,所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的图像块的运动信息)。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information previously decoded based on the first inter prediction mode (for example, the target historical candidate motion information is motion of an image block previously decoded based on the first inter prediction mode. information).
相应地,所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, the updating the historical candidate list in a second processing manner by using the motion information of the currently decoded image block includes:
当所述当前解码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current decoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list is described.
可见,本申请实施例考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如如果当前解码图像块的帧间预测模式为skip/merge模式,第一处理方式即不使用所述当前解码图像块的运动信息更新历史候选列表或有条件使用所述当前解码图像块的运动信息更新历史候选列表;相反,如果当前解码图像块的帧间预测模式为非skip/merge模式,第二处理方式即缺省使用当前解码图像块的运动信息更新历史候选列表,且更新的过程中做重复项检查;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,使用当前解码图像块的运动信息更新历史候选列表的过程中,能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。It can be seen that the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the currently decoded image block is a skip / merge mode, the first processing mode does not use the current decoding Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, by default, the motion candidate information of the currently decoded image block is used to update the historical candidate list, and duplicate entries are checked during the update process. In this case, once the number of historical candidates in the constructed historical candidate list is large, the current decoded image block is used. During the process of updating the historical candidate list of motion information, the operation of searching for duplicate items can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
在第一方面的某些实现方式中,所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In some implementations of the first aspect, updating the historical candidate list in a first processing manner by using the motion information of the currently decoded image block includes:
将当前解码图像块的运动信息不加入历史候选列表;或者,Adding the motion information of the currently decoded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的历史候选运动信息。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode.
相应地,所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, the updating the historical candidate list in a second processing manner by using the motion information of the currently decoded image block includes:
如果当前所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the size of the historical candidate list currently does not reach the preset list size, adding motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the size of the historical candidate list currently reaches the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently decoded image block as the latest historical candidate motion information The historical candidate list.
可见,本申请实施例考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如如果当前解码图像块的帧间预测模式为skip/merge模式,第一处理方式即不使用所述当前解码图像块的运动信息更新历史候选列表或有条件使用所述当前解码图像块的运动信息更新历史候选列表;相反,如果当前解码图像块的帧间预测模式为非skip/merge模式,第二处理方式即缺省使用当前解码图像块的运动信息更新历史候选列表,且更新的过程中不做重复项检查;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,使用当前解码图像块的运动信息更新历史候选列表的过程中,能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。It can be seen that the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode does not use the current decoding. Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, the historical candidate list is updated by using the motion information of the currently decoded image block by default, and no duplicate check is performed during the update process. In this case, once the number of historical candidates in the constructed historical candidate list is large, the current decoded image block is used. In the process of updating the historical candidate list of motion information, the operation of searching for duplicates can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
在第一方面的某些实现方式中,所述如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,包括:In some implementation manners of the first aspect, if the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, the motion information of the currently decoded image block is used as the latest historical candidate motion information. Joining the historical candidate list includes:
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小未达到预设列表大小,则将当前解码图像块的运动信息作为最新的历史候选运动信息(the last HMVP candidate)加入历史候选列表;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list does not reach the preset list size, the motion information of the current decoded image block is taken as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小已达到预设列表大小,则从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list has reached the preset list size, the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list.
在第一方面的某些实现方式中,所述基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程,得到当前解码图像块的运动信息,包括:In some implementation manners of the first aspect, the performing an inter prediction process on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain motion information of the currently decoded image block includes:
在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息加入当前解码图像块的第一候选运动信息列表中;应当理解的是,第一候选运动信息列表与第一帧间预测模式对应,比如merge模式对应merge candidate list;In a case where the inter prediction mode of the currently decoded image block is the first inter prediction mode, historical candidate motion information in the historical candidate list is added to the first candidate motion information list of the currently decoded image block; it should be understood Yes, the first candidate motion information list corresponds to the first inter prediction mode, for example, the merge mode corresponds to the merge candidate list;
在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息不加入当前解码图像块的第二候选运动信息列表中;应当理解的是,第二候选运动信息列表与第二帧间预测模式对应,比如inter模式对应MVP candidate list;When the inter prediction mode of the currently decoded image block is the second inter prediction mode, the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently decoded image block; it should be understood The second candidate motion information list corresponds to the second inter prediction mode, for example, the inter mode corresponds to the MVP candidate list.
从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;应当理解的是,例如,根据从所述码流中解析出的第一标识信息从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;如果所述第一候选运动信息列表或 第二候选运动信息列表的长度为一,则无需解析第一标识信息(例如索引),确定唯一的候选运动信息为目标候选运动信息);Determine the target candidate motion information from the first candidate motion information list or the second candidate motion information list; it should be understood that, for example, the first candidate information is removed from the first candidate according to the first identification information parsed from the code stream The target candidate motion information is determined in the motion information list or the second candidate motion information list; if the length of the first candidate motion information list or the second candidate motion information list is one, there is no need to parse the first identification information (such as an index), Determining the only candidate motion information as target candidate motion information);
基于所述目标候选运动信息预测/得到所述当前解码图像块的运动信息;应当理解的是,例如,确定所述目标候选运动信息为所述当前解码图像块的运动信息;或者,所述目标候选运动信息为运动矢量预测值MVP,基于所述运动矢量预测值MVP和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD,确定所述当前解码图像块的运动信息。Predict / obtain motion information of the current decoded image block based on the target candidate motion information; it should be understood that, for example, determining the target candidate motion information is motion information of the current decoded image block; or, the target The candidate motion information is a motion vector prediction value MVP, and based on the motion vector prediction value MVP and the motion vector residual value MVD of the current image block parsed from the code stream, determining the motion of the current decoded image block information.
需要说明的是,候选运动信息列表(例如第一候选运动信息列表或第二候选运动信息列表)不同于所述历史候选列表;候选运动信息列表是图像块级别的(不同的图像块具有与之分别对应的候选运动信息列表),而历史候选列表(亦称为历史候选表)是当前slice(条带)或当前图像或者当前一个或多个编码树单元CTU级别的,例如,同一个slice下的多个图像块的编码或解码过程中,都可以使用这个不断更新的历史候选列表。It should be noted that the candidate motion information list (such as the first candidate motion information list or the second candidate motion information list) is different from the historical candidate list; the candidate motion information list is at the image block level (different image blocks have The corresponding candidate motion information list), and the historical candidate list (also known as the historical candidate list) is the current slice (slice) or current image or the current CTU level of one or more coding tree units, for example, under the same slice During the encoding or decoding of multiple image blocks, this continuously updated historical candidate list can be used.
本申请实施例中,在图像解码过程中不断更新历史候选列表,在构建当前解码图像块的候选运动信息列表(比如merge候选列表或AMVP候选列表)的过程中,根据当前解码图像块的预测模式来决定是否将历史候选列表中的历史候选加入到对应的候选运动信息列表中,比如:在当前解码图像块的帧间预测模式为inter模式时,不将历史候选列表中的历史候选运动信息加入到AMVP候选列表中;在当前解码图像块的帧间预测模式为merge/skip模式时,将历史候选列表中的历史候选运动信息加入到融合候选列表中;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,使用历史候选列表来构建候选运动信息列表的过程中,能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。In the embodiment of the present application, the historical candidate list is continuously updated during the image decoding process. During the process of constructing a candidate motion information list (such as a merge candidate list or an AMVP candidate list) of the currently decoded image block, according to the prediction mode of the currently decoded image block To determine whether historical candidates in the historical candidate list are added to the corresponding candidate motion information list, for example, when the inter prediction mode of the currently decoded image block is inter mode, the historical candidate motion information in the historical candidate list is not added To the AMVP candidate list; when the inter prediction mode of the currently decoded image block is the merge / skip mode, the historical candidate motion information in the historical candidate list is added to the fusion candidate list; in this case, once the historical candidate list is constructed When there are a large number of historical candidates, the process of using the historical candidate list to construct a candidate motion information list can reduce the number of operations to find duplicate items in a certain program, thereby improving the encoding and decoding performance to a certain extent.
在第一方面的某些实现方式中,所述第一候选运动信息列表包括所述当前解码图像块的一个或多个空域参考块的运动信息和/或当前解码图像块的一个或多个时域参考块的运动信息,其中所述空域参考块包括:与当前解码图像块空域邻接的相邻块的运动信息和/或一个或者多个与当前解码图像块空域不邻接的非相邻块的运动信息;所述时域参考块包括:在参考帧中与所述当前解码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息;所述第二候选运动信息列表包括所述当前解码图像块的空域参考块的运动矢量和/或当前解码图像块的时域参考块的运动矢量;In some implementations of the first aspect, the first candidate motion information list includes motion information of one or more spatial domain reference blocks of the currently decoded image block and / or one or more times of the currently decoded image block. Motion information of a domain reference block, wherein the spatial domain reference block includes: motion information of an adjacent block adjacent to the spatial domain of the currently decoded image block and / or one or more non-adjacent blocks that are not adjacent to the spatial domain of the currently decoded image block Motion information; the time-domain reference block includes: motion information of a neighboring block in a lower right corner of a co-located block at a same position as the current decoded image block in a reference frame, or motion information of a center position of the co-located block ; The second candidate motion information list includes a motion vector of a spatial domain reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
或者,or,
所述第一候选运动信息列表包括所述当前解码图像块的一个或多个空域参考块的运动矢量和/或当前解码图像块的一个或多个时域参考块的运动矢量;所述第二候选运动信息列表包括所述当前解码图像块的一个或多个空域参考块的运动信息和/或当前解码图像块的一个或多个时域参考块的运动信息。The first candidate motion information list includes motion vectors of one or more spatial domain reference blocks of the currently decoded image block and / or motion vectors of one or more time domain reference blocks of the currently decoded image block; the second The candidate motion information list includes motion information of one or more spatial domain reference blocks of the currently decoded image block and / or motion information of one or more time domain reference blocks of the currently decoded image block.
需要说明的是,这里的空域参考块指的是与当前图像块空域相关的参考块,可以包括当前图像块所在图像中的、与当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述当前图像块不邻接的一个或多个空域参考块。一种示例下,所述当前解码图像块所在图像中的与所述当前解码图像块邻近的一个或多个空域参考块包括:位于所述当前解码图像块左下侧的第四空域邻近块A0,位于所述当前解码图像块左侧的第一空域邻近块A1,位于所述当前解码图像块右上侧的第三空域邻近块B0,位于所述当前解 码图像块上侧的第二空域邻近块B1,或位于所述当前解码图像块左上侧的第五空域邻近块B2。It should be noted that the spatial reference block here refers to a reference block related to the current image block spatial domain, and may include one or more spatial reference blocks adjacent to the current image block in the image where the current image block is located, and / or , One or more spatial reference blocks in the image where the current image block is located, which are not adjacent to the current image block. In one example, the one or more spatial reference blocks adjacent to the current decoded image block in the image where the current decoded image block is located include: a fourth spatial domain adjacent block A0 located at the lower left side of the current decoded image block, A first spatial domain neighboring block A1 located on the left side of the current decoded image block, a third spatial domain neighboring block B0 located on the upper right side of the current decoded image block, and a second spatial domain neighboring block B1 located on the upper side of the current decoded image block. Or the fifth spatially adjacent block B2 located on the upper left side of the current decoded image block.
需要说明的是,这里的时域参考块,指的是与当前图像块时域相关的参考块,可以包括参考图像中、与并置块(co-located块)邻近的一个或多个空域参考块,和/或,所述并置块中的一个或多个子块,其中,所述并置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块,或者所述并置块为参考图像中与所述当前图像块具有指定位置偏移量的具有相同的大小、形状的图像块。这里的参考图像指的是已重建的图像,具体的,这里的参考图像指的是一个或多个参考图像列表中的参考图像,例如可以是指定参考图像列表中的指定参考图像索引对应的参考图像,也可以是默认的参考图像列表中的处于首位置的参考图像,本申请对此不作限定。一种示例下,所述时域参考块包括:所述当前图像块的并置块(co-located块)的右下空域邻近块H,所述并置块的左上中间块C0,所述并置块的右下中间块C3、所述并置块的左上块TL,或所述并置块的右下块BR。It should be noted that the time domain reference block here refers to a reference block related to the time domain of the current image block, and may include one or more spatial domain references in the reference image that are adjacent to the co-located block. Block, and / or one or more sub-blocks in the collocated block, wherein the collocated block is an image block in a reference image having the same size, shape, and coordinates as the current image block, or The juxtaposed block is an image block with the same size and shape in the reference image as the current image block with a specified position offset. The reference image here refers to a reconstructed image. Specifically, the reference image here refers to a reference image in one or more reference image lists. For example, it can be a reference corresponding to a specified reference image index in a specified reference image list. The image may also be the first reference image in the default reference image list, which is not limited in this application. In an example, the time-domain reference block includes: a lower-right spatial-domain neighboring block H of a co-located block of the current image block, a co-located block, an upper-left middle block C0, and the parallel The lower right middle block C3 of the collocated block, the upper left block TL of the collocated block, or the lower right block BR of the collocated block.
需要说明的是,无论是哪一种参考块,都是指已确定运动矢量图像块(亦指已编码图像块或已解码图像块)。It should be noted that no matter what kind of reference block is the determined motion vector image block (also referred to as an encoded image block or a decoded image block).
在第一方面的某些实现方式中,所述将所述历史候选列表中的历史候选运动信息加入当前解码图像块的第一候选运动信息列表中,包括:In some implementations of the first aspect, adding the historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently decoded image block includes:
在所述历史候选列表中的第一历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第一历史候选运动信息加入所述第一候选运动信息列表中,In a case where the first historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the first historical candidate motion information to all In the first candidate motion information list,
在所述历史候选列表中的第二历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第二历史候选运动信息加入所述第一候选运动信息列表中,其中:If the second historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the second historical candidate motion information to all The first candidate motion information list is as follows:
在第一历史候选运动信息加入所述历史候选列表的时间晚于第二历史候选运动信息加入所述历史候选列表的时间的情况下,所述第一历史候选运动信息相对于所述第二历史候选运动信息先加入所述第一候选运动信息列表。In a case where the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list, the first historical candidate motion information is relative to the second history The candidate motion information is first added to the first candidate motion information list.
本申请实施例中,一旦构建的历史候选列表中的历史候选的数目较多时,能进一步提高帧间预测效率,从而一定程度上提高了编解码性能。In the embodiment of the present application, once the number of historical candidates in the constructed historical candidate list is large, the inter prediction efficiency can be further improved, thereby improving the encoding and decoding performance to a certain extent.
在第一方面的某些实现方式中,所述基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程,包括:In some implementation manners of the first aspect, the performing an inter prediction process on the currently decoded image block based on the inter prediction mode of the currently decoded image block includes:
从与当前解码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选运动信息,所述目标候选运动信息用于预测所述当前解码图像块的运动信息,其中所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中;例如,如果当前解码图像块的帧间预测模式为merge模式,则与当前解码图像块的帧间预测模式对应的候选运动信息列表为融合运动信息候选列表merge candidate list;如果当前解码图像块的帧间预测模式为AMVP模式,则与当前解码图像块的帧间预测模式对应的候选运动信息列表为运动矢量预测候选列表MVP candidate list;所述历史候选列表不同于所述候选运动 信息列表。The target candidate motion information is determined from a candidate motion information list corresponding to the inter prediction mode of the currently decoded image block, and the target candidate motion information is used to predict the motion information of the currently decoded image block, where in the historical candidate list One or more historical candidate motion information is included in the candidate motion information list; for example, if the inter prediction mode of the currently decoded image block is a merge mode, the candidate corresponding to the inter prediction mode of the current decoded image block The motion information list is a merged motion information candidate list merge and candidate list; if the inter prediction mode of the currently decoded image block is the AMVP mode, the candidate motion information list corresponding to the inter prediction mode of the currently decoded image block is the motion vector prediction candidate list MVP candidate list; the historical candidate list is different from the candidate motion information list.
根据所述当前解码图像块的运动信息对当前解码图像块进行帧间预测,得到所述当前解码图像块的预测图像(亦即预测像素值)。Inter prediction is performed on the current decoded image block according to the motion information of the current decoded image block to obtain a predicted image (that is, a predicted pixel value) of the current decoded image block.
此外,需要说明的是,本申请实施例的候选运动信息列表中的候选运动信息可包括运动矢量MV和参考图像指示信息。当然,候选运动信息也可以包含两者之一或者全部包含,例如在编解码端共同约定参考图像的情况下,候选运动信息可以仅包含运动矢量MV。运动矢量一般包含水平分量偏移和竖直分量偏移。例如使用(x,y)表示MV,x表示水平方向的位置偏移,y表示竖直方向的位置偏移。其中参考图像指示信息可以包括但不限于参考图像列表和与参考图像列表对应的参考图像索引。参考图像索引用于识别对应参考图像列表(RefPicList0或RefPicList1)中的运动矢量所指向的参考图像。图像可被称作帧,且参考图像可被称作参考帧。In addition, it should be noted that the candidate motion information in the candidate motion information list in the embodiment of the present application may include a motion vector MV and reference image indication information. Of course, the candidate motion information may also include one or both of them. For example, in a case where a reference picture is jointly agreed upon by a codec, the candidate motion information may include only a motion vector MV. Motion vectors generally include horizontal component offsets and vertical component offsets. For example, (x, y) is used for MV, x is for horizontal position offset, and y is for vertical position offset. The reference image indication information may include, but is not limited to, a reference image list and a reference image index corresponding to the reference image list. The reference image index is used to identify a reference image pointed to by a motion vector in a corresponding reference image list (RefPicList0 or RefPicList1). An image may be referred to as a frame, and a reference image may be referred to as a reference frame.
本申请实施例在图像解码过程中不断更新历史候选列表,通过在当前解码图像块的候选运动信息列表(比如融合运动信息候选列表或运动矢量预测候选列表)中加入历史候选运动信息(history candidate)的方法,增加了候选运动信息(例如merge/skip的融合运动信息候选或inter模式的运动矢量预测候选)的数量,提高了预测效率。In the embodiment of the present application, the historical candidate list is continuously updated during the image decoding process, and historical candidate motion information (history candidate) is added to the candidate motion information list of the currently decoded image block (such as the fused motion information candidate list or the motion vector prediction candidate list). The method increases the number of candidate motion information (such as merge / skip fusion motion information candidates or inter-mode motion vector prediction candidates), and improves prediction efficiency.
在第一方面的某些实现方式中,所述方法还包括:In some implementations of the first aspect, the method further includes:
基于所述当前解码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前解码图像块的预测图像(亦即预测像素值),得到所述当前解码图像块的重建图像。应当理解的是,如果当前解码图像块的预测图像与当前解码图像块的原始图像相同,则没有所述当前解码图像块的残差图像(亦即残差值),则基于所述帧间预测过程得到的当前解码图像块的预测图像(亦即预测像素值),得到所述当前解码图像块的重建图像。Based on the residual image (that is, the residual value) of the current decoded image block and the predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the inter prediction process, the Reconstructed image. It should be understood that if the predicted image of the currently decoded image block is the same as the original image of the currently decoded image block, there is no residual image (that is, a residual value) of the currently decoded image block, based on the inter prediction The predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the process, and a reconstructed image of the currently decoded image block is obtained.
可见,本申请实施例的基于历史候选列表的图像解码方法,不仅适用于融合/跳过模式(Merge/skip)和/或高级运动矢量预测模式(advanced motion vector prediction,AMVP),而且也能适用于使用空域参考块和/或时域参考块的运动信息对当前图像块的运动信息进行预测的其它模式,从而提高编解码性能。It can be seen that the image decoding method based on the historical candidate list in the embodiment of the present application is not only applicable to merge / skip mode and / or advanced motion vector prediction mode (AMVP), but also applicable to And other modes for predicting the motion information of the current image block by using the motion information of the spatial reference block and / or the time domain reference block, thereby improving codec performance.
第二方面,本申请实施例提供一种基于历史候选列表的图像编码方法,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已编码图像块的运动信息,例如,所述历史候选运动信息为当前slice或当前图像或当前一个或多编码树单元CTU中在先已解码图像块的运动信息,所述方法包括:In a second aspect, an embodiment of the present application provides an image encoding method based on a historical candidate list, where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information is a motion of a previously encoded image block. Information, for example, the historical candidate motion information is motion information of a previously decoded image block in the current slice or current image or the current one or more coding tree unit CTUs, and the method includes:
根据率失真代价准则确定当前编码图像块的帧间预测模式;例如,从所述候选帧间预测模式的集合中选择率失真代价最小的帧间预测模式作为当前编码图像块的帧间预测模式;Determine the inter prediction mode of the current coded image block according to the rate distortion cost criterion; for example, select an inter prediction mode with the lowest rate distortion cost from the set of candidate inter prediction modes as the inter prediction mode of the current coded image block;
基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,得到当前编码图像块的运动信息;Performing an inter prediction process on the currently-encoded image block based on the inter-prediction mode of the currently-encoded image block to obtain motion information of the currently-encoded image block;
根据当前编码图像块的帧间预测模式,使用当前编码图像块的运动信息对所述历史候选列表进行更新;Updating the historical candidate list according to the inter prediction mode of the currently encoded image block using the motion information of the currently encoded image block;
并将用于指示所述当前编码图像块的帧间预测模式的语法元素编入码流。A syntax element used to indicate an inter prediction mode of the current coded image block is coded into a code stream.
应当理解的是,历史候选列表包括一个或多个历史候选项,每个历史候选项为在先已编码或在先已解码块的运动信息。在不同示例方式下,所述历史候选列表可以slice级别的,或者,所述历史候选列表可以是若干个CTU(CTU行)的级别的;或者,所述历史候选列表可以是CTU的级别的;It should be understood that the historical candidate list includes one or more historical candidates, and each historical candidate is motion information of a previously encoded or previously decoded block. In different example manners, the historical candidate list may be at the slice level, or the historical candidate list may be at the level of several CTUs (CTU lines); or the historical candidate list may be at the CTU level;
例如,所述历史候选运动信息为当前图像块所属的条带slice中在先已编码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的图像中在先已编码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的CTU组(例如一个或多个CTU)中在先已编码图像块的运动信息;For example, the historical candidate motion information is the motion information of the previously encoded image block in the slice to which the current image block belongs; for another example, the historical candidate motion information is the previously encoded image in the image to which the current image block belongs. Block motion information; for another example, the historical candidate motion information is motion information of a previously encoded image block in a CTU group (eg, one or more CTUs) to which the current image block belongs;
换言之,例如,所述历史候选列表是在当前图像块所属的条带的编码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的图像的编码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的CTU组(例如一个或多个CTU)的编码过程中生成且更新的;In other words, for example, the historical candidate list is generated and updated in the encoding process of the slice to which the current image block belongs; and for another example, the historical candidate list is generated and updated in the encoding process of the image to which the current image block belongs. For another example, the historical candidate list is generated and updated during the encoding process of the CTU group (for example, one or more CTUs) to which the current image block belongs;
在一种可行的设计方式下,所述历史候选列表中的一个或多个历史候选运动信息被用于对所述当前编码图像块执行的帧间预测过程中;换言之,对所述当前编码图像块执行的帧间预测过程包括基于候选运动信息列表对所述当前编码图像块执行帧间预测,其中所述候选运动信息列表不同于所述历史候选列表,且所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中。In a feasible design manner, one or more historical candidate motion information in the historical candidate list is used in an inter prediction process performed on the current encoded image block; in other words, on the current encoded image The inter prediction process performed by a block includes performing inter prediction on the current encoded image block based on a candidate motion information list, where the candidate motion information list is different from the historical candidate list, and one of the historical candidate list or A plurality of historical candidate motion information is included in the candidate motion information list.
在第二方面的某些实现方式中,所述根据当前编码图像块的帧间预测模式,使用当前编码图像块的运动信息对所述历史候选列表进行更新,包括:In some implementation manners of the second aspect, the updating the historical candidate list using motion information of the currently encoded image block according to an inter prediction mode of the currently encoded image block includes:
在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表;或When the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, using the motion information of the currently-encoded image block to update the historical candidate list in a first processing manner; or
在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,其中,第一处理方式不同于第二处理方式。When the inter prediction mode of the currently-encoded image block is the second inter-prediction mode, the motion candidate information of the currently-encoded image block is used to update the historical candidate list in a second processing manner, where the first processing manner is different from Two processing methods.
在第二方面的某些实现方式中,所述第一帧间预测模式为融合merge模式或跳过skip模式;所述第二帧间预测模式为非第一帧间预测模式的帧间预测模式;In some implementations of the second aspect, the first inter prediction mode is a merge merge mode or a skip mode; and the second inter prediction mode is an inter prediction mode that is not the first inter prediction mode. ;
或者,or,
所述第二帧间预测模式为融合merge模式或跳过skip模式;所述第一帧间预测模式为非第二帧间预测模式的帧间预测模式。The second inter prediction mode is a merge merge mode or a skip skip mode; the first inter prediction mode is an inter prediction mode that is not a second inter prediction mode.
在第二方面的某些实现方式中,所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In some implementations of the second aspect, the updating the historical candidate list in a first processing manner by using the motion information of the currently encoded image block includes:
当所述当前编码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前编码图像块的 运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current encoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前编码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current encoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current encoded image block as the latest historical candidate motion information to the The historical candidate list is described.
相应地,所述使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, using the motion information of the currently encoded image block to update the historical candidate list in a second processing manner includes:
如果当前的所述历史候选列表的大小未达到预设列表大小,则将所述当前编码图像块的运动信息作为最新的历史候选运动信息(直接)加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding the motion information of the currently encoded image block as the latest historical candidate motion information (directly) to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the current size of the historical candidate list has reached the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the currently encoded image block as the latest historical candidate motion information Join the historical candidate list.
在第二方面的某些实现方式中,所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In some implementations of the second aspect, the updating the historical candidate list in a first processing manner by using the motion information of the currently encoded image block includes:
将当前编码图像块的运动信息不加入历史候选列表;或者,Add the motion information of the current coded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先编码得到的历史候选运动信息(例如,基于所述第一帧间预测模式在先编码得到的图像块的运动信息);If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate Motion information is historical candidate motion information obtained based on the first inter prediction mode previously encoded (for example, motion information of an image block obtained based on the first inter prediction mode previously encoded);
相应地,所述使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, using the motion information of the currently encoded image block to update the historical candidate list in a second processing manner includes:
当所述当前编码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current encoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前编码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current encoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current encoded image block as the latest historical candidate motion information to the The historical candidate list is described.
在第二方面的某些实现方式中,所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In some implementations of the second aspect, the updating the historical candidate list in a first processing manner by using the motion information of the currently encoded image block includes:
将当前编码图像块的运动信息不加入历史候选列表;或者,Add the motion information of the current coded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先编码得到的历史候选运动信息;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode;
相应地,所述使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, using the motion information of the currently encoded image block to update the historical candidate list in a second processing manner includes:
如果当前所述历史候选列表的大小未达到预设列表大小,则将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the size of the historical candidate list currently does not reach the preset list size, adding motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the size of the historical candidate list currently reaches the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently encoded image block as the latest historical candidate motion information The historical candidate list.
其中,所述如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,包括:Wherein, if the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list includes:
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小未达到预设列表大小,则将当前编码图像块的运动信息作为最新的历史候选运动信息(the last HMVP candidate)加入历史候选列表;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list does not reach the preset list size, the motion information of the current coded image block is used as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小已达到预设列表大小,则从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list has reached the preset list size, the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list.
在第二方面的某些实现方式中,所述基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,得到当前编码图像块的运动信息,包括:In some implementation manners of the second aspect, the performing an inter prediction process on the current coded image block based on the inter prediction mode of the current coded image block to obtain motion information of the current coded image block includes:
在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息加入当前编码图像块的第一候选运动信息列表中;If the inter prediction mode of the current encoded image block is the first inter prediction mode, adding historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block;
在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息不加入当前编码图像块的第二候选运动信息列表中;If the inter prediction mode of the currently encoded image block is the second inter prediction mode, the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently encoded image block;
根据率失真代价准则从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;Determining target candidate motion information from the first candidate motion information list or the second candidate motion information list according to a rate distortion cost criterion; for example, the target candidate motion information encodes the current coded image block with the lowest rate distortion cost;
确定所述目标候选运动信息为所述当前编码图像块的运动信息;或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值。应注意的是,所述候选运动信息列表(例如第一候选运动信息列表或第二候选运动信息列表)不同于所述历史候选列表。Determining that the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) The motion vector difference value MVD of the image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block. It should be noted that the candidate motion information list (for example, the first candidate motion information list or the second candidate motion information list) is different from the historical candidate list.
其中,所述第一候选运动信息列表包括所述当前编码图像块的空域参考块的运动信息和/或当前编码图像块的时域参考块的运动信息,例如所述空域参考块包括:与当前编码图像块空域邻接的相邻块的运动信息和/或一个或者多个与当前编码图像块空域不邻接的非相邻块的运动信息;所述时域参考块包括:在参考帧中与所述当前编码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息;所述第二候选运动信息列表包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;The first candidate motion information list includes motion information of a spatial domain reference block of the currently encoded image block and / or motion information of a time domain reference block of the currently encoded image block. For example, the spatial domain reference block includes: The motion information of neighboring blocks adjacent to the spatial domain of the coded image block and / or the motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the current coded image block; the time-domain reference block includes: The motion information of the neighboring block in the lower right corner of the co-located block at the same position of the current coded image block, or the motion information of the center position of the co-located block; the second candidate motion information list includes the A motion vector of a spatial reference block and / or a motion vector of a temporal reference block of a currently coded image block;
或者,or,
所述第一候选运动信息列表包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;所述第二候选运动信息列表包括所述当前编码图像块的空域参考块的运动信息和/或当前编码图像块的时域参考块的运动信息。The first candidate motion information list includes a motion vector of a spatial reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block; the second candidate motion information list includes the current Motion information of a spatial domain reference block of the coded image block and / or motion information of a time domain reference block of the currently coded image block.
其中,所述将所述历史候选列表中的历史候选运动信息加入当前编码图像块的第一候选运动信息列表中,包括:Wherein, adding the historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block includes:
在所述历史候选列表中的第一历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第一历史候选运动信息加入所述第一候选运动信息列表中;In a case where the first historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the first historical candidate motion information to all The first candidate motion information list;
在所述历史候选列表中的第二历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第二历史候选运动信息加入所述第一候选运动信息列表中,其中:If the second historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the second historical candidate motion information to all The first candidate motion information list is as follows:
在第一历史候选运动信息加入所述历史候选列表的时间晚于第二历史候选运动信息加入所述历史候选列表的时间的情况下,所述第一历史候选运动信息相对于所述第二历史候选运动信息先加入所述第一候选运动信息列表。In a case where the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list, the first historical candidate motion information is relative to the second history The candidate motion information is first added to the first candidate motion information list.
在第二方面的某些实现方式中,所述基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,包括:In some implementation manners of the second aspect, the performing an inter prediction process on the current encoded image block based on the inter prediction mode of the currently encoded image block includes:
根据率失真代价准则,从与当前编码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选运动信息,其中所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中;例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;According to the rate-distortion cost criterion, the target candidate motion information is determined from the candidate motion information list corresponding to the inter prediction mode of the currently encoded image block, wherein one or more historical candidate motion information in the historical candidate list is included in the The candidate motion information list; for example, the target candidate motion information encodes the currently-distorted image block with the lowest rate distortion cost;
确定所述目标候选运动信息为所述当前编码图像块的运动信息;或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,其中,所述目标候选运动信息为目标候选运动矢量预测值。Determining that the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) The motion vector difference value MVD of the image block, wherein the target candidate motion information is a target candidate motion vector prediction value.
例如,如果当前编码图像块的帧间预测模式为merge模式,则与当前编码图像块的帧间预测模式对应的候选运动信息列表为merge candidate list;如果当前编码图像块的帧间预测模式为AMVP模式,则与当前编码图像块的帧间预测模式对应的候选运动信息列表为MVP candidate list;For example, if the inter prediction mode of the current encoded image block is a merge mode, the candidate motion information list corresponding to the inter prediction mode of the current encoded image block is a merge candidate list; if the inter prediction mode of the current encoded image block is AMVP Mode, the candidate motion information list corresponding to the inter prediction mode of the currently coded image block is an MVP candidate list;
需要说明的是,所述历史候选列表不同于所述候选运动信息列表;候选运动信息列表是图像块级别的(不同的图像块具有与之分别对应的候选运动信息列表),而历史候选表是当前slice或当前图像或者当前一个或多个图像编码单元CTU级别的,换言之,同一个slice下的多个图像块的编码或解码过程中,都可以使用这个不断更新的历史候选列表。It should be noted that the historical candidate list is different from the candidate motion information list; the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list is At the current slice or current image or at the current CTU level of one or more image coding units, in other words, during the encoding or decoding of multiple image blocks under the same slice, this continuously updated historical candidate list can be used.
在第二方面的某些实现方式中,所述基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,还包括:In some implementation manners of the second aspect, the performing an inter prediction process on the current coded image block based on the inter prediction mode of the current coded image block further includes:
根据所述当前编码图像块的运动信息对当前编码图像块进行帧间预测,得到所述当前编码图像块的预测图像(亦即预测像素值)。Inter prediction is performed on the current coded image block according to the motion information of the current coded image block to obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
在第二方面的某些实现方式中,所述方法还包括:In some implementations of the second aspect, the method further includes:
基于所述当前编码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前编码图像块的预测图像(亦即预测像素值),得到所述当前编码图像块的重建图像。应当理解的是,如果当前编码图像块的预测图像与当前编码图像块的原始图像相同,则没有所述当前编码图像块的残差图像(亦即残差值),则基于所述帧间预测过程得到的当前编码图像块的预测图像(亦即预测像素值),得到所述当前编码图像块的重建图像。Based on the residual image (that is, the residual value) of the current encoded image block and the predicted image (that is, the predicted pixel value) of the current encoded image block obtained by the inter prediction process, the Reconstructed image. It should be understood that if the predicted image of the currently-encoded image block is the same as the original image of the currently-encoded image block, there is no residual image (ie, residual value) of the currently-encoded image block, based on the inter prediction The predicted image (that is, the predicted pixel value) of the currently-encoded image block obtained by the process is used to obtain a reconstructed image of the currently-encoded image block.
在第二方面的某些具体实现方式中,所述当前编码块的帧间预测模式为融合merge模式或跳过skip模式,所述方法还包括:In some specific implementation manners of the second aspect, the inter prediction mode of the current coding block is a merge merge mode or a skip skip mode, and the method further includes:
将与所述目标候选运动信息对应的merge索引号编入码流;Coding a merge index number corresponding to the target candidate motion information into a code stream;
或者,or,
所述当前编码块的帧间预测模式为非融合merge模式或非跳过skip模式,所述方法还包括:The inter prediction mode of the current coding block is a non-fused merge mode or a non-skip skip mode, and the method further includes:
将与所述目标候选运动信息(即目标候选运动矢量预测值MVP)对应的索引号和所述运动矢量差值MVD编入码流。An index number corresponding to the target candidate motion information (that is, the target candidate motion vector prediction value MVP) and the motion vector difference MVD are coded into a code stream.
第三方面,本申请实施例提供一种基于历史候选列表(亦可称为历史候选表)的图像解码装置,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已解码图像块的运动信息(例如可以为当前条带slice或当前图像或当前一个或多个编码树单元CTU中在先已解码图像块的运动信息),包括用于实施第一方面的任意一种方法的若干个功能单元。举例来说,图像解码装置可以包括:In a third aspect, an embodiment of the present application provides an image decoding device based on a historical candidate list (also referred to as a historical candidate list), where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information Is motion information of a previously decoded image block (for example, it may be current slice slice or current image or motion information of a previously decoded image block in one or more current coding tree units CTU), including for implementing the first aspect Several functional units of either method. For example, the image decoding device may include:
熵解码单元,用于解析接收的码流中的语法元素,以确定当前解码图像块的帧间预测模式;An entropy decoding unit, configured to parse syntax elements in the received bitstream to determine an inter prediction mode of a currently decoded image block;
帧间预测单元,用于基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程,得到当前解码图像块的运动信息;An inter prediction unit, configured to perform an inter prediction process on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain motion information of the currently decoded image block;
所述帧间预测单元还用于根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新。The inter prediction unit is further configured to update the historical candidate list by using the motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
应当理解的是,基于历史候选列表的图像解码装置中,在一种示例方式下,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述当前解码图像块执行的帧间预测过程中,在另一种示例方式下,考虑不同解码图像块的帧间预测模式的不同,针对有些解码图像块,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述解码图像块执行的帧间预测过程中;针对有些解码图像块,所述历史候选列表中的一个或多个历史候选运动信息也可以不应用于对所述解码图像块执行的帧间预测过程中;但总的来说,当前条带slice或当前图像或当前一个或多个CTU中,所述历史候选列表中的一个或多个历史候选运动信息将会应用于对一个或多个解码图像块执行的帧间预测过程中,本申请对此不做限定。It should be understood that in an image decoding device based on a historical candidate list, in one example manner, one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current decoded image block. In the inter prediction process, in another example manner, considering different inter prediction modes of different decoded image blocks, for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction performed on the decoded image block; for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter frame performed on the decoded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more In the process of inter prediction performed by decoding image blocks, this application does not limit this.
第四方面,本申请实施例提供一种基于历史候选列表(亦可称为历史候选表)的图像编码装置,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已编码图像块的运动信息(例如,所述历史候选运动信息为当前slice或当前图像或当前一个或多编码树单元CTU中在先已解码图像块的运动信息),包括用于实施第二方面的任意一种方法的若干个功能单元。举例来说,图像编码装置可以包括:In a fourth aspect, an embodiment of the present application provides an image encoding device based on a historical candidate list (also referred to as a historical candidate list), where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information Motion information of previously coded image blocks (for example, the historical candidate motion information is the current slice or current image or motion information of previously decoded image blocks in the current one or more coding tree units CTU), including Several functional units of any one method of the second aspect. For example, the image encoding device may include:
帧间预测单元,用于根据率失真代价准则,确定当前编码图像块的帧间预测模式;基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,得到当前编码图像块的运动信息;例如,从所述候选帧间预测模式的集合中选择率失真代价最小的帧间预测模式作为当前编码图像块的帧间预测模式;The inter prediction unit is configured to determine an inter prediction mode of a current encoded image block according to a rate distortion cost criterion; and perform an inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block to obtain a current encoding Motion information of an image block; for example, selecting an inter prediction mode with the lowest rate distortion cost from the set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
所述帧间预测单元还用于根据当前编码图像块的帧间预测模式,使用当前编码图像块的运动信息对所述历史候选列表进行更新;The inter prediction unit is further configured to update the historical candidate list using the motion information of the currently encoded image block according to the inter prediction mode of the currently encoded image block;
熵编码单元,用于将用于指示所述当前编码图像块的帧间预测模式的语法元素编入码流。The entropy coding unit is configured to code a syntax element for indicating an inter prediction mode of the currently-encoded image block into a code stream.
应当理解的是,基于历史候选列表的图像编码装置中,在一种示例方式下,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述当前编码图像块执行的帧间预测过程中,在另一种示例方式下,考虑不同编码图像块的帧间预测模式的不同,针对有些编码图像块,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述编码图像块执行的帧间预测过程中;针对有些编码图像块,所述历史候选列表中的一个或多个历史候选运动信息也可以不应用于对所述编码图像块执行的帧间预测过程中;但总的来说,当前条带slice或当前图像或当前一个或多个CTU中,所述历史候选列表中的一个或多个历史候选运动信息将会应用于对一个或多个编码图像块执行的帧间预测过程中,本申请对此不做限定。It should be understood that, in an image encoding device based on a historical candidate list, in one example manner, one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current encoded image block. In the inter prediction process, in another example manner, considering different inter prediction modes of different coded image blocks, for some coded image blocks, one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction process performed on the coded image block; for some coded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter-frame performed on the coded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more During the inter prediction process performed by the encoded image block, this application does not limit this.
第五方面,本申请实施例提供一种基于历史候选列表的视频解码设备,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已解码图像块的运动信息,所述设备包括:In a fifth aspect, an embodiment of the present application provides a video decoding device based on a historical candidate list, where the historical candidate list includes one or more historical candidate motion information, where the historical candidate motion information is a motion of a previously decoded image block Information, the device includes:
存储器,用于存储码流形式的视频数据,所述视频数据包括一个或多个图像块;A memory, configured to store video data in the form of a bitstream, where the video data includes one or more image blocks;
视频解码器,用于解析码流中的语法元素,以确定当前解码图像块的帧间预测模式;基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程,得到当前解码图像块的运动信息;根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新。A video decoder for parsing syntax elements in a bitstream to determine an inter prediction mode of a currently decoded image block; performing an inter prediction process on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain Motion information of the currently decoded image block; and updating the historical candidate list using the motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
其中,所述历史候选列表中的一个或多个历史候选运动信息应用于对所述当前解码图像块执行的帧间预测过程中。换言之,对所述当前解码图像块执行的帧间预测过程包括基于候选运动信息列表对所述当前解码图像块执行帧间预测,其中所述候选运动信息列表不同于所述历史候选列表,且所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中。Wherein, one or more historical candidate motion information in the historical candidate list is applied in an inter prediction process performed on the current decoded image block. In other words, the inter prediction process performed on the current decoded image block includes performing inter prediction on the current decoded image block based on a candidate motion information list, where the candidate motion information list is different from the historical candidate list, and all One or more historical candidate motion information in the historical candidate list is included in the candidate motion information list.
第六方面,本申请实施例提供一种基于历史候选列表的视频编码设备,所述设备包括:According to a sixth aspect, an embodiment of the present application provides a video encoding device based on a historical candidate list, where the device includes:
存储器,用于存储视频数据,所述视频数据包括一个或多个图像块;A memory for storing video data, the video data including one or more image blocks;
视频编码器,用于根据率失真代价准则确定当前编码图像块的帧间预测模式;基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,得到当前编码图像块的运动信息;根据当前编码图像块的帧间预测模式,使用当前编码图像块的运动信息对所述历史候选列表进行更新;并将用于指示所述当前编码图像块的帧间预测模式的语法元素编入码流。A video encoder for determining an inter prediction mode of a current encoded image block according to a rate distortion cost criterion; performing an inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block to obtain a current encoded image block Update the historical candidate list using the motion information of the current coded image block according to the inter prediction mode of the current coded image block; and syntax for indicating the inter prediction mode of the current coded image block Elements are coded into the code stream.
其中,所述历史候选列表中的一个或多个历史候选运动信息被用于对所述当前编码图像块执行的帧间预测过程中;换言之,对所述当前编码图像块执行的帧间预测过程包括基于候选运动信息列表对所述当前编码图像块执行帧间预测,其中所述候选运动信息列表不同于所述历史候选列表,且所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中。Wherein, one or more historical candidate motion information in the historical candidate list is used in an inter prediction process performed on the current coded image block; in other words, an inter prediction process performed on the current coded image block Including performing inter prediction on the current encoded image block based on a candidate motion information list, wherein the candidate motion information list is different from the historical candidate list, and one or more historical candidate motion information in the historical candidate list are Included in the candidate motion information list.
本申请的第七方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。A seventh aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the above-mentioned first or second aspect. method.
本申请的第八方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。An eighth aspect of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method described in the first aspect or the second aspect above.
本申请的第九方面提供了一种电子设备,包括上述第四方面所述的视频编码器,或上述第三方面所述的视频解码器。A ninth aspect of the present application provides an electronic device including the video encoder according to the fourth aspect, or the video decoder according to the third aspect.
本申请的第十方面提供了一种编码设备,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行第二方面的任意一种方法的部分或全部步骤。A tenth aspect of the present application provides an encoding device, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to execute any one of the second aspect Part or all of the steps of a method.
本申请的第十一方面提供了一种解码设备,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行第一方面的任意一种方法的部分或全部步骤。An eleventh aspect of the present application provides a decoding device, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to execute any one of the first aspects Some or all steps of this method.
应理解,本申请的第二至十一方面与本申请的第一方面的技术方案一致,各方面及对应的可实施的设计方式所取得的有益效果相似,不再赘述。It should be understood that the second to eleventh aspects of the present application are consistent with the technical solution of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding implementable design manner are similar, and are not described again.
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly explain the technical solutions in the embodiments of the present application or the background art, the drawings that are needed in the embodiments of the present application or the background art will be described below.
图1为本申请实施例中一种视频编码及解码系统的示意性框图;FIG. 1 is a schematic block diagram of a video encoding and decoding system according to an embodiment of the present application; FIG.
图2为本申请实施例中一种视频编码器的示意性框图;2 is a schematic block diagram of a video encoder according to an embodiment of the present application;
图3为本申请实施例中一种视频解码器的示意性框图;3 is a schematic block diagram of a video decoder according to an embodiment of the present application;
图4A为本申请实施例中合并模式下由视频编码器执行的编码方法的一种示例性流程图;4A is an exemplary flowchart of an encoding method performed by a video encoder in a merge mode according to an embodiment of the present application;
图4B为本申请实施例中高级运动矢量预测模式下由视频编码器执行的编码方法的一种示例性流程图;4B is an exemplary flowchart of an encoding method performed by a video encoder in an advanced motion vector prediction mode according to an embodiment of the present application;
图5为本申请实施例中由视频解码器执行的运动补偿的一种示例性流程图;5 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application;
图6为本申请实施例中当前图像块及与其关联的空域参考块、时域参考块的一种示例性示意图;FIG. 6 is an exemplary schematic diagram of a current image block and a spatial domain reference block and a time domain reference block associated therewith in an embodiment of the present application; FIG.
图7为本申请实施例中一种基于历史候选列表的图像编码方法的流程图;7 is a flowchart of an image encoding method based on a historical candidate list in an embodiment of the present application;
图8为本申请实施例中一种基于历史候选列表的图像解码方法的流程图;8 is a flowchart of an image decoding method based on a historical candidate list according to an embodiment of the present application;
图9为本申请实施例中更新前后的历史候选列表的一种示例性示意图;FIG. 9 is an exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application; FIG.
图10A为本申请实施例中更新前后的历史候选列表的另一种示例性示意图;FIG. 10A is another exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application; FIG.
图10B为本申请实施例中图10A所示的更新前后的历史候选列表的一种具体示例性示意图;FIG. 10B is a specific exemplary diagram of the historical candidate list before and after the update shown in FIG. 10A in the embodiment of the present application; FIG.
图11A为本申请实施例中历史候选运动信息加入融合运动信息候选列表的一种示例性示意图;11A is an exemplary schematic diagram of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application;
图11B为本申请实施例中历史候选运动信息加入融合运动信息候选列表的另一种示例性流程示意图;11B is a schematic flowchart of another exemplary process of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application;
图12为本申请实施例中一种视频编码或解码系统(亦可称为编码设备或解码设备)的示意性框图;12 is a schematic block diagram of a video encoding or decoding system (also referred to as an encoding device or a decoding device) according to an embodiment of the present application;
图13为本申请实施例中另一种编码设备或解码设备的示意性框图。FIG. 13 is a schematic block diagram of another encoding device or decoding device according to an embodiment of the present application.
帧内预测编码:用周围邻近的像素值来预测当前的像素值,然后对预测误差进行编码的编码方式。Intra-prediction coding: A coding method that uses surrounding pixel values to predict the current pixel value and then encodes the prediction error.
编码图片:含有图片的所有编码树单元的图片的编码表示。Coded picture: A coded representation of a picture that contains all the coding tree units of the picture.
运动矢量(motion vector,MV):用于帧间预测的二维矢量,其提供从解码图片中的坐标到参考图片中的坐标的偏移量。Motion vector (MV): A two-dimensional vector used for inter prediction, which provides an offset from coordinates in a decoded picture to coordinates in a reference picture.
预测块:在其上应用相同预测的矩形M×N样本块。Prediction block: A rectangular M × N sample block on which the same prediction is applied.
预测过程:使用预测值提供当前被解码的数据元素(例如,样本值或运动矢量)的估计值。Prediction process: Use the predicted value to provide an estimate of the data element (eg, sample value or motion vector) that is currently being decoded.
预测值:指定值或后续数据元素解码过程中使用的先前解码数据元素(例如,样本值或运动矢量)的组合。Predicted value: A specified value or a combination of previously decoded data elements (eg, sample values or motion vectors) used in subsequent data element decoding processes.
参考帧:作为短期参考图片或长期参考图片的图片或帧。参考帧含有可以按解码顺序用于后续图片的解码过程中的帧间预测的样本。Reference frame: A picture or frame used as a short-term reference picture or a long-term reference picture. The reference frame contains samples that can be used in the decoding order for inter prediction in the decoding process of subsequent pictures.
帧间预测:根据当前块的参考帧中的像素,通过运动矢量指示参考帧中用于预测的像素的位置,产生当前块的预测图像。Inter prediction: According to the pixels in the reference frame of the current block, the position of the pixels used for prediction in the reference frame is indicated by the motion vector to generate a predicted image of the current block.
双向预测(B)片:可以使用帧内预测或帧间预测用最多两个运动矢量和参考索引预测每个块的样本值而解码的片。Bidirectional prediction (B) slice: A slice that can be decoded using intra prediction or inter prediction to predict the sample value of each block with up to two motion vectors and reference indexes.
CTU:编码树单元(coding tree unit),一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域,包含这个图像区域中的亮度像素和色度像素(或者也可以只包含亮度像素,或者也可以只包含色度像素);CTU中还包含语法元素,这些语法元素指示如何将CTU划分成至少一个编码单元(coding unit,CU),以及解码每个编码单元得到重建图像的方 法。CTU: coding tree unit (coding tree unit). An image is composed of multiple CTUs. A CTU usually corresponds to a square image area, which contains the luma pixels and chroma pixels in this image area (or it can only include luma pixels). (Or may also include only chroma pixels); the CTU also contains syntax elements, which indicate how to divide the CTU into at least one coding unit (coding unit, CU), and a method of decoding each coding unit to obtain a reconstructed image.
CU:编码单元,对应于图像中一个A×B的矩形区域,包含A×B亮度像素或/和它对应的色度像素,A为矩形的宽,B为矩形的高,A和B可以相同也可以不同,A和B的取值通常为2的整数次幂,例如128、64、32、16、8、4。一个编码单元包含预测图像和残差图像,预测图像与残差图像相加得到编码单元的重建图像。预测图像通过帧内预测或帧间预测生成,残差图像通过对变换系数进行反量化和反变换处理生成。CU: coding unit, corresponding to an A × B rectangular area in the image, including A × B brightness pixels or / and its corresponding chroma pixels, A is the width of the rectangle, B is the height of the rectangle, and A and B can be the same It can also be different. The values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, and 4. A coding unit includes a predicted image and a residual image, and the predicted image and the residual image are added to obtain a reconstructed image of the coding unit. The predicted image is generated by intra prediction or inter prediction, and the residual image is generated by inverse quantization and inverse transform processing of the transform coefficients.
VTM:JVET组织开发的新式编解码器参考软件。VTM: New codec reference software developed by the JVET organization.
融合编码(merge):一种帧间编码编码方式,其运动矢量不直接在码流中传递。当前块可根据融合序号(merge index)从融合候选列表(merge candidate list)中选择对应的融合候选,将融合候选的运动信息作为当前块的运动信息,或者对融合候选的运动信息经过缩放后作为当前块的运动信息。Fusion coding (merge): An inter-frame coding method in which motion vectors are not directly transmitted in the code stream. The current block can select the corresponding fusion candidate from the merge candidate list according to the merge index, and use the motion information of the fusion candidate as the motion information of the current block, or scale the motion information of the fusion candidate as the motion information of the fusion candidate. Motion information of the current block.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
图1为本申请实施例中视频编码及解码系统10的一种示意性框图。如图1中所展示,系统10包含源装置12,源装置12产生将在稍后时间由目的地装置14解码的经编码视频数据。源装置12及目的地装置14可包括广泛范围的装置中的任一者,包含桌上型计算机、笔记型计算机、平板计算机、机顶盒、例如所谓的“智能”电话的电话手机、所谓的“智能”触控板、电视、摄影机、显示装置、数字媒体播放器、视频游戏控制台、视频流式传输装置或类似者。在一些应用中,源装置12及目的地装置14可经装备以用于无线通信。FIG. 1 is a schematic block diagram of a video encoding and
目的地装置14可经由链路16接收待解码的经编码视频数据。链路16可包括能够将经编码视频数据从源装置12移动到目的地装置14的任何类型的媒体或装置。在一个可行的实施方式中,链路16可包括使源装置12能够实时将经编码视频数据直接传输到目的地装置14的通信媒体。可根据通信标准(例如,无线通信协议)调制经编码视频数据且将其传输到目的地装置14。通信媒体可包括任何无线或有线通信媒体,例如射频频谱或一个或多个物理传输线。通信媒体可形成基于包的网络(例如,局域网、广域网或因特网的全球网络)的部分。通信媒体可包含路由器、交换器、基站或可有用于促进从源装置12到目的地装置14的通信的任何其它装备。The
替代地,可将经编码数据从输出接口22输出到存储装置24。类似地,可由输入接口从存储装置24存取经编码数据。存储装置24可包含多种分散式或本地存取的数据存储媒体中的任一者,例如,硬盘驱动器、蓝光光盘、DVD、CD-ROM、快闪存储器、易失性或非易失性存储器或用于存储经编码视频数据的任何其它合适的数字存储媒体。在另一可行的实施方式中,存储装置24可对应于文件服务器或可保持由源装置12产生的经编码视频的另一中间存储装置。目的地装置14可经由流式传输或下载从存储装置24存取所存储视频数据。文件服务器可为能够存储经编码视频数据且将此经编码视频数据传输到目的地装置14的任何类型的服务器。可行的实施方式文件服务器包含网站服务器、文件传送协议服务器、网络附 接存储装置或本地磁盘机。目的地装置14可经由包含因特网连接的任何标准数据连接存取经编码视频数据。此数据连接可包含适合于存取存储于文件服务器上的经编码视频数据的无线信道(例如,Wi-Fi连接)、有线连接(例如,缆线调制解调器等)或两者的组合。经编码视频数据从存储装置24的传输可为流式传输、下载传输或两者的组合。Alternatively, the encoded data may be output from the
本申请的技术不必限于无线应用或设定。技术可应用于视频解码以支持多种多媒体应用中的任一者,例如,空中电视广播、有线电视传输、卫星电视传输、流式传输视频传输(例如,经由因特网)、编码数字视频以用于存储于数据存储媒体上、解码存储于数据存储媒体上的数字视频或其它应用。在一些可行的实施方式中,系统10可经配置以支持单向或双向视频传输以支持例如视频流式传输、视频播放、视频广播和/或视频电话的应用。The techniques of this application are not necessarily limited to wireless applications or settings. The technology can be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding digital video for use in Digital video or other applications stored on a data storage medium and decoded on the data storage medium. In some feasible implementations, the
在图1的可行的实施方式中,源装置12包含视频源18、视频编码器20及输出接口22。在一些应用中,输出接口22可包含调制器/解调制器(调制解调器)和/或传输器。在源装置12中,视频源18可包含例如以下各者的源:视频捕获装置(例如,摄像机)、含有先前捕获的视频的视频存档、用以从视频内容提供者接收视频的视频馈入接口,和/或用于产生计算机图形数据作为源视频的计算机图形系统,或这些源的组合。作为一种可行的实施方式,如果视频源18为摄像机,那么源装置12及目的装置14可形成所谓的摄影机电话或视频电话。本申请中所描述的技术可示例性地适用于视频解码,且可适用于无线和/或有线应用。In the feasible embodiment of FIG. 1, the
可由视频编码器20来编码所捕获、预捕获或计算机产生的视频。经编码视频数据可经由源装置12的输出接口22直接传输到目的地装置14。经编码视频数据也可(或替代地)存储到存储装置24上以供稍后由目的地装置14或其它装置存取以用于解码和/或播放。Captured, pre-captured, or computer-generated video may be encoded by
目的地装置14包含输入接口28、视频解码器30及显示装置32。在一些应用中,输入接口28可包含接收器和/或调制解调器。目的地装置14的输入接口28经由链路16接收经编码视频数据。经由链路16传达或提供于存储装置24上的经编码视频数据可包含由视频编码器20产生以供视频解码器30的视频解码器使用以解码视频数据的多种语法元素。这些语法元素可与在通信媒体上传输、存储于存储媒体上或存储于文件服务器上的经编码视频数据包含在一起。The
显示装置32可与目的地装置14集成或在目的地装置14外部。在一些可行的实施方式中,目的地装置14可包含集成显示装置且也经配置以与外部显示装置接口连接。在其它可行的实施方式中,目的地装置14可为显示装置。一般来说,显示装置32向用户显示经解码视频数据,且可包括多种显示装置中的任一者,例如液晶显示器、等离子显示器、有机发光二极管显示器或另一类型的显示装置。The
视频编码器20及视频解码器30可根据例如目前在开发中的下一代视频编解码压缩标准(H.266)操作且可遵照H.266测试模型(JEM)。替代地,视频编码器20及视频解码器30可根据例如ITU-TH.265标准,也称为高效率视频解码标准,或者,ITU-TH.264标准的其它专属或工业标准或这些标准的扩展而操作,ITU-TH.264标准替代地被称为MPEG-4第10部分,也称高级视频编码(advanced video coding,AVC)。然而,本申请的技术不限于任何特定解码标准。视频压缩标准的其它可行的实施方式包含MPEG-2和ITU-TH.263。
尽管未在图1中展示,但在一些方面中,视频编码器20及视频解码器30可各自与音频编码器及解码器集成,且可包含适当多路复用器-多路分用器(MUX-DEMUX)单元或其它硬件及软件以处置共同数据流或单独数据流中的音频及视频两者的编码。如果适用,那么在一些可行的实施方式中,MUX-DEMUX单元可遵照ITUH.223多路复用器协议或例如用户数据报协议(UDP)的其它协议。Although not shown in FIG. 1, in some
视频编码器20及视频解码器30各自可实施为多种合适编码器电路中的任一者,例如,一个或多个微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、离散逻辑、软件、硬件、固件或其任何组合。在技术部分地以软件实施时,装置可将软件的指令存储于合适的非暂时性计算机可读媒体中且使用一个或多个处理器以硬件执行指令,以执行本申请的技术。视频编码器20及视频解码器30中的每一者可包含于一个或多个编码器或解码器中,其中的任一者可在相应装置中集成为组合式编码器/解码器(CODEC)的部分。
本申请示例性地可涉及视频编码器20将特定信息“用信号发送”到例如视频解码器30的另一装置。然而,应理解,视频编码器20可通过将特定语法元素与视频数据的各种经编码部分相关联来用信号发送信息。即,视频编码器20可通过将特定语法元素存储到视频数据的各种经编码部分的头信息来“用信号发送”数据。在一些应用中,这些语法元素可在通过视频解码器30接收及解码之前经编码及存储(例如,存储到存储系统34或文件服务器36)。因此,术语“用信号发送”示例性地可指语法或用于解码经压缩视频数据的其它数据的传达,而不管此传达是实时或近实时地发生或在时间跨度内发生,例如可在编码时将语法元素存储到媒体时发生,语法元素接着可在存储到此媒体之后的任何时间通过解码装置检索。The present application may, by way of example, relate to
JCT-VC开发了H.265(HEVC)标准。HEVC标准化基于称作HEVC测试模型(HM)的视频解码装置的演进模型。H.265的最新标准文档可从http://www.itu.int/rec/T-REC-H.265获得,最新版本的标准文档为H.265(12/16),该标准文档以全文引用的方式并入本文中。HM假设视频解码装置相对于ITU-TH.264/AVC的现有算法具有若干额外能力。例如,H.264提供9种帧内预测编码模式,而HM可提供多达35种帧内预测编码模式。JCT-VC has developed the H.265 (HEVC) standard. The HEVC standardization is based on an evolution model of a video decoding device called a HEVC test model (HM). The latest standard document of H.265 can be obtained from http://www.itu.int/rec/T-REC-H.265. The latest version of the standard document is H.265 (12/16). The standard document is in full text. The citation is incorporated herein. HM assumes that video decoding devices have several additional capabilities over existing algorithms of ITU-TH.264 / AVC. For example, H.264 provides 9 intra-prediction encoding modes, while HM provides up to 35 intra-prediction encoding modes.
JVET致力于开发H.266标准。H.266标准化的过程基于称作H.266测试模型的视频解码装置的演进模型。H.266的算法描述可从http://phenix.int-evry.fr/jvet获得,其中最新的算法描述包含于JVET-F1001-v2中,该算法描述文档以全文引用的方式并入本文中。同时,可从https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/获得JEM测试模型的参考软件,同样以全文引用的方式并入本文中。JVET is committed to developing the H.266 standard. The process of H.266 standardization is based on the evolution model of the video decoding device called the H.266 test model. The algorithm description of H.266 can be obtained from http://phenix.int-evry.fr/jvet. The latest algorithm description is included in JVET-F1001-v2. The algorithm description document is incorporated herein by reference in its entirety. . At the same time, the reference software for the JEM test model can be obtained from https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/, which is also incorporated herein by reference in its entirety.
一般来说,HM的工作模型描述可将视频帧或图像划分成包含亮度及色度样本两者的树块或最大编码单元(largest coding unit,LCU)的序列,LCU也被称为CTU。树块具有与H.264标准的宏块类似的目的。条带包含按解码次序的数个连续树块。可将视频帧或图像分割成一个或多个条带。可根据四叉树将每一树块分裂成编码单元。例如,可将作为四叉树的根节点的树块分裂成四个子节点,且每一子节点可又为母节点且被分裂成另外四个子节点。 作为四叉树的叶节点的最终不可分裂的子节点包括解码节点,例如,经解码视频块。与经解码码流相关联的语法数据可定义树块可分裂的最大次数,且也可定义解码节点的最小大小。Generally speaking, the working model description of HM can divide a video frame or image into a sequence of tree blocks or maximum coding units (LCUs) containing both luminance and chrominance samples. LCUs are also known as CTUs. The tree block has a similar purpose as the macro block of the H.264 standard. A slice contains several consecutive tree blocks in decoding order. A video frame or image can be split into one or more slices. Each tree block can be split into coding units according to a quadtree. For example, a tree block that is a root node of a quad tree may be split into four child nodes, and each child node may be a parent node and split into another four child nodes. The final indivisible child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded video blocks. The syntax data associated with the decoded codestream can define the maximum number of times a tree block can be split, and can also define the minimum size of a decoding node.
编码单元包含解码节点及预测单元(prediction unit,PU)以及与解码节点相关联的变换单元(transform unit,TU)。CU的大小对应于解码节点的大小且形状必须为正方形。CU的大小的范围可为8×8像素直到最大64×64像素或更大的树块的大小。每一CU可含有一个或多个PU及一个或多个TU。例如,与CU相关联的语法数据可描述将CU分割成一个或多个PU的情形。分割模式在CU是被跳过或经直接模式编码、帧内预测模式编码或帧间预测模式编码的情形之间可为不同的。PU可经分割成形状为非正方形。例如,与CU相关联的语法数据也可描述根据四叉树将CU分割成一个或多个TU的情形。TU的形状可为正方形或非正方形。The coding unit includes a decoding node and a prediction unit (PU) and a transformation unit (TU) associated with the decoding node. The size of the CU corresponds to the size of the decoding node and the shape must be square. The size of the CU can range from 8 × 8 pixels to a maximum 64 × 64 pixels or larger tree block size. Each CU may contain one or more PUs and one or more TUs. For example, the syntax data associated with a CU may describe a case where a CU is partitioned into one or more PUs. The partitioning mode may be different between cases where the CU is skipped or is encoded in direct mode, intra prediction mode, or inter prediction mode. The PU can be divided into non-square shapes. For example, the syntax data associated with a CU may also describe a case where a CU is partitioned into one or more TUs according to a quadtree. The shape of the TU can be square or non-square.
HEVC标准允许根据TU进行变换,TU对于不同CU来说可为不同的。TU通常基于针对经分割LCU定义的给定CU内的PU的大小而设定大小,但情况可能并非总是如此。TU的大小通常与PU相同或小于PU。在一些可行的实施方式中,可使用称作“残差四叉树”(residual qualtree,RQT)的四叉树结构将对应于CU的残差样本再分成较小单元。RQT的叶节点可被称作TU。可变换与TU相关联的像素差值以产生变换系数,变换系数可被量化。The HEVC standard allows transformation based on the TU, which can be different for different CUs. The TU is usually sized based on the size of the PUs within a given CU defined for the partitioned LCU, but this may not always be the case. The size of the TU is usually the same as or smaller than the PU. In some feasible implementations, a quad-tree structure called “residual quad tree” (RQT) can be used to subdivide the residual samples corresponding to the CU into smaller units. The leaf node of RQT may be called TU. The pixel difference values associated with the TU may be transformed to produce a transformation coefficient, which may be quantized.
一般来说,PU包含与预测过程有关的数据。例如,在PU经帧内模式编码时,PU可包含描述PU的帧内预测模式的数据。作为另一可行的实施方式,在PU经帧间模式编码时,PU可包含界定PU的运动矢量的数据。例如,界定PU的运动矢量的数据可描述运动矢量的水平分量、运动矢量的垂直分量、运动矢量的分辨率(例如,四分之一像素精确度或八分之一像素精确度)、运动矢量所指向的参考图像,和/或运动矢量的参考图像列表(例如,列表0、列表1或列表C)。Generally speaking, the PU contains data related to the prediction process. For example, when a PU is intra-mode encoded, the PU may include data describing the intra-prediction mode of the PU. As another feasible implementation manner, when the PU is inter-mode encoded, the PU may include data defining a motion vector of the PU. For example, the data defining the motion vector of the PU may describe the horizontal component of the motion vector, the vertical component of the motion vector, the resolution of the motion vector (e.g., quarter-pixel accuracy or eighth-pixel accuracy), motion vector The reference image pointed to, and / or the reference image list of the motion vector (eg,
一般来说,TU使用变换及量化过程。具有一个或多个PU的给定CU也可包含一个或多个TU。在预测之后,视频编码器20可计算对应于PU的残差值。残差值包括像素差值,像素差值可变换成变换系数、经量化且使用TU扫描以产生串行化变换系数以用于熵解码。本申请通常使用术语“视频块”来指CU的解码节点。在一些特定应用中,本申请也可使用术语“视频块”来指包含解码节点以及PU及TU的树块,例如,LCU或CU。Generally, TU uses transform and quantization processes. A given CU with one or more PUs may also contain one or more TUs. After prediction,
视频序列通常包含一系列视频帧或图像。图像群组(group of picture,GOP)示例性地包括一系列、一个或多个视频图像。GOP可在GOP的头信息中、图像中的一者或多者的头信息中或在别处包含语法数据,语法数据描述包含于GOP中的图像的数目。图像的每一条带可包含描述相应图像的编码模式的条带语法数据。视频编码器20通常对个别视频条带内的视频块进行操作以便编码视频数据。视频块可对应于CU内的解码节点。视频块可具有固定或变化的大小,且可根据指定解码标准而在大小上不同。A video sequence usually contains a series of video frames or images. A group of pictures (GOP) exemplarily includes a series, one or more video pictures. The GOP may include syntax data in the header information of the GOP, the header information of one or more of the pictures, or elsewhere, and the syntax data describes the number of pictures included in the GOP. Each slice of the image may contain slice syntax data describing the coding mode of the corresponding image.
作为一种可行的实施方式,HM支持各种PU大小的预测。假定特定CU的大小为2N×2N,HM支持2N×2N或N×N的PU大小的帧内预测,及2N×2N、2N×N、N×2N或N×N的对称PU大小的帧间预测。HM也支持2N×nU、2N×nD、nL×2N及nR×2N的PU大小的帧间预测的不对称分割。在不对称分割中,CU的一方向未分割,而另一方向分割成25%及75%。对应于25%区 段的CU的部分由“n”后跟着“上(Up)”、“下(Down)”、“左(Left)”或“右(Right)”的指示来指示。因此,例如,“2N×nU”指水平分割的2N×2NCU,其中2N×0.5NPU在上部且2N×1.5NPU在底部。As a feasible implementation, HM supports prediction of various PU sizes. Assuming the size of a specific CU is 2N × 2N, HM supports intra prediction of PU sizes of 2N × 2N or N × N, and symmetric PU sizes of 2N × 2N, 2N × N, N × 2N, or N × N between frames prediction. HM also supports asymmetric partitioning of PU-sized inter predictions of 2N × nU, 2N × nD, nL × 2N, and nR × 2N. In asymmetric partitioning, one direction of the CU is not partitioned, and the other direction is partitioned into 25% and 75%. The portion of the CU corresponding to the 25% zone is indicated by an indication of "n" followed by "Up", "Down", "Left" or "Right". Therefore, for example, “2N × nU” refers to a horizontally divided 2N × 2NCU, where 2N × 0.5NPU is at the top and 2N × 1.5NPU is at the bottom.
在本申请中,“N×N”与“N乘N”可互换使用以指依照垂直维度及水平维度的视频块的像素尺寸,例如,16×16像素或16乘16像素。一般来说,16×16块将在垂直方向上具有16个像素(y=16),且在水平方向上具有16个像素(x=16)。同样地,N×N块一股在垂直方向上具有N个像素,且在水平方向上具有N个像素,其中N表示非负整数值。可将块中的像素排列成行及列。此外,块未必需要在水平方向上与在垂直方向上具有相同数目个像素。例如,块可包括N×M个像素,其中M未必等于N。In this application, “N × N” and “N times N” are used interchangeably to refer to the pixel size of a video block according to vertical and horizontal dimensions, for example, 16 × 16 pixels or 16 × 16 pixels. In general, a 16 × 16 block will have 16 pixels (y = 16) in the vertical direction and 16 pixels (x = 16) in the horizontal direction. Similarly, an N × N block has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value. Pixels in a block can be arranged in rows and columns. In addition, the block does not necessarily need to have the same number of pixels in the horizontal direction as in the vertical direction. For example, a block may include N × M pixels, where M is not necessarily equal to N.
在使用CU的PU的帧内预测性或帧间预测性解码之后,视频编码器20可计算CU的TU的残差数据。PU可包括空间域(也称作像素域)中的像素数据,且TU可包括在将变换(例如,离散余弦变换(discrete cosine transform,DCT)、整数变换、小波变换或概念上类似的变换)应用于残差视频数据之后变换域中的系数。残差数据可对应于未经编码图像的像素与对应于PU的预测值之间的像素差。视频编码器20可形成包含CU的残差数据的TU,且接着变换TU以产生CU的变换系数。After the intra-predictive or inter-predictive decoding of the PU using the CU, the
在任何变换以产生变换系数之后,视频编码器20可执行变换系数的量化。量化示例性地指对系数进行量化以可能减少用以表示系数的数据的量从而提供进一步压缩的过程。量化过程可减少与系数中的一些或全部相关联的位深度。例如,可在量化期间将n位值降值舍位到m位值,其中n大于m。After any transform to generate transform coefficients,
JEM模型对视频图像的编码结构进行了进一步的改进,具体的,被称为“四叉树结合二叉树”(QTBT)的块编码结构被引入进来。QTBT结构摒弃了HEVC中的CU,PU,TU等概念,支持更灵活的CU划分形状,一个CU可以正方形,也可以是长方形。一个CTU首先进行四叉树划分,该四叉树的叶节点进一步进行二叉树划分。同时,在二叉树划分中存在两种划分模式,对称水平分割和对称竖直分割。二叉树的叶节点被称为CU,JEM的CU在预测和变换的过程中都不可以被进一步划分,也就是说JEM的CU,PU,TU具有相同的块大小。在现阶段的JEM中,CTU的最大尺寸为256×256亮度像素。The JEM model further improves the coding structure of video images. Specifically, a block coding structure called "Quad Tree Combined with Binary Tree" (QTBT) is introduced. The QTBT structure abandons the concepts of CU, PU, and TU in HEVC, and supports more flexible CU division shapes. A CU can be square or rectangular. A CTU first performs a quadtree partition, and the leaf nodes of the quadtree further perform a binary tree partition. At the same time, there are two partitioning modes in binary tree partitioning, symmetrical horizontal partitioning and symmetrical vertical partitioning. The leaf nodes of a binary tree are called CUs. JEM's CUs cannot be further divided during the prediction and transformation process, which means that JEM's CU, PU, and TU have the same block size. In the current JEM, the maximum size of the CTU is 256 × 256 luminance pixels.
在一些可行的实施方式中,视频编码器20可利用预定义扫描次序来扫描经量化变换系数以产生可经熵编码的串行化向量。在其它可行的实施方式中,视频编码器20可执行自适应性扫描。在扫描经量化变换系数以形成一维向量之后,视频编码器20可根据上下文自适应性可变长度解码(CAVLC)、上下文自适应性二进制算术解码(CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或其他熵解码方法来熵解码一维向量。视频编码器20也可熵编码与经编码视频数据相关联的语法元素以供视频解码器30用于解码视频数据。In some feasible implementations,
为了执行CABAC,视频编码器20可将上下文模型内的上下文指派给待传输的符号。上下文可与符号的相邻值是否为非零有关。为了执行CAVLC,视频编码器20可选择待传输的符号的可变长度码。可变长度解码(VLC)中的码字可经构建以使得相对较短码对应于可能性较大 的符号,而较长码对应于可能性较小的符号。以这个方式,VLC的使用可相对于针对待传输的每一符号使用相等长度码字达成节省码率的目的。基于指派给符号的上下文可以确定CABAC中的概率。To perform CABAC,
在本申请实施例中,视频编码器可执行帧间预测以减少图像之间的时间冗余。如前文所描述,根据不同视频压缩编解码标准的规定,CU可具有一个或多个预测单元PU。换句话说,多个PU可属于CU,或者PU和CU的尺寸相同。在本文中当CU和PU尺寸相同时,CU的分割模式为不分割,或者即为分割为一个PU,且统一使用PU进行表述。当视频编码器执行帧间预测时,视频编码器可用信号通知视频解码器用于PU的运动信息。示例性的,PU的运动信息可以包括:参考图像索引、运动矢量和预测方向标识。运动矢量可指示PU的图像块(也称视频块、像素块、像素集合等)与PU的参考块之间的位移。PU的参考块可为类似于PU的图像块的参考图像的一部分。参考块可定位于由参考图像索引和预测方向标识指示的参考图像中。In the embodiment of the present application, the video encoder may perform inter prediction to reduce temporal redundancy between images. As described above, a CU may have one or more prediction units PU according to the provisions of different video compression codec standards. In other words, multiple PUs may belong to a CU, or PUs and CUs are the same size. In this article, when the size of the CU and the PU are the same, the CU's partitioning mode is not divided, or it is divided into one PU, and the PU is uniformly used for expression. When the video encoder performs inter prediction, the video encoder may signal the video decoder motion information for the PU. Exemplarily, the motion information of the PU may include: a reference image index, a motion vector, and a prediction direction identifier. A motion vector may indicate a displacement between an image block (also called a video block, a pixel block, a pixel set, etc.) of a PU and a reference block of the PU. The reference block of the PU may be a part of the reference picture similar to the image block of the PU. The reference block may be located in a reference image indicated by a reference image index and a prediction direction identifier.
为了减少表示PU的运动信息所需要的编码比特的数目,视频编码器可根据合并预测模式或高级运动矢量预测模式过程产生用于PU中的每一者的候选运动信息列表(后文简称为候选者列表)。用于PU的候选者列表中的每一候选者可表示一组运动信息。运动信息可包括运动矢量MV和参考图像指示信息。当然,运动信息也可以只包含两者之一或者全部包含,例如在编解码端共同约定参考图像的情况下,运动信息可以仅包含运动矢量。由候选列表中的一些候选者表示的运动信息可基于其它PU的运动信息。如果候选者表示指定空间候选者位置(spatial candidate positions)或时间候选者位置(temporal candidate positions)中的一者的运动信息,则本申请可将所述候选者称作“原始”候选运动信息。举例来说,对于合并模式,在本文中也称为合并预测模式,可存在五个原始空间候选者位置和一个原始时间候选者位置。在一些实例中,视频编码器还可以通过一些手段来产生附加或额外候选运动信息,例如插入零运动矢量作为候选运动信息来产生额外候选运动信息。这些额外候选运动信息不被视为原始候选运动信息且在本申请中可称作后期或人工产生的候选运动信息。In order to reduce the number of coding bits required to represent the motion information of the PU, the video encoder may generate a candidate motion information list (hereinafter simply referred to as candidate List). Each candidate in the candidate list for a PU may represent a set of motion information. The motion information may include motion vector MV and reference image indication information. Of course, the motion information may also include only one or both of them. For example, in a case where a reference image is jointly agreed upon by a codec, the motion information may only include a motion vector. The motion information represented by some candidates in the candidate list may be based on the motion information of other PUs. If the candidate represents motion information specifying one of the spatial candidate positions (temporal candidate positions) or temporal candidate positions (temporal candidate positions), this application may refer to the candidate as "original" candidate motion information. For example, for a merge mode, also referred to herein as a merge prediction mode, there may be five original spatial candidate positions and one original temporal candidate position. In some examples, the video encoder may also generate additional or additional candidate motion information by some means, such as inserting zero motion vectors as candidate motion information to generate additional candidate motion information. These additional candidate motion information are not considered as original candidate motion information and may be referred to as post- or artificially generated candidate motion information in this application.
本申请的技术一般涉及用于在视频编码器处产生候选者列表的技术和用于在视频解码器处产生相同候选者列表的技术。视频编码器和视频解码器可通过实施用于构建候选者列表的相同技术来产生相同候选者列表。举例来说,视频编码器和视频解码器两者可构建具有相同数目的候选者(例如,五个候选者)的列表。视频编码器和解码器可首先考虑空间候选者(例如,同一图像中的相邻块),接着考虑时间候选者(例如,不同图像中的候选者),且最后可考虑人工产生的候选者直到将所要数目的候选者添加到列表为止。根据本申请的技术,可在候选列表构建期间针对某些类型的候选运动信息利用修剪操作以便从候选列表移除重复,而对于其它类型的候选者,可能不使用修剪以便减小解码器复杂性。举例来说,对于空间候选者集合和对于时间候选者,可执行修剪操作以从候选者的列表排除具有重复运动信息的候选者。The techniques of this application generally relate to a technique for generating a candidate list at a video encoder and a technique for generating the same candidate list at a video decoder. Video encoders and video decoders can produce the same candidate list by implementing the same techniques used to build the candidate list. For example, both a video encoder and a video decoder may build a list with the same number of candidates (e.g., five candidates). Video encoders and decoders may first consider spatial candidates (e.g., neighboring blocks in the same image), then consider temporal candidates (e.g., candidates in different images), and finally consider artificially generated candidates until Add the desired number of candidates to the list. According to the techniques of this application, a pruning operation may be utilized during candidate list construction for certain types of candidate motion information to remove duplicates from the candidate list, while for other types of candidates, pruning may not be used in order to reduce decoder complexity . For example, for a set of spatial candidates and for a temporal candidate, a pruning operation may be performed to exclude candidates with duplicate motion information from the list of candidates.
在产生用于CU的PU的候选列表之后,视频编码器可从候选列表选择候选运动信息且 在码流中输出表示所选择的候选运动信息的索引标识。选择的候选运动信息可为具有产生最紧密地匹配正被解码的PU的预测块的运动信息。前述索引标识可指示在候选列表中所选择的候选运动信息的位置。视频编码器还可基于由PU的运动信息指示的参考块产生用于PU的预测块。可基于由选择的候选运动信息确定PU的运动信息。举例来说,在合并模式中,确定选择的候选运动信息即为PU的运动信息。在AMVP模式中,PU的运动信息可基于PU的运动矢量差和选择的候选运动信息确定。视频编码器可基于CU的PU的预测性图像块(简称为预测块)和用于CU的原始图像块产生用于CU的一个或多个残差图像块(简称为残差块)。视频编码器可接着编码一个或多个残差块且输出码流。After generating a candidate list for the PU of the CU, the video encoder may select candidate motion information from the candidate list and output an index identifier representing the selected candidate motion information in a code stream. The selected candidate motion information may be motion information having a prediction block that produces the closest match to the PU being decoded. The aforementioned index identifier may indicate a position of the candidate motion information selected in the candidate list. The video encoder may also generate a prediction block for the PU based on a reference block indicated by the motion information of the PU. The motion information of the PU may be determined based on the selected candidate motion information. For example, in the merge mode, it is determined that the selected candidate motion information is the motion information of the PU. In the AMVP mode, motion information of a PU may be determined based on a motion vector difference of the PU and selected candidate motion information. The video encoder may generate one or more residual image blocks (referred to as residual blocks) for the CU based on the predictive image blocks (referred to as prediction blocks) of the PU of the CU and the original image blocks for the CU. The video encoder may then encode one or more residual blocks and output a code stream.
码流可包括用于识别PU的候选列表中的选定候选运动信息的数据。视频解码器可基于由PU的候选列表中的选定候选运动信息确定PU的运动信息。视频解码器可基于PU的运动信息识别用于PU的一或多个参考块。在识别PU的一或多个参考块之后,视频解码器可基于PU的一或多个参考块产生用于PU的预测块。视频解码器可基于用于CU的PU的预测块和用于CU的一个或多个残差块来重构用于CU的图像块。The code stream may include data for identifying selected candidate motion information in a candidate list of the PU. The video decoder may determine the motion information of the PU based on the selected candidate motion information in the candidate list of the PU. The video decoder may identify one or more reference blocks for the PU based on the motion information of the PU. After identifying one or more reference blocks of the PU, the video decoder may generate a prediction block for the PU based on the one or more reference blocks of the PU. The video decoder may reconstruct an image block for a CU based on a prediction block of the PU for the CU and one or more residual blocks for the CU.
为了易于解释,本申请可将位置或图像块描述为与CU或PU具有各种空间关系。此描述可解释为是指位置或图像块和与CU或PU相关联的图像块具有各种空间关系。此外,本申请可将视频解码器当前在解码的PU称作当前PU,也称为当前待处理图像块。本申请可将视频解码器当前在解码的CU称作当前CU。本申请可将视频解码器当前在解码的图像称作当前图像。应理解,本申请同时适用于PU和CU具有相同尺寸,或者PU即为CU的情况,统一使用PU来表示。For ease of explanation, the present application may describe a position or an image block as having various spatial relationships with a CU or a PU. This description can be interpreted to mean that the position or image block and the image block associated with the CU or PU have various spatial relationships. In addition, in this application, a PU currently being decoded by a video decoder may be referred to as a current PU, and may also be referred to as a current image block to be processed. This application may refer to the CU that the video decoder is currently decoding as the current CU. This application may refer to the image currently being decoded by the video decoder as the current image. It should be understood that this application is applicable to a case where the PU and the CU have the same size, or the PU is the CU, and the PU is used to represent the same.
如前文简短地描述,视频编码器20可使用帧间预测以产生用于CU的PU的预测块和运动信息。在一些例子中,PU的运动信息可能与一个或多个邻近PU(即,其图像块在空间上或时间上在该PU的图像块附近的PU)的运动信息相同或类似。因为邻近PU经常具有类似运动信息,所以视频编码器20可参考邻近PU的运动信息来编码该PU的运动信息。参考邻近PU的运动信息来编码该PU的运动信息可减少码流中指示该PU的运动信息所需要的编码比特的数目。As briefly described previously,
视频编码器20可以各种方式参考邻近PU的运动信息来编码该PU的运动信息。举例来说,视频编码器20可指示该PU的运动信息与附近PU的运动信息相同。本申请可使用合并模式来指代指示该PU的运动信息与邻近PU的运动信息相同或可从邻近PU的运动信息导出。在另一可行的实施方式中,视频编码器20可计算用于该PU的运动矢量差(Motion Vector Difference,MVD)。MVD指示该PU的运动矢量与邻近PU的运动矢量之间的差。视频编码器20可将MVD而非该PU的运动矢量包括于该PU的运动信息中。在码流中表示MVD比表示该PU的运动矢量所需要的编码比特少。本申请可使用高级运动矢量预测模式指代通过使用MVD和识别候选者(即候选运动信息)的索引值来通知解码端该PU的运动信息。
为了使用合并模式或AMVP模式以信号通知解码端该PU的运动信息,视频编码器20可产生用于该PU的候选列表。候选列表可包括一或多个候选者(即一组或多组候选运动信息)。用于该PU的候选列表中的每一个候选者表示一组运动信息。一组运动信息可包括运动矢量、 参考图像列表和与参考图像列表对应的参考图像索引。In order to use the merge mode or the AMVP mode to signal the decoding side's motion information of the PU, the
在产生用于PU的候选列表之后,视频编码器20可从用于PU的候选列表中选择多个候选者中的一者。举例来说,视频编码器可比较每一候选者与正被解码的PU且可选择具有所要求的码率-失真代价的候选者。视频编码器20可输出用于PU的候选者索引。候选者索引可识别选定的候选者在候选列表中的位置。After generating the candidate list for the PU, the
此外,视频编码器20可基于由PU的运动信息指示的参考块产生用于PU的预测块。可基于由用于PU的候选列表中的选定的候选运动信息确定PU的运动信息。In addition, the
当视频解码器30接收到码流时,视频解码器30可产生用于CU的PU中的每一者的候选列表。由视频解码器30针对PU产生的候选列表可与由视频编码器20针对PU产生的候选列表相同。从码流中解析得到的语法元素可指示在PU的候选列表中选择的候选运动信息的位置。在产生用于PU的候选列表之后,视频解码器30可基于由PU的运动信息指示的一或多个参考块产生用于PU的预测块。视频解码器30可基于在用于PU的候选列表中选择的候选运动信息确定PU的运动信息。视频解码器30可基于用于PU的预测块和用于CU的残差块重构用于CU的图像块。When
应当理解,在一种可行的实施方式中,在解码端,候选列表的构建与从码流中解析选择的候选者在候选列表中的位置是相互独立,可以任意先后或者并行进行的。It should be understood that, in a feasible implementation manner, at the decoding end, the construction of the candidate list and the positions of the candidates selected from the code stream parsing in the candidate list are independent of each other and may be performed in any order or in parallel.
在另一种可行的实施方式中,在解码端,首先从码流中解析选定的候选者在候选列表中的位置,根据解析出来的位置构建候选列表,在该实施方式中,不需要构建全部的候选列表,只需要构建到该解析出来的位置处的候选列表,即能够确定该位置处的候选者即可。举例来说,当解析码流得出选定的候选者为候选列表中索引标识为3的候选者时,仅需要构建从索引为0到索引为3的候选列表,即可确定索引标识为3的候选者,可以达到减小复杂度,提高解码效率的技术效果。In another feasible implementation manner, at the decoding end, the position of the selected candidate in the candidate list is first parsed from the code stream, and the candidate list is constructed according to the parsed position. In this implementation manner, no construction is required. For all candidate lists, only the candidate list at the parsed position needs to be constructed, that is, the candidate at the position can be determined. For example, when the selected stream is obtained by parsing the code stream, the candidate with the index ID of 3 in the candidate list needs to be constructed only from the candidate list with the index of 0 to 3 to determine the index of the candidate The candidate can achieve the technical effect of reducing complexity and improving decoding efficiency.
图2为本申请实施例中视频编码器20的一种示意性框图。视频编码器20可执行视频条带内的视频块的帧内解码和帧间解码。帧内解码依赖于空间预测来减少或去除给定视频帧或图像内的视频的空间冗余。帧间解码依赖于时间预测来减少或去除视频序列的邻近帧或图像内的视频的时间冗余。帧内模式(I模式)可指若干基于空间的压缩模式中的任一者。例如单向预测(P模式)或双向预测(B模式)等帧间模式可指若干基于时间的压缩模式中的任一者。FIG. 2 is a schematic block diagram of a
在图2的可行的实施方式中,视频编码器20包含分割单元35、预测单元41、参考图像存储器64、求和器50、变换处理单元52、量化单元54和熵编码单元56。预测单元41包含帧间预测单元43和帧内预测单元46。帧间预测单元43可以包括运动估计单元42和运动补偿单元44。对于视频块重构建,视频编码器20也可包含反量化单元58、反变换单元60和求和器(亦称为重建器)62。也可包含解块滤波器(图2中未展示)以对块边界进行滤波从而从经重构建视频中去除块效应伪影。在需要时,解块滤波器将通常对求和器62的输出进行滤波。除了解块滤波器之外,也可使用额外环路滤波器(环路内或环路后)。In the feasible embodiment of FIG. 2, the
如图2中所展示,视频编码器20接收视频数据,且分割单元35将数据分割成视频块。此 分割也可包含分割成条带、图像块或其它较大单元,以及(例如)根据LCU及CU的四叉树结构进行视频块分割。视频编码器20示例性地说明编码在待编码的视频条带内的视频块的组件。一般来说,条带可划分成多个视频块(且可能划分成称作图像块的视频块的集合)。As shown in FIG. 2, the
预测单元41可基于编码质量与代价计算结果(例如,码率-失真代价,RDcost)选择当前视频块的多个可能解码模式中的一者,例如多个帧内解码模式中的一者或多个帧间解码模式中的一者。预测单元41可将所得经帧内解码或经帧间解码块提供到求和器50以产生残差块数据且将所得经帧内解码或经帧间解码块提供到求和器62以重构建经编码块从而用作参考图像。The prediction unit 41 may select one of a plurality of possible decoding modes of the current video block, such as one or more of a plurality of intra decoding modes, based on the encoding quality and the cost calculation result (for example, code rate-distortion cost, RDcost). One of the inter-frame decoding modes. The prediction unit 41 may provide the obtained intra decoded or inter decoded block to the
预测单元41内的帧间预测单元43(例如运动估计单元42及运动补偿单元44)执行相对于一个或多个参考图像中的一个或多个预测块的当前视频块的帧间预测性解码以提供时间压缩。运动估计单元42用于根据视频序列的预定模式确定视频条带的帧间预测模式。预定模式可将序列中的视频条带指定为P条带、B条带或GPB条带。运动估计单元42及运动补偿单元44可高度集成,这里为方便理解概念而分别说明。通过运动估计单元42所执行的运动估计以产生估计视频块(亦称为图像块)的运动矢量的过程。例如,运动矢量可指示当前视频帧或图像内的视频块的PU相对于参考图像内的预测块的位移。The inter prediction unit 43 (such as the
预测块为依据像素差而被发现为紧密匹配待解码的视频块的PU的块,像素差可通过绝对差和(SAD)、平方差和(SSD)或其它差度量确定。在一些可行的实施方式中,视频编码器20可计算存储于参考图像存储器64中的参考图像的子整数(sub-integer)像素位置的值。例如,视频编码器20可内插参考图像的四分之一像素位置、八分之一像素位置或其它分数像素位置的值。因此,运动估计单元42可执行相对于全像素位置及分数像素位置的运动搜索且输出具有分数像素精确度的运动矢量。The prediction block is a block that is found to closely match the PU of the video block to be decoded according to the pixel difference, and the pixel difference may be determined by a sum of absolute differences (SAD), a sum of squared differences (SSD), or other differences. In some feasible implementations, the
运动估计单元42通过比较PU的位置与参考图像的预测块的位置而计算经帧间解码条带中的视频块的PU的运动矢量。可从第一参考图像列表(列表0)或第二参考图像列表(列表1)选择参考图像,列表中的每一者识别存储于参考图像存储器64中的一个或多个参考图像。运动估计单元42将经计算运动矢量发送到熵编码单元56及运动补偿单元44。The
由运动补偿单元44执行的运动补偿可涉及基于由运动估计所确定的运动矢量提取或产生预测块。在接收当前视频块的PU的运动矢量后,运动补偿单元44即可在参考图像列表中的一者中定位运动矢量所指向的预测块。视频编码器20通过从正解码的当前视频块的像素值减去预测块的像素值来形成残差视频块,从而形成像素差值。像素差值形成块的残差数据,且可包含亮度及色度差分量两者。求和器50表示执行此减法运算的一个或多个组件。运动补偿单元44也可产生与视频块及视频条带相关联的语法元素以供视频解码器30用于解码视频条带的视频块。Motion compensation performed by the
如果PU位于B条带中,则含有PU的图像可与称作“列表0”和“列表1”的两个参考图像列表相关联。在一些可行的实施方式中,含有B条带的图像可与为列表0和列表1的组合的列表组合相关联。If the PU is located in the B slice, the picture containing the PU may be associated with two reference picture lists called "
此外,如果PU位于B条带中,则运动估计单元42可针对PU执行单向预测或双向预测, 其中,在一些可行的实施方式中,双向预测为分别基于列表0和列表1的参考图像列表的图像进行的预测,在另一些可行的实施方式中,双向预测为分别基于当前帧在显示顺序上的已重建的未来帧和已重建的过去帧进行的预测。当运动估计单元42针对PU执行单向预测时,运动估计单元42可在列表0或列表1的参考图像中搜索用于PU的参考块。运动估计单元42可接着产生指示列表0或列表1中的含有参考块的参考图像的参考帧索引和指示PU与参考块之间的空间位移的运动矢量。运动估计单元42可输出参考帧索引、预测方向标识和运动矢量作为PU的运动信息。预测方向标识可指示参考帧索引指示列表0或列表1中的参考图像。例如预测方向标识1指示列表list0,预测方向标识2指示列表list1,预测方向标识3指示双向预测,即list0和list1。运动补偿单元44可基于由PU的运动信息指示的参考块产生PU的预测性图像块。In addition, if the PU is located in the B slice, the
当运动估计单元42针对PU执行双向预测时,运动估计单元42可在列表0中的参考图像中搜索用于PU的参考块且还可在列表1中的参考图像中搜索用于PU的另一参考块。运动估计单元42可接着产生指示列表0和列表1中的含有参考块的参考图像的参考索引和指示参考块与PU之间的空间位移的运动矢量。运动估计单元42可输出PU的参考索引和运动矢量作为PU的运动信息。运动补偿单元44可基于由PU的运动信息指示的参考块产生PU的预测性图像块。When the
在一些可行的实施方式中,运动估计单元42不向熵编码单元56输出用于PU的运动信息的完整集合。而是,运动估计单元42可参考另一PU的运动信息来用信号通知PU的运动信息。举例来说,运动估计单元42可确定PU的运动信息充分类似于相邻PU的运动信息。在此实施方式中,运动估计单元42可在与PU相关联的语法结构中指示一个指示值,所述指示值向视频解码器30指示PU具有与相邻PU相同的运动信息或具有可从相邻PU导出的运动信息。在另一实施方式中,运动估计单元42可在与PU相关联的语法结构中识别与相邻PU相关联的候选者和运动矢量差(MVD)。MVD指示PU的运动矢量和与相邻PU相关联的所指示候选者之间的差。视频解码器30可使用所指示候选者和MVD来确定PU的运动矢量。In some feasible implementations, the
如前文所描述,预测单元41可产生用于CU的每一PU的候选者列表。候选者列表中的一或多者可包括一组或多组原始候选运动信息和从原始候选运动信息导出的一组或多组附加候选运动信息。As described above, the prediction unit 41 may generate a candidate list for each PU of the CU. One or more of the candidate list may include one or more sets of original candidate motion information and one or more sets of additional candidate motion information derived from the original candidate motion information.
预测单元41内的帧内预测单元46可执行相对于在与待解码的当前块相同的图像或条带中的一个或多个相邻块的当前视频块的帧内预测性解码以提供空间压缩。因此,作为通过运动估计单元42及运动补偿单元44执行的帧间预测(如前文所描述)的替代,帧内预测单元46可帧内预测当前块。具体地说,帧内预测单元46可确定用以编码当前块的帧内预测模式。在一些可行的实施方式中,帧内预测单元46可(例如)在单独编码遍历期间使用各种帧内预测模式来编码当前块,且帧内预测单元46(或在一些可行的实施方式中,模式选择单元40)可从经测试模式选择使用的适当帧内预测模式。The
在预测单元41经由帧间预测或帧内预测产生当前视频块的预测块之后,视频编码器20通过从当前视频块减去预测块而形成残差视频块。残差块中的残差视频数据可包含于一个 或多个TU中且应用于变换处理单元52。变换处理单元52使用例如离散余弦变换(DCT)或概念上类似的变换的变换(例如,离散正弦变换DST)将残差视频数据变换成残差变换系数。变换处理单元52可将残差视频数据从像素域转换到变换域(例如,频域)。After the prediction unit 41 generates a prediction block of the current video block via inter prediction or intra prediction, the
变换处理单元52可将所得变换系数发送到量化单元54。量化单元54对变换系数进行量化以进一步减小码率。量化过程可减少与系数中的一些或全部相关联的比特深度。可通过调整量化参数来修改量化的程度。在一些可行的实施方式中,量化单元54可接着执行包含经量化变换系数的矩阵的扫描。替代地,熵编码单元56可执行扫描。The transformation processing unit 52 may send the obtained transformation coefficient to the quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the code rate. The quantization process may reduce the bit depth associated with some or all of the coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some feasible implementations, the quantization unit 54 may then perform a scan of a matrix containing the quantized transform coefficients. Alternatively, the entropy encoding unit 56 may perform scanning.
在量化之后,熵编码单元56可熵编码经量化变换系数。例如,熵编码单元56可执行上下文自适应性可变长度解码(CAVLC)、上下文自适应性二进制算术解码(CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或另一熵编码方法或技术。熵编码单元56也可熵编码正经解码的当前视频条带的运动矢量及其它语法元素。在通过熵编码单元56进行熵编码之后,可将经编码码流传输到视频解码器30或存档以供稍后传输或由视频解码器30检索。After quantization, the entropy encoding unit 56 may entropy encode the quantized transform coefficients. For example, the entropy encoding unit 56 may perform context adaptive variable length decoding (CAVLC), context adaptive binary arithmetic decoding (CABAC), syntax-based context adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy ( PIPE) decoding or another entropy coding method or technique. The entropy encoding unit 56 may also entropy encode the motion vector and other syntax elements of the current video slice being decoded. After entropy encoding by the entropy encoding unit 56, the encoded code stream may be transmitted to the
熵编码单元56可编码根据本申请的技术指示选定帧内预测模式的信息。视频编码器20可在可包含多个帧内预测模式索引表和多个经修改帧内预测模式索引表(也称作码字映射表)的所传输码流配置数据中包含各种块的编码上下文的定义及用于上下文中的每一者的MPM、帧内预测模式索引表和经修改帧内预测模式索引表的指示。The entropy encoding unit 56 may encode information indicating a selected intra prediction mode according to the techniques of the present application.
反量化单元58及反变换单元60分别应用反量化及反变换,以在像素域中重构建残差块以供稍后用作参考图像的参考块。运动补偿单元44可通过将残差块与参考图像列表中的一者内的参考图像中的一者的预测块相加来计算重建块。运动补偿单元44也可将一个或多个内插滤波器应用于经重构建残差块以计算子整数像素值以用于运动估计。求和器62将经重构建残差块与通过运动补偿单元44所产生的经运动补偿的预测块相加以产生重建块,所述重建块作为参考块以供存储于参考图像存储器64中。参考块可由运动估计单元42及运动补偿单元44用作参考块以帧间预测后续视频帧或图像中的块。The inverse quantization unit 58 and the inverse transform unit 60 respectively apply inverse quantization and inverse transform to reconstruct a residual block in the pixel domain for later use as a reference block of a reference image. The
应当理解的是,视频编码器20的其它的结构变化可用于编码视频流。例如,对于某些图像块或者图像帧,视频编码器20可以直接地量化残差信号而不需要经变换单元52处理,相应地也不需要经反变换单元60处理;或者,对于某些图像块或者图像帧,视频编码器20没有产生残差数据,相应地不需要经变换单元52、量化单元54、反量化单元58和反变换单元60处理;或者,视频编码器20可以将经重构图像块作为参考块直接地进行存储而不需要经滤波器单元处理;或者,视频编码器20中量化单元54和反量化单元58可以合并在一起。环路滤波单元是可选的,以及针对无损压缩编码的情况下,变换单元52、量化单元54、反量化单元58和反变换单元60是可选的。应当理解的是,根据不同的应用场景,帧间预测单元和帧内预测单元可以是被选择性的启用,而在本案中,帧间预测单元被启用。It should be understood that other structural changes of the
图3为本申请实施例中视频解码器30的一种示意性框图。在图3的可行的实施方式中,视频解码器30包含熵编码单元80、预测单元81、反量化单元86、反变换单元88、求和器90 (即重建器)和参考图像存储器92。一种变型下,参考图像存储器92亦可以设置在视频解码器30之外。预测单元81包括帧间预测单元82和帧内预测单元84。帧间预测单元82,例如可以是运动补偿单元82。在一些可行的实施方式中,视频解码器30可执行与关于来自图4A或图4B的视频编码器20描述的编码流程的示例性地互逆的解码流程。FIG. 3 is a schematic block diagram of a
在解码过程期间,视频解码器30从视频编码器20接收表示经编码视频条带的视频块及相关联的语法元素的经编码视频码流。视频解码器30的熵编码单元80熵解码码流以产生经量化系数、运动矢量及其它语法元素。熵编码单元80将运动矢量及其它语法元素转递到预测单元81。视频解码器30可在视频条带层级和/或视频块层级处接收语法元素。During the decoding process,
在视频条带经解码为经帧内解码(I)条带时,预测单元81的帧内预测单元84可基于用信号发送的帧内预测模式及来自当前帧或图像的先前经解码块的数据而产生当前视频条带的视频块的预测数据。When a video slice is decoded into an intra-decoded (I) slice, the
在视频图像经解码为经帧间解码(例如,B、P或GPB)条带时,预测单元81的运动补偿单元82基于从熵编码单元80所接收的运动矢量及其它语法元素而产生当前视频图像的视频块的预测块。预测块可从参考图像列表中的一者内的参考图像中的一者产生。视频解码器30可基于存储于参考图像存储器92中的参考图像使用默认构建技术来构建参考图像列表(列表0及列表1)。When the video image is decoded into inter-decoded (eg, B, P, or GPB) slices, the
运动补偿单元82通过解析运动矢量及其它语法元素来确定当前视频条带的视频块的预测信息,且使用预测信息来产生正经解码的当前视频块的预测块。例如,运动补偿单元82使用所接收的语法元素中的一些来确定用以解码视频条带的视频块的预测模式(例如,帧内预测或帧间预测)、帧间预测条带类型(例如,B条带、P条带或GPB条带)、条带的参考图像列表中的一者或多者的构建信息、条带的每一经帧间编码视频块的运动矢量、条带的每一经帧间解码视频块的帧间预测状态及用以解码当前视频条带中的视频块的其它信息。The
运动补偿单元82也可基于内插滤波器执行内插。运动补偿单元82可使用如由视频编码器20在视频块的编码期间所使用的内插滤波器来计算参考块的子整数像素的内插值。在此应用中,运动补偿单元82可从所接收的语法元素确定由视频编码器20使用的内插滤波器且使用内插滤波器来产生预测块。The
如果PU是使用帧间预测而编码,则运动补偿单元82可产生用于PU的候选者列表。码流中可包括识别选定候选者在PU的候选者列表中的位置的数据。在产生用于PU的候选者列表之后,运动补偿单元82可基于由PU的运动信息指示的一或多个参考块产生用于PU的预测性图像块。PU的参考块可在与所述PU不同的时间图像中。运动补偿单元82可基于由PU的候选者列表中的选定的运动信息确定PU的运动信息。If the PU is encoded using inter prediction, the
反量化单元86对码流中所提供且通过熵编码单元80所解码的经量化变换系数进行反量化(例如,解量化)。反量化过程可包含使用通过视频编码器20针对视频条带中的每一视频块所计算的量化参数确定量化的程度,且同样地确定应应用的反量化的程度。反变换单元88将反变换(例如,反DCT、反整数变换或概念上类似的反变换过程)应用于变换系数以便在像素域中产生残差块。The
在运动补偿单元82基于运动矢量及其它语法元素产生当前视频块的预测块之后,视频解码器30通过将来自反变换单元88的残差块与通过运动补偿单元82产生的对应预测块求和来形成经解码视频块。求和器90(即重建器)表示执行此求和运算的一个或多个组件。在需要时,也可应用解块滤波器来对经解码块进行滤波以便去除块效应伪影。其它环路滤波器(在解码环路中或在解码环路之后)也可用以使像素转变平滑,或以其它方式改进视频质量。给定帧或图像中的经解码视频块接着存储于参考图像存储器92中,参考图像存储器92存储供后续运动补偿所使用的参考图像。参考图像存储器92也存储供稍后呈现于例如图1的显示装置32的显示装置上的经解码视频。After the
如前文所注明,本申请的技术示例性地涉及帧间解码。应理解,本申请的技术可通过本申请中所描述的视频解码器中的任一者进行,视频解码器包含(例如)如关于图1到3所展示及描述的视频编码器20及视频解码器30。即,在一种可行的实施方式中,关于图2所描述的预测单元41可在视频数据的块的编码期间在执行帧间预测时执行下文中所描述的特定技术。在另一可行的实施方式中,关于图3所描述的预测单元81可在视频数据的块的解码期间在执行帧间预测时执行下文中所描述的特定技术。因此,对一般性“视频编码器”或“视频解码器”的引用可包含视频编码器20、视频解码器30或另一视频编码或编码单元。As noted previously, the techniques of this application exemplarily involve inter-frame decoding. It should be understood that the techniques of this application may be performed by any of the video decoders described in this application. The video decoder includes, for example,
应当理解的是,视频解码器30的其它结构变化可用于解码经编码视频位流。例如,视频解码器30可以不经滤波单元处理而生成输出视频流;或者,对于某些图像块或者图像帧,视频解码器30的熵解码单元80没有解码出经量化的系数,相应地不需要经反量化单元86和反变换单元88处理。环路滤波单元是可选的;以及针对无损压缩的情况下,反量化单元86和反变换单元88是可选的。应当理解的是,根据不同的应用场景,帧间预测单元和帧内预测单元可以是被选择性的启用,而在本案中,帧间预测单元被启用。It should be understood that other structural variations of
图4A为本申请实施例中融合(Merge)模式的一种示例性流程图。视频编码器(例如视频编码器20)可执行合并操作200。在其它可行的实施方式中,视频编码器可执行不同于合并操作200的合并操作。举例来说,在其它可行的实施方式中,视频编码器可执行合并操作,其中视频编码器执行比合并操作200多、少的步骤或与合并操作200不同的步骤。在其它可行的实施方式中,视频编码器可以不同次序或并行地执行合并操作200的步骤。编码器还可对以跳跃(skip)模式编码的PU执行合并操作200。FIG. 4A is an exemplary flowchart of a merge mode in an embodiment of the present application. A video encoder (eg, video encoder 20) may perform a
在视频编码器开始合并操作200之后,视频编码器可产生用于当前PU的候选者列表(202)。视频编码器可以各种方式产生用于当前PU的候选者列表。举例来说,视频编码器可根据下文关于图7到图13描述的实例技术中的一者产生用于当前PU的候选者列表。After the video encoder starts the
如前文所述,用于当前PU的候选者列表可包括时间候选运动信息(简称时间候选者)。时间候选运动信息可指示时域对应(co-located)的PU的运动信息。co-located的PU可在空间上与当前PU处于图像帧中的同一个位置,但在参考图像而非当前图像中。本申请可将包括时域对应的PU的参考图像称作相关参考图像。本申请可将相关参考图像的参考图像 索引称作相关参考图像索引。如前文所描述,当前图像可与一个或多个参考图像列表(例如,列表0、列表1等)相关联。参考图像索引可通过指示参考图像在某一个参考图像列表中的位置来指示参考图像。在一些可行的实施方式中,当前图像可与组合参考图像列表相关联。As mentioned above, the candidate list for the current PU may include temporal candidate motion information (referred to as temporal candidate). The temporal candidate motion information may indicate motion information of a co-located PU in the time domain. A co-located PU may be spatially in the same position in the image frame as the current PU, but in a reference picture instead of the current picture. In this application, a reference picture including a PU corresponding to the time domain may be referred to as a related reference picture. A reference image index of a related reference image may be referred to as a related reference image index in this application. As described previously, the current image may be associated with one or more reference image lists (eg,
在一些视频编码器中,相关参考图像索引为涵盖与当前PU相关联的参考索引源位置的PU的参考图像索引。在这些视频编码器中,与当前PU相关联的参考索引源位置邻接于当前PU左方或邻接于当前PU上方。在本申请中,如果与PU相关联的图像块包括特定位置,则PU可“涵盖”所述特定位置。In some video encoders, the related reference picture index is the reference picture index of the PU covering the reference index source position associated with the current PU. In these video encoders, the reference index source location associated with the current PU is adjacent to the left of the current PU or above the current PU. In this application, if an image block associated with a PU includes a specific location, the PU may "cover" the specific location.
然而,可存在以下例子:与当前PU相关联的参考索引源位置在当前CU内。在这些例子中,如果PU在当前CU上方或左方,则涵盖与当前PU相关联的参考索引源位置的PU可被视为可用。然而,视频编码器可需要存取当前CU的另一PU的运动信息以便确定含有co-located PU的参考图像。因此,这些视频编码器可使用属于当前CU的PU的运动信息(即,参考图像索引)以产生用于当前PU的时间候选者。换句话说,这些视频编码器可使用属于当前CU的PU的运动信息产生时间候选者。因此,视频编码器不能并行地产生用于当前PU和涵盖与当前PU相关联的参考索引源位置的PU的候选者列表。However, there may be examples where the reference index source location associated with the current PU is within the current CU. In these examples, if the PU is above or to the left of the current CU, the PU covering the reference index source location associated with the current PU may be considered available. However, the video encoder may need to access motion information of another PU of the current CU in order to determine a reference picture containing a co-located PU. Therefore, these video encoders may use motion information (ie, a reference picture index) of a PU belonging to the current CU to generate a temporal candidate for the current PU. In other words, these video encoders may use temporal information of PUs belonging to the current CU to generate temporal candidates. Therefore, the video encoder cannot generate a candidate list for a current PU and a PU covering a reference index source position associated with the current PU in parallel.
根据本申请的技术,视频编码器可在不参考任何其它PU的参考图像索引的情况下显式地设定相关参考图像索引。此可使得视频编码器能够并行地产生用于当前PU和当前CU的其它PU的候选者列表。因为视频编码器显式地设定相关参考图像索引,所以相关参考图像索引不基于当前CU的任何其它PU的运动信息。在视频编码器显式地设定相关参考图像索引的一些可行的实施方式中,视频编码器可始终将相关参考图像索引设定为固定的预定义预设参考图像索引(例如0)。以此方式,视频编码器可基于由预设参考图像索引指示的参考帧中的co-located PU的运动信息产生时间候选者,且可将时间候选者包括于当前CU的候选者列表中。According to the technology of the present application, the video encoder may explicitly set the relevant reference picture index without referring to the reference picture index of any other PU. This may enable the video encoder to generate candidate lists for the current PU and other PUs of the current CU in parallel. Because the video encoder explicitly sets the relevant reference picture index, the relevant reference picture index is not based on the motion information of any other PU of the current CU. In some feasible implementations where the video encoder explicitly sets the relevant reference picture index, the video encoder may always set the relevant reference picture index to a fixed, predefined preset reference picture index (eg, 0). In this way, the video encoder may generate a time candidate based on the motion information of the co-located PU in the reference frame indicated by the preset reference picture index, and may include the time candidate in the candidate list of the current CU.
在视频编码器显式地设定相关参考图像索引的可行的实施方式中,视频编码器可显式地在语法结构(例如图像标头、条带标头、APS或另一语法结构)中用信号通知相关参考图像索引。在此可行的实施方式中,视频编码器可用信号通知解码端用于每一LCU(即CTU)、CU、PU、TU或其它类型的子块的相关参考图像索引。举例来说,视频编码器可用信号通知:用于CU的每一PU的相关参考图像索引等于“1”。In a feasible implementation where the video encoder explicitly sets the relevant reference picture index, the video encoder may be explicitly used in a syntax structure (e.g., image header, slice header, APS, or another syntax structure) The related reference picture index is signaled. In this feasible implementation manner, the video encoder may signal the decoder to the relevant reference picture index for each LCU (ie, CTU), CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the relevant reference picture index for each PU of the CU is equal to "1".
在一些可行的实施方式中,相关参考图像索引可经隐式地而非显式地设定。在这些可行的实施方式中,视频编码器可使用由涵盖当前CU外部的位置的PU的参考图像索引指示的参考图像中的PU的运动信息产生用于当前CU的PU的候选者列表中的每一时间候选者,即使这些位置并不严格地邻近当前PU。In some feasible implementations, the relevant reference image index may be set implicitly rather than explicitly. In these feasible implementations, the video encoder may use the motion information of the PU in the reference picture indicated by the reference picture index of the PU covering the location outside the current CU to generate each candidate list for the PU of the current CU. A time candidate, even if these locations are not strictly adjacent to the current PU.
在产生用于当前PU的候选者列表之后,视频编码器可产生与候选者列表中的候选者相关联的预测性图像块(204)。视频编码器可通过基于所指示候选者的运动信息确定当前PU的运动信息和接着基于由当前PU的运动信息指示的一个或多个参考块产生预测性图像块来产生与候选者相关联的预测性图像块。视频编码器可从候选者列表选择候选者中的一者(206)。视频编码器可以各种方式选择候选者。举例来说,视频编码器可基于对与候选者相 关联的预测性图像块的每一者的码率-失真代价分析来选择候选者中的一者。After generating the candidate list for the current PU, the video encoder may generate predictive image blocks associated with the candidates in the candidate list (204). The video encoder may generate a prediction associated with the candidate by determining motion information of the current PU based on the motion information of the indicated candidate and then generating a predictive image block based on one or more reference blocks indicated by the motion information of the current PU. Sexual image blocks. The video encoder may select one of the candidates from the candidate list (206). Video encoders can select candidates in various ways. For example, a video encoder may select one of the candidates based on a rate-distortion cost analysis of each of the predictive image blocks associated with the candidate.
在选择候选者之后,视频编码器可输出候选者的索引(208)。该索引可指示选定候选者在候选者列表中的位置。在一些可行的实施方式中,该索引可表示为“merge_idx”。After selecting the candidate, the video encoder may output the candidate's index (208). The index may indicate the position of the selected candidate in the candidate list. In some feasible implementations, this index may be represented as "merge_idx".
图4B为本申请实施例中高级运动矢量预测(AMVP)模式的一种示例性流程图。视频编码器(例如视频编码器20)可执行AMVP操作210。FIG. 4B is an exemplary flowchart of an advanced motion vector prediction (AMVP) mode in an embodiment of the present application. A video encoder (eg, video encoder 20) may perform
在视频编码器开始AMVP操作210之后,视频编码器可产生用于当前PU的一个或多个运动矢量(211)。视频编码器可执行整数运动估计和分数运动估计以产生用于当前PU的运动矢量。如前文所描述,当前图像可与两个参考图像列表(列表0和列表1)相关联。如果当前PU经单向预测,则视频编码器可产生用于当前PU的列表0运动矢量或列表1运动矢量。列表0运动矢量可指示当前PU的图像块与列表0中的参考图像中的参考块之间的空间位移。列表1运动矢量可指示当前PU的图像块与列表1中的参考图像中的参考块之间的空间位移。如果当前PU经双向预测,则视频编码器可产生用于当前PU的列表0运动矢量和列表1运动矢量。After the video encoder starts
在产生用于当前PU的一个或多个运动矢量之后,视频编码器可产生用于当前PU的预测性图像块(简称为预测块)(212)。视频编码器可基于由用于当前PU的一个或多个运动矢量指示的一个或多个参考块产生用于当前PU的预测性图像块。After generating one or more motion vectors for the current PU, the video encoder may generate predictive image blocks (referred to simply as prediction blocks) for the current PU (212). The video encoder may generate predictive image blocks for the current PU based on one or more reference blocks indicated by one or more motion vectors for the current PU.
另外,视频编码器可产生用于当前PU的候选列表(213)。视频解码器可以各种方式产生用于当前PU的候选预测运动矢量列表。举例来说,视频编码器可根据下文关于图6到图13描述的可行的实施方式中的一个或多个产生用于当前PU的候选列表。在一些可行的实施方式中,当视频编码器在AMVP操作210中产生候选列表时,候选预测运动矢量列表可包括两个或三个候选预测运动矢量。相比而言,当视频编码器在合并操作中产生候选预测运动矢量列表时,候选预测运动矢量列表可包括更多候选预测运动矢量(例如,五个或七个候选预测运动矢量)。In addition, the video encoder may generate a candidate list for the current PU (213). The video decoder may generate a list of candidate prediction motion vectors for the current PU in various ways. For example, the video encoder may generate a candidate list for the current PU according to one or more of the possible implementations described below with respect to FIGS. 6 to 13. In some feasible implementations, when the video encoder generates a candidate list in the
在产生用于当前PU的候选列表之后,视频编码器可产生用于候选列表中的每一候选预测运动矢量的一个或多个运动矢量预测残差值(亦称为运动矢量差MVD)(214)。视频编码器可通过确定由候选预测运动矢量指示的运动矢量与当前PU的对应运动矢量之间的差来产生用于候选预测运动矢量的运动矢量差。After generating a candidate list for the current PU, the video encoder may generate one or more motion vector prediction residual values (also known as motion vector difference MVD) for each candidate prediction motion vector in the candidate list (214 ). The video encoder may generate a motion vector difference for the candidate prediction motion vector by determining a difference between the motion vector indicated by the candidate prediction motion vector and a corresponding motion vector of the current PU.
如果当前PU经单向预测,则视频编码器可产生用于每一候选预测运动矢量的单一MVD。如果当前PU经双向预测,则视频编码器可产生用于每一候选预测运动矢量的两个MVD。第一MVD可指示候选预测运动矢量的运动矢量与当前PU的列表0运动矢量之间的差。第二MVD可指示候选预测运动矢量的运动矢量与当前PU的列表1运动矢量之间的差。If the current PU is unidirectionally predicted, the video encoder may generate a single MVD for each candidate prediction motion vector. If the current PU is bi-predicted, the video encoder may generate two MVDs for each candidate prediction motion vector. The first MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the
视频编码器可从候选预测运动矢量列表选择候选预测运动矢量中的一个或多个(215)。视频编码器可以各种方式选择一个或多个候选预测运动矢量。举例来说,视频编码器可选择具有最小误差地匹配待编码的运动矢量的相关联运动矢量的候选预测运动矢量,此可减少表示用于候选预测运动矢量的运动矢量差所需的位数目。The video encoder may select one or more of the candidate prediction motion vectors from the candidate prediction motion vector list (215). The video encoder may select one or more candidate prediction motion vectors in various ways. For example, a video encoder may select a candidate prediction motion vector with an associated motion vector that matches the motion vector to be encoded with minimal error, which may reduce the number of bits required to represent the motion vector difference for the candidate prediction motion vector.
在选择一个或多个候选预测运动矢量之后,视频编码器可输出用于当前PU的一个或多个参考图像索引、一个或多个候选预测运动矢量索引,和用于一个或多个选定候选预测运动矢量的一个或多个运动矢量差(216)。After selecting one or more candidate prediction motion vectors, the video encoder may output one or more reference image indexes for the current PU, one or more candidate prediction motion vector indexes, and one or more selected candidate motion vectors. One or more motion vector differences of the predicted motion vector (216).
在当前图像与两个参考图像列表(列表0和列表1)相关联且当前PU经单向预测的例子中,视频编码器可输出用于列表0的参考图像索引(“ref_idx_10”)或用于列表1的参考图像索引(“ref_idx_11”)。视频编码器还可输出指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_10_flag”)。或者,视频编码器可输出指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_11_flag”)。视频编码器还可输出用于当前PU的列表0运动矢量或列表1运动矢量的MVD。In examples where the current picture is associated with two reference picture lists (
在当前图像与两个参考图像列表(列表0和列表1)相关联且当前PU经双向预测的例子中,视频编码器可输出用于列表0的参考图像索引(“ref_idx_10”)和用于列表1的参考图像索引(“ref_idx_11”)。视频编码器还可输出指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_10_flag”)。另外,视频编码器可输出指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_11_flag”)。视频编码器还可输出用于当前PU的列表0运动矢量的MVD和用于当前PU的列表1运动矢量的MVD。In the example where the current picture is associated with two reference picture lists (
图5为本申请实施例中由视频解码器(例如视频解码器30)执行的运动补偿的一种示例性流程图。FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder (such as video decoder 30) in an embodiment of the present application.
当视频解码器执行运动补偿操作220时,视频解码器可接收用于当前PU的选定候选者的指示(222)。举例来说,视频解码器可接收指示选定候选者在当前PU的候选者列表内的位置的候选者索引。When the video decoder performs
如果当前PU的运动信息是使用融合merge模式进行编码且当前PU经双向预测,则视频解码器可接收第一候选者索引和第二候选者索引。第一候选者索引指示用于当前PU的列表0运动矢量的选定候选者在候选者列表中的位置。第二候选者索引指示用于当前PU的列表1运动矢量的选定候选者在候选者列表中的位置。在一些可行的实施方式中,单一语法元素可用以识别两个候选者索引。If the motion information of the current PU is encoded using a merge merge mode and the current PU is bidirectionally predicted, the video decoder may receive the first candidate index and the second candidate index. The first candidate index indicates the position of the selected candidate for the
另外,视频解码器可产生用于当前PU的候选者列表(224)。视频解码器可以各种方式产生用于当前PU的此候选者列表。举例来说,视频解码器可使用下文参看图6到图10描述的技术来产生用于当前PU的候选者列表。当视频解码器产生用于候选者列表的时间候选者时,视频解码器可显式地或隐式地设定识别包括co-located PU的参考图像的参考图像索引,如前文关于图4A或图4B所描述。In addition, the video decoder may generate a candidate list for the current PU (224). The video decoder can generate this candidate list for the current PU in various ways. For example, the video decoder may use the techniques described below with reference to FIGS. 6 to 10 to generate a candidate list for the current PU. When the video decoder generates a temporal candidate for the candidate list, the video decoder may explicitly or implicitly set a reference image index identifying a reference image including a co-located PU, as described above with reference to FIG. 4A or FIG. 4B.
在产生用于当前PU的候选者列表之后,视频解码器可基于由用于当前PU的候选者列 表中的一个或多个选定候选者指示的运动信息确定当前PU的运动信息(225)。举例来说,如果当前PU的运动信息是使用合并模式而编码,则当前PU的运动信息可与由选定候选者指示的运动信息相同。如果当前PU的运动信息是使用AMVP模式而编码,则视频解码器可使用由所述或所述选定候选者指示的一个或多个运动矢量和码流中指示的一个或多个MVD来重建当前PU的一个或多个运动矢量。当前PU的参考图像索引和预测方向标识可与所述一个或多个选定候选者的参考图像索引和预测方向标识相同。在确定当前PU的运动信息之后,视频解码器可基于由当前PU的运动信息指示的一个或多个参考块产生用于当前PU的预测性图像块(226)。After generating the candidate list for the current PU, the video decoder may determine the motion information of the current PU based on the motion information indicated by one or more selected candidates in the candidate list for the current PU (225). For example, if the motion information of the current PU is encoded using a merge mode, the motion information of the current PU may be the same as the motion information indicated by the selected candidate. If the motion information of the current PU is encoded using AMVP mode, the video decoder may reconstruct using one or more MVDs indicated in the one or more motion vectors and code streams indicated by the or the selected candidate. One or more motion vectors of the current PU. The reference image index and prediction direction identifier of the current PU may be the same as the reference image index and prediction direction identifier of the one or more selected candidates. After determining the motion information of the current PU, the video decoder may generate a predictive image block for the current PU based on one or more reference blocks indicated by the motion information of the current PU (226).
图6为本申请实施例中当前图像块(例如编码单元CU)、与其关联的空域邻近图像块以及时域邻近图像块的一种示例性示意图,说明CU600和与CU600相关联的示意性的候选者位置1到10的示意图。候选者位置1到5表示与CU600在同一图像中的空间候选者。候选者位置1定位于CU600左方。候选者位置2定位于CU600上方。候选者位置3定位于CU600右上方。候选者位置4定位于CU600左下方。候选者位置5定位于CU600左上方。候选者位置6到7表示与CU600的co-located块602相关联的时间候选者,其中co-located块为在参考图像(即临近已编码图像)中与CU600具有相同的大小、形状和坐标的图像块。候选者位置6位于co-located块602的右下角。候选者位置7定位于co-located块602右下中间位置,或者或者co-located块602左上中间位置。图6为用以提供帧间预测单元(例如具体是运动估计单元42或运动补偿单元82)可产生候选者列表的候选者位置的示意性实施方式。图6的候选者位置1至5为用以提供帧内预测单元可产生候选者列表的候选者位置的示意性实施方式。FIG. 6 is an exemplary schematic diagram of a current image block (such as a coding unit CU), a spatial neighboring image block, and a temporal neighboring image block associated with the current image block (such as the coding unit CU) in the embodiment of the present application, illustrating CU600 and schematic candidates associated with CU600 Schematic diagram of
需要说明的是,图6中空间候选者位置和时间候选者位置仅仅是示意,候选者位置包括但不限于此。在一些可行的实施方式中,空间候选者位置示例性的还可以包括与待处理图像块相距预设距离以内,但不与待处理图像块邻接的位置。It should be noted that the spatial candidate position and the temporal candidate position in FIG. 6 are merely schematic, and the candidate positions include, but are not limited to, this. In some feasible implementation manners, the positions of the spatial candidates may also include, for example, positions within a preset distance from the image block to be processed, but not adjacent to the image block to be processed.
本申请实施例不仅适用于合并预测模式(Merge)和/或高级运动矢量预测模式(advanced motion vector prediction,AMVP),而且也能适用于其它使用空域参考块和/或时域参考块的运动信息对当前图像块的运动信息进行预测的模式,从而提高编解码性能。The embodiment of the present application is not only applicable to merge prediction mode (Merge) and / or advanced motion vector prediction mode (advanced motion vector prediction) (AMVP), but also applicable to other motion information using spatial reference blocks and / or time domain reference blocks. A mode for predicting motion information of a current image block, thereby improving codec performance.
图7为本申请实施例中基于历史候选列表(亦称为历史候选表table)的图像编码方法的一种示例性流程图。所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已编码图像块的运动信息,该方法的执行主体可以是视频编码器(例如视频编码器20)或具有视频编码功能的电子设备(例如设备1200、1300),该方法可以包括以下步骤:FIG. 7 is an exemplary flowchart of an image encoding method based on a historical candidate list (also referred to as a historical candidate table) in an embodiment of the present application. The historical candidate list includes one or more historical candidate motion information. The historical candidate motion information is motion information of a previously encoded image block. The method may be performed by a video encoder (such as video encoder 20) or For electronic devices with video encoding functions (for example, devices 1200, 1300), the method may include the following steps:
S701、根据率失真代价准则,确定当前编码图像块的帧间预测模式;S701. Determine an inter prediction mode of a current coded image block according to a rate distortion cost criterion;
例如,从候选帧间预测模式的集合中选择率失真代价最小的帧间预测模式作为当前编 码图像块的帧间预测模式;For example, an inter prediction mode with the lowest rate-distortion cost is selected from a set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
S703、基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程得到当前编码图像块的运动信息;S703: Perform an inter prediction process on the current coded image block based on the inter prediction mode of the current coded image block to obtain motion information of the current coded image block.
换言之,基于所述当前编码图像块的帧间预测模式对当前编码图像块执行编码处理,可以参见现有技术,这里不再赘述;In other words, performing an encoding process on the currently-encoded image block based on the inter prediction mode of the currently-encoded image block may refer to the prior art, and details are not described herein again;
S705、根据当前编码图像块的帧间预测模式,使用当前编码图像块的运动信息对所述历史候选列表进行更新;S705. Update the historical candidate list using the motion information of the currently encoded image block according to the inter prediction mode of the currently encoded image block.
S707、将用于指示所述当前编码图像块的帧间预测模式的语法元素编入码流。S707. Program a syntax element used to indicate an inter prediction mode of the currently-encoded image block into a code stream.
在一种较优实现方式下,本发明实施例还可以包括:In a preferred implementation manner, the embodiment of the present invention may further include:
S702、在当前编码图像块的编码过程中,载入历史候选列表,换言之,即所述历史候选列表中的一个或多个历史候选运动信息可以被用于对所述当前编码图像块执行的帧间预测过程(亦可称为对所述当前编码图像块执行的编码过程)中;S702. During the encoding process of the current encoded image block, a historical candidate list is loaded, in other words, one or more historical candidate motion information in the historical candidate list may be used for frames performed on the currently encoded image block. In an inter prediction process (also referred to as an encoding process performed on the currently encoded image block);
相应地,在本申请实施例的具体实现方式下,步骤S703中的基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,可以包括:Accordingly, in a specific implementation manner of the embodiment of the present application, performing the inter prediction process on the current encoded image block based on the inter prediction mode of the currently encoded image block in step S703 may include:
根据率失真代价准则,从与当前编码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选运动信息,其中所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中,例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;According to the rate-distortion cost criterion, the target candidate motion information is determined from the candidate motion information list corresponding to the inter prediction mode of the currently encoded image block, wherein one or more historical candidate motion information in the historical candidate list is included in the In the candidate motion information list, for example, the target candidate motion information encodes the rate distortion cost of the current coded image block to be the smallest;
确定所述目标候选运动信息为所述当前编码图像块的运动信息(例如merge模式下);或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值(例如AMVP模式下)。Determining that the target candidate motion information is the motion information of the current encoded image block (for example, in a merge mode); or based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) To determine a motion vector difference MVD of the currently encoded image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block (for example, in the AMVP mode).
可见,在一种设计方式下,无论是哪一种帧间预测模式,都可以将所述历史候选列表中的一个或多个历史候选运动信息加入所述候选运动信息列表中。It can be seen that in one design manner, no matter which type of inter prediction mode is used, one or more historical candidate motion information in the historical candidate list may be added to the candidate motion information list.
应当理解的是,以上方法流程的步骤中,步骤的描述顺序并不代表步骤的执行顺序,按照以上的描述顺序来执行是可行的,不按照以上的描述顺序来执行也是可行的。例如上述步骤S707可以在步骤S705之后执行,也可以在步骤S705之前执行;上述步骤S702可以在步骤S701之后执行,也可以在步骤S701之前执行;其余步骤此处不再一一举例。It should be understood that, in the steps of the above method flow, the order of description of the steps does not represent the order of execution of the steps. It is feasible to perform according to the order of description described above, and it is also feasible to perform it according to the order of description described above. For example, the above step S707 may be performed after step S705, or may be performed before step S705; the above step S702 may be performed after step S701, or may be performed before step S701; the remaining steps are not illustrated here one by one.
应当理解的是,基于历史候选列表的视频或图像编码过程中,在一种示例方式下,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对当前编码图像块执行的帧间预测过程(亦称为编码过程)中,在另一种示例方式下,考虑不同编码图像块的帧间预测模式的不同,针对有些编码图像块,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述编码图像块执行的帧间预测过程中;针对有些编码图像块,所述历史候选列表中的一个或多个历史候选运动信息也可以不应用于对所述编码图像块执行的帧间预测过程中;但总的来说,在当前条带slice或当前图像或当前一个或多个CTU的层级下,所述历史候选列表中的一个或多个历史候选运动信息可以被应用于对一个或多个编码图像块执行的帧间预测过程中,本申请对此不做限定。It should be understood that during the video or image encoding process based on the historical candidate list, in one example manner, one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current encoded image block. In the inter-prediction process (also referred to as the encoding process), in another example manner, considering the different inter-prediction modes of different encoded image blocks, for some encoded image blocks, one or more of the historical candidate lists Historical candidate motion information may be applied to the inter prediction process performed on the encoded image block; for some encoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the encoded image block. During the inter prediction process performed by the coded image block; but in general, at the level of the current slice or current image or the current one or more CTUs, one or more historical candidate motions in the historical candidate list The information may be applied to an inter prediction process performed on one or more coded image blocks, which is not limited in this application.
在本申请实施例中,S703可以包括:In the embodiment of the present application, S703 may include:
在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表;或When the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, using the motion information of the currently-encoded image block to update the historical candidate list in a first processing manner; or
在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表。When the inter prediction mode of the currently encoded image block is the second inter prediction mode, the motion candidate information of the currently encoded image block is used to update the historical candidate list in a second processing manner.
其中,所述第一帧间预测模式为合成merge模式或跳过skip模式;所述第二帧间预测模式为非第一帧间预测模式的帧间预测模式;Wherein, the first inter prediction mode is a synthetic merge mode or a skip mode; the second inter prediction mode is an inter prediction mode other than the first inter prediction mode;
或者,or,
所述第二帧间预测模式为合成merge模式或跳过skip模式;所述第一帧间预测模式为非第二帧间预测模式的帧间预测模式。The second inter prediction mode is a synthetic merge mode or a skip skip mode; the first inter prediction mode is an inter prediction mode other than the second inter prediction mode.
在本申请实施例的一种实现方式下,在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,步骤S703中使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In an implementation manner of the embodiment of the present application, when the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, in step S703, the motion information of the currently-encoded image block is used to update the first processing mode The historical candidate list includes:
当所述当前编码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current encoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前编码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current encoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current encoded image block as the latest historical candidate motion information to the The historical candidate list is described.
相应地,在本申请实施例的一种实现方式下,在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,步骤S703中使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, in an implementation manner of the embodiment of the present application, when the inter prediction mode of the currently-encoded image block is the second inter-prediction mode, step S703 uses the motion information of the currently-encoded image block to adopt the second The processing mode updates the historical candidate list, including:
如果当前的所述历史候选列表的大小未达到预设列表大小,则(直接)将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding (directly) the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the current size of the historical candidate list has reached the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the currently encoded image block as the latest historical candidate motion information Join the historical candidate list.
在本申请实施例的另一种实现方式下,在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,步骤S703中所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In another implementation manner of the embodiment of the present application, when the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, the motion information using the currently-encoded image block in step S703 adopts the first The processing mode updates the historical candidate list, including:
将当前编码图像块的运动信息不加入历史候选列表;或者,Add the motion information of the current coded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目 标历史候选运动信息为基于所述第一帧间预测模式在先编码得到的历史候选运动信息;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode;
其中,所述如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,包括:Wherein, if the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list includes:
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小未达到预设列表大小,则将当前编码图像块的运动信息作为最新的历史候选运动信息(the last HMVP candidate ok)加入历史候选列表;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list does not reach the preset list size, the motion information of the current coded image block is used as the latest history Candidate sports information (the last HMVP candidate) is added to the historical candidate list;
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小已达到预设列表大小,则从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list has reached the preset list size, the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list.
相应地,在本申请实施例的另一种实现方式下,在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,步骤S703中使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, in another implementation manner of the embodiment of the present application, when the inter prediction mode of the current encoded image block is the second inter prediction mode, step S703 uses the motion information of the currently encoded image block to adopt the first Updating the historical candidate list in two processing modes includes:
当所述当前编码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current encoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前编码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current encoded image block as the latest historical candidate motion information to the The historical candidate list;
或者,or,
相应地,在本申请实施例的另一种实现方式下,在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,步骤S703中使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, in another implementation manner of the embodiment of the present application, when the inter prediction mode of the current encoded image block is the second inter prediction mode, step S703 uses the motion information of the currently encoded image block to adopt the first Updating the historical candidate list in two processing modes includes:
如果当前所述历史候选列表的大小未达到预设列表大小,则将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the size of the historical candidate list currently does not reach the preset list size, adding motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the size of the historical candidate list currently reaches the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently encoded image block as the latest historical candidate motion information The historical candidate list.
S702、在当前编码图像块的编码过程中,载入历史候选列表,换言之,即所述历史候选列表中的一个或多个历史候选运动信息可以被用于对所述当前编码图像块执行的帧间预测过程(亦可称为对所述当前编码图像块执行的编码过程)中;S702. During the encoding process of the current encoded image block, a historical candidate list is loaded, in other words, one or more historical candidate motion information in the historical candidate list may be used for frames performed on the currently encoded image block. In an inter prediction process (also referred to as an encoding process performed on the currently encoded image block);
为了一定程度上减少历史候选运动信息加入候选运动信息列表(比如merge candidate list)所引出的重复性检查和候选项移动操作,在本申请实施例的一种实现方式下,所述基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,得到当前 编码图像块的运动信息,可以包括:In order to reduce to a certain extent the repetitive checking and candidate movement operations that are introduced by adding historical candidate motion information to a candidate motion information list (such as a merge, candidate list), in an implementation manner of an embodiment of the present application, the method based on the current The inter prediction mode of the coded image block performs an inter prediction process on the current coded image block to obtain the motion information of the current coded image block, which may include:
在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息加入当前编码图像块的第一候选运动信息列表中;If the inter prediction mode of the current encoded image block is the first inter prediction mode, adding historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block;
在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息不加入当前编码图像块的第二候选运动信息列表中;If the inter prediction mode of the currently encoded image block is the second inter prediction mode, the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently encoded image block;
根据率失真代价准则从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息,例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;Determining target candidate motion information from the first candidate motion information list or the second candidate motion information list according to a rate distortion cost criterion, for example, the target candidate motion information encodes the current coded image block with the lowest rate distortion cost;
确定所述目标候选运动信息为所述当前编码图像块的运动信息;或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值。Determining that the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) The motion vector difference value MVD of the image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block.
其中,所述第一候选运动信息列表(例如merge candidate list)包括所述当前编码图像块的空域参考块的运动信息(空域参考块包括与当前编码图像块空域邻接的相邻块的运动信息和/或一个或者多个与当前编码图像块空域不邻接的非相邻块的运动信息)和/或当前编码图像块的时域参考块的运动信息(所述时域参考块包括:在参考帧中与所述当前编码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息);Wherein, the first candidate motion information list (for example, merge candidate list) includes motion information of a spatial domain reference block of the current encoded image block (a spatial domain reference block includes motion information of an adjacent block adjacent to the spatial domain of the current encoded image block and And / or motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the currently coded image block) and / or motion information of a time domain reference block of the current coded image block (the time domain reference block includes: in a reference frame The motion information of an adjacent block in the lower right corner of the co-located block at the same position as the current coded image block, or the motion information of the center position of the co-located block);
所述第二候选运动信息列表包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;The second candidate motion information list includes a motion vector of a spatial domain reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block;
或者,or,
所述第一候选运动信息列表(例如AMVP candidate list)包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;The first candidate motion information list (for example, AMVP candidate list) includes a motion vector of a spatial domain reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block;
所述第二候选运动信息列表包括所述当前编码图像块的空域参考块的运动信息和/或当前编码图像块的时域参考块的运动信息。The second candidate motion information list includes motion information of a spatial domain reference block of the currently encoded image block and / or motion information of a time domain reference block of the currently encoded image block.
例如,如果所述当前编码块的帧间预测模式为融合merge模式或跳过skip模式,编入码流中的语法元素还包括用于指示当前编码图像块的目标候选运动信息的索引号,换言之,即还可以将与所述目标候选运动信息对应的索引号编入码流;For example, if the inter prediction mode of the current coded block is a merge merge mode or a skip mode, the syntax element included in the code stream also includes an index number indicating the target candidate motion information of the currently coded image block, in other words That is, an index number corresponding to the target candidate motion information may also be coded into a code stream;
例如,如果所述当前编码块的帧间预测模式为非融合merge模式或非跳过skip模式,编入码流中的语法元素还包括用于指示当前编码图像块的目标候选运动信息的索引号和运动矢量差值MVD,换言之,即还可以将与所述目标候选运动信息对应的索引号和所述运动矢量差值MVD编入码流,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值MVP。For example, if the inter prediction mode of the current coded block is a non-fused merge mode or a non-skip skip mode, the syntax element included in the code stream further includes an index number used to indicate target candidate motion information of the currently coded image block And the motion vector difference value MVD, in other words, an index number corresponding to the target candidate motion information and the motion vector difference value MVD may also be coded into a code stream, and the target candidate motion information is the current coded image block Motion vector predictor MVP.
在一种较优的实现方式下,所述历史候选列表中的候选运动信息(以HMVP示意)采用先进先出的方式(如图10A和10B所示),所述将所述历史候选列表中的历史候选运动信息 加入当前编码图像块的第一候选运动信息列表中,包括:In a preferred implementation manner, the candidate motion information (illustrated by HMVP) in the historical candidate list is in a first-in-first-out manner (as shown in FIGS. 10A and 10B), and the historical candidate list is included in the historical candidate list. Historical candidate motion information is added to the first candidate motion information list of the currently encoded image block, including:
在所述历史候选列表中的第一历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第一历史候选运动信息加入所述第一候选运动信息列表中,In a case where the first historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the first historical candidate motion information to all In the first candidate motion information list,
在所述历史候选列表中的第二历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第二历史候选运动信息加入所述第一候选运动信息列表中,其中:If the second historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the second historical candidate motion information to all The first candidate motion information list is as follows:
在第一历史候选运动信息加入所述历史候选列表的时间晚于第二历史候选运动信息加入所述历史候选列表的时间的情况下,所述第一历史候选运动信息相对于所述第二历史候选运动信息先加入所述第一候选运动信息列表。In a case where the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list, the first historical candidate motion information is relative to the second history The candidate motion information is first added to the first candidate motion information list.
进一步的,所述基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,还包括:根据所述当前编码图像块的运动信息对当前编码图像块进行帧间预测,得到所述当前编码图像块的预测图像(亦即预测像素值)。Further, performing the inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block further includes: performing inter prediction on the currently encoded image block according to the motion information of the currently encoded image block. To obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
进一步的,本申请实施例的编码方法还可以包括:Further, the encoding method in the embodiment of the present application may further include:
基于所述当前编码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前编码图像块的预测图像(亦即预测像素值),得到所述当前编码图像块的重建图像。Based on the residual image (that is, the residual value) of the current encoded image block and the predicted image (that is, the predicted pixel value) of the current encoded image block obtained by the inter prediction process, the Reconstructed image.
可见,本申请实施例中考虑当前编码图像块的帧间预测模式来更新历史候选列表,比如,如果当前编码图像块的帧间预测模式为skip/merge模式,不使用当前编码图像块的运动信息更新历史候选列表;相反,如果当前编码图像块的帧间预测模式为非skip/merge模式,使用当前编码图像块的运动信息更新历史候选列表;这样的话,即使历史候选列表中的原有的历史候选运动信息的数目较多,也一定程度上减少了将当前编码图像块的运动信息加入到历史候选列表中可能会引起的查找重复项和更新引起的移动候选项导致的数据搬移操作,而且所述历史候选列表在图像编码过程中不断更新,有助于提高运动矢量预测效率,亦即有助于提高帧间预测效率,从而提高编解码性能。It can be seen that the embodiment of the present application considers the inter prediction mode of the current encoded image block to update the historical candidate list. For example, if the inter prediction mode of the current encoded image block is a skip / merge mode, the motion information of the currently encoded image block is not used. Update the historical candidate list; on the contrary, if the inter prediction mode of the current coded image block is a non-skip / merge mode, use the motion information of the current coded image block to update the historical candidate list; in this case, even the original history in the historical candidate list The number of candidate motion information is large, which also reduces the data movement operation caused by adding the motion information of the current coded image block to the historical candidate list, which may result in finding duplicates and moving candidates caused by updates. The historical candidate list is continuously updated during the image coding process, which helps to improve the efficiency of motion vector prediction, that is, it helps to improve the efficiency of inter prediction, thereby improving the performance of encoding and decoding.
图8为本申请实施例中基于历史候选列表(亦称为历史候选表table)的图像解码方法的一种示例性流程图。所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已解码图像块的运动信息,该方法的执行主体可以是视频解码器(例如视频解码器30)或具有视频解码功能的电子设备(例如设备1200、1300),该方法可以包括以下步骤:FIG. 8 is an exemplary flowchart of an image decoding method based on a historical candidate list (also referred to as a historical candidate table) in an embodiment of the present application. The historical candidate list includes one or more historical candidate motion information. The historical candidate motion information is motion information of a previously decoded image block. The method may be performed by a video decoder (such as video decoder 30) or For an electronic device (for example, devices 1200, 1300) with a video decoding function, the method may include the following steps:
S801、解析码流中的语法元素,以确定当前解码图像块的帧间预测模式;S801. Parse syntax elements in the bitstream to determine the inter prediction mode of the currently decoded image block.
例如,从码流中解析出skip_flag,merge_flag,pred_mode等语法元素;在一种示例下,如下表所示,skip_flag,merge_flag,pred_mode中的一个或多个用于指示当前解码图像块的帧间预测模式。例如,cu_skip_flag取值为0,表示当前图像块的帧间预测模式不是skip模式,cu_skip_flag取值为1,表示当前图像块的帧间预测模式是skip模式;例如,pred_mode_flag取值为0,表示当前图像块的预测模式是inter帧间预测模式,pred_mode_flag取值为1,表示当前图像块的预测模式是intra帧内预测模式;例如,merge_flag取值为0,表示当前图像块的帧间预测模式不是merge模式,merge_flag取值为1,表示当前图像块的帧间预测模式是merge模式。For example, the syntax elements such as skip_flag, merge_flag, and pred_mode are parsed from the bitstream; in one example, as shown in the following table, one or more of skip_flag, merge_flag, and pred_mode are used to indicate the inter prediction of the currently decoded image block mode. For example, the value of cu_skip_flag is 0, which indicates that the inter prediction mode of the current image block is not skip mode, and the value of cu_skip_flag is 1, which indicates that the inter prediction mode of the current image block is skip mode; for example, the value of pred_mode_flag is 0, which indicates the current The prediction mode of the image block is inter inter prediction mode. A value of pred_mode_flag is 1 indicates that the prediction mode of the current image block is intra intra prediction mode. For example, a value of merge_flag is 0, which indicates that the inter prediction mode of the current image block is not In merge mode, the value of merge_flag is 1, indicating that the inter prediction mode of the current image block is the merge mode.
S803、基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程(亦可称为对当前解码图像块执行解码过程),得到当前解码图像块的运动信息;S803. Perform an inter prediction process on the currently decoded image block (also referred to as performing a decoding process on the currently decoded image block) based on the inter prediction mode of the currently decoded image block to obtain motion information of the currently decoded image block.
在一种实现方式下,根据帧间预测模式来判断是否将历史候选列表中历史候选运动信息加入当前解码图像块的候选运动信息列表中,相应地,步骤S803可以包括:In an implementation manner, whether to add historical candidate motion information in the historical candidate list to the candidate motion information list of the currently decoded image block is determined according to the inter prediction mode. Accordingly, step S803 may include:
在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息加入当前解码图像块的第一候选运动信息列表中(第一候选运动信息列表与第一帧间预测模式对应,比如merge模式对应merge candidate list);When the inter prediction mode of the currently decoded image block is the first inter prediction mode, historical candidate motion information in the historical candidate list is added to the first candidate motion information list of the currently decoded image block (the first candidate The motion information list corresponds to the first inter prediction mode, for example, the merge mode corresponds to merge candidate list);
在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息不加入当前解码图像块的第二候选运动信息列表中(第二候选运动信息列表与第二帧间预测模式对应,比如inter模式对应MVP candidate list);When the inter prediction mode of the currently decoded image block is the second inter prediction mode, the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently decoded image block (second The candidate motion information list corresponds to the second inter prediction mode, for example, the inter mode corresponds to MVP (candidate list);
从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;例如,根据从所述码流中解析出的第一标识信息,从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;如果所述第一候选运动信息列表或第二候选运动信息列表的长度为一,则无需解析第一标识信息(例如索引),确定唯一候选运动信息为目标候选运动信息;Determine the target candidate motion information from the first candidate motion information list or the second candidate motion information list; for example, according to the first identification information parsed from the code stream, from the first candidate motion information list or The target candidate motion information is determined in the second candidate motion information list; if the length of the first candidate motion information list or the second candidate motion information list is one, there is no need to parse the first identification information (such as an index) to determine a unique candidate motion Information is target candidate motion information;
基于所述目标候选运动信息预测所述当前解码图像块(简称当前块)的运动信息;例如,确定所述目标候选运动信息为所述当前解码图像块的运动信息(比如merge模式);或者,所述目标候选运动信息为运动矢量预测值,基于所述运动矢量预测值和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD(和帧间预测方向、参考帧索引等),确定所述当前解码图像块的运动信息(比如inter模式)。Predicting motion information of the currently decoded image block (referred to as the current block) based on the target candidate motion information; for example, determining that the target candidate motion information is motion information (such as a merge mode) of the current decoded image block; or, The target candidate motion information is a motion vector prediction value, based on the motion vector prediction value and the motion vector residual value MVD (and inter prediction direction, reference frame) of the current image block parsed from the code stream. Index, etc.) to determine motion information (such as inter mode) of the currently decoded image block.
其中,所述第一候选运动信息列表包括所述当前解码图像块的空域参考块的运动信息(空域参考块包括与当前解码图像块空域邻接的相邻块的运动信息和/或一个或者多个与当前解码图像块空域不邻接的非相邻块的运动信息)和/或当前解码图像块的时域参考块的运动信息(所述时域参考块包括:在参考帧中与所述当前解码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息);The first candidate motion information list includes motion information of a spatial domain reference block of the current decoded image block (the spatial domain reference block includes motion information of an adjacent block adjacent to the spatial domain of the currently decoded image block and / or one or more Motion information of a non-adjacent block that is not adjacent to the spatial domain of the currently decoded image block) and / or motion information of a time-domain reference block of the currently-decoded image block (the time-domain reference block includes: The motion information of the adjacent block in the lower right corner of the co-located block at the same position of the image block, or the motion information of the center position of the co-located block);
所述第二候选运动信息列表包括所述当前解码图像块的空域参考块的运动矢量和/或当前解码图像块的时域参考块的运动矢量;The second candidate motion information list includes a motion vector of a spatial domain reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
或者,or,
所述第一候选运动信息列表包括所述当前解码图像块的空域参考块的运动矢量和/或当前解码图像块的时域参考块的运动矢量;The first candidate motion information list includes a motion vector of a spatial reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
所述第二候选运动信息列表包括所述当前解码图像块的空域参考块的运动信息和/或当前解码图像块的时域参考块的运动信息。The second candidate motion information list includes motion information of a spatial domain reference block of the currently decoded image block and / or motion information of a time domain reference block of the currently decoded image block.
一并参阅图11A,所述将所述历史候选列表中的历史候选运动信息加入当前解码图像块的第一候选运动信息列表中,包括:Referring to FIG. 11A together, adding the historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently decoded image block includes:
在所述历史候选列表中的第一历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第一历史候选运动信息加入所述第一候选运动信息列表中,In a case where the first historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the first historical candidate motion information to all In the first candidate motion information list,
在所述历史候选列表中的第二历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第二历史候选运动信息加入所述第一候选运动信息列表中,其中:If the second historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the second historical candidate motion information to all The first candidate motion information list is as follows:
在第一历史候选运动信息加入所述历史候选列表的时间晚于第二历史候选运动信息加入所述历史候选列表的时间的情况下,所述第一历史候选运动信息相对于所述第二历史候选运动信息先加入所述第一候选运动信息列表。In a case where the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list, the first historical candidate motion information is relative to the second history The candidate motion information is first added to the first candidate motion information list.
例如,将历史候选列表中的历史候选运动信息加入到融合运动信息候选列表或运动矢量预测候选列表中,可包括以下三种方式之一,本申请不作限定。For example, adding historical candidate motion information in the historical candidate list to the fused motion information candidate list or the motion vector prediction candidate list may include one of the following three methods, which is not limited in this application.
方式一:若当前块为merge/skip模式,将历史候选列表中的历史候选加入到融合运动信息候选列表中。若当前块为inter模式,不将历史候选列表中的历史候选加入到运动矢量预测候选列表。Method 1: If the current block is in a merge / skip mode, the historical candidate in the historical candidate list is added to the fusion motion information candidate list. If the current block is in inter mode, the historical candidates in the historical candidate list are not added to the motion vector prediction candidate list.
方式二:若当前块为inter模式,将历史候选列表中的历史候选加入到运动矢量预测候选列表。若当前块为merge/skip模式,不将历史候选列表中的历史候选加入到融合运动信息候选列表中。Manner 2: If the current block is in an inter mode, the historical candidate in the historical candidate list is added to the motion vector prediction candidate list. If the current block is in merge / skip mode, the historical candidates in the historical candidate list are not added to the fusion motion information candidate list.
方式三:若当前块为merge/skip模式,将历史候选列表中的历史候选加入到融合运动信息候选列表中。若当前块为inter模式,将历史候选列表中的历史候选加入到运动矢量预测候选列表。Method 3: If the current block is in a merge / skip mode, the historical candidate in the historical candidate list is added to the candidate list of fused motion information. If the current block is in the inter mode, the historical candidates in the historical candidate list are added to the motion vector prediction candidate list.
在一种较优实现方式下,本发明实施例还可以包括:In a preferred implementation manner, the embodiment of the present invention may further include:
S802、在当前解码图像块的解码过程中,载入历史候选列表,换言之,即所述历史候选列表中的一个或多个历史候选运动信息可以被用于对所述当前解码图像块执行的帧间预测过程(亦可称为对所述当前解码图像块执行的解码过程)中;S802. During the decoding process of the currently decoded image block, a historical candidate list is loaded, in other words, one or more historical candidate motion information in the historical candidate list may be used for frames performed on the currently decoded image block. In an inter prediction process (also referred to as a decoding process performed on the current decoded image block);
如图9和10A所示,历史候选列表的长度L为预设值(亦称为预设列表大小),即构造完成后历史候选列表中包含的历史候选运动信息候选个数为L,例如L=5、6、7,8,9或10等。L为大于0的正整数。As shown in FIGS. 9 and 10A, the length L of the historical candidate list is a preset value (also referred to as a preset list size), that is, the number of historical candidate motion information candidates included in the historical candidate list after construction is L, such as L = 5, 6, 7, 8, 9, or 10, etc. L is a positive integer greater than 0.
历史候选列表的初始化过程参见现有技术,例如在条带(SLICE)开始的时候,将历史候选列表清空,也可采用其他历史候选列表的初始化方法,本申请不作限定。For the initialization process of the historical candidate list, refer to the prior art. For example, at the beginning of a slice (SLICE), the historical candidate list may be emptied. Other methods for initializing the historical candidate list may also be adopted, which is not limited in this application.
相应地,无论是哪一种帧间预测模式,都将所述历史候选列表中的一个或多个历史候选运动信息加入候选运动信息列表(例如,与当前解码图像块的帧间预测模式对应的候选运动信息列表)中,相应地,步骤S803可以包括:Accordingly, no matter which type of inter prediction mode is used, one or more historical candidate motion information in the historical candidate list is added to the candidate motion information list (for example, corresponding to the inter prediction mode of the current decoded image block). Candidate motion information list), correspondingly, step S803 may include:
S803A,从与当前解码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选 运动信息,所述目标候选运动信息用于预测所述当前解码图像块的运动信息,其中所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中;S803A: Determine target candidate motion information from a candidate motion information list corresponding to an inter prediction mode of a currently decoded image block, where the target candidate motion information is used to predict motion information of the currently decoded image block, wherein the historical candidate One or more historical candidate motion information in the list is included in the candidate motion information list;
其中,可以是根据从所述码流中解析出的第一标识信息(例如融合索引或运动矢量预测值索引),从所述候选运动信息列表中确定目标候选运动信息;如果所述候选运动信息列表的长度为一,则无需解析第一标识信息(例如融合索引或运动矢量预测值索引),确定唯一候选运动信息为目标候选运动信息;Wherein, the target candidate motion information may be determined from the candidate motion information list according to the first identification information (such as a fusion index or a motion vector prediction value index) parsed from the code stream; if the candidate motion information The length of the list is one, there is no need to parse the first identification information (such as a fusion index or a motion vector prediction value index), and determine that the only candidate motion information is the target candidate motion information;
基于所述目标候选运动信息预测/得到所述当前解码图像块的运动信息;例如,确定所述目标候选运动信息为所述当前解码图像块的运动信息(若当前块为merge/skip模式);或者,所述目标候选运动信息为运动矢量预测值,基于所述运动矢量预测值和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD,确定所述当前解码图像块的运动信息(若当前块为非merge/skip模式)。Predict / obtain motion information of the currently decoded image block based on the target candidate motion information; for example, determine that the target candidate motion information is motion information of the current decoded image block (if the current block is a merge / skip mode); Alternatively, the target candidate motion information is a motion vector prediction value, and the current decoded image is determined based on the motion vector prediction value and a motion vector residual value MVD of the current image block parsed from the code stream. Motion information of the block (if the current block is in non-merge / skip mode).
S803B,根据所述当前解码图像块的运动信息对当前解码图像块进行帧间预测,得到所述当前解码图像块的预测图像(亦即预测像素值)。S803B: Perform inter prediction on the currently decoded image block according to the motion information of the currently decoded image block to obtain a predicted image (that is, a predicted pixel value) of the currently decoded image block.
其中,根据运动信息进行运动补偿(motion compensation),得到预测图像。如果当前块存在残差,则将残差信息和预测图像相加,获得当前块的重建图像;如果当前块没有残差,则预测图像为当前块的重建图像。Among them, motion compensation is performed according to the motion information to obtain a predicted image. If a residual exists in the current block, the residual information and the predicted image are added to obtain a reconstructed image of the current block; if the current block has no residual, the predicted image is a reconstructed image of the current block.
上述过程参见现有技术,例如可采用与HEVC或者VTM相同的方法,也可采用其他运动补偿、图像重建方法,本申请对此不做限定。For the foregoing process, refer to the prior art. For example, the same method as HEVC or VTM may be adopted, and other motion compensation and image reconstruction methods may also be adopted, which is not limited in this application.
可选的,S803C,基于所述当前解码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前解码图像块的预测图像(亦即预测像素值),得到所述当前解码图像块的重建图像。例如,将预测图像与残差图像相加,得到当前块的重建图像。Optionally, S803C, based on the residual image (that is, the residual value) of the current decoded image block and the predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the inter prediction process, the obtained The reconstructed image of the currently decoded image block is described. For example, the predicted image and the residual image are added to obtain a reconstructed image of the current block.
S805、根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新。S805. Update the historical candidate list using motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
应当理解的是,以上方法流程的步骤中,步骤的描述顺序并不代表步骤的执行顺序,按照以上的描述顺序来执行是可行的,不按照以上的描述顺序来执行也是可行的。例如上述步骤S802可以在步骤S801之后执行,也可以在步骤S801之前执行;其余步骤此处不再一一举例。It should be understood that, in the steps of the above method flow, the order of description of the steps does not represent the order of execution of the steps. It is feasible to perform according to the order of description described above, and it is also feasible to perform it according to the order of description described above. For example, the above step S802 may be performed after step S801, or may be performed before step S801; the remaining steps are not illustrated here one by one.
在一种可行设计方式下,步骤S805可以包括:In a feasible design manner, step S805 may include:
在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表;或When the inter prediction mode of the currently decoded image block is the first inter prediction mode, using the motion information of the currently decoded image block to update the historical candidate list in a first processing manner; or
在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表。When the inter prediction mode of the currently decoded image block is the second inter prediction mode, the motion candidate information of the currently decoded image block is used to update the historical candidate list in a second processing manner.
其中,所述第一帧间预测模式为跳过模式(skip mode)或融合模式(merge mode);所述第二帧间预测模式为非第一帧间预测模式的帧间预测模式;The first inter prediction mode is a skip mode or a merge mode; the second inter prediction mode is an inter prediction mode other than the first inter prediction mode;
或者,or,
所述第二帧间预测模式为所述第一帧间预测模式为跳过模式(skip mode)或融合模式 (merge mode);所述第一帧间预测模式为非第二帧间预测模式的帧间预测模式The second inter prediction mode is that the first inter prediction mode is a skip mode or a merge mode; the first inter prediction mode is a non-second inter prediction mode. Inter prediction mode
在一种实现方式下,在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,步骤S805中所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In one implementation manner, when the inter prediction mode of the currently decoded image block is the first inter prediction mode, the history is updated in the first processing manner using the motion information of the currently decoded image block in step S805. Candidate list, including:
当所述当前解码图像块(简称为当前块)的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block (referred to as the current block) is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and Adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。在本申请中,并不限定判断或比较当前块的运动信息与历史候选列表中某个历史候选运动信息是否相同的方法。可以是两个运动信息完全相同,也可以是两个运动信息在某种处理后相同,例如两个运动矢量右移2位后的结果相同。When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list is described. In this application, a method for judging or comparing whether the motion information of the current block is the same as a certain historical candidate motion information in the historical candidate list is not limited. It can be that the two pieces of motion information are completely the same, or that the two pieces of motion information are the same after some processing, for example, the results of two motion vectors shifted to the right by 2 bits are the same.
相应地,在一种实现方式下,在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,步骤S805中所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, in an implementation manner, when the inter prediction mode of the currently decoded image block is the second inter prediction mode, the motion information using the currently decoded image block described in step S805 is updated in a second processing manner. The historical candidate list includes:
如果当前的所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息(直接)加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding the motion information of the currently decoded image block as the latest historical candidate motion information (directly) to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息(the last candidate)加入所述历史候选列表。If the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last candidate) to join the historical candidate list.
例如,如图10A或10B所示,如果当前块的预测模式为skip/merge模式,从历史候选列表头部开始,将当前块的运动信息与历史候选列表中的历史候选进行比较;如有某个历史候选与当前块运动信息相同,将该历史候选从历史候选列表中移除。检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选移除。最后,将当前块的运动信息加入到历史候选列表中。For example, as shown in FIG. 10A or 10B, if the prediction mode of the current block is the skip / merge mode, starting from the head of the historical candidate list, the motion information of the current block is compared with the historical candidates in the historical candidate list; The historical candidates are the same as the current block motion information, and the historical candidates are removed from the historical candidate list. Check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the historical candidate list.
例如,如图9所示,如果当前块的预测模式为inter模式,检查历史候选列表大小,如果历史候选列表大小未超过预设的列表大小(亦称为列表长度或table size),则将当前块的运动信息作为最新的一个历史候选运动信息加入到历史候选列表的尾部中;如果历史候选列表大小达到预设的列表大小(亦称为列表长度或table size),则将该历史候选列表中位于头部的历史候选运行信息移除,并将当前块的运动信息作为最新的一个历史候选运动信息加入到历史候选列表尾部中;For example, as shown in FIG. 9, if the prediction mode of the current block is inter mode, check the historical candidate list size. If the historical candidate list size does not exceed the preset list size (also known as list length or table size), The block's motion information is added to the tail of the historical candidate list as the latest historical candidate motion information; if the historical candidate list size reaches a preset list size (also known as the list length or table size), the historical candidate list is added to the historical candidate list. The historical candidate running information located at the head is removed, and the motion information of the current block is added to the tail of the historical candidate list as the latest historical candidate motion information;
可见,根据当前图像块的预测模式来决定是否检查当前图像块的运动信息是否与已经加入到历史候选列表中其它历史候选项是否相同的过程中,考虑到一种规律,如果当前图像块的预测模式是inter模式下,则当前图像块的运动信息与在先已编码或已解码的图像块的运动信息相同的可能性较低,做重复性检查的必要性或意义不大;从而省掉的重复项查找最少,但性能损失最少。It can be seen that in the process of determining whether to check whether the motion information of the current image block is the same as other historical candidates that have been added to the historical candidate list according to the prediction mode of the current image block, considering a rule, if the prediction of the current image block In the inter mode, the motion information of the current image block is the same as the motion information of the previously encoded or decoded image block. The necessity or significance of repeatability check is not significant; Minimal duplicate lookups but minimal performance loss.
在另一种实现方式下,在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,步骤S805中所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In another implementation manner, when the inter prediction mode of the currently decoded image block is the first inter prediction mode, the step S805 uses the motion information of the currently decoded image block to update the first processing mode. Historical candidate list, including:
将当前解码图像块的运动信息不加入历史候选列表;或者,Adding the motion information of the currently decoded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的历史候选运动信息;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode;
其中,所述如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,包括:Wherein, if the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list includes:
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小未达到预设列表大小,则将当前解码图像块的运动信息作为最新的历史候选运动信息(the last HMVP candidate)加入历史候选列表;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list does not reach the preset list size, the motion information of the current decoded image block is taken as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小已达到预设列表大小,则从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list has reached the preset list size, the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list.
相应地,在另一种实现方式下,在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,步骤S805中所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, in another implementation manner, when the inter prediction mode of the currently decoded image block is the second inter prediction mode, the second processing method is used in step S805 to use the motion information of the currently decoded image block. Updating the historical candidate list includes:
当所述当前解码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current decoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list;
例如,如果当前块的预测模式为skip/merge模式,则不将当前块的运动信息加入历史候选列表或者如果当前块的预测模式为skip/merge模式,则当历史候选列表中存在SKIP/merge模式的图像块的运动信息(历史候选)未超过S值,则将当前块的运动信息加入历史候选列表,其中S为阈值,即表示历史候选列表中允许放入的SKIP/merge模式的图像块的运动信息的最大个数。其中,将当前块的运动信息加入历史候选列表的过程包括:从历史候选列表头部开始,将当前块的运动信息与历史候选列表中的历史候选进行比较;如有某个历史候选与当前块运动信息相同,将该历史候选从历史候选列表中移除。然后,检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候 选移除。最后,将当前块的运动信息加入到历史候选列表中。For example, if the prediction mode of the current block is a skip / merge mode, the motion information of the current block is not added to the historical candidate list or if the prediction mode of the current block is a skip / merge mode, when the SKIP / merge mode exists in the historical candidate list The motion information (history candidate) of the image block does not exceed the value of S, then the motion information of the current block is added to the historical candidate list, where S is the threshold, that is, the SKIP / merge mode image block that is allowed to be placed in the historical candidate list. The maximum number of motion information. The process of adding the motion information of the current block to the historical candidate list includes: starting from the head of the historical candidate list, comparing the motion information of the current block with the historical candidate in the historical candidate list; if there is a historical candidate with the current block The motion information is the same, and the historical candidate is removed from the historical candidate list. Then, check the history candidate list size. If the list size exceeds the preset size, the history candidate at the head of the list is removed. Finally, the motion information of the current block is added to the historical candidate list.
例如,如图10A或10B所示,如果当前块的预测模式为inter模式,从历史候选列表头部开始,将当前块的运动信息与历史候选列表中的历史候选进行比较;如有某个历史候选与当前块的运动信息相同,则将该历史候选从历史候选列表中移除。检查历史候选列表大小,如该列表大小超过预设的大小(例如历史候选列表的size),则将该列表中位于头部的历史候选移除。并将当前块的运动信息加入到历史候选列表尾部中。如该列表大小未超过预设的大小,则将当前块的运动信息直接加入到历史候选列表的尾部中。For example, as shown in FIG. 10A or 10B, if the prediction mode of the current block is inter mode, the motion information of the current block is compared with the historical candidate in the historical candidate list starting from the head of the historical candidate list; if there is a certain history If the candidate has the same motion information as the current block, the historical candidate is removed from the historical candidate list. Check the size of the historical candidate list. If the list size exceeds a preset size (for example, the size of the historical candidate list), remove the historical candidate at the head of the list. The motion information of the current block is added to the tail of the historical candidate list. If the size of the list does not exceed the preset size, the motion information of the current block is directly added to the tail of the historical candidate list.
可见,根据当前图像块的预测模式来决定是否将历史候选列表中较多的历史候选项加入到merge candidate list中,尤其是针对历史候选列表的size很大的情况下,当前图像块的MV预测准确度基本无损失的同时降低本发明实施例方法的复杂性。It can be seen that according to the prediction mode of the current image block, it is determined whether to add more historical candidates from the historical candidate list to the merge candidate list, especially if the size of the historical candidate list is large, the MV prediction of the current image block The accuracy is substantially lossless while reducing the complexity of the method of the embodiment of the present invention.
在再一种实现方式下,在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,步骤S805中所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表,包括:In still another implementation manner, when the inter prediction mode of the currently decoded image block is the first inter prediction mode, the step S805 uses the motion information of the currently decoded image block to update the first processing mode. Historical candidate list, including:
将当前解码图像块的运动信息不加入历史候选列表;或者,Adding the motion information of the currently decoded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的历史候选运动信息;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode;
相应地,在再一种实现方式下,在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,步骤S805中所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表,包括:Correspondingly, in another implementation manner, when the inter prediction mode of the currently decoded image block is the second inter prediction mode, the second processing method is adopted in step S805 using the motion information of the currently decoded image block. Updating the historical candidate list includes:
如果当前所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the size of the historical candidate list currently does not reach the preset list size, adding motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the size of the historical candidate list currently reaches the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently decoded image block as the latest historical candidate motion information The historical candidate list.
例如,如果当前块的预测模式为skip/merge模式,则不将当前块的运动信息加入历史候选列表。或者如果当前块的预测模式为skip/merge模式,则当历史候选列表中存在SKIP/merge模式的图像块的运动信息(历史候选)未超过S值,则将当前块的运动信息加入历史候选列表,其中S为阈值,即表示历史候选列表中允许放入的SKIP/merge模式的图像块的运动信息的最大个数。其中,将当前块的运动信息加入历史候选列表的过程包括:从历史候选列表头部开始,将当前块的运动信息与历史候选列表中的历史候选进行比较;如有某个历史候选与当前块运动信息相同,将该历史候选从历史候选列表中移除。然后,检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选移除。最后,将当前块的运动信息加入到历史候选列表中。For example, if the prediction mode of the current block is a skip / merge mode, the motion information of the current block is not added to the historical candidate list. Or if the prediction mode of the current block is skip / merge mode, when the motion information (history candidate) of the image block in the SKIP / merge mode exists in the historical candidate list, the motion information of the current block is added to the historical candidate list , Where S is a threshold value, that is, the maximum number of motion information of an image block of the SKIP / merge mode that is allowed to be placed in the historical candidate list. The process of adding the motion information of the current block to the historical candidate list includes: starting from the head of the historical candidate list, comparing the motion information of the current block with the historical candidate in the historical candidate list; if there is a historical candidate with the current block The motion information is the same, and the historical candidate is removed from the historical candidate list. Then, check the history candidate list size. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the historical candidate list.
例如,如果当前块的预测模式为inter模式,检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选移除。最后,将当前块的运动信息加入到历史候选列表尾部中。如该列表大小未超过预设的大小,则将当前块的运动信息加入到历史候选列表的尾部中。For example, if the prediction mode of the current block is inter mode, check the historical candidate list size. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the tail of the historical candidate list. If the size of the list does not exceed the preset size, the motion information of the current block is added to the tail of the historical candidate list.
例如,如果当前块的预测模式为inter模式,如果历史候选列表大小未超过预设的列表大小(亦称为列表长度或table size),则将当前块的运动信息作为最新的一个历史候选运动信息加入到历史候选列表的尾部中;如果历史候选列表大小达到预设的列表大小(亦称为列表长度或table size),则将该历史候选列表中位于头部的历史候选运行信息移除,并将当前块的运动信息作为最新的一个历史候选运动信息加入到历史候选列表尾部中;For example, if the prediction mode of the current block is inter mode, if the size of the historical candidate list does not exceed a preset list size (also known as a list length or table size), the motion information of the current block is taken as the latest historical candidate motion information. Added to the tail of the historical candidate list; if the size of the historical candidate list reaches a preset list size (also known as the list length or table size), the historical candidate running information at the head of the historical candidate list is removed, and Adding the motion information of the current block as the latest historical candidate motion information to the tail of the historical candidate list;
可见,根据当前图像块的预测模式来决定是否检查当前图像块的运动信息是否与已经加入到历史候选列表中其它历史候选项是否相同,考虑到一种规律,如果当前图像块的预测模式是inter模式下,则当前图像块的运动信息与在先已编码或已解码的图像块的运动信息相同的可能性较低,则做重复性检查的必要性或意义不大;以及,根据当前图像块的预测模式来决定是否将历史候选列表中较多的历史候选项加入到merge candidate list中,尤其是针对历史候选列表的size很大的情况下,当前图像块的MV预测准确度基本无损失的同时降低本发明实施例方法的复杂性。It can be seen that according to the prediction mode of the current image block, it is determined whether to check whether the motion information of the current image block is the same as other historical candidates that have been added to the historical candidate list. Considering a rule, if the prediction mode of the current image block is inter In the mode, the probability that the motion information of the current image block is the same as the motion information of the previously encoded or decoded image block is low, so the necessity or significance of the repeatability check is not significant; and To determine whether to add more historical candidates from the historical candidate list to the merge candidate list, especially when the size of the historical candidate list is large, the MV prediction accuracy of the current image block is basically lossless. At the same time, the complexity of the method of the embodiment of the present invention is reduced.
综上所述,一方面,相比于现有技术,本申请实施例在将当前块的运动信息加入到历史候选列表前,首先检查当前块的预测模式。当该预测模式为inter和merge/skip时分别采用不同的方式来查找重复项的操作和更新操作。另一方面,在历史候选列表建立完成之后,在构建当前图像块的merge候选列表或MVP候选列表的过程中,检查当前图像块的预测模式,根据当前图像块的预测模式来决定是否将历史候选列表中的历史候选加入到融合运动信息候选列表中,比如:当该预测模式为inter时,不将历史候选列表中的历史候选加入到融合运动信息候选列表中;当该预测模式为merge/skip时,将历史候选列表中的历史候选加入到融合运动信息候选列表中;在另一种设计方式下,当该预测模式为inter时,将历史候选列表中的历史候选加入到融合运动信息候选列表中;当该预测模式为merge/skip时,不将历史候选列表中的历史候选加入到融合运动信息候选列表中。再一方面,本发明实施例考虑当前图像块的帧间预测模式来决定是否进行重复性检查,一定程度上避免了历史候选列表中历史候选项搬运操作,比如:如果当前新加入当前图像块的运动信息(Current MV)与某个在先已经加入的历史候选项(比如MV2)相同时,则将在先已经加入的历史候选项(比如MV2)从历史候选列表中去除,并将当前新加入当前图像块的运动信息(Current MV)加入到历史候选列表的尾部,这样带来了历史候选列表中的历史候选项的数据搬运操作,比如,MV2之后的MV3被搬运到原来MV2的位置,MV3之后的MV4被搬运到原来MV3的位置,以此顺延,等等;或者,如果历史候选列表中已有最大数量的历史候选项了,而出现当前新加入当前图像块的运动信息(Current MV),则基于FIFO原则将历史候选列表中最先加入的历史候选项(比如MV0)从历史候选列表中去除,并将当前新加入当前图像块的运动信息(Current MV)加入到历史候选列表的尾部,这样带来了历史候选列表中的历史候选项的数据搬运操作,比如,MV0之后的MV1被搬运到原来MV0的位置, MV1之后的MV2被搬运到原来MV1的位置,以此顺延,等等。To sum up, on the one hand, compared with the prior art, the embodiment of the present application first checks the prediction mode of the current block before adding the motion information of the current block to the historical candidate list. When the prediction mode is inter and merge / skip, different operations are used to find duplicate operations and update operations, respectively. On the other hand, after the establishment of the historical candidate list, in the process of constructing the merge candidate list or MVP candidate list of the current image block, the prediction mode of the current image block is checked, and whether the historical candidate is determined according to the prediction mode of the current image block. The historical candidates in the list are added to the fusion motion information candidate list, for example: when the prediction mode is inter, the historical candidates in the historical candidate list are not added to the fusion motion information candidate list; when the prediction mode is merge / skip When the historical candidate in the historical candidate list is added to the fusion motion information candidate list; in another design mode, when the prediction mode is inter, the historical candidate in the historical candidate list is added to the fusion motion information candidate list Medium; when the prediction mode is merge / skip, the historical candidates in the historical candidate list are not added to the fusion motion information candidate list. In another aspect, the embodiment of the present invention decides whether to perform the repetitive check in consideration of the inter prediction mode of the current image block, and to a certain extent, avoids the operation of transferring historical candidates in the historical candidate list, such as: When the motion information (Current MV) is the same as a previously added historical candidate (such as MV2), the previously added historical candidate (such as MV2) is removed from the historical candidate list, and the current newly added The motion information (Current MV) of the current image block is added to the tail of the historical candidate list. This brings the historical candidate data transfer operation in the historical candidate list. For example, MV3 after MV2 is moved to the original MV2 position, MV3. The subsequent MV4 is moved to the position of the original MV3, so as to postpone, etc .; or if the maximum number of historical candidates already exists in the historical candidate list, and the motion information of the current newly added current image block appears (Current MV) , Based on the FIFO principle, the historical candidate (such as MV0) added first in the historical candidate list is removed from the historical candidate list, and The previously newly added motion information (Current MV) of the current image block is added to the tail of the historical candidate list, which brings the data movement operation of historical candidates in the historical candidate list. For example, MV1 after MV0 is moved to the original MV0. Position, MV2 after MV1 is moved to the original MV1 position, and so on, and so on.
图11A和图11B示意了在融合运动信息候选列表中加入历史候选(history candidate)的方法,以增加merge/skip的融合运动信息候选的数量,提高了预测效率。加入历史候选的融合运动信息候选列表的构建方式如下:FIG. 11A and FIG. 11B illustrate a method of adding history candidates to the fusion motion information candidate list to increase the number of merged / skip fusion motion information candidates and improve prediction efficiency. The construction method of the fusion motion information candidate list added to the historical candidate is as follows:
步骤1111、1113:将与当前块空域相邻的空间候选和时域候选加入当前块的融合运动信息候选列表。Steps 1111 and 1113: Add a spatial candidate and a temporal candidate that are adjacent to the spatial domain of the current block to the fusion motion information candidate list of the current block.
例如,若当前解码图像块(下文简称为当前块)为merge/skip模式,则生成融合运动信息候选列表。若当前CU或当前解码图像块为inter模式,则生成运动矢量预测候选列表。将历史候选列表中的历史候选加入到融合运动信息候选列表或运动矢量预测候选列表中。For example, if the currently decoded image block (hereinafter simply referred to as the current block) is in a merge / skip mode, a fusion motion information candidate list is generated. If the current CU or current decoded image block is in inter mode, a motion vector prediction candidate list is generated. The historical candidates in the historical candidate list are added to the fused motion information candidate list or the motion vector prediction candidate list.
上述若当前块为merge/skip模式,生成融合运动信息候选列表,具体包括:If the current block is in a merge / skip mode, generating a candidate list of fused motion information specifically includes:
将与当前块的空间候选和时域候选加入当前块的融合运动信息候选列表中,其方法与HEVC中的方法相同。如图6所示,空间融合候选包含A0、A1、B0、B1和B2,时域融合候选包括T0和T1。在VTM(Versatile video coding Test Model,多用途视频编码测试模型)中,时域融合候选也包括自适应时域运动矢量预测(ATMVP)技术提供的候选运动信息。生成融合运动信息候选列表相关的过程,可采用HEVC或者VTM中的方法进行,也可采用其他生成融合运动信息候选列表的方法,本申请对此不作限定。The spatial candidate and the temporal candidate for the current block are added to the fusion motion information candidate list of the current block, and the method is the same as that in HEVC. As shown in FIG. 6, the spatial fusion candidates include A0, A1, B0, B1, and B2, and the time domain fusion candidates include T0 and T1. In VTM (Versatile Video Coding Test Model), the time-domain fusion candidates also include candidate motion information provided by the adaptive time-domain motion vector prediction (ATMVP) technology. The process of generating the candidate list of fused motion information may be performed by a method in HEVC or VTM, or other methods of generating the candidate list of fused motion information, which are not limited in this application.
上述若当前块为inter模式,则生成运动矢量预测候选列表,可采用HEVC(High Efficiency Video Coding,高效视频编码)或者VTM中的方法进行,也可采用其他生成运动矢量预测候选列表的方法,本申请对此不作限定。If the current block is in the inter mode, the motion vector prediction candidate list may be generated by using the method in HEVC (High Efficiency Video Coding) or VTM, or other methods of generating a motion vector prediction candidate list. The application does not limit this.
步骤1131:将历史候选列表中的历史候选加入到融合运动信息候选列表中,例如,按照从历史候选列表尾部到头部的顺序将历史候选加入到融合运动信息候选列表中,直至融合运动信息候选列表中的候选项达到最大允许数目,如图11A所示。在当前图像块的融合运动信息候选列表的构建中,可以考虑当前图像块的帧间预测模式,从历史候选列表尾部的历史候选开始,检查其与步骤1得到的融合运动信息候选列表中融合运动信息候选是否相同,如果不同则加入到融合运动信息候选列表中,如果相同则检查历史候选列表中下一个历史候选,细节参见前面实施例的描述,这里不再赘述。Step 1131: Add historical candidates from the historical candidate list to the fusion motion information candidate list, for example, add historical candidates to the fusion motion information candidate list in the order from the tail to the head of the historical candidate list, until the fusion motion information candidate The maximum number of candidates in the list is reached, as shown in Figure 11A. In the construction of the fusion motion information candidate list of the current image block, the inter prediction mode of the current image block may be considered, starting from the historical candidate at the end of the historical candidate list, and checking the fusion motion with the fusion motion information candidate list obtained in
或者,将历史候选列表中的历史候选加入到融合运动信息候选列表中,按照从历史候选列表尾部到头部的顺序检查预设数目的历史候选,预设数目可以是融合运动信息候选列表中的候选项的最大允许数目与当前已经放入运动信息候选列表的候选项的数目之间的差;Alternatively, the historical candidates in the historical candidate list are added to the fusion motion information candidate list, and a preset number of historical candidates is checked in the order from the tail to the head of the historical candidate list. The preset number may be in the fusion motion information candidate list. The difference between the maximum allowed number of candidates and the number of candidates that have been currently placed in the motion information candidate list;
需要说明的是,历史候选列表包括一个或多个历史候选项,每个历史候选项为在先已编码或在先已解码块的运动信息。在不同示例方式下,所述历史候选列表可以slice级别的,或者,所述历史候选列表可以是若干个CTU(CTU行)的级别的;或者,所述历史候选列表可以是CTU的级别的。It should be noted that the historical candidate list includes one or more historical candidates, and each historical candidate is motion information of a previously encoded or previously decoded block. In different example manners, the historical candidate list may be at the slice level, or the historical candidate list may be at the level of several CTUs (CTU lines); or the historical candidate list may be at the CTU level.
步骤1135:加入其它类型的融合运动信息候选,如双向预测候选(bi-predictive candidate)和零运动矢量候选(zero motion vector candidate)。Step 1135: Add other types of fused motion information candidates, such as bi-predictive candidates and zero motion vector candidates.
需要说明的是,候选运动信息列表是图像块级别的(不同的图像块具有与之分别对应的候选运动信息列表),而历史候选表是当前slice或当前图像或者当前一个或多个图像编码单元CTU级别的,换言之,同一个slice下的多个图像块的编码或解码过程中,都可以使用这个不断更新的历史候选列表。It should be noted that the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list is the current slice or current image or the current one or more image coding units At the CTU level, in other words, during the encoding or decoding of multiple image blocks under the same slice, this continuously updated historical candidate list can be used.
图10B示意了利用当前帧中已编码块的运动信息构建历史候选列表,采用先进先出的方式对于历史候选列表进行访问。编码/解码端中总体的历史候选列表构建和使用方式如下:FIG. 10B illustrates the use of motion information of the coded blocks in the current frame to construct a historical candidate list, and access to the historical candidate list in a first-in-first-out manner. The overall historical candidate list in the encoding / decoding side is constructed and used as follows:
步骤1:在条带(SLICE)解码开始的时候初始化历史候选列表,将其清空。Step 1: Initialize the history candidate list at the beginning of SLICE decoding and clear it.
步骤2:解码当前CU,如果当前CU或当前块为merge或inter帧间预测模式,则生成融合运动信息候选列表或运动矢量预测候选列表,基于当前块的帧间预测模式将历史候选列表中的历史候选加入到融合运动信息候选列表或运动矢量预测候选列表中,细节参见前述实施例,这里不再赘述。Step 2: Decode the current CU. If the current CU or current block is in merge or inter inter prediction mode, a fusion motion information candidate list or motion vector prediction candidate list is generated. Based on the inter prediction mode of the current block, the The historical candidate is added to the candidate list of motion information fusion or the candidate list of motion vector prediction. For details, refer to the foregoing embodiments, and details are not described herein again.
步骤3:在解码完当前CU或当前块之后,基于当前块的帧间预测模式将当前块的运动信息作为新的历史候选加入到历史候选列表中,以更新历史候选列表,如图9,10A和10B所示。例如,从历史候选列表头部开始,将当前块的运动信息与历史候选列表中历史候选进行比较。如果某个历史候选(例如图3中的MV2)与当前块的运动信息相同,则将这个历史候选MV2移除。以及,检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选移除。最后,将当前块的运动信息加入到历史候选列表的尾部,细节参见前述实施例,这里不再赘述。Step 3: After decoding the current CU or current block, based on the current prediction mode of the current block, the motion information of the current block is added as a new historical candidate to the historical candidate list to update the historical candidate list, as shown in Figures 9 and 10A. And 10B. For example, starting from the head of the historical candidate list, the motion information of the current block is compared with historical candidates in the historical candidate list. If a certain historical candidate (such as MV2 in FIG. 3) is the same as the motion information of the current block, then this historical candidate MV2 is removed. And, check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the tail of the historical candidate list. For details, refer to the foregoing embodiments, and details are not described herein again.
一并参阅图2,本申请实施例提供一种基于历史候选列表的图像编码装置,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已编码图像块的运动信息,例如,所述历史候选运动信息为当前slice或当前图像或当前一个或多编码树单元CTU中在先已解码图像块的运动信息,所述装置包括:Referring to FIG. 2 together, an embodiment of the present application provides an image encoding device based on a historical candidate list, where the historical candidate list includes one or more historical candidate motion information, and the historical candidate motion information is a previously encoded image block. For example, the historical candidate motion information is motion information of a previously decoded image block in a current slice or a current image or a current one or more coding tree units CTU, and the device includes:
帧间预测单元(43),用于根据率失真代价准则,确定当前编码图像块的帧间预测模式;基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程,得到当前编码图像块的运动信息;例如,从所述候选帧间预测模式的集合中选择率失真代价最小的帧间预测模式作为当前编码图像块的帧间预测模式;An inter prediction unit (43), configured to determine an inter prediction mode of a current encoded image block according to a rate distortion cost criterion; and perform an inter prediction process on the current encoded image block based on the inter prediction mode of the current encoded image block, Obtaining the motion information of the currently encoded image block; for example, selecting an inter prediction mode with the lowest rate distortion cost from the set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
所述帧间预测单元(43)还用于根据当前编码图像块的帧间预测模式,使用当前编码图像块的运动信息对所述历史候选列表进行更新;The inter prediction unit (43) is further configured to update the historical candidate list by using the motion information of the currently encoded image block according to the inter prediction mode of the currently encoded image block;
熵编码单元(56),用于将用于指示所述当前编码图像块的帧间预测模式的语法元素编入码流。An entropy coding unit (56) is configured to code a syntax element used to indicate an inter prediction mode of the currently coded image block into a code stream.
应当理解的是,这里的帧间预测单元可以对应于图2中的帧间预测单元43;这里的熵编码单元可以对应于图2中的熵编码单元56。It should be understood that the inter prediction unit here may correspond to the
本申请实施例的图像编码装置中,在所述根据当前编码图像块的帧间预测模式,使用 当前编码图像块的运动信息对所述历史候选列表进行更新的方面,所述帧间预测单元(43)用于:In the image encoding device according to the embodiment of the present application, in the aspect that the historical candidate list is updated using the motion information of the current encoded image block according to the inter prediction mode of the currently encoded image block, the inter prediction unit ( 43) For:
在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表;或When the inter prediction mode of the currently-encoded image block is the first inter-prediction mode, using the motion information of the currently-encoded image block to update the historical candidate list in a first processing manner; or
在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表。When the inter prediction mode of the currently encoded image block is the second inter prediction mode, the motion candidate information of the currently encoded image block is used to update the historical candidate list in a second processing manner.
其中,所述第一帧间预测模式为融合merge模式或跳过skip模式;所述第二帧间预测模式为非第一帧间预测模式的帧间预测模式;Wherein, the first inter prediction mode is a merge merge mode or a skip skip mode; the second inter prediction mode is an inter prediction mode other than the first inter prediction mode;
或者,or,
所述第二帧间预测模式为融合merge模式或跳过skip模式;所述第一帧间预测模式为非第二帧间预测模式的帧间预测模式。The second inter prediction mode is a merge merge mode or a skip skip mode; the first inter prediction mode is an inter prediction mode that is not a second inter prediction mode.
本申请实施例的图像编码装置中,在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,在所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表的方面,所述帧间预测单元(43)用于:In the image encoding device according to the embodiment of the present application, when the inter prediction mode of the currently encoded image block is the first inter prediction mode, the motion information using the currently encoded image block is updated in a first processing manner. With respect to the historical candidate list, the inter prediction unit (43) is configured to:
当所述当前编码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current encoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前编码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current encoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current encoded image block as the latest historical candidate motion information to the The historical candidate list is described.
相应地,在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,在所述使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:Correspondingly, when the inter prediction mode of the currently encoded image block is the second inter prediction mode, in the aspect that the motion candidate information of the currently encoded image block is used to update the historical candidate list in a second processing manner, all The inter prediction unit is used for:
如果当前的所述历史候选列表的大小未达到预设列表大小,则将所述当前编码图像块的运动信息作为最新的历史候选运动信息(直接)加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding the motion information of the currently encoded image block as the latest historical candidate motion information (directly) to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the current size of the historical candidate list has reached the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the currently encoded image block as the latest historical candidate motion information Join the historical candidate list.
本申请实施例的图像编码装置中,在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表的方面,所述帧间预测单元(43)用于:In the image encoding device according to the embodiment of the present application, when the inter prediction mode of the currently-encoded image block is the first inter prediction mode, the use of the motion information of the currently-encoded image block to update the history in a first processing manner. With regard to the candidate list, the inter prediction unit (43) is configured to:
将当前编码图像块的运动信息不加入历史候选列表;或者,Add the motion information of the current coded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先编码得到的历史候选运动信息;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode;
相应地,在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,所述使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:Correspondingly, when the inter prediction mode of the currently-encoded image block is the second inter-prediction mode, the aspect of using the motion information of the currently-encoded image block to update the historical candidate list in a second processing manner, said Inter prediction units are used:
当所述当前编码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current encoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current encoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前编码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current encoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current encoded image block as the latest historical candidate motion information to the The historical candidate list is described.
本申请实施例的图像编码装置中,在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,所述使用当前编码图像块的运动信息采用第一处理方式更新所述历史候选列表的方面,所述帧间预测单元(43)用于:In the image encoding device according to the embodiment of the present application, when the inter prediction mode of the currently-encoded image block is the first inter prediction mode, the use of the motion information of the currently-encoded image block to update the history in a first processing manner. With regard to the candidate list, the inter prediction unit (43) is configured to:
将当前编码图像块的运动信息不加入历史候选列表;或者,Add the motion information of the current coded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先编码得到的历史候选运动信息;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously obtained based on the first inter prediction mode;
相应地,在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,所述使用当前编码图像块的运动信息采用第二处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:Correspondingly, when the inter prediction mode of the currently-encoded image block is the second inter-prediction mode, the aspect of using the motion information of the currently-encoded image block to update the historical candidate list in a second processing manner, said Inter prediction units are used:
如果当前所述历史候选列表的大小未达到预设列表大小,则将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the size of the historical candidate list currently does not reach the preset list size, adding motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the size of the historical candidate list currently reaches the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently encoded image block as the latest historical candidate motion information The historical candidate list.
其中,所述如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表的方面,所述帧间预测单元(43)用于:Wherein, if the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, adding the motion information of the currently encoded image block as the latest historical candidate motion information to the aspect of the historical candidate list, The inter prediction unit (43) is configured to:
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小未达到预设列表大小,则将当前编码图像块的运动信息作为最新的历史候选运动信息(the last HMVP candidate)加入历史候选列表;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list does not reach the preset list size, the motion information of the current coded image block is used as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小已达到预设列表大小,则从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前编码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list has reached the preset list size, the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently encoded image block as the latest historical candidate motion information to the historical candidate list.
本申请实施例的图像编码装置中,所述基于所述当前编码图像块的帧间预测模式对当 前编码图像块执行帧间预测过程,得到当前编码图像块的运动信息的方面,所述帧间预测单元(43)用于:In the image encoding device according to the embodiment of the present application, the inter prediction process is performed on the current encoded image block based on the inter prediction mode of the current encoded image block to obtain motion information of the currently encoded image block. The prediction unit (43) is used for:
在当前编码图像块的帧间预测模式为第一帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息加入当前编码图像块的第一候选运动信息列表中;If the inter prediction mode of the current encoded image block is the first inter prediction mode, adding historical candidate motion information in the historical candidate list to the first candidate motion information list of the currently encoded image block;
在当前编码图像块的帧间预测模式为第二帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息不加入当前编码图像块的第二候选运动信息列表中;If the inter prediction mode of the currently encoded image block is the second inter prediction mode, the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently encoded image block;
根据率失真代价准则从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;Determining target candidate motion information from the first candidate motion information list or the second candidate motion information list according to a rate distortion cost criterion; for example, the target candidate motion information encodes the current coded image block with the lowest rate distortion cost;
确定所述目标候选运动信息为所述当前编码图像块的运动信息;或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值。Determining that the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) The motion vector difference value MVD of the image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block.
其中,所述第一候选运动信息列表包括所述当前编码图像块的空域参考块的运动信息和/或当前编码图像块的时域参考块的运动信息,例如所述空域参考块包括:与当前编码图像块空域邻接的相邻块的运动信息和/或一个或者多个与当前编码图像块空域不邻接的非相邻块的运动信息;所述时域参考块包括:在参考帧中与所述当前编码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息;所述第二候选运动信息列表包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;The first candidate motion information list includes motion information of a spatial domain reference block of the currently encoded image block and / or motion information of a time domain reference block of the currently encoded image block. For example, the spatial domain reference block includes: The motion information of neighboring blocks adjacent to the spatial domain of the coded image block and / or the motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the current coded image block; the time-domain reference block includes: The motion information of the neighboring block in the lower right corner of the co-located block at the same position of the current coded image block, or the motion information of the center position of the co-located block; the second candidate motion information list includes the A motion vector of a spatial reference block and / or a motion vector of a temporal reference block of a currently coded image block;
或者,or,
所述第一候选运动信息列表包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;所述第二候选运动信息列表包括所述当前编码图像块的空域参考块的运动信息和/或当前编码图像块的时域参考块的运动信息。The first candidate motion information list includes a motion vector of a spatial reference block of the currently encoded image block and / or a motion vector of a time domain reference block of the currently encoded image block; the second candidate motion information list includes the current Motion information of a spatial domain reference block of the coded image block and / or motion information of a time domain reference block of the currently coded image block.
其中,所述将所述历史候选列表中的历史候选运动信息加入当前编码图像块的第一候选运动信息列表中的方面,所述帧间预测单元(43)用于:Wherein, the historical candidate motion information in the historical candidate list is added to the aspect of the first candidate motion information list of the currently encoded image block, and the inter prediction unit (43) is configured to:
在所述历史候选列表中的第一历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第一历史候选运动信息加入所述第一候选运动信息列表中;In a case where the first historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the first historical candidate motion information to all The first candidate motion information list;
在所述历史候选列表中的第二历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第二历史候选运动信息加入所述第一候选运动信息列表中,其中:If the second historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the second historical candidate motion information to all The first candidate motion information list is as follows:
在第一历史候选运动信息加入所述历史候选列表的时间晚于第二历史候选运动信息加入所述历史候选列表的时间的情况下,所述第一历史候选运动信息相对于所述第二历史候选运动信息先加入所述第一候选运动信息列表。In a case where the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list, the first historical candidate motion information is relative to the second history The candidate motion information is first added to the first candidate motion information list.
本申请实施例的图像编码装置中,所述基于所述当前编码图像块的帧间预测模式对当前编码图像块执行帧间预测过程的方面,所述帧间预测单元(43)用于:In the image encoding device according to the embodiment of the present application, in the aspect of performing an inter prediction process on the current encoded image block based on the inter prediction mode of the currently encoded image block, the inter prediction unit (43) is configured to:
根据率失真代价准则,从与当前编码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选运动信息,其中所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中;例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;According to the rate-distortion cost criterion, the target candidate motion information is determined from the candidate motion information list corresponding to the inter prediction mode of the currently encoded image block, wherein one or more historical candidate motion information in the historical candidate list is included in the The candidate motion information list; for example, the target candidate motion information encodes the currently-distorted image block with the lowest rate distortion cost;
确定所述目标候选运动信息为所述当前编码图像块的运动信息;或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,其中,所述目标候选运动信息为目标候选运动矢量预测值。Determining that the target candidate motion information is the motion information of the current encoded image block; or determining the current encoding based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) The motion vector difference value MVD of the image block, wherein the target candidate motion information is a target candidate motion vector prediction value.
本申请实施例的图像编码装置中,所述帧间预测单元(43)还用于:In the image encoding device according to the embodiment of the present application, the inter prediction unit (43) is further configured to:
根据所述当前编码图像块的运动信息对当前编码图像块进行帧间预测,得到所述当前编码图像块的预测图像(亦即预测像素值)。Inter prediction is performed on the current coded image block according to the motion information of the current coded image block to obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
本申请实施例的图像编码装置中,所述装置还包括:In the image encoding device according to the embodiment of the present application, the device further includes:
重建单元(62),用于基于所述当前编码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前编码图像块的预测图像(亦即预测像素值),得到所述当前编码图像块的重建图像。应当理解的是,如果当前编码图像块的预测图像与当前编码图像块的原始图像相同,则没有所述当前编码图像块的残差图像(亦即残差值),则基于所述帧间预测过程得到的当前编码图像块的预测图像(亦即预测像素值),得到所述当前编码图像块的重建图像。A reconstruction unit (62), configured to be based on a residual image (that is, a residual value) of the currently encoded image block and a predicted image (that is, a predicted pixel value) of the currently encoded image block obtained by the inter prediction process, A reconstructed image of the current coded image block is obtained. It should be understood that if the predicted image of the currently-encoded image block is the same as the original image of the currently-encoded image block, there is no residual image (ie, residual value) of the currently-encoded image block, based on the inter prediction The predicted image (that is, the predicted pixel value) of the currently-encoded image block obtained by the process is used to obtain a reconstructed image of the currently-encoded image block.
本申请实施例的图像编码装置中,所述当前编码块的帧间预测模式为融合merge模式或跳过skip模式,所述熵编码单元(56)具体用于:将与所述目标候选运动信息对应的merge索引号编入码流;In the image encoding device according to the embodiment of the present application, the inter prediction mode of the current encoding block is a merge merge mode or a skip skip mode, and the entropy encoding unit (56) is specifically configured to: The corresponding merge index number is coded into the code stream;
或者,or,
所述当前编码块的帧间预测模式为非融合merge模式或非跳过skip模式,所述熵编码单元(56)具体用于:将与所述目标候选运动信息(即目标候选运动矢量预测值MVP)对应的索引号和所述运动矢量差值MVD编入码流。The inter-prediction mode of the current coding block is a non-fused merge mode or a non-skip skip mode, and the entropy coding unit (56) is specifically configured to: match the target candidate motion information (that is, the target candidate motion vector prediction value) The index number corresponding to MVP) and the motion vector difference MVD are coded into a code stream.
一并参阅图3,本申请实施例提供一种基于历史候选列表(亦可称为历史候选表)的解码装置,所述历史候选列表包括一个或多个历史候选运动信息,所述历史候选运动信息为在先已解码图像块的运动信息(例如可以为当前条带slice或当前图像或当前一个或多个编码树单元CTU中在先已解码图像块的运动信息),所述装置包括:Referring to FIG. 3 together, an embodiment of the present application provides a decoding device based on a historical candidate list (also referred to as a historical candidate list). The historical candidate list includes one or more historical candidate motion information, and the historical candidate motion The information is the motion information of the previously decoded image block (for example, it may be the current slice slice or the current image or the motion information of the previously decoded image block in the current one or more coding tree units CTU), and the device includes:
熵解码单元(80),用于解析接收的码流中的语法元素,以确定当前解码图像块的帧间预测模式;An entropy decoding unit (80), configured to parse syntax elements in a received code stream to determine an inter prediction mode of a currently decoded image block;
帧间预测单元(亦称为运动补偿单元)(82),用于基于所述当前解码图像块的帧间预 测模式对当前解码图像块执行帧间预测过程,得到当前解码图像块的运动信息;An inter prediction unit (also referred to as a motion compensation unit) (82), configured to perform an inter prediction process on the current decoded image block based on the inter prediction mode of the currently decoded image block to obtain motion information of the currently decoded image block;
所述帧间预测单元(82)还用于根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新。The inter prediction unit (82) is further configured to update the historical candidate list by using the motion information of the currently decoded image block according to the inter prediction mode of the currently decoded image block.
应当理解的是,这里的帧间预测单元可以对应于图3中的帧间预测单元82;这里的熵解码单元可以对应于图3中的熵解码单元80。It should be understood that the inter prediction unit here may correspond to the
应当理解的是,基于历史候选列表的图像解码装置中,在一种示例方式下,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述当前解码图像块执行的帧间预测过程中,在另一种示例方式下,考虑不同解码图像块的帧间预测模式的不同,针对有些解码图像块,所述历史候选列表中的一个或多个历史候选运动信息可以应用于对所述解码图像块执行的帧间预测过程中;针对有些解码图像块,所述历史候选列表中的一个或多个历史候选运动信息也可以不应用于对所述解码图像块执行的帧间预测过程中;但总的来说,当前条带slice或当前图像或当前一个或多个CTU中,所述历史候选列表中的一个或多个历史候选运动信息将会应用于对一个或多个解码图像块执行的帧间预测过程中,本申请对此不做限定。It should be understood that in an image decoding device based on a historical candidate list, in one example manner, one or more historical candidate motion information in the historical candidate list may be applied to a frame performed on the current decoded image block. In the inter prediction process, in another example manner, considering different inter prediction modes of different decoded image blocks, for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may be applied to During the inter prediction performed on the decoded image block; for some decoded image blocks, one or more historical candidate motion information in the historical candidate list may not be applied to the inter frame performed on the decoded image block In the prediction process; but in general, in the current slice or current image or the current one or more CTUs, one or more historical candidate motion information in the historical candidate list will be applied to one or more In the process of inter prediction performed by decoding image blocks, this application does not limit this.
在本申请解码装置的实施例的某些实现方式中,在所述根据当前解码图像块的帧间预测模式,使用当前解码图像块的运动信息对所述历史候选列表进行更新的方面,所述帧间预测单元用于:In some implementations of the embodiments of the decoding apparatus of the present application, in the aspect that the motion candidate information of the currently decoded image block is used to update the historical candidate list according to the inter prediction mode of the currently decoded image block, the Inter prediction units are used:
在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表;和/或When the inter prediction mode of the currently decoded image block is the first inter prediction mode, using the motion information of the currently decoded image block to update the historical candidate list in a first processing manner; and / or
在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表。When the inter prediction mode of the currently decoded image block is the second inter prediction mode, the motion candidate information of the currently decoded image block is used to update the historical candidate list in a second processing manner.
可见,相比于无论何种帧间预测模式采用统一的方式更新历史候选列表,本申请实施例在不同的帧间预测模式下采用不同的方式来更新历史候选列表,一旦所述历史候选列表中的一个或多个历史候选运动信息作用于对当前解码图像块执行的帧间预测过程中,将会一定程度上提高运动矢量预测效率,亦即提高帧间预测效率,从而提高编解码性能。It can be seen that, compared to updating the historical candidate list in a uniform manner regardless of the inter prediction mode, the embodiment of the present application uses different methods to update the historical candidate list under different inter prediction modes. When one or more historical candidate motion information are applied to the inter prediction process performed on the currently decoded image block, the motion vector prediction efficiency will be improved to a certain extent, that is, the inter prediction efficiency will be improved, thereby improving the encoding and decoding performance.
在本申请解码装置的实施例的某些实现方式中,所述第一帧间预测模式为跳过模式(skip mode)或融合模式(merge mode);所述第二帧间预测模式为非第一帧间预测模式的帧间预测模式;In some implementations of the embodiments of the decoding device of the present application, the first inter prediction mode is a skip mode or a merge mode; the second inter prediction mode is a non-first Inter prediction mode of one inter prediction mode;
或者,or,
所述第二帧间预测模式为所述第一帧间预测模式为跳过模式(skip mode)或融合模式(merge mode);所述第一帧间预测模式为非第二帧间预测模式的帧间预测模式。The second inter prediction mode is that the first inter prediction mode is a skip mode or a merge mode; the first inter prediction mode is a non-second inter prediction mode. Inter prediction mode.
在本申请解码装置的实施例的某些实现方式中,在所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:In some implementations of the embodiments of the decoding device of the present application, in the aspect that the historical candidate list is updated in a first processing manner using the motion information of the currently decoded image block, the inter prediction unit is configured to:
当所述当前解码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current decoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list is described.
相应地,在所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:Accordingly, in the aspect that the historical candidate list is updated in a second processing manner using the motion information of the currently decoded image block, the inter prediction unit is configured to:
如果当前的所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息(直接)加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding the motion information of the currently decoded image block as the latest historical candidate motion information (directly) to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息(the last history candidate)加入所述历史候选列表。If the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last history candidate) join the history candidate list.
可见,本申请实施例考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如如果当前解码图像块的帧间预测模式为skip/merge模式,第一处理方式即使用当前解码图像块的运动信息更新历史候选列表的过程中需要做重复项检查;相反,如果当前解码图像块的帧间预测模式为非skip/merge模式,第二处理方式即使用当前解码图像块的运动信息更新历史候选列表的过程中无需做重复项检查;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,将当前解码图像块的运动信息加入到历史候选列表中能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。It can be seen that the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode uses the In the process of updating the historical candidate list of motion information, duplicate items need to be checked. Conversely, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing method is to update the historical candidate with the motion information of the currently decoded image block. There is no need to check for duplicates in the process of listing; in this case, once the number of historical candidates in the constructed historical candidate list is large, adding the motion information of the currently decoded image block to the historical candidate list can reduce the search for duplicates to a certain extent. Operation to a certain extent to improve codec performance.
在本申请解码装置的实施例的某些实现方式中,所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:In some implementations of the embodiments of the decoding device of the present application, the aspect of updating the historical candidate list in a first processing manner using motion information of a currently decoded image block is used, and the inter prediction unit is configured to:
将当前解码图像块的运动信息不加入历史候选列表;或者,Adding the motion information of the currently decoded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的历史候选运动信息。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode.
相应地,在所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:Accordingly, in the aspect that the historical candidate list is updated in a second processing manner using the motion information of the currently decoded image block, the inter prediction unit is configured to:
当所述当前解码图像块的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and removing the current decoded image Block motion information is added to the historical candidate list as the latest historical candidate motion information;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list is described.
可见,本申请实施例考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如 如果当前解码图像块的帧间预测模式为skip/merge模式,第一处理方式即不使用所述当前解码图像块的运动信息更新历史候选列表或有条件使用所述当前解码图像块的运动信息更新历史候选列表;相反,如果当前解码图像块的帧间预测模式为非skip/merge模式,第二处理方式即缺省使用当前解码图像块的运动信息更新历史候选列表,且更新的过程中做重复项检查;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,使用当前解码图像块的运动信息更新历史候选列表的过程中,能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。It can be seen that the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode does not use the current decoding. Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, by default, the motion candidate information of the currently decoded image block is used to update the historical candidate list, and duplicate entries are checked during the update process. In this case, once the number of historical candidates in the constructed historical candidate list is large, the current decoded image block is used. During the process of updating the historical candidate list of motion information, the operation of searching for duplicate items can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
在本申请解码装置的实施例的某些实现方式中,在所述使用当前解码图像块的运动信息采用第一处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:In some implementations of the embodiments of the decoding device of the present application, in the aspect that the historical candidate list is updated in a first processing manner using the motion information of the currently decoded image block, the inter prediction unit is configured to:
将当前解码图像块的运动信息不加入历史候选列表;或者,Adding the motion information of the currently decoded image block to the historical candidate list; or
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表,其中所述目标历史候选运动信息为基于所述第一帧间预测模式在先解码得到的历史候选运动信息。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, then add the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list, where the target historical candidate The motion information is historical candidate motion information that is previously decoded based on the first inter prediction mode.
相应地,在所述使用当前解码图像块的运动信息采用第二处理方式更新所述历史候选列表的方面,所述帧间预测单元用于:Accordingly, in the aspect that the historical candidate list is updated in a second processing manner using the motion information of the currently decoded image block, the inter prediction unit is configured to:
如果当前所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表中;If the size of the historical candidate list currently does not reach the preset list size, adding motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
如果当前所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the size of the historical candidate list currently reaches the preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and add the motion information of the currently decoded image block as the latest historical candidate motion information The historical candidate list.
可见,本申请实施例考虑当前解码图像块的帧间预测模式来更新历史候选列表,比如如果当前解码图像块的帧间预测模式为skip/merge模式,第一处理方式即不使用所述当前解码图像块的运动信息更新历史候选列表或有条件使用所述当前解码图像块的运动信息更新历史候选列表;相反,如果当前解码图像块的帧间预测模式为非skip/merge模式,第二处理方式即缺省使用当前解码图像块的运动信息更新历史候选列表,且更新的过程中不做重复项检查;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,使用当前解码图像块的运动信息更新历史候选列表的过程中,能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。It can be seen that the embodiment of the present application updates the historical candidate list in consideration of the inter prediction mode of the currently decoded image block. For example, if the inter prediction mode of the current decoded image block is a skip / merge mode, the first processing mode does not use the current decoding. Update the historical candidate list of motion information of the image block or conditionally update the historical candidate list with the motion information of the currently decoded image block; on the contrary, if the inter prediction mode of the currently decoded image block is a non-skip / merge mode, the second processing mode That is, the historical candidate list is updated by using the motion information of the currently decoded image block by default, and no duplicate check is performed during the update process. In this case, once the number of historical candidates in the constructed historical candidate list is large, the current decoded image block is used. In the process of updating the historical candidate list of motion information, the operation of searching for duplicates can be reduced to a certain extent, thereby improving the performance of encoding and decoding to a certain extent.
在本申请解码装置的实施例的某些实现方式中,在所述如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值,则将当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表的方面,所述帧间预测单元用于:In some implementations of the embodiments of the decoding apparatus of the present application, if the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold, the motion information of the currently decoded image block is regarded as the latest The historical candidate motion information is added to the aspect of the historical candidate list, and the inter prediction unit is configured to:
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小未达到预设列表大小,则将当前解码图像块的运动信息作为最新的历史候选运动信息(the last HMVP candidate)加入历史候选列表;If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list does not reach the preset list size, the motion information of the current decoded image block is taken as the latest history Candidate sport information (the last HMVP candidate) is added to the historical candidate list;
如果当前的历史候选列表中目标历史候选运动信息的个数未超过第一阈值且当前的所述历史候选列表的大小已达到预设列表大小,则从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。If the number of target historical candidate motion information in the current historical candidate list does not exceed the first threshold and the size of the current historical candidate list has reached the preset list size, the earliest historical candidate added is removed from the historical candidate list Motion information, and adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list.
在本申请解码装置的实施例的某些实现方式中,在所述基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程,得到当前解码图像块的运动信息的方面,所述帧间预测单元用于:In some implementation manners of the embodiments of the decoding device of the present application, an inter prediction process is performed on the current decoded image block based on the inter prediction mode of the current decoded image block to obtain motion information of the currently decoded image block. In one aspect, the inter prediction unit is configured to:
在当前解码图像块的帧间预测模式为第一帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息加入当前解码图像块的第一候选运动信息列表中;应当理解的是,第一候选运动信息列表与第一帧间预测模式对应,比如merge模式对应merge candidate list;In a case where the inter prediction mode of the currently decoded image block is the first inter prediction mode, historical candidate motion information in the historical candidate list is added to the first candidate motion information list of the currently decoded image block; it should be understood Yes, the first candidate motion information list corresponds to the first inter prediction mode, for example, the merge mode corresponds to the merge candidate list;
在当前解码图像块的帧间预测模式为第二帧间预测模式的情况下,将所述历史候选列表中的历史候选运动信息不加入当前解码图像块的第二候选运动信息列表中;应当理解的是,第二候选运动信息列表与第二帧间预测模式对应,比如inter模式对应MVP candidate list;When the inter prediction mode of the currently decoded image block is the second inter prediction mode, the historical candidate motion information in the historical candidate list is not added to the second candidate motion information list of the currently decoded image block; it should be understood The second candidate motion information list corresponds to the second inter prediction mode, for example, the inter mode corresponds to the MVP candidate list.
从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;应当理解的是,例如,根据从所述码流中解析出的第一标识信息从所述第一候选运动信息列表或第二候选运动信息列表中确定目标候选运动信息;如果所述第一候选运动信息列表或第二候选运动信息列表的长度为一,则无需解析第一标识信息(例如索引),确定唯一候选运动信息为目标候选运动信息);Determine the target candidate motion information from the first candidate motion information list or the second candidate motion information list; it should be understood that, for example, the first candidate information is removed from the first candidate according to the first identification information parsed from the code stream The target candidate motion information is determined in the motion information list or the second candidate motion information list; if the length of the first candidate motion information list or the second candidate motion information list is one, there is no need to parse the first identification information (such as an index), Determining the only candidate motion information as the target candidate motion information);
基于所述目标候选运动信息预测/得到所述当前解码图像块的运动信息;应当理解的是,例如,确定所述目标候选运动信息为所述当前解码图像块的运动信息;或者,所述目标候选运动信息为运动矢量预测值,基于所述运动矢量预测值和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD,确定所述当前解码图像块的运动信息。Predict / obtain motion information of the current decoded image block based on the target candidate motion information; it should be understood that, for example, determining the target candidate motion information is motion information of the current decoded image block; or, the target The candidate motion information is a motion vector prediction value, and motion information of the current decoded image block is determined based on the motion vector prediction value and a motion vector residual value MVD of the current image block parsed from the code stream.
本申请实施例中,在图像解码过程中不断更新历史候选列表,在构建当前解码图像块的候选运动信息列表(比如merge候选列表或AMVP候选列表)的过程中,根据当前解码图像块的预测模式来决定是否将历史候选列表中的历史候选加入到对应的候选运动信息列表中,比如:在当前解码图像块的帧间预测模式为inter模式时,不将历史候选列表中的历史候选运动信息加入到AMVP候选列表中;在当前解码图像块的帧间预测模式为merge/skip模式时,将历史候选列表中的历史候选运动信息加入到融合候选列表中;这样的话,一旦构建的历史候选列表中的历史候选的数目较多时,使用历史候选列表来构建候选运动信息列表的过程中,能一定程序上减少查找重复项的操作,从而一定程度上提高了编解码性能。In the embodiment of the present application, the historical candidate list is continuously updated during the image decoding process. During the process of constructing a candidate motion information list (such as a merge candidate list or an AMVP candidate list) of the currently decoded image block, according to the prediction mode of the currently decoded image block To determine whether historical candidates in the historical candidate list are added to the corresponding candidate motion information list, for example, when the inter prediction mode of the currently decoded image block is inter mode, the historical candidate motion information in the historical candidate list is not added To the AMVP candidate list; when the inter prediction mode of the currently decoded image block is the merge / skip mode, the historical candidate motion information in the historical candidate list is added to the fusion candidate list; in this case, once the historical candidate list is constructed When there are a large number of historical candidates, the process of using the historical candidate list to construct a candidate motion information list can reduce the number of operations to find duplicate items in a certain program, thereby improving the encoding and decoding performance to a certain extent.
在本申请解码装置的实施例的某些实现方式中,所述第一候选运动信息列表包括所述 当前解码图像块的空域参考块的运动信息和/或当前解码图像块的时域参考块的运动信息,其中所述空域参考块包括:与当前解码图像块空域邻接的相邻块的运动信息和/或一个或者多个与当前解码图像块空域不邻接的非相邻块的运动信息;所述时域参考块包括:在参考帧中与所述当前解码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息;所述第二候选运动信息列表包括所述当前解码图像块的空域参考块的运动矢量和/或当前解码图像块的时域参考块的运动矢量;In some implementations of the embodiments of the decoding apparatus of the present application, the first candidate motion information list includes motion information of a spatial reference block of the currently decoded image block and / or time domain reference blocks of the currently decoded image block. Motion information, wherein the spatial domain reference block includes: motion information of adjacent blocks adjacent to the spatial domain of the currently decoded image block and / or motion information of one or more non-adjacent blocks that are not adjacent to the spatial domain of the currently decoded image block; The time-domain reference block includes: motion information of a neighboring block at a lower right corner of a co-located block at a same position as the current decoded image block in a reference frame, or motion information of a center position of the co-located block; The two candidate motion information lists include a motion vector of a spatial domain reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block;
或者,or,
所述第一候选运动信息列表包括所述当前解码图像块的空域参考块的运动矢量和/或当前解码图像块的时域参考块的运动矢量;所述第二候选运动信息列表包括所述当前解码图像块的空域参考块的运动信息和/或当前解码图像块的时域参考块的运动信息。The first candidate motion information list includes a motion vector of a spatial reference block of the currently decoded image block and / or a motion vector of a time domain reference block of the currently decoded image block; the second candidate motion information list includes the current Motion information of a spatial domain reference block of a decoded image block and / or motion information of a time domain reference block of a currently decoded image block.
在本申请解码装置的实施例的某些实现方式中,在所述将所述历史候选列表中的历史候选运动信息加入当前解码图像块的第一候选运动信息列表中的方面,所述帧间预测单元用于:In some implementations of the embodiments of the decoding device of the present application, in the aspect of adding historical candidate motion information in the historical candidate list to a first candidate motion information list of a currently decoded image block, the inter-frame The prediction unit is used to:
在所述历史候选列表中的第一历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第一历史候选运动信息加入所述第一候选运动信息列表中,In a case where the first historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the first historical candidate motion information to all In the first candidate motion information list,
在所述历史候选列表中的第二历史候选运动信息与所述第一候选运动信息列表中的一个或多个候选运动信息均不相同的情况下,将所述第二历史候选运动信息加入所述第一候选运动信息列表中,其中:If the second historical candidate motion information in the historical candidate list is different from one or more candidate motion information in the first candidate motion information list, adding the second historical candidate motion information to all The first candidate motion information list is as follows:
在第一历史候选运动信息加入所述历史候选列表的时间晚于第二历史候选运动信息加入所述历史候选列表的时间的情况下,所述第一历史候选运动信息相对于所述第二历史候选运动信息先加入所述第一候选运动信息列表。In a case where the first historical candidate motion information is added to the historical candidate list later than the second historical candidate motion information is added to the historical candidate list, the first historical candidate motion information is relative to the second history The candidate motion information is first added to the first candidate motion information list.
本申请实施例中,一旦构建的历史候选列表中的历史候选的数目较多时,能进一步提高帧间预测效率,从而一定程度上提高了编解码性能。In the embodiment of the present application, once the number of historical candidates in the constructed historical candidate list is large, the inter prediction efficiency can be further improved, thereby improving the encoding and decoding performance to a certain extent.
在本申请解码装置的实施例的某些实现方式中,在所述基于所述当前解码图像块的帧间预测模式对当前解码图像块执行帧间预测过程的方面,所述帧间预测单元(82)用于:In some implementations of the embodiments of the decoding device of the present application, in the aspect that the inter prediction process is performed on the current decoded image block based on the inter prediction mode of the current decoded image block, the inter prediction unit ( 82) For:
从与当前解码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选运动信息,所述目标候选运动信息用于预测所述当前解码图像块的运动信息,其中所述历史候选列表中的一个或多个历史候选运动信息被包括于所述候选运动信息列表中;The target candidate motion information is determined from a candidate motion information list corresponding to the inter prediction mode of the currently decoded image block, and the target candidate motion information is used to predict the motion information of the currently decoded image block, where in the historical candidate list One or more historical candidate motion information is included in the candidate motion information list;
根据所述当前解码图像块的运动信息对当前解码图像块进行帧间预测,得到所述当前解码图像块的预测图像(亦即预测像素值)。Inter prediction is performed on the current decoded image block according to the motion information of the current decoded image block to obtain a predicted image (that is, a predicted pixel value) of the current decoded image block.
本申请实施例在图像解码过程中不断更新历史候选列表,通过在当前解码图像块的候选运动信息列表(比如融合运动信息候选列表或运动矢量预测候选列表)中加入历史候选运动信息(history candidate)的装置,增加了候选运动信息(例如merge/skip的融合运 动信息候选或inter模式的运动矢量预测候选)的数量,提高了预测效率。In the embodiment of the present application, the historical candidate list is continuously updated during the image decoding process, and historical candidate motion information (history candidate) is added to the candidate motion information list of the currently decoded image block (such as the fused motion information candidate list or the motion vector prediction candidate list). The device increases the number of candidate motion information (for example, merge / skip fusion motion information candidate or inter-mode motion vector prediction candidate), and improves prediction efficiency.
在本申请解码装置的实施例的某些实现方式中,所述装置还包括:In some implementations of the embodiments of the decoding apparatus of the present application, the apparatus further includes:
重建单元(90),用于基于所述当前解码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前解码图像块的预测图像(亦即预测像素值),得到所述当前解码图像块的重建图像。应当理解的是,如果当前解码图像块的预测图像与当前解码图像块的原始图像相同,则没有所述当前解码图像块的残差图像(亦即残差值),则基于所述帧间预测过程得到的当前解码图像块的预测图像(亦即预测像素值),得到所述当前解码图像块的重建图像。A reconstruction unit (90), configured to be based on a residual image (that is, a residual value) of the current decoded image block and a predicted image (that is, a predicted pixel value) of the current decoded image block obtained by the inter prediction process A reconstructed image of the current decoded image block is obtained. It should be understood that if the predicted image of the currently decoded image block is the same as the original image of the currently decoded image block, there is no residual image (that is, a residual value) of the currently decoded image block, based on the inter prediction The predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the process, and a reconstructed image of the currently decoded image block is obtained.
图12是根据一示例性实施例的包含图2A的编码器20和/或图2B的解码器200的视频编码系统1200的实例的说明图。系统1200可以实现本申请的各种技术的组合。在所说明的实施方式中,视频编码系统1200可以包含成像设备1201、视频编码器20、视频解码器30(和/或藉由处理单元1206的逻辑电路1207实施的视频编码器)、天线1202、一个或多个处理器1203、一个或多个存储器1204和/或显示设备1205。FIG. 12 is an explanatory diagram of an example of a video encoding system 1200 including the
如图所示,成像设备1201、天线1202、处理单元1206、逻辑电路1207、视频编码器20、视频解码器30、处理器1203、存储器1204和/或显示设备1205能够互相通信。如所论述,虽然用视频编码器20和视频解码器30绘示视频编码系统1200,但在不同实例中,视频编码系统1200可以只包含视频编码器20或只包含视频解码器30。As shown, the imaging device 1201, antenna 1202, processing unit 1206, logic circuit 1207,
在一些实例中,如图所示,视频编码系统1200可以包含天线1202。例如,天线1202可以用于传输或接收视频数据的经编码比特流。另外,在一些实例中,视频编码系统1200可以包含显示设备1205。显示设备1205可以用于呈现视频数据。在一些实例中,如图所示,逻辑电路1207可以通过处理单元1206实施。处理单元1206可以包含专用集成电路(application-specific integrated circuit,ASIC)逻辑、图形处理器、通用处理器等。视频编码系统1200也可以包含可选处理器1203,该可选处理器1203类似地可以包含专用集成电路(application-specific integrated circuit,ASIC)逻辑、图形处理器、通用处理器等。在一些实例中,逻辑电路1207可以通过硬件实施,如视频编码专用硬件等,处理器1203可以通过通用软件、操作系统等实施。另外,存储器1204可以是任何类型的存储器,例如易失性存储器(例如,静态随机存取存储器(Static Random Access Memory,SRAM)、动态随机存储器(Dynamic Random Access Memory,DRAM)等)或非易失性存储器(例如,闪存等)等。在非限制性实例中,存储器1204可以由超速缓存内存实施。在一些实例中,逻辑电路1207可以访问存储器1204(例如用于实施图像缓冲器)。在其它实例中,逻辑电路1207和/或处理单元1206可以包含存储器(例如,缓存等)用于实施图像缓冲器等。In some examples, as shown, the video encoding system 1200 may include an antenna 1202. For example, the antenna 1202 may be used to transmit or receive an encoded bit stream of video data. In addition, in some examples, the video encoding system 1200 may include a display device 1205. The display device 1205 may be used to present video data. In some examples, as shown, the logic circuit 1207 may be implemented by the processing unit 1206. The processing unit 1206 may include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like. The video encoding system 1200 may also include an optional processor 1203, which may similarly include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, and the like. In some examples, the logic circuit 1207 can be implemented by hardware, such as dedicated hardware for video encoding, and the processor 1203 can be implemented by general software, operating system, and the like. In addition, the memory 1204 may be any type of memory, such as volatile memory (for example, Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), etc.) or non-volatile memory Memory (for example, flash memory, etc.). In a non-limiting example, the memory 1204 may be implemented by a cache memory. In some examples, the logic circuit 1207 may access the memory 1204 (eg, for implementing an image buffer). In other examples, the logic circuit 1207 and / or the processing unit 1206 may include a memory (eg, a cache, etc.) for implementing an image buffer or the like.
在一些实例中,通过逻辑电路实施的视频编码器20可以包含(例如,通过处理单元1206或存储器1204实施的)图像缓冲器和(例如,通过处理单元1206实施的)图形处理单元。图形处理单元可以通信耦合至图像缓冲器。图形处理单元可以包含通过逻辑电路1207实施的视频编码器20,以实施参照图2A和/或本文中所描述的任何其它编码器系统或子系统所论述的各种单元。逻辑电路可以用于执行本文所论述的各种操作。In some examples,
视频解码器30可以以类似方式通过逻辑电路1207实施,以实施参照图2B的解码器200和/或本文中所描述的任何其它解码器系统或子系统所论述的各种单元。在一些实例中,逻辑电路实施的视频解码器30可以包含(通过处理单元2820或存储器1204实施的)图像缓冲器和(例如,通过处理单元1206实施的)图形处理单元。图形处理单元可以通信耦合至图像缓冲器。图形处理单元可以包含通过逻辑电路1207实施的视频解码器30,以实施参照图2B和/或本文中所描述的任何其它解码器系统或子系统所论述的各种单元。
在一些实例中,视频编码系统1200的天线1202可以用于接收视频数据的经编码比特流。如所论述,经编码比特流可以包含本文所论述的与编码视频帧相关的数据、指示符、索引值、模式选择数据等,例如与编码分割相关的数据(例如,变换系数或经量化变换系数,(如所论述的)可选指示符,和/或定义编码分割的数据)。视频编码系统1200还可包含耦合至天线1202并用于解码经编码比特流的视频解码器30。显示设备1205用于呈现视频帧。In some examples, the antenna 1202 of the video encoding system 1200 may be used to receive an encoded bit stream of video data. As discussed, the encoded bitstream may contain data, indicators, index values, mode selection data, etc. related to encoded video frames discussed herein, such as data related to coded segmentation (e.g., transform coefficients or quantized transform coefficients , (As discussed) optional indicators, and / or data defining code partitions). Video encoding system 1200 may also include a
图13为本申请实施例的编码设备或解码设备(简称为译码设备1300)的一种实现方式的示意性框图。其中,译码设备1300可以包括处理器1310、存储器1330和总线系统1350。其中,处理器和存储器通过总线系统相连,该存储器用于存储指令,该处理器用于执行该存储器存储的指令。编码设备的存储器存储程序代码,且处理器可以调用存储器中存储的程序代码执行本申请描述的各种视频编码或解码方法,尤其是在各种帧间预测模式或帧内预测模式下的视频编码或解码方法,以及在各种帧间或帧内预测模式下预测运动信息的方法。为避免重复,这里不再详细描述。FIG. 13 is a schematic block diagram of an implementation manner of an encoding device or a decoding device (referred to as a decoding device 1300) according to an embodiment of the present application. The decoding device 1300 may include a
在本申请实施例中,该处理器1310可以是中央处理单元(Central Processing Unit,简称为“CPU”),该处理器1310还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In the embodiment of the present application, the
该存储器1330可以包括只读存储器(ROM)设备或者随机存取存储器(RAM)设备。任何其他适宜类型的存储设备也可以用作存储器1330。存储器1330可以包括由处理器1310使用总线1350访问的代码和数据1331。存储器1330可以进一步包括操作系统1333和应用程序1335,该应用程序1335包括允许处理器1310执行本申请描述的视频编码或解码方法(尤其是本申请描述的基于历史候选列表的图像编码方法或基于历史候选列表的图像解码方法)的至少一个程序。例如,应用程序1335可以包括应用1至N,其进一步包括执行在本申请描述的视频编码或解码方法的视频编码或解码应用(简称视频译码应用)。The
该总线系统1350除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统1350。The
可选的,译码设备1300还可以包括一个或多个输出设备,诸如显示器1370。在一个示例中,显示器1370可以是触感显示器或触摸显示屏,其将显示器与可操作地感测触摸输 入的触感单元合并。显示器1370可以经由总线1350连接到处理器1310。Optionally, the decoding device 1300 may further include one or more output devices, such as a
本领域技术人员能够领会,结合本文公开描述的各种说明性逻辑框、单元和算法步骤所描述的功能可以硬件、软件、固件或其任何组合来实施。如果以软件来实施,那么各种说明性逻辑框、单元、和步骤描述的功能可作为一或多个指令或代码在计算机可读媒体上存储或传输,且由基于硬件的处理单元执行。计算机可读媒体可包含计算机可读存储媒体,其对应于有形媒体,例如数据存储媒体,或包括任何促进将计算机程序从一处传送到另一处的媒体(例如,根据通信协议)的通信媒体。以此方式,计算机可读媒体大体上可对应于(1)非暂时性的有形计算机可读存储媒体,或(2)通信媒体,例如信号或载波。数据存储媒体可为可由一或多个计算机或一或多个处理器存取以检索用于实施本申请中描述的技术的指令、代码和/或数据结构的任何可用媒体。计算机程序产品可包含计算机可读媒体。Those skilled in the art can appreciate that the functions described in connection with the various illustrative logical blocks, units and algorithm steps disclosed in the present disclosure may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described by the various illustrative logical boxes, units, and steps may be stored or transmitted as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol) . In this manner, computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures used to implement the techniques described in this application. The computer program product may include a computer-readable medium.
作为实例而非限制,此类计算机可读存储媒体可包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储装置、磁盘存储装置或其它磁性存储装置、快闪存储器或可用来存储指令或数据结构的形式的所要程序代码并且可由计算机存取的任何其它媒体。并且,任何连接被恰当地称作计算机可读媒体。举例来说,如果使用同轴缆线、光纤缆线、双绞线、数字订户线(DSL)或例如红外线、无线电和微波等无线技术从网站、服务器或其它远程源传输指令,那么同轴缆线、光纤缆线、双绞线、DSL或例如红外线、无线电和微波等无线技术包含在媒体的定义中。但是,应理解,所述计算机可读存储媒体和数据存储媒体并不包括连接、载波、信号或其它暂时媒体,而是实际上针对于非暂时性有形存储媒体。如本文中所使用,磁盘和光盘包含压缩光盘(CD)、激光光盘、光学光盘、数字多功能光盘(DVD)和蓝光光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光以光学方式再现数据。以上各项的组合也应包含在计算机可读媒体的范围内。By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or may be used to store instructions or data structures Any form of desired program code and any other medium accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, a coaxial cable is used to transmit instructions from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave. Wire, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of media. It should be understood, however, that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other temporary media, but are instead directed to non-transitory tangible storage media. As used herein, magnetic disks and compact discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, and optical discs use lasers to reproduce optically data. Combinations of the above should also be included within the scope of computer-readable media.
可通过例如一或多个数字信号处理器(DSP)、通用微处理器、专用集成电路(ASIC)、现场可编程逻辑阵列(FPGA)或其它等效集成或离散逻辑电路等一或多个处理器来执行相应的功能。因此,如本文中所使用的术语“处理器”可指前述结构或适合于实施本文中所描述的技术的任一其它结构中的任一者。另外,在一些方面中,本文中所描述的各种说明性逻辑框、单元、和步骤所描述的功能可以提供于经配置以用于编码和解码的专用硬件和/或软件单元内,或者并入在组合编解码器中。而且,所述技术可完全实施于一或多个电路或逻辑元件中。在一种示例下,视频编码器20及视频解码器30中的各种说明性逻辑框、单元、单元可以理解为对应的电路器件或逻辑元件。Can be processed by one or more, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits To perform the corresponding function. Accordingly, the term "processor" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logical blocks, units, and steps described herein may be provided within dedicated hardware and / or software units configured for encoding and decoding, or Into the combined codec. Moreover, the techniques can be fully implemented in one or more circuits or logic elements. In one example, various illustrative logical boxes, units, and units in the
本申请的技术可在各种各样的装置或设备中实施,包含无线手持机、集成电路(IC)或一组IC(例如,芯片组)。本申请中描述各种组件、单元或单元是为了强调用于执行所揭示的技术的装置的功能方面,但未必需要由不同硬件单元实现。实际上,如上文所描述,各种单元可结合合适的软件和/或固件组合在编码解码器硬件单元中,或者通过互操作硬件单元(包含如上文所描述的一或多个处理器)来提供。The techniques of this application may be implemented in a wide variety of devices or devices, including a wireless handset, an integrated circuit (IC), or a group of ICs (eg, a chipset). Various components, units, or units are described in this application to emphasize functional aspects of the apparatus for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in a codec hardware unit in combination with suitable software and / or firmware, or through interoperable hardware units (including one or more processors as described above) provide.
以上所述,仅为本申请示例性的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。The above description is only an exemplary specific implementation of the present application, but the scope of protection of the present application is not limited to this. Any person skilled in the art can easily think of changes or changes within the technical scope disclosed in this application. Replacement shall be covered by the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Claims (44)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810991217.1A CN110868613B (en) | 2018-08-28 | 2018-08-28 | Image encoding method, image decoding method and device based on historical candidate list |
| CN201810991217.1 | 2018-08-28 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020043111A1 true WO2020043111A1 (en) | 2020-03-05 |
Family
ID=69642896
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/102924 Ceased WO2020043111A1 (en) | 2018-08-28 | 2019-08-28 | Historic candidate list-based image coding and decoding methods, and codec |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110868613B (en) |
| WO (1) | WO2020043111A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112261413A (en) * | 2020-10-22 | 2021-01-22 | 北京奇艺世纪科技有限公司 | Video encoding method, encoding device, electronic device, and storage medium |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20240074907A (en) | 2020-03-31 | 2024-05-28 | 베이징 다지아 인터넷 인포메이션 테크놀로지 컴퍼니 리미티드 | Methods and apparatuses for signaling of syntax elements in video coding |
| WO2021196211A1 (en) | 2020-04-03 | 2021-10-07 | Oppo广东移动通信有限公司 | Inter-frame prediction method, encoder, decoder, and storage medium |
| CN112218092B (en) * | 2020-10-17 | 2022-09-06 | 浙江大华技术股份有限公司 | Encoding method, apparatus and storage medium for string encoding technique |
| WO2025213394A1 (en) * | 2024-04-10 | 2025-10-16 | Oppo广东移动通信有限公司 | Encoding method, decoding method, encoder, decoder, and storage medium |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103931192A (en) * | 2011-11-08 | 2014-07-16 | 三星电子株式会社 | Method and device for motion vector determination in video encoding or decoding |
| CN105120290A (en) * | 2015-08-04 | 2015-12-02 | 宁波大学 | Fast coding method for depth video |
| CN105637874A (en) * | 2013-10-18 | 2016-06-01 | Lg电子株式会社 | Video decoding apparatus and method for decoding multi-view video |
| US9549200B1 (en) * | 2011-04-11 | 2017-01-17 | Texas Instruments Incorporated | Parallel motion estimation in video coding |
| CN107318016A (en) * | 2017-05-08 | 2017-11-03 | 上海大学 | A kind of HEVC inter-frame forecast mode method for rapidly judging based on zero piece of distribution |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP4568249A3 (en) * | 2010-09-02 | 2025-07-30 | LG Electronics Inc. | Inter prediction method and device |
| CN104853209B (en) * | 2014-02-16 | 2020-09-29 | 同济大学 | Image coding and decoding method and device |
| CN108353184B (en) * | 2015-11-05 | 2022-02-01 | 联发科技股份有限公司 | Video coding and decoding method and device |
-
2018
- 2018-08-28 CN CN201810991217.1A patent/CN110868613B/en active Active
-
2019
- 2019-08-28 WO PCT/CN2019/102924 patent/WO2020043111A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9549200B1 (en) * | 2011-04-11 | 2017-01-17 | Texas Instruments Incorporated | Parallel motion estimation in video coding |
| CN103931192A (en) * | 2011-11-08 | 2014-07-16 | 三星电子株式会社 | Method and device for motion vector determination in video encoding or decoding |
| CN105637874A (en) * | 2013-10-18 | 2016-06-01 | Lg电子株式会社 | Video decoding apparatus and method for decoding multi-view video |
| CN105120290A (en) * | 2015-08-04 | 2015-12-02 | 宁波大学 | Fast coding method for depth video |
| CN107318016A (en) * | 2017-05-08 | 2017-11-03 | 上海大学 | A kind of HEVC inter-frame forecast mode method for rapidly judging based on zero piece of distribution |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112261413A (en) * | 2020-10-22 | 2021-01-22 | 北京奇艺世纪科技有限公司 | Video encoding method, encoding device, electronic device, and storage medium |
| CN112261413B (en) * | 2020-10-22 | 2023-10-31 | 北京奇艺世纪科技有限公司 | Video encoding method, encoding device, electronic device, and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110868613B (en) | 2021-10-01 |
| CN110868613A (en) | 2020-03-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI791723B (en) | Method and apparatus for image prediction, video encoder and video decoder | |
| CN109792531B (en) | Method, device and storage medium for encoding and decoding video data | |
| CN107710764B (en) | System and method for determining illumination compensation states for video coding | |
| JP5869122B2 (en) | Predictive data buffering in video coding | |
| CN106576171B (en) | A method and device for encoding and decoding video data | |
| US9854234B2 (en) | Reference picture status for video coding | |
| JP6239609B2 (en) | Signaling long-term reference pictures for video coding | |
| WO2019120305A1 (en) | Method for predicting motion information of image block , device and codec | |
| US20130272409A1 (en) | Bandwidth reduction in video coding through applying the same reference index | |
| US12225203B2 (en) | Motion vector obtaining method and apparatus, computer device, and storage medium | |
| CN110800304A (en) | Motion-based prioritization for constructing candidate lists in video coding | |
| CN115361564B (en) | Motion vector acquisition method, device, equipment and computer readable storage medium | |
| CN107079170B (en) | Design of POC Values for Multi-layer Video Coding | |
| JP6067750B2 (en) | Implicit derivation of parallel motion estimation range size | |
| WO2020043111A1 (en) | Historic candidate list-based image coding and decoding methods, and codec | |
| JP2025000616A (en) | Subblock temporal motion vector prediction for video encoding and decoding | |
| WO2019154424A1 (en) | Video decoding method, video decoder, and electronic device | |
| CN110896485B (en) | A decoding method and device for predicting motion information | |
| WO2020047807A1 (en) | Inter prediction method and apparatus, and codec | |
| US11394996B2 (en) | Video coding method and apparatus | |
| CN110546956B (en) | Inter-frame prediction method and device | |
| WO2019084776A1 (en) | Method and device for obtaining candidate motion information of image block, and codec |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19855671 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19855671 Country of ref document: EP Kind code of ref document: A1 |