Method and apparatus for deriving rice parameter in video/image coding system
A video decoding method performed by a decoding apparatus comprises the steps of: acquiring, from a bitstream, residual information for a current transform block, wherein the residual information includes at least one of information indicating a level value of a target transform coefficient within the current transform block or information indicating a residual level value; based on a neighboring transform coefficient of the target transform coefficient, deriving a rice parameter for at least one of the information indicating the level value of the target transform coefficient or the information indicating the residual level value; based on the rice parameter, deriving a bin string for at least one of the information indicating the level value of the target transform coefficient or the information indicating the residual level value; and based on the bin string, deriving the level value of the target transform coefficient.
1. A video decoding method performed by a decoding apparatus, the method comprising:
obtaining residual information for a current transform block from a bitstream, the residual information including at least one of information representing a level value of a target transform coefficient in the current transform block or information representing a residual level value;
deriving a Rice parameter for at least one of the information representing the level value of the target transform coefficient or the information representing the residual level value based on a neighboring transform coefficient of the target transform coefficient;
deriving a bin string for at least one of the information representing the level value of the target transform coefficient or the information representing the residual level value based on the Rice parameter; and
deriving the level value of the target transform coefficient based on the bin string,
wherein the deriving the Rice parameter comprises:
deriving a number of available neighboring transform coefficients for the target transform coefficient;
deriving a sum of level values of the available neighboring transform coefficients; and
deriving the Rice parameter based on a difference value between the sum of the level values of the available neighboring transform coefficients and a product between a base level and the number of the available neighboring transform coefficients.
2. The video decoding method of claim 1 , wherein the information representing the level value of the transform coefficient corresponds to a dec_abs_level syntax element, and the information representing the residual level value corresponds to an abs_remainder syntax element.
3. The video decoding method of claim 1 , wherein based on that the neighboring transform coefficient is present within a boundary of the current transform block and is present within an effective area after high-frequency zeroing, the neighboring transform coefficient is determined to be available.
4. The video decoding method of claim 1 , wherein the sum of the level values of the available neighboring transform coefficients is equal to or larger than 0 and equal to or smaller than 31.
5. The video decoding method of claim 1 , wherein based on that the current transform block is not a transform skip block, the number of the available neighboring transform coefficients has an integer value that is equal to or smaller than 5.
6. The video decoding method of claim 5 , wherein if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 0 and equal to or smaller than 6, a value of the Rice parameter is 0, if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 7 and equal to or smaller than 13, the value of the Rice parameter is 1, if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 14 and equal to or smaller than 27, the value of the Rice parameter is 2, and if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 28 and equal to or smaller than 31, the value of the Rice parameter is 3.
7. The video decoding method of claim 1 , wherein based on that the current transform block is a transform skip block, the number of the available neighboring transform coefficients has an integer value that is equal to or smaller than 2.
8. The video decoding method of claim 7 , wherein if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 0 and equal to or smaller than 11, a value of the Rice parameter is 0, if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 12 and equal to or smaller than 24, the value of the Rice parameter is 1, and if the sum of the level values of the available neighboring transform coefficients is equal to or larger than 25 and equal to or smaller than 31, the value of the Rice parameter is 2.
9. The video decoding method of claim 7 , wherein the available neighboring transform coefficient is a transform coefficient that is present within a boundary of the current transform block between a transform coefficient adjacent to a left side of the target transform coefficient and a transform coefficient adjacent to a top side of the target transform coefficient.
10. A video encoding method performed by an encoding apparatus, the method comprising:
generating at least one of information representing a level value of a target transform coefficient in a current transform block or information representing a residual level value;
deriving a Rice parameter for at least one of the information representing the level value of the target transform coefficient or the information representing the residual level value based on a neighboring transform coefficient of the target transform coefficient;
deriving a bin string for at least one of the information representing the level value of the target transform coefficient or the information representing the residual level value based on the Rice parameter; and
encoding the bin string,
wherein the deriving the Rice parameter comprises:
deriving a number of available neighboring transform coefficients for the target transform coefficient;
deriving a sum of level values of the available neighboring transform coefficients; and
deriving the Rice parameter based on a difference value between the sum of the level values of the available neighboring transform coefficients and a product between a base level and the number of the available neighboring transform coefficients.
11. The video encoding method of claim 10 , wherein the information representing the level value of the transform coefficient corresponds to a dec_abs_level syntax element, and the information representing the residual level value corresponds to an abs_remainder syntax element.
12. The video encoding method of claim 10 , wherein based on that the neighboring transform coefficient is present within a boundary of the current transform block and is present within an effective area after high-frequency zeroing, the neighboring transform coefficient is determined to be available.
13. A method for transmitting a bitstream generated by an image encoding method, the image encoding method comprising:
generating at least one of information representing a level value of a target transform coefficient in a current transform block or information representing a residual level value;
deriving a Rice parameter for at least one of the information representing the level value of the target transform coefficient or the information representing the residual level value based on a neighboring transform coefficient of the target transform coefficient;
deriving a bin string for at least one of the information representing the level value of the target transform coefficient or the information representing the residual level value based on the Rice parameter; and
encoding the bin string,
wherein the deriving the Rice parameter comprises:
deriving a number of available neighboring transform coefficients for the target transform coefficient;
deriving a sum of level values of the available neighboring transform coefficients; and
deriving the Rice parameter based on a difference value between the sum of the level values of the available neighboring transform coefficients and a product between a base level and the number of the available neighboring transform coefficients.