forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Anyone knows how to do YUV2RGB faster?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
realjoeeye1



Joined: 30 Aug 2008
Posts: 20

PostPosted: Fri Sep 05, 2008 7:00 pm    Post subject: Anyone knows how to do YUV2RGB faster? Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Sep 05, 2008 7:08 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Sat Sep 06, 2008 3:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sat Sep 06, 2008 6:28 pm    Post subject: Reply with quote

VFPU? ME?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group