mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 22:28:22 +01:00
Merge "move examples/{example_util,image_dec} to imageio/"
This commit is contained in:
commit
33d8d0d4d3
@ -252,7 +252,9 @@ endif
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
include $(LOCAL_PATH)/examples/Android.mk
|
WEBP_SRC_PATH := $(LOCAL_PATH)
|
||||||
|
include $(WEBP_SRC_PATH)/imageio/Android.mk
|
||||||
|
include $(WEBP_SRC_PATH)/examples/Android.mk
|
||||||
|
|
||||||
ifeq ($(USE_CPUFEATURES),yes)
|
ifeq ($(USE_CPUFEATURES),yes)
|
||||||
$(call import-module,android/cpufeatures)
|
$(call import-module,android/cpufeatures)
|
||||||
|
@ -77,32 +77,32 @@ endforeach()
|
|||||||
if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP)
|
if(WEBP_BUILD_CWEBP OR WEBP_BUILD_DWEBP)
|
||||||
# Example utility library.
|
# Example utility library.
|
||||||
set(exampleutil_SRCS
|
set(exampleutil_SRCS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/example_util.c
|
${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/example_util.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/example_util.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h)
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/example_util.h)
|
||||||
add_library(exampleutil ${exampleutil_SRCS})
|
add_library(exampleutil ${exampleutil_SRCS})
|
||||||
target_link_libraries(exampleutil webp ${WEBP_DEP_LIBRARIES})
|
target_link_libraries(exampleutil webp ${WEBP_DEP_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WEBP_BUILD_CWEBP)
|
if(WEBP_BUILD_CWEBP)
|
||||||
# Image-decoding utility library.
|
# Image-decoding utility library.
|
||||||
set(exampledec_SRCS
|
set(imagedec_SRCS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/image_dec.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/image_dec.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/image_dec.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/image_dec.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/jpegdec.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/jpegdec.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/jpegdec.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/jpegdec.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/metadata.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/metadata.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/metadata.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/metadata.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/pngdec.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/pngdec.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/pngdec.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/pngdec.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/tiffdec.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/tiffdec.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/tiffdec.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/tiffdec.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/webpdec.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/webpdec.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/webpdec.h
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/webpdec.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/wicdec.c
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/wicdec.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/wicdec.h)
|
${CMAKE_CURRENT_SOURCE_DIR}/imageio/wicdec.h)
|
||||||
add_library(exampledec ${exampledec_SRCS})
|
add_library(imagedec ${imagedec_SRCS})
|
||||||
target_link_libraries(exampledec webp ${WEBP_DEP_LIBRARIES}
|
target_link_libraries(imagedec webp ${WEBP_DEP_LIBRARIES}
|
||||||
${WEBP_DEP_IMG_LIBRARIES})
|
${WEBP_DEP_IMG_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ if(WEBP_BUILD_CWEBP)
|
|||||||
add_executable(cwebp
|
add_executable(cwebp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/cwebp.c
|
${CMAKE_CURRENT_SOURCE_DIR}/examples/cwebp.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h)
|
${CMAKE_CURRENT_SOURCE_DIR}/examples/stopwatch.h)
|
||||||
target_link_libraries(cwebp exampledec webp exampleutil
|
target_link_libraries(cwebp imagedec webp exampleutil
|
||||||
${WEBP_DEP_LIBRARIES} ${WEBP_DEP_IMG_LIBRARIES}
|
${WEBP_DEP_LIBRARIES} ${WEBP_DEP_IMG_LIBRARIES}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
SUBDIRS = src examples man
|
SUBDIRS = src imageio man
|
||||||
EXTRA_DIST = COPYING autogen.sh
|
EXTRA_DIST = COPYING autogen.sh
|
||||||
|
|
||||||
if WANT_EXTRAS
|
if WANT_EXTRAS
|
||||||
SUBDIRS += extras
|
SUBDIRS += extras
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
SUBDIRS += examples
|
||||||
|
17
Makefile.vc
17
Makefile.vc
@ -82,6 +82,7 @@ OUTPUT_DIRS = $(DIRBIN) $(DIRINC) $(DIRLIB) \
|
|||||||
$(DIROBJ)\dsp \
|
$(DIROBJ)\dsp \
|
||||||
$(DIROBJ)\enc \
|
$(DIROBJ)\enc \
|
||||||
$(DIROBJ)\examples \
|
$(DIROBJ)\examples \
|
||||||
|
$(DIROBJ)\imageio \
|
||||||
$(DIROBJ)\mux \
|
$(DIROBJ)\mux \
|
||||||
$(DIROBJ)\utils \
|
$(DIROBJ)\utils \
|
||||||
|
|
||||||
@ -250,19 +251,19 @@ EX_ANIM_UTIL_OBJS = \
|
|||||||
$(DIROBJ)\examples\anim_util.obj \
|
$(DIROBJ)\examples\anim_util.obj \
|
||||||
|
|
||||||
EX_FORMAT_DEC_OBJS = \
|
EX_FORMAT_DEC_OBJS = \
|
||||||
$(DIROBJ)\examples\image_dec.obj \
|
$(DIROBJ)\imageio\image_dec.obj \
|
||||||
$(DIROBJ)\examples\jpegdec.obj \
|
$(DIROBJ)\imageio\jpegdec.obj \
|
||||||
$(DIROBJ)\examples\metadata.obj \
|
$(DIROBJ)\imageio\metadata.obj \
|
||||||
$(DIROBJ)\examples\pngdec.obj \
|
$(DIROBJ)\imageio\pngdec.obj \
|
||||||
$(DIROBJ)\examples\tiffdec.obj \
|
$(DIROBJ)\imageio\tiffdec.obj \
|
||||||
$(DIROBJ)\examples\webpdec.obj \
|
$(DIROBJ)\imageio\webpdec.obj \
|
||||||
$(DIROBJ)\examples\wicdec.obj \
|
$(DIROBJ)\imageio\wicdec.obj \
|
||||||
|
|
||||||
EX_GIF_DEC_OBJS = \
|
EX_GIF_DEC_OBJS = \
|
||||||
$(DIROBJ)\examples\gifdec.obj \
|
$(DIROBJ)\examples\gifdec.obj \
|
||||||
|
|
||||||
EX_UTIL_OBJS = \
|
EX_UTIL_OBJS = \
|
||||||
$(DIROBJ)\examples\example_util.obj \
|
$(DIROBJ)\imageio\example_util.obj \
|
||||||
|
|
||||||
ENC_OBJS = \
|
ENC_OBJS = \
|
||||||
$(DIROBJ)\enc\alpha.obj \
|
$(DIROBJ)\enc\alpha.obj \
|
||||||
|
@ -248,14 +248,14 @@ model {
|
|||||||
sources {
|
sources {
|
||||||
c {
|
c {
|
||||||
source {
|
source {
|
||||||
srcDir "./examples"
|
srcDir "./imageio"
|
||||||
include "example_util.c"
|
include "example_util.c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
example_dec(NativeLibrarySpec) {
|
imagedec(NativeLibrarySpec) {
|
||||||
binaries {
|
binaries {
|
||||||
all {
|
all {
|
||||||
lib library: "webp", linkage: "static"
|
lib library: "webp", linkage: "static"
|
||||||
@ -264,7 +264,7 @@ model {
|
|||||||
sources {
|
sources {
|
||||||
c {
|
c {
|
||||||
source {
|
source {
|
||||||
srcDir "./examples"
|
srcDir "./imageio"
|
||||||
include "image_dec.c"
|
include "image_dec.c"
|
||||||
include "jpegdec.c"
|
include "jpegdec.c"
|
||||||
include "metadata.c"
|
include "metadata.c"
|
||||||
@ -279,7 +279,7 @@ model {
|
|||||||
binaries {
|
binaries {
|
||||||
all {
|
all {
|
||||||
lib library: "example_util", linkage: "static"
|
lib library: "example_util", linkage: "static"
|
||||||
lib library: "example_dec", linkage: "static"
|
lib library: "imagedec", linkage: "static"
|
||||||
lib library: "webp", linkage: "static"
|
lib library: "webp", linkage: "static"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -672,8 +672,8 @@ dnl =========================
|
|||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
AC_CONFIG_HEADERS([src/webp/config.h])
|
AC_CONFIG_HEADERS([src/webp/config.h])
|
||||||
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile \
|
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile \
|
||||||
examples/Makefile extras/Makefile src/dec/Makefile \
|
examples/Makefile extras/Makefile imageio/Makefile \
|
||||||
src/enc/Makefile src/dsp/Makefile \
|
src/dec/Makefile src/enc/Makefile src/dsp/Makefile \
|
||||||
src/demux/Makefile src/mux/Makefile \
|
src/demux/Makefile src/mux/Makefile \
|
||||||
src/utils/Makefile \
|
src/utils/Makefile \
|
||||||
src/libwebp.pc src/libwebpdecoder.pc \
|
src/libwebp.pc src/libwebpdecoder.pc \
|
||||||
|
@ -1,41 +1,5 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
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)
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# libexample_dec
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
image_dec.c \
|
|
||||||
jpegdec.c \
|
|
||||||
metadata.c \
|
|
||||||
pngdec.c \
|
|
||||||
tiffdec.c \
|
|
||||||
webpdec.c \
|
|
||||||
|
|
||||||
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
|
|
||||||
|
|
||||||
LOCAL_MODULE := example_dec
|
|
||||||
|
|
||||||
include $(BUILD_STATIC_LIBRARY)
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# cwebp
|
# cwebp
|
||||||
|
|
||||||
@ -48,7 +12,7 @@ LOCAL_SRC_FILES := \
|
|||||||
|
|
||||||
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
||||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
|
||||||
LOCAL_STATIC_LIBRARIES := example_util example_dec webp
|
LOCAL_STATIC_LIBRARIES := example_util imagedec webp
|
||||||
|
|
||||||
LOCAL_MODULE := cwebp
|
LOCAL_MODULE := cwebp
|
||||||
|
|
||||||
|
@ -12,20 +12,6 @@ if BUILD_GIF2WEBP
|
|||||||
bin_PROGRAMS += gif2webp
|
bin_PROGRAMS += gif2webp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libexampleutil.la libexampledec.la
|
|
||||||
|
|
||||||
libexampleutil_la_SOURCES = example_util.c example_util.h stopwatch.h
|
|
||||||
|
|
||||||
libexampledec_la_SOURCES = image_dec.c image_dec.h
|
|
||||||
libexampledec_la_SOURCES += jpegdec.c jpegdec.h
|
|
||||||
libexampledec_la_SOURCES += metadata.c metadata.h
|
|
||||||
libexampledec_la_SOURCES += pngdec.c pngdec.h
|
|
||||||
libexampledec_la_SOURCES += tiffdec.c tiffdec.h
|
|
||||||
libexampledec_la_SOURCES += webpdec.c webpdec.h
|
|
||||||
libexampledec_la_SOURCES += wicdec.c wicdec.h
|
|
||||||
libexampledec_la_CPPFLAGS = $(JPEG_INCLUDES) $(PNG_INCLUDES) $(TIFF_INCLUDES)
|
|
||||||
libexampledec_la_CPPFLAGS += $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
|
||||||
|
|
||||||
if BUILD_ANIMDIFF
|
if BUILD_ANIMDIFF
|
||||||
noinst_PROGRAMS = anim_diff
|
noinst_PROGRAMS = anim_diff
|
||||||
endif
|
endif
|
||||||
@ -33,31 +19,33 @@ endif
|
|||||||
anim_diff_SOURCES = anim_diff.c anim_util.c anim_util.h
|
anim_diff_SOURCES = anim_diff.c anim_util.c anim_util.h
|
||||||
anim_diff_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GIF_INCLUDES)
|
anim_diff_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GIF_INCLUDES)
|
||||||
anim_diff_LDADD = ../src/demux/libwebpdemux.la
|
anim_diff_LDADD = ../src/demux/libwebpdemux.la
|
||||||
anim_diff_LDADD += libexampleutil.la
|
anim_diff_LDADD += ../imageio/libexample_util.la
|
||||||
anim_diff_LDADD += $(GIF_LIBS) -lm
|
anim_diff_LDADD += $(GIF_LIBS) -lm
|
||||||
|
|
||||||
dwebp_SOURCES = dwebp.c stopwatch.h
|
dwebp_SOURCES = dwebp.c stopwatch.h
|
||||||
dwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
dwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||||
dwebp_CPPFLAGS += $(JPEG_INCLUDES) $(PNG_INCLUDES)
|
dwebp_CPPFLAGS += $(JPEG_INCLUDES) $(PNG_INCLUDES)
|
||||||
dwebp_LDADD = libexampleutil.la $(PNG_LIBS) $(JPEG_LIBS)
|
dwebp_LDADD = ../imageio/libexample_util.la $(PNG_LIBS) $(JPEG_LIBS)
|
||||||
|
|
||||||
cwebp_SOURCES = cwebp.c stopwatch.h
|
cwebp_SOURCES = cwebp.c stopwatch.h
|
||||||
cwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
cwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||||
cwebp_LDADD = libexampleutil.la libexampledec.la ../src/libwebp.la
|
cwebp_LDADD = ../imageio/libexample_util.la ../imageio/libimagedec.la
|
||||||
cwebp_LDADD += $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS)
|
cwebp_LDADD += ../src/libwebp.la $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS)
|
||||||
|
|
||||||
gif2webp_SOURCES = gif2webp.c gifdec.c gifdec.h
|
gif2webp_SOURCES = gif2webp.c gifdec.c gifdec.h
|
||||||
gif2webp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GIF_INCLUDES)
|
gif2webp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GIF_INCLUDES)
|
||||||
gif2webp_LDADD = libexampleutil.la ../src/mux/libwebpmux.la ../src/libwebp.la
|
gif2webp_LDADD = ../imageio/libexample_util.la ../src/mux/libwebpmux.la
|
||||||
gif2webp_LDADD += $(GIF_LIBS)
|
gif2webp_LDADD += ../src/libwebp.la $(GIF_LIBS)
|
||||||
|
|
||||||
webpmux_SOURCES = webpmux.c
|
webpmux_SOURCES = webpmux.c
|
||||||
webpmux_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
webpmux_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE)
|
||||||
webpmux_LDADD = libexampleutil.la ../src/mux/libwebpmux.la ../src/libwebp.la
|
webpmux_LDADD = ../imageio/libexample_util.la ../src/mux/libwebpmux.la
|
||||||
|
webpmux_LDADD += ../src/libwebp.la
|
||||||
|
|
||||||
vwebp_SOURCES = vwebp.c
|
vwebp_SOURCES = vwebp.c
|
||||||
vwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GL_INCLUDES)
|
vwebp_CPPFLAGS = $(AM_CPPFLAGS) $(USE_EXPERIMENTAL_CODE) $(GL_INCLUDES)
|
||||||
vwebp_LDADD = libexampleutil.la ../src/demux/libwebpdemux.la $(GL_LIBS)
|
vwebp_LDADD = ../imageio/libexample_util.la ../src/demux/libwebpdemux.la
|
||||||
|
vwebp_LDADD += $(GL_LIBS)
|
||||||
|
|
||||||
if BUILD_LIBWEBPDECODER
|
if BUILD_LIBWEBPDECODER
|
||||||
anim_diff_LDADD += ../src/libwebpdecoder.la
|
anim_diff_LDADD += ../src/libwebpdecoder.la
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "webp/format_constants.h"
|
#include "webp/format_constants.h"
|
||||||
#include "webp/decode.h"
|
#include "webp/decode.h"
|
||||||
#include "webp/demux.h"
|
#include "webp/demux.h"
|
||||||
#include "./example_util.h"
|
#include "../imageio/example_util.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
#include "webp/config.h"
|
#include "webp/config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "./example_util.h"
|
#include "../imageio/example_util.h"
|
||||||
#include "./image_dec.h"
|
#include "../imageio/image_dec.h"
|
||||||
#include "./stopwatch.h"
|
#include "./stopwatch.h"
|
||||||
#include "webp/encode.h"
|
#include "webp/encode.h"
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "webp/decode.h"
|
#include "webp/decode.h"
|
||||||
#include "./example_util.h"
|
#include "../imageio/example_util.h"
|
||||||
#include "./stopwatch.h"
|
#include "./stopwatch.h"
|
||||||
|
|
||||||
static int verbose = 0;
|
static int verbose = 0;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <gif_lib.h>
|
#include <gif_lib.h>
|
||||||
#include "webp/encode.h"
|
#include "webp/encode.h"
|
||||||
#include "webp/mux.h"
|
#include "webp/mux.h"
|
||||||
#include "./example_util.h"
|
#include "../imageio/example_util.h"
|
||||||
#include "./gifdec.h"
|
#include "./gifdec.h"
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include "webp/decode.h"
|
#include "webp/decode.h"
|
||||||
#include "webp/demux.h"
|
#include "webp/demux.h"
|
||||||
|
|
||||||
#include "./example_util.h"
|
#include "../imageio/example_util.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
#define snprintf _snprintf
|
#define snprintf _snprintf
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "webp/decode.h"
|
#include "webp/decode.h"
|
||||||
#include "webp/mux.h"
|
#include "webp/mux.h"
|
||||||
#include "./example_util.h"
|
#include "../imageio/example_util.h"
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Config object to parse command-line arguments.
|
// Config object to parse command-line arguments.
|
||||||
|
36
imageio/Android.mk
Normal file
36
imageio/Android.mk
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
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)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# libimagedec
|
||||||
|
|
||||||
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
|
LOCAL_SRC_FILES := \
|
||||||
|
image_dec.c \
|
||||||
|
jpegdec.c \
|
||||||
|
metadata.c \
|
||||||
|
pngdec.c \
|
||||||
|
tiffdec.c \
|
||||||
|
webpdec.c \
|
||||||
|
|
||||||
|
LOCAL_CFLAGS := $(WEBP_CFLAGS)
|
||||||
|
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
|
||||||
|
|
||||||
|
LOCAL_MODULE := imagedec
|
||||||
|
|
||||||
|
include $(BUILD_STATIC_LIBRARY)
|
21
imageio/Makefile.am
Normal file
21
imageio/Makefile.am
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
AM_CPPFLAGS += -I$(top_builddir)/src -I$(top_srcdir)/src
|
||||||
|
noinst_LTLIBRARIES = libexample_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
|
||||||
|
|
||||||
|
libimagedec_la_SOURCES = image_dec.c image_dec.h
|
||||||
|
libimagedec_la_SOURCES += jpegdec.c jpegdec.h
|
||||||
|
libimagedec_la_SOURCES += metadata.c metadata.h
|
||||||
|
libimagedec_la_SOURCES += pngdec.c pngdec.h
|
||||||
|
libimagedec_la_SOURCES += tiffdec.c tiffdec.h
|
||||||
|
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
|
@ -21,7 +21,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "webp/decode.h"
|
#include "webp/decode.h"
|
||||||
#include "./stopwatch.h"
|
#include "../examples/stopwatch.h"
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// String parsing
|
// String parsing
|
@ -10,8 +10,8 @@
|
|||||||
// Utility functions used by the example programs.
|
// Utility functions used by the example programs.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
#ifndef WEBP_IMAGEIO_EXAMPLE_UTIL_H_
|
||||||
#define WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
#define WEBP_IMAGEIO_EXAMPLE_UTIL_H_
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "webp/decode.h"
|
#include "webp/decode.h"
|
||||||
@ -92,4 +92,4 @@ VP8StatusCode ExUtilDecodeWebPIncremental(
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_EXAMPLE_UTIL_H_
|
#endif // WEBP_IMAGEIO_EXAMPLE_UTIL_H_
|
@ -11,8 +11,8 @@
|
|||||||
//
|
//
|
||||||
// Author: Skal (pascal.massimino@gmail.com)
|
// Author: Skal (pascal.massimino@gmail.com)
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_IMAGE_DEC_H_
|
#ifndef WEBP_IMAGEIO_IMAGE_DEC_H_
|
||||||
#define WEBP_EXAMPLES_IMAGE_DEC_H_
|
#define WEBP_IMAGEIO_IMAGE_DEC_H_
|
||||||
|
|
||||||
#include "webp/types.h"
|
#include "webp/types.h"
|
||||||
|
|
||||||
@ -58,4 +58,4 @@ WebPImageReader WebPGuessImageReader(const uint8_t* const data,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_IMAGE_DEC_H_
|
#endif // WEBP_IMAGEIO_IMAGE_DEC_H_
|
@ -9,8 +9,8 @@
|
|||||||
//
|
//
|
||||||
// JPEG decode.
|
// JPEG decode.
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_JPEGDEC_H_
|
#ifndef WEBP_IMAGEIO_JPEGDEC_H_
|
||||||
#define WEBP_EXAMPLES_JPEGDEC_H_
|
#define WEBP_IMAGEIO_JPEGDEC_H_
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "webp/types.h"
|
#include "webp/types.h"
|
||||||
@ -35,4 +35,4 @@ int ReadJPEG(const uint8_t* const data, size_t data_size,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_JPEGDEC_H_
|
#endif // WEBP_IMAGEIO_JPEGDEC_H_
|
@ -10,8 +10,8 @@
|
|||||||
// Metadata types and functions.
|
// Metadata types and functions.
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_METADATA_H_
|
#ifndef WEBP_IMAGEIO_METADATA_H_
|
||||||
#define WEBP_EXAMPLES_METADATA_H_
|
#define WEBP_IMAGEIO_METADATA_H_
|
||||||
|
|
||||||
#include "webp/types.h"
|
#include "webp/types.h"
|
||||||
|
|
||||||
@ -44,4 +44,4 @@ int MetadataCopy(const char* metadata, size_t metadata_len,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_METADATA_H_
|
#endif // WEBP_IMAGEIO_METADATA_H_
|
@ -9,8 +9,8 @@
|
|||||||
//
|
//
|
||||||
// PNG decode.
|
// PNG decode.
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_PNGDEC_H_
|
#ifndef WEBP_IMAGEIO_PNGDEC_H_
|
||||||
#define WEBP_EXAMPLES_PNGDEC_H_
|
#define WEBP_IMAGEIO_PNGDEC_H_
|
||||||
|
|
||||||
#include "webp/types.h"
|
#include "webp/types.h"
|
||||||
|
|
||||||
@ -34,4 +34,4 @@ int ReadPNG(const uint8_t* const data, size_t data_size,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_PNGDEC_H_
|
#endif // WEBP_IMAGEIO_PNGDEC_H_
|
@ -9,8 +9,8 @@
|
|||||||
//
|
//
|
||||||
// TIFF decode.
|
// TIFF decode.
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_TIFFDEC_H_
|
#ifndef WEBP_IMAGEIO_TIFFDEC_H_
|
||||||
#define WEBP_EXAMPLES_TIFFDEC_H_
|
#define WEBP_IMAGEIO_TIFFDEC_H_
|
||||||
|
|
||||||
#include "webp/types.h"
|
#include "webp/types.h"
|
||||||
|
|
||||||
@ -34,4 +34,4 @@ int ReadTIFF(const uint8_t* const data, size_t data_size,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_TIFFDEC_H_
|
#endif // WEBP_IMAGEIO_TIFFDEC_H_
|
@ -9,8 +9,8 @@
|
|||||||
//
|
//
|
||||||
// WebP decode.
|
// WebP decode.
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_WEBPDEC_H_
|
#ifndef WEBP_IMAGEIO_WEBPDEC_H_
|
||||||
#define WEBP_EXAMPLES_WEBPDEC_H_
|
#define WEBP_IMAGEIO_WEBPDEC_H_
|
||||||
|
|
||||||
#include "webp/types.h"
|
#include "webp/types.h"
|
||||||
|
|
||||||
@ -34,4 +34,4 @@ int ReadWebP(const uint8_t* const data, size_t data_size,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_WEBPDEC_H_
|
#endif // WEBP_IMAGEIO_WEBPDEC_H_
|
@ -9,8 +9,8 @@
|
|||||||
//
|
//
|
||||||
// Windows Imaging Component (WIC) decode.
|
// Windows Imaging Component (WIC) decode.
|
||||||
|
|
||||||
#ifndef WEBP_EXAMPLES_WICDEC_H_
|
#ifndef WEBP_IMAGEIO_WICDEC_H_
|
||||||
#define WEBP_EXAMPLES_WICDEC_H_
|
#define WEBP_IMAGEIO_WICDEC_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -31,4 +31,4 @@ int ReadPictureWithWIC(const char* const filename,
|
|||||||
} // extern "C"
|
} // extern "C"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // WEBP_EXAMPLES_WICDEC_H_
|
#endif // WEBP_IMAGEIO_WICDEC_H_
|
@ -215,15 +215,15 @@ ENC_OBJS = \
|
|||||||
src/enc/webpenc.o \
|
src/enc/webpenc.o \
|
||||||
|
|
||||||
EX_FORMAT_DEC_OBJS = \
|
EX_FORMAT_DEC_OBJS = \
|
||||||
examples/image_dec.o \
|
imageio/image_dec.o \
|
||||||
examples/jpegdec.o \
|
imageio/jpegdec.o \
|
||||||
examples/metadata.o \
|
imageio/metadata.o \
|
||||||
examples/pngdec.o \
|
imageio/pngdec.o \
|
||||||
examples/tiffdec.o \
|
imageio/tiffdec.o \
|
||||||
examples/webpdec.o \
|
imageio/webpdec.o \
|
||||||
|
|
||||||
EX_UTIL_OBJS = \
|
EX_UTIL_OBJS = \
|
||||||
examples/example_util.o \
|
imageio/example_util.o \
|
||||||
|
|
||||||
GIFDEC_OBJS = \
|
GIFDEC_OBJS = \
|
||||||
examples/gifdec.o \
|
examples/gifdec.o \
|
||||||
@ -306,7 +306,7 @@ HDRS = \
|
|||||||
src/webp/format_constants.h \
|
src/webp/format_constants.h \
|
||||||
$(HDRS_INSTALLED) \
|
$(HDRS_INSTALLED) \
|
||||||
|
|
||||||
OUT_LIBS = examples/libexample_util.a src/libwebpdecoder.a src/libwebp.a
|
OUT_LIBS = imageio/libexample_util.a src/libwebpdecoder.a src/libwebp.a
|
||||||
EXTRA_LIB = extras/libwebpextras.a
|
EXTRA_LIB = extras/libwebpextras.a
|
||||||
OUT_EXAMPLES = examples/cwebp examples/dwebp
|
OUT_EXAMPLES = examples/cwebp examples/dwebp
|
||||||
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \
|
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \
|
||||||
@ -338,9 +338,9 @@ src/utils/bit_writer.o: src/utils/endian_inl.h
|
|||||||
|
|
||||||
examples/libanim_util.a: $(ANIM_UTIL_OBJS)
|
examples/libanim_util.a: $(ANIM_UTIL_OBJS)
|
||||||
examples/libexample_dec.a: $(EX_FORMAT_DEC_OBJS)
|
examples/libexample_dec.a: $(EX_FORMAT_DEC_OBJS)
|
||||||
examples/libexample_util.a: $(EX_UTIL_OBJS)
|
|
||||||
examples/libgifdec.a: $(GIFDEC_OBJS)
|
examples/libgifdec.a: $(GIFDEC_OBJS)
|
||||||
extras/libwebpextras.a: $(LIBWEBPEXTRA_OBJS)
|
extras/libwebpextras.a: $(LIBWEBPEXTRA_OBJS)
|
||||||
|
imageio/libexample_util.a: $(EX_UTIL_OBJS)
|
||||||
src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS)
|
src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS)
|
||||||
src/libwebp.a: $(LIBWEBP_OBJS)
|
src/libwebp.a: $(LIBWEBP_OBJS)
|
||||||
src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS)
|
src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS)
|
||||||
@ -357,24 +357,24 @@ examples/vwebp: examples/vwebp.o
|
|||||||
examples/webpmux: examples/webpmux.o
|
examples/webpmux: examples/webpmux.o
|
||||||
|
|
||||||
examples/anim_diff: examples/libanim_util.a examples/libgifdec.a
|
examples/anim_diff: examples/libanim_util.a examples/libgifdec.a
|
||||||
examples/anim_diff: src/demux/libwebpdemux.a examples/libexample_util.a
|
examples/anim_diff: src/demux/libwebpdemux.a imageio/libexample_util.a
|
||||||
examples/anim_diff: src/libwebp.a
|
examples/anim_diff: src/libwebp.a
|
||||||
examples/anim_diff: EXTRA_LIBS += $(GIF_LIBS)
|
examples/anim_diff: EXTRA_LIBS += $(GIF_LIBS)
|
||||||
examples/anim_diff: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
examples/anim_diff: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
||||||
examples/cwebp: examples/libexample_util.a examples/libexample_dec.a
|
examples/cwebp: imageio/libexample_util.a examples/libexample_dec.a
|
||||||
examples/cwebp: src/libwebp.a
|
examples/cwebp: src/libwebp.a
|
||||||
examples/cwebp: EXTRA_LIBS += $(CWEBP_LIBS)
|
examples/cwebp: EXTRA_LIBS += $(CWEBP_LIBS)
|
||||||
examples/dwebp: examples/libexample_util.a src/libwebpdecoder.a
|
examples/dwebp: imageio/libexample_util.a src/libwebpdecoder.a
|
||||||
examples/dwebp: EXTRA_LIBS += $(DWEBP_LIBS)
|
examples/dwebp: EXTRA_LIBS += $(DWEBP_LIBS)
|
||||||
examples/gif2webp: examples/libexample_util.a examples/libgifdec.a
|
examples/gif2webp: imageio/libexample_util.a examples/libgifdec.a
|
||||||
examples/gif2webp: src/mux/libwebpmux.a src/libwebp.a
|
examples/gif2webp: src/mux/libwebpmux.a src/libwebp.a
|
||||||
examples/gif2webp: EXTRA_LIBS += $(GIF_LIBS)
|
examples/gif2webp: EXTRA_LIBS += $(GIF_LIBS)
|
||||||
examples/gif2webp: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
examples/gif2webp: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
||||||
examples/vwebp: examples/libexample_util.a src/demux/libwebpdemux.a
|
examples/vwebp: imageio/libexample_util.a src/demux/libwebpdemux.a
|
||||||
examples/vwebp: src/libwebp.a
|
examples/vwebp: src/libwebp.a
|
||||||
examples/vwebp: EXTRA_LIBS += $(GL_LIBS)
|
examples/vwebp: EXTRA_LIBS += $(GL_LIBS)
|
||||||
examples/vwebp: EXTRA_FLAGS += -DWEBP_HAVE_GL
|
examples/vwebp: EXTRA_FLAGS += -DWEBP_HAVE_GL
|
||||||
examples/webpmux: examples/libexample_util.a src/mux/libwebpmux.a
|
examples/webpmux: imageio/libexample_util.a src/mux/libwebpmux.a
|
||||||
examples/webpmux: src/libwebpdecoder.a
|
examples/webpmux: src/libwebpdecoder.a
|
||||||
|
|
||||||
$(OUT_EXAMPLES) $(EXTRA_EXAMPLES):
|
$(OUT_EXAMPLES) $(EXTRA_EXAMPLES):
|
||||||
@ -403,6 +403,7 @@ clean:
|
|||||||
$(RM) $(OUTPUT) *~ \
|
$(RM) $(OUTPUT) *~ \
|
||||||
examples/*.o examples/*~ \
|
examples/*.o examples/*~ \
|
||||||
extras/*.o extras/*~ \
|
extras/*.o extras/*~ \
|
||||||
|
imageio/*.o imageio/*~ \
|
||||||
src/dec/*.o src/dec/*~ \
|
src/dec/*.o src/dec/*~ \
|
||||||
src/demux/*.o src/demux/*~ \
|
src/demux/*.o src/demux/*~ \
|
||||||
src/dsp/*.o src/dsp/*~ \
|
src/dsp/*.o src/dsp/*~ \
|
||||||
|
Loading…
Reference in New Issue
Block a user