Video decoding method and video decoder

By assigning distinct context models to syntax elements in video decoding, the method addresses the challenge of reducing bitrate and storage requirements, enhancing decoding efficiency and performance.

JP7873336B2Active Publication Date: 2026-06-11HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-06-05
Publication Date
2026-06-11

AI Technical Summary

Technical Problem

Existing video coding technologies struggle to further reduce bitrate without sacrificing image quality, particularly after High-Efficiency Video Coding (HEVC), necessitating more efficient video decoding methods to minimize storage and processing requirements.

Method used

Implementing a video decoding method that assigns distinct context models to different syntax elements within a block, allowing for efficient entropy decoding and prediction processing, thereby reducing storage space and computational overhead.

Benefits of technology

This approach enhances decoding efficiency by minimizing storage needs and improving processing speed through separate context models for syntax elements, optimizing video decoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007873336000026
    Figure 0007873336000026
  • Figure 0007873336000027
    Figure 0007873336000027
  • Figure 0007873336000028
    Figure 0007873336000028
Patent Text Reader

Abstract

To provide a video decoding method for reducing a storage space required for storing context and a video decoder.SOLUTION: A method includes the steps of: parsing a received bitstream to obtain a syntax element of an entropy decoding target in a current block; obtaining a context model corresponding to the syntax element of the entropy decoding target; performing entropy decoding on the syntax element of the entropy decoding target based on a context model corresponding to the syntax element of the entropy decoding target in the current block; performing prediction processing on the current block based on a syntax element in the current block and obtained through entropy decoding to obtain a prediction block of the current block; and obtaining a reconstructed image of the current block based on the prediction block of the current block.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] This application claims priority to Chinese Patent Application No. 201811053068.0, titled "Video Decoding Method and Video Decoder", filed with the China National Intellectual Property Administration on September 10, 2018, the entire content of which is incorporated herein by reference in its entirety.

[0002] Technical Field Embodiments of the present application generally relate to the field of video coding, and more specifically 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, DVDs and Blu-ray discs, video content capture and editing systems, and security applications of camcorders.

[0004] The development of the block-based hybrid video coding mode in the 1990 H.261 standard led to the development of new video coding technologies 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), ITU-T H.265 / High Efficiency Video Coding (HEVC), and extensions of such standards, such as scalability and / or 3D (three-dimensional) extensions. As video production and use become increasingly widespread, video traffic is becoming the greatest burden on communication networks and data storage. Therefore, one of the goals of many video coding standards is to reduce the bitrate without sacrificing image quality compared to previous standards. While the latest high-efficiency video coding (HEVC) can compress video at approximately twice the rate of AVC without sacrificing image quality, there is still an urgent need for new technologies to compress video even further compared to HEVC. [Overview of the Initiative]

[0005] Embodiments of the present invention provide a video decoding method and a video decoder that reduce the space required by an encoder or decoder to store context.

[0006] The above and other objectives are achieved by the subject matter of the independent claims. Other implementations are evident from the dependent claims, specification and accompanying drawings.

[0007] According to the first embodiment, a video decoding method is provided, the video decoding method comprising: analyzing a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block; performing entropy decoding with respect to the syntax element to be entropy decoded in the current block, wherein the entropy decoding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy decoding with respect to syntax element 2 in the current block is completed by using a context model; performing a prediction process with respect to the current block based on the syntax element 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] Currently, syntax element 1 and syntax element 2 in a block share a single context model, so the decoder does not need to check the context model when performing entropy decoding, improving the decoding efficiency by allowing the decoder to perform video decoding. Furthermore, since the video decoder only needs to store one context model for syntax element 1 and syntax element 2, it is possible to occupy less storage space in the video decoder.

[0009] According to a second embodiment, a video decoding method is provided, the video decoding method comprising: analyzing a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block; obtaining a context model corresponding to the syntax element to be entropy decoded, wherein the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models; performing entropy decoding with respect to the syntax element to be entropy decoded based on the context model corresponding to the syntax element to be entropy decoded in the current block; performing prediction processing with respect to the current block based on the syntax element 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] Currently, syntax element 1 and syntax element 2 in a block share a single context model, so the video decoder only needs to remember one context model for syntax element 1 and syntax element 2, thus occupying less storage space on the video decoder.

[0011] In the second aspect, in possible implementations, the number of context models in a pre-configured set of context models is 2 or 3.

[0012] In a second embodiment, in a possible implementation, determining the context model corresponding to syntax element 1 in the current block from a pre-configured set of context models includes determining the context index of syntax element 1 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block and syntax element 1 and syntax element 2 in the upper adjacent block of the current block, wherein the context index of syntax element 1 in the current block is used to indicate the context model corresponding to syntax element 1 in the current block, or The determination of the context model corresponding to syntax element 2 in the current block from a pre-configured set of context models involves determining the context index of syntax element 2 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block and syntax element 1 and syntax element 2 in the upper adjacent block of the current block, and the context index of syntax element 2 in the current block is used to indicate the context model corresponding to syntax element 2 in the current block.

[0013] With respect to the second aspect, in a possible implementation, if the amount of context models in a pre-configured set of context models 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 current context index value of syntax element 2 in the 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.

[0014] With respect to the second aspect, in a possible implementation, when the amount of context models in a pre-configured context model set is 2, the value of the context index of syntax element 1 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, or The current context index value of syntax element 2 in the 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 on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block.

[0015] In the first or second embodiment, in possible implementations, syntax element 1 in the current block is affine_merge_flag, used to indicate whether an affine motion model-based merge mode is being used for the current block, or syntax element 2 in the current block is affine_inter_flag, and used to indicate whether an affine motion model-based AMVP mode is being 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 a subblock-based merge mode is being 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 being used for the current block, if the slice to which the current block is located is a P-type slice or a B-type slice.

[0016] According to a third embodiment, a video decoding method is provided, the video decoding method includes the steps of: analyzing a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 3 or syntax element 4 in the current block; obtaining a context model corresponding to the syntax element to be entropy decoded, wherein the context model corresponding to syntax element 3 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured set of context models; performing entropy decoding with respect to the syntax element to be entropy decoded based on the context model corresponding to the syntax element to be entropy decoded in the current block; performing prediction processing with respect to the current block based on the syntax element 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.

[0017] Since syntax elements 3 and 4 in the current block share a single context model, the video decoder only needs to remember one context model for syntax elements 3 and 4, thus occupying less storage space on the video decoder.

[0018] In a third aspect, in a possible implementation, the pre-configured set of context models includes five context models.

[0019] With respect to the third aspect, in a possible implementation, syntax element 3 in the current block is merge_idx and is used to indicate the index value of the current block's merge candidate list, or syntax element 4 in the current block is affine_merge_idx and is used to indicate the index value of the current block's affine merge candidate list, or Syntax element 3 in the current block is merge_idx, used to indicate the index value of the current block's merge candidate list, or syntax element 4 in the current block is subblock_merge_idx, used to indicate the index value of the subblock's merge candidate list.

[0020] According to a fourth embodiment, a video decoding method is provided, the video decoding method comprising: analyzing a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block; determining the value of the context index of the syntax element to be entropy decoded in the current block based on the values ​​of syntax element 1 and syntax element 2 in the left adjacent block of the current block and the values ​​of syntax element 1 and syntax element 2 in the upper adjacent block of the current block; performing entropy decoding with respect to the syntax element to be entropy decoded based on the context index value of the syntax element to be entropy decoded in the current block; performing prediction processing with respect to the current block based on the syntax element 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] With respect to the fourth aspect, in possible implementations, syntax element 1 in the current block is affine_merge_flag, used to indicate whether an affine motion model-based merge mode is being used for the current block, or syntax element 2 in the current block is affine_inter_flag, and used to indicate whether an affine motion model-based AMVP mode is being 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 a subblock-based merge mode is being 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 being used for the current block, if the slice to which the current block is located is a P-type slice or a B-type slice.

[0022] In a fourth embodiment, in a possible implementation, the step of determining the value of the context index of the syntax element to be entropy-decoded in the current block based on the values ​​of syntax element 1 and syntax element 2 in the left adjacent block of the current block and the values ​​of syntax element 1 and syntax element 2 in the upper adjacent block of the current block is: The context index value of the syntax element to be entropy-decoded in the current block is expressed in the following logical form: Context index = (condL && availableL) + (condA && availableA) This includes a step of determining according to condL = syntax element 1 [x0-1][y0] | syntax element 2 [x0-1][y0] Thus, syntax element 1 [x0-1][y0] represents the value of syntax element 1 in the left adjacent block, and syntax element 2 [x0-1][y0] represents the aforementioned 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 upper adjacent block is available.

[0023] According to a fifth aspect, a video decoder is provided. The video decoder is an entropy decoding unit configured to analyze a received bitstream to obtain a syntax element to be entropy decoded in a current block. The syntax element to be entropy decoded in the current block includes syntax element 1 in the current block or syntax element 2 in the current block. The entropy decoding unit determines a value of a context index of the syntax element to be entropy decoded in the current block based on values of syntax element 1 and syntax element 2 in the left adjacent block of the current block and values of syntax element 1 and syntax element 2 in the upper adjacent block of the current block, and performs 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. The video decoder further includes a prediction processing unit configured to perform prediction processing on the current block based on the syntax element in the current block and 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, in the current block, syntax element 1 is the affine_merge_flag and is used to indicate whether an affine motion model - based merge mode is used in the current block, or syntax element 2 in the current block is the affine_inter_flag and is used to indicate whether an affine motion model - based AMVP mode is used in the current block when 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 the subblock_merge_flag and is used to indicate whether a sub - block - based merge mode is used in the current block, or syntax element 2 in the current block is the affine_inter_flag and is used to indicate whether an affine motion model - based AMVP mode is used in the current block when 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, in a possible implementation, the entropy decoding unit specifically is configured to determine the value of the context index of the syntax element to be entropy - decoded in the current block according to the following logical expression: Context index = (condL && availableL) + (condA && availableA) where 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] Thus, syntax element 1 [x0][y0-1] represents the value of syntax element 1 in the adjacent block above, and syntax element 2 [x0][y0-1] represents the aforementioned value of syntax element 2 in the adjacent block above. availableL indicates whether the left adjacent block is available, and availableA indicates whether the upper adjacent block is available.

[0026] According to the sixth aspect, a video decoder is provided, the video decoder includes an entropy decoding unit configured to analyze a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block, and the entropy decoding unit is configured to perform entropy decoding with respect to the syntax element to be entropy decoded in the current block, wherein entropy decoding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or entropy decoding with respect to syntax element 2 in the current block is completed by using a context model; a prediction processing unit configured to perform prediction processing with respect to the current block based on the syntax element 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 the seventh aspect, a video decoder is provided, the video decoder is an entropy decoding unit configured to analyze a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block, the entropy decoding unit is configured to obtain a context model corresponding to the syntax element to be entropy decoded, the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models. The corresponding context model is determined from a pre-configured set of context models, and the entropy decoding unit includes an entropy decoding unit configured to perform entropy decoding on the syntax element to be entropy decoded based on the context model corresponding to the syntax element 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 element in the current block that is obtained by entropy decoding, in order 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] With respect to the seventh aspect, in possible implementations, the number of context models in a pre-configured set of context models is 2 or 3.

[0029] In a seventh embodiment, in a possible implementation, the entropy decoding unit is configured to determine the context index of syntax element 1 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block and syntax element 1 and syntax element 2 in the upper adjacent block of the current block, the context index of syntax element 1 in the current block is used to indicate the context model corresponding to syntax element 1 in the current block, or The entropy decoding unit is configured to determine the context index of syntax element 2 in the current block based on syntax element 1 and syntax element 2 in the left-adjacent block of the current block and syntax element 1 and syntax element 2 in the upper-adjacent block of the current block, and the context index of syntax element 2 in the current block is used to indicate the context model corresponding to syntax element 2 in the current block.

[0030] With respect to the seventh aspect, in a possible implementation, if the amount of context models in a pre-configured set of context models 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 current context index value of syntax element 2 in the 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.

[0031] With respect to the seventh aspect, in a possible implementation, when the amount of context models in a pre-configured context model set is 2, the value of the context index of syntax element 1 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, or The current context index value of syntax element 2 in the 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 on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block.

[0032] With respect to the sixth or seventh aspect, in possible implementations, syntax element 1 in the current block is affine_merge_flag and is used to indicate whether an affine motion model-based merge mode is being used for the current block, or syntax element 2 in the current block is affine_inter_flag and is used to indicate whether an affine motion model-based AMVP mode is being 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 a subblock-based merge mode is being 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 being used for the current block, if the slice to which the current block is located is a P-type slice or a B-type slice.

[0033] According to the eighth aspect, a video decoder is provided, the video decoder is an entropy decoding unit configured to analyze a received bitstream to obtain a syntax element to be entropy decoded in the current block, wherein the syntax element to be entropy decoded in the current block includes syntax element 3 or syntax element 4 in the current block, the entropy decoding unit is configured to 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 pre-configured set of context models, or the syntax element 4 in the current block is The corresponding context model is determined from a pre-configured set of context models, and the entropy decoding unit includes an entropy decoding unit configured to perform entropy decoding on the syntax element to be entropy decoded based on the context model corresponding to the syntax element 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 element in the current block that is obtained by entropy decoding, in order 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] With respect to the eighth aspect, in a possible implementation, the pre-configured set of context models includes five context models.

[0035] With respect to the eighth aspect, in possible implementations, syntax element 3 in the current block is merge_idx and is used to indicate the index value of the merge candidate list in the current block, or syntax element 4 in the current block is affine_merge_idx and is used to indicate the index value of the affine merge candidate list in the current block, or Syntax element 3 in the current block is merge_idx, used to indicate the index value of the current block's merge candidate list, or syntax element 4 in the current block is subblock_merge_idx, used to indicate the index value of the subblock's merge candidate list.

[0036] According to the ninth aspect, an encoding method is provided, the encoding method comprising: obtaining a syntax element to be entropy encoded in the current block, wherein the syntax element to be entropy encoded in the current block includes syntax element 1 in the current block or syntax element 2 in the current block; performing entropy encoding with respect to the syntax element to be entropy encoded in the current block, wherein, when entropy encoding is performed with respect to the syntax element to be entropy encoded in the current block, the entropy encoding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy encoding with respect to syntax element 2 in the current block is completed by using a context model; and outputting a bitstream that includes the syntax element in the current block that is obtained by entropy encoding.

[0037] For specific syntactic elements and contextual models, please refer to the first aspect.

