" sample.a = 0.0;\n"
" output.Plane_0 = sample;\n";
+static const gchar templ_PACKED_YUV_TO_GRAY[] =
+ " float4 sample;\n"
+ " sample.x = shaderTexture[0].Sample(samplerState, input.Texture).%c;\n"
+ " sample.y = 0.0;\n"
+ " sample.z = 0.0;\n"
+ " sample.a = 0.0;\n"
+ " output.Plane_0 = sample;\n";
+
static const gchar templ_GRAY_to_GRAY_BODY[] =
" float4 sample;\n"
" sample.x = shaderTexture[0].Sample(samplerState, input.Texture).x;\n"
info->ps_body[0] = g_strdup_printf (templ_YUV_to_GRAY_BODY, scale);
break;
}
+ case GST_VIDEO_FORMAT_Y410:
+ {
+ gchar y, u, v;
+ get_packed_yuv_components (self, GST_VIDEO_FORMAT_Y410, &y, &u, &v);
+
+ info->ps_body[0] = g_strdup_printf (templ_PACKED_YUV_TO_GRAY, y);
+ break;
+ }
default:
GST_ERROR ("Unhandled input format %s",
gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (in_info)));
info->ps_body[1] =
g_strdup_printf (templ_GRAY_to_SEMI_PLANAR_CHROMA_BODY);
info->ps_output[1] = HLSL_PS_OUTPUT_ONE_PLANE_BODY;
+ break;
default:
GST_ERROR ("Unhandled output format %s",
gst_video_format_to_string (GST_VIDEO_INFO_FORMAT (out_info)));