mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
move imageio/example_util.[hc] (back to) examples/
decoding and file i/o have been split to imageio, all that remains is some string routines used for parameter parsing in the examples Change-Id: I77386cd8aa39124b9e14c95fdbaa17ea4ab5bb24
This commit is contained in:
parent
99542bbf3e
commit
ebee57f4d1
@ -78,8 +78,8 @@ if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP)
|
||||
# Example utility library.
|
||||
set(exampleutil_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/imageio/example_util.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/imageio/example_util.h)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/example_util.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/example_util.h)
|
||||
add_library(exampleutil ${exampleutil_SRCS})
|
||||
target_link_libraries(exampleutil webp ${WEBP_DEP_LIBRARIES})
|
||||
|
||||
|
@ -263,7 +263,7 @@ EX_GIF_DEC_OBJS = \
|
||||
$(DIROBJ)\examples\gifdec.obj \
|
||||
|
||||
EX_UTIL_OBJS = \
|
||||
$(DIROBJ)\imageio\example_util.obj \
|
||||
$(DIROBJ)\examples\example_util.obj \
|
||||
|
||||
ENC_OBJS = \
|
||||
$(DIROBJ)\enc\alpha.obj \
|
||||
|
@ -248,7 +248,7 @@ model {
|
||||
sources {
|
||||
c {
|
||||
source {
|
||||
srcDir "./imageio"
|
||||
srcDir "./examples"
|
||||
include "example_util.c"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,20 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
################################################################################
|
||||
# libexample_util
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
example_util.c \
|
||||
|
||||
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
|
||||
|
||||
LOCAL_MODULE := example_util
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
################################################################################
|
||||
# cwebp
|
||||
|
||||
|
@ -16,38 +16,43 @@ if BUILD_ANIMDIFF
|
||||
noinst_PROGRAMS = anim_diff
|
||||
endif
|
||||
|
||||
noinst_LTLIBRARIES = libexample_util.la
|
||||
|
||||
libexample_util_la_SOURCES = example_util.c example_util.h
|
||||
libexample_util_la_LIBADD = ../src/libwebp.la
|
||||
|
||||
anim_diff_SOURCES = anim_diff.c anim_util.c anim_util.h
|
||||
anim_diff_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GIF_INCLUDES)
|
||||
anim_diff_LDADD = ../src/demux/libwebpdemux.la
|
||||
anim_diff_LDADD += ../imageio/libexample_util.la ../imageio/libimageio_util.la
|
||||
anim_diff_LDADD += libexample_util.la ../imageio/libimageio_util.la
|
||||
anim_diff_LDADD += $(GIF_LIBS) -lm
|
||||
|
||||
dwebp_SOURCES = dwebp.c stopwatch.h
|
||||
dwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||
dwebp_CPPFLAGS += $(JPEG_INCLUDES) $(PNG_INCLUDES)
|
||||
dwebp_LDADD = ../imageio/libexample_util.la ../imageio/libimageio_util.la
|
||||
dwebp_LDADD = libexample_util.la ../imageio/libimageio_util.la
|
||||
dwebp_LDADD += ../imageio/libimagedec.la ../src/libwebp.la
|
||||
dwebp_LDADD +=$(PNG_LIBS) $(JPEG_LIBS)
|
||||
|
||||
cwebp_SOURCES = cwebp.c stopwatch.h
|
||||
cwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||
cwebp_LDADD = ../imageio/libexample_util.la ../imageio/libimageio_util.la
|
||||
cwebp_LDADD = libexample_util.la ../imageio/libimageio_util.la
|
||||
cwebp_LDADD += ../imageio/libimagedec.la ../src/libwebp.la
|
||||
cwebp_LDADD += $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS)
|
||||
|
||||
gif2webp_SOURCES = gif2webp.c gifdec.c gifdec.h
|
||||
gif2webp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GIF_INCLUDES)
|
||||
gif2webp_LDADD = ../imageio/libexample_util.la ../imageio/libimageio_util.la
|
||||
gif2webp_LDADD = libexample_util.la ../imageio/libimageio_util.la
|
||||
gif2webp_LDADD += ../src/mux/libwebpmux.la ../src/libwebp.la $(GIF_LIBS)
|
||||
|
||||
webpmux_SOURCES = webpmux.c
|
||||
webpmux_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||
webpmux_LDADD = ../imageio/libexample_util.la ../imageio/libimageio_util.la
|
||||
webpmux_LDADD = libexample_util.la ../imageio/libimageio_util.la
|
||||
webpmux_LDADD += ../src/mux/libwebpmux.la ../src/libwebp.la
|
||||
|
||||
vwebp_SOURCES = vwebp.c
|
||||
vwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GL_INCLUDES)
|
||||
vwebp_LDADD = ../imageio/libexample_util.la ../imageio/libimageio_util.la
|
||||
vwebp_LDADD = libexample_util.la ../imageio/libimageio_util.la
|
||||
vwebp_LDADD += ../src/demux/libwebpdemux.la $(GL_LIBS)
|
||||
|
||||
if BUILD_LIBWEBPDECODER
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "webp/config.h"
|
||||
#endif
|
||||
|
||||
#include "../imageio/example_util.h"
|
||||
#include "../examples/example_util.h"
|
||||
#include "../imageio/image_dec.h"
|
||||
#include "../imageio/imageio_util.h"
|
||||
#include "./stopwatch.h"
|
||||
|
@ -40,7 +40,7 @@
|
||||
#endif
|
||||
|
||||
#include "webp/decode.h"
|
||||
#include "../imageio/example_util.h"
|
||||
#include "../examples/example_util.h"
|
||||
#include "../imageio/imageio_util.h"
|
||||
#include "../imageio/webpdec.h"
|
||||
#include "./stopwatch.h"
|
||||
|
@ -10,8 +10,8 @@
|
||||
// Utility functions used by the example programs.
|
||||
//
|
||||
|
||||
#ifndef WEBP_IMAGEIO_EXAMPLE_UTIL_H_
|
||||
#define WEBP_IMAGEIO_EXAMPLE_UTIL_H_
|
||||
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
||||
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
||||
|
||||
#include "webp/types.h"
|
||||
|
||||
@ -33,4 +33,4 @@ float ExUtilGetFloat(const char* const v, int* const error);
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // WEBP_IMAGEIO_EXAMPLE_UTIL_H_
|
||||
#endif // WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
@ -26,7 +26,7 @@
|
||||
#include <gif_lib.h>
|
||||
#include "webp/encode.h"
|
||||
#include "webp/mux.h"
|
||||
#include "../imageio/example_util.h"
|
||||
#include "../examples/example_util.h"
|
||||
#include "../imageio/imageio_util.h"
|
||||
#include "./gifdec.h"
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "webp/decode.h"
|
||||
#include "webp/demux.h"
|
||||
|
||||
#include "../imageio/example_util.h"
|
||||
#include "../examples/example_util.h"
|
||||
#include "../imageio/imageio_util.h"
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include <string.h>
|
||||
#include "webp/decode.h"
|
||||
#include "webp/mux.h"
|
||||
#include "../imageio/example_util.h"
|
||||
#include "../examples/example_util.h"
|
||||
#include "../imageio/imageio_util.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -1,20 +1,5 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
################################################################################
|
||||
# libexample_util
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
example_util.c \
|
||||
|
||||
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
|
||||
|
||||
LOCAL_MODULE := example_util
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
################################################################################
|
||||
# libimageio_util
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
AM_CPPFLAGS += -I$(top_builddir)/src -I$(top_srcdir)/src
|
||||
noinst_LTLIBRARIES = libexample_util.la libimageio_util.la libimagedec.la
|
||||
noinst_LTLIBRARIES = libimageio_util.la libimagedec.la
|
||||
|
||||
noinst_HEADERS =
|
||||
noinst_HEADERS += ../src/webp/decode.h
|
||||
noinst_HEADERS += ../src/webp/types.h
|
||||
noinst_HEADERS += ../examples/stopwatch.h
|
||||
|
||||
libexample_util_la_SOURCES = example_util.c example_util.h
|
||||
|
||||
libimageio_util_la_SOURCES = imageio_util.c imageio_util.h
|
||||
|
||||
libimagedec_la_SOURCES = image_dec.c image_dec.h
|
||||
@ -19,5 +17,3 @@ libimagedec_la_SOURCES += webpdec.c webpdec.h
|
||||
libimagedec_la_SOURCES += wicdec.c wicdec.h
|
||||
libimagedec_la_CPPFLAGS = $(JPEG_INCLUDES) $(PNG_INCLUDES) $(TIFF_INCLUDES)
|
||||
libimagedec_la_CPPFLAGS += $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||
|
||||
libexample_util_la_LIBADD = ../src/libwebp.la
|
||||
|
@ -223,7 +223,7 @@ EX_FORMAT_DEC_OBJS = \
|
||||
imageio/webpdec.o \
|
||||
|
||||
EX_UTIL_OBJS = \
|
||||
imageio/example_util.o \
|
||||
examples/example_util.o \
|
||||
|
||||
GIFDEC_OBJS = \
|
||||
examples/gifdec.o \
|
||||
@ -310,7 +310,7 @@ HDRS = \
|
||||
src/webp/format_constants.h \
|
||||
$(HDRS_INSTALLED) \
|
||||
|
||||
OUT_LIBS = imageio/libexample_util.a imageio/libimageio_util.a
|
||||
OUT_LIBS = examples/libexample_util.a imageio/libimageio_util.a
|
||||
OUT_LIBS += imageio/libimagedec.a src/libwebpdecoder.a
|
||||
OUT_LIBS += src/libwebp.a
|
||||
EXTRA_LIB = extras/libwebpextras.a
|
||||
@ -344,9 +344,9 @@ src/utils/bit_writer.o: src/utils/endian_inl.h
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
examples/libanim_util.a: $(ANIM_UTIL_OBJS)
|
||||
examples/libexample_util.a: $(EX_UTIL_OBJS)
|
||||
examples/libgifdec.a: $(GIFDEC_OBJS)
|
||||
extras/libwebpextras.a: $(LIBWEBPEXTRA_OBJS)
|
||||
imageio/libexample_util.a: $(EX_UTIL_OBJS)
|
||||
imageio/libimagedec.a: $(EX_FORMAT_DEC_OBJS)
|
||||
imageio/libimageio_util.a: $(IMAGE_UTIL_OBJS)
|
||||
src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS)
|
||||
@ -365,25 +365,25 @@ examples/vwebp: examples/vwebp.o
|
||||
examples/webpmux: examples/webpmux.o
|
||||
|
||||
examples/anim_diff: examples/libanim_util.a examples/libgifdec.a
|
||||
examples/anim_diff: src/demux/libwebpdemux.a imageio/libexample_util.a
|
||||
examples/anim_diff: src/demux/libwebpdemux.a examples/libexample_util.a
|
||||
examples/anim_diff: imageio/libimageio_util.a src/libwebp.a
|
||||
examples/anim_diff: EXTRA_LIBS += $(GIF_LIBS)
|
||||
examples/anim_diff: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
||||
examples/cwebp: imageio/libexample_util.a imageio/libimageio_util.a
|
||||
examples/cwebp: examples/libexample_util.a imageio/libimageio_util.a
|
||||
examples/cwebp: imageio/libimagedec.a src/libwebp.a
|
||||
examples/cwebp: EXTRA_LIBS += $(CWEBP_LIBS)
|
||||
examples/dwebp: imageio/libexample_util.a imageio/libimageio_util.a
|
||||
examples/dwebp: examples/libexample_util.a imageio/libimageio_util.a
|
||||
examples/dwebp: imageio/libimagedec.a src/libwebp.a
|
||||
examples/dwebp: EXTRA_LIBS += $(DWEBP_LIBS)
|
||||
examples/gif2webp: imageio/libexample_util.a imageio/libimageio_util.a
|
||||
examples/gif2webp: examples/libexample_util.a imageio/libimageio_util.a
|
||||
examples/gif2webp: examples/libgifdec.a src/mux/libwebpmux.a src/libwebp.a
|
||||
examples/gif2webp: EXTRA_LIBS += $(GIF_LIBS)
|
||||
examples/gif2webp: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
||||
examples/vwebp: imageio/libexample_util.a src/demux/libwebpdemux.a
|
||||
examples/vwebp: examples/libexample_util.a src/demux/libwebpdemux.a
|
||||
examples/vwebp: imageio/libimageio_util.a src/libwebp.a
|
||||
examples/vwebp: EXTRA_LIBS += $(GL_LIBS)
|
||||
examples/vwebp: EXTRA_FLAGS += -DWEBP_HAVE_GL
|
||||
examples/webpmux: imageio/libexample_util.a imageio/libimageio_util.a
|
||||
examples/webpmux: examples/libexample_util.a imageio/libimageio_util.a
|
||||
examples/webpmux: src/mux/libwebpmux.a src/libwebpdecoder.a
|
||||
|
||||
extras/get_disto: extras/get_disto.o
|
||||
|
Loading…
Reference in New Issue
Block a user