Pandora improved SDL for pandora


Joined
Oct 9, 2008
Messages
132
If this worked, we could finally be able to play video without the ugly tearing that affects all the video players on the pandora.
Try building mplayer with some hacks I just pushed, and run it with -vo omapfb .

Thank you, that works wonderfully!


I did however run into an odd issue with video's I have encoded. I have been using a tool called xvidenc which is a command line frontend to mencoder to encode videos for the Pandora. With just these videos if I use -vo omapfb I see evenly spaced horizontal lines in the video that are off in color. I don't see this if I play with -vo xv or in other media players.


The good news is that this can probably be worked around with different encoding options, but I am curious why this is happening. This is an example mencoder command line for a dvdrip I made of a tv show that gives me the horizontal lines:



Code:
/usr/bin/mencoder "dvd://2" -o "/home/pder/bbt1.avi" -vc mpeg12 -dvd-device THE_BIG_BANG_THEORY_SEASON1_D1 -nosub -vf softskip,scale=624:352:0,harddup -sws 10 -aid 128 -oac mp3lame -lameopts abr:br=140:aq=4:vol=2.2:mode=1 -ovc xvid -xvidencopts bitrate=1200:threads=2:me_quality=6:vhq=3:max_bframes=2:bvhq=1:trellis:chroma_me:chroma_opt:hq_ac:nolumi_mask:closed_gop:noqpel:nogmc:nopacked:rc_reaction_delay_factor=0:rc_averaging_period=100:autoaspect:nointerlacing
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
With just these videos if I use -vo omapfb I see evenly spaced horizontal lines in the video that are off in color. I don't see this if I play with -vo xv or in other media players.
that omapfb code uses some NEON color space converter, maybe it has some bug. Can you make a small video sample that demonstrates the problem? I don't have any DVDs here.
 

PokeParadox

Founder of Pirate Games - Penjin Coder
Staff member
Joined
Dec 8, 2005
Messages
6,603
Age
39
Location
UK
Website
pokeparadox.itch.io
WEBSITE
https://github.com/pokeparadox
YOUTUBE
pokeparadox
Is it possible to check if the right version of SDL is available.


I've tried setting the environment vars regardless and it crashes current(non Notaz optimised) SDL I was hoping it would just fail silently, but it segfaults.


I'm trying to avoid having to package SDL invidually with each app so that it will just work once it works it's way into a hotfix...


EDIT: Also yes this has sped up alpha operations in PandoraPanic! I'm working on a release... I'm still getting some weird flickering once VSYNC and or Doublebuff is enabled. This is on things like the credits where I rotate Pandora logos with motion blur(this copies the frame and the re-blits it with a reduced alpha value)


Anyway ideas on how to get around this issue?
 
Last edited by a moderator:

mcobit

Advanced Member
Joined
Jul 28, 2008
Messages
6,910
These glitches happen, when only part of the screen is updating. Notaz made the doublebuffer optional for this reason.
 

mcobit

Advanced Member
Joined
Jul 28, 2008
Messages
6,910
Nothing HAS to be rebuild. The old one will work fine for most stuff. Just some games etc. Might profit from the new features this release has and the authors of them might consider updating.
 

mcobit

Advanced Member
Joined
Jul 28, 2008
Messages
6,910
You can relace it without hassle in most cases, but it is notneeded for apps, thatalready work good with the old one :)
 
Joined
Mar 8, 2010
Messages
130
Yes :)


But my intention was: Why do we need multiple versions of SDL? Wouldnt it be nicer if we would enhance the current lib instead of creating several libs each with its own upsides and downsides?
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Is it possible to check if the right version of SDL is available.


I've tried setting the environment vars regardless and it crashes current(non Notaz optimised) SDL I was hoping it would just fail silently, but it segfaults.
Does it really segfault? I think it returns an error gracefully, that omapdss backend is not available.


You can do detection in the app, first set SDL_VIDEODRIVER and try to do SDL_SetVideoMode (or was it SDL_Init), if that fails call unsetenv() and retry.


Or you maybe grep for omapdss in /usr/lib/libSDL in the launch script but that's more dirty.

But my intention was: Why do we need multiple versions of SDL? Wouldnt it be nicer if we would enhance the current lib instead of creating several libs each with its own upsides and downsides?
Because my hack is not feature complete and wold break all windowed apps, for example. The source is open, feel free to improve it to make 100% compatible and we can merge them.
 
