Patent ID: 9571836
Date: 2017-02-14
CPC Classifications: H04N

Claim:
1. A method for encoding transform coefficients, wherein a transform coefficient block comprises a plurality of sub-blocks, and each sub-block is in a fixed size with a set number of transform coefficients, the method comprising: encoding the transform coefficients in each sub-block according to a same predetermined order until the last sub-block of the transform coefficient block is encoded; for each sub-block, storing a map of non-zero transform coefficients, absolute values of the transform coefficients, and positive or negative signs of the non-zero transform coefficients obtained through the encoding, wherein the map of non-zero transform coefficients, the absolute values of the transform coefficients, and the positive or negative signs of the non-zero transform coefficients are all obtained according to the same predetermined order; and when the last sub-block is being encoded, after obtaining a map of non-zero transform coefficients of the last sub-block, encoding the stored maps of non-zero transform coefficients of previously encoded sub-blocks and the map of non-zero transform coefficients of the last sub-block into a bit stream; and after obtaining the absolute values of the transform coefficients and the positive or negative signs of the non-zero transform coefficients of the last sub-block, encoding the stored absolute values of transform coefficients and positive or negative signs of the non-zero transform coefficients of the previously encoded sub-blocks and the absolute values of the transform coefficients and positive or negative signs of the non-zero transform coefficients of the last sub-block into the bit stream; wherein the predetermined order is a scan order in a narrow-range scan mode, and wherein the size of the sub-blocks is 4×4 with the set number of 16 transform coefficients.