vp8: Require latest libvpx release (1.1.0 from May 2012)

Fixes bug #684116 and simplifies configure checks.
This commit is contained in:
Sebastian Dröge 2012-09-16 10:56:07 +02:00
parent 829c1dcdaf
commit a2503e91bf
2 changed files with 4 additions and 39 deletions

View file

@ -1773,50 +1773,23 @@ AG_GST_CHECK_FEATURE(ZBAR, [ZBar barcode detector], zbar, [
dnl *** vp8 *** dnl *** vp8 ***
translit(dnm, m, l) AM_CONDITIONAL(USE_VP8, vp8) translit(dnm, m, l) AM_CONDITIONAL(USE_VP8, vp8)
AG_GST_CHECK_FEATURE(VP8, [VP8 decoder], vp8, [ AG_GST_CHECK_FEATURE(VP8, [VP8 decoder], vp8, [
PKG_CHECK_MODULES(VPX, vpx, [HAVE_VPX="yes"], [HAVE_VPX="no"]) PKG_CHECK_MODULES(VPX, vpx >= 1.1.0, [HAVE_VPX="yes"], [HAVE_VPX="no"])
if test $HAVE_VPX = "yes"; then if test $HAVE_VPX = "yes"; then
HAVE_VP8_ENCODER=no
HAVE_VP8_DECODER=no
OLD_LIBS="$LIBS" OLD_LIBS="$LIBS"
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $VPX_CFLAGS"
LIBS="$LIBS $VPX_LIBS" LIBS="$LIBS $VPX_LIBS"
AC_CHECK_LIB(vpx, vpx_codec_vp8_cx_algo, [ AC_CHECK_LIB(vpx, vpx_codec_vp8_cx_algo, [
HAVE_VP8=yes HAVE_VP8=yes
AC_DEFINE(HAVE_VP8_ENCODER, 1, [Defined if the VP8 encoder is available]) AC_DEFINE(HAVE_VP8_ENCODER, 1, [Defined if the VP8 encoder is available])
AC_MSG_CHECKING([for VP8E_SET_TUNING presence])
AC_TRY_COMPILE([
#include <vpx/vpx_encoder.h>
#include <vpx/vp8cx.h>
int foo=VP8E_SET_TUNING;
], [
return 0;
], [
AC_DEFINE(HAVE_VP8ENC_TUNING, 1, [Defined if the VP8 encoder has tuning API])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
])
]) ])
AC_CHECK_LIB(vpx, vpx_codec_vp8_dx_algo, [ AC_CHECK_LIB(vpx, vpx_codec_vp8_dx_algo, [
HAVE_VP8=yes HAVE_VP8=yes
AC_DEFINE(HAVE_VP8_DECODER, 1, [Defined if the VP8 decoder is available]) AC_DEFINE(HAVE_VP8_DECODER, 1, [Defined if the VP8 decoder is available])
AC_MSG_CHECKING([for VP8_MFQE presence])
AC_TRY_COMPILE([
#include <vpx/vpx_decoder.h>
#include <vpx/vp8dx.h>
int foo=VP8_MFQE;
], [
return 0;
], [
AC_DEFINE(HAVE_VP8_MFQE, 1, [Defined if the VP8 decoder has MFQE support])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
])
]) ])
LIBS="$OLD_LIBS" LIBS="$OLD_LIBS"
CFLAGS="$OLD_CFLAGS"
fi fi
AC_SUBST(VPX_LIBS) AC_SUBST(VPX_LIBS)
AC_SUBST(VPX_CFLAGS) AC_SUBST(VPX_CFLAGS)

View file

@ -54,10 +54,6 @@
GST_DEBUG_CATEGORY_STATIC (gst_vp8dec_debug); GST_DEBUG_CATEGORY_STATIC (gst_vp8dec_debug);
#define GST_CAT_DEFAULT gst_vp8dec_debug #define GST_CAT_DEFAULT gst_vp8dec_debug
#ifndef HAVE_VP8_MFQE
#define VP8_MFQE (1<<10)
#endif
#define DEFAULT_POST_PROCESSING FALSE #define DEFAULT_POST_PROCESSING FALSE
#define DEFAULT_POST_PROCESSING_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE) #define DEFAULT_POST_PROCESSING_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE)
#define DEFAULT_DEBLOCKING_LEVEL 4 #define DEFAULT_DEBLOCKING_LEVEL 4
@ -446,11 +442,7 @@ open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame)
if ((caps & VPX_CODEC_CAP_POSTPROC) && dec->post_processing) { if ((caps & VPX_CODEC_CAP_POSTPROC) && dec->post_processing) {
vp8_postproc_cfg_t pp_cfg = { 0, }; vp8_postproc_cfg_t pp_cfg = { 0, };
#ifndef HAVE_VP8_MFQE
pp_cfg.post_proc_flag = (dec->post_processing_flags & (~VP8_MFQE));
#else
pp_cfg.post_proc_flag = dec->post_processing_flags; pp_cfg.post_proc_flag = dec->post_processing_flags;
#endif
pp_cfg.deblocking_level = dec->deblocking_level; pp_cfg.deblocking_level = dec->deblocking_level;
pp_cfg.noise_level = dec->noise_level; pp_cfg.noise_level = dec->noise_level;