Last edited by a moderator:

sebt3

homebrew player (P. & C.)
Joined
Sep 9, 2008
Messages
4,886
Age
42
Location
France
Website
sebt3.openpandora.org
Yes :)


But my intention was: Why do we need multiple versions of SDL? Wouldnt it be nicer if we would enhance the current lib instead of creating several libs each with its own upsides and downsides?

I've also arranged this to be included in HF7 people don't have to ship this with their apps.
 
Joined
Mar 8, 2010
Messages
130
Because my hack is not feature complete and wold break all windowed apps, for example. The source is open, feel free to improve it to make 100% compatible and we can merge them.
If I will ever get my pandora I might try, but I have never seen the SDL code before and don't know if I can do that.


@sebt3: Are you trying to tell me, that we already have 2 libs in the firmware?
 

PokeParadox

Founder of Pirate Games - Penjin Coder
Staff member
Joined
Dec 8, 2005
Messages
6,603
Age
39
Location
UK
Website
pokeparadox.itch.io
WEBSITE
https://github.com/pokeparadox
YOUTUBE
pokeparadox
Is it possible to check if the right version of SDL is available.


I've tried setting the environment vars regardless and it crashes current(non Notaz optimised) SDL I was hoping it would just fail silently, but it segfaults.
Does it really segfault? I think it returns an error gracefully, that omapdss backend is not available.


You can do detection in the app, first set SDL_VIDEODRIVER and try to do SDL_SetVideoMode (or was it SDL_Init), if that fails call unsetenv() and retry.


Or you maybe grep for omapdss in /usr/lib/libSDL in the launch script but that's more dirty.

But my intention was: Why do we need multiple versions of SDL? Wouldnt it be nicer if we would enhance the current lib instead of creating several libs each with its own upsides and downsides?
Because my hack is not feature complete and wold break all windowed apps, for example. The source is open, feel free to improve it to make 100% compatible and we can merge them.
Thanks for the suggestions Notaz, and yes it segfaults if I set the driver to omapdss in my launch script and run on the standard SDL lib. I updated today and tried again, same thing.
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Thanks for the suggestions Notaz, and yes it segfaults if I set the driver to omapdss in my launch script and run on the standard SDL lib. I updated today and tried again, same thing.
Are you sure you are not just trying to use SDL even when it fails to init? Here is what I see:



Code:
notaz-openpandora:/mnt/utmp/pandorapanic$ gdb ./PandoraPanic_R

Penjin says: No command line args provided.

Penjin says: SDL failed to initialise. No available video device

^C

Program received signal SIGINT, Interrupt.

0x400f147c in nanosleep () from /lib/libpthread.so.0

(gdb) bt

#0  0x400f147c in nanosleep () from /lib/libpthread.so.0

#1  0x402a0e44 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

...

You are not supposed to be calling SDL_Delay() if SDL failed to init.
 
Last edited by a moderator:

PokeParadox

Founder of Pirate Games - Penjin Coder
Staff member
Joined
Dec 8, 2005
Messages
6,603
Age
39
Location
UK
Website
pokeparadox.itch.io
WEBSITE
https://github.com/pokeparadox
YOUTUBE
pokeparadox
Thanks for the suggestions Notaz, and yes it segfaults if I set the driver to omapdss in my launch script and run on the standard SDL lib. I updated today and tried again, same thing.
Are you sure you are not just trying to use SDL even when it fails to init? Here is what I see:



Code:
notaz-openpandora:/mnt/utmp/pandorapanic$ gdb ./PandoraPanic_R

Penjin says: No command line args provided.

Penjin says: SDL failed to initialise. No available video device

^C

Program received signal SIGINT, Interrupt.

0x400f147c in nanosleep () from /lib/libpthread.so.0

(gdb) bt

#0  0x400f147c in nanosleep () from /lib/libpthread.so.0

#1  0x402a0e44 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

...

You are not supposed to be calling SDL_Delay() if SDL failed to init.

You are correct.. Penjin one needs waaaay more error handling, but in any case you have also demonstrated what I needed to know... I will need to check from within the app to avoid bundling your SDL lib within the PND.
 
Top