summaryrefslogtreecommitdiff
path: root/sys/mfc
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-24 12:10:24 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-12-31 15:59:06 +0100
commit94acf4189ca53a1145ddfa32c75f277324b37daf (patch)
tree3a6e6e2140c24e43e3238ae13804e3b93a268755 /sys/mfc
parent440dec8a6807890969dc37b454098a9241fc4f5b (diff)
downloadgstreamer-plugins-bad-94acf4189ca53a1145ddfa32c75f277324b37daf.tar.gz
mfc: Try with I420 for now, it's easier to debug
Diffstat (limited to 'sys/mfc')
-rw-r--r--sys/mfc/gstmfcdec.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/mfc/gstmfcdec.c b/sys/mfc/gstmfcdec.c
index d87680d24..238637899 100644
--- a/sys/mfc/gstmfcdec.c
+++ b/sys/mfc/gstmfcdec.c
@@ -52,7 +52,7 @@ static GstStaticPadTemplate gst_mfc_dec_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("NV12"))
+ GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("I420"))
);
#define parent_class gst_mfc_dec_parent_class
@@ -354,7 +354,7 @@ gst_mfc_dec_dequeue_output (GstMFCDec * self)
NULL, crop_left, crop_top, crop_width, crop_height) < 0)
goto fimc_src_error;
- if (fimc_set_dst_format_direct (fimc, FIMC_COLOR_FORMAT_YUV420SPT, width,
+ if (fimc_set_dst_format_direct (fimc, FIMC_COLOR_FORMAT_YUV420P, width,
height, crop_left, crop_top, crop_width, crop_height, self->dst,
self->stride) < 0)
goto fimc_dst_error;
@@ -381,7 +381,7 @@ gst_mfc_dec_dequeue_output (GstMFCDec * self)
gst_video_codec_state_unref (state);
state =
gst_video_decoder_set_output_state (GST_VIDEO_DECODER (self),
- GST_VIDEO_FORMAT_NV12, crop_width, crop_height, self->input_state);
+ GST_VIDEO_FORMAT_I420, crop_width, crop_height, self->input_state);
}
if ((mfc_ret = mfc_dec_dequeue_output (self->context, &mfc_outbuf)) < 0) {
@@ -464,7 +464,19 @@ gst_mfc_dec_dequeue_output (GstMFCDec * self)
src_stride = self->stride[1];
dst_stride = GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 1);
for (i = 0; i < h; i++) {
- memcpy (dst_, src_, w * 2);
+ memcpy (dst_, src_, w);
+ dst_ += dst_stride;
+ src_ += src_stride;
+ }
+
+ dst_ = (guint8 *) GST_VIDEO_FRAME_PLANE_DATA (&vframe, 2);
+ src_ = self->dst[2];
+ h = GST_VIDEO_FRAME_COMP_HEIGHT (&vframe, 2);
+ w = GST_VIDEO_FRAME_COMP_WIDTH (&vframe, 2);
+ src_stride = self->stride[2];
+ dst_stride = GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 2);
+ for (i = 0; i < h; i++) {
+ memcpy (dst_, src_, w);
dst_ += dst_stride;
src_ += src_stride;
}