[0038] According to the tenth embodiment, an encoding method is provided, the encoding method comprising: obtaining a syntax element to be entropy encoded in the current block, wherein the syntax element to be entropy encoded in the current block includes syntax element 1 or syntax element 2 in the current block; obtaining a context model corresponding to the syntax element to be entropy encoded, wherein the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models; performing entropy encoding with respect to the syntax element to be entropy encoded based on the context model corresponding to the syntax element to be entropy encoded in the current block; and outputting a bitstream that includes the syntax element in the current block that is obtained by entropy encoding.

[0039] For specific syntactic elements and contextual models, please refer to the second aspect.

[0040] According to the 11th embodiment, an encoding method is provided, the encoding method comprising: obtaining a syntax element to be entropy encoded in the current block, wherein the syntax element to be entropy encoded in the current block includes syntax element 3 or syntax element 4 in the current block; obtaining a context model corresponding to the syntax element to be entropy decoded, wherein the context model corresponding to syntax element 3 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured set of context models; performing entropy encoding with respect to the syntax element to be entropy encoded based on the context model corresponding to the syntax element to be entropy encoded in the current block; and outputting a bitstream that includes the syntax element in the current block that is obtained by entropy encoding.

[0041] For specific syntactic elements and contextual models, please refer to the third aspect.

[0042] According to the twelfth aspect, a video encoder is provided, the video encoder includes an entropy coding unit configured to acquire a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 1 or syntax element 2 in the current block, the entropy coding unit is configured to perform entropy coding with respect to the syntax element to be entropy coded in the current block, wherein when entropy coding is performed with respect to the syntax element to be entropy coded in the current block, the entropy coding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy coding with respect to syntax element 2 in the current block is completed by using a context model, and the output includes an output configured to output a bitstream containing the syntax element in the current block that is acquired by entropy coding.

[0043] For specific syntactic elements and contextual models, please refer to the fourth aspect.

[0044] According to the 13th embodiment, a video encoder is provided, the video encoder includes an entropy coding unit configured to acquire a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 1 or syntax element 2 in the current block, the entropy coding unit is configured to acquire a context model corresponding to the syntax element to be entropy coded, wherein the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models, the entropy coding unit includes an entropy coding unit configured to perform entropy coding with respect to the syntax element to be entropy coded based on the context model corresponding to the syntax element to be entropy coded in the current block, and an output configured to output a bitstream containing the syntax element in the current block that is acquired by entropy coding.

[0045] For specific syntactic elements and contextual models, please refer to the fifth aspect.

[0046] According to the 14th embodiment, a video encoder is provided, the video encoder includes an entropy coding unit configured to acquire a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 3 or syntax element 4 in the current block, the entropy coding unit is configured to acquire a context model corresponding to the syntax element to be entropy coded, wherein the context model corresponding to syntax element 3 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured set of context models, the entropy coding unit includes an entropy coding unit configured to perform entropy coding with respect to the syntax element to be entropy coded based on the context model corresponding to the syntax element to be entropy coded in the current block, and an output configured to output a bitstream containing the syntax element in the current block that is acquired by entropy coding.

[0047] For specific syntactic elements and contextual models, please refer to the sixth aspect.

[0048] According to the 15th aspect, the present invention relates to a device for decoding a video stream, comprising a processor and memory. The memory stores instructions, which enable the processor to execute the methods in the first, second, third, or fourth aspect, or any possible implementation thereof.

[0049] According to the sixteenth aspect, the present invention relates to a device for decoding a video stream, comprising a processor and memory. The memory stores instructions, which enable the processor to execute the methods of the seventh aspect, the eighth aspect, or the ninth aspect, or any possible implementation thereof.

[0050] According to the 17th aspect, a computer-readable storage medium is proposed. The computer-readable storage medium stores instructions, and when an instruction is executed, one or more processors are able to encode video data. The instructions enable one or more processors to execute a method in the first, second, third, fourth, seventh, eighth, or ninth aspect, or any possible implementation thereof.

[0051] According to the 18th aspect, the present invention relates to a computer program including program code. When the program code is executed on a computer, a method in the first, second, third, fourth, seventh, eighth, or ninth aspect, or any possible implementation thereof, is performed.

[0052] Details of one or more embodiments are described in the accompanying drawings and the following description. Other features, purposes, and advantages will be apparent from the specification, drawings, and claims. [Brief explanation of the drawing]

[0053] To more clearly illustrate the technical solutions in the embodiments or background of the present application, the accompanying drawings necessary to illustrate the embodiments or background of the present application are briefly described below.

[0054] [Figure 1] This is a block diagram of an example of a video encoding system for implementing an embodiment of the present invention.

[0055] [Figure 2] This is a block diagram illustrating an exemplary structure of a video encoder for implementing an embodiment of the present invention.

[0056] [Figure 3] This is a block diagram illustrating an exemplary structure of a video decoder for implementing an embodiment of the present invention.

[0057] [Figure 4] This figure shows a video coding system including the encoder 20 shown in Figure 2 and the decoder 30 shown in Figure 3.

[0058] [Figure 5] This is a block diagram showing an example of another encoding or decoding device.

[0059] [Figure 6] This is a schematic diagram showing the position of candidate motion information in the spatial and temporal domains of the current block according to one embodiment.

[0060] [Figure 7] This is a schematic diagram showing the positions of the current block and multiple adjacent blocks according to one embodiment.

[0061] [Figure 8A] This flowchart shows a method for predicting the motion vector of a constructed control point according to one embodiment.

[0062] [Figure 8B] This flowchart shows a method for predicting the motion vector of a constructed control point according to one embodiment.

[0063] [Figure 9A] This flowchart shows an interpretation prediction method according to one embodiment.

[0064] [Figure 9B] This flowchart shows a method for predicting the motion vector of a constructed control point according to one embodiment.

[0065] [Figure 9C] This is a schematic diagram showing the position of a motion compensation unit based on the center point of the motion compensation unit according to one embodiment.

[0066] [Figure 10]This is a flowchart showing a video decoding method according to one embodiment.

[0067] [Figure 11] This is a flowchart showing a video decoding method according to one embodiment.

[0068] [Figure 12] This is a flowchart showing a video decoding method according to one embodiment.

[0069] In the following, unless otherwise specified, the same reference numeral represents the same or at least functionally equivalent features. [Modes for carrying out the invention]

[0070] In the following description, references are made to the accompanying drawings, which form part of the present disclosure and illustrate specific embodiments of the present invention or specific embodiments of the present invention in which such embodiments may be used. It should be understood that embodiments of the present invention may be used in other embodiments and may include structural or logical modifications not shown in the accompanying drawings. Accordingly, the following detailed description should not be construed as limiting, and the scope of the present invention is defined by the appended claims.

[0071] For example, it should be understood that the information disclosed with respect to the described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units, such as functional units, for performing the described method steps (e.g., one unit that performs 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 illustrated in the accompanying drawings. Furthermore, if a particular device is described based on one or more units, such as functional units, the corresponding method may include one step for performing the function of one or more units (e.g., one step for performing the function of one or more units, or multiple steps, each used to perform one or more of the functions of multiple units), even if such one or more steps are not explicitly described or illustrated in the accompanying drawings. Furthermore, it should be understood that the various exemplary embodiments and / or features of the aspects described herein may be combined with each other unless otherwise specified.

[0072] Video coding typically involves processing 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 in this application (or disclosure), video coding refers to video encoding or video decoding. Video encoding is performed on the source side and typically involves processing the 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 on the destination side and typically involves the reverse processing related to the encoder in order to reconstruct the video picture. In embodiments, “coding” of a video picture (or generally referred to as a picture as described below) should be understood as “encoding” or “decoding” with respect to a video sequence. The 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, meaning the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss occurs during storage and transmission). In non-lossless video coding, further compression is performed, such as through quantization, to reduce the amount of data required to represent the video picture. As a result, the video picture cannot be fully reconstructed on the decoder side, meaning the quality of the reconstructed video picture is inferior to that of the original video picture.

[0074] Several H.261 video coding standards relate to "non-lossless hybrid video coding" (i.e., spatial and temporal predictions in the sample domain are 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, on the encoder side, video is typically processed, i.e., encoded, at the block (video block) level. For example, a predicted block is generated by spatial (intra-picture) prediction and temporal (inter-picture) prediction, the predicted block is subtracted from the current block (the block currently being processed or to be processed) to obtain the residual block, the residual block is transformed and quantized in the transform domain to reduce (compress) the amount of data to be transmitted. On the decoder side, the inverse processing to the encoder is applied to the encoded or compressed block to reconstruct the current block for representation. Furthermore, the encoder repeats the decoder's processing loop, and as a result, the encoder and decoder generate the same predictions (e.g., intra-predictions and inter-predictions) and / or reconstructions for processing, i.e., encoding, subsequent blocks.

[0075] As used herein, the term “block” may refer to a part of a picture or 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 Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG). Those skilled in the art will understand 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 several CUs by using a quadtree structure shown as a coding tree. It is determined at the CU level whether the picture area is coded by inter-picture (temporal) or intra-picture (spatial) prediction. Each CU may be further divided into one, two, or four PUs based on the PU division type. The same prediction process is applied within a single PU, and relevant information is sent to the decoder based on the PU. After obtaining the residual blocks by applying the prediction process based on the PU partitioning type, the CU may be partitioned into transform units (TUs) based on another quadtree structure similar to the coding tree used for the CU. In the latest video compression technology developments, frames are partitioned by a quadtree plus binary tree (QTBT) to partition the coding blocks. In a QTBT block structure, the CU may be square or rectangular. In VVC, the coding tree unit (CTU) is first partitioned using a quadtree structure, and the quadtree leaf nodes are further partitioned using a binary tree structure.A binary tree leaf node is referred to as a coding unit (CU), and its partitioning is used for prediction and transformation processing without any other partitioning. 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 partitioning, are used with the QTBT block structure.

[0076] Hereinafter, embodiments of the encoder 20, decoder 30, encoding system 10, and decoding system 40 will be described with reference to Figures 1-4 (before describing embodiments of the present invention in more detail with reference to Figure 10).

[0077] Figure 1 is a conceptual or schematic block diagram showing an exemplary encoding system 10, for example, a video encoding system 10 on which the technology of the present application (present disclosure) may be used. The encoder 20 (e.g., video encoder 20) and decoder 30 (e.g., video decoder 30) in the video encoding system 10 represent example devices that may be configured to perform the technology for ... (segmentation / intra prediction / ...) according to the various examples described herein. As shown in Figure 1, the encoding system 10 includes a source device 12 configured to provide encoded data 13, such as an encoded picture 13, to a destination device that decodes the encoded 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 communication unit 22.

[0079] The video source 16 may include, or may 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 encoding, any text on the screen is also considered part of the picture or image to be encoded), such as a computer graphics processing unit configured to generate computer-animated pictures, or any kind of device configured to acquire and / or provide real-world pictures 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 is, or may be thought of as, a two-dimensional array or matrix of samples having luminance values. A sample in the array may be called a pixel (short for picture element) or pel. 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, or may contain, a three-sample array. In the RGB 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 the YCbCr format contains a luminance component represented by Y (sometimes represented by L) and two chrominance components represented by Cb and Cr. The luminance component (abbreviated as 'luma') Y represents luminance or gray level intensity (for example, both are the same in a grayscale picture), and the two chrominance components (abbreviated as 'chroma') Cb and Cr represent chrominance or color information components. Therefore, a picture in the 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 to or transformed into a picture in YCbCr format, and vice versa. This process is also called color 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 pictures, a memory such as a picture memory that contains or stores previously captured or generated pictures, and / or any type of (internal or external) interface for acquiring or receiving pictures. The camera may be, for example, a local camera or integrated camera integrated with the source device, and the memory may be a local memory or integrated memory integrated with 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 an external picture generation device. The external picture generation device may be, for example, an external computer graphics processing unit, a computer, or a server. The interface may be any type of interface that conforms to any proprietary or standardized interface protocol, such as a wired or wireless interface or an optical interface. The interface for acquiring picture data 17 may be the same interface as the communication interface 22, or may be part of the communication interface 22.

[0082] Unlike the preprocessing unit 18 and the processing performed by the preprocessing unit 18, the picture 17 and picture data 17 (e.g., video data 16) may also be called the original picture 17 or original picture data 17.

[0083] The preprocessing unit 18 is configured to receive (original) picture data 17, perform preprocessing on the picture data 17, and obtain a preprocessed picture 19 or preprocessed picture data 19. For example, the preprocessing performed by the preprocessing unit 18 may include cropping, color format conversion (e.g., RGB to YCbCr), color correction, or noise reduction. It will be understood that the preprocessing unit 18 may be an optional component.

[0084] The encoder 20 (for example, a video encoder 20) is configured to receive preprocessed picture data 19 and provide encoded picture data 21 (details will be further explained below, for example, with reference to Figure 2 or Figure 4). In one example, the encoder 20 can be configured to encode a picture.

[0085] The communication interface 22 of the source device 12 can be configured to receive encoded picture data 21 and transmit the encoded picture data 21 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction, or it can be configured to store the encoded picture data 13 accordingly and / or process the encoded picture data 21 before transmitting the encoded data 13 to the other device. The other device is, for example, the destination device 14, or any other device used for decoding or storage.

[0086] The destination device 14 includes a decoder 30 (e.g., a video decoder 30) and may additionally or optionally include a communication interface or communication 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 encoded picture data 21 or encoded data 13 directly from the source device 12 or any other source. Any other source is, for example, a storage device, and the storage device is, for example, a storage device for encoded picture data.

[0088] Communication interfaces 22 and 28 can be configured to transmit or receive encoded picture data 21 or encoded data 13 over a direct communication link between source device 12 and destination device 14, or over any type of network. A direct communication link is, for example, a direct wired or wireless connection, and any type of network is, 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 can be configured, for example, to encapsulate the encoded picture data 21 into a suitable format, such as a packet, for transmission over a communication link or communication network.

[0090] The communication interface 28, as a corresponding part of the communication interface 22, can be configured to deencapsulate the encoded data 13 in order to obtain the encoded picture data 21, etc.

[0091] Both communication interfaces 22 and 28 can be configured as one-way communication interfaces, for example, as arrows from source device 12 to destination device 14 used for encoded picture data 13 in Figure 1, or as two-way communication interfaces, for example, to send and receive messages to establish a connection, and to confirm and exchange any other information related to data transmission, such as communication links and / or encoded picture data transmission.

