Don't allocate VP8LHashChain, but treat like automatic object

the unique instance of VP8LHashChain (1MB size corresponding to hash_to_first_index_)
is now wholy part of VP8LEncoder, instead of maintaining the pointer to VP8LHashChain
in the encoder.

Change-Id: Ib6fe52019fdd211fbbc78dc0ba731a4af0728677
This commit is contained in:
skal
2014-04-30 14:10:48 -07:00
parent b7f19b8311
commit d3bcf72bf5
4 changed files with 39 additions and 38 deletions

View File

@ -130,8 +130,9 @@ struct VP8LHashChain {
int size_;
};
VP8LHashChain* VP8LHashChainNew(int size);
void VP8LHashChainDelete(VP8LHashChain* const p);
// Must be called first, to set size.
int VP8LHashChainInit(VP8LHashChain* const p, int size);
void VP8LHashChainClear(VP8LHashChain* const p); // release memory
typedef struct VP8LBackwardRefs VP8LBackwardRefs;
struct VP8LBackwardRefs {