gint stride[GST_VIDEO_MAX_PLANES] = { nstride, 0, };
switch (GST_VIDEO_INFO_FORMAT (&pool->video_info)) {
+ case GST_VIDEO_FORMAT_ABGR:
+ case GST_VIDEO_FORMAT_ARGB:
+ case GST_VIDEO_FORMAT_RGB16:
+ case GST_VIDEO_FORMAT_BGR16:
+ case GST_VIDEO_FORMAT_YUY2:
+ case GST_VIDEO_FORMAT_UYVY:
+ case GST_VIDEO_FORMAT_YVYU:
+ case GST_VIDEO_FORMAT_GRAY8:
+ break;
case GST_VIDEO_FORMAT_I420:
stride[1] = nstride / 2;
offset[1] = offset[0] + stride[0] * nslice;
offset[2] = offset[1] + (stride[1] * nslice / 2);
break;
case GST_VIDEO_FORMAT_NV12:
+ case GST_VIDEO_FORMAT_NV16:
stride[1] = nstride;
offset[1] = offset[0] + stride[0] * nslice;
break;
guint p;
switch (GST_VIDEO_INFO_FORMAT (vinfo)) {
+ case GST_VIDEO_FORMAT_ABGR:
+ case GST_VIDEO_FORMAT_ARGB:
+ dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 4;
+ break;
+ case GST_VIDEO_FORMAT_RGB16:
+ case GST_VIDEO_FORMAT_BGR16:
+ case GST_VIDEO_FORMAT_YUY2:
+ case GST_VIDEO_FORMAT_UYVY:
+ case GST_VIDEO_FORMAT_YVYU:
+ dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo) * 2;
+ break;
+ case GST_VIDEO_FORMAT_GRAY8:
+ dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
+ break;
case GST_VIDEO_FORMAT_I420:
dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
src_stride[1] = nstride / 2;
dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo);
dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo) / 2;
break;
+ case GST_VIDEO_FORMAT_NV16:
+ dst_width[0] = GST_VIDEO_INFO_WIDTH (vinfo);
+ src_stride[1] = nstride;
+ src_size[1] = src_stride[1] * nslice;
+ dst_width[1] = GST_VIDEO_INFO_WIDTH (vinfo);
+ dst_height[1] = GST_VIDEO_INFO_HEIGHT (vinfo);
+ break;
default:
g_assert_not_reached ();
break;