summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <[email protected]>2010-11-14 20:14:25 +0100
committerChristian König <[email protected]>2010-11-14 20:14:25 +0100
commit3886295a0cd1a51b1fa82fb076d826471d4697bb (patch)
treeb16c516ef959786ba46e4e22a877c3555a264c2a
parent48e19e8f35b2bbf437f6dcfe3213098690b8c925 (diff)
[g3dvl] remove need for XVMC_INTRA_UNSIGNED
Move from unsigned to signed intra dct blocks. You also need to update xf86-video-ati for this to work.
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
index fb420cbe1f7..5c0404b4b07 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_mc_renderer.c
@@ -341,7 +341,7 @@ fetch_ycbcr(struct vl_mpeg12_mc_renderer *r, struct ureg_program *shader, struct
ureg_MOV(shader, ureg_writemask(t_tc, TGSI_WRITEMASK_Z), ureg_scalar(eb[0][0], TGSI_SWIZZLE_X + i));
}
- /* Nouveau can't writemask tex dst regs (yet?), do in two steps */
+ /* Nouveau and r600g can't writemask tex dst regs (yet?), do in two steps */
ureg_TEX(shader, tmp, TGSI_TEXTURE_3D, ureg_src(t_tc), sampler[i]);
ureg_MOV(shader, ureg_writemask(texel, TGSI_WRITEMASK_X << i), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X));
}
@@ -368,11 +368,13 @@ create_intra_frag_shader(struct vl_mpeg12_mc_renderer *r)
/*
* texel = fetch_ycbcr()
- * fragment = texel * scale
+ * fragment = texel * scale + 0.5
*/
field = calc_field(shader);
texel = fetch_ycbcr(r, shader, field);
- ureg_MUL(shader, fragment, ureg_src(texel), ureg_scalar(ureg_imm1f(shader, SCALE_FACTOR_16_TO_9), TGSI_SWIZZLE_X));
+ ureg_MAD(shader, fragment, ureg_src(texel),
+ ureg_scalar(ureg_imm1f(shader, SCALE_FACTOR_16_TO_9), TGSI_SWIZZLE_X),
+ ureg_scalar(ureg_imm1f(shader, 0.5f), TGSI_SWIZZLE_X));
ureg_release_temporary(shader, field);
ureg_release_temporary(shader, texel);