Patent attributes
A video encoder identifies one or more AC coefficients of each of plural blocks in the picture. The encoder identifies a threshold quantization step size such that the identified AC coefficient(s) of each of the plural blocks are nonzero after quantization according to the threshold quantization step size. The threshold quantization step size is such that quantization according to the next higher quantization step size would result in at least one of the identified AC coefficient(s) of at least one of the plural blocks being zero. For example, identifying the threshold quantization step size comprises identifying n top AC coefficients in each of four blocks of a macroblock, determining the smallest AC coefficient among the identified n top AC coefficients of the four blocks, and iteratively evaluating the smallest AC coefficient with respect to candidate quantization step sizes until the threshold quantization step size is identified.