Image encoding/decoding method and apparatus, and recording medium storing bitstream
An image decoding method is disclosed in the present specification. A method of decoding an image, the method may comprises determining whether to perform a context update for a first syntax element of a current block, updating, on the basis of the determination, a context for entropy decoding of the first syntax element and generating, on the basis of the updated context, a bin for the first syntax element, and wherein whether to perform the context update is determined on the basis of the number of pre-decoded predetermined syntax elements for the current block.
1. A video decoding method, comprising:
performing a determination on whether to perform an update on a context for a first syntax element of a current block;
performing the update on the context for entropy decoding of the first syntax element based on the determination; and
generating a bin for the first syntax element based on the context, wherein whether to perform the update on the context is determined based on the number of pre-decoded predetermined syntax elements for the current block.
2. The video decoding method of claim 1 , wherein the update on the context update for the first syntax element is not performed when a specific condition is satisfied in decoding one or more syntax elements of the current block.
3. The video decoding method of claim 1 , wherein whether or not to perform the update on the context for the first syntax element is determined according to a comparison between the number of pre-decoded predetermined syntax elements and a specific value.
4. The video decoding method of claim 1 , wherein a transform skip mode is applied to the current block.
5. The video decoding method of claim 1 , wherein the predetermined syntax elements are syntax elements related to a residual signal.
6. The video decoding method of claim 5 , wherein the predetermined syntax elements comprise sig_coeff_flag and par_level_flag.
7. A video encoding method, comprising:
generating a bin for a first syntax element of a current block by binarizing the first syntax element;
performing a determination on whether to perform an update on a context for the first syntax element;
performing the update on the context for entropy encoding of the first syntax element based on the determination; and
generating a bitstream for the current block by using the context and the bin,
wherein whether to perform the update on the context is determined based on the number of pre-encoded predetermined syntax elements for the current block.
8. The video encoding method of claim 7 , wherein the update on the context update for the first syntax element is not performed when a specific condition is satisfied in encoding one or more syntax elements of the current block.
9. The video encoding method of claim 7 , wherein whether or not to perform the update on the context for the first syntax element is determined according to a comparison between the number of pre-encoded predetermined syntax elements and a specific value.
10. The video encoding method of claim 7 , wherein a transform skip mode is applied to the current block.
11. The video encoding method of claim 7 , wherein the predetermined syntax elements are syntax elements related to a residual signal.
12. The video encoding method of claim 11 , wherein the predetermined syntax elements comprise sig_coeff_flag and par_level_flag.
13. A non-transitory computer-readable recording medium storing the bitstream generated by the video encoding method of claim 7 .
14. A non-transitory computer-readable recording medium storing a bitstream, the bitstream comprising:
a first syntax element of a current block, wherein
a determination on whether to perform an update on a context for the first syntax element of the current block is performed,
the update on the context for entropy decoding of the first syntax element is performed based on the determination; and
a bin for the first syntax element is generated based on the context, and
whether to perform the update on the context is determined based on the number of pre-decoded predetermined syntax elements for the current block.
15. The non-transitory computer-readable recording medium of claim 14 , wherein the update on the context update for the first syntax element is not performed when a specific condition is satisfied in decoding one or more syntax elements of the current block.
16. The non-transitory computer-readable recording medium of claim 14 , wherein whether or not to perform the update on the context for the first syntax element is determined according to a comparison between the number of pre-decoded predetermined syntax elements and a specific value.
17. The non-transitory computer-readable recording medium of claim 14 , wherein a transform skip mode is applied to the current block.
18. The non-transitory computer-readable recording medium of claim 14 , wherein the predetermined syntax elements are syntax elements related to a residual signal.
19. The non-transitory computer-readable recording medium of claim 18 , wherein the predetermined syntax elements comprise sig_coeff_flag and par_level_flag.