mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
d260310511
You can now use WebPDecBuffer, WebPBitstreamFeatures and WebPDecoderOptions to have better control over the decoding process (and the speed/quality tradeoff). WebPDecoderOptions allow to: - turn fancy upsampler on/off - turn in-loop filter on/off - perform on-the-fly cropping - perform on the-fly rescale (and more to come. Not all features are implemented yet). On-the-fly cropping and scaling allow to save quite some memory (as the decoding operation will now scale with the output's size, not the input's one). It saves some CPU too (since for instance, in-loop filtering is partially turned off where it doesn't matter, and some YUV->RGB conversion operations are ommitted too). The scaler uses summed area, so is mainly meant to be used for downscaling (like: for generating thumbnails or previews). Incremental decoding works with these new options. More doc to come soon. dwebp is now using the new decoding interface, with the new flags: -nofancy -nofilter -crop top left width height -scale width height Change-Id: I08baf2fa291941686f4ef70a9cc2e4137874e85e
95 lines
3.3 KiB
Plaintext
95 lines
3.3 KiB
Plaintext
# This makefile is a simpler alternative to the autoconf-based build
|
|
# system, for simple local building of the libraries and tools.
|
|
# It will not install the libraries system-wide, but just create the 'cwebp'
|
|
# and 'dwebp' tools in the examples/ directory, along with the static
|
|
# library 'src/libwebp.a'.
|
|
#
|
|
# To build the library and examples, use:
|
|
# make -f makefile.unix
|
|
# from this top directory.
|
|
|
|
#### Customizable part ####
|
|
|
|
# These flag assume you have libpng and libjpeg installed. If not, either
|
|
# follow below install instructions or just comment out the next lines.
|
|
EXTRA_FLAGS= -DWEBP_HAVE_PNG -DWEBP_HAVE_JPEG
|
|
EXTRA_LIBS= -lpng -ljpeg -lz
|
|
ifeq ("$(HOSTTYPE)", "intel-mac")
|
|
EXTRA_FLAGS += -I/opt/local/include
|
|
EXTRA_LIBS += -L/opt/local/lib
|
|
endif
|
|
|
|
# To install libraries on Mac OS X:
|
|
# 1. Install MacPorts (http://www.macports.org/install.php)
|
|
# 2. Run "sudo port install jpeg"
|
|
# 3. Run "sudo port install libpng"
|
|
|
|
# To install libraries on Linux:
|
|
# 1. Run "sudo apt-get install libjpeg62-dev"
|
|
# 2. Run "sudo apt-get install libpng12-dev"
|
|
|
|
# Uncomment for build for 32bit platform
|
|
# Alternatively, you can just use the command
|
|
# 'make -f makefile.unix EXTRA_FLAGS=-m32' to that effect.
|
|
# EXTRA_FLAGS += -m32
|
|
|
|
# Extra flags to enable experimental features and code
|
|
# EXTRA_FLAGS += -DWEBP_EXPERIMENTAL_FEATURES
|
|
|
|
# Extra flags to emulate C89 strictness with the full ANSI
|
|
EXTRA_FLAGS += -Wextra -Wold-style-definition
|
|
EXTRA_FLAGS += -Wmissing-prototypes
|
|
EXTRA_FLAGS += -Wmissing-declarations
|
|
EXTRA_FLAGS += -Wdeclaration-after-statement
|
|
|
|
#### Nothing should normally be changed below this line ####
|
|
|
|
CC = gcc -Isrc/ -Iexamples/ -Wall
|
|
CFLAGS = -O3 -DNDEBUG $(EXTRA_FLAGS)
|
|
LDFLAGS = src/libwebp.a $(EXTRA_LIBS) -lm
|
|
|
|
OBJS = src/enc/webpenc.o src/enc/bit_writer.o src/enc/syntax.o \
|
|
src/enc/dsp.o src/enc/dsp_sse2.o src/enc/alpha.o \
|
|
src/enc/tree.o src/enc/config.o src/enc/frame.o \
|
|
src/enc/quant.o src/enc/iterator.o src/enc/analysis.o \
|
|
src/enc/cost.o src/enc/picture.o src/enc/filter.o \
|
|
src/enc/layer.o \
|
|
src/dec/bits.o src/dec/dsp.o src/dec/dsp_sse2.o src/dec/frame.o \
|
|
src/dec/webp.o src/dec/quant.o src/dec/tree.o src/dec/vp8.o \
|
|
src/dec/yuv.o src/dec/idec.o src/dec/alpha.o src/dec/layer.o \
|
|
src/dec/io.o src/dec/buffer.o
|
|
HDRS = src/webp/encode.h src/enc/vp8enci.h src/enc/bit_writer.h \
|
|
src/enc/cost.h src/dec/bits.h src/dec/vp8i.h src/dec/yuv.h
|
|
OUTPUT = examples/cwebp examples/dwebp src/libwebp.a
|
|
|
|
all:ex
|
|
|
|
.c.o: $(HDRS)
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
libwebp.a: $(OBJS) $(HDRS)
|
|
ar r src/libwebp.a $(OBJS)
|
|
|
|
ex: examples/cwebp.o examples/dwebp.o libwebp.a
|
|
$(CC) -o examples/cwebp examples/cwebp.o $(LDFLAGS)
|
|
$(CC) -o examples/dwebp examples/dwebp.o $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -f ${OUTPUT} *~ \
|
|
src/enc/*.o src/enc/*~ \
|
|
src/dec/*.o src/dec/*~ \
|
|
examples/*.o examples/*~
|
|
|
|
superclean: clean
|
|
rm -rf .git *.log *.cache *~
|
|
rm -rf .deps */.deps */*/.deps
|
|
rm -rf .libs */.libs */*/.libs
|
|
rm -f */*.lo */*/*.lo
|
|
rm -f */*.la */*/*.la
|
|
rm -f Makefile */Makefile */*/Makefile
|
|
rm -f Makefile.in */Makefile.in */*/Makefile.in
|
|
rm -f config.log autom4te.cache libtool config.h stamp-h1
|
|
rm -f aclocal.m4 compile config.guess config.h.in config.sub config.status
|
|
rm -f configure depcomp install-sh ltmain.sh missing src/libwebp.pc
|
|
rm -f m4/*
|