Video decoding method and video decoder
The video decoding method shares a context model for syntax elements to enhance decoding efficiency and reduce storage needs, addressing the challenge of further compressing video data beyond HEVC standards.
Patent Information
- Application Number
- JP2025094000
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-09-10
- Filing Date
- 2025-06-05
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2039-09-10
AI Technical Summary
Existing video coding standards, such as HEVC, struggle to further compress video data without sacrificing image quality, leading to significant storage and communication network burdens.
A video decoding method that shares a context model for syntax elements in a current block, reducing the need for storage space by eliminating redundant context model checks and allowing a single context model to be used for multiple syntax elements.
This approach enhances decoding efficiency and reduces storage requirements in video decoders by minimizing the need for multiple context models, thereby optimizing space utilization.
Smart Images

Figure 2025131740000001_ABST
Abstract
Description
[Background technology]
[0001] This application claims priority to Chinese Patent Application No. 201811053068.0, entitled "Video Decoding Method and Video Decoder," filed with the State Intellectual Property Office of the People's Republic of China on September 10, 2018, the entire contents of which are incorporated herein by reference.
[0002] Technical Field FIELD Embodiments of the present application relate generally to the field of video coding, and more particularly to video decoding methods and video decoders.
[0003] background Video coding (video encoding and decoding) is used in a wide range of digital video applications, such as broadcast digital TV, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat and video conferencing, DVD and Blu-ray Discs, video content capture and editing systems, and security applications in camcorders.
[0004] The development of the block-based hybrid video coding mode in the H.261 standard in 1990 led to the development of new video coding techniques and tools, laying the foundation for new video coding standards. Other video coding standards include 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 (AVC), and ITU-T H.265 / High Efficiency Video Coding (HEVC), as well as extensions of such standards, such as scalability and / or 3D (three-dimensional) extensions. As video production and consumption become increasingly prevalent, video traffic has become a significant burden on communication networks and data storage. Therefore, one of the goals of many video coding standards is to reduce bit rates compared to previous standards without sacrificing image quality. Although the latest high efficiency video coding (HEVC) is capable of compressing video at approximately twice the rate of AVC without sacrificing image quality, there is still an urgent need for new techniques to further compress video compared to HEVC. Summary of the Invention
[0005] SUMMARY OF THE INVENTION Embodiments of the present application provide a video decoding method and a video decoder that reduces the space required by an encoder or decoder to store context.
[0006] These and other objects are achieved by the subject matter of the independent claims. Further implementations are evident from the dependent claims, the description and the accompanying drawings.
[0007] According to a first aspect, there is provided a video decoding method, the video decoding method including: analyzing a received bitstream to obtain syntax elements to be entropy decoded in a current block, where the syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block; performing entropy decoding on the syntax elements to be entropy decoded in the current block, where the entropy decoding for syntax element 1 in the current block is completed by using a pre-set context model, or the entropy decoding for syntax element 2 in the current block is completed by using a context model; performing a prediction process on the current block based on the syntax elements in the current block obtained by entropy decoding to obtain a predicted block of the current block; and obtaining a reconstructed image of the current block based on the predicted block of the current block.
[0008] Because syntax element 1 and syntax element 2 in the current block share one context model, the decoder does not need to check the context model when performing entropy decoding, improving the decoding efficiency of video decoding by the decoder. Furthermore, because the video decoder only needs to store one context model for syntax element 1 and syntax element 2, less storage space in the video decoder may be occupied.
[0009] According to a second aspect, there is provided a video decoding method, the video decoding method including: parsing a received bitstream to obtain syntax elements to be entropy decoded in a current block, where the syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block; obtaining context models corresponding to the syntax elements to be entropy decoded, where the context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set; performing entropy decoding on the syntax elements to be entropy decoded based on the context model corresponding to the syntax elements to be entropy decoded in the current block; performing a prediction process on the current block based on the syntax elements in the current block obtained by entropy decoding to obtain a predicted block of the current block; and obtaining a reconstructed image of the current block based on the predicted block of the current block.
[0010] Because syntax element 1 and syntax element 2 in the current block share one context model, the video decoder only needs to store one context model for syntax element 1 and syntax element 2, occupying less storage space in the video decoder.
[0011] Regarding the second aspect, in a possible implementation, the number of context models in the preset context model set is two or three.
[0012] Regarding the second aspect, in a possible implementation, determining a context model corresponding to syntax element 1 in the current block from a preset context model set includes determining a context index for syntax element 1 in the current block based on syntax element 1 and syntax element 2 in a left-neighboring block of the current block and syntax element 1 and syntax element 2 in an above-neighboring block of the current block, wherein the context index for syntax element 1 in the current block is used to indicate the context model corresponding to syntax element 1 in the current block; or Determining a context model corresponding to syntax element 2 in the current block from a preset context model set includes determining a context index for syntax element 2 in the current block based on syntax element 1 and syntax element 2 in a left-adjacent block of the current block and syntax element 1 and syntax element 2 in an above-adjacent block of the current block, and the context index for syntax element 2 in the current block is used to indicate the context model corresponding to syntax element 2 in the current block.
[0013] Regarding the second aspect, in a possible implementation, when the amount of context models in the preset context model set is 3, the value of the context index of the syntax element 1 in the current block is the sum of the value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the upper adjacent block and the value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the left adjacent block; or The value of the context index of syntax element 2 in the current block is the sum of the value obtained by performing an OR operation on syntax elements 1 and 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax elements 1 and 2 in the left adjacent block.
[0014] Regarding the second aspect, in a possible implementation, when the amount of context models in the preset context model set is 2, the value of the context index of the syntax element 1 in the current block is a result obtained by performing an OR operation on the value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the top-neighboring block and the value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the left-neighboring block; or The value of the context index of syntax element 2 in the current block is the result of performing an OR operation on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block.
[0015] Regarding the first or second aspect, in a possible implementation, syntax element 1 in the current block is affine_merge_flag, which is used to indicate whether an affine motion model-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether an affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice, or Syntax element 1 in the current block is subblock_merge_flag, which is used to indicate whether the subblock-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether the affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice.
[0016] According to a third aspect, there is provided a video decoding method, the video decoding method including: parsing a received bitstream to obtain syntax elements to be entropy decoded in a current block, where the syntax elements to be entropy decoded in the current block include syntax element 3 in the current block or syntax element 4 in the current block; obtaining context models corresponding to the syntax elements to be entropy decoded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set; performing entropy decoding on the syntax elements to be entropy decoded, based on the context model corresponding to the syntax elements to be entropy decoded in the current block; performing a prediction process on the current block, based on the syntax elements in the current block and obtained by entropy decoding, to obtain a predicted block of the current block; and obtaining a reconstructed image of the current block based on the predicted block of the current block.
[0017] Because syntax element 3 and syntax element 4 in the current block share one context model, the video decoder only needs to store one context model for syntax element 3 and syntax element 4, occupying less storage space in the video decoder.
[0018] Regarding the third aspect, in a possible implementation, the pre-configured context model set includes five context models.
[0019] Regarding the third aspect, in a possible implementation, syntax element 3 in the current block is merge_idx, which is used to indicate an index value of the merge candidate list of the current block, or syntax element 4 in the current block is affine_merge_idx, which is used to indicate an index value of the affine merge candidate list of the current block, or Syntax element 3 in the current block is merge_idx, which is used to indicate the index value of the merge candidate list of the current block, or syntax element 4 in the current block is subblock_merge_idx, which is used to indicate the index value of the subblock merge candidate list.
[0020] According to a fourth aspect, there is provided a video decoding method, the video decoding method including: parsing a received bitstream to obtain syntax elements to be entropy decoded in a current block, where the syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block; determining values of context indexes of the syntax elements to be entropy decoded in the current block based on values of syntax element 1 and syntax element 2 in a left-neighboring block of the current block and values of syntax element 1 and syntax element 2 in an above-neighboring block of the current block; performing entropy decoding on the syntax elements to be entropy decoded based on the values of the context indexes of the syntax elements to be entropy decoded in the current block; performing a prediction process on the current block based on the syntax elements in the current block obtained by entropy decoding to obtain a predicted block of the current block; and obtaining a reconstructed image of the current block based on the predicted block of the current block.
[0021] Regarding the fourth aspect, in a possible implementation, syntax element 1 in the current block is affine_merge_flag, which is used to indicate whether an affine motion model-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether an affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice, or Syntax element 1 in the current block is subblock_merge_flag, which is used to indicate whether the subblock-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether the affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice.
[0022] Regarding the fourth aspect, in a possible implementation, the step of determining a value of a context index of a syntax element to be entropy decoded in the current block based on the values of syntax element 1 and syntax element 2 in a left-neighboring block of the current block and the values of syntax element 1 and syntax element 2 in an upper-neighboring block of the current block includes: The context index value of the syntax element to be entropy decoded in the current block is expressed as the following logical expression: Context index = (condL && availableL) + (condA && availableA) determining the number of times ... condL = syntax element 1 [x0-1][y0] | syntax element 2 [x0-1][y0] where syntax element 1 [x0-1][y0] indicates the value of syntax element 1 in the left adjacent block, and syntax element 2 [x0-1][y0] indicates the value of syntax element 2 in the left adjacent block, condA = syntax element 1 [x0][y0-1] | syntax element 2 [x0][y0-1] where syntax element 1 [x0][y0-1] indicates the value of syntax element 1 in the upper adjacent block, syntax element 2 [x0][y0-1] indicates the value of syntax element 2 in the upper adjacent block, availableL indicates whether the left adjacent block is available, and availableA indicates whether the top adjacent block is available.
[0023] According to a fifth aspect, a video decoder is provided, the video decoder including an entropy decoding unit configured to parse a received bitstream to obtain syntax elements to be entropy decoded in a current block, where the syntax elements to be entropy decoded in the current block include a syntax element 1 in the current block or a syntax element 2 in the current block, and the entropy decoding unit obtains an entropy decoding target for the current block based on values of the syntax element 1 and the syntax element 2 in a left-neighboring block of the current block and values of the syntax element 1 and the syntax element 2 in an up-neighboring block of the current block. The encoding method includes an entropy decoding unit configured to determine a value of a context index of a target syntax element and perform entropy decoding on the syntax element to be entropy decoded based on the value of the context index of the syntax element to be entropy decoded in the current block; a prediction processing unit configured to perform a prediction process on the current block based on the syntax elements in the current block that are obtained by entropy decoding, to obtain a predicted block of the current block; and a reconstruction unit configured to obtain a reconstructed image of the current block based on the predicted block of the current block.
[0024] Regarding the fifth aspect, in a possible implementation, syntax element 1 in the current block is affine_merge_flag, which is used to indicate whether an affine motion model-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether an affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice, or Syntax element 1 in the current block is subblock_merge_flag, which is used to indicate whether the subblock-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether the affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice.
[0025] Regarding the fifth aspect, in a possible implementation, the entropy decoding unit specifically comprises: The context index value of the syntax element to be entropy decoded in the current block is expressed as the following logical expression: Context index = (condL && availableL) + (condA && availableA) and configured to determine the condL = syntax element 1 [x0-1][y0] | syntax element 2 [x0-1][y0] where syntax element 1 [x0-1][y0] indicates the value of syntax element 1 in the left adjacent block, syntax element 2 [x0-1][y0] indicates the value of syntax element 2 in the left adjacent block, condA = syntax element 1 [x0][y0-1] | syntax element 2 [x0][y0-1] where syntax element 1 [x0][y0-1] indicates the value of syntax element 1 in the upper adjacent block, and syntax element 2 [x0][y0-1] indicates the value of syntax element 2 in the upper adjacent block, availableL indicates whether the left adjacent block is available, and availableA indicates whether the top adjacent block is available.
[0026] According to a sixth aspect, there is provided a video decoder, the video decoder including: an entropy decoding unit configured to parse a received bitstream to obtain syntax elements in a current block to be entropy decoded, where the syntax elements in the current block to be entropy decoded include syntax element 1 in the current block or syntax element 2 in the current block, the entropy decoding unit configured to perform entropy decoding on the syntax elements in the current block to be entropy decoded, where the entropy decoding on syntax element 1 in the current block is completed by using a predetermined context model, or the entropy decoding on syntax element 2 in the current block is completed by using a context model; a prediction processing unit configured to perform prediction processing on the current block based on the syntax elements in the current block obtained by entropy decoding to obtain a predicted block of the current block; and a reconstruction unit configured to obtain a reconstructed image of the current block based on the predicted block of the current block.
[0027] According to a seventh aspect, there is provided a video decoder, the video decoder including: an entropy decoding unit configured to parse a received bitstream to obtain syntax elements in a current block to be entropy decoded, the syntax elements in the current block to be entropy decoded include syntax element 1 in the current block or syntax element 2 in the current block; and the entropy decoding unit configured to obtain a context model corresponding to the syntax elements to be entropy decoded, the context model corresponding to syntax element 1 in the current block being determined from a preset context model set, or The corresponding context model is determined from a preset context model set, and the entropy decoding unit includes: an entropy decoding unit configured to perform entropy decoding on syntax elements to be entropy decoded based on a context model corresponding to the syntax elements to be entropy decoded in the current block; a prediction processing unit configured to perform prediction processing on the current block based on the syntax elements in the current block that are obtained by entropy decoding, to obtain a predicted block of the current block; and a reconstruction unit configured to obtain a reconstructed image of the current block based on the predicted block of the current block.
[0028] Regarding the seventh aspect, in a possible implementation, the number of context models in the preset context model set is two or three.
[0029] Regarding the seventh aspect, in a possible implementation, the entropy decoding unit is specifically configured to determine a context index of the syntax element 1 in the current block based on the syntax element 1 and the syntax element 2 in the left-neighboring block of the current block and the syntax element 1 and the syntax element 2 in the upper-neighboring block of the current block, and the context index of the syntax element 1 in the current block is used to indicate a context model corresponding to the syntax element 1 in the current block; or The entropy decoding unit is specifically configured to determine a context index of syntax element 2 in the current block based on syntax element 1 and syntax element 2 in the left-neighboring block of the current block and syntax element 1 and syntax element 2 in the upper-neighboring block of the current block, and the context index of syntax element 2 in the current block is used to indicate a context model corresponding to syntax element 2 in the current block.
[0030] Regarding the seventh aspect, in a possible implementation, when the amount of context models in the preset context model set is 3, the value of the context index of the syntax element 1 in the current block is the sum of the value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the upper adjacent block and the value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the left adjacent block; or The value of the context index of syntax element 2 in the current block is the sum of the value obtained by performing an OR operation on syntax elements 1 and 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax elements 1 and 2 in the left adjacent block.
[0031] Regarding the seventh aspect, in a possible implementation, when the amount of context models in the preset context model set is 2, the value of the context index of the syntax element 1 in the current block is a result obtained by performing an OR operation on a value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the top-neighboring block and a value obtained by performing an OR operation on the syntax element 1 and the syntax element 2 in the left-neighboring block; or The value of the context index of syntax element 2 in the current block is the result of performing an OR operation on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block.
[0032] Regarding the sixth or seventh aspect, in a possible implementation, syntax element 1 in the current block is affine_merge_flag, which is used to indicate whether an affine motion model-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether an affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice, or Syntax element 1 in the current block is subblock_merge_flag, which is used to indicate whether the subblock-based merge mode is used for the current block, or syntax element 2 in the current block is affine_inter_flag, which is used to indicate whether the affine motion model-based AMVP mode is used for the current block if the slice in which the current block is located is a P-type slice or a B-type slice.
[0033] According to an eighth aspect, there is provided a video decoder, the video decoder including: an entropy decoding unit configured to parse a received bitstream to obtain syntax elements in a current block to be entropy decoded, where the syntax elements in the current block to be entropy decoded include syntax element 3 in the current block or syntax element 4 in the current block; and the entropy decoding unit configured to obtain a context model corresponding to the syntax elements to be entropy decoded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or is determined based on syntax element 4 in the current block. The corresponding context model is determined from a preset context model set, and the entropy decoding unit includes: an entropy decoding unit configured to perform entropy decoding on syntax elements to be entropy decoded based on a context model corresponding to the syntax elements to be entropy decoded in the current block; a prediction processing unit configured to perform prediction processing on the current block based on the syntax elements in the current block that are obtained by entropy decoding, to obtain a predicted block of the current block; and a reconstruction unit configured to obtain a reconstructed image of the current block based on the predicted block of the current block.
[0034] Regarding the eighth aspect, in a possible implementation, the pre-configured context model set includes five context models.
[0035] Regarding the eighth aspect, in a possible implementation, syntax element 3 in the current block is merge_idx, which is used to indicate an index value of the merge candidate list of the current block, or syntax element 4 in the current block is affine_merge_idx, which is used to indicate an index value of the affine merge candidate list of the current block, or Syntax element 3 in the current block is merge_idx, which is used to indicate the index value of the merge candidate list of the current block, or syntax element 4 in the current block is subblock_merge_idx, which is used to indicate the index value of the subblock merge candidate list.
[0036] According to a ninth aspect, there is provided an encoding method, the encoding method including: a step of obtaining syntax elements in a current block to be entropy coded, where the syntax elements in the current block to be entropy coded include syntax element 1 in the current block or syntax element 2 in the current block; a step of performing entropy coding on the syntax elements in the current block to be entropy coded, where, when entropy coding is performed on the syntax elements in the current block to be entropy coded, the entropy coding on syntax element 1 in the current block is completed by using a pre-set context model, or the entropy coding on syntax element 2 in the current block is completed by using a context model; and a step of outputting a bitstream including the syntax elements in the current block that are obtained by entropy coding.
[0037] For specific syntax elements and a specific context model, see the first aspect.
[0038] According to a tenth aspect, there is provided a coding method, the coding method including: obtaining syntax elements in a current block to be entropy coded, where the syntax elements in the current block to be entropy coded include syntax element 1 in the current block or syntax element 2 in the current block; obtaining context models corresponding to the syntax elements to be entropy coded, where the context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set; performing entropy coding on the syntax elements to be entropy coded based on the context model corresponding to the syntax elements in the current block to be entropy coded; and outputting a bitstream including the syntax elements in the current block that are obtained by entropy coding.
[0039] For specific syntax elements and specific context models, see the second aspect.
[0040] According to an eleventh aspect, there is provided a coding method, the coding method including the steps of: obtaining syntax elements in a current block to be entropy coded, where the syntax elements in the current block to be entropy coded include syntax element 3 in the current block or syntax element 4 in the current block; obtaining context models corresponding to the syntax elements to be entropy coded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set; performing entropy coding on the syntax elements to be entropy coded based on the context models corresponding to the syntax elements in the current block to be entropy coded; and outputting a bitstream including the syntax elements in the current block that are obtained by entropy coding.
[0041] For specific syntax elements and specific context models, see the third aspect.
[0042] According to a twelfth aspect, there is provided a video encoder, the video encoder including: an entropy encoding unit configured to obtain syntax elements in a current block to be entropy encoded, where the syntax elements in the current block to be entropy encoded include syntax element 1 in the current block or syntax element 2 in the current block, the entropy encoding unit configured to perform entropy encoding on the syntax elements in the current block to be entropy encoded, where, when entropy encoding is performed on the syntax elements in the current block to be entropy encoded, the entropy encoding on syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy encoding on syntax element 2 in the current block is completed by using the context model; and an output configured to output a bitstream including the syntax elements in the current block and obtained by entropy encoding.
[0043] For specific syntax elements and specific context models, see the fourth aspect.
[0044] According to a thirteenth aspect, there is provided a video encoder, the video encoder including: an entropy encoding unit configured to obtain syntax elements in a current block to be entropy encoded, where the syntax elements in the current block to be entropy encoded include syntax element 1 in the current block or syntax element 2 in the current block; the entropy encoding unit configured to obtain context models corresponding to the syntax elements to be entropy encoded, where the context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set; the entropy encoding unit configured to perform entropy encoding on the syntax elements to be entropy encoded based on the context model corresponding to the syntax elements in the current block to be entropy encoded; and an output configured to output a bitstream including the syntax elements in the current block and obtained by entropy encoding.
[0045] For specific syntax elements and specific context models, see the fifth aspect.
[0046] According to a fourteenth aspect, there is provided a video encoder, the video encoder including: an entropy encoding unit configured to obtain syntax elements in a current block to be entropy encoded, where the syntax elements in the current block to be entropy encoded include syntax element 3 in the current block or syntax element 4 in the current block; the entropy encoding unit configured to obtain context models corresponding to the syntax elements to be entropy decoded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set; the entropy encoding unit configured to perform entropy encoding on the syntax elements to be entropy encoded based on the context model corresponding to the syntax elements in the current block to be entropy encoded; and an output configured to output a bitstream including the syntax elements in the current block and obtained by entropy encoding.
[0047] For specific syntax elements and specific context models, see the sixth aspect.
[0048] According to a fifteenth aspect, the present invention relates to an apparatus for decoding a video stream, comprising a processor and a memory, the memory storing instructions enabling the processor to carry out the method of the first, second, third or fourth aspect or any possible implementation thereof.
[0049] According to a sixteenth aspect, the present invention relates to an apparatus for decoding a video stream, comprising a processor and a memory, the memory storing instructions enabling the processor to carry out the method of the seventh, eighth or ninth aspect or any possible implementation thereof.
[0050] According to a seventeenth aspect, a computer-readable storage medium is proposed. The computer-readable storage medium stores instructions that, when executed, enable one or more processors to encode video data. The instructions enable the one or more processors to perform a method according to the first, second, third, fourth, seventh, eighth, or ninth aspect, or any possible implementation thereof.
[0051] According to an eighteenth aspect, the present invention relates to a computer program comprising a program code which, when executed on a computer, performs the method of the first, second, third, fourth, seventh, eighth or ninth aspect or any possible implementation thereof.
[0052] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. [Brief explanation of the drawings]
[0053] In order to more clearly describe the technical solutions in the embodiments or background of the present application, the following briefly describes the accompanying drawings needed to describe the embodiments or background of the present application.
[0054] [Figure 1] 1 is a block diagram of an example video encoding system for implementing embodiments of the present invention;
[0055] [Figure 2] FIG. 2 is a block diagram illustrating an exemplary structure of a video encoder for implementing embodiments of the present invention.
[0056] [Figure 3] FIG. 2 is a block diagram illustrating an exemplary structure of a video decoder for implementing embodiments of the present invention.
[0057] [Figure 4] 4 shows a video coding system including the encoder 20 of FIG. 2 and the decoder 30 of FIG. 3.
[0058] [Figure 5] FIG. 10 is a block diagram showing an example of another encoding device or decoding device.
[0059] [Figure 6] 1 is a schematic diagram illustrating the location of candidate motion information in the spatial and temporal domains of a current block according to one embodiment;
[0060] [Figure 7] FIG. 2 is a schematic diagram illustrating the positions of a current block and multiple neighboring position blocks according to one embodiment.
[0061] [Figure 8A] 1 is a flowchart illustrating a method for predicting construction control point motion vectors according to one embodiment.
[0062] [Figure 8B] 1 is a flowchart illustrating a method for predicting construction control point motion vectors according to one embodiment.
[0063] [Figure 9A] 1 is a flowchart illustrating an inter-prediction method according to one embodiment.
[0064] [Figure 9B] 1 is a flowchart illustrating a method for predicting construction control point motion vectors according to one embodiment.
[0065] [Figure 9C] FIG. 10 is a schematic diagram illustrating the location of a motion compensation unit based on the center point of the motion compensation unit according to one embodiment.
[0066] [Figure 10]1 is a flowchart illustrating a video decoding method according to one embodiment.
[0067] [Figure 11] 1 is a flowchart illustrating a video decoding method according to an embodiment.
[0068] [Figure 12] 1 is a flowchart illustrating a video decoding method according to one embodiment.
[0069] In the following, unless otherwise specified, identical reference symbols denote identical or at least functionally equivalent features. DETAILED DESCRIPTION OF THE INVENTION
[0070] In the following description, reference is made to the accompanying drawings which form a part of this disclosure and which show, by way of illustration, specific aspects of embodiments of the present invention or in which embodiments of the present invention may be used. It is to be understood that embodiments of the present invention may be used in other ways and may include structural or logical changes not shown in the accompanying drawings. Therefore, the following detailed description is not to be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0071] For example, it should be understood that content disclosed with respect to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, a corresponding device may include one or more units, such as functional units, for performing the described one or more method steps (e.g., one unit performing one or more steps, or multiple units each performing one or more of the steps), even if such one or more units are not explicitly described or shown in the accompanying drawings. Furthermore, when a particular apparatus is described based on one or more units, such as functional units, a corresponding method may include one step for performing the function of the one or more units (e.g., one step for performing the function of one or more units, or multiple steps each used to perform the function of one or more of the units), even if such one or more steps are not explicitly described or shown in the accompanying drawings. Furthermore, it should be understood that features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless otherwise specified.
[0072] Video coding typically processes a series of pictures that form a video or video sequence. In the field of video coding, the terms "picture," "frame," and "image" may be used synonymously. As used herein (or in this disclosure), video coding refers to video encoding or video decoding. Video encoding is performed at the source side and typically involves processing an original video picture (e.g., by compression) to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and typically involves the reverse process associated with an encoder to reconstruct a video picture. In the embodiments, "coding" a video picture (or generally referred to as a picture in the following description) should be understood as "encoding" or "decoding" with respect to a video sequence. A combination of encoding and decoding is also referred to as coding (encoding and decoding).
[0073] In lossless video coding, it is possible to reconstruct the original video picture, i.e., the reconstructed video picture has the same quality as the original video picture (assuming no transmission or other data loss occurs during storage and transmission). In non-lossless video coding, further compression is performed, such as by quantization, to reduce the amount of data needed to represent the video picture, and the video picture cannot be perfectly reconstructed at the decoder side, i.e., the quality of the reconstructed video picture is inferior to that of the original video picture.
[0074] Some H.261 video coding standards refer to "non-lossless hybrid video coding" (i.e., spatial and temporal prediction in the sample domain is combined with 2D transform coding to apply quantization in the transform domain). Each picture in a video sequence is typically divided into a set of non-overlapping blocks, and coding is typically performed at the block level. Specifically, at the encoder side, video is typically processed, or coded, at the block (video block) level. For example, a predictive block is generated by spatial (intra-picture) prediction and temporal (inter-picture) prediction, the predictive block is subtracted from a current block (the block currently being processed or to be processed) to obtain a residual block, which is then transformed and quantized in the transform domain to reduce the amount of data to be transmitted (compressed). At the decoder side, the inverse process to that of the encoder is applied to the coded or compressed block to reconstruct the current block for representation. Furthermore, the encoder repeats the decoder processing loop, so that the encoder and decoder generate the same predictions (eg, intra-prediction and inter-prediction) and / or reconstructions for processing, i.e., encoding, subsequent blocks.
[0075] As used herein, the term "block" may refer to a portion of a picture or a frame. For ease of explanation, embodiments of the present invention will be described with reference to Versatile Video Coding (VVC) or High-Efficiency Video Coding (HEVC), developed by the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Joint Collaboration Team on Video Coding (JCT-VC) of the Motion Picture Experts Group (MPEG). Those skilled in the art will appreciate that embodiments of the present invention are not limited to HEVC or VVC, and that a block may be a CU, PU, or TU. In HEVC, a CTU is divided into multiple CUs using a quadtree structure, referred to as a coding tree. At the CU level, it is determined whether a picture region is coded using inter-picture (temporal) or intra-picture (spatial) prediction. Each CU may be further divided into one, two, or four PUs based on the PU partition type. The same prediction process is applied within a PU, and related information is transmitted to the decoder based on the PU. After obtaining the residual block by applying the prediction process based on the PU partition type, the CU may be divided into transform units (TUs) based on another quadtree structure similar to the coding tree used for CUs. In the latest developments in video compression technology, frames are divided using a quadtree plus binary tree (QTBT) to divide coding blocks. In the QTBT block structure, CUs can be square or rectangular. In VVC, coding tree units (CTUs) are first divided using a quadtree structure, and the quadtree leaf nodes are further divided using a binary tree structure.The binary tree leaf nodes are called coding units (CUs), and their partitions are used for prediction and transform processing without any other partitions. This means that CUs, PUs, and TUs have the same block size in the QTBT coding block structure. Furthermore, multiple partitions, such as triple tree partitions, can be used with the QTBT block structure.
[0076] In the following, embodiments of the encoder 20, decoder 30, encoding system 10, and decoding system 40 will be described with reference to FIGS. 1-4 (before describing embodiments of the invention in more detail with reference to FIG. 10).
[0077] 1 is a conceptual or schematic block diagram illustrating an example encoding system 10, e.g., a video encoding system 10 capable of employing techniques of the present disclosure. An encoder 20 (e.g., video encoder 20) and a decoder 30 (e.g., video decoder 30) within video encoding system 10 represent example devices that may be configured to perform techniques for... (partitioning / intra-prediction / ...) in accordance with various examples described herein. As shown in FIG. 1, encoding system 10 includes a source device 12 configured to provide coded data 13, such as coded pictures 13, to a destination device that decodes the coded data 13, etc.
[0078] The source device 12 includes an encoder 20 and may additionally or optionally include a picture source 16 , a pre-processing unit 18 , such as a picture pre-processing unit 18 , and a communication interface or unit 22 .
[0079] The video source 16 may include or be any kind of picture capture device configured to capture real-world pictures etc. and / or any kind of device that generates pictures or comments (in the case of screen content coding, any text on the screen is also considered to be part of the picture or image to be coded), e.g. a computer graphics processing unit configured to generate computer animated pictures, or any kind of device configured to obtain and / or provide real-world or computer animated pictures (e.g. screen content or virtual reality (VR) pictures), and / or any combination thereof (e.g. augmented reality (AR) pictures).
[0080] A (digital) picture may be, or may be thought of as, a two-dimensional array or matrix of samples with luminance values. The samples in the array may be called pixels (short for picture element) or pels. The amount of samples in the horizontal and vertical directions (or axes) of the array or picture defines the size and / or resolution of the picture. Three color components are typically used to represent color; that is, a picture may be represented as or contain three sample arrays. In an RBG format or color space, a picture contains corresponding red, green, and blue sample arrays. However, in video coding, each sample is typically represented in a luminance / chrominance format or color space; for example, a picture in YCbCr format contains a luminance component, denoted Y (sometimes denoted L), and two chrominance components, denoted Cb and Cr. The luminance (abbreviated luma) component Y represents the luminance or gray-level intensity (e.g., both are the same in a grayscale picture), and the two chrominance components (abbreviated chroma) Cb and Cr represent the chrominance or color information components. Thus, a picture in YCbCr format contains a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in RGB format can be converted or transformed into a picture in YCbCr format, and vice versa. This process is also called color transformation or conversion. If a picture is monochrome, it may contain only a luminance sample array.
[0081] The picture source 16 (e.g., video source 16) may be, for example, a camera configured to capture a picture, a memory, such as a picture memory, containing or storing pre-captured or generated pictures, and / or any type of interface (internal or external) for acquiring or receiving pictures. The camera may be, for example, a local camera or an integrated camera integrated into the source device, and the memory may be, for example, a local memory or an integrated memory integrated into the source device. The interface may be, for example, an external interface for receiving pictures from an external video source. The external video source may be, for example, an external picture capture device such as a camera, external memory, or external picture generation device. The external picture generation device may be, for example, an external computer graphics processing unit, computer, or server. The interface may be any type of interface, such as a wired or wireless interface, or an optical interface, following any proprietary or standardized interface protocol. The interface for acquiring picture data 17 may be the same interface as communication interface 22 or may be part of communication interface 22.
[0082] The picture 17 and the picture data 17 (e.g., video data 16), as well as the pre-processing unit 18 and the processing performed by the pre-processing unit 18, may also be referred to as the original picture 17 or original picture data 17.
[0083] The pre-processing unit 18 is configured to receive (original) picture data 17 and perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture data 19. For example, the pre-processing performed by the pre-processing unit 18 may include cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise reduction. It will be understood that the pre-processing unit 18 may be an optional component.
[0084] An encoder 20 (e.g., a video encoder 20) is configured to receive the pre-processed picture data 19 and provide encoded picture data 21 (details of which are further described below, e.g., with reference to FIG. 2 or FIG. 4). In one example, the encoder 20 may be configured to encode pictures.
[0085] The communication interface 22 of the source device 12 may be configured to receive the coded picture data 21 and transmit the coded picture data 21 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction, or to process the coded picture data 21 before correspondingly storing the coded picture data 13 and / or transmitting the coded data 13 to another device, such as the destination device 14 or another device used for decoding or storage.
[0086] Destination device 14 includes a decoder 30 (eg, a video decoder 30), and may additionally or optionally include a communications interface or unit 28, a post-processing unit 32, and a display device 34.
[0087] For example, the communication interface 28 of the destination device 14 is configured to receive the encoded picture data 21 or the encoded data 13 directly from the source device 12 or any other source, such as a storage device, which is for example a storage device for the encoded picture data.
[0088] The communication interface 22 and the communication interface 28 can be configured to transmit or receive the encoded picture data 21 or the encoded data 13 over a direct communication link between the source device 12 and the destination device 14, or over any type of network. The direct communication link can be, for example, a direct wired or wireless connection, and the network can be, for example, a wired or wireless network or any combination thereof, or any type of private or public network, or any combination thereof.
[0089] The communication interface 22 may be configured to encapsulate the coded picture data 21 into a suitable format, such as packets, for transmission over a communication link or network.
[0090] The communication interface 28, as a counterpart of the communication interface 22, can be configured to de-encapsulate the coded data 13 to obtain coded picture data 21 etc.
[0091] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, e.g., an arrow pointing from source device 12 to destination device 14 used for encoded picture data 13 in FIG. 1, or may be configured as bidirectional communication interfaces, e.g., configured to send and receive messages to establish a connection, confirm and exchange a communication link and / or any other information related to a data transmission such as a coded picture data transmission.
[0092] The decoder 30 is configured to receive the coded picture data 21 and to provide decoded picture data 31 or decoded pictures 31 (details are explained further below, e.g. based on Figure 3 or Figure 5).
[0093] Post-processing processor 32 of destination device 14 is configured to post-process decoded picture data 31 (also referred to as reconstructed picture data), such as decoded picture data 31, to obtain post-processed picture data 33, such as post-processed picture 33. The post-processing performed by post-processing unit 32 may include, for example, color format conversion (e.g., from YCbCr to RGB), color correction, cropping, resampling, or any other processing to prepare decoded picture data 31 for display by display device 34.
[0094] Display device 34 of destination device 14 is configured to receive the post-processed picture data 33 and display the picture to a user, viewer, etc. Display device 34 may be or include any type of display configured to present the reconstructed picture, such as an integrated or external display or monitor. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a microLED display, a liquid crystal on silicon (LCoS) display, a digital light processor (DLP), or any other type of display.
[0095] 1 depicts source device 12 and destination device 14 as separate devices, device embodiments may also include both source device 12 and destination device 14, or both the functionality of source device 12 and the functionality of destination device 14, i.e., source device 12 or corresponding functionality and destination device 14 or corresponding functionality. In such embodiments, source device 12 or corresponding functionality and destination device 14 or corresponding functionality may be implemented using the same hardware and / or software, separate hardware and / or software, or any combination thereof.
[0096] Those skilled in the art will readily understand based on the specification that the presence and (exact) division of functions / functionality of various units of source device 12 and / or destination device 14 shown in FIG. 1 may vary depending on the actual device and application.
[0097] The encoder 20 (e.g., video encoder 20) and the decoder 30 (e.g., video decoder 30) may each be implemented as any one of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the techniques are implemented partially in software, the device may store software instructions in a suitable non-transitory computer-readable storage medium and execute the instructions in hardware by using one or more processors to perform the techniques of this disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors. The video encoder 20 and the video decoder 30 may each be included in one or more encoders or decoders, and any one of the encoders or decoders may be integrated as part of a combined encoder / decoder (codec) within the corresponding device.
[0098] Source device 12 may be referred to as a video encoding device or a video encoding apparatus. Destination device 14 may be referred to as a video decoding device or a video decoding apparatus. Source device 12 and destination device 14 may each be an example of a video encoding device or a video decoding apparatus.
[0099] Source device 12 and destination device 14 may each be any one of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a video camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming transmission device (such as a content service server or content distribution server), a broadcast receiving device, or a broadcast transmitting device, and may or may not use any type of operating system.
[0100] In some cases, source device 12 and destination device 14 may be equipped for wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0101] In some cases, the video encoding system 10 shown in FIG. 1 is merely an example, and the techniques herein may be applied to video coding settings (e.g., video encoding or video decoding) that need not involve any data communication between the encoding device and the decoding device. In other examples, data may be retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store the data in memory, and / or a video decoding device may retrieve data from memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but simply encode data to memory and / or retrieve data from memory and decode data.
[0102] For each of the foregoing examples described with reference to video encoder 20, it should be understood that video decoder 30 may be configured to perform the inverse process. In the case of signaling syntax elements, video decoder 30 may be configured to receive and parse the syntax elements and, accordingly, decode the associated video data. In some examples, video encoder 20 may entropy encode one or more syntax elements that specify... into the coded video bitstream. In such examples, video decoder 30 may parse such syntax elements and, accordingly, decode the associated video data.
[0103] Encoder & Encoding Method
[0104] FIG. 2 is a schematic / conceptual block diagram of an example video encoder 20 configured to implement the techniques in this disclosure. In the example of FIG. 2, the video encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy coding unit 270. The prediction processing unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a mode selection unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown in the drawing). The video encoder 20 shown in FIG. 2 may also be referred to as a hybrid video encoder or a hybrid video codec-based video encoder.
[0105] For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy coding unit 270 form a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the prediction processing unit 260, etc. form a backward signal path of the encoder. The backward signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in FIG. 3).
[0106] The encoder 20 receives a picture 201 or a block 203 of a picture 201, e.g., a picture in a video or a series of pictures forming a video sequence, e.g., by using an input 202. The picture block 203 may also be referred to as a current picture block or a picture block to be coded, and the picture 201 may also be referred to as a current picture or a picture to be coded (particularly if the current picture is distinguished from other pictures in video coding, e.g., other pictures in the same video sequence also include previously coded and / or decoded pictures in the video sequence of the current picture).
[0107] Split
[0108] An embodiment of encoder 20 may include a division unit (not shown in FIG. 2) configured to divide picture 201 into multiple non-overlapping blocks, such as block 203. The division unit may be configured to use the same block size and corresponding raster that defines the block size for all pictures in a video sequence, or may be configured to vary the block size between pictures, subsets, or groups of pictures and divide each picture into corresponding blocks.
[0109] In one example, prediction processing unit 260 of video encoder 20 may be configured to perform any combination of the aforementioned partitioning techniques.
[0110] For example, in picture 201, block 203 may also be or be thought of as a two-dimensional array or matrix having luminance values (sample values), but the size of block 203 is smaller than that of picture 201. In other words, block 203 may contain, for example, one sample array (e.g., a luminance array in the case of a monochrome picture 201), three sample arrays (e.g., one luminance array and two chrominance arrays in the case of a color picture), or any other quantity and / or type of array based on the color format used. The amount of samples in the horizontal and vertical directions (or axes) of block 203 defines the size of block 203.
[0111] The encoder 20 shown in FIG. 2 is arranged to encode a picture 201 block by block, for example performing encoding and prediction on each block 203 .
[0112] Residual calculation
[0113] The residual calculation unit 204 is configured to calculate the residual block 205 based on the picture block 203 and the prediction block 265 (further details regarding the prediction block 265 will be provided below), for example by subtracting the sample values of the prediction block 265 from the sample values of the picture block 203 sample by sample (pixel by pixel) to obtain the residual block 205 in the sample domain.
[0114] conversion
[0115] The transform processing unit 206 is configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in a transform domain. The transform coefficients 207 may also be referred to as residual transform coefficients, and refer to the residual block 205 in the transform domain.
[0116] The transform processing unit 206 may be configured to apply an integer approximation of the DCT / DST, such as a transform specified in HEVC / H.265. This integer approximation is typically proportionally scaled by a factor comparable to the orthogonal DCT transform. To maintain the norm of the residual block obtained through the forward and inverse transforms, an additional scale factor is applied as part of the transform process. The scale factor is typically selected based on some constraints, such as a power of two, the bit depth of the transform coefficients, or a trade-off between the precision used in the shift operations and implementation cost. For example, a particular scale factor may be specified for the inverse transform at the decoder 30 side by using the inverse transform processing unit 212 (and correspondingly, for the inverse transform at the encoder 20 side by using the inverse transform processing unit 212, etc.), and a corresponding scale factor may be specified for the forward transform at the encoder 20 side by using the transform processing unit 206.
[0117] quantization
[0118] The quantization unit 208 is configured to quantize the transform coefficients 207 by applying scale quantization, vector quantization, or the like to obtain quantized transform coefficients 209. The quantized transform coefficients 209 are also referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization can be modified by adjusting a quantization parameter (QP). For example, for scale quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step corresponds to finer quantization, and a larger quantization step corresponds to coarser quantization. An appropriate quantization step may be indicated by using a quantization parameter (QP). For example, the quantization parameter may be an index of a predetermined set of appropriate quantization steps. For example, a smaller quantization parameter corresponds to finer quantization (smaller quantization step), and a larger quantization parameter corresponds to coarser quantization (larger quantization step), and vice versa. Quantization may involve division by the quantization step and corresponding quantization or inverse quantization, such as performed by the inverse quantization unit 210, or may involve multiplication by the quantization step. In embodiments according to some standards, such as HEVC, the quantization parameter may be used to determine the quantization step. In general, the quantization step may be calculated based on the quantization parameter from a fixed-point approximation of an equation that includes division. An additional scale factor may be introduced for quantization and inverse quantization to restore the norm of the residual block, which may be modified due to the scale and quantization parameter used in the fixed-point approximation of the equation used for the quantization step. In an exemplary implementation, the scale of the inverse transform may be combined with the scale of the inverse quantization.Alternatively, customized quantization tables may be used and signaled from the encoder to the decoder, for example in the bitstream. Quantization is a non-lossless operation, with larger quantization steps indicating larger losses.
[0119] The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain inverse quantized coefficients 211, e.g., to apply an inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step as the quantization unit 208. The inverse quantized coefficients 211, also called inverse quantized residual coefficients 211, correspond to the transform coefficients 207, but the loss caused by quantization is usually different from that of the transform coefficients.
[0120] The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transform inverse quantization block 213 or an inverse transform residual block 213.
[0121] The reconstruction unit 214 (e.g., adder 214) is configured to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain a reconstructed block 215 in the sample domain, for example by adding sample values of the reconstructed residual block 213 and sample values of the prediction block 265.
[0122] Optionally, a buffer unit 216 (or "buffer" 216 for short), such as a line buffer 216, is configured to buffer or store the reconstructed blocks 215 and corresponding sample values, such as for intra-prediction. In other embodiments, the encoder may be configured to use the unfiltered reconstructed blocks and / or corresponding sample values stored in the buffer unit 216 for any type of estimation and / or prediction, such as intra-prediction.
[0123] For example, embodiments of encoder 20 may be configured such that buffer unit 216 is not only configured to store reconstructed block 215 for intra prediction, but also configured to store filtered block 221 of loop filter unit 220 (not shown in FIG. 2), and / or such that buffer unit 216 and decoded picture buffer unit 230 form a single buffer. Other embodiments may be used to use filtered block 221 and / or blocks or samples from decoded picture buffer 230 (not shown in FIG. 2) as input or basis for intra prediction 254.
[0124] The loop filter unit 220 (or "loop filter" 220 for short) is configured to perform filtering on the reconstructed block 215 to smooth sample conversion or improve video quality to obtain a filtered block 221. The loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 220 is illustrated in FIG. 2 as an in-loop filter, the loop filter unit 220 may be implemented as a post-loop filter in other configurations. The filtered block 221 may also be referred to as a filtered reconstructed block 221. Decoded picture buffer 230 may store the reconstructed coding blocks after loop filter unit 220 performs a filtering operation on the reconstructed coding blocks.
[0125] An embodiment of the encoder 20 (and correspondingly the loop filter unit 220) can be used to output loop filter parameters (e.g., sample adaptive offset information), e.g., to output the loop filter parameters directly, or to output the loop filter parameters after entropy coding has been performed, e.g., by the entropy coding unit 270 or some other entropy coding unit, so that the decoder 30 can receive and apply the same loop filter parameters for decoding, etc.
[0126] The decoded picture buffer (DPB) 230 may be a reference picture memory that stores reference picture data for the video encoder 20 to encode video data. The DPB 230 may be any of a number of memories, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), or resistive RAM (RRAM)), or another type of memory. The DPB 230 and the buffer 216 may be provided by the same memory or separate memories. In one example, the decoded picture buffer (DRB) 230 is configured to store the filtered block 221. The decoded picture buffer 230 may be further configured to store other previous filtered blocks, such as the previously reconstructed filtered block 221, of the same current picture or a different picture, such as a previously reconstructed picture, to provide a complete previous reconstructed, i.e., decoded, picture (and corresponding reference blocks and corresponding samples) and / or a partially reconstructed current picture (and corresponding reference blocks and corresponding samples), such as for intra-prediction. In one example, if the reconstructed block 215 is reconstructed without in-loop filtering, the decoded picture buffer (DPB) 230 is configured to store the reconstructed block 215.
[0127] The prediction processing unit 260, also referred to as block prediction processing unit 260, is configured to receive or obtain block 203 (current block 203 of current picture 201) and reconstructed picture data, e.g., reference samples from the same (current) picture in buffer 216, reference picture data 231 from one or more previously decoded pictures in decoded picture buffer 230, and process the data for prediction, i.e., to provide a prediction block 265, which may be an inter-prediction block 245 or an intra-prediction block 255.
[0128] The mode selection unit 262 may be configured to select a prediction mode (e.g., intra or inter prediction mode) and / or a corresponding prediction block 245 or 255 as the prediction block 265 to calculate the residual block 205 and reconstruct the reconstruction block 215.
[0129] Embodiments of mode selection unit 262 may be used to select a prediction mode (e.g., from prediction modes supported by prediction processing unit 260) that provides the best match or smallest residual (smallest residual means better compression upon transmission or storage), or that provides the smallest signaling overhead (smallest signaling overhead means better compression upon transmission or storage), or that considers or balances both. Mode selection unit 262 may be configured to determine the prediction mode based on rate distortion optimization (RDO), i.e., to select a prediction mode that provides the smallest rate distortion optimization, or to select a prediction mode whose associated rate distortion at least satisfies a prediction mode selection criterion.
[0130] The prediction processing (eg, by using prediction processing unit 260) and mode selection (eg, by using mode selection unit 262) performed by an example of encoder 20 are described in detail below.
[0131] As mentioned above, the encoder 20 is configured to determine or select the best or optimal prediction mode from a (predetermined) set of prediction modes, which may include, for example, intra-prediction modes and / or inter-prediction modes.
[0132] The intra-prediction mode set may include 35 different intra-prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes as specified in H.265, or may include 67 intra-prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or advanced directional modes as specified in H.266.
[0133] The (possible) inter prediction mode set depends on the available reference pictures (e.g., at least a portion of the decoded picture stored in DBP 230) and other inter prediction parameters, such as whether the entire reference picture or only a portion of the reference picture is used, whether a search window region surrounding the area of the current block is searched for the best matching reference block, and / or whether sample interpolation such as half sample and / or quarter sample interpolation is applied.
[0134] In addition to the aforementioned prediction modes, skip mode and / or direct mode can also be applied.
[0135] Prediction processing unit 260 may further be configured to divide block 203 into smaller block partitions or sub-blocks, for example, by iteratively using quad-tree (QT) partitioning, binary-tree (BT) partitioning, triple-tree or ternary-tree (TT) partitioning, or a combination thereof, and perform prediction, etc., on each of the block partitions or sub-blocks. Mode selection includes selecting a tree structure for divided block 203 and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.
[0136] The inter prediction unit 244 may include a motion estimation (ME) unit (not shown in FIG. 2) and a motion compensation (MC) unit (not shown in FIG. 2). The motion estimation unit is configured to receive or obtain a picture block 203 (the current picture block 203 of the current picture 201) and a decoded picture 31, or at least one or more previously reconstructed blocks, e.g., one or more other reconstructed blocks different from the previously decoded picture 31, to perform motion estimation. For example, a video sequence may include the current picture and the previously decoded picture 31. In other words, the current picture and the previously decoded picture 31 may form a video sequence or be part of a sequence of pictures forming a picture sequence.
[0137] For example, the encoder 20 may be configured to select a reference block from multiple reference blocks in the same picture or from a different picture among multiple other pictures, and provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (X and Y coordinates) of the reference block and the position of the current block as inter-prediction parameters to a motion estimation unit (not shown in FIG. 2 ). This offset is also referred to as a motion vector (MV).
[0138] The motion compensation unit is configured to obtain, e.g., receive, inter prediction parameters and perform inter prediction based on or by using the inter prediction parameters to obtain inter prediction block 245. Motion compensation performed by the motion compensation unit (not shown in FIG. 2) may include fetching or generating a prediction block based on motion / block vectors determined by motion estimation (possibly including performing interpolation with sub-sample accuracy). During interpolation filtering, additional samples may be generated from known samples, thereby potentially increasing the amount of candidate prediction blocks that may be used to encode the picture block. Once the motion vector used for the PU of the current picture block is received, the motion compensation unit 246 may locate the prediction block to which the motion vector points within the reference picture list. The motion compensation unit 246 may further generate syntax elements related to blocks and video slices, so that video decoder 30 uses the syntax elements when decoding picture blocks of the video slices.
[0139] The intra prediction unit 254 is configured to obtain, e.g., receive, a picture block 203 (current picture block) of the same picture and one or more previous reconstructed blocks, such as reconstructed neighboring blocks, to perform intra estimation. For example, the encoder 20 may be configured to select an intra prediction mode from a plurality of (predetermined) intra prediction modes.
[0140] Embodiments of the encoder 20 may be configured to select an intra-prediction mode based on an optimization criterion, such as the smallest residual (e.g., the intra-prediction mode that provides the predicted block 255 that is most similar to the current picture block 203) or the smallest rate distortion.
[0141] The intra prediction unit 254 is further configured to determine the intra-predicted block 255 based on the intra-prediction parameters of the selected intra-prediction mode. In any case, after selecting the intra-prediction mode to be used for the block, the intra-prediction unit 254 is further configured to provide the intra-prediction parameters to the entropy coding unit 270, i.e., to provide information indicating the selected intra-prediction mode to be used for the block. In one example, the intra-prediction unit 254 may be configured to perform any combination of the following intra-prediction techniques:
[0142] The entropy coding unit 270 is configured to apply an entropy coding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (CABAC) scheme, a syntax-based context-adaptive binary arithmetic coding (SBAC) scheme, a probability interval partitioning entropy (PIPE) coding scheme, or other entropy coding method or technique) to one or more (or none) of the quantized residual coefficients 209, the inter-prediction parameters, the intra-prediction parameters, and / or the loop filter parameters to obtain coded picture data 21, which can be output, for example, in the form of a coded bitstream, using an output 272. The encoded bitstream may be transmitted to video decoder 30 or may be stored for later transmission or retrieval by video decoder 30. Entropy encoding unit 270 may be further configured to perform entropy encoding on other syntax elements of the current video slice being encoded.
[0143] Other structural variations of the video encoder 20 may be configured to encode the video stream. For example, a non-transform-based encoder 20 may directly quantize the residual signal for some blocks or frames without using the transform processing unit 206. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into one unit.
[0144] 3 illustrates an example of a video decoder 30 configured to implement the techniques herein. Video decoder 30 is configured to receive coded picture data (e.g., a coded bitstream) 21, such as that coded by encoder 20, to obtain decoded pictures 31. In the decoding process, video decoder 30 receives video data from video encoder 20, such as a coded video bitstream indicating picture blocks of coded video slices and associated syntax elements.
[0145] 3, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a buffer 316, a loop filter 320, a decoded picture buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter prediction unit 344, an intra prediction unit 354, and a mode selection unit 362. In some examples, video decoder 30 may perform a decoding traverse that is generally inverse to the encoding traverse described with reference to video encoder 20 of FIG.
[0146] Entropy decoding unit 304 is configured to perform entropy decoding on coded picture data 21 to obtain quantized coefficients 309, decoded coding parameters (not shown in FIG. 3 ), etc., and / or any one or all of, for example, inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements (which have been decoded). Entropy decoding unit 304 is further configured to forward the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to prediction processing unit 360. Video decoder 30 may receive syntax elements at the video slice level and / or syntax elements at the video block level.
[0147] The inverse quantization unit 310 may have the same functionality as the inverse quantization unit 110, the inverse transform processing unit 312 may have the same functionality as the inverse transform processing unit 212, the reconstruction unit 314 may have the same functionality as the reconstruction unit 214, the buffer 316 may have the same functionality as the buffer 216, the loop filter 320 may have the same functionality as the loop filter 220, and the decoded picture buffer 330 may have the same functionality as the decoded picture buffer 230.
[0148] Prediction processing unit 360 may include an inter prediction unit 344 and an intra prediction unit 354. Inter prediction unit 344 may have functionality similar to inter prediction unit 244, and intra prediction unit 354 may have functionality similar to intra prediction unit 254. Prediction processing unit 360 is typically configured to perform block prediction and / or obtain prediction blocks 365 from coded data 21, and to receive or obtain prediction-related parameters and / or information regarding a selected prediction mode (explicitly or implicitly), for example, from entropy decoding unit 304.
[0149] When a video slice is coded as intra-coded (I), intra prediction unit 354 of prediction processing unit 360 is configured to generate prediction block 365 to be used for picture blocks of the current video slice based on data from previously decoded blocks of the current frame or picture and the signaled intra prediction mode. When a video frame is coded as an inter-coded (i.e., B or P) slice, inter prediction unit 344 (e.g., a motion compensation unit) of prediction processing unit 360 is configured to generate prediction block 365 to be used for video blocks of the current video slice based on motion vectors and other syntax elements received from entropy decoding unit 304. For inter prediction, the prediction block may be generated from one of the reference pictures in one reference picture list. Video decoder 30 may construct the reference frame lists of list 0 and list 1 by using a default construction technique based on the reference pictures stored in DPB 330.
[0150] Prediction processing unit 360 is configured to analyze the motion vectors and other syntax elements to determine prediction information to be used for the video blocks of the current video slice, and to use the prediction information to generate the prediction blocks to be used for the current video blocks being decoded. For example, prediction processing unit 360 uses some of the received syntax elements to determine the prediction mode (e.g., intra- or inter-prediction) to be used to encode the video blocks of the video slice, the inter-prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information of one or more pictures in a reference picture list used for the slice, the motion vector for each inter-coded video block used for the slice, the inter-prediction state for each inter-coded video block used for the slice, and other information to decode the video blocks of the current video slice.
[0151] Inverse quantization unit 310 may be configured to perform inverse quantization (i.e., de-quantization) on the quantized transform coefficients decoded by entropy decoding unit 304 provided in the bitstream. The inverse quantization process may include using a quantization parameter calculated by video encoder 20 for each video block in a video slice to determine the degree of quantization to be applied and to determine the degree of inverse quantization to be applied.
[0152] The inverse transform processing unit 312 is configured to apply an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce residual blocks in the sample domain.
[0153] The reconstruction unit 314 (e.g., adder 314) is configured to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365, e.g., by adding the sample values of the reconstructed residual block 313 to the sample values of the prediction block 365, to obtain the reconstructed block 315 in the sample domain.
[0154] The loop filter unit 320 (in the coding loop or after the coding loop) is configured to filter the reconstructed block 315 to obtain a filtered block 321 to smooth sample conversion or improve video quality. In one example, the loop filter unit 320 may be configured to perform any combination of the following filtering techniques: The loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 320 is illustrated in FIG. 3 as an in-loop filter, the loop filter unit 320 may be implemented as a post-loop filter in other configurations.
[0155] The filtered blocks 321 within a given frame or picture are stored in a decoded picture buffer 330, which stores reference pictures used for subsequent motion compensation.
[0156] The decoder 30 is configured to output the decoded picture 31, such as by using an output 332, to present the decoded picture 31 to a user or to provide the decoded picture 31 for viewing by a user.
[0157] Other variations of the video decoder 30 may be configured to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transform-based decoder 30 may directly dequantize the residual signal for some blocks or frames without the inverse transform processing unit 312. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into one unit.
[0158] 4 illustrates an example of a video coding system 40 including the encoder 20 of FIG. 2 and / or the decoder 30 of FIG. 3 according to an example embodiment. System 40 may implement a combination of various techniques of the present application. In the illustrated implementation, video coding system 40 may include an imaging device 41, a video encoder 20, a video decoder 30 (and / or a video decoder implemented by logic 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and / or a display device 45.
[0159] As shown in the drawings, imaging device 41, antenna 42, processing device 46, logic circuitry 47, video encoder 20, video decoder 30, processor 43, memory 44, and / or display device 45 may be in communication with one another. As illustrated, video coding system 40 is shown with both video encoder 20 and video decoder 30, but in different examples, video coding system 40 could include only video encoder 20 or only video decoder 30.
[0160] In some examples, as shown in the drawings, video coding system 40 may include antenna 42. For example, antenna 42 may be configured to transmit or receive an encoded bitstream of video data. Furthermore, in some examples, video coding system 40 may include display device 45. Display device 45 may be configured to present the video data. In some examples, as shown in the drawings, logic circuitry 47 may be implemented by processing unit 46. Processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processing unit, a general-purpose processor, etc. Video coding system 40 may also include optional processor 43. Optional processor 43 may also include application-specific integrated circuit (ASIC) logic, a graphics processing unit, a general-purpose processor, etc. In some examples, logic circuitry 47 may be implemented by hardware, such as dedicated video coding hardware, and processor 43 may be implemented by universal software, an operating system, etc. Furthermore, memory 44 may be any type of memory, such as volatile memory (e.g., static random access memory (SRAM) or dynamic random access memory (DRAM)) or non-volatile memory (e.g., flash memory). In a non-limiting example, memory 44 may be implemented by cache memory. In some examples, logic circuitry 47 may have access to memory 44 (e.g., to implement an image buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include memory (e.g., cache) to implement an image buffer or the like.
[0161] In some examples, video encoder 20 implemented by logic circuitry may include an image buffer (e.g., implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video encoder 20 implemented by logic circuitry 47 to implement the various modules described with reference to FIG. 2 and / or any other encoder system or subsystem described herein. The logic circuitry may be configured to perform the various operations described herein.
[0162] Video decoder 30 may also be implemented by logic circuitry 47 to implement the various modules described with reference to decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. In some examples, video decoder 30 implemented by logic circuitry may include an image buffer (implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include video decoder 30 implemented by logic circuitry 47 to implement the various modules described with reference to FIG. 3 and / or any other decoder system or subsystem described herein.
[0163] In some examples, antenna 42 of video coding system 40 may be configured to receive an encoded bitstream of video data. As described, the encoded bitstream may include data, indicators, index values, mode selection data, etc., related to the video frame coding described herein, such as data related to a coding partition (e.g., transform coefficients or quantized transform coefficients, optional indicators (as described), and / or data defining the coding partition). Video coding system 40 may further include video decoder 30 coupled to antenna 42 and configured to decode the encoded bitstream. Display device 45 is configured to present the video frames.
[0164] 5 is a simplified block diagram of an apparatus 500 that can be used as any one or two of source device 12 and destination device 14 of FIG. 1 according to an example embodiment. Apparatus 500 can implement the techniques herein. Apparatus 500 can be a form of computing system that includes multiple computing devices, or can be a form of a single computing device such as a mobile phone, tablet computer, laptop computer, notebook computer, or desktop computer.
[0165] The processor 502 in the apparatus 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of existing or future device or device capable of controlling or processing information. As shown in the drawings, the disclosed implementations may be implemented using a single processor, such as the processor 502, although advantages in speed and efficiency may be achieved by using more than one processor.
[0166] In some implementations, the memory 504 in the device 500 may be read-only memory (ROM) or random access memory (RAM). Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510. The application programs 510 include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1 through N, which further include a video encoding application for performing the methods described herein. The device 500 may also include additional memory in the form of secondary memory 514. The secondary memory 514 may be, for example, a memory card used with a mobile computing device. Because a video communication session may involve a large amount of information, the information may be stored completely or partially in secondary memory 514 and loaded into memory 504 for processing as needed.
[0167] The device 500 may further include one or more output devices, such as a display 518. In one example, the display 518 may be a touch-sensitive display that combines a display with touch-sensing elements operable to sense touch input. The display 518 may be coupled to the processor 502 using the bus 512. Another output device may be provided in addition to the display 518 to enable a user to program or otherwise use the device 500, or another output device may be provided instead of the display 518. If the output device is or includes a display, the display may be implemented differently, for example, by using a liquid crystal display (LCD), a cathode-ray tube (CRT) display, a plasma display, or a light-emitting diode (LED) display such as an organic LED (OLED) display.
[0168] The device 500 may further include or be connected to an image sensing device 520. The image sensing device 520 is, for example, a camera or some other existing or future image sensing device 520 capable of sensing an image. The image is, for example, an image of a user operating the device 500. The image sensing device 520 may be positioned directly facing the user operating the device 500. In one example, the position and optical axis of the image sensing device 520 may be configured such that the field of view of the image sensing device 520 includes an area adjacent to the display 518, and the display 518 is visible from that area.
[0169] Device 500 may further include or be connected to a sound sensing device 522. Sound sensing device 522 may be, for example, a microphone or any other existing or future sound sensing device capable of sensing sound in the vicinity of device 500. Sound sensing device 522 may be positioned directly facing a user operating device 500 and may be configured to receive sounds, such as a voice or other sounds made by the user when the user operates device 500.
[0170] Although the processor 502 and memory 504 of device 500 are integrated into one unit as shown in FIG. 5, other configurations are possible. The operations of processor 502 may be distributed across multiple machines (each machine having one or more processors) that may be directly coupled, or may be distributed across a local area or another network. Memory 504 may be distributed across multiple machines, such as network-based memory and memory across multiple machines running device 500. While a single bus is depicted here, there may be multiple buses 512 in device 500. Furthermore, secondary memory 514 may be directly coupled to other components of device 500 or accessed over a network, and may include a single integrated unit such as a memory card, or multiple units such as multiple memory cards. Thus, device 500 may be realized in multiple configurations.
[0171] The concept of the present invention will be explained below.
[0172] 1. Inter prediction mode
[0173] In HEVC, two inter prediction modes are used: advanced motion vector prediction (AMVP) mode and merge mode.
[0174] In AMVP mode, spatially or temporally adjacent coded blocks (referred to as neighboring blocks) of the current block are first traversed, and a candidate motion vector list (also referred to as a motion information candidate list) is constructed based on the motion information of the neighboring blocks. Next, the optimal motion vector is determined from the candidate motion vector list based on the rate-distortion cost, and the candidate motion information with the minimum rate-distortion cost is used as the motion vector predictor (MVP) for the current block. Both the location of the neighboring blocks and their traversal order are predetermined. The rate-distortion cost is calculated according to Equation (1), where J denotes the rate-distortion cost (RD cost), SAD denotes the sum of absolute differences (SAD) between the original sample values and the predicted sample values obtained by motion estimation using the candidate motion vector predictors, R denotes the bit rate, and λ denotes the Lagrange multiplier. The encoder side transmits the index of the selected motion vector predictor in the candidate motion vector list and the index value of the reference frame to the decoder side. Furthermore, a motion search is performed in a neighborhood centered on the MVP to obtain the actual motion vector of the current block. The encoder side transfers the difference between the MVP and the actual motion vector (motion vector difference) to the decoder side. J = SAD + λR (1)
[0175] In merge mode, a candidate motion vector list is first constructed based on the motion information of spatially or temporally neighboring coded blocks of the current block. Then, the best motion information is determined from the candidate motion vector list based on the rate-distortion cost to serve as the motion information for the current block. The index value of the best motion information's position in the candidate motion vector list (hereinafter referred to as the merge index) is then transmitted to the decoder. The spatial candidate motion information and temporal candidate motion information for the current block are shown in Figure 6. The spatial candidate motion information comes from five spatially neighboring blocks (A0, A1, B0, B1, B2). If the neighboring block is unavailable (if the neighboring block does not exist, is not coded, or the prediction mode used for the neighboring block is not inter prediction mode), the motion information of the neighboring block is not added to the candidate motion vector list. The temporal candidate motion information for the current block is obtained by scaling the motion vectors of the blocks at the corresponding positions of the reference frame based on the picture order count (POC) of the reference frame and the current frame. It is first determined whether the block at position T in the reference frame is available. If no block is available, the block at position C is selected.
[0176] Similar to AMVP mode, in merge mode, both the location of neighboring blocks and their traversal order are predetermined. Furthermore, the location of neighboring blocks and their traversal order can change depending on the mode.
[0177] It can be seen that a candidate motion vector list must be maintained in both AMVP mode and merge mode. Each time new motion information is added to the candidate list, it is first checked whether the same motion information exists in the list. If the same motion information exists, the motion information is not added to the list. This checking process is called trimming the candidate motion vector list. List trimming is the process of avoiding duplicate motion information in the list, thereby avoiding redundant rate-distortion cost calculations.
[0178] In HEVC inter prediction, all samples in a coding block use the same motion information, and therefore motion compensation is performed based on the motion information to obtain predictors for the samples in the coding block. However, not all samples in a coding block have the same motion characteristics. Using the same motion information may result in inaccurate motion compensation prediction and more residual information.
[0179] Existing video coding standards use block-matching motion estimation based on a translational motion model, which assumes that the motion of all samples within a block is consistent. However, in the real world, various motions exist. Many objects are in non-translational motion, such as rotating objects, roller coasters that rotate in various directions, firework displays, and some stunts in movies, especially moving objects in UGC scenarios. When block motion compensation techniques based on the translational motion model in existing coding standards are used for coding these moving objects, coding efficiency can be significantly affected. Therefore, to further improve coding efficiency, non-translational motion models such as affine motion models are introduced.
[0180] Therefore, with respect to various motion models, AMVP modes can be classified into translational model-based AMVP modes and non-translational model-based AMVP modes, and merge modes can be classified into translational model-based merge modes and non-translational model-based merge modes.
[0181] 2. Non-translational motion model
[0182] In non-translational motion model-based prediction, the codec uses a motion model to derive the motion information of each child motion compensation unit in the current block, and then performs motion compensation based on the motion information of the child motion compensation units to obtain the predicted block, thereby improving prediction efficiency. Common non-translational motion models are the 4-parameter affine motion model and the 6-parameter affine motion model.
[0183] The child motion compensation unit in the present embodiment may be a sample or N1 x N2 sample block obtained by division according to a specific method, where N1 and N2 are both positive integers, and N1 may or may not be equal to N2.
[0184] The four-parameter affine motion model is expressed as Equation (2):
number
[0185] A four-parameter affine motion model can be represented by two-sample motion vectors and the coordinates of the two samples relative to the top-left sample of the current block. The samples used to represent the motion model parameters are called control points. If the top-left sample (0,0) and the top-right sample (W,0) are used as control points, the motion vectors (vx0,vy0) and (vx1,vy1) of the top-left and top-right control points of the current block are first determined. Then, the motion information of each child motion compensation unit in the current block is obtained according to Equation (3), where (x,y) are the coordinates of the child motion compensation unit relative to the top-left sample of the current block, and W indicates the width of the current block.
number
[0186] The six-parameter affine motion model is expressed as Equation (4):
number
[0187] The six-parameter affine motion model can be expressed by three-sample motion vectors and the coordinates of the three samples relative to the top-left sample of the current block. When the top-left sample (0,0), top-right sample (W,0), and bottom-left sample (0,H) are used as control points, the motion vectors (vx0,vy0), (vx1,vy1), and (vx2,vy2) of the top-left control point, top-right control point, and bottom-left control point of the current block are first determined. Then, the motion information of each child motion compensation unit in the current block is obtained according to Equation (5), where (x,y) is the coordinate of the child motion compensation unit relative to the top-left sample of the current block, and W and H indicate the width and height of the current block, respectively.
number
[0188] A coding block that is predicted using an affine motion model is referred to as an affine coding block.
[0189] Generally, the motion information of the control points of an affine coding block can be obtained by using the affine motion model-based Advanced Motion Vector Prediction (AMVP) mode or the affine motion model-based Merge mode.
[0190] The motion information of the control points of the current coding block can be obtained by using an inherited control point motion vector prediction method or a constructed control point motion vector prediction method.
[0191] 3. Inheritance control point motion vector prediction method
[0192] The inherited control point motion vector prediction method uses the motion models of neighboring coded affine coding blocks to determine candidate control point motion vectors for the current block.
[0193] The current block shown in FIG. 7 is used as an example. The neighboring blocks around the current block are traversed in a specified order, for example, A1 → B1 → B0 → A0 → B2, to find the affine coding block in which the neighboring blocks of the current block are located, and obtain the control point motion information of the affine coding block. Furthermore, the control point motion vector (in the merge mode) or the control point motion vector predictor (in the AMVP mode) of the current block is derived using a motion model constructed by using the control point motion information of the affine coding block. The order A1 → B1 → B0 → A0 → B2 is used merely as an example. Other combination orders are also applicable to this application. Furthermore, the neighboring blocks are not limited to A1, B1, B0, A0, and B2.
[0194] The neighboring blocks may be samples or sample blocks of a predetermined size obtained based on a specific division method, such as, but not limited to, a 4x4 sample block, a 4x2 sample block, or a sample block of another size.
[0195] Below we will explain the decision process by taking A1 as an example, and other cases are similar.
[0196] As shown in Figure 7, if the coding block where A1 is located is a four-parameter affine coding block, the motion vector (vx4,vy4) of the upper-left sample (x4,y4) and the motion vector (vx5,vy5) of the upper-right sample (x5,y5) of the affine coding block are obtained. The motion vector (vx0,vy0) of the upper-left sample (x0,y0) of the current affine coding block is calculated according to Equation (6), and the motion vector (vx1,vy1) of the upper-right sample (x1,y1) of the current affine coding block is calculated according to Equation (7).
number
[0197] The combination of the motion vector (vx0,vy0) of the top-left sample (x0,y0) of the current block and the motion vector (vx1,vy1) of the top-right sample (x1,y1) of the current block, obtained based on the affine coding block in which A1 is located, is the candidate control point motion vector of the current block.
[0198] If the coding block where A1 is located is a 6-parameter affine coding block, the motion vector (vx4, vy4) of the upper-left sample (x4, y4), the motion vector (vx5, vy5) of the upper-right sample (x5, y5), and the motion vector (vx6, vy6) of the lower-left sample (x6, y6) of the affine coding block are obtained. The motion vector (vx0, vy0) of the upper-left sample (x0, y0) of the current block is calculated according to equation (8), the motion vector (vx1, vy1) of the upper-right sample (x1, y1) of the current block is calculated according to equation (9), and the motion vector (vx2, vy2) of the lower-left sample (x2, y2) of the current block is calculated according to equation (10).
number
[0199] The combination of the motion vector (vx0,vy0) of the top-left sample (x0,y0), the motion vector (vx1,vy1) of the top-right sample (x1,y1), and the motion vector (vx2,vy2) of the bottom-left sample (x2,y2) of the current block, obtained based on the affine coding block in which A1 is located, is the candidate control point motion vector of the current block.
[0200] It should be noted that other motion models, candidate positions, search and traversal orders are also applicable to the present application, and the details will not be described in the embodiments of the present application.
[0201] It should be noted that other methods using control points to represent the motion models of the neighboring and current coding blocks are also applicable to this application, and will not be described in detail here.
[0202] 4. Constructed Control Point Motion Vectors Prediction Method 1
[0203] The constructed control point motion vector prediction method combines the motion vectors of neighboring coding blocks around the control point of the current block, regardless of whether the neighboring coding blocks are affine coding blocks, and uses the combined motion vector as the control point motion vector of the current affine coding block.
[0204] The motion vectors for the upper-left and upper-right samples of the current block are determined by using the motion information of neighboring coding blocks around the current coding block. Figure 8A is used as an example to explain the construction control point motion vector prediction method. It should be noted that Figure 8A is just an example.
[0205] As shown in Figure 8A, the motion vectors of the neighboring coding blocks A2, B2, and B3 of the top-left sample are used as candidate motion vectors for the motion vector of the top-left sample of the current block, and the motion vectors of the neighboring coding blocks B1 and B0 of the top-right sample are used as candidate motion vectors for the motion vector of the top-right sample of the current block. The candidate motion vectors of the top-left sample and the top-right sample are combined to form multiple 2-tuples. The motion vectors of the two coding blocks included in the 2-tuple can be used as candidate control point motion vectors for the current block, as shown in the following equation (11A):
number
[0206] vA2 indicates the motion vector of A2, vB1 indicates the motion vector of B1, vB0 indicates the motion vector of B0, vB2 indicates the motion vector of B2, and vB3 indicates the motion vector of B3.
[0207] As shown in Figure 8A, the motion vectors of the neighboring coding blocks A2, B2, and B3 of the top-left sample are used as candidate motion vectors for the motion vector of the top-left sample of the current block, the motion vectors of the neighboring coding blocks B1 and B0 of the top-right sample are used as candidate motion vectors for the motion vector of the top-right sample of the current block, and the motion vectors of the neighboring coding blocks A0 and A1 of the bottom-left sample are used as candidate motion vectors for the motion vector of the bottom-left sample of the current block. The candidate motion vectors of the top-left sample, the top-right sample, and the bottom-left sample are combined to form a 3-tuple. The motion vectors of the three coding blocks included in the 3-tuple can be used as candidate control point motion vectors for the current block, as shown in the following equations (11B) and (11C):
number
[0208] vA2 indicates the motion vector of A2, vB1 indicates the motion vector of B1, vB0 indicates the motion vector of B0, vB2 indicates the motion vector of B2, vB3 indicates the motion vector of B3, vA0 indicates the motion vector of A0, and vA1 indicates the motion vector of A1.
[0209] It should be noted that other methods of combining the motion vectors of the control points are also applicable to the present application, and will not be described in detail here.
[0210] It should be noted that other methods using control points to represent the motion models of the neighboring and current coding blocks can also be applied to this application, and will not be described in detail here.
[0211] 5. Constructed control point motion vectors prediction method 2: See FIG.
[0212] Step 801: Obtain the motion information of the control points of the current block.
[0213] For example, in FIG. 8A, CPk (k=1, 2, 3, or 4) indicates the kth control point, A0, A1, A2, B0, B1, B2, and B3 are spatially adjacent positions of the current block and are used to predict CP1, CP2, or CP3, and T is a temporally adjacent position of the current block and is used to predict CP4.
[0214] Assume that the coordinates of CP1, CP2, CP3, and CP4 are (0,0), (W,0), (H,0), and (W,H), respectively, where W and H denote the width and height of the current block.
[0215] The motion information for each control point is obtained in the following order:
[0216] (1) For CP1, the inspection order is B2 → A2 → B3. If B2 is available, the motion information of B2 is used. If B2 is not available, A2 and B3 are inspected. If the motion information of all three positions is not available, the motion information of CP1 cannot be obtained.
[0217] (2) For CP2, the inspection order is B0 → B1. If B0 is available, the motion information of B0 is used for CP2. If B0 is not available, B1 is inspected. If the motion information of both positions is not available, the motion information of CP2 cannot be obtained.
[0218] (3) In the case of CP3, the inspection order is A0 → A1.
[0219] (4) In the case of CP4, the motion information of T is used.
[0220] Here, X being available means that the block at the position of X (X is A0, A1, A2, B0, B1, B2, B3, or T) is coded and uses inter prediction mode. Otherwise, the position of X is unavailable.
[0221] It should be noted that other methods for obtaining the motion information of the control points are also applicable to the present application, and the details will not be described here.
[0222] Step 802: Combine the motion information of the control points to obtain constructed control point motion information.
[0223] The motion information of two control points is combined to form a 2-tuple to construct a four-parameter affine motion model. The way two control points are combined may be {CP1,CP4}, {CP2,CP3}, {CP1,CP2}, {CP2,CP4}, {CP1,CP3}, or {CP3,CP4}. For example, a four-parameter affine motion model constructed by using a 2-tuple containing control points CP1 and CP2 may be denoted as Affine(CP1,CP2).
[0224] The motion information of the three control points is combined to form a 3-tuple to construct a six-parameter affine motion model. The manner in which the three control points are combined may be {CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, or {CP1, CP3, CP4}. For example, a six-parameter affine motion model constructed by using a 3-tuple containing control points CP1, CP2, and CP3 may be denoted as Affine(CP1, CP2, CP3).
[0225] The motion information of the four control points is combined to form a 4-tuple to construct an 8-parameter bilinear model. The 8-parameter bilinear model constructed by using a 4-tuple containing control points CP1, CP2, CP3, and CP4 may be denoted as “Bilinear”(CP1,CP2,CP3,CP4).
[0226] In this embodiment of the present application, for ease of explanation, a combination of motion information for two control points (or two coding blocks) is simply referred to as a 2-tuple, a combination of motion information for three control points (or three coding blocks) is simply referred to as a 3-tuple, and a combination of motion information for four control points (or four coding blocks) is simply referred to as a 4-tuple.
[0227] These models are traversed in a pre-defined order. If motion information for the control points corresponding to the combined model is not available, the model is considered invalid. Otherwise, the reference frame index of the model is determined and the motion vectors of the control points are scaled. If the scaled motion information for all control points that control the model is consistent, the model is invalid. If motion information for all control points that control the model is available and the model is valid, the motion information of the control points that make up the model is added to the motion information candidate list.
[0228] The control point motion vector scaling method is shown in Equation (12):
number
[0229] CurPoc indicates the POC number of the current frame, DesPoc indicates the POC number of the reference frame of the current block, SrcPoc indicates the POC number of the reference frame of the control point, MVs indicates the motion vector obtained by scaling, and MV indicates the motion vector of the control point.
[0230] It should be noted that different combinations of control points may be transformed into a control point at the same location.
[0231] For example, a four-parameter affine motion model obtained by combining {CP1,CP4}, {CP2,CP3}, {CP2,CP4}, {CP1,CP3}, or {CP3,CP4} is converted to a representation using {CP1,CP2} or {CP1,CP2,CP3}. The conversion method involves substituting the motion vectors and coordinate information of the control points into equation (2) to obtain the model parameters, and then substituting the coordinate information of {CP1,CP2} into equation (3) to obtain the motion vectors.
[0232] More directly, the conversion can be performed according to the following equations (13)-(21), where W denotes the width of the current block and H denotes the height of the current block: In equations (13)-(21), (vx0, vy0) denotes the motion vector of CP1, (vx1, vy1) denotes the motion vector of CP2, (vx2, vy2) denotes the motion vector of CP3, and (vx3, vy3) denotes the motion vector of CP4.
[0233] {CP1, CP2} can be transformed into {CP1, CP2, CP3} by the following equation (13): In other words, the motion vector of CP3 in {CP1, CP2, CP3} can be determined by equation (13):
number
[0234] {CP1,CP3} can be converted to {CP1,CP2} or {CP1,CP2,CP3} by the following equation (14):
number
[0235] {CP2,CP3} can be converted to {CP1,CP2} or {CP1,CP2,CP3} by the following equation (15):
number
[0236] {CP1,CP4} can be converted to {CP1,CP2} or {CP1,CP2,CP3} by the following equations (16) or (17):
number
[0237] {CP2,CP4} can be converted to {CP1,CP2} by the following equation (18), and {CP2,CP4} can be converted to {CP1,CP2,CP3} by the following equations (18) and (19):
number
[0238] {CP3,CP4} can be converted to {CP1,CP2} by the following equation (20), and {CP3,CP4} can be converted to {CP1,CP2,CP3} by the following equations (20) and (21):
number
[0239] For example, a six-parameter affine motion model obtained by combining {CP1,CP2,CP4}, {CP2,CP3,CP4}, or {CP1,CP3,CP4} is converted to a representation using {CP1,CP2,CP3}. The conversion method involves substituting the motion vectors and coordinate information of the control points into equation (4) to obtain the model parameters, and then substituting the coordinate information of {CP1,CP2,CP3} into equation (5) to obtain the motion vectors.
[0240] More directly, the conversion can be performed according to the following equations (22)-(24), where W denotes the width of the current block and H denotes the height of the current block. In equations (13)-(21), (vx0, vy0) denotes the motion vector of CP1, (vx1, vy1) denotes the motion vector of CP2, (vx2, vy2) denotes the motion vector of CP3, and (vx3, vy3) denotes the motion vector of CP4.
[0241] {CP1,CP2,CP4} can be converted to {CP1,CP2,CP3} by the following equation (22):
number
[0242] {CP2,CP3,CP4} can be converted to {CP1,CP2,CP3} by the following equation (23):
number
[0243] {CP1,CP3,CP4} can be converted to {CP1,CP2,CP3} by the following equation (24):
number
[0244] 6. Affine motion model-based advanced motion vector prediction mode (Affine AMVP mode)
[0245] (1) Build a list of candidate motion vectors
[0246] The candidate motion vector list for the affine motion model-based AMVP mode is constructed by using the inherited control point motion vector prediction method and / or the constructed control point motion vector prediction method. In this embodiment of the present application, the candidate motion vector list for the affine motion model-based AMVP mode may be referred to as a control point motion vector predictor candidate list. Each control point motion vector predictor includes two control point motion vectors (for a four-parameter affine motion model) or three control point motion vectors (for a six-parameter affine motion model).
[0247] Optionally, the control point motion vector predictor candidate list can be pruned and sorted according to certain rules and truncated or padded to a certain amount.
[0248] (2) Determine the optimal control point motion vector predictor
[0249] On the encoder side, the motion vector of each child motion compensation unit in the current coding block is obtained based on each control point motion vector predictor in the control point motion vector predictor list by using equations (3) / (5). The sample values at the corresponding positions in the reference frame pointed to by the motion vector of each child motion compensation unit are obtained, and the sample values are used as predictors to perform motion compensation using an affine motion model. The average difference between the original value and the predictor of each sample in the current coding block is calculated. The control point motion vector predictor corresponding to the smallest average difference is selected as the optimal control point motion vector predictor and used as the motion vector predictor for two / three control points of the current coding block. An index number representing the position of the control point motion vector predictor in the control point motion vector predictor candidate list is coded into the bitstream and transmitted to the decoder.
[0250] At the decoder side, the index number is analyzed, and based on the index number, a control point motion vectors predictor (CPMVP) is determined from the control point motion vector predictor candidate list.
[0251] (3) Determine the control point motion vectors
[0252] At the encoder side, the control point motion vector predictor is used as a search starting point for motion search within a certain search range to obtain control point motion vectors (CPMV). The control point motion vector differences (CPMVD) between the control point motion vectors and the control point motion vector predictor are transferred to the decoder side.
[0253] At the decoder side, the control point motion vector differential is analyzed and added to the control point motion vector predictor to obtain the control point motion vector.
[0254] 7. Affine Merge mode
[0255] By using the inherited control point motion vector prediction method and / or the constructed control point motion vector prediction method, a control point motion vectors merge candidate list is constructed.
[0256] Optionally, the control point motion vector predictor candidate list can be pruned and sorted according to certain rules and truncated or padded to a certain amount.
[0257] On the encoder side, the motion vector of each child motion compensation unit (N1 × N2 sample blocks or samples obtained by dividing according to a specific method) in the current coding block is obtained based on each control point motion vector in the merge candidate list using equations (3) / (5). The sample value at the position in the reference frame pointed to by the motion vector of each child motion compensation unit is obtained, and the sample value is used as a predictor to perform affine motion compensation. The average difference between the original value of each sample in the current coding block and the predictor is calculated. The control point motion vector corresponding to the smallest average difference is selected as the motion vector for two / three control points of the current coding block. The index number representing the position of the control point motion vector in the candidate list is coded into the bitstream and transmitted to the decoder.
[0258] At the decoder side, the index number is analyzed, and based on the index number, control point motion vectors (CPMVs) are determined from the control point motion vector merge candidate list.
[0259] It should be noted that in this application, "at least one" means one or more, and "multiple" means two or more. "And / or" describes an associative relationship for describing related objects and indicates that three relationships may exist. For example, A and / or B may represent the following cases: only A is present, both A and B are present, or only B is present, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between related objects. "At least one of the following items" or similar expressions refers to any combination of these items, including a single item or any combination of multiple items. For example, "at least one of a, b, or c" may refer to a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c may be singular or plural.
[0260] In this application, a syntax element may be used to signal the inter prediction mode if the inter prediction mode is used to decode the current block.
[0261] For some currently used syntax structures of the inter prediction modes used to analyze the current block, see Table 1. It should be noted that the syntax elements in the syntax structures may alternatively be represented by other identifiers, which is not specifically limited in this application. Table 1 [Table 1-1] [Table 1-2]
[0262] The syntax element merge_flag[x0][y0] can be used to indicate whether merge mode is used for the current block. For example, merge_flag[x0][y0]=1 indicates that merge mode is used for the current block, and merge_flag[x0][y0]=0 indicates that merge mode is not used for the current block, where x0 and y0 indicate the coordinates of the current block in the video picture.
[0263] The variable allowAffineMerge can be used to indicate whether the current block meets the conditions for using the affine motion model-based merge mode. For example, allowAffineInter = 0 indicates that the conditions for using the affine motion model-based merge mode are not met, and allowAffineInter = 1 indicates that the conditions for using the affine motion model-based merge mode are met. The condition for using the affine motion model-based merge mode may be that both the width and height of the current block are 8 or greater, where cbWidth indicates the width of the current block and cbHeight indicates the height of the current block. In other words, if cbWidth < 8 or cbHeight < 8, allowAffineMerge = 0; if cbWidth ≥ 8 and cbHeight ≥ 8, allowAffineMerge = 1.
[0264] The variable allowAffineInter can be used to indicate whether the current block meets the conditions for using the affine motion model-based AMVP mode. For example, if allowAffineInter=0, it indicates that the conditions for using the affine motion model-based AMVP mode are not met, and if alloweAffineInter=1, it indicates that the conditions for using the affine motion model-based AMVP mode are met. A condition for using the affine motion model-based AMVP mode may be that both the width and height of the current block are 16 or greater. In other words, if cbWidth<16 or cbHeight<16, alloweAffineMerge=0; if cbWidth≧16 and cbHeight≧16, allowAffineMerge=1.
[0265] The syntax element affine_merge_flag[x0][y0] may be used to indicate whether the affine motion model-based merge mode is used for the current block. The type of the slice (slice_type) in which the current block is located is either P type or B type. For example, if affine_merge_flag[x0][y0]=1, it indicates that the affine motion model-based merge mode is used for the current block. If affine_merge_flag[x0][y0]=0, it indicates that the affine motion model-based merge mode is not used for the current block, but the translational motion model-based merge mode may be used.
[0266] The syntax element merge_idx[x0][y0] may be used to indicate an index value in the merge candidate list.
[0267] The syntax element affine_merge_idx[x0][y0] may be used to indicate an index value in the affine merge candidate list.
[0268] The syntax element affine_inter_flag[x0][y0] may be used to indicate whether affine motion model-based AMVP mode is used for the current block when the slice in which the current block is located is a P-type slice or a B-type slice. For example, allowAffineInter=0 indicates that affine motion model-based AMVP mode is used for the current block, and allowAffineInter=1 indicates that affine motion model-based AMVP mode is not used for the current block, but translational motion model-based AMVP mode may be used.
[0269] If the slice in which the current block is located is a P-type slice or a B-type slice, the syntax element affine_type_flag[x0][y0] may be used to indicate whether a 6-parameter affine motion model is used to perform motion compensation for the current block. If affine_type_flag[x0][y0]=0, it indicates that a 6-parameter affine motion model is not used to perform motion compensation for the current block and only a 4-parameter affine motion model may be used to perform motion compensation. If affine_type_flag[x0][y0]=1, it indicates that a 6-parameter affine motion model is used to perform motion compensation for the current block.
[0270] As shown in Table 2, when MotionModelIdc[x0][y0]=1, it indicates that a 4-parameter affine motion model is being used, when MotionModelIdc[x0][y0]=2, it indicates that a 6-parameter affine motion model is being used, and when MotionModelIdc[x0][y0]=0, it indicates that a translational motion model is being used. Table 2 [Table 2]
[0271] The variables MaxNumMergeCand and MaxAffineNumMrgCand indicate the maximum list length and are used to indicate the maximum length of the constructed candidate motion vector list, inter_pred_idc[x0][y0] is used to indicate the prediction direction, PRED_L1 is used to indicate backward prediction, num_ref_idx_l0_active_minus1 indicates the amount of reference frames in the forward reference frame list, and ref_idx_l0[x0][y0] is the forward reference frame index value of the current block. where mvd_coding(x0,y0,0,0) indicates the first motion vector differential, mvp_l0_flag[x0][y0] indicates the forward MVP candidate list index value, PRED_L0 indicates forward prediction, num_ref_idx_l1_active_minus1 indicates the amount of reference frames in the backward reference frame list, ref_idx_l1[x0][y0] indicates the backward reference frame index value of the current block, and mvp_l1_flag[x0][y0] indicates the backward MVP candidate list index value.
[0272] In Table 1, ae(v) denotes the syntax element to be coded by context-based adaptive binary arithmetic coding (CABAC).
[0273] The inter prediction process will be described in detail below, and please refer to Figure 9A.
[0274] Step 601: Parse the bitstream based on the syntax structure shown in Table 1 to determine the inter prediction mode of the current block.
[0275] If it is determined that the inter prediction mode of the current block is the affine motion model-based AMVP mode, step 602a is executed.
[0276] Specifically, if the syntax element merge_flag=0 and the syntax element affine_inter_flag=1, it indicates that the inter prediction mode of the current block is the affine motion model-based AMVP mode.
[0277] If it is determined that the inter prediction mode of the current block is the affine motion model-based merge mode, step 602b is executed.
[0278] Specifically, if the syntax element merge_flag=1 and the syntax element affine_merge_flag=1, it indicates that the inter prediction mode of the current block is the affine motion model-based merge mode.
[0279] Step 602a: Create a candidate motion vector list corresponding to the affine motion model-based AMVP mode, and then perform step 603a.
[0280] Candidate control point motion vectors for the current block are derived using the inherited control point motion vector prediction method and / or the constructed control point motion vector prediction method and added to the candidate motion vector list.
[0281] The candidate motion vector list may contain a 2-tuple list (a 4-parameter affine motion model is used for the current coding block) or a 3-tuple list. A 2-tuple list contains one or more 2-tuples used to construct a 4-parameter affine motion model. A 3-tuple list contains one or more 3-tuples used to construct a 6-parameter affine motion model.
[0282] Optionally, the 2-tuple / 3-tuple list of candidate motion vectors can be pruned and sorted according to specific rules, and truncated or padded to a specific amount.
[0283] A1: The process of building a candidate motion vector list by using the inheritance control point motion vector prediction method is described.
[0284] Figure 7 is used as an example. The neighboring blocks around the current block are traversed in the order A1 → B1 → B0 → A0 → B2 in Figure 7 to find the affine coding block in which the neighboring blocks are located and obtain the control point motion information of the affine coding block. Furthermore, the control point motion information of the candidate for the current block is derived by using a motion model constructed based on the control point motion information of the affine coding block. For details, please refer to the related description of the inherited control point motion vector prediction method in 3. Details will not be described here.
[0285] For example, if the affine motion model used for the current block is a four-parameter affine motion model (i.e., MotionModelIdc=1), and the four-parameter affine motion model is used for an adjacent affine-decoded block, the motion vectors of two control points of the affine-decoded block are obtained: the motion vector (vx4,vy4) of the upper-left control point (x4,y4) and the motion vector (vx5,vy5) of the upper-right control point (x5,y5). The affine-decoded block is an affine-coded block that is predicted in the encoding phase by using the affine motion model.
[0286] The motion vectors of the top-left control point and the top-right control point of the current block are derived according to Equations (6) and (7), respectively, corresponding to the four-parameter affine motion model by using a four-parameter affine motion model that includes two control points of adjacent affine-decoded blocks.
[0287] When a six-parameter affine motion model is used for adjacent affine-decoded blocks, the motion vectors of the three control points of the adjacent affine-decoded blocks are obtained, for example, the motion vector (vx4,vy4) of the top-left control point (x4,y4), the motion vector (vx5,vy5) of the top-right control point (x5,y5), and the motion vector (vx6,vy6) of the bottom-left control point (x6,y6) in Figure 7.
[0288] The motion vectors of the top-left control point and the top-right control point of the current block are derived according to Equations (8) and (9), respectively, corresponding to the six-parameter affine motion model by using the six-parameter affine motion model including the three control points of the adjacent affine-decoded blocks.
[0289] For example, the affine motion model used for the current decoding block is a 6-parameter affine motion model (i.e., MotionModelIdc=2).
[0290] If the affine motion model used for the adjacent affine-decoded block is a six-parameter affine motion model, the motion vectors of the three control points of the adjacent affine-decoded block are obtained, for example, the motion vector (vx4, vy4) of the upper left control point (x4, y4), the motion vector (vx5, vy5) of the upper right control point, and the motion vector (vx6, vy6) of the lower left control point (x6, y6) in Figure 7.
[0291] The motion vectors of the upper-left control point, the upper-right control point, and the lower-left control point of the current block are derived according to Equations (8), (9), and (10), respectively, corresponding to the six-parameter affine motion model by using the six-parameter affine motion model including the three control points of the adjacent affine-decoded blocks.
[0292] If the affine motion model used for the adjacent affine-decoded block is a four-parameter affine motion model, the motion vectors of two control points of the affine-decoded block are obtained, for example, the motion vector (vx4,vy4) of the top-left control point (x4,y4) and the motion vector (vx5,vy5) of the top-right control point (x5,y5).
[0293] The motion vectors of the upper-left control point, the upper-right control point, and the lower-left control point of the current block are derived according to Equations (6) and (7), respectively, corresponding to the four-parameter affine motion model by using a four-parameter affine motion model including two control points of adjacent affine-decoded blocks.
[0294] It should be noted that other motion models, candidate positions, and search orders are also applicable to this application, and will not be described in detail here. It should be noted that other methods in which control points are used to represent the motion models of neighboring and current coding blocks are also applicable to this application, and will not be described in detail here.
[0295] A2: Construction The process of constructing a candidate motion vector list by using the control point motion vector prediction method is described.
[0296] For example, if the affine motion model used for the current decoding block is a four-parameter affine motion model (i.e., MotionModelIdc=1), the motion vectors of the upper-left sample and the upper-right sample of the current coding block are determined by using the motion information of the coding blocks adjacent to the current coding block. Specifically, the candidate motion vector list can be constructed by using construction control point motion vector prediction method 1 or construction control point motion vector prediction method 2. For specific methods, see the descriptions of 4 and 5. Details will not be described here.
[0297] For example, if the affine motion model used for the current decoding block is a 6-parameter affine motion model (i.e., MotionModelIdc=2), the motion vectors for the top-left sample, top-right sample, and bottom-left sample of the current coding block are determined by using the motion information of the coding blocks adjacent to the current coding block. Specifically, the candidate motion vector list can be constructed by using construction control point motion vector prediction method 1 or construction control point motion vector prediction method 2. For specific methods, see the descriptions of 4 and 5. Details will not be described here.
[0298] It should be noted that other methods of combining control point motion information are also applicable to this application, and will not be described in detail here.
[0299] Step 603a: Analyze the bitstream to determine the optimal control point motion vector predictor, and perform step 604a.
[0300] B1: If the affine motion model used for the current decoding block is a 4-parameter affine motion model (MotionModelIdc=1), the index numbers are analyzed, and based on the index numbers, the best motion vector predictor at the two control points is determined from the candidate motion vector list.
[0301] For example, the index number is mvp_l0_flag or mvp_l1_flag.
[0302] B2: If the affine motion model used for the current decoding block is a 6-parameter affine motion model (MotionModelIdc=2), the index number is analyzed, and based on the index number, the best motion vector predictor at the three control points is determined from the candidate motion vector list.
[0303] Step 604a: Analyze the bitstream to determine control point motion vectors.
[0304] C1: If the affine motion model used for the current decoding block is a four-parameter affine motion model (MotionModelIdc=1), the motion vector differential of the two control points of the current block is obtained from the bitstream by decoding, and the motion vector of the control point is obtained based on the motion vector differential of the control point and the motion vector predictor.Using forward prediction as an example, the motion vector differential of the two control points is mvd_coding(x0,y0,0,0) and mvd_coding(x0,y0,0,1) respectively.
[0305] For example, the motion vector differentials of the top-left and top-right control points are obtained from the bitstream by decoding and added to the motion vector predictor respectively to obtain the motion vectors of the top-left and top-right control points of the current block.
[0306] C2: The affine motion model used for the current decoding block is a 6-parameter affine motion model (MotionModelIdc=2).
[0307] The motion vector differentials of the three control points of the current block are obtained from the bitstream by decoding, and the control point motion vector is obtained according to the motion vector differentials of the control points and the motion vector predictor.Using forward prediction as an example, the motion vector differentials of the three control points are mvd_coding(x0,y0,0,0), mvd_coding(x0,y0,0,1) and mvd_coding(x0,y0,0,2) respectively.
[0308] For example, the motion vector differentials of the top-left control point, the top-right control point, and the bottom-left control point are obtained from the bitstream by decoding, and are added to the motion vector predictor respectively to obtain the motion vectors of the top-left control point, the top-right control point, and the bottom-left control point of the current block.
[0309] Step 605a: Obtain the motion vector of each sub-block in the current block according to the motion information of the control points used in the current decoding block and the affine motion model.
[0310] For each sub-block in the current affine decoding block (one sub-block is equivalent to one motion compensation unit, and the width and height of the sub-block are smaller than those of the current block), the motion information of a sample at a preset position in the motion compensation unit can be used to represent the motion information of all samples in the motion compensation unit. Assuming that the size of the motion compensation unit is MxN, the sample at the preset position may be the center sample (M / 2, N / 2), the top-left sample (0, 0), the top-right sample (M-1, 0), or a sample at another position in the motion compensation unit. Hereinafter, the center sample of the motion compensation unit is used as an example for explanation. Referring to Figure 9C, V0 denotes the motion vector of the top-left control point, and V1 denotes the motion vector of the top-right control point. Each small box represents one compensation unit.
[0311] The coordinates of the center sample of the motion compensation unit relative to the top-left sample of the current affine-decoded block are calculated by using equation (25), where i indicates the ith motion compensation unit in the horizontal direction (from left to right), j indicates the jth motion compensation unit in the vertical direction (from top to bottom), and (x(i,j),y(i,j)) indicates the coordinates of the center sample of the (i,j)th motion compensation unit relative to the top-left sample of the current affine-decoded block.
[0312] If the affine motion model used for the current affine decoding block is a 6-parameter affine motion model, (x(i,j),y(i,j)) is substituted into equation (26) corresponding to the 6-parameter affine motion model to obtain the motion vector of the center sample of each motion compensation unit, and the motion vector of the center sample is used as the motion vector (vx(i,j),vy(i,j)) of all samples in the motion compensation unit.
[0313] If the affine motion model used for the current affine decoding block is a four-parameter affine motion model, (x(i,j),y(i,j)) is substituted into equation (27) corresponding to the four-parameter affine motion model to obtain the motion vector of the center sample of each motion compensation unit, and the motion vector of the center sample is used as the motion vector (vx(i,j),vy(i,j)) of all samples in the motion compensation unit.
number
[0314] Step 606a: Perform motion compensation for each sub-block based on the determined motion vector of the sub-block to obtain a sample predictor of the sub-block.
[0315] Step 602b: Construct a motion information candidate list corresponding to the affine motion model-based merging mode.
[0316] Specifically, the motion information candidate list corresponding to the affine motion model-based merge mode can be constructed by using the inherited control point motion vector prediction method and / or the constructed control point motion vector prediction method.
[0317] Optionally, the motion information candidate list can be pruned and sorted according to certain rules and truncated or padded to a certain amount.
[0318] D1: The process of building a candidate motion vector list by using the inheritance control point motion vector prediction method is described.
[0319] The candidate control point motion information of the current block is derived by using the inherited control point motion vector prediction method and added to the motion information candidate list.
[0320] The neighboring blocks around the current block are traversed in the order of A1 → B1 → B0 → A0 → B2 in Figure 8A to find the located affine coding block and obtain the control point motion information of the affine coding block.Furthermore, the candidate control point motion information of the current block is derived by using the motion model of the affine coding block.
[0321] If the candidate motion vector list is empty, the candidate control point motion information is added to the candidate list. Otherwise, the motion information in the candidate motion vector list is traversed sequentially to check whether the same motion information as the candidate control point motion information exists in the candidate motion vector list. If the same motion information as the candidate control point motion information does not exist in the candidate motion vector list, the candidate control point motion information is added to the candidate motion vector list.
[0322] To determine whether two candidate motion information are identical, it is necessary to sequentially determine whether the forward reference frame, backward reference frame, horizontal and vertical components of each forward motion vector, and horizontal and vertical components of each backward motion vector are identical in the two candidate motion information. Two candidate motion information are considered to be different only if all of the above elements are different.
[0323] If the number of motion information in the candidate motion vector list reaches the maximum list length MaxAffineNumMrgCand (MaxAffineNumMrgCand is a positive integer such as 1, 2, 3, 4, or 5; hereinafter, we will use the length 5 as an example and will not explain in detail), the candidate list is complete. Otherwise, the next neighboring block is traversed.
[0324] D2: The candidate control point motion information of the current block is derived by using the constructed control point motion vector prediction method and added to the motion information candidate list, see Figure 9B.
[0325] Step 601c: Obtain the motion information of the control points of the current block, which can be referred to in step 801 in the construction control point motion vector prediction method 2 in 5. The details will not be described again here.
[0326] Step 602c: Combine the motion information of the control points to obtain constructed control point motion information, see step 801 in Figure 8B, and the details will not be described again here.
[0327] Step 603c: Add the motion information of the constructed control points to a list of candidate motion vectors.
[0328] If the length of the candidate list is shorter than the maximum list length MaxAffineNumMrgCand, the combinations are traversed in a preset order to obtain a combination that is valid as the candidate control point motion information. In this case, if the candidate motion vector list is empty, the candidate control point motion information is added to the candidate motion vector list. Otherwise, the motion information in the candidate motion vector list is traversed sequentially to check whether motion information identical to the candidate control point motion information exists in the candidate motion vector list. If motion information identical to the candidate control point motion information does not exist in the candidate motion vector list, the candidate control point motion information is added to the candidate motion vector list.
[0329] For example, the pre-set order is: Affine(CP1,CP2,CP3) → Affine (CP1,CP2,CP4) → Affine(CP1,CP3,CP4) → Affine(CP2,CP3,CP4) → Affine(CP1,CP2) → Affine(CP1,CP3) → Affine(CP2,CP3) → Affine(CP1,CP4) → Affine(CP2,CP4) → Affine(CP3,CP4). There are a total of 10 combinations.
[0330] If the control point motion information corresponding to the combination is not available, the combination is considered unavailable. If the combination is available, the reference frame index of the combination is determined (in the case of two control points, the smaller reference frame index is selected as the reference frame index of the combination; in the case of more than two control points, the reference frame index that appears most frequently is selected; if multiple reference frame indexes appear the same number of times, the smallest reference frame index is selected as the reference frame index of the combination), and the motion vectors of the control points are scaled. If the scaled motion information of all control points is consistent, the combination is invalid.
[0331] Optionally, in this embodiment of the present application, the candidate motion vector list may be padded. For example, if, after the above-described traversal process, the length of the candidate motion vector list is less than the maximum list length MaxAffineNumMrgCand, the candidate motion vector list may be padded until the list length is equal to MaxAffineNumMrgCand.
[0332] The padding can be performed using a zero motion vector padding method or by combining or weighted averaging existing candidate motion information in an existing list. It should be noted that other methods for padding the candidate motion vector list are also applicable to this application. Details will not be described here.
[0333] Step S603b: Analyze the bitstream to determine optimal control point motion information.
[0334] The index number is analyzed, and based on the index number, the best control point motion information is determined from the candidate motion vector list.
[0335] Step 604b: Obtain the motion vector of each sub-block of the current block according to the optimal control point motion information and the affine motion model used in the current decoding block.
[0336] This step is the same as step 605a.
[0337] Step 605b: Perform motion compensation for each sub-block based on the determined motion vector of the sub-block to obtain a sample predictor of the sub-block.
[0338] The techniques in this invention relate to other entropy decoders, such as a Context-Adaptive Binary Arithmetic Coding (CABAC) entropy decoder, or a Probability Interval Partitioned Entropy (PIPE) decoder or related decoders. Arithmetic decoding is a form of entropy decoding used in many compression algorithms that has high decoding efficiency because symbols can be mapped to fractional length codes in arithmetic decoding. In general, decoding data symbols with CABAC involves one or more of the following steps:
[0339] (1) Binary coding: If the symbols to be decoded are not binary, they are mapped to a "binary" sequence, where each binary bit can have the value "0" or "1".
[0340] (2) Context assignment: (in normal mode) one context is assigned to each binary bit. A context model is used to determine how to compute the context for a given binary bit based on the information available for that binary bit, e.g., the value of a previously decoded symbol or a binary number.
[0341] (3) Binary Encoding: Arithmetic encoders encode binary bits. To encode binary bits, arithmetic encoders require the probability of the binary bit value as input, i.e., the probability that the value of the binary bit is equal to "0" and the probability that the value of the binary bit is equal to "1". The (estimated) probability of each context is expressed as an integer value called the "context state". Each context has a state, and therefore, the state (i.e., the estimated probability) is the same for binary bits assigned to one context and differs between contexts.
[0342] (4) State Update: The probability (state) of selecting a context is updated based on the actual decoded value of the binary bit (e.g., if the value of the binary bit is “1”, the probability of “1” is increased).
[0343] In the prior art, when parsing parameter information of an affine motion model, such as affine_merge_flag, affine_merge_idx, affine_inter_flag, and affine_type_flag in Table 1, by CABAC, different contexts need to be used for different syntax elements in the CABAC parsing. In the present invention, the amount of context used in CABAC is reduced. Therefore, less space required by the encoder and decoder to store the contexts is occupied without affecting coding efficiency.
[0344] For affine_merge_flag and affine_inter_flag, two different context sets (each containing three contexts) are used in CABAC in the prior art. The actual context index used in each set is equal to the sum of the value of the same syntax element in the left neighboring block of the currently decoded block and the value of the same syntax element in the above neighboring block of the currently decoded block, as shown in Table 3. Here, availableL indicates the availability of the left neighboring block of the currently decoded block (whether the left neighboring block exists and has been decoded), and availableA indicates the availability of the above neighboring block of the currently decoded block (whether the above neighboring block exists and has been decoded). In the prior art, the amount of context for affine_merge_flag and affine_inter_flag is 6. Table 3 Context Index [Table 3]
[0345] Figure 10 describes the procedure of a video decoding method according to one embodiment of the present invention, which can be implemented by the video decoder shown in Figure 3. As shown in Figure 10, the method includes the following steps:
[0346] 1001. Parse a received bitstream to obtain syntax elements to be entropy decoded in a current block, where the syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block.
[0347] In the implementation, syntax element 1 in the current block is affine_merge_flag, or syntax element 2 in the current block is affine_inter_flag.
[0348] In the implementation, syntax element 1 in the current block is subblock_merge_flag, or syntax element 2 in the current block is affine_inter_flag.
[0349] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0350] The current block in this embodiment of the present invention may be a CU.
[0351] 1002. Perform entropy decoding on the syntax element to be entropy decoded in the current block. The entropy decoding on syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy decoding on syntax element 2 in the current block is completed by using a pre-configured context model.
[0352] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0353] 1003. Based on the syntax elements in the current block and obtained by entropy decoding, perform a prediction process on the current block to obtain a predicted block of the current block.
[0354] This step may be specifically performed by prediction processing unit 360 of FIG.
[0355] 1004. Obtain a reconstructed image of the current block based on the predicted block of the current block.
[0356] This step may be specifically performed by the reconstruction unit 314 of FIG.
[0357] In this embodiment, since syntax element 1 and syntax element 2 in the current block share one context model, the decoder does not need to check the context model when performing entropy decoding, thereby improving the decoding efficiency of the decoder performing video decoding. Furthermore, since the video decoder only needs to store one context model for syntax element 1 and syntax element 2, less storage space is occupied in the video decoder.
[0358] Corresponding to the video decoding method illustrated in FIG. 10 , an embodiment of the present invention further provides an encoding method, which comprises: The method includes the steps of: obtaining syntax elements in a current block to be entropy coded, where the syntax elements in the current block to be entropy coded include syntax element 1 in the current block or syntax element 2 in the current block; performing entropy coding on the syntax elements in the current block to be entropy coded, where, when entropy coding is performed on the syntax elements in the current block to be entropy coded, the entropy coding on syntax element 1 in the current block is completed by using a preset context model, or the entropy coding on syntax element 2 in the current block is completed by using a context model; and outputting a bitstream including the syntax elements in the current block that are obtained by entropy coding. The context model used when entropy coding is performed on the current block is the same as the context model in the video decoding method described in FIG. 10. In this embodiment, since syntax element 1 and syntax element 2 in the current block share one context model, the encoder does not need to check the context model when performing entropy encoding, thereby improving the encoding efficiency of video encoding by the encoder. Furthermore, since the video encoder only needs to store one context model for syntax element 1 and syntax element 2, less storage space is occupied in the video encoder.
[0359] Figure 11 describes the procedure of a video decoding method according to another embodiment of the present invention, which can be implemented by the video decoder shown in Figure 3. As shown in Figure 11, the method includes the following steps:
[0360] 1101. Parse the received bitstream to obtain syntax elements to be entropy decoded in the current block. The syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block.
[0361] In the implementation, syntax element 1 in the current block is affine_merge_flag and syntax element 2 in the current block is affine_inter_flag.
[0362] In the implementation, syntax element 1 in the current block is subblock_merge_flag, and syntax element 2 in the current block is affine_inter_flag.
[0363] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0364] 1102. Obtain a context model corresponding to a syntax element to be entropy decoded. The context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set.
[0365] A video decoder needs to store only one context model set for syntax element 1 and syntax element 2.
[0366] In some implementations, the pre-configured context model set includes only two context models. In some other implementations, the pre-configured context model set includes only three context models. It can be understood that the pre-configured context model set may alternatively include four, five, or six context models. The amount of context models included in the pre-configured context model set is not limited in this embodiment of the present invention.
[0367] In the implementation, determining a context model corresponding to syntax element 1 in the current block from a preset context model set includes determining a context index for syntax element 1 in the current block based on syntax element 1 and syntax element 2 in a left-adjacent block of the current block and syntax element 1 and syntax element 2 in an above-adjacent block of the current block, and the context index for syntax element 1 in the current block is used to indicate the context model corresponding to syntax element 1 in the current block.
[0368] In another implementation, determining a context model corresponding to syntax element 2 in the current block from a predetermined context model set includes determining a context index for syntax element 2 in the current block based on syntax element 1 and syntax element 2 in a left-adjacent block of the current block and syntax element 1 and syntax element 2 in an above-adjacent block of the current block, and the context index for syntax element 2 in the current block is used to indicate the context model corresponding to syntax element 2 in the current block.
[0369] For example, if the amount of context models in the pre-configured context model set is 3, the value of the context index of syntax element 1 in the current block is the sum of the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block, or the value of the context index of syntax element 2 in the current block is the sum of the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block.
[0370] Specifically, syntax element 1 affine_merge_flag and syntax element 2 affine_inter_flag can share one context model set (the set contains three context models). The actual context index used in each set is equal to the result obtained by adding the value obtained by performing an OR operation on the two syntax elements in the left-neighboring block of the current decoding block and the value obtained by performing an OR operation on the two syntax elements in the above-neighboring block of the current decoding block, as shown in Table 4. Here, "|" indicates an OR operation. Table 4. Context index in this invention [Table 4]
[0371] For example, if the amount of context models in the pre-configured context model set is 2, the value of the context index of syntax element 1 in the current block is the result obtained by performing an OR operation on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the above-adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left-adjacent block, or the value of the context index of syntax element 2 in the current block is the result obtained by performing an OR operation on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the above-adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left-adjacent block.
[0372] Specifically, syntax element 1 affine_merge_flag and syntax element 2 affine_inter_flag share one context model set (the set contains two context models). The actual context index used in each set is equal to the result of performing an OR operation on the value obtained by performing an OR operation on the two syntax elements in the left-neighboring block of the current decoding block and the value obtained by performing an OR operation on the two syntax elements in the above-neighboring block of the current decoding block, as shown in Table 5, where "|" indicates an OR operation. In this embodiment of the present invention, the amount of context for affine_merge_flag and affine_inter_flag is reduced to two. Table 5. Context index in this invention [Table 5]
[0373] 1103. Based on the context model corresponding to the syntax element to be entropy decoded in the current block, perform entropy decoding on the syntax element to be entropy decoded.
[0374] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0375] 1104. Based on the syntax elements in the current block and obtained by entropy decoding, perform a prediction process on the current block to obtain a predicted block of the current block.
[0376] This step may be specifically performed by prediction processing unit 360 of FIG.
[0377] 1105. Obtain a reconstructed image of the current block based on the predicted block of the current block.
[0378] This step may be specifically performed by the reconstruction unit 314 of FIG.
[0379] In this embodiment, syntax element 1 and syntax element 2 in the current block share one context model, so the video decoder only needs to store one context model for syntax element 1 and syntax element 2, occupying less storage space in the video decoder.
[0380] Corresponding to the video decoding method illustrated in FIG. 11 , an embodiment of the present invention further provides an encoding method, which comprises: The method includes the steps of: obtaining syntax elements in a current block to be entropy coded, where the syntax elements in the current block to be entropy coded include syntax element 1 in the current block or syntax element 2 in the current block; obtaining context models corresponding to the syntax elements to be entropy coded, where the context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set; performing entropy coding on the syntax elements to be entropy coded based on the context models corresponding to the syntax elements in the current block to be entropy coded; and outputting a bitstream including the syntax elements in the current block that are obtained by entropy coding. The context model set used when entropy coding is performed on the current block is the same as the context model set in the video decoding method described in FIG. In this embodiment, syntax element 1 and syntax element 2 in the current block share one context model, so the video encoder only needs to store one context model for syntax element 1 and syntax element 2, occupying less storage space in the video encoder.
[0381] Figure 12 describes the procedure of a video decoding method according to an embodiment of the present invention. This embodiment may be performed by the video decoder shown in Figure 3. As shown in Figure 12, the method includes the following steps:
[0382] 1201. Parse the received bitstream to obtain syntax elements to be entropy decoded in the current block. The syntax elements to be entropy decoded in the current block include syntax element 3 in the current block or syntax element 4 in the current block.
[0383] In the implementation, syntax element 3 in the current block is merge_idx and syntax element 4 in the current block is affine_merge_idx.
[0384] In the implementation, syntax element 3 in the current block is merge_idx, and syntax element 4 in the current block is subblock_merge_idx.
[0385] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0386] 1202. Obtain a context model corresponding to the syntax element to be entropy decoded. The context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set.
[0387] In this implementation, the number of context models included in the preset context model set is 5. It can be understood that the number of context models included in the preset context model set may alternatively be another value, such as 1, 2, 3, or 4. If the number of context models included in the preset context model set is 1, the preset context model set is one context model. The number of context models included in the preset context model set is not limited in this embodiment of the present invention.
[0388] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0389] 1203. Based on the context model corresponding to the syntax element to be entropy decoded in the current block, entropy decoding is performed on the syntax element to be entropy decoded.
[0390] This step may be specifically performed by the entropy decoding unit 304 of FIG.
[0391] 1204. Based on the syntax elements in the current block and obtained by entropy decoding, perform a prediction process on the current block to obtain a predicted block of the current block.
[0392] This step may be specifically performed by prediction processing unit 360 of FIG.
[0393] 1205. Obtain a reconstructed image of the current block based on the predicted block of the current block.
[0394] This step may be specifically performed by the reconstruction unit 314 of FIG.
[0395] In this embodiment, syntax element 3 and syntax element 4 in the current block share one context model, so the video decoder only needs to store one context model for syntax element 3 and syntax element 4, occupying less storage space in the video decoder.
[0396] Corresponding to the video decoding method illustrated in Fig. 12, an embodiment of the present invention further provides an encoding method, the encoding method including the steps of: obtaining syntax elements in a current block to be entropy coded, where the syntax elements in the current block to be entropy coded include syntax element 3 in the current block or syntax element 4 in the current block; obtaining context models corresponding to the syntax elements to be entropy coded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set; performing entropy coding on the syntax elements to be entropy coded based on the context model corresponding to the syntax elements in the current block to be entropy coded; and outputting a bitstream including the syntax elements in the current block that are obtained by entropy coding. The context model set used when entropy coding is performed on the current block is the same as the context model set in the video decoding method described in Fig. 12. In this embodiment, syntax element 3 and syntax element 4 in the current block share one context model, so the video encoder only needs to store one context model for syntax element 3 and syntax element 4, occupying less storage space in the video encoder.
[0397] An embodiment of the present invention provides a video decoder 30 that includes an entropy decoding unit 304, a prediction processing unit 360, and a reconstruction unit 314.
[0398] The entropy decoding unit 304 is configured to parse the received bitstream to obtain syntax elements to be entropy decoded in the current block, where the syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block, and the entropy decoding unit 304 is configured to perform entropy decoding on the syntax elements to be entropy decoded in the current block, where the entropy decoding on syntax element 1 in the current block is completed by using a pre-set context model, or the entropy decoding on syntax element 2 in the current block is completed by using a context model.
[0399] In the implementation, syntax element 1 in the current block is affine_merge_flag and syntax element 2 in the current block is affine_inter_flag.
[0400] In the implementation, syntax element 1 in the current block is subblock_merge_flag, and syntax element 2 in the current block is affine_inter_flag.
[0401] Prediction processing unit 360 is configured to perform a prediction process on the current block based on syntax elements in the current block and obtained by entropy decoding to obtain a prediction block of the current block.
[0402] The reconstruction unit 314 is configured to obtain a reconstructed image of the current block based on the prediction block of the current block.
[0403] In this embodiment, since syntax element 1 and syntax element 2 in the current block share one context model, the decoder does not need to check the context model when performing entropy decoding, thereby improving the decoding efficiency of the decoder performing video decoding. Furthermore, since the video decoder only needs to store one context model for syntax element 1 and syntax element 2, less storage space is occupied in the video decoder.
[0404] Accordingly, an embodiment of the present invention provides a video encoder 20, including: an entropy encoding unit 270 configured to obtain syntax elements to be entropy encoded in a current block, where the syntax elements to be entropy encoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block; the entropy encoding unit configured to perform entropy encoding on the syntax elements to be entropy encoded in the current block, where, when entropy encoding is performed on the syntax elements to be entropy encoded in the current block, the entropy encoding on syntax element 1 in the current block is completed by using a preset context model; or the entropy encoding on syntax element 2 in the current block is completed by using a context model; and an output 272 configured to output a bitstream including the syntax elements in the current block obtained by entropy encoding. The context model used when entropy encoding is performed on the current block is the same as the context model in the method described in FIG. 10 . In this embodiment, since syntax element 1 and syntax element 2 in the current block share one context model, the encoder does not need to check the context model when performing entropy encoding, thereby improving the encoding efficiency of video encoding by the encoder. Furthermore, since the video encoder only needs to store one context model for syntax element 1 and syntax element 2, less storage space is occupied in the video encoder.
[0405] Another embodiment of the present invention provides a video decoder 30 including an entropy decoding unit 304, a prediction processing unit 360, and a reconstruction unit 314.
[0406] The entropy decoding unit 304 is configured to parse the received bitstream to obtain syntax elements to be entropy decoded in the current block, where the syntax elements to be entropy decoded in the current block include syntax element 1 in the current block or syntax element 2 in the current block; the entropy decoding unit 304 is configured to obtain context models corresponding to the syntax elements to be entropy decoded, where the context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set; and the entropy decoding unit is configured to perform entropy decoding on the syntax elements to be entropy decoded based on the context model corresponding to the syntax elements to be entropy decoded in the current block.
[0407] In the implementation, syntax element 1 in the current block is affine_merge_flag and syntax element 2 in the current block is affine_inter_flag.
[0408] In the implementation, syntax element 1 in the current block is subblock_merge_flag, and syntax element 2 in the current block is affine_inter_flag.
[0409] In implementation, the entropy decoding unit 304 may be specifically configured to determine a context index of the syntax element 1 in the current block based on the syntax element 1 and the syntax element 2 in the left-neighboring block of the current block and the syntax element 1 and the syntax element 2 in the upper-neighboring block of the current block, and the context index of the syntax element 1 in the current block is used to indicate a context model corresponding to the syntax element 1 in the current block; or The entropy decoding unit may be configured to determine a context index for syntax element 2 in the current block based on syntax element 1 and syntax element 2 in a left-neighboring block of the current block and syntax element 1 and syntax element 2 in an upper-neighboring block of the current block, and the context index for syntax element 2 in the current block is used to indicate a context model corresponding to syntax element 2 in the current block.
[0410] For example, the value of the context index of syntax element 1 in the current block is the sum of the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the top-neighboring block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left-neighboring block; or The value of the context index of syntax element 2 in the current block is the sum of the value obtained by performing an OR operation on syntax elements 1 and 2 in the upper adjacent block and the value obtained by performing an OR operation on syntax elements 1 and 2 in the left adjacent block.
[0411] For example, the value of the context index of syntax element 1 in the current block is the result obtained by performing an OR operation on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the top-neighboring block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left-neighboring block; or The value of the context index of syntax element 2 in the current block is the result obtained by performing an OR operation on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the above-adjacent block and the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left-adjacent block.
[0412] Prediction processing unit 360 is configured to perform prediction processing on the current block based on the syntax elements in the current block and obtained by entropy decoding, to obtain a prediction block of the current block.
[0413] The reconstruction unit 314 is configured to obtain a reconstructed image of the current block based on the prediction block of the current block.
[0414] In this embodiment, syntax element 1 and syntax element 2 in the current block share one context model, so the video decoder only needs to store one context model for syntax element 1 and syntax element 2, occupying less storage space in the video decoder.
[0415] Accordingly, an embodiment of the present invention further provides a video encoder 20, the video encoder including: an entropy encoding unit 270 configured to obtain syntax elements in a current block to be entropy encoded, where the syntax elements in the current block to be entropy encoded include syntax element 1 in the current block or syntax element 2 in the current block; the entropy encoding unit configured to obtain context models corresponding to the syntax elements to be entropy encoded, where the context model corresponding to syntax element 1 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 2 in the current block is determined from a preset context model set; the entropy encoding unit configured to perform entropy encoding on the syntax elements to be entropy encoded based on the context model corresponding to the syntax elements in the current block to be entropy encoded; and an output 272 configured to output a bitstream including the syntax elements in the current block obtained by entropy encoding. The context model set used when entropy coding is performed on the current block is the same as the context model set in the video decoding method described in Figure 11. In this embodiment, because syntax element 1 and syntax element 2 in the current block share one context model, the video encoder only needs to store one context model for syntax element 1 and syntax element 2, occupying less storage space in the video encoder.
[0416] Another embodiment of the present invention provides a video decoder 30 including an entropy decoding unit 304, a prediction processing unit 360, and a reconstruction unit 314.
[0417] The entropy decoding unit 304 is configured to parse the received bitstream to obtain syntax elements to be entropy decoded in the current block, where the syntax elements to be entropy decoded in the current block include syntax element 3 in the current block or syntax element 4 in the current block; the entropy decoding unit is configured to obtain context models corresponding to the syntax elements to be entropy decoded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set; and the entropy decoding unit is configured to perform entropy decoding on the syntax elements to be entropy decoded based on the context model corresponding to the syntax elements to be entropy decoded in the current block.
[0418] A pre-configured context model set may include one, two, three, four, or five context models. If a pre-configured context model set includes only one context model, it can be understood that the pre-configured context model set is one context model.
[0419] In the implementation, syntax element 3 in the current block is merge_idx, which is used to indicate the index value of the merge candidate list for the current block, or syntax element 4 in the current block is affine_merge_idx, which is used to indicate the index value of the affine merge candidate list for the current block, or Syntax element 3 in the current block is merge_idx, which is used to indicate the index value of the merge candidate list of the current block, or syntax element 4 in the current block is subblock_merge_idx, which is used to indicate the index value of the subblock merge candidate list.
[0420] Prediction processing unit 360 is configured to perform prediction processing on the current block based on the syntax elements in the current block and obtained by entropy decoding to obtain a prediction block of the current block.
[0421] The reconstruction unit 314 is configured to obtain a reconstructed image of the current block based on the prediction block of the current block.
[0422] In this embodiment, syntax element 3 and syntax element 4 in the current block share one context model, so the video decoder only needs to store one context model for syntax element 3 and syntax element 4, occupying less storage space in the video decoder.
[0423] Accordingly, an embodiment of the present invention further provides a video encoder, comprising: an entropy encoding unit 270 configured to obtain syntax elements in a current block to be entropy encoded, where the syntax elements in the current block to be entropy encoded include syntax element 3 in the current block or syntax element 4 in the current block; the entropy encoding unit configured to obtain a context model corresponding to the syntax elements to be entropy encoded, where the context model corresponding to syntax element 3 in the current block is determined from a preset context model set, or the context model corresponding to syntax element 4 in the current block is determined from a preset context model set; the entropy encoding unit configured to perform entropy encoding on the syntax elements to be entropy encoded based on the context model corresponding to the syntax elements in the current block to be entropy encoded; and an output 272 configured to output a bitstream including the syntax elements in the current block obtained by entropy encoding. The context model set used when entropy coding is performed on the current block is the same as the context model set in the video decoding method described in Figure 12. In this embodiment, because syntax element 3 and syntax element 4 in the current block share one context model, the video encoder only needs to store one context model for syntax element 3 and syntax element 4, occupying less storage space in the video encoder.
[0424] Embodiment 1 of the present invention proposes that affine_merge_flag and affine_inter_flag share one context set (the set includes three contexts), and the actual context index used in each set is equal to the result obtained by adding the value obtained by performing an OR operation on the two syntax elements in the left-neighboring block of the current decoding block and the value obtained by performing an OR operation on the two syntax elements in the above-neighboring block of the current decoding block, as shown in Table 4, where "|" indicates an OR operation. In embodiment 1 of the present invention, the amount of context for affine_merge_flag and affine_inter_flag is reduced to three.
[0425] Embodiment 2 of the present invention proposes that affine_merge_flag and affine_inter_flag share one context set (the set contains two contexts), and the actual context index used in each set is equal to the result obtained by performing an OR operation on the value obtained by performing an OR operation on the two syntax elements in the left-neighboring block of the current decoding block and the value obtained by performing an OR operation on the two syntax elements in the above-neighboring block of the current decoding block, as shown in Table 5, where "|" indicates an OR operation. In embodiment 2 of the present invention, the amount of context for affine_merge_flag and affine_inter_flag is reduced to 2.
[0426] The third embodiment of the present invention proposes that affine_merge_flag and affine_inter_flag share one context. In the third embodiment of the present invention, the number of affine_merge_flag contexts and the number of affine_inter_flag contexts are reduced to one.
[0427] In the prior art, binarization is performed on merge_idx and affine_merge_idx by using truncated unary code, and two different context sets (each containing five contexts) are used in CABAC, and a different context is used for each binary bit after binarization. In the prior art, the amount of context for merge_idx and affine_merge_idx is 10.
[0428] Embodiment 4 of the present invention proposes that merge_idx and affine_merge_idx share one context set (each context set contains 5 contexts). In embodiment 4 of the present invention, the amount of contexts for merge_idx and affine_merge_idx is reduced to 5.
[0429] In some other techniques, the syntax element affine_merge_flag[x0][y0] in Table 1 may be replaced with subblock_merge_flag[x0][y0], which is used to indicate whether subblock-based merging mode is currently used for the block, and the syntax element affine_merge_idx[x0][y0] in Table 1 may be replaced with subblock_merge_idx[x0][y0], which is used to indicate the index value of the subblock merge candidate list.
[0430] In this case, embodiments 1 to 4 of the present invention are still applicable, i.e., subblock_merge_flag and affine_inter_flag share one context set (or context) and one index acquisition method, and merge_idx and subblock_merge_idx share one context set (or context).
[0431] An embodiment of the present invention further provides a video decoder including circuitry configured to perform any of the above methods.
[0432] An embodiment of the present invention further provides a video decoder including at least one processor and a non-volatile computer-readable storage medium coupled to the at least one processor, the non-volatile computer-readable storage medium storing a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, causing the video decoder to operate to perform any of the methods described above.
[0433] An embodiment of the present invention further provides a computer-readable storage medium configured to store a computer program executable by a processor, the computer program, when executed by at least one processor, performing any of the methods described above.
[0434] An embodiment of the present invention further provides a computer program, which, when executed, performs any of the above methods.
[0435] In one or more of the foregoing examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted across a computer-readable medium and executed by a hardware-based processing unit as one or more instructions or code. Computer-readable media may include computer-readable storage media or communication media, corresponding to tangible media such as data storage media. Communication media includes, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communications protocol. Thus, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media or (2) communication media such as signals or carriers. Data storage media may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described herein. A computer program product may include computer-readable media.
[0436] By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store necessary program code in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection may properly be referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, radio, and microwave are included within the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals, or any other transitory medium, and in fact refer to non-transitory tangible storage media. As used herein, disks and optical disks include compact discs (CDs), laser disks, optical disks, digital versatile discs (DVDs), floppy disks, and Blu-ray disks. Disks generally reproduce data magnetically, while optical disks reproduce data optically by using a laser. Combinations of any of the above should also fall within the scope of computer-readable media.
[0437] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), one or more general-purpose microprocessors, one or more application-specific integrated circuits (ASICs), one or more field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Accordingly, the term "processor" as used herein may refer to any one of the foregoing structures or other structures applicable to implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules configured to perform encoding and decoding, or may be incorporated into a combined codec. Furthermore, the techniques may be implemented entirely in one or more circuit or logic elements.
[0438] The techniques of the present disclosure may be implemented in multiple devices or apparatuses, including a wireless handset, an integrated circuit (IC), or an IC set (e.g., a chipset). To highlight the functionality of devices configured to perform the disclosed techniques, various components, modules, or units are described in this disclosure, which are not necessarily implemented by different hardware units. In practice, as described above, the various units may be combined in a codec hardware unit with appropriate software and / or firmware, or may be provided by a set of interoperable hardware units. The hardware units may include one or more processors as described above.
Claims
1. 1. A video decoding method comprising: Parsing the received bitstream to obtain information corresponding to an entropy decoding target and a quantization coefficient in a current block, where the syntax element of the entropy decoding target includes a first syntax element or a second syntax element; obtaining a first context model corresponding to the syntax element to be entropy decoded; performing entropy decoding on the syntax element to be entropy decoded based on the first context model; obtaining the quantization coefficients based on the information; performing inverse quantization on the quantized coefficients to obtain inverse quantized coefficients; performing a prediction process on the current block based on a third syntax element in the current block and based on entropy decoding to obtain a prediction block of the current block; and obtaining a reconstructed image of the current block based on the predicted block and the dequantized coefficients; A method comprising:
2. 2. The method of claim 1, wherein the second context model corresponding to the first syntax element comprises: determining a first context index of the first syntax element based on a fourth syntax element and a fifth syntax element in a left-neighboring block of the current block and a sixth syntax element and a seventh syntax element in an above-neighboring block of the current block, the first context index indicating the second context model being based on a preset context model set.
3. 2. The method of claim 1, wherein the third context model corresponding to the second syntax element is determining a second context index for the second syntax element in the current block based on a fourth syntax element and a fifth syntax element in a left-neighboring block of the current block and a sixth syntax element and a seventh syntax element in an above-neighboring block of the current block, the second context index indicating the third context model being based on a preset context model set.
4. 2. The method of claim 1, wherein the first syntax element is a first flag indicating whether an affine motion model based merging mode is used for the current block; or A method in which the second syntax element is a second flag indicating whether an affine motion model-based AMVP mode is used for the current block when the slice in which the current block is located is a P-type slice or a B-type slice.
5. 2. The method of claim 1, wherein the first syntax element is a first flag indicating whether a sub-block based merging mode is used for the current block; or A method in which the second syntax element is a second flag indicating whether an affine motion model-based AMVP mode is used for the current block when the slice in which the current block is located is a P-type slice or a B-type slice.
6. a non-transitory memory storage configured to store video data in the form of a bitstream, the bitstream including syntax elements to be entropy decoded of a current block, the syntax elements to be entropy decoded including a first syntax element or a second syntax element; and a video decoder coupled to said non-transitory memory storage and configured to perform the method of any one of claims 1 to 5; a video decoding device including:
7. 1. A video encoder comprising: one or more processors coupled to one or more memories and configured to execute programming instructions, the programming instructions causing a video encoding device to: performing quantization to obtain quantized coefficients; obtaining syntax elements to be entropy coded in a current block, wherein the syntax elements to be entropy coded in the current block include a first syntax element or a second syntax element; obtaining a first context model corresponding to the syntax element to be entropy coded; performing entropy coding on the syntax elements to be entropy coded based on the first context model; and generating a bitstream, the bitstream including information corresponding to the quantized coefficients and including syntax elements to be entropy coded corresponding to the syntax elements to be entropy coded; A video encoding device that performs the above.
8. 10. The video encoding device of claim 7, wherein the one or more processors further configure the video encoding device to: and determining a first context index for the first syntax element based on a third syntax element and a fourth syntax element in a left-neighboring block of the current block and a fifth syntax element and a sixth syntax element in an above-neighboring block of the current block, the first context index indicating a second context model corresponding to the first syntax element and being based on a preset context model set.
9. 10. The video encoding device of claim 7, wherein the one or more processors further configure the video encoder to: a second context index for the second syntax element is determined based on a third syntax element and a fourth syntax element in a left-neighboring block of the current block and a fifth syntax element and a sixth syntax element in an above-neighboring block of the current block, the second context index indicating a third context model corresponding to the second syntax element and being based on a preset context model set.
10. 8. The video encoding device of claim 7, wherein the first syntax element is a first flag indicating whether an affine motion model based merging mode is used for the current block; or A video encoding device, wherein the second syntax element is a second flag indicating whether an affine motion model-based AMVP mode is used for the current block when the slice in which the current block is located is a P-type slice or a B-type slice.
11. 8. The video encoding device of claim 7, wherein the first syntax element is a first flag indicating whether a sub-block based merging mode is used for the current block; or A video encoding device, wherein the second syntax element is a second flag indicating whether an affine motion model-based AMVP mode is used for the current block when the slice in which the current block is located is a P-type slice or a B-type slice.
12. A video encoding device according to any one of claims 7 to 11; and a transmitter coupled to the video encoding device and configured to transmit the bitstream; including video transmission devices.
Citation Information
Patent Citations
Affine prediction for video coding
WO2017156705A1