Enable lossless encoder code

Remove USE_LOSSLESS_ENCODER compile flag
Update Makefile.am and makefile.unix

Change-Id: If7080c4d8f37994c7c784730c5e547bb0a851455
This commit is contained in:
Pascal Massimino
2012-06-12 23:44:09 -07:00
parent 26bf223280
commit 78f3e34504
21 changed files with 7 additions and 95 deletions

View File

@ -21,9 +21,6 @@ extern "C" {
#include "../dec/vp8li.h"
#include "../dsp/yuv.h"
#include "../dsp/dsp.h"
#ifdef USE_LOSSLESS_ENCODER
#include "../enc/histogram.h"
// A lookup table for small values of log(int) to be used in entropy
@ -135,8 +132,6 @@ float VP8LFastLog(int v) {
return (float)log(v);
}
#endif
//------------------------------------------------------------------------------
// Image transforms.
@ -288,7 +283,6 @@ static const PredictorFunc kPredictors[16] = {
Predictor0, Predictor0 // <- padding security sentinels
};
#ifdef USE_LOSSLESS_ENCODER
// TODO(vikasa): Replace 256 etc with defines.
static double PredictionCostSpatial(const int* counts,
int weight_0, double exp_val) {
@ -484,8 +478,6 @@ void VP8LResidualImage(int width, int height, int bits,
}
}
#endif
// Inverse prediction.
static void PredictorInverseTransform(const VP8LTransform* const transform,
int y_start, int y_end, uint32_t* data) {
@ -537,7 +529,6 @@ static void PredictorInverseTransform(const VP8LTransform* const transform,
}
}
#ifdef USE_LOSSLESS_ENCODER
void VP8LSubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixs) {
int i;
for (i = 0; i < num_pixs; ++i) {
@ -548,7 +539,6 @@ void VP8LSubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixs) {
argb_data[i] = (argb & 0xff00ff00) | (new_r << 16) | new_b;
}
}
#endif
// Add green to blue and red channels (i.e. perform the inverse transform of
// 'subtract green').
@ -623,7 +613,6 @@ static WEBP_INLINE uint32_t TransformColor(const Multipliers* const m,
return (argb & 0xff00ff00u) | (new_red << 16) | (new_blue);
}
#ifdef USE_LOSSLESS_ENCODER
static WEBP_INLINE int SkipRepeatedPixels(const uint32_t* const argb,
int ix, int xsize) {
const uint32_t v = argb[ix];
@ -862,7 +851,6 @@ void VP8LColorSpaceTransform(int width, int height, int bits, int step,
}
}
}
#endif
// Color space inverse transform.
static void ColorSpaceInverseTransform(const VP8LTransform* const transform,

View File

@ -33,7 +33,6 @@ void VP8LInverseTransform(const struct VP8LTransform* const transform,
int row_start, int row_end,
const uint32_t* const in, uint32_t* const out);
#ifdef USE_LOSSLESS_ENCODER
// Subtracts green from blue and red channels.
void VP8LSubtractGreenFromBlueAndRed(uint32_t* argb_data, int num_pixs);
@ -43,7 +42,6 @@ void VP8LResidualImage(int width, int height, int bits,
void VP8LColorSpaceTransform(int width, int height, int bits, int step,
uint32_t* const argb, uint32_t* image);
#endif
//------------------------------------------------------------------------------
// Color space conversion.
@ -61,7 +59,6 @@ static WEBP_INLINE uint32_t VP8LSubSampleSize(uint32_t size,
return (size + (1 << sampling_bits) - 1) >> sampling_bits;
}
#ifdef USE_LOSSLESS_ENCODER
// Faster logarithm for small integers, with the property of log(0) == 0.
float VP8LFastLog(int v);
@ -73,7 +70,6 @@ static WEBP_INLINE uint32_t VP8LSubPixels(uint32_t a, uint32_t b) {
0xff00ff00u + (a & 0x00ff00ffu) - (b & 0x00ff00ffu);
return (alpha_and_green & 0xff00ff00u) | (red_and_blue & 0x00ff00ffu);
}
#endif
//------------------------------------------------------------------------------