From 14317a34089126a1ad46ed03ce01d4de72fea558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 14 Aug 2012 11:09:46 +0200 Subject: [PATCH] vp8dec: Add support for the MFQE postprocessing flag Which is enabled by default if postprocessing is enabled. --- configure.ac | 13 +++++++++++++ ext/vp8/gstvp8dec.c | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cfdfa78766..822ddb7591 100644 --- a/configure.ac +++ b/configure.ac @@ -1790,6 +1790,19 @@ return 0; AC_CHECK_LIB(vpx, vpx_codec_vp8_dx_algo, [ HAVE_VP8=yes AC_DEFINE(HAVE_VP8_DECODER, 1, [Defined if the VP8 decoder is available]) + AC_MSG_CHECKING([for VP8_MFQE presence]) + AC_TRY_COMPILE([ +#include +#include +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" fi diff --git a/ext/vp8/gstvp8dec.c b/ext/vp8/gstvp8dec.c index 9eb1ca3615..1cddb5b1d4 100644 --- a/ext/vp8/gstvp8dec.c +++ b/ext/vp8/gstvp8dec.c @@ -54,8 +54,12 @@ GST_DEBUG_CATEGORY_STATIC (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_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK) +#define DEFAULT_POST_PROCESSING_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE) #define DEFAULT_DEBLOCKING_LEVEL 4 #define DEFAULT_NOISE_LEVEL 0 @@ -77,6 +81,7 @@ gst_vp8_dec_post_processing_flags_get_type (void) {C_FLAGS (VP8_DEBLOCK), "Deblock", "deblock"}, {C_FLAGS (VP8_DEMACROBLOCK), "Demacroblock", "demacroblock"}, {C_FLAGS (VP8_ADDNOISE), "Add noise", "addnoise"}, + {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"}, {0, NULL, NULL} }; static volatile GType id = 0; @@ -420,7 +425,11 @@ open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame) if ((caps & VPX_CODEC_CAP_POSTPROC) && dec->post_processing) { 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; +#endif pp_cfg.deblocking_level = dec->deblocking_level; pp_cfg.noise_level = dec->noise_level;