PMP(PSP Media Player)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Ranwanui
Posts: 7
Joined: Sat Oct 15, 2005 10:33 pm

Post by Ranwanui »

use asm version:
480:272---OK
-3: 272 ----Only Audio;

use c version:(replace csc_asm() with csc_c() in me_csc.c)
480:272 ---OK
-3:272 -----OK
But the stream control cannot work corrently
(push D pad or L\R trigger);
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

what is "-3" ?


EDIT:
there are restrictions on my csc routines:

csc_c -> (width mod 2) = 0 and (height mod 2) = 0
csc_asm -> (width mod 8) = 0 and (height mod 2) = 0

me_csc with csc_c -> (width mod 2) = 0 and (height mod 4) = 0
me_csc with csc_asm -> (width mod 8) = 0 and (height mod 4) = 0


anyway a decent mpeg4 stream should have (width mod 8) = 0 and (height mod 8) = 0
a good stream (width mod 16) = 0 and (height mod 16) = 0
Ranwanui
Posts: 7
Joined: Sat Oct 15, 2005 10:33 pm

Post by Ranwanui »

I see.

"-3" means auto adapt with another parameter.
"-3:272" means auto adjust height to adapt the 272 width in 4:3
dnnsmanace
Posts: 15
Joined: Mon Oct 31, 2005 8:46 am

Post by dnnsmanace »

Anyone know how they are decoding xvid in PSPAdvance?

www.pspadvance.com
Dibblah
Posts: 13
Joined: Thu Nov 03, 2005 7:16 pm

Post by Dibblah »

dnnsmanace wrote:Anyone know how they are decoding xvid in PSPAdvance?

www.pspadvance.com
Using the XviD codec directly.

See http://forums.qj.net/showthread.php?p=239663#post239663
someone
Idiot
Posts: 71
Joined: Tue Sep 13, 2005 9:03 pm

Post by someone »

dnnsmanace wrote:Anyone know how they are decoding xvid in PSPAdvance?

www.pspadvance.com
Well, in a crappy way I have to say. ch1.avi (the xvid in the freeware preview) is a lowres 10fps crappy vid, with external audio (ch1.mp3).
Replace ch1.avi with a xvid you've made and you will find that PSP Media Player its already way faster than PSPAdvance in xvid playback (at least for this preview release of PSPAdvance).
PSPAdvance is one week away from release.....and this slow performance make me think..........
Dibblah
Posts: 13
Joined: Thu Nov 03, 2005 7:16 pm

Post by Dibblah »

To be clear, they *cannot* use the XviD codec in a commercial application, without providing source. So what they're doing is breaking the license agreement for the XviD codec.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

They are ignoring GPL and they are ignoring Lua license too!!!
andresilich
Posts: 13
Joined: Tue Aug 09, 2005 1:43 am
Location: massachusetts

Post by andresilich »

that software is also licensed with sony, so this should be a fun turn events if they actually ignore all this licenses agreements.


have you seen the thing, ADS in the PSP, they went there.
Shapyi
Posts: 95
Joined: Mon Apr 25, 2005 9:31 am

Post by Shapyi »

PSPAdvance seems to be DJSP (which he wrote), the open source psix demo, Lua and XviD compiled into one program. It seems to freeze a lot when I use it, I won't be buying it. Don't be surprised if you guys see this FFMPEG port in it.

Back on topic. How come I get all these exceptions when I play a clip in PSP Media Player after I already played one? Is there a way to fix this in code? Maybe reset a buffer or reset some variables.
romhacker
Posts: 6
Joined: Mon Feb 07, 2005 4:57 am

Post by romhacker »

I found it played MPEG quite well for the first 20 secs or so, then it crashed. Keep up the good work.
digihoe
Posts: 108
Joined: Sat May 14, 2005 7:40 pm

Post by digihoe »

Yes, I have also found that it will slow down playback after a few seconds, anyone know what the problem is?

Best regards!
romhacker
Posts: 6
Joined: Mon Feb 07, 2005 4:57 am

Post by romhacker »

Pressing Triangle helps a lot (sets the CPU Speed to 333).
dnnsmanace
Posts: 15
Joined: Mon Oct 31, 2005 8:46 am

