summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.decina@collabora.co.uk>2011-09-29 23:44:28 +0200
committerAlessandro Decina <alessandro.decina@collabora.co.uk>2011-09-29 23:46:28 +0200
commit85e8a453644b1e46edf8e52ff8722af9de13760f (patch)
tree68af008ebdf71b196501ae5edfe6ae8c59d64cc0
parent6a1945358120eedfc5dd0184c69ac3f5cd2d9b1d (diff)
viddec: workaround for the vc1 codec
Set memType=XDM_MEMTYPE_RAW on outbuf descs when the underlying memory is actually of type XDM_MEMTYPE_TILEDPAGE. This should be reverted once the codec is fixed.
-rw-r--r--src/gstducativc1dec.c3
-rw-r--r--src/gstducatividdec.c8
-rw-r--r--src/gstducatividdec.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/gstducativc1dec.c b/src/gstducativc1dec.c
index 2140353..c23c6b0 100644
--- a/src/gstducativc1dec.c
+++ b/src/gstducativc1dec.c
@@ -282,6 +282,9 @@ static void
gst_ducati_vc1dec_init (GstDucatiVC1Dec * self,
GstDucatiVC1DecClass * gclass)
{
+ GstDucatiVidDec *vdec = GST_DUCATIVIDDEC (self);
+
self->level = -1;
self->first_ts = GST_CLOCK_TIME_NONE;
+ vdec->pageMemType = XDM_MEMTYPE_RAW;
}
diff --git a/src/gstducatividdec.c b/src/gstducatividdec.c
index 231fd31..ad45c51 100644
--- a/src/gstducatividdec.c
+++ b/src/gstducatividdec.c
@@ -203,6 +203,12 @@ codec_prepare_outbuf (GstDucatiVidDec * self, GstBuffer * buf)
y_type = gst_ducati_get_mem_type (y_paddr);
uv_type = gst_ducati_get_mem_type (uv_paddr);
+ /* FIXME: workaround for the vc1 codec expecting _RAW when it's actually
+ * _TILEDPAGE... should be removed once the codec is fixed */
+ if (y_type == XDM_MEMTYPE_TILEDPAGE && self->pageMemType != y_type)
+ y_type = self->pageMemType;
+ if (uv_type == XDM_MEMTYPE_TILEDPAGE && self->pageMemType != uv_type)
+ uv_type = self->pageMemType;
if (y_type < 0 || uv_type < 0) {
GST_DEBUG_OBJECT (self, "non TILER buffer, fallback to bufferpool");
@@ -880,4 +886,6 @@ gst_ducati_viddec_init (GstDucatiVidDec * self, GstDucatiVidDecClass * klass)
*/
self->width = 128;
self->height = 128;
+
+ self->pageMemType = XDM_MEMTYPE_TILEDPAGE;
}
diff --git a/src/gstducatividdec.h b/src/gstducatividdec.h
index 190b953..a9ddd45 100644
--- a/src/gstducatividdec.h
+++ b/src/gstducatividdec.h
@@ -85,6 +85,8 @@ struct _GstDucatiVidDec
XDM2_BufDesc *outBufs;
VIDDEC3_InArgs *inArgs;
VIDDEC3_OutArgs *outArgs;
+
+ XDAS_Int16 pageMemType;
};
struct _GstDucatiVidDecClass