src = ureg_DECL_vs_input(ureg, input_slot++);
dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 0);
ureg_MOV(ureg, dst, src);
-
- src = ureg_DECL_vs_input(ureg, input_slot++);
- dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 1);
- ureg_MOV(ureg, dst, src);
-
- src = ureg_DECL_vs_input(ureg, input_slot++);
- dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 2);
- ureg_MOV(ureg, dst, src);
}
if (is_composite) {
ureg_TEX(ureg, v,
TGSI_TEXTURE_2D, pos, v_sampler);
+ ureg_SUB(ureg, u, ureg_src(u),
+ ureg_scalar(matrow0, TGSI_SWIZZLE_W));
+ ureg_SUB(ureg, v, ureg_src(v),
+ ureg_scalar(matrow0, TGSI_SWIZZLE_W));
+
ureg_MUL(ureg, rgb,
ureg_scalar(ureg_src(y), TGSI_SWIZZLE_X),
matrow0);
/* The ITU-R BT.601 conversion matrix for SDTV. */
+/* original, matrix, but we transpose it to
+ * make the shader easier
static const float bt_601[] = {
- 1.0, 0.0, 1.4075, 0,
+ 1.0, 0.0, 1.4075, ,
1.0, -0.3455, -0.7169, 0,
1.0, 1.7790, 0., 0,
+};*/
+static const float bt_601[] = {
+ 1.0, 1.0, 1.0, 0.5,
+ 0.0, -0.3455, 1.7790, 0,
+ 1.4075, -0.7169, 0., 0,
};
/* The ITU-R BT.709 conversion matrix for HDTV. */
+/* original, but we transpose to make the conversion
+ * in the shader easier
static const float bt_709[] = {
1.0, 0.0, 1.581, 0,
1.0, -0.1881, -0.47, 0,
1.0, 1.8629, 0., 0,
+};*/
+static const float bt_709[] = {
+ 1.0, 1.0, 1.0, 0.5,
+ 0.0, -0.1881, 1.8629, 0,
+ 1.581,-0.47 , 0.0, 0,
};
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)