Move token_cache from cost_coeffs to MACROBLOCK
authorJingning Han <jingning@google.com>
Fri, 11 Oct 2013 18:26:32 +0000 (11:26 -0700)
committerJingning Han <jingning@google.com>
Mon, 14 Oct 2013 17:45:56 +0000 (10:45 -0700)
commitf60a3910c4ab7725dc6dd54877bbdd3ed5f0e187
tree9138aaf83d0cea432f63ba1333e4301f28a727f4
parent4c20bff9d25f3a76442002d418d2fd04c74bbdab
Move token_cache from cost_coeffs to MACROBLOCK

This commit moves token_cache buffer into macroblock struct, instead
of defining as a local variable in cost_coeffs. This avoids repeatedly
re-allocating memory space in the rate-distortion optimization loop.

The runtime at speed 0 reduces:
bus 2000kbps, 161692ms to 159951ms
football 600kbps, 229505ms to 225821ms

Change-Id: If7da6b0b6d8c5138a16271a33c4548fba33d8840
vp9/encoder/vp9_block.h
vp9/encoder/vp9_rdopt.c