Remove TODOs from lossless encoder code.

histogram.c:
 - Verified (earlier) that there's low correlation between Red & Blue colors
   (particularly after applying Cross-color transform). The Bin based histogram
   merge, bins on three entropies viz literal, red & blue symbols. Removing
   either of blue or red increases the compression density. So keeping the bins
   for red & blue sybmols.
 - Keeping the compact bins method as-is. This way it's simpler to read.
huffman_encode.h: Added field comments for struct HuffmanTree and removed the TODO.

Change-Id: Ia76f7bc730079d1b3b644038c5d9931db3797f0e
This commit is contained in:
Vikas Arora 2014-11-12 15:21:29 -08:00
parent fdaac8e0ca
commit d69e36ec59
2 changed files with 2 additions and 6 deletions

View File

@ -435,7 +435,6 @@ static int GetBinIdForEntropy(double min, double max, double val) {
return (int)(NUM_PARTITIONS * delta / range);
}
// TODO(vikasa): Evaluate, if there's any correlation between red & blue.
static int GetHistoBinIndex(
const VP8LHistogram* const h, const DominantCostRange* const c) {
const int bin_id =
@ -524,8 +523,6 @@ static void HistogramAnalyzeEntropyBin(
// Compact the histogram set by moving the valid one left in the set to the
// head and moving the ones that have been merged to other histograms towards
// the end.
// TODO(vikasa): Evaluate if this method can be avoided by altering the code
// logic of HistogramCombineEntropyBin main loop.
static void HistogramCompactBins(VP8LHistogramSet* const image_histo) {
int start = 0;
int end = image_histo->size - 1;

View File

@ -34,10 +34,9 @@ typedef struct {
} HuffmanTreeCode;
// Struct to represent the Huffman tree.
// TODO(vikasa): Add comment for the fields of the Struct.
typedef struct {
uint32_t total_count_;
int value_;
uint32_t total_count_; // Symbol frequency.
int value_; // Symbol value.
int pool_index_left_; // Index for the left sub-tree.
int pool_index_right_; // Index for the right sub-tree.
} HuffmanTree;