[0092] The decoder 30 is configured to receive encoded picture data 21 and provide decoded picture data 31 or decoded picture 31 (further details will be described below, for example, based on Figure 3 or Figure 5).

[0093] The post-processing processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also called reconstructed picture data), such as the decoded picture data 31, to obtain the post-processed picture data 33, such as the post-processed picture 33. The post-processing performed by the post-processing unit 32 may include, for example, color format conversion (e.g., YCbCr to RGB), color correction, cropping, resampling, or any other processing to prepare the decoded picture data 31 for display by the display device 34.

[0094] The display device 34 of the destination device 14 is configured to receive post-processed picture data 33 and display the picture to a user, viewer, etc. The display device 34 may be any type of display configured to present the reconstructed picture, such as an integrated or external display or monitor, or may include such displays. 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] Although Figure 1 depicts the source device 12 and the destination device 14 as separate devices, the device embodiment may also include both the source device 12 and the destination device 14, or both the functionality of the source device 12 and the functionality of the destination device 14, i.e., the source device 12 or its corresponding functionality and the destination device 14 or its corresponding functionality. In such embodiments, the source device 12 or its corresponding functionality and the destination device 14 or its 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 from the specification that the functions / functions or the presence and (exact) division of the various units of the source device 12 and / or destination device 14 shown in Figure 1 may differ 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) can each be implemented as any one of various 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 technology is partially implemented in software, the device can store software instructions in a suitable non-temporary computer-readable storage medium, and the instructions can be executed in hardware by using one or more processors to perform the technology of this disclosure. Any of the foregoing (including hardware, software, and combinations of hardware and software) may be considered as one or more processors. The video encoder 20 and the video decoder 30 can each be included in one or more encoders or decoders, and any one of the encoders or decoders can be integrated as part of a combined encoder / decoder (codec) in the corresponding device.

[0098] Source device 12 may be referred to as a video encoding device or video encoding apparatus. Destination device 14 may be referred to as a video decoding device or video decoding apparatus. Source device 12 and destination device 14 can each be examples of video encoding devices or video decoding apparatus.

[0099] The source device 12 and the 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, the source device 12 and the destination device 14 may be equipped for wireless communication. Therefore, the source device 12 and the destination device 14 may be wireless communication devices.

[0101] In some cases, the video encoding system 10 shown in Figure 1 is merely an example, and the technology of the present invention may be applied to video encoding configurations (e.g., video encoding or video decoding) that do not require any data communication between the encoding device and the decoding device. In other examples, the data may be retrieved from local memory or streamed over a network, etc. The video encoding device is capable of encoding the data and storing the data in memory, and / or the video decoding device is capable of retrieving the data from memory and decoding the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but only encode the data into memory and / or retrieve the data from memory and decode the data.

[0102] For each of the above examples described with reference to the video encoder 20, it should be understood that the video decoder 30 can be configured to perform the reverse process. In the case of signaling syntax elements, the video decoder 30 can be configured to receive and parse the syntax elements and, accordingly, decode the associated video data. In some examples, the video encoder 20 can entropy encode one or more syntax elements that define ... to an encoded video bitstream. In such examples, the video decoder 30 can parse such syntax elements and, accordingly, decode the associated video data.

[0103] Encoder & Encoding Method

[0104] Figure 2 is a schematic / conceptual block diagram of an example of a video encoder 20 configured to implement the technology of the present application (disclosure). In the example of Figure 2, the video encoder 20 includes a residual calculation unit 204, a transformation processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transformation 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 Figure 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 conversion processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy coding unit 270 form the forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse conversion 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 the reverse signal path of the encoder. The reverse signal path of the encoder corresponds to the signal path of the decoder (see decoder 30 in Figure 3).

[0106] Encoder 20 receives picture 201 or block 203 of picture 201, for example, a picture in a series of pictures forming a video or video sequence, by using input 202, etc. Picture block 203 may also be referred to as the current picture block or the picture block to be encoded, and picture 201 may be referred to as the current picture or the picture to be encoded (in particular, if the current picture is distinguished from other pictures in video coding, for example, other pictures in the same video sequence also include pictures previously encoded and / or decoded in the video sequence of the current picture).

[0107] division

[0108] Embodiments of the encoder 20 may include a splitting unit (not shown in Figure 2) configured to divide a picture 201 into multiple non-overlapping blocks, such as block 203. The splitting unit may be configured to use the same block size and corresponding raster defining the block size for all pictures in the video sequence, or it may be configured to change the block size between pictures, subsets, or groups of pictures, and to divide each picture into a corresponding block.

[0109] In one example, the predictive processing unit 260 of the video encoder 20 may be configured to perform any combination of the division techniques described above.

[0110] For example, in picture 201, block 203 may also be a two-dimensional array or matrix having luminance values ​​(sample values), or may be considered as such, but the size of block 203 is smaller than that of picture 201. In other words, block 203 can contain, for example, one sample array (e.g., a luminance array in the case of 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 amount and / or type of array based on the color format used. The amount of samples in the horizontal and vertical (or axis) directions of block 203 determines the size of block 203.

[0111] The encoder 20 shown in Figure 2 is configured to encode the picture 201 block by block, for example, by performing encoding and prediction in 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 are 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 (per pixel) to obtain the residual block 205 in the sample domain.

[0114] conversion

[0115] The transformation processing unit 206 is configured to apply a transformation such as a discrete cosine transform (DCT) or discrete sine transform (DST) to the sample values ​​of the residual block 205 and obtain transformation coefficients 207 in the transformation domain. The transformation coefficients 207 may also be referred to as residual transformation coefficients and represent the residual block 205 in the transformation domain.

[0116] The transformation processing unit 206 may be configured to apply an integer approximation of the DCT / DST, for example, the transformation specified in HEVC / H.265. This integer approximation is typically scaled proportionally by a factor comparable to that of the orthogonal DCT transformation. An additional scaling factor is applied as part of the transformation process to maintain the norm of the residual blocks obtained through the forward and inverse transformations. The scaling factor is typically selected based on several constraints, such as a power of 2, the bit depth of the transformation coefficients, or a trade-off between the precision used in the shift operation and the implementation cost. For example, by using the inverse transformation processing unit 212, a specific scaling factor may be specified for the inverse transformation on the decoder 30 side (and correspondingly, for the inverse transformation on the encoder 20 side by using the inverse transformation processing unit 212, etc.), and in correspondence, by using the transformation processing unit 206, a corresponding scaling factor may be specified for the forward transformation on the encoder 20 side.

[0117] Quantization

[0118] The quantization unit 208 is configured to quantize the transformation coefficients 207 by applying scale quantization, vector quantization, etc., to obtain the quantized transformation coefficients 209. The quantized transformation coefficients 209 are also called the quantized residual coefficients 209. The quantization process can reduce the bit depth associated with some or all of the transformation coefficients 207. For example, n-bit transformation coefficients may be rounded to m-bit transformation coefficients during quantization, where n is greater than m. The degree of quantization can be modified by adjusting the quantization parameter (QP). For example, for scale quantization, different scales may be applied to achieve finer or coarser quantization. Smaller quantization steps correspond to finer quantization, and larger quantization steps correspond to coarser quantization. The appropriate quantization steps may be indicated by using the quantization parameter (QP). For example, the quantization parameter may be an index of a given set of appropriate quantization steps. For example, smaller quantization parameters correspond to finer quantization (smaller quantization steps), larger quantization parameters correspond to coarser quantization (larger quantization steps), and vice versa. Quantization may include division by the quantization step and the corresponding quantization or inverse quantization performed by the inverse quantization unit 210, etc., or it may include multiplication by the quantization step. In embodiments of some standards such as HEVC, the quantization parameter may be used to determine the quantization step. Generally, the quantization step may be calculated based on the quantization parameter by a fixed-point approximation of the expression involving division. Additional scale factors 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 expression used for the quantization step. In exemplary implementations, the scale of the inverse transform may be combined with the scale of the inverse quantization.Alternatively, a customized quantization table may be used and signaled from the encoder to the decoder, for example, via a bitstream. Quantization is a non-lossless operation, and larger quantization steps result in greater loss.

[0119] The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization scheme applied by the quantization unit 208, for example, based on or using the same quantization steps as the quantization unit 208, so as to apply the inverse quantization of the quantization unit 208 to the quantization coefficients to obtain the inverse quantization coefficients 211. The inverse quantization coefficients 211 are also called inverse quantization residual coefficients 211 and correspond to the conversion coefficients 207, although the losses resulting from quantization are usually different from the conversion coefficients.

[0120] The inverse transformation processing unit 212 is configured to obtain the inverse transformation block 213 in the sample domain by applying the inverse transformation of the transformation applied by the transformation processing unit 206, for example, the inverse discrete cosine transform (DCT) or the inverse discrete sine transform (DST). The inverse transformation block 213 may also be referred to as the inverse transformation inverse quantization block 213 or the inverse transformation residual block 213.

[0121] The reconstruction unit 214 (e.g., adder 214) is configured to obtain the reconstructed block 215 in the sample domain by adding the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265, for example by adding the sample values ​​of the reconstructed residual block 213 to the sample values ​​of the prediction block 265.

[0122] Optionally, a buffer unit 216 (or abbreviated as "buffer" 216), such as a line buffer 216, is configured to buffer or store the reconstructed block 215 and the corresponding sample values ​​for intra-prediction or the like. In other embodiments, the encoder may be configured to use the unfiltered reconstructed block 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, an embodiment of encoder 20 may be configured such that the buffer unit 216 not only stores the reconstructed block 215 for intra-prediction, but also stores the filtered block 221 of the loop filter unit 220 (not shown in Figure 2), and / or the buffer unit 216 and the decoded picture buffer unit 230 form a single buffer. In other embodiments, blocks or samples from the filtered block 221 and / or the decoded picture buffer 230 (not shown in Figure 2) may be used as input or basis for intra-prediction 254.

[0124] The loop filter unit 220 (or, for short, "loop filter" 220) is configured to perform filtering on the reconstructed block 215 to obtain the filtered block 221, to smooth the sample transformation, or to improve video quality. 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 co-filter. Although the loop filter unit 220 is shown as an in-loop filter in Figure 2, 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 the filtered reconstructed block 221. The decoded picture buffer 230 can store the reconstructed coding block after the loop filter unit 220 has performed filtering on the reconstructed coding block.

[0125] Embodiments of the encoder 20 (correspondingly, the loop filter unit 220) can be used to output loop filter parameters (e.g., sample adaptive offset information), for example, to directly output the loop filter parameters, or to output the loop filter parameters after, for example, the entropy coding unit 270 or some other entropy coding unit has performed entropy coding, so that the decoder 30 can receive and apply the same loop filter parameters for decoding and the like.

[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 several memories, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), or resistive RAM (RRAM)), or any other type of memory. The DPB 230 and 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 filtered blocks 221. The decoded picture buffer 230 can be further configured to store other previously filtered blocks, such as the previously reconfigured and filtered block 221, of different pictures, such as the same current picture or a previously reconfigured picture, making it possible to provide a fully previously reconfigured, i.e., decoded picture (and the corresponding reference block and corresponding sample) and / or a partially reconfigured current picture (and the corresponding reference block and corresponding sample) for intra-prediction, etc. In one example, if the reconfiguration block 215 is reconfigured without intra-loop filtering, the decoded picture buffer (DPB) 230 is configured to store the reconfiguration block 215.

[0127] The prediction processing unit 260 is also referred to as the block prediction processing unit 260 and is configured to receive or acquire block 203 (current block 203 of current picture 201) and reconstructed picture data, for example, a reference sample from the same (current) picture in buffer 216, reference picture data 231 from one or more previously decoded pictures in decoded picture buffer 230, process the data for prediction, i.e., 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 can be configured to select a prediction mode (e.g., intra or inter-prediction mode) and / or the corresponding prediction block 245 or 255 as the prediction block 265, calculate the residual block 205, and reconstruct the reconstruction block 215.

[0129] Embodiments of the mode selection unit 262 may be used to select a prediction mode (for example, from prediction modes supported by the prediction processing unit 260). The prediction mode provides the best match or the smallest residual (smallest residual means better compression in transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression in transmission or storage), or considers or balances both. The 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 satisfies at least the prediction mode selection criteria.

[0130] Predictive processing (for example, by using the prediction processing unit 260) and mode selection (for example, by using the mode selection unit 262), which are performed by an example of encoder 20, are described in detail below.

[0131] As described above, the encoder 20 is configured to determine or select the best or most optimal prediction mode from a (predetermined) set of prediction modes. The set of prediction modes may include, for example, an intra-prediction mode and / or an inter-prediction mode.

[0132] The intra-predictive mode set may include 35 different intra-predictive modes, such as non-directional modes like DC (or mean) mode and planar mode, or directional modes as defined in H.265, or it may include 67 intra-predictive modes, such as non-directional modes like DC (or mean) mode and planar mode, or advanced directional modes as defined in H.266.

[0133] The (possible) interpretation mode set depends on the available reference picture (e.g., at least a portion of the decoded picture stored in DBP230) and other interpretation parameters, for example, whether the entire reference picture is used or only a portion of it is used, whether a search window region surrounding the current block region 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 mode, skip mode and / or direct mode can also be applied.

[0135] The prediction processing unit 260 may further divide block 203 into smaller block partitions or subblocks, for example, by iteratively using quad-tree (QT), binary-tree (BT), ternary-tree or ternary-tree (TT) partitions, or combinations thereof, and perform predictions for each of the block partitions or subblocks. Mode selection includes selecting the tree structure of the divided block 203 and selecting a prediction mode to be applied to each of the block partitions or subblocks.

[0136] The interpretation unit 244 may include a motion estimation (ME) unit (not shown in Figure 2) and a motion compensation (MC) unit (not shown in Figure 2). The motion estimation unit is configured to receive or acquire picture block 203 (the current picture block 203 of the current picture 201) and the decoded picture 31, or at least one or more previously reconstructed blocks, for example, one or more other reconstructed blocks different from the previously decoded picture 31, in order 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 be part of a sequence of pictures that form a video sequence or a picture sequence.

[0137] For example, the encoder 20 may be configured to select a reference block from multiple reference blocks of the same picture, or from different pictures in multiple other pictures, and to provide the reference picture (or reference picture index), and / or the offset (spatial offset) between the position (XY coordinates) of the reference block and the position of the current block, as an interpretation parameter to the motion estimation unit (not shown in Figure 2). This offset is also referred to as the motion vector (MV).

