Combine Huffman cost and bit entropy into one loop

The same computation was done for both values: go over two buffers,
sum them up, and take a decision on the sum at each iteration.

MIPS32 code has been disabled for now, pending a code update.

Change-Id: I997984326f7092b3dbb8cfa1e524bd8132b2ab9d
This commit is contained in:
Vincent Rabaud
2015-11-30 12:14:44 +01:00
committed by Pascal Massimino
parent a7a954c851
commit 829bd14145
2 changed files with 77 additions and 51 deletions

View File

@ -400,7 +400,13 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8LEncDspInitMIPS32(void) {
VP8LExtraCost = ExtraCost;
VP8LExtraCostCombined = ExtraCostCombined;
VP8LHuffmanCostCount = HuffmanCostCount;
// TODO(mips team): rewrite VP8LGetCombinedEntropy (which used to use
// HuffmanCostCombinedCount) with MIPS optimizations
#if 0
VP8LHuffmanCostCombinedCount = HuffmanCostCombinedCount;
#else
(void)HuffmanCostCombinedCount;
#endif
VP8LHistogramAdd = HistogramAdd;
}