| CPC H04N 19/645 (2014.11) [H04N 19/176 (2014.11); H04N 19/18 (2014.11)] | 20 Claims |

|
1. A coding method implemented by an encoder of video data, the method comprising:
performing a first pass of scanning a plurality of transform coefficients of a sub-block of a video frame, wherein coding of the sub-block is executed by multiple passes of scanning of the sub-block including the first pass of scanning and a second pass of scanning, the first pass of scanning comprising:
determining whether a remaining number of context coded bins (MaxCcbs) being greater than or equal to 4; and
in response to the remaining number of context coded bins being greater than or equal to 4, performing:
coding a sig_coeff_flag for a current transform coefficient, the sig_coeff_flag indicating whether a level of the current transform coefficient is zero; and
in response to the level of the current transform coefficient being not zero, coding a coeff_sign_flag and an abs_level_gtx_flag[0] for the current transform coefficient, the coeff_sign_flag representing the sign of the level of the current transform coefficient and the abs_level_gtx_flag[0] representing the absolute value of the level of the current transform coefficient is greater than 1; and
performing the second pass of scanning the plurality of transform coefficients of the sub-block of the video frame, the second pass of scanning comprising:
in response to the abs_level_gtx_flag[0] for the current transform coefficient being equal to 1, coding an abs_level_gtx_flag[1] for the current transform coefficient, the abs_level_gtx_flag[1] indicating whether the absolute value of the level of the current transform coefficient is greater than 3;
in response to the abs_level_gtx_flag[1] for the current transform coefficient being equal to 1, coding an abs_level_gtx_flag[2] for the current transform coefficient, the abs_level_gtx_flag[2] indicating whether the absolute value of the level of the current transform coefficient is greater than 5;
in response to the abs_level_gtx_flag[2] for the current transform coefficient being equal to 1, coding an abs_level_gtx_flag[3] for the current transform coefficient, the abs_level_gtx_flag[3] indicating whether the absolute value of the level of the current transform coefficient is greater than 7; and
in response to the abs_level_gtx_flag[3] for the current transform coefficient being equal to 1, coding an abs_level_gtx_flag[4] for the current transform coefficient, the abs_level_gtx_flag[4] indicating whether the absolute value of the level of the current transform coefficient is greater than 9.
|