mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Enable lossless encoder code
Remove USE_LOSSLESS_ENCODER compile flag Update Makefile.am and makefile.unix Change-Id: If7080c4d8f37994c7c784730c5e547bb0a851455
This commit is contained in:
@ -12,9 +12,12 @@ libwebputils_la_SOURCES += filters.c
|
||||
libwebputils_la_SOURCES += filters.h
|
||||
libwebputils_la_SOURCES += huffman.c
|
||||
libwebputils_la_SOURCES += huffman.h
|
||||
libwebputils_la_SOURCES += huffman_encode.c
|
||||
libwebputils_la_SOURCES += huffman_encode.h
|
||||
libwebputils_la_SOURCES += quant_levels.c
|
||||
libwebputils_la_SOURCES += quant_levels.h
|
||||
libwebputils_la_SOURCES += rescaler.c
|
||||
libwebputils_la_SOURCES += rescaler.h
|
||||
libwebputils_la_SOURCES += thread.c
|
||||
libwebputils_la_SOURCES += thread.h
|
||||
|
||||
|
@ -187,7 +187,6 @@ void VP8BitWriterWipeOut(VP8BitWriter* const bw) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_LOSSLESS_ENCODER
|
||||
//------------------------------------------------------------------------------
|
||||
// VP8LBitWriter
|
||||
|
||||
@ -265,8 +264,6 @@ void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
|
@ -64,7 +64,6 @@ static WEBP_INLINE size_t VP8BitWriterSize(const VP8BitWriter* const bw) {
|
||||
return bw->pos_;
|
||||
}
|
||||
|
||||
#ifdef USE_LOSSLESS_ENCODER
|
||||
//------------------------------------------------------------------------------
|
||||
// VP8LBitWriter
|
||||
// TODO(vikasa): VP8LBitWriter is copied as-is from lossless code. There's scope
|
||||
@ -116,7 +115,6 @@ void VP8LBitWriterDestroy(VP8LBitWriter* const bw);
|
||||
void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
} // extern "C"
|
||||
|
@ -39,7 +39,6 @@ static WEBP_INLINE void VP8LColorCacheInsert(const VP8LColorCache* const cc,
|
||||
cc->colors_[key] = argb;
|
||||
}
|
||||
|
||||
#ifdef USE_LOSSLESS_ENCODER
|
||||
static WEBP_INLINE int VP8LColorCacheGetIndex(const VP8LColorCache* const cc,
|
||||
uint32_t argb) {
|
||||
return (kHashMul * argb) >> cc->hash_shift_;
|
||||
@ -50,7 +49,6 @@ static WEBP_INLINE int VP8LColorCacheContains(const VP8LColorCache* const cc,
|
||||
const uint32_t key = (kHashMul * argb) >> cc->hash_shift_;
|
||||
return cc->colors_[key] == argb;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
//
|
||||
// Flate-like entropy encoding (Huffman) for webp lossless.
|
||||
|
||||
#ifdef USE_LOSSLESS_ENCODER
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -438,5 +436,3 @@ int VP8LCreateHuffmanTree(int* const histogram, int tree_depth_limit,
|
||||
ConvertBitDepthsToSymbols(tree);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -12,8 +12,6 @@
|
||||
#ifndef WEBP_UTILS_HUFFMAN_ENCODE_H_
|
||||
#define WEBP_UTILS_HUFFMAN_ENCODE_H_
|
||||
|
||||
#ifdef USE_LOSSLESS_ENCODER
|
||||
|
||||
#include "../webp/types.h"
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
@ -46,6 +44,4 @@ int VP8LCreateHuffmanTree(int* const histogram, int tree_depth_limit,
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // WEBP_UTILS_HUFFMAN_ENCODE_H_
|
||||
|
Reference in New Issue
Block a user