create a libwebputils under src/utils

with bit_reader bit_writer and thread for now.

Change-Id: If961933fcfc43e60220913fe4d527230ba8f46bb
This commit is contained in:
Pascal Massimino
2011-09-07 09:26:35 +00:00
committed by James Zern
parent ee697d9fc9
commit b112e83647
16 changed files with 76 additions and 53 deletions

View File

@ -1,4 +1,4 @@
SUBDIRS = dec enc dsp
SUBDIRS = dec enc dsp utils
AM_CPPFLAGS = -I$(top_srcdir)/src
lib_LTLIBRARIES = libwebp.la
@ -6,6 +6,7 @@ lib_LTLIBRARIES = libwebp.la
libwebp_la_SOURCES =
libwebp_la_LIBADD = dec/libwebpdecode.la \
enc/libwebpencode.la \
utils/libwebputils.la \
dsp/libwebpdsp.la
libwebp_la_LDFLAGS = -version-info 0:0:0
libwebpinclude_HEADERS = webp/types.h webp/decode.h webp/decode_vp8.h \

View File

@ -1,16 +1,13 @@
AM_CPPFLAGS = -I$(top_srcdir)/src
libwebpdecode_la_SOURCES = bits.h vp8i.h bits.c frame.c \
quant.c tree.c vp8.c webp.c idec.c alpha.c \
layer.c io.c buffer.c thread.c
libwebpdecode_la_SOURCES = vp8i.h webpi.h \
frame.c quant.c tree.c vp8.c webp.c \
idec.c alpha.c layer.c io.c buffer.c
libwebpdecode_la_LDFLAGS = -version-info 0:0:0
libwebpdecode_la_CPPFLAGS = $(USE_EXPERIMENTAL_CODE)
libwebpdecodeinclude_HEADERS = ../webp/decode.h ../webp/decode_vp8.h ../webp/types.h
libwebpdecodeincludedir = $(includedir)/webp
noinst_HEADERS = bits.h vp8i.h webpi.h thread.h
noinst_HEADERS = vp8i.h webpi.h
noinst_LTLIBRARIES = libwebpdecode.la
# uncomment the following line (and comment the above) if you want
# to install libwebpdecode library.
#lib_LTLIBRARIES = libwebpdecode.la

View File

@ -13,8 +13,8 @@
#define WEBP_DEC_VP8I_H_
#include <string.h> // for memcpy()
#include "./bits.h"
#include "./thread.h"
#include "../utils/bit_reader.h"
#include "../utils/thread.h"
#include "../dsp/dsp.h"
#if defined(__cplusplus) || defined(c_plusplus)
@ -366,4 +366,4 @@ int VP8DecodeLayer(VP8Decoder* const dec);
} // extern "C"
#endif
#endif // WEBP_DEC_VP8I_H_
#endif /* WEBP_DEC_VP8I_H_ */

View File

@ -1,7 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/src
libwebpencode_la_SOURCES = analysis.c bit_writer.c bit_writer.h \
config.c cost.c cost.h filter.c \
libwebpencode_la_SOURCES = analysis.c config.c cost.c cost.h filter.c \
frame.c iterator.c picture.c quant.c \
syntax.c tree.c vp8enci.h webpenc.c alpha.c \
layer.c
@ -10,5 +9,5 @@ libwebpencode_la_CPPFLAGS = $(USE_EXPERIMENTAL_CODE)
libwebpencodeinclude_HEADERS = ../webp/encode.h ../webp/types.h
libwebpencodeincludedir = $(includedir)/webp
noinst_HEADERS = cost.h bit_writer.h vp8enci.h
noinst_HEADERS = cost.h vp8enci.h
noinst_LTLIBRARIES = libwebpencode.la

View File

