summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2011-03-05 03:57:09 +0000
committerRodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com>2011-03-05 03:57:09 +0000
commit15ca7b72e6bab5b5c243bb813ea20f9f612ebd78 (patch)
treedac653bddd3e90160fbd643b6f0b670c681ae80c /Source/Core
parentb8b81001bd41fccde6380a5a5adf8890a120c0c5 (diff)
some fixes for my last commit
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7289 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/TextureDecoder.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
index a04ef4ddcf..d08f37dfff 100644
--- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp
+++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
@@ -689,7 +689,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
if(width > 127 && height > 127)
{
//don't span to many threads they will kill the rest of the emu :)
- omp_set_num_threads(cpu_info.num_cores + 2 / 3);
+ omp_set_num_threads((cpu_info.num_cores + 2) / 3);
}
else
{
@@ -723,10 +723,10 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
#pragma omp parallel for
for (int y = 0; y < height; y += 8)
for (int x = 0, yStep = (y / 8) * Wsteps8; x < width; x += 8, yStep++)
- for (int iy = 0; iy < 8; iy++,yStep++)
+ for (int iy = 0, xStep = yStep * 8 ; iy < 8; iy++,xStep++)
for (int ix = 0; ix < 4; ix++)
{
- int val = src[4 * yStep + ix];
+ int val = src[4 * xStep + ix];
dst[(y + iy) * width + x + ix * 2] = Convert4To8(val >> 4);
dst[(y + iy) * width + x + ix * 2 + 1] = Convert4To8(val & 0xF);
}
@@ -962,7 +962,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
if(width > 127 && height > 127)
{
//don't span to many threads they will kill the rest of the emu :)
- omp_set_num_threads(cpu_info.num_cores + 2 / 3);
+ omp_set_num_threads((cpu_info.num_cores + 2) / 3);
}
else
{