Post by dnnsmanace »

Seems its very close to playable... XviD that is. Im using avg 600 bitrate 2 pass. When motion gets high (higher bitrate) it goes crazy and stutters and such, but it seems to catch up when things quiet down. Otherwise the quality is amazing. Is anyone still working on this? A video I was playing (its about 20min) crashed after the first minute or so, first audio cut out then video stopped and it froze. Seems like its very close to being watchable in terms of optimization. Anyway, my 2 cents. Hope to see progress soon and you devs are amazing.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

I've got some idct optimizations working, video *only* runs at 28-30fps here on my psp :) (with the usual mpeg4 sp clip @ 480x272).
The bad side is that i've completely broken bframes (stupid me for testing only sp).
Anyway, still working on this. Full speed/stability will require some time (maybe will never get this :P), keep posting and don't worry if none answer, maybe one day you'll get a surprise ^^
digihoe
Posts: 108
Joined: Sat May 14, 2005 7:40 pm

Post by digihoe »

Nice to see that you been able to make some idct optimizations jonny...
What bitrate are your SP clip? 1500kbs?
Is there any other way to play mp3 without using the CPU that much (wishthinking), or maybe ogg (it should be less CPU intensive, right?) can be used...?


Great to see progress, keep up the great work!

Best regards!
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

the average bitrate on my tests is around 900 (you don't get more with an 1GB memstick and a 2h movie).
I can tell you nothing about the audio, i've still not added it on my benchs (there are differents libs and formats to check)
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

A new bin:

http://jonny.leffe.dnsalias.com/pmp_mod ... d_0_02.rar

The idct is now done with the me too.
On a row basis, idcts are done at the same time of macroblocks decoding and motion compensation.
The remaining idcts are processed with both the cpu and the me.

I'm still experimenting different idct scheduling schemes (me sync is far from perfection).
The cache is a real nightmare when using the me.

Some numbers with my usual test clips:

avcodec_decode_video is passed from ~32fps to ~44fps

Video only is around 28-30fps (playing without any kind of sync seems quite smooth, sadly PMP seems to stutters a lot - i have to investigate on this).

Anyway... still tweaking :)


I've repacked the sources mainly to get some order on my hd:

http://jonny.leffe.dnsalias.com/pmp_mod ... source.rar (JockyW base src, hey! "COPYING" was 2MB+ no one noticed this? :)
http://jonny.leffe.dnsalias.com/pmp_mod ... source.rar (my first mod, with JiniCho's suggestions included)
http://jonny.leffe.dnsalias.com/pmp_mod ... source.rar (my latest src)


PS:
I've done some benchs with the vfpu (on the idct), imho is still not usable.
While matrix muls are really fast, int -> float and float -> int (with the cop) kill the process (i hope someone find a way to load/write directly ints to/from the vfpu).



Mirror for the files:

http://rapidshare.de/files/7693264/pmp_ ... e.rar.html
http://rapidshare.de/files/7693364/pmp_ ... e.rar.html
http://rapidshare.de/files/7693442/pmp_ ... e.rar.html
http://rapidshare.de/files/7693484/pmp_ ... 2.rar.html
JiniCho
Posts: 18
Joined: Wed Sep 14, 2005 11:03 am

Post by JiniCho »

Great work! it seems like it's fast enough to play fullscreen mpeg4 video for PSP.
One problem here, when i play .mpg file i see bunch of small green blocks instead of video. Maybe its because of the codec only prepare me_idct when the video is h263.
dnnsmanace
Posts: 15
Joined: Mon Oct 31, 2005 8:46 am

Post by dnnsmanace »

When loading an about 100mb avi xvid the app crashes with a "Bus error (data)." This didnt on the previous version on the same file. I can say on small samples, video is a lot smoother and audio is a lot more in sync. Keep up the progress!
JiniCho
Posts: 18
Joined: Wed Sep 14, 2005 11:03 am

Post by JiniCho »

Anyway, I merged jonny's optimization to my latest source code.

here's the link

