VP8EstimateQuality(): roughty estimate webp bitstream quality factor

This function returns a rough estimation of the quality factor used
for compressing the WebP bitstream.

Simple command line: 'webp_quality [-quiet] in.webp'
should print the estimated quality factor.

Change-Id: Ifba3e489461f5a587003ac9f08cc7556e9b24ac2
This commit is contained in:
skal
2016-07-20 12:55:05 -07:00
committed by Pascal Massimino
parent fee7b3d6ca
commit e8ab6a825a
5 changed files with 201 additions and 8 deletions

View File

@ -252,6 +252,7 @@ UTILS_ENC_OBJS = \
EXTRA_OBJS = \
extras/extras.o \
extras/quality_estimate.o \
LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS)
LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) $(DSP_ENC_OBJS) \
@ -311,17 +312,18 @@ OUT_LIBS += src/libwebp.a
EXTRA_LIB = extras/libwebpextras.a
OUT_EXAMPLES = examples/cwebp examples/dwebp
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \
examples/anim_diff extras/get_disto
examples/anim_diff
OTHER_EXAMPLES = extras/get_disto extras/webp_quality
OUTPUT = $(OUT_LIBS) $(OUT_EXAMPLES)
ifeq ($(MAKECMDGOALS),clean)
OUTPUT += $(EXTRA_EXAMPLES)
OUTPUT += $(EXTRA_EXAMPLES) $(OTHER_EXAMPLES)
OUTPUT += src/demux/libwebpdemux.a src/mux/libwebpmux.a $(EXTRA_LIB)
OUTPUT += examples/libgifdec.a examples/libanim_util.a
endif
ex: $(OUT_EXAMPLES)
all: ex $(EXTRA_EXAMPLES)
all: ex $(EXTRA_EXAMPLES) $(OTHER_EXAMPLES)
extras: $(EXTRA_LIB)
$(EX_FORMAT_DEC_OBJS): %.o: %.h
@ -379,11 +381,18 @@ examples/webpmux: imageio/libexample_util.a src/mux/libwebpmux.a
examples/webpmux: src/libwebpdecoder.a
extras/get_disto: extras/get_disto.o
extras/get_disto: imageio/libimagedec.a imageio/libexampledec.a
extras/get_disto: imageio/libimagedec.a
extras/get_disto: imageio/libexample_util.a
extras/get_disto: src/libwebp.a $(CWEBP_LIBS)
extras/get_disto: src/libwebp.a $(EXTRA_LIB)
extras/get_disto: EXTRA_LIBS += $(CWEBP_LIBS)
$(OUT_EXAMPLES) $(EXTRA_EXAMPLES):
extras/webp_quality: extras/webp_quality.o
extras/webp_quality: imageio/libimagedec.a
extras/webp_quality: imageio/libexample_util.a
extras/webp_quality: src/libwebp.a $(EXTRA_LIB)
extras/get_disto: EXTRA_LIBS += $(CWEBP_LIBS)
$(OUT_EXAMPLES) $(EXTRA_EXAMPLES) $(OTHER_EXAMPLES):
$(CC) -o $@ $^ $(LDFLAGS)
dist: DESTDIR := dist