| View previous topic :: View next topic |
| Author |
Message |
realjoeeye1
Joined: 30 Aug 2008 Posts: 20
|
Posted: Fri Sep 05, 2008 7:00 pm Post subject: Anyone knows how to do YUV2RGB faster? |
|
|
I'm now using a simple method below, but I think it is not fast enough, hope some faster methods or sceGU hardware functions.
Codes:
for(m=0;m<16;m++)
{
vp=&pic_buffer[ii][begin_m+m][begin_n];
mm=m>>1;
mn=(m>>3)*2;
for(n=0;n<16;n++)
{
Y=iclpp[dct_recon[mn+(n>>3)][m&7][n&7]];
nn=n>>1;
*(vp++)=R_table[Y][dct_recon[5][mm][nn]];
*(vp++)=iclpp[Y-G_table[dct_recon[4][mm][nn]][dct_recon[5][mm][nn]]];
*(vp++)=B_table[Y][dct_recon[4][mm][nn]];
}
}
R_table,G_table and B_table are tables that instead of the calculations. |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Fri Sep 05, 2008 7:08 pm Post subject: |
|
|
| The most nifty way would be similar to how I do the Mac 24 bit refresh, converting Mac 24 bit video to PSP 24 bit video. Do multiple passes with custom palettes. Just look at the refresh24() code in Basilisk II to see what I mean. This would use the GPU, so it'd be pretty fast while leaving the CPU free to do whatever. |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Sat Sep 06, 2008 3:42 pm Post subject: |
|
|
You can move all the calculation on mm and m outside the inner loop, and try using more pointer arithmetic. That will help a bit.
.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Sat Sep 06, 2008 6:28 pm Post subject: |
|
|
| VFPU? ME? |
|
| Back to top |
|
 |
|