An image decoding method performed by a decoding apparatus operating according to the versatile video coding, VVC, standard, the method comprising: receiving (S1000) residual information for a current block; deriving (S1010) a context index for a sign flag of a current residual coefficient in a current sub-block of the current block; decoding (S1020) the sign flag based on the context index; deriving (S1030) the current residual coefficient based on the sign flag; deriving (S1040) a residual sample based on the current residual coefficient; and generating (S1050) a reconstructed picture based on the residual sample, wherein it is determined whether the current block is a transform skip block, and based on the current block being the transform skip block, sign flags of residual coefficients of the current block including the current residual coefficient are context-based decoded, characterized in that the context index for the sign flag is derived based on a sign flag of a residual coefficient decoded prior to the current residual coefficient in the current sub-block, wherein a value of the context index is derived as 0, based on the current residual coefficient being a first residual coefficient in scan order in the current sub-block, wherein, when a value of the sign flag of the residual coefficient decoded prior to the current residual coefficient is 0, a value of the context index for the sign flag of the current residual coefficient is derived as 0, wherein, when the value of the sign flag of the residual coefficient decoded prior to the current residual coefficient is 1, a value of the context index for the sign flag of the current residual coefficient is derived as 1. receiving (S1000) residual information for a current block; deriving (S1010) a context index for a sign flag of a current residual coefficient in a current sub-block of the current block; decoding (S1020) the sign flag based on the context index; deriving (S1030) the current residual coefficient based on the sign flag; deriving (S1040) a residual sample based on the current residual coefficient; and generating (S1050) a reconstructed picture based on the residual sample, wherein it is determined whether the current block is a transform skip block, and based on the current block being the transform skip block, sign flags of residual coefficients of the current block including the current residual coefficient are context-based decoded, characterized in that the context index for the sign flag is derived based on a sign flag of a residual coefficient decoded prior to the current residual coefficient in the current sub-block, wherein a value of the context index is derived as 0, based on the current residual coefficient being a first residual coefficient in scan order in the current sub-block, wherein, when a value of the sign flag of the residual coefficient decoded prior to the current residual coefficient is 0, a value of the context index for the sign flag of the current residual coefficient is derived as 0, wherein, when the value of the sign flag of the residual coefficient decoded prior to the current residual coefficient is 1, a value of the context index for the sign flag of the current residual coefficient is derived as 1. <EOS>