ref: b5bf7b13a83fc6fccafec1611410910eb78155a9
parent: 2319b7aaf17b7efe143862bf0569fe8c9efd9d1f
author: Yunqing Wang <yunqingwang@google.com>
date: Tue Jun 18 13:09:50 EDT 2013
Add two-pass quantization Optimized the quantization function by making it a two-pass process. The first pass does a quick checking of the transform coefficients against the base ZBIN, and only keep the good enough set of coefficients for quantization. A skipping check is added. If all coefficients are within the base ZBIN, no quantization is needed. The second pass is the actual quantization pass, which only processes the coefficient subset determined in first pass. This reduces the computation. Furthermore, an alternitive method is used for large transform size, which often has sparse nonzero quantized coefficients. Overall, the encoder speedup is about 4%. The quantization function itself gets 20% faster. Change-Id: I3a9dd0da6db030260b6d9c314a9fa48ecae89f22