[0138] The motion compensation unit is configured to obtain interprediction blocks 245 by, for example, acquiring interprediction parameters, e.g., receiving them, and performing interprediction based on or using the interprediction parameters. Motion compensation performed by the motion compensation unit (not shown in Figure 2) may include fetching or generating predictive blocks (possibly including performing interpolation with sub-sample accuracy) based on motion / block vectors determined by motion estimation. During interpolation filtering, additional samples may be generated from known samples, thereby potentially increasing the amount of candidate predictive blocks that may be used to encode picture blocks. Once the motion vector to be used for the current picture block's PU is received, the motion compensation unit 246 can position the predictive block that the motion vector points to in the reference picture list. The motion compensation unit 246 can further generate syntax elements related to blocks and video slices, which the video decoder 30 uses when decoding picture blocks of video slices.

[0139] The intra-prediction unit 254 is configured to perform intra-prediction by, for example, receiving, a picture block 203 (current picture block) of the same picture and one or more previously reconstructed blocks, such as reconstructed adjacent blocks. For example, the encoder 20 can 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 optimization criteria, for example, minimum residual (e.g., an intra-prediction mode that provides the prediction block 255 most similar to the current picture block 203) or minimum rate distortion.

[0141] The intra-prediction unit 254 is further configured to determine an intra-prediction 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 entropy coding unit 270 with intra-prediction parameters, 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 obtain encoded picture data 21 that can be output, for example, in the form of an encoded bitstream, by applying 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 methods or techniques) to one or more of the quantized residual coefficients 209, inter-prediction parameters, intra-prediction parameters, and / or loop filter parameters (or not applying to any of them) and using the output 272. The encoded bitstream may be transmitted to the video decoder 30 or stored for later transmission or retrieval by the video decoder 30. The entropy coding unit 270 may be further configured to perform entropy coding with respect to another syntax element of the current video slice being coded.

[0143] Another structural variation of the video encoder 20 may be configured to encode a video stream. For example, a non-conversion-based encoder 20 can directly quantize the residual signal for some blocks or frames without using the conversion processing unit 206. In another implementation, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 coupled into a single unit.

[0144] Figure 3 shows an example of a video decoder 30 configured to implement the technology of the present invention. The video decoder 30 is configured to receive encoded picture data (e.g., encoded bitstream) 21 encoded by an encoder 20 or the like, and to obtain a decoded picture 31. In the decoding process, the video decoder 30 receives video data from the video encoder 20, for example, an encoded video bitstream showing picture blocks and associated syntax elements of an encoded video slice.

[0145] In the example in Figure 3, the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transformation unit 312, a reconstruction unit 314 (e.g., an adder 314), a buffer 316, a loop filter 320, a decoded picture buffer 330, and a prediction unit 360. The prediction unit 360 may include an inter-prediction unit 344, an intra-prediction unit 354, and a mode selection unit 362. In some examples, the video decoder 30 is capable of performing a decoding traverse that is roughly the reverse of the coding traverse described with reference to the video encoder 20 in Figure 2.

[0146] The entropy decoding unit 304 is configured to perform entropy decoding on the encoded picture data 21 and obtain quantization coefficients 309, decoded coding parameters (not shown in Figure 3), and / or any one or all of the following: for example, inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements (which have been decoded). The entropy decoding unit 304 is further configured to transfer the inter-prediction parameters, intra-prediction parameters, and / or other syntax elements to the prediction processing unit 360. The video decoder 30 is capable of receiving syntax elements at the video slice level and / or at the video block level.

[0147] The inverse quantization unit 310 may have the same function as the inverse quantization unit 110, the inverse transformation processing unit 312 may have the same function as the inverse transformation processing unit 212, the reconstruction unit 314 may have the same function as the reconstruction unit 214, the buffer 316 may have the same function as the buffer 216, the loop filter 320 may have the same function as the loop filter 220, and the decoded picture buffer 330 may have the same function as the decoded picture buffer 230.

[0148] The prediction processing unit 360 may include an inter-prediction unit 344 and an internal prediction unit 354. The inter-prediction unit 344 may have the same functionality as the inter-prediction unit 244, and the intra-prediction unit 354 may have the same functionality as the intra-prediction unit 254. The prediction processing unit 360 is typically configured to perform block prediction and / or acquire prediction blocks 365 from the encoded data 21, and to receive or acquire prediction-related parameters and / or information regarding the selected prediction mode, for example, from the entropy decoding unit 304 (explicitly or implicitly).

[0149] When a video slice is encoded as intra-coded (I), the intra-prediction unit 354 of the prediction processing unit 360 is configured to generate a prediction block 365 to be used for the picture block 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 encoded as an inter-coded (i.e., B or P) slice, the inter-prediction unit 344 (e.g., motion compensation unit) of the prediction processing unit 360 is configured to generate a prediction block 365 to be used for the video block of the current video slice, based on motion vectors received from the entropy decoding unit 304 and another syntax element. With respect to inter-prediction, the prediction block may be generated from one of the reference pictures in a single reference picture list. The video decoder 30 can configure the reference frame lists of List 0 and List 1 by using a default configuration technique based on reference pictures stored in the DPB 330.

[0150] The prediction processing unit 360 is configured to determine prediction information to be used for the video block of the current video slice by analyzing motion vectors and other syntax elements, and to use the prediction information to generate prediction blocks to be used for the current video block being decoded. For example, the prediction processing unit 360 uses several received syntax elements to determine the prediction mode (e.g., intra or interpredict), the interpredict slice type (e.g., B slice, P slice, or GPB slice), the configuration information of one or more pictures in the reference picture list used for slicing, the motion vector of each intercoded video block used for slicing, the interpredict state of each intercoded video block used for slicing, and other information to decode the video block of the current video slice.

[0151] The inverse quantization unit 310 may be configured to perform inverse quantization (i.e., dequantization) on quantization transformation coefficients that are decoded by the entropy decoding unit 304 provided in the bitstream. The inverse quantization process may include determining the degree of quantization to be applied and the degree of inverse quantization to be applied, using quantization parameters calculated by the video encoder 20 for each video block in the video slice.

[0152] The inverse transformation processing unit 312 is configured to generate residual blocks in the sample domain by applying an inverse transformation (e.g., inverse DCT, inverse integer transformation, or a conceptually similar inverse transformation process) to the transformation coefficients.

[0153] The reconstruction unit 314 (e.g., adder 314) is configured to obtain the reconstructed block 315 in the sample domain by adding the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365, for example by adding the sample values ​​of the reconstructed residual block 313 to the sample values ​​of the prediction block 365.

[0154] The loop filter unit 320 (either within or after the encoding loop) is configured to filter the reconstructed block 315 to obtain the filtered block 321, thereby facilitating sample transformation or improving video quality. In one example, the loop filter unit 320 can 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, e.g., a deblocking filter, a sample-adaptive offset (SAO) filter, or another filter, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening or smoothing filter, or a co-filter. Although the loop filter unit 320 is shown as an in-loop filter in Figure 3, the loop filter unit 320 may be implemented as a post-loop filter in other configurations.

[0155] The filtered block 321 within a given frame or picture is stored in a decoded picture buffer 330 that stores a reference picture to be used for subsequent motion compensation.

[0156] The decoder 30 is configured to output the decoded picture 31 using output 332, etc., and to present the decoded picture 31 to the user, or to provide the decoded picture 31 for the user to view.

[0157] Another variation of the video decoder 30 can be configured to decode a compressed bitstream. For example, the decoder 30 can generate an output video stream without a loop filter unit 320. For example, a non-transformation-based decoder 30 can directly dequantize the residual signal for some blocks or frames without an inverse transformation unit 312. In another implementation, the video decoder 30 can have an inverse quantization unit 310 and an inverse transformation unit 312 coupled into a single unit.

[0158] Figure 4 shows an example of a video coding system 40 including the encoder 20 of Figure 2 and / or the decoder 30 of Figure 3 according to an exemplary embodiment. The system 40 can implement various combinations of the technologies of the present invention. In the illustrated implementation, the 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 the logic circuit 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, the imaging device 41, antenna 42, processing device 46, logic circuit 47, video encoder 20, video decoder 30, processor 43, memory 44, and / or display device 45 are capable of communicating with each other. As described, the video coding system 40 is shown with both the video encoder 20 and the video decoder 30, but in different examples, the video coding system 40 may include only the video encoder 20 or only the video decoder 30.

[0160] In some examples, as shown in the drawings, the video coding system 40 may include an antenna 42. For example, the antenna 42 may be configured to transmit or receive an encoded bitstream of video data. Furthermore, in some examples, the video coding system 40 may include a display device 45. The display device 45 may be configured to display video data. In some examples, as shown in the drawings, the logic circuit 47 may be implemented by a processing unit 46. The processing unit 46 may include application-specific integrated circuit (ASIC) logic, a graphics processing unit, a general-purpose processor, etc. The video coding system 40 may also include an optional processor 43. The optional processor 43 may similarly include application-specific integrated circuit (ASIC) logic, a graphics processing unit, a general-purpose processor, etc. In some examples, the logic circuit 47 may be implemented by hardware such as dedicated video coding hardware, and the 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 an unspecified example, memory 44 may be implemented by cache memory. In some examples, logic circuits 47 can access memory 44 (e.g., for implementing an image buffer). In other examples, logic circuits 47 and / or processing units 46 may include memory (e.g., a cache) for implementing an image buffer, etc.

