diff options
author | Younes Manton <[email protected]> | 2008-08-03 18:21:13 -0400 |
---|---|---|
committer | Younes Manton <[email protected]> | 2008-08-03 18:21:13 -0400 |
commit | 7fde9febd6f212494730ebef916fe25c95d30be9 (patch) | |
tree | cbcbe324c88148151ff3eee6a60ed5afb61cd4e2 /src/gallium/state_trackers/g3dvl | |
parent | a55ced56760f90fe84794b23c557050403d514b2 (diff) |
g3dvl: Temporarily disable IDCT.
Diffstat (limited to 'src/gallium/state_trackers/g3dvl')
-rw-r--r-- | src/gallium/state_trackers/g3dvl/vl_context.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/g3dvl/vl_surface.c | 30 |
2 files changed, 19 insertions, 15 deletions
diff --git a/src/gallium/state_trackers/g3dvl/vl_context.c b/src/gallium/state_trackers/g3dvl/vl_context.c index 542ba996a7e..d446d218a44 100644 --- a/src/gallium/state_trackers/g3dvl/vl_context.c +++ b/src/gallium/state_trackers/g3dvl/vl_context.c @@ -1625,8 +1625,8 @@ static int vlInitMC(struct VL_CONTEXT *context) context->states.mc.viewport.translate[2] = 0; context->states.mc.viewport.translate[3] = 0; - context->states.mc.render_target.width = context->video_width; - context->states.mc.render_target.height = context->video_height; + context->states.mc.render_target.width = vlRoundUpPOT(context->video_width); + context->states.mc.render_target.height = vlRoundUpPOT(context->video_height); context->states.mc.render_target.num_cbufs = 1; /* FB for MC stage is a VL_SURFACE, set in vlSetRenderSurface() */ context->states.mc.render_target.zsbuf = NULL; diff --git a/src/gallium/state_trackers/g3dvl/vl_surface.c b/src/gallium/state_trackers/g3dvl/vl_surface.c index 6d4e14b95c3..1386b1107cc 100644 --- a/src/gallium/state_trackers/g3dvl/vl_surface.c +++ b/src/gallium/state_trackers/g3dvl/vl_surface.c @@ -10,6 +10,9 @@ #include "vl_defs.h" #include "vl_util.h" +/*#define DO_IDCT*/ + +#ifdef DO_IDCT static int vlTransformBlock(short *src, short *dst, short bias) { static const float basis[8][8] = @@ -62,6 +65,7 @@ static int vlTransformBlock(short *src, short *dst, short bias) } return 0; } +#endif static int vlGrabFrameCodedBlock(short *src, short *dst, unsigned int dst_pitch) { @@ -132,8 +136,6 @@ static int vlGrabBlocks unsigned int tex_pitch; unsigned int tb, sb = 0; - short temp_block[64]; - assert(context); assert(blocks); @@ -151,22 +153,23 @@ static int vlGrabBlocks { if ((coded_block_pattern >> (5 - tb)) & 1) { - if (sample_type == VL_FULL_SAMPLE) - vlTransformBlock(blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT, temp_block, 128); - else - vlTransformBlock(blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT, temp_block, 0); + short *cur_block = blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT; + +#ifdef DO_IDCT + vlTransformBlock(cur_block, cur_block, sample_type == VL_FULL_SAMPLE ? 128 : 0); +#endif if (dct_type == VL_DCT_FRAME_CODED) vlGrabFrameCodedBlock ( - temp_block, + cur_block, texels + tb * tex_pitch * VL_BLOCK_HEIGHT, tex_pitch ); else vlGrabFieldCodedBlock ( - blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT, + cur_block, texels + (tb % 2) * tex_pitch * VL_BLOCK_HEIGHT + (tb / 2) * tex_pitch, tex_pitch ); @@ -194,14 +197,15 @@ static int vlGrabBlocks if ((coded_block_pattern >> (1 - tb)) & 1) { - if (sample_type == VL_FULL_SAMPLE) - vlTransformBlock(blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT, temp_block, 128); - else - vlTransformBlock(blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT, temp_block, 0); + short *cur_block = blocks + sb * VL_BLOCK_WIDTH * VL_BLOCK_HEIGHT; + +#ifdef DO_IDCT + vlTransformBlock(cur_block, cur_block, sample_type == VL_FULL_SAMPLE ? 128 : 0); +#endif vlGrabFrameCodedBlock ( - temp_block, + cur_block, texels, tex_pitch ); |