Use pmovmskb to skip quantize loops over empty coefficients.
authorRonald S. Bultje <rbultje@google.com>
Mon, 1 Jul 2013 19:03:20 +0000 (12:03 -0700)
committerRonald S. Bultje <rbultje@google.com>
Tue, 2 Jul 2013 23:34:24 +0000 (16:34 -0700)
commite5fb4b61b66d188b3afed56f1e2548dd6e1a2074
tree805ad61f17ae17d50e4f9668576dc7f072d29da0
parent5b872402307b6a62ee4dbe93021c003ccf99a547
Use pmovmskb to skip quantize loops over empty coefficients.

If none of the 16 coefficients that we quantize per loop iteration
are larger than the zbin, directly skip to the next round of coeffs,
rather than doing a full quantize loop that will eventually result
in 16 zeroes. This incurs a jump cost, but saves a lot of other work.
32x32 quant goes from 1349 -> 1184 cycles. The same approach yielded
no significantly positive results for smaller transforms, so is not
used there (8x8: 103 -> 101 cycles; 16x16: 302 -> 306 cycles).

Change-Id: I8fca17dc2543fc8eed1dbcd5100145e3c3a9b647
vp9/encoder/x86/vp9_quantize_ssse3.asm