summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi/gstvaapidisplay.c
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-01-18 10:22:58 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-01-24 10:11:59 +0100
commitc42ba571a8acac44a18625b17c446e0d76a00ffc (patch)
tree0aa43aabef7f723554fe7be2428e5f81599e2602 /gst-libs/gst/vaapi/gstvaapidisplay.c
parent29623239b9a0eda74a102e603c4375d8961a9fc2 (diff)
downloadgst-vaapi-c42ba571a8acac44a18625b17c446e0d76a00ffc.tar.gz
display: report H.263 Baseline profile.
HACK: expose GST_VAAPI_PROFILE_H263_BASELINE for decoding if MPEG-4:2 Simple profile (VAProfileMPEG4Simple) is supported.
Diffstat (limited to 'gst-libs/gst/vaapi/gstvaapidisplay.c')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidisplay.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c
index 94c6e67c..e975c638 100644
--- a/gst-libs/gst/vaapi/gstvaapidisplay.c
+++ b/gst-libs/gst/vaapi/gstvaapidisplay.c
@@ -30,6 +30,7 @@
#include "gstvaapiutils.h"
#include "gstvaapidisplay.h"
#include "gstvaapidisplay_priv.h"
+#include "gstvaapiworkarounds.h"
#define DEBUG 1
#include "gstvaapidebug.h"
@@ -182,6 +183,36 @@ find_config(
return FALSE;
}
+/* HACK: append H.263 Baseline profile if MPEG-4:2 Simple profile is supported */
+static void
+append_h263_config(GArray *configs)
+{
+ GstVaapiConfig *config, tmp_config;
+ GstVaapiConfig *mpeg4_simple_config = NULL;
+ GstVaapiConfig *h263_baseline_config = NULL;
+ guint i;
+
+ if (!WORKAROUND_H263_BASELINE_DECODE_PROFILE)
+ return;
+
+ if (!configs)
+ return;
+
+ for (i = 0; i < configs->len; i++) {
+ config = &g_array_index(configs, GstVaapiConfig, i);
+ if (config->profile == GST_VAAPI_PROFILE_MPEG4_SIMPLE)
+ mpeg4_simple_config = config;
+ else if (config->profile == GST_VAAPI_PROFILE_H263_BASELINE)
+ h263_baseline_config = config;
+ }
+
+ if (mpeg4_simple_config && !h263_baseline_config) {
+ tmp_config = *mpeg4_simple_config;
+ tmp_config.profile = GST_VAAPI_PROFILE_H263_BASELINE;
+ g_array_append_val(configs, tmp_config);
+ }
+}
+
/* Convert configs array to profiles as GstCaps */
static GstCaps *
get_profile_caps(GArray *configs)
@@ -439,6 +470,7 @@ gst_vaapi_display_create(GstVaapiDisplay *display)
}
}
}
+ append_h263_config(priv->decoders);
/* VA image formats */
formats = g_new(VAImageFormat, vaMaxNumImageFormats(priv->display));