@ -15,7 +15,7 @@
#include "string.h" // for memcpy()
#include "../webp/encode.h"
#include "../dsp/dsp.h"
#include "bit_writer.h"
#include "../utils/bit_writer.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@ -457,4 +457,4 @@ extern void VP8AdjustFilterStrength(VP8EncIterator* const it);
} // extern "C"
#endif
#endif // WEBP_ENC_VP8ENCI_H_
#endif /* WEBP_ENC_VP8ENCI_H_ */

13
src/utils/Makefile.am Normal file
View File

@ -0,0 +1,13 @@
AM_CPPFLAGS = -I$(top_srcdir)/src
libwebputils_la_SOURCES = bit_reader.h bit_reader.c \
bit_writer.h bit_writer.c \
thread.h thread.c
libwebputils_la_LDFLAGS = -version-info 0:0:0
libwebputils_la_CPPFLAGS = $(USE_EXPERIMENTAL_CODE)
libwebputilsinclude_HEADERS = ../webp/types.h
libwebputilsincludedir = $(includedir)/webp
noinst_HEADERS = bit_reader.h bit_writer.h thread.h
noinst_LTLIBRARIES = libwebputils.la

View File

@ -9,7 +9,7 @@
//
// Author: Skal (pascal.massimino@gmail.com)
#include "bits.h"
#include "./bit_reader.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {

View File

@ -9,8 +9,8 @@
//
// Author: Skal (pascal.massimino@gmail.com)
#ifndef WEBP_DEC_BITS_H_
#define WEBP_DEC_BITS_H_
#ifndef WEBP_UTILS_BIT_READER_H_
#define WEBP_UTILS_BIT_READER_H_
#include <assert.h>
#include "../webp/decode_vp8.h"
@ -105,4 +105,4 @@ static inline int VP8GetSigned(VP8BitReader* const br, int v) {
} // extern "C"
#endif
#endif // WEBP_DEC_BITS_H_
#endif /* WEBP_UTILS_BIT_READER_H_ */

View File

@ -10,8 +10,9 @@
// Author: Skal (pascal.massimino@gmail.com)
#include <assert.h>
#include <string.h> // for memcpy()
#include <stdlib.h>
#include "vp8enci.h"
#include "./bit_writer.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {

View File

@ -9,8 +9,8 @@
//
// Author: Skal (pascal.massimino@gmail.com)
#ifndef WEBP_ENC_BIT_WRITER_H_
#define WEBP_ENC_BIT_WRITER_H_
#ifndef WEBP_UTILS_BIT_WRITER_H_
#define WEBP_UTILS_BIT_WRITER_H_
#include "../webp/types.h"
@ -60,4 +60,4 @@ static inline size_t VP8BitWriterSize(const VP8BitWriter* const bw) {
} // extern "C"
#endif
#endif // WEBP_ENC_BIT_WRITER_H_
#endif /* WEBP_UTILS_BIT_WRITER_H_ */

View File

@ -9,7 +9,8 @@
//
// Author: skal@google.com (Pascal Massimino)
#include "./vp8i.h"
#include <assert.h>
#include <string.h> // for memset()
#include "./thread.h"
#if defined(__cplusplus) || defined(c_plusplus)

View File

@ -9,8 +9,8 @@
//
// Author: skal@google.com (Pascal Massimino)
#ifndef WEBP_DEC_THREAD_H
#define WEBP_DEC_THREAD_H
#ifndef WEBP_UTILS_THREAD_H_
#define WEBP_UTILS_THREAD_H_
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@ -33,8 +33,8 @@ typedef struct {
#include <pthread.h>
#endif // _WIN32
#endif // WEBP_USE_THREAD
#endif /* _WIN32 */
#endif /* WEBP_USE_THREAD */
// State of the worker thread object
typedef enum {
@ -83,4 +83,4 @@ void WebPWorkerEnd(WebPWorker* const worker);
} // extern "C"
#endif
#endif // WEBP_DEC_THREAD_H
#endif /* WEBP_UTILS_THREAD_H_ */