[0161] In some examples, the video encoder 20 implemented by logic circuits may include an image buffer (e.g., implemented by a processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by a processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the video encoder 20 implemented by logic circuits 47 to implement various modules described with reference to Figure 2, and / or any other encoder system or subsystem described herein. The logic circuits may be configured to perform various operations described herein.

[0162] The video decoder 30 may also be implemented by logic circuits 47 to implement various modules as described with reference to the decoder 30 in Figure 3, and / or any other decoder system or subsystem as described herein. In some examples, the video decoder 30 implemented by logic circuits may include an image buffer (implemented by a processing unit 46 or memory 44) and a graphics processing unit (for example, implemented by a processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the video decoder 30 implemented by logic circuits 47 to implement various modules as described with reference to Figure 3, and / or any other decoder system or subsystem as described herein.

[0163] In some examples, the antenna 42 of the video coding system 40 may be configured to receive an encoded bitstream of video data. As described herein, the encoded bitstream may include data related to the video frame coding described herein, such as indicators, index values, mode selection data, etc., and data related to encoding partitioning (e.g., conversion coefficients or quantization conversion coefficients, optional indicators (as described), and / or data defining encoding partitioning). The video coding system 40 may further include a video decoder 30 coupled to the antenna 42 and configured to decode the encoded bitstream. A display device 45 is configured to present video frames.

[0164] Figure 5 is a simplified block diagram of a device 500 that can be used as any one or two of the source device 12 and destination device 14 of Figure 1 according to an exemplary embodiment. The device 500 can implement the technology of the present application. The device 500 can use one form of computing system including multiple computing devices, or one form of a single computing device such as a mobile phone, tablet computer, laptop computer, notebook computer, or desktop computer.

[0165] The processor 502 within the device 500 may be a central processing unit. Alternatively, the processor 502 may be some other type of existing or future device, or a device capable of controlling or processing information. As shown in the drawings, the disclosed implementation can be carried out using a single processor such as the processor 502, but advantages in speed and efficiency can be achieved by using more than one processor.

[0166] In implementation, the memory 504 within the device 500 may be read-only memory (ROM) or random access memory (RAM). Any other suitable type of storage device can be used as memory 504. Memory 504 may include code and data 506 accessed by the processor 502 using the bus 512. Memory 504 may further include an operating system 508 and an application program 510. The application program 510 includes at least one program that enables the processor 502 to perform the method described herein. For example, the application program 510 may include applications 1 to N, which further include video encoding applications for performing the method described herein. The device 500 may further include additional memory in the form of secondary memory 514. Secondary memory 514 may be, for example, a memory card used with a mobile computing device. Since video communication sessions may contain a large amount of information, the information can be stored entirely 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, for example, a display 518. In one example, the display 518 may be a touch-sensitive display that combines a display with a touch-sensing element capable of operating to sense touch input. The display 518 can be coupled to the processor 502 by using the bus 512. In addition to the display 518, further output devices may be provided that enable a user to program the device 500 or use the device 500 in another way, or another output device may be provided instead of the display 518. If the output device is a display, or includes a display, the display may be otherwise implemented by using, for example, 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 an image sensing device 520, or may 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 the user operating the device 500. The image sensing device 520 can be positioned directly facing the user operating the device 500. In one example, the position and optical axis of the image sensing device 520 can 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 a sound sensing device 522, or may be connected to a sound sensing device 522. The sound sensing device 522 is, for example, a microphone, or any other existing or future sound sensing device capable of sensing sound in the vicinity of Device 500. The sound sensing device 522 may be positioned directly facing the user operating the device 500 and may be configured to receive sounds such as the user's voice or other sounds produced when the user operates the device 500.

[0170] The processor 502 and memory 504 of device 500 are integrated into a single unit as shown in Figure 5, but other configurations are possible. The operation of processor 502 may be distributed across multiple machines (each machine having one or more processors) that can be directly coupled, or it may be distributed in a local area or another network. Memory 504 may be distributed across multiple machines, such as network-based memory and memory in multiple machines running device 500. Although 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 it may be accessed via a network, or it may consist of a single integrated unit such as a memory card, or multiple units such as multiple memory cards. Thus, device 500 can be implemented in multiple configurations.

[0171] The concept of this application will be explained below.

[0172] 1. Interpretation mode

[0173] HEVC uses two interpretation modes: advanced motion vector prediction (AMVP) mode and merge mode.

[0174] In AMVP mode, the currently active block is first traversed through spatially or temporally adjacent encoded blocks (referred to as adjacent blocks), and a candidate motion vector list (also referred to as a motion information candidate list) is constructed based on the motion information of the adjacent 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 positions of the adjacent blocks and their traversal order are predetermined. The rate distortion cost is calculated according to equation (1), where J is the rate distortion cost RD cost, SAD is the sum of absolute differences (SAD) between the original sample value and the predicted sample value obtained by motion estimation using the candidate motion vector predictor, R is the bit rate, and λ is the Lagrange multiplier. The encoder transfers 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. Furthermore, to obtain the actual motion vector of the block, a motion search is performed in the neighborhood centered on the MVP. The encoder then transfers the difference between the MVP and the actual motion vector (motion vector difference) to the decoder. 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 adjacent encoded blocks of the current block. Next, optimal motion information is determined from the candidate motion vector list based on rate distortion cost to serve as motion information for the current block. Then, the index value of the position of the optimal motion information in the candidate motion vector list (hereinafter referred to as the merge index) is transferred to the decoder. The spatial and temporal candidate motion information of the current block is shown in Figure 6. The spatial candidate motion information comes from five spatially adjacent blocks (A0, A1, B0, B1, B2). If adjacent blocks are not available (if adjacent blocks do not exist, if adjacent blocks are not encoded, or if the prediction mode used for adjacent blocks is not inter-prediction mode), the motion information of adjacent blocks is not added to the candidate motion vector list. The temporal candidate motion information of the current block is obtained by scaling the MV of the block at the corresponding position in 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 positions of adjacent blocks and their traverse order are predetermined. Furthermore, the positions of adjacent blocks and their traverse order may change depending on the mode.

[0177] It is understood that the candidate motion vector list must be maintained in both AMVP mode and merge mode. Before new motion information is added to the candidate list, it is first checked whether the same motion information already exists in the list. If the same motion information exists, the motion information is not added to the list. This checking process is referred to as trimming the candidate motion vector list. Trimming the list avoids duplicate motion information in the list, thereby avoiding redundant rate distortion cost calculations.

[0178] In HEVC interpretation, all samples within a coding block use the same motion information, and therefore, motion compensation is performed based on this 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 can lead to inaccurate motion-compensated predictions and more residual information.

[0179] Existing video coding standards use block-matching motion estimation based on translational motion models, assuming that the motion of all samples within a block is consistent. However, in the real world, a variety of motions exist. Many objects are in non-translational motion, such as rotating objects, roller coasters rotating in various directions, fireworks displays, and some stunts in movies, especially moving objects in UGC scenarios. When block motion compensation techniques based on translational motion models in existing coding standards are used for these moving objects, coding efficiency can be significantly affected. Therefore, non-translational motion models, such as affine motion models, are introduced to further improve coding efficiency.

[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 models

[0182] In non-translational motion model-based prediction, the codec uses a single motion model to derive motion information for each child motion compensation unit within 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 4-parameter affine motion models or 6-parameter affine motion models.

[0183] The child motion compensation unit in the embodiments of the present invention may be a sample or an N1 × N2 sample block obtained by division according to a particular method, where N1 and N2 are both positive integers, and N1 may be equal to or not equal to N2.

[0184] The four-parameter affine motion model can be expressed as shown in equation (2):

number

[0185] A four-parameter affine motion model can be represented by the motion vectors of two samples 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. When 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) is the coordinate of the child motion compensation unit relative to the top-left sample of the current block and W represents the width of the current block.

number

[0186] The 6-parameter affine motion model can be expressed as shown in equation (4):

number

[0187] A 6-parameter affine motion model can be represented by the motion vectors of three samples 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, top-right, and bottom-left control points of the current block are first determined. Next, 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 represent the width and height of the current block, respectively.

number

[0188] Coding blocks predicted using an affine motion model are referred to as affine coding blocks.

[0189] Generally, motion information for control points in affine coding blocks can be obtained by using either 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 in the current coding block can be obtained by using either the inherited control point motion vector prediction method or the constructed control point motion vector prediction method.

[0191] 3. Inherited Control Point Motion Vector Prediction Method

[0192] The inherited control point motion vector prediction method determines candidate control point motion vectors for the current block using motion models of adjacent coded affine coding blocks.

[0193] The current block shown in Figure 7 is used as an example. Adjacent blocks around the current block are traversed in a specified order, e.g., A1→B1→B0→A0→B2, to discover the affine coding block where the current block's adjacent blocks are located, and to obtain control point motion information for the affine coding block. Furthermore, the control point motion vector of the current block (in merge mode) or a control point motion vector predictor (in AMVP mode) is derived using a motion model constructed with the control point motion information of the affine coding block. The order A1→B1→B0→A0→B2 is used as merely an example; other combinations of orders are also applicable to this invention. Moreover, the adjacent blocks are not limited to A1, B1, B0, A0, and B2.

[0194] Adjacent blocks may be pre-defined size samples or sample blocks obtained based on a specific division method, such as 4x4 sample blocks, 4x2 sample blocks, or sample blocks of other sizes, but are not limited to these.

[0195] The following explains the decision-making process using A1 as an example. The process is similar for other cases.

[0196] As shown in Figure 7, if the coding block where A1 is located is a 4-parameter affine coding block, the motion vector (vx4,vy4) of the top-left sample (x4,y4) and the motion vector (vx5,vy5) of the top-right sample (x5,y5) of the affine coding block are obtained. Currently, the motion vector (vx0,vy0) of the top-left sample (x0,y0) of the affine coding block is calculated according to equation (6), and the motion vector (vx1,vy1) of the top-right sample (x1,y1) of the 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) 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 in which A1 is located is a 6-parameter affine coding block, then the motion vectors (vx4,vy4) of the top-left sample (x4,y4), the top-right sample (x5,y5), and the bottom-left sample (x6,y6) of the affine coding block are obtained. The motion vector (vx0,vy0) of the top-left sample (x0,y0) of the current block is calculated according to equation (8), the motion vector (vx1,vy1) of the top-right sample (x1,y1) of the current block is calculated according to equation (9), and the motion vector (vx2,vy2) of the bottom-left sample (x2,y2) of the current block is calculated according to equation (10).

number

[0199] The combination of the motion vectors of the top-left sample (x0, y0) (vx0, vy0), the top-right sample (x1, y1) (vx1, vy1), and the bottom-left sample (x2, y2) (vx2, vy2) of the current block, obtained based on the affine coding block in which A1 is located, represents the candidate control point motion vectors of the current block.

[0200] It should be noted that other motion models, candidate positions, search, and traverse sequences are also applicable to this invention. Details are not described in the embodiments of this invention.

[0201] It should be noted that methods using other control points to represent the motion models of adjacent and current coding blocks are also applicable to this invention. Further details are not described here.

[0202] 4. Prediction Method 1 for Constructed Control Point Motion Vectors

[0203] The construct control point motion vector prediction method combines the motion vectors of adjacent coded blocks around the control point of the current block, without considering whether adjacent coded blocks are affine coded blocks, and uses the combined motion vector as the control point motion vector of the current affine coded block.

[0204] The motion vectors of the top-left and top-right samples of the current block are determined by using motion information from adjacent coding blocks around the current coding block. Figure 8A is used as an example to illustrate the construction control point motion vector prediction method. It should be noted that Figure 8A is just one example.

[0205] As shown in Figure 8A, the motion vectors of the adjacent coding blocks A2, B2, and B3 of the upper-left sample are used as candidate motion vectors for the motion vector of the upper-left sample in the current block, and the motion vectors of the adjacent coding blocks B1 and B0 of the upper-right sample are used as candidate motion vectors for the motion vector of the upper-right sample in the current block. The candidate motion vectors of the upper-left and upper-right samples are combined to form multiple 2-tuples. The motion vectors of the two coding blocks contained in the 2-tuple can be used as candidate control point motion vectors for the current block, as shown in equation (11A) below:

number

[0206] vA2 represents the motion vector of A2, vB1 represents the motion vector of B1, vB0 represents the motion vector of B0, vB2 represents the motion vector of B2, and vB3 represents the motion vector of B3.

[0207] As shown in Figure 8A, the motion vectors of the adjacent coding blocks A2, B2, and B3 of the upper-left sample are used as candidate motion vectors for the motion vector of the upper-left sample in the current block; the motion vectors of the adjacent coding blocks B1 and B0 of the upper-right sample are used as candidate motion vectors for the motion vector of the upper-right sample in the current block; and the motion vectors of the adjacent coding blocks A0 and A1 of the lower-left sample are used as candidate motion vectors for the motion vector of the lower-left sample in the current block. The candidate motion vectors of the upper-left, upper-right, and lower-left samples are combined to form a 3-tuple. The motion vectors of the three coding blocks contained in the 3-tuple can be used as candidate control point motion vectors for the current block, as shown in equations (11B) and (11C) below:

number

[0208] vA2 represents the motion vector of A2, vB1 represents the motion vector of B1, vB0 represents the motion vector of B0, vB2 represents the motion vector of B2, vB3 represents the motion vector of B3, vA0 represents the motion vector of A0, and vA1 represents the motion vector of A1.

[0209] It should be noted that other methods of combining the motion vectors of control points are also applicable to this invention. Details are not described here.

[0210] It should be noted that methods using other control points to represent the motion models of adjacent and current coding blocks are also applicable to this invention. Further details are not described here.

[0211] 5. Construction control point motion vector prediction method 2: Please refer to Figure 8 for details.

[0212] Step 801: Obtain the movement information of the current block's control point.

[0213] For example, in Figure 8A, CPk (k=1,2,3, or 4) indicates the k-th 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 represent the width and height of the block.

[0215] The movement information for each control point is acquired in the following order:

[0216] (1) In the case of 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 motion information for all three positions is unavailable, it is not possible to obtain motion information for CP1.

[0217] (2) In the case of 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 unavailable, the motion information of CP2 cannot be obtained.

[0218] (3) In the case of CP3, the order of examination is A0 → A1.

[0219] (4) In the case of CP4, the movement information of T is used.

[0220] Here, the availability of X means that the block at the location of X (where X is A0, A1, A2, B0, B1, B2, B3, or T) is encoded and the interpredictive mode is used. Otherwise, the location of X is not available.

[0221] It should be noted that other methods for obtaining motion information of control points are also applicable to this invention. Details are not described here.

[0222] Step 802: Combine the motion information of the control points and obtain the constructed control point motion information.

[0223] The motion information of two control points is combined to form a 2-tuple, constructing a four-parameter affine motion model. The way the 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 using a 2-tuple containing control points CP1 and CP2 may be represented as Affine(CP1,CP2).

[0224] The motion information of the three control points is combined to form a 3-tuple, constructing a 6-parameter affine motion model. The way the three control points are combined may be {CP1,CP2,CP4}, {CP1,CP2,CP3}, {CP2,CP3,CP4}, or {CP1,CP3,CP4}. For example, a 6-parameter affine motion model constructed using a 3-tuple containing control points CP1, CP2, and CP3 may be represented as Affine(CP1,CP2,CP3).

[0225] The motion information of the four control points is combined to form a 4-tuple, constructing an 8-parameter bilinear model. The 8-parameter bilinear model constructed 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 the sake of ease of explanation, a combination of motion information of two control points (or two coded blocks) is referred to simply as a 2-tuple, a combination of motion information of three control points (or three coded blocks) is referred to simply as a 3-tuple, and a combination of motion information of four control points (or four coded blocks) is referred to simply as a 4-tuple.

[0227] These models are traversed in a pre-configured order. If motion information for the control points corresponding to a combined model is not available, the model is considered unavailable. Otherwise, the model's reference frame index is determined, and the motion vectors of the control points are scaled. If the scaled motion information for all control points is consistent, the model is invalid. If motion information for all control points controlling the model is available, and the model is valid, the motion information for the control points constituting the model is added to the motion information candidate list.

[0228] The control point motion vector scaling method is given by equation (12):

number

[0229] CurPoc indicates the POC number of the current frame, DesPoc indicates the POC number of the current block's reference frame, SrcPoc indicates the POC number of the control point's reference frame, MVs indicates the motion vectors obtained by scaling, and MV indicates the motion vectors of the control points.

[0230] It should be noted that different combinations of control points may be converted to control points at the same location.

[0231] For example, a four-parameter affine motion model obtained by a combination of {CP1,CP4}, {CP2,CP3}, {CP2,CP4}, {CP1,CP3}, or {CP3,CP4} is converted to an expression 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 transformation can be performed according to the following equations (13)-(21), where W represents the current width of the block and H represents the current height of the block. In equations (13)-(21), (vx0, vy0) represents the motion vector of CP1, (vx1, vy1) represents the motion vector of CP2, (vx2, vy2) represents the motion vector of CP3, and (vx3, vy3) represents 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 formula (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 6-parameter affine motion model obtained by a combination of {CP1,CP2,CP4}, {CP2,CP3,CP4}, or {CP1,CP3,CP4} is converted to an expression 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 transformation can be performed according to equations (22)-(24) below, where W represents the current width of the block and H represents the current height of the block. In equations (13)-(21), (vx0, vy0) represents the motion vector of CP1, (vx1, vy1) represents the motion vector of CP2, (vx2, vy2) represents the motion vector of CP3, and (vx3, vy3) represents 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 formula (23): [Number]

[0243] {CP1, CP3, CP4} can be converted to {CP1, CP2, CP3} by the following formula (24): [Number]

[0244] 6. Affine Motion Model - Based Advanced Motion Vector Prediction Mode (Affine AMVP mode)

[0245] (1) Construct a candidate motion vector list

[0246] The candidate motion vector list for the Affine Motion Model - Based AMVP mode is constructed by using the inheritance control point motion vector prediction method and / or the construction 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 vectors predictor candidate list. The motion vector predictor for each control point includes the motion vectors of two control points (for a 4 - parameter affine motion model) or the motion vectors of three control points (for a 6 - parameter affine motion model).

[0247] Optionally, the control point motion vectors predictor candidate list can be pruned, sorted according to specific rules, and can be truncated or padded by a specific amount.

[0248] (2) Determine the optimal control point motion vector predictor

[0249] On the encoder side, for each child motion compensation unit within the current coding block, the motion vector is obtained based on each control point motion vector predictor in the control point motion vector predictor list by using Equation (3) / (5). The sample value at the corresponding position in the reference frame indicated by the motion vector of each child motion compensation unit is obtained, and the sample value is used as a predictor for performing motion compensation by 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 minimum average difference is selected as the optimal control point motion vector predictor and is used as the motion vector predictor for two / three control points of the current coding block. The index number representing the position of the control point motion vector predictor in the control point motion vector predictor candidate list is encoded in the bitstream and transmitted to the decoder.

[0250] On the decoder side, the index number is analyzed, and based on the index number, the control point motion vector predictor (CPMVP) is determined from the control point motion vector predictor candidate list.

[0251] (3) Determine the control point motion vector

[0252] On the encoder side, to obtain the control point motion vector (CPMV), the control point motion vector predictor is used as the search start point for motion search within a specific search range. The difference between the control point motion vector and the control point motion vector predictor (CPMVD) is transferred to the decoder side.

[0253] On the decoder side, the control point motion vector difference 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 vector merge candidate list is constructed.

[0256] Optionally, the list of control point motion vector predictor candidates can be pruned and sorted according to specific rules, and truncated or padded to a certain amount.

[0257] On the encoder side, the motion vector of each child motion compensation unit (an N1 × N2 sample block or sample obtained by partitioning 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 equation (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 for performing affine motion compensation. The average difference between the original value and the predictor for each sample in the current coding block is calculated. The control point motion vectors corresponding to the minimum average difference are selected as the motion vectors for two or three control points in the current coding block. The index numbers representing the positions of the control point motion vectors in the candidate list are encoded in the bitstream and sent to the decoder.

[0258] On the decoder side, the index number is analyzed, and based on the index number, the 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 a related relationship to describe the related objects, indicating that there may be three possible relationships. For example, A and / or B may represent the following cases: only A exists, both A and B exist, or only B exists, where A and B may be singular or plural. The letter " / " generally represents an "or" relationship between related objects. "At least one of the following items (pieces)" or similar expressions indicate any combination of these items, including any single item (piece) or any combination of multiple items (pieces). For example, at least one of a, b, or c may represent 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, when an interpredictive mode is used to decode a block, a syntax element may be used to signal the interpredictive mode.

[0261] See Table 1 for some of the currently used syntax structures for the interprediction modes currently used for block analysis. It should be noted that syntax elements in the syntax structure may, alternatively, be represented by other identifiers, and this 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 the merge mode is currently being used on a block. For example, merge_flag[x0][y0]=1 indicates that the merge mode is currently being used on a block, and merge_flag[x0][y0]=0 indicates that the merge mode is not currently being used on a block, where x0 and y0 are 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 conditions for using the affine motion model-based merge mode may also be that both the width and height of the current block are 8 or greater, where `cbWidth` is the width of the current block and `cbHeight` is the height of the current block. In other words, if `cbWidth<8` or `cbHeight<8`, then `allowAffineMerge=0`, and if `cbWidth≧8` and `cbHeight≧8`, then `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, when allowAffineInter = 0, it indicates that the conditions for using the affine motion model - based AMVP mode are not met, and when allowAffineInter = 1, it indicates that the conditions for using the affine motion model - based AMVP mode are met. The conditions for using the affine motion model - based AMVP mode may be that both the width and height of the current block are 16 or more. In other words, when cbWidth < 16 or cbHeight < 16, allowAffineMerge = 0, and when 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) where the current block is located is of type P or B. For example, when affine_merge_flag[x0][y0] = 1, it indicates that the affine motion model - based merge mode is used for the current block, and when 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 the index value of the merge candidate list.

[0267] The syntax element affine_merge_idx[x0][y0] may be used to indicate the index value of the affine - merge candidate list.

[0268] The syntax element affine_inter_flag[x0][y0] may be used to indicate whether an affine motion model-based AMVP mode is currently used for a block, given that the slice to which the block is currently located is a P-type slice or a B-type slice. For example, allowAffineInter=0 indicates that an affine motion model-based AMVP mode is currently used for the block, while allowAffineInter=1 indicates that an affine motion model-based AMVP mode is not currently used for the block, although a translational motion model-based AMVP mode may be used.

[0269] If the slice in which the block is currently 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 currently used to perform motion compensation for the block. If affine_type_flag[x0][y0]=0, it indicates that a 6-parameter affine motion model is not currently used to perform motion compensation for the 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 currently used to perform motion compensation for the 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 the 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. The following parameters are used: mvd_coding(x0,y0,0,0) represents the first motion vector difference, mvp_l0_flag[x0][y0] represents the forward MVP candidate list index value, PRED_L0 represents the forward prediction, num_ref_idx_l1_active_minus1 represents the amount of reference frames in the back reference frame list, ref_idx_l1[x0][y0] represents the back reference frame index value of the current block, and mvp_l1_flag[x0][y0] represents the back MVP candidate list index value.

[0272] In Table 1, ae(v) represents the syntax element encoded by context-based adaptive binary arithmetic coding (CABAC).

[0273] The interpretation prediction process is described in detail below. Please refer to Figure 9A for details.

[0274] Step 601: Analyze the bitstream based on the syntax structure shown in Table 1 and determine the interprediction mode of the current block.

[0275] Step 602a is executed if it is determined that the current block's interpretation mode is an affine motion model-based AMVP mode.

[0276] Specifically, if the syntax elements merge_flag=0 and affine_inter_flag=1, it indicates that the current block's inter-prediction mode is an affine motion model-based AMVP mode.

[0277] If it is determined that the current block's interpretation mode is an affine motion model-based merge mode, step 602b is executed.

[0278] Specifically, if the syntax elements merge_flag=1 and affine_merge_flag=1, it indicates that the current inter-prediction mode of the block is an affine motion model-based merge mode.

[0279] Step 602a: Create a list of candidate motion vectors corresponding to the affine motion model-based AMVP mode, and then perform step 603a.

[0280] The 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 (where a 4-parameter affine motion model is used in 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 certain amount.

[0283] A1: The process of constructing a list of candidate motion vectors by using the inherited control point motion vector prediction method is described.

[0284] Figure 7 is used as an example. The adjacent blocks surrounding the current block are traversed in the order A1→B1→B0→A0→B2 in Figure 7 to find the affine coding block to which the adjacent block is located and to obtain the control point motion information of the affine coding block. Furthermore, candidate control point motion information 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 relevant explanation of the inherited control point motion vector prediction method in section 3. Further details are not explained here.

[0285] For example, if the affine motion model currently used for a block is a 4-parameter affine motion model (i.e., MotionModelIdc=1), and the 4-parameter affine motion model is used for an adjacent affine decoding block, then the motion vectors of the two control points of the affine decoding 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 decoding block is an affine coding block that is predicted in the coding phase by using the affine motion model.

[0286] The motion vectors of the top-left and top-right control points of the current block are derived according to equations (6) and (7), which correspond to the four-parameter affine motion model, by using a four-parameter affine motion model that includes two control points of the adjacent affine decoding block.

[0287] When a 6-parameter affine motion model is used in adjacent affine decoding blocks, the motion vectors of the three control points of the adjacent affine decoding blocks are obtained, for example, the motion vector (vx4,vy4) of the upper left control point (x4,y4) in Figure 7, the motion vector (vx5,vy5) of the upper right control point (x5,y5), and the motion vector (vx6,vy6) of the lower left control point (x6,y6).

[0288] The motion vectors of the top-left and top-right control points of the current block are derived according to equations (8) and (9), which correspond to the six-parameter affine motion model, by using a six-parameter affine motion model that includes three control points of the adjacent affine decoding block.

[0289] For example, the affine motion model used in the current decoding block is a 6-parameter affine motion model (i.e., MotionModelIdc=2).

[0290] If the affine motion model used for adjacent affine decoding blocks is a 6-parameter affine motion model, then the motion vectors of the three control points of the adjacent affine decoding blocks are obtained, for example, the motion vector (vx4,vy4) of the upper left control point (x4,y4) in Figure 7, 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).

[0291] The motion vectors of the top-left, top-right, and bottom-left control points of the current block are derived according to equations (8), (9), and (10), which correspond to the six-parameter affine motion model, by using a six-parameter affine motion model that includes three control points of the adjacent affine decoding block.

[0292] If the affine motion model used for an adjacent affine decoding block is a 4-parameter affine motion model, then the motion vectors of the two control points of the affine decoding block are obtained, for example, 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).

[0293] The motion vectors of the top-left, top-right, and bottom-left control points of the current block are derived according to equations (6) and (7), which correspond to the four-parameter affine motion model, by using a four-parameter affine motion model that includes two control points of the adjacent affine decoding block.

[0294] It should be noted that other motion models, candidate positions, and search sequences are also applicable to this invention. Details are not described here. It should also be noted that other methods of using control points to represent the motion models of adjacent and current coding blocks are also applicable to this invention. Details are not described here.

[0295] A2: The process of constructing a list of candidate motion vectors using a construction control point motion vector prediction method is described.

[0296] For example, if the affine motion model used for the current decoding block is a 4-parameter affine motion model (i.e., MotionModelIdc=1), the motion vectors of the top-left and top-right samples of the current coding block are determined by using the motion information of the adjacent coding blocks of the current coding block. Specifically, a list of candidate motion vectors can be constructed using either Construction Control Point Motion Vector Prediction Method 1 or Construction Control Point Motion Vector Prediction Method 2. For specific methods, please refer to explanations 4 and 5. Details are not explained 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 of the top-left, top-right, and bottom-left samples of the current coding block are determined by using the motion information of the adjacent coding blocks of the current coding block. Specifically, the candidate motion vector list can be constructed using either Construction Control Point Motion Vector Prediction Method 1 or Construction Control Point Motion Vector Prediction Method 2. For specific methods, please refer to explanations 4 and 5. Details are not explained here.

[0298] It should be noted that another method of combining control point motion information is also applicable to this invention. Details are not described here.

[0299] Step 603a: Analyze the bitstream to determine the optimal control point motion vector predictor, and then perform step 604a.

[0300] B1: If the affine motion model used in the current decoding block is a 4-parameter affine motion model (MotionModelIdc=1), the index number is analyzed, and based on the index number, the optimal motion vector predictor at the two control points is determined from the list of candidate motion vectors.

[0301] For example, the index number is mvp_l0_flag or mvp_l1_flag.

[0302] B2: If the affine motion model used in 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 optimal motion vector predictor at the three control points is determined from the list of candidate motion vectors.

[0303] Step 604a: Analyze the bitstream to determine the control point motion vectors.

[0304] C1: If the affine motion model used in the current decoding block is a 4-parameter affine motion model (MotionModelIdc=1), the motion vector difference of the two control points in the current block is obtained from the bitstream through decoding, and the motion vector of the control point is obtained based on the motion vector difference of the control point and the motion vector predictor. Using forward prediction as an example, the motion vector differences of the two control points are mvd_coding(x0,y0,0,0) and mvd_coding(x0,y0,0,1), respectively.

[0305] For example, the motion vector difference between the top-left control point and the top-right control point is obtained from the bitstream through decoding, added to the respective motion vector predictors, and the motion vectors of the top-left and top-right control points of the current block are obtained.

[0306] C2: The affine motion model currently used in the decoding block is a 6-parameter affine motion model (MotionModelIdc=2).

[0307] Currently, the motion vector differences of the three control points in the block are obtained from the bitstream through decoding, and the control point motion vectors are obtained based on the motion vector differences of the control points and the motion vector predictor. Using forward prediction as an example, the motion vector differences 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 differences of the top-left control point, top-right control point, and bottom-left control point are obtained from the bitstream through decoding, added to the respective motion vector predictors, and the motion vectors of the top-left, top-right, and bottom-left control points of the current block are obtained.

[0309] Step 605a: Obtain the motion vectors of each subblock in the current block based on the motion information of the control points used in the current decoded block and the affine motion model.

[0310] For each subblock within the current affine decoding block (each subblock is equivalent to one motion compensation unit, and the width and height of the subblock are smaller than those of the current block), the motion information of a sample at a pre-defined position within the motion compensation unit can be used to represent the motion information of all samples within the motion compensation unit. Assuming the size of the motion compensation unit is MxN, the sample at the pre-defined position may be the central sample (M / 2,N / 2), the upper left sample (0,0), the upper right sample (M-1,0), or a sample at another position within the motion compensation unit. For illustrative purposes, we will use the central sample of the motion compensation unit as an example. Referring to Figure 9C, V0 represents the motion vector of the upper left control point, and V1 represents the motion vector of the upper right control point. Each of the small boxes 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 decoding block are calculated using equation (25), where i represents the i-th motion compensation unit in the horizontal direction (from left to right), j represents the j-th motion compensation unit in the vertical direction (from top to bottom), and (x(i,j), y(i,j)) represents the coordinates of the center sample of the (i,j)-th motion compensation unit relative to the top-left sample of the current affine decoding block.

[0312] If the affine motion model used in the current affine decoding block is a 6-parameter affine motion model, then (x(i,j), y(i,j)) are substituted into equation (26) corresponding to the 6-parameter affine motion model to obtain the motion vector of the central sample in each motion compensation unit, and the motion vector of the central sample is used as the motion vector (vx(i,j), vy(i,j)) for all samples in the motion compensation unit.

[0313] If the affine motion model used in the current affine decoding block is a four-parameter affine motion model, then (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 central sample in each motion compensation unit, and the motion vector of the central sample is used as the motion vector (vx(i,j), vy(i,j)) for all samples in the motion compensation unit.

number

[0314] Step 606a: Perform motion compensation for each subblock based on the determined motion vector of the subblock and obtain a sample predictor for the subblock.

[0315] Step 602b: Construct a list of motion information candidates corresponding to the affine motion model-based merge mode.

[0316] Specifically, the candidate list of motion information corresponding to the affine motion model-based merge mode can be constructed 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 specific rules, and truncated or padded to a certain amount.

[0318] D1: The process of constructing a list of candidate motion vectors by using the inherited control point motion vector prediction method is described.

[0319] The motion information for candidate control points in the current block is derived using the inherited control point motion vector prediction method and added to the motion information candidate list.

[0320] The adjacent blocks surrounding the current block are traversed in the order A1→B1→B0→A0→B2 in Figure 8A to find the affine coding block whose position has been determined, and to obtain the control point motion information of the affine coding block. Furthermore, candidate control point motion information for the current block is derived by using the motion model of the affine coding block.

[0321] If the candidate motion vector list is empty, 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 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.

[0322] To determine whether two candidate motion data points are identical, it is necessary to sequentially check whether the forward reference frame, the reverse reference frame, the horizontal and vertical components of each forward motion vector, and the horizontal and vertical components of each reverse motion vector are identical in the two candidate motion data points. Two candidate motion data points are considered different only if all of the aforementioned elements are different.

[0323] If the number of motion information elements 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; below, we will use a length of 5 as an example, and the details will not be explained here), then the candidate list is complete. Otherwise, the next adjacent block is traversed.

[0324] D2: The motion information of the current block's candidate control points is derived using the construction control point motion vector prediction method and added to the motion information candidate list. See Figure 9B for details.

[0325] Step 601c: Obtain motion information for the current block's control points. For this, please refer to step 801 in the Construction Control Point Motion Vector Prediction Method 2 in section 5. Details will not be explained again here.

[0326] Step 602c: Combine the motion information of the control points and obtain the constructed control point motion information. For details, please refer to Step 801 in Figure 8B. Further details will not be explained here.

[0327] Step 603c: Add the motion information of the constructed control point to the 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 pre-set order to obtain a valid combination as candidate control point motion information. In this case, if the candidate motion vector list is empty, 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 sequence is as follows: 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 control point motion information corresponding to a combination is not available, the combination is considered unavailable. If a combination is available, the reference frame index of the combination is determined (for two control points, the smaller reference frame index is selected as the reference frame index of the combination; for more than two control points, the most frequently occurring reference frame index is selected; if multiple reference frame indices 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 traverse processing described above, the length of the candidate motion vector list is shorter than the maximum list length MaxAffineNumMrgCand, the candidate motion vector list may be padded until its list length is equal to MaxAffineNumMrgCand.

[0332] Padding can be performed using the zero-motion vector padding method, or by combining or weight-averaging existing candidate motion information within an existing list. It should be noted that other methods for padding the candidate motion vector list are also applicable to this application; details are not described here.

[0333] Step S603b: Analyze the bitstream to determine the optimal control point motion information.

[0334] The index number is analyzed, and based on the index number, the optimal control point motion information is determined from the candidate motion vector list.

[0335] Step 604b: Obtain the motion vectors for each subblock of the current block based on the optimal control point motion information and affine motion model used for the current decoded block.

[0336] This step is the same as step 605a.

[0337] Step 605b: Based on the determined motion vectors of the subblocks, perform motion compensation for each subblock and obtain sample predictors for the subblocks.

[0338] The technology in this invention relates to a context-adaptive binary arithmetic coding (CABAC) entropy decoder, or another entropy decoder such as a stochastic interval partitioning entropy (PIPE) decoder or related decoder. Arithmetic decoding is a form of entropy decoding used in many compression algorithms that have high decoding efficiency because symbols can be mapped to non-integer-length codes in arithmetic decoding. Generally, decoding data symbols by CABAC involves one or more of the following steps:

[0339] (1) Binary: If the symbol to be decoded is not binary, the symbol is mapped to a "binary" sequence, and the value of each binary bit can be "0" or "1".

[0340] (2) Context assignment: (In normal mode) one context is assigned to each binary bit. The 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. This information is, for example, the value or binary number of a previously decoded symbol.

[0341] (3) Binary Encoding: An arithmetic encoder encodes binary bits. To encode binary bits, an arithmetic encoder requires the probability of the binary bit's value as input, which is the probability that the binary bit's value is equal to "0" and the probability that the binary bit's value is equal to "1". The (estimated) probability for each context is represented by 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 the binary bit to which one context is assigned, but 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 (for example, if the value of the binary bit is "1", the probability of "1" is increased).

[0343] In conventional techniques, when analyzing 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, using CABAC, different contexts are required to be used for different syntax elements in the CABAC analysis. In the present invention, the amount of context used in CABAC is reduced. Consequently, less space required by the encoder and decoder to store the context 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 values ​​of the same syntax element in the left-adjacent block of the current decryption block and the values ​​of the same syntax element in the upper-adjacent block of the current decryption block, as shown in Table 3. Here, availableL indicates the availability of the left-adjacent block of the current decryption block (whether the left-adjacent block exists and has been decrypted), and availableA indicates the availability of the upper-adjacent block of the current decryption block (whether the upper-adjacent block exists and has been decrypted). 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 illustrates the steps of a video decoding method according to one embodiment of the present invention. This embodiment can be performed using the video decoder shown in Figure 3. As shown in Figure 10, the method includes the following steps.

[0346] 1001. The received bitstream is analyzed to obtain the syntax element to be entropy decoded in the current block, where the syntax element to be entropy decoded in the current block includes either syntax element 1 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 shown in Figure 3.

[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 decoded in the current block. Entropy decoding on syntax element 1 in the current block is completed using a pre-configured context model, or entropy decoding on syntax element 2 in the current block is completed using a context model.

[0352] This step may be specifically performed by the entropy decoding unit 304 shown in Figure 3.

[0353] 1003. Based on the syntax elements in the current block that are obtained by entropy decoding, a prediction process is performed on the current block and the predicted block for the current block is obtained.

[0354] This step may be specifically performed by the prediction processing unit 360 shown in Figure 3.

[0355] 1004. Based on the predicted block of the current block, obtain the reconfigured image of the current block.

[0356] This step may be specifically performed by the reconfiguration unit 314 shown in Figure 3.

[0357] In this embodiment, syntax element 1 and syntax element 2 in the current block share a single context model, so the decoder does not need to check the context model when performing entropy decoding, improving the decoding efficiency by allowing the decoder to perform 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 by the video decoder.

[0358] Corresponding to the video decoding method described in Figure 10, embodiments of the present invention further provide an encoding method, the encoding method being: The method includes the steps of: obtaining a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 1 or syntax element 2 in the current block; performing entropy coding with respect to the syntax element to be entropy coded in the current block, wherein, when entropy coding is performed with respect to the syntax element to be entropy coded in the current block, the entropy coding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy coding with respect to syntax element 2 in the current block is completed by using a context model; and outputting a bitstream containing the syntax element in the current block that is 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 Figure 10. In this embodiment, syntax element 1 and syntax element 2 in the current block share a single context model, so the encoder does not need to check the context model when performing entropy coding, improving the coding efficiency of the encoder performing video coding. 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 by the video encoder.

[0359] Figure 11 illustrates the procedure of a video decoding method according to another embodiment of the present invention. This embodiment can be performed using the video decoder shown in Figure 3. As shown in Figure 11, the method includes the following steps.

[0360] 1101. Analyze the received bitstream to obtain the syntax element to be entropy-decoded in the current block. The syntax element to be entropy-decoded in the current block includes either syntax element 1 or syntax element 2 in the current block.

[0361] In the implementation, the first syntax element in the current block is affine_merge_flag, and the second syntax element in the current block is affine_inter_flag.

[0362] In the implementation, the first syntax element in the current block is subblock_merge_flag, and the second syntax element in the current block is affine_inter_flag.

[0363] This step may be specifically performed by the entropy decoding unit 304 shown in Figure 3.

[0364] 1102. Obtain the context model corresponding to the syntax element to be entropy decoded. The context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models.

[0365] The video decoder requires that only one context model set be stored for syntax element 1 and syntax element 2.

[0366] In some implementations, a pre-configured context model set includes only two context models. In some other implementations, a pre-configured context model set includes only three context models. It can be understood that a pre-configured context model set may alternatively include four, five, or six context models. The number of context models included in a pre-configured context model set is not limited to this embodiment of the invention.

[0367] In the implementation, determining the context model corresponding to syntax element 1 in the current block from a pre-configured set of context models involves determining the context index of syntax element 1 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block and syntax element 1 and syntax element 2 in the upper adjacent block of the current block, and the context index of 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 the context model corresponding to syntax element 2 in the current block from a pre-configured set of context models involves determining the context index of syntax element 2 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block and syntax element 1 and syntax element 2 in the upper adjacent block of the current block, and the context index of 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 a pre-configured context model set is 3, the context index value 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 context index value 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 elements 1 affine_merge_flag and 2 affine_inter_flag can share a single 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 two syntax elements in the left-adjacent block of the current decryption block and the value obtained by performing an OR operation on two syntax elements in the upper-adjacent block of the current decryption block, as shown in Table 4. Here, "|" represents the OR operation. Table 4 Context Index in the Invention [Table 4]

[0371] For example, if the amount of context models in a pre-configured context model set is 2, the context index value of syntax element 1 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, or the context index value 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.

[0372] Specifically, syntax elements 1 affine_merge_flag and 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-adjacent block of the current decryption block and the value obtained by performing an OR operation on the two syntax elements in the upper-adjacent block of the current decryption block, as shown in Table 5. Here, "|" represents the OR operation. In this embodiment of the present invention, the amount of context for affine_merge_flag and affine_inter_flag is reduced to 2. Table 5 Context Index in the Invention [Table 5]

[0373] 1103. 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.

[0374] This step may be specifically performed by the entropy decoding unit 304 shown in Figure 3.

[0375] 1104. Based on the syntax elements in the current block that are obtained by entropy decoding, a prediction process is performed on the current block to obtain the predicted block for the current block.

[0376] This step may be specifically performed by the prediction processing unit 360 shown in Figure 3.

[0377] 1105. Obtain the reconfigured image of the current block based on the predicted block of the current block.

[0378] This step may be specifically performed by the reconfiguration unit 314 shown in Figure 3.

[0379] In this embodiment, since 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, thus occupying less storage space in the video decoder.

[0380] Corresponding to the video decoding method described in Figure 11, the embodiments of the present invention further provide an encoding method, the encoding method is The method includes the steps of: obtaining a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 1 or syntax element 2 in the current block; obtaining a context model corresponding to the syntax element to be entropy coded, wherein the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models; performing entropy coding with respect to the syntax element to be entropy coded based on the context model corresponding to the syntax element to be entropy coded in the current block; and outputting a bitstream containing the syntax element in the current block that is 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 Figure 11. In this embodiment, since 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, thus occupying less storage space on the video encoder.

[0381] Figure 12 illustrates the procedure for a video decoding method according to an embodiment of the present invention. This embodiment may be performed using the video decoder shown in Figure 3. As shown in Figure 12, the method includes the following steps.

[0382] 1201. Analyze the received bitstream to obtain the syntax element to be entropy-decoded in the current block. The syntax element to be entropy-decoded in the current block includes syntax element 3 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 shown in Figure 3.

[0386] 1202. Obtain the 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 pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured context model.

[0387] In the implementation, the number of context models included in a pre-configured context model set is 5. It can be understood that the number of context models included in a pre-configured context model set may alternatively be another value, such as 1, 2, 3, or 4. If the number of context models included in a pre-configured context model set is 1, then the pre-configured context model set is one context model. The number of context models included in a pre-configured context model set is not limited to this embodiment of the present invention.

[0388] This step may be specifically performed by the entropy decoding unit 304 shown in Figure 3.

[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 shown in Figure 3.

[0391] 1204. Based on the syntax elements in the current block that are obtained by entropy decoding, a prediction process is performed on the current block to obtain the predicted block for the current block.

[0392] This step may be specifically performed by the prediction processing unit 360 shown in Figure 3.

[0393] 1205. Obtain the reconfigured image of the current block based on the predicted block of the current block.

[0394] This step may be specifically performed by the reconfiguration unit 314 shown in Figure 3.

[0395] In this embodiment, since 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, thus occupying less storage space in the video decoder.

[0396] Corresponding to the video decoding method described in Figure 12, embodiments of the present invention further provide an encoding method comprising: obtaining a syntax element to be entropy encoded in the current block, wherein the syntax element to be entropy encoded in the current block includes syntax element 3 or syntax element 4 in the current block; obtaining a context model corresponding to the syntax element to be entropy encoded, wherein the context model corresponding to syntax element 3 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured set of context models; performing entropy encoding with respect to the syntax element to be entropy encoded based on the context model corresponding to the syntax element to be entropy encoded in the current block; and outputting a bitstream containing the syntax element in the current block that is obtained by entropy encoding. The set of context models used when entropy encoding is performed on the current block is the same as the set of context models in the video decoding method described in Figure 12. In this embodiment, since 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, thus occupying less storage space on the video encoder.

[0397] Embodiments of the present invention provide a video decoder 30 including an entropy decoding unit 304, a prediction processing unit 360, and a reconstruction unit 314.

[0398] The entropy decoding unit 304 is configured to analyze the received bitstream to obtain the syntax element to be entropy decoded in the current block, the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block, and the entropy decoding unit 304 is configured to perform entropy decoding with respect to the syntax element to be entropy decoded in the current block, the entropy decoding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy decoding with respect to syntax element 2 in the current block is completed by using a context model.

[0399] In the implementation, the first syntax element in the current block is affine_merge_flag, and the second syntax element in the current block is affine_inter_flag.

[0400] In the implementation, the first syntax element in the current block is subblock_merge_flag, and the second syntax element in the current block is affine_inter_flag.

[0401] The 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, and to obtain a predicted block for the current block.

[0402] The reconstruction unit 314 is configured to obtain a reconstructed image of the current block based on the predicted block of the current block.

[0403] In this embodiment, syntax element 1 and syntax element 2 in the current block share a single context model, so the decoder does not need to check the context model when performing entropy decoding, improving the decoding efficiency by allowing the decoder to perform 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 by the video decoder.

[0404] Accordingly, embodiments of the present invention provide a video encoder 20, the video encoder includes an entropy coding unit 270 configured to acquire a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 1 or syntax element 2 in the current block, and the entropy coding unit is configured to perform entropy coding with respect to the syntax element to be entropy coded in the current block, wherein when entropy coding is performed with respect to the syntax element to be entropy coded in the current block, the entropy coding with respect to syntax element 1 in the current block is completed by using a pre-configured context model, or the entropy coding with respect to syntax element 2 in the current block is completed by using a context model, and an output 272 configured to output a bitstream containing the syntax element in the current block that is acquired 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 method described in Figure 10. In this embodiment, syntax element 1 and syntax element 2 in the current block share a single context model, so the encoder does not need to check the context model when performing entropy coding, improving the coding efficiency of the encoder performing video coding. 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 by 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 analyze the received bitstream to obtain the syntax element to be entropy decoded in the current block, the syntax element to be entropy decoded in the current block includes syntax element 1 or syntax element 2 in the current block, the entropy decoding unit 304 is configured to obtain a context model corresponding to the syntax element to be entropy decoded, the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models, and the entropy decoding unit is configured to perform entropy decoding with respect to the syntax element to be entropy decoded based on the context model corresponding to the syntax element to be entropy decoded in the current block.

[0407] In the implementation, the first syntax element in the current block is affine_merge_flag, and the second syntax element in the current block is affine_inter_flag.

[0408] In the implementation, the first syntax element in the current block is subblock_merge_flag, and the second syntax element in the current block is affine_inter_flag.

[0409] In the implementation, the entropy decoding unit 304 can be configured to determine the context index of syntax element 1 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block and syntax element 1 and syntax element 2 in the upper adjacent block of the current block, and the context index of syntax element 1 in the current block is used to indicate the context model corresponding to syntax element 1 in the current block, or The entropy decoding unit can be configured to determine the context index of syntax element 2 in the current block based on syntax element 1 and syntax element 2 in the left adjacent block of the current block, and syntax element 1 and syntax element 2 in the upper adjacent block of the current block. The context index of syntax element 2 in the current block is used to indicate the context model corresponding to syntax element 2 in the current block.

[0410] For example, the context index value 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 current context index value of syntax element 2 in the 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.

[0411] For example, the context index value of syntax element 1 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, or The current value of the context index of syntax element 2 in the 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 upper adjacent block, and on the value obtained by performing an OR operation on syntax element 1 and syntax element 2 in the left adjacent block.

[0412] The prediction processing unit 360 is configured to perform prediction processing on the current block and obtain a predicted block for the current block based on the syntax elements in the current block that are obtained by entropy decoding.

[0413] The reconstruction unit 314 is configured to obtain a reconstructed image of the current block based on the predicted block of the current block.

[0414] In this embodiment, since 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, thus occupying less storage space on the video decoder.

[0415] Accordingly, embodiments of the present invention further provide a video encoder 20, the video encoder comprising an entropy coding unit 270 configured to acquire a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 1 or syntax element 2 in the current block, the entropy coding unit is configured to acquire a context model corresponding to the syntax element to be entropy coded, wherein the context model corresponding to syntax element 1 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 2 in the current block is determined from a pre-configured set of context models, the entropy coding unit comprises an entropy coding unit configured to perform entropy coding with respect to the syntax element to be entropy coded based on the context model corresponding to the syntax element to be entropy coded in the current block, and an output 272 configured to output a bitstream containing the syntax element in the current block that is acquired 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 shown in Figure 11. In this embodiment, syntax element 1 and syntax element 2 in the current block share one context model, so the video encoder needs to store only one context model for syntax element 1 and syntax element 2, occupying less storage space on 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 analyze the received bitstream to obtain the syntax element to be entropy decoded in the current block, the syntax element to be entropy decoded in the current block includes syntax element 3 or syntax element 4 in the current block, the entropy decoding unit is configured to 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 pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured set of context models, and the entropy decoding unit is configured to perform entropy decoding with respect to the syntax element to be entropy decoded based on the context model corresponding to the syntax element to be entropy decoded in the current block.

[0418] A pre-configured set of context models can contain one, two, three, four, or five context models. If a pre-configured set of context models contains only one context model, it can be understood that the pre-configured set of context models is a single context model.

[0419] In the implementation, syntax element 3 in the current block is merge_idx, used to indicate the index value of the current block's merge candidate list, or syntax element 4 in the current block is affine_merge_idx, used to indicate the index value of the current block's affine merge candidate list, or Syntax element 3 in the current block is merge_idx, used to indicate the index value of the current block's merge candidate list, or syntax element 4 in the current block is subblock_merge_idx, used to indicate the index value of the subblock's merge candidate list.

[0420] The prediction processing unit 360 is configured to perform prediction processing on the current block based on the syntax elements in the current block that are obtained by entropy decoding, and to obtain a predicted block for the current block.

[0421] The reconstruction unit 314 is configured to obtain a reconstructed image of the current block based on the predicted block of the current block.

[0422] In this embodiment, since 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, thus occupying less storage space on the video decoder.

[0423] Accordingly, embodiments of the present invention further provide a video encoder comprising an entropy coding unit 270 configured to acquire a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes syntax element 3 or syntax element 4 in the current block, the entropy coding unit is configured to acquire a context model corresponding to the syntax element to be entropy coded, wherein the context model corresponding to syntax element 3 in the current block is determined from a pre-configured set of context models, or the context model corresponding to syntax element 4 in the current block is determined from a pre-configured set of context models, the entropy coding unit comprises an entropy coding unit configured to perform entropy coding with respect to the syntax element to be entropy coded based on the context model corresponding to the syntax element to be entropy coded in the current block, and an output 272 configured to output a bitstream containing the syntax element in the current block that is acquired 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 shown in Figure 12. In this embodiment, syntax element 3 and syntax element 4 in the current block share one context model, so the video encoder needs to store only one context model for syntax element 3 and syntax element 4, occupying less storage space on the video encoder.

[0424] Embodiment 1 of the present invention proposes that affine_merge_flag and affine_inter_flag share one set of contexts (the set contains three contexts), and that 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 two syntax elements in the left-adjacent block of the current decryption block and the value obtained by performing an OR operation on two syntax elements in the upper-adjacent block of the current decryption block, as shown in Table 4, where "|" represents 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 3.

[0425] Embodiment 2 of the present invention proposes that affine_merge_flag and affine_inter_flag share one set of contexts (the set contains two contexts), and that 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 two syntax elements in the left-adjacent block of the current decryption block and the value obtained by performing an OR operation on two syntax elements in the upper-adjacent block of the current decryption block, as shown in Table 5, where "|" represents 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] Embodiment 3 of the present invention proposes that affine_merge_flag and affine_inter_flag share a single context. In Embodiment 3 of the present invention, the number of affine_merge_flag contexts and the number of affine_inter_flag contexts are reduced to 1.

[0427] In the prior art, binary coding is performed on merge_idx and affine_merge_idx by using truncated unary codes, and two different context sets (each containing 5 contexts) are used in CABAC, with a different context 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 a single set of contexts (each set of contexts contains 5 contexts). In Embodiment 4 of the present invention, the number of contexts for merge_idx and affine_merge_idx is reduced to 5.

[0429] In some other technologies, 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 a subblock-based merge mode is currently being used for a 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, namely subblock_merge_flag and affine_inter_flag share one context set (or context) and one index retrieval method, and merge_idx and subblock_merge_idx share one context set (or context).

[0431] Embodiments of the present invention further provide a video decoder including an execution circuit configured to perform any of the above methods.

[0432] Embodiments of the present invention further provide a video decoder comprising 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 stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, the video decoder is capable of operating to perform any of the above methods.

[0433] Embodiments of the present invention further provide a computer-readable storage medium configured to store a computer program that can be executed by a processor. When the computer program is executed by at least one processor, any of the above methods is performed.

[0434] Embodiments of the present invention further provide a computer program. When the computer program is executed, any of the above methods is performed.

[0435] In one or more of the examples described above, the functions described can be implemented by hardware, software, firmware, or any combination thereof. If implemented by software, the functions can be stored or transmitted on a computer-readable medium and executed by a hardware-based processing unit as one or more instructions or codes. Computer-readable media may include computer-readable storage media or communication media corresponding to tangible media such as data storage media. Communication media include, for example, any medium that facilitates the transfer of computer programs from one location to another according to a communication protocol. Thus, computer-readable media can generally correspond to (1) non-temporary 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, codes, and / or data structures for implementing the technologies described in this invention. Computer program products may include computer-readable media.

[0436] Such computer-readable storage media may include, but are not limited to, computer-readable storage media, such as RAM, ROM, EEPROM, CD-ROM, or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other media that can be used to store program code required in the form of instructions or data structures and that can be accessed by a computer. Furthermore, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source by coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of a medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals, or any other temporary media, and are actually directed toward non-temporary, tangible storage media. As used herein, discs and optical discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy discs, and Blu-ray discs. Discs generally reproduce data magnetically, while optical discs reproduce data optically using a laser. Any combination of the above should fall within the range of computer-readable media.

[0437] Instructions can be executed by one or more processors, which may be, for example, 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 individual logic circuits. Thus, the term “processor” as used herein may refer to any one of the aforementioned structures or other structures applicable to the implementation of the technology described herein. Furthermore, in some embodiments, the functions described herein may be provided within dedicated hardware and / or software modules configured to perform encoding and decoding, or incorporated into a combined codec. Furthermore, the technology may be fully implemented by one or more circuits or logic elements.

[0438] The technology of this disclosure may be implemented in multiple devices or apparatus, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). To highlight the capabilities of devices configured to perform the disclosed technology, various components, modules, or units are described in this disclosure, which do not necessarily have to be implemented by different hardware units. In practice, as described above, the various units may be combined within a codec hardware unit with appropriate software and / or firmware, or they may be provided by a set of interoperable hardware units. A hardware unit includes one or more processors as described above.

Claims

1. Video decoding method: A step of analyzing a received bitstream to obtain information corresponding to the syntax element and quantization coefficient to be entropy-decoded in the current block, wherein the syntax element to be entropy-decoded includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy-decoded; A step of performing entropy decoding with respect to the syntax element to be entropy decoded, based on the first context model described above; A step of obtaining the quantization coefficient based on the aforementioned information; A step of performing inverse quantization with respect to the quantization coefficient to obtain the inverse quantization coefficient; A step of performing a prediction process with respect to the current block based on a third syntax element in the current block that is based on entropy decoding, in order to obtain a predicted block of the current block; and A step of obtaining a reconstructed image of the current block based on the predicted block and the inverse quantization coefficient; The second context model, which includes the first syntax element, is: A method based on a pre-configured set of context models, wherein the first context index of the first syntax element is determined based on the fourth and fifth syntax elements in the left-adjacent block of the current block and the sixth and seventh syntax elements in the upper-adjacent block of the current block, and the first context index represents the second context model.

2. A video decoding method, comprising: A step of analyzing a received bitstream to obtain information corresponding to the syntax element and quantization coefficient to be entropy-decoded in the current block, wherein the syntax element to be entropy-decoded includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy-decoded; A step of performing entropy decoding with respect to the syntax element to be entropy decoded, based on the first context model described above; A step of obtaining the quantization coefficient based on the aforementioned information; A step of performing inverse quantization with respect to the quantization coefficient to obtain the inverse quantization coefficient; A step of performing a prediction process with respect to the current block based on a third syntax element in the current block that is based on entropy decoding, in order to obtain a predicted block of the current block; and A step of obtaining a reconstructed image of the current block based on the predicted block and the inverse quantization coefficient; The third context model, which includes the aforementioned second syntax element, is: A method based on a set of predefined context models, wherein the second context index of the second syntax element in the current block is determined based on the fourth and fifth syntax elements in the left adjacent block of the current block and the sixth and seventh syntax elements in the upper adjacent block of the current block, and the second context index represents the third context model.

3. A video decoding method, comprising: A step of analyzing a received bitstream to obtain information corresponding to the syntax element and quantization coefficient to be entropy-decoded in the current block, wherein the syntax element to be entropy-decoded includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy-decoded; A step of performing entropy decoding with respect to the syntax element to be entropy decoded, based on the first context model described above; A step of obtaining the quantization coefficient based on the aforementioned information; A step of performing inverse quantization with respect to the quantization coefficient to obtain the inverse quantization coefficient; A step of performing a prediction process with respect to the current block based on a third syntax element in the current block that is based on entropy decoding, in order to obtain a predicted block of the current block; and A step of obtaining a reconstructed image of the current block based on the predicted block and the inverse quantization coefficient; The first syntax element is a first flag indicating whether an affine motion model-based merge mode is used for the current block, or The method 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.

4. A video decoding method, comprising: A step of analyzing a received bitstream to obtain information corresponding to the syntax element and quantization coefficient to be entropy-decoded in the current block, wherein the syntax element to be entropy-decoded includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy-decoded; A step of performing entropy decoding with respect to the syntax element to be entropy decoded, based on the first context model described above; A step of obtaining the quantization coefficient based on the aforementioned information; A step of performing inverse quantization with respect to the quantization coefficient to obtain the inverse quantization coefficient; A step of performing a prediction process with respect to the current block based on a third syntax element in the current block that is based on entropy decoding, in order to obtain a predicted block of the current block; and A step of obtaining a reconstructed image of the current block based on the predicted block and the inverse quantization coefficient; The first syntax element is a first flag indicating whether a subblock-based merge mode is used for the current block, or The method 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.

5. Non-temporary memory storage configured to store video data in the form of a bitstream, wherein the bitstream includes syntax elements to be entropy-decoded from the current block, and the syntax elements to be entropy-decoded include a first syntax element or a second syntax element; and A video decoder coupled to the non-temporary memory storage and configured to perform the method described in any one of claims 1 to 4; A video decoding device that includes this.

6. A video encoding device comprising one or more processors coupled to one or more memories and configured to execute programming instructions, wherein the programming instructions are: A step to obtain quantization coefficients by performing quantization; A step of obtaining a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy encoded; A step of performing entropy coding with respect to the syntax element to be entropy coded based on the first context model; and A step of generating a bitstream, wherein the bitstream includes information corresponding to the quantization coefficients and includes an entropy-encoded syntax element corresponding to the syntax element to be entropy-encoded; This causes the one or more processors to further: A video encoding device that determines a first context index for the first syntax element based on a third and fourth syntax element in the left-adjacent block of the current block and a fifth and sixth syntax element in the upper-adjacent block of the current block, wherein the first context index indicates a second context model corresponding to the first syntax element and is based on a pre-configured set of context models.

7. A video encoding device comprising one or more processors coupled to one or more memories and configured to execute programming instructions, wherein the programming instructions are: A step to obtain quantization coefficients by performing quantization; A step of obtaining a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy encoded; A step of performing entropy coding with respect to the syntax element to be entropy coded based on the first context model; and A step of generating a bitstream, wherein the bitstream includes information corresponding to the quantization coefficients and includes an entropy-encoded syntax element corresponding to the syntax element to be entropy-encoded; This causes the one or more processors to further: A video encoding device that determines a second context index for the second syntax element based on the third and fourth syntax elements in the left-adjacent block of the current block and the fifth and sixth syntax elements in the upper-adjacent block of the current block, wherein the second context index indicates a third context model corresponding to the second syntax element and is based on a pre-configured set of context models.

8. A video encoding device comprising one or more processors coupled to one or more memories and configured to execute programming instructions, wherein the programming instructions are: A step to obtain quantization coefficients by performing quantization; A step of obtaining a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy encoded; A step of performing entropy coding with respect to the syntax element to be entropy coded based on the first context model; and A step of generating a bitstream, wherein the bitstream includes information corresponding to the quantization coefficients and includes an entropy-encoded syntax element corresponding to the syntax element to be entropy-encoded; This causes the following to occur, and the first syntax element is a first flag indicating whether or not an affine motion model-based merge 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.

9. A video encoding device comprising one or more processors coupled to one or more memories and configured to execute programming instructions, wherein the programming instructions are: A step to obtain quantization coefficients by performing quantization; A step of obtaining a syntax element to be entropy coded in the current block, wherein the syntax element to be entropy coded in the current block includes a first syntax element or a second syntax element; Steps include obtaining a first context model corresponding to the syntax element to be entropy encoded; A step of performing entropy coding with respect to the syntax element to be entropy coded based on the first context model; and A step of generating a bitstream, wherein the bitstream includes information corresponding to the quantization coefficients and includes an entropy-encoded syntax element corresponding to the syntax element to be entropy-encoded; This causes the following to occur, and the first syntax element is a first flag indicating whether or not a subblock-based merge 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.

10. A video encoding device according to any one of claims 6 to 9; and A transmitter configured to be coupled to the video encoding device and to transmit the bitstream; Video transmission devices including...