http://mfiles.naver.net/9547a07a6e3158e ... part01.rar
http://mfiles.naver.net/68ba5d8793cca51 ... part02.rar
http://mfiles.naver.net/9a48af75613e57e ... part03.rar

right click on the link and choose "Save As.."

here's very simple description.

PSP Media Player ver. 0.0.6

- Including jonny's idct optimization.(many thanks to jonny)
- doing overlay using gu. I refferenced the document from http://www.multimedia.cx/yuv-3d-rgb.txt.
- .mp4 playable.(with sound)
- you can use your favorate true type font. locate "default.ttf" into "PMP/font" directory.(it's buggy)
User avatar
Itaintrite
Posts: 54
Joined: Fri Jul 15, 2005 12:32 pm

Post by Itaintrite »

Broken links JiniCho
JiniCho
Posts: 18
Joined: Wed Sep 14, 2005 11:03 am

Post by JiniCho »

just right click on the link and choose 'save as' not left click.
User avatar
Itaintrite
Posts: 54
Joined: Fri Jul 15, 2005 12:32 pm

Post by Itaintrite »

Nevermind, it was Firefox's fault. I tried it with IE and worked. THanks
JiniCho
Posts: 18
Joined: Wed Sep 14, 2005 11:03 am

Post by JiniCho »

I missed something in the source code.

find LANGUAGE_KOREAN and change it to LANGUAGE_ENGLISH in ffplay_resample/ffplay.c

(in the same file)
make init_ttf_font() function like below

int init_ttf_font(char *filename, font_info *font, int ptsize)
{
int result = 0;

if (filename)
{
strcpy(font->filename, filename);
if (TTF_Init() >= 0)
{
font->ptsize = ptsize;
font->renderstyle = TTF_STYLE_NORMAL;
font->rendersolid = 1;
font->font = TTF_OpenFont(filename, font->ptsize);
if (font->font)
{
TTF_SetFontStyle(font->font, font->renderstyle);
result = 1;
}
}
}
return result;
}

and in the player_main(), insert one line like below...

int player_main(SceSize args, void* argp)
{
media_type type;
const char *txt;

// pspDebugScreenInit();
// SetupCallbacks();
// pspDebugInstallErrorHandler(MyExceptionHandler);

if (use_ttf_font)
{
if (!init_ttf_font(DEFAULT_FONTNAME, &my_font, DEFAULT_PTSIZE))
{
if (!init_font())
{
printf("Failed to initialize font!!!");
return 1;
}
use_ttf_font = 0; <== insert this line
ttf_failed = 1;
}
}

you have to do that if you don't use ttf stuff.
Sorry for the trouble...

Because of my blog's upload limit I can't post fixed source code.
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

the jonny version plays my full resoltion avi file good, with the audio synchronized and this time, with no glitches.
the jinicho version has more problems with the synchronization, but it plays mp4 (320x240 i've tried) with sound very well (and synchronized).

oh, i hope that johny integrates the mp4 audio in his next version :) Both of you are doing a great work to let us have what $ony don't want, see full resolutions videos in the psp.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

Many thanks for the merge (is there a place where i can check for your updates?).
Really curious to check the new csc :) (sadly i'm not at home now)
Maybe its because of the codec only prepare me_idct when the video is h263.
Yep it's true, i'll fix this soon.

PS:
you could use http://rapidshare.de to upload files

EDIT:
i've uploaded your files here:
http://rapidshare.de/files/7713059/PMP0 ... 1.rar.html
http://rapidshare.de/files/7713138/PMP0 ... 2.rar.html
http://rapidshare.de/files/7713159/PMP0 ... 3.rar.html
dnnsmanace
Posts: 15
Joined: Mon Oct 31, 2005 8:46 am

Post by dnnsmanace »

Could someone compile JiniCho's version with the fix please? Thanks.
digihoe
Posts: 108
Joined: Sat May 14, 2005 7:40 pm

Post by digihoe »

dnnsmanace wrote:Could someone compile JiniCho's version with the fix please? Thanks.
Maybe when jonny fixes the me_idct for other codecs than h263 it can be complied...?

Also very good work guys, keep it up!
Post Reply