2011-11-21, 05:27
There are a few ways to handle hw decode depending on how integrated the hw decoders are.
If the audio and video hw decoders are tied together via a common pts clock, then the best way to handle this is with a new internal player (aka what dvdplayer does). It's just too hard to try to integrate this into the existing dvdplayer model. Take a look at what boxee had to do for the intel cex41xx. Icky, icky, ifdef city.
If the video hw decoder can run standalone, then clone crystalhd, vda or vtb. Those are all hw video codecs that dvdplayer can use. One thing to note is that to fit the dvdplayer model, you must be able to drop picture frames or dvdplayer will not be able to keep sync with audio...
You can either pass up decoded picture frames or you can 'bypass' this by various means, iOS does a 'bypass' using a opaque corevideoref which is rendered in LinuxRendererGLES.
Another swing point is, are hw decoded pictures auto-rendered on a separate video plane or are they just decoded to argb/yuv and then GLES needs to render it. GLES shader convert of yuv to argb can be very slow depending on GPU, so you might have to use neon to do a yuv to argb. There's existing code to do that (for iOS).
If you are really serious about this, please create a new thread in the development section of the xbmc forums. I'm sure others will chime in.
I've worked on a few 'embedded' flavors of xbmc. iOS is one, sigma is another and there are a few more than I can't talk about yet. Some use a hw decoder together with the dvdplayer model, others have dvdplayer replaced with a custom internal player to handle the hw playback details. If I would know more about exactly what panda can do with respect to hw video decode, then I can point you into the right direction.
If the audio and video hw decoders are tied together via a common pts clock, then the best way to handle this is with a new internal player (aka what dvdplayer does). It's just too hard to try to integrate this into the existing dvdplayer model. Take a look at what boxee had to do for the intel cex41xx. Icky, icky, ifdef city.
If the video hw decoder can run standalone, then clone crystalhd, vda or vtb. Those are all hw video codecs that dvdplayer can use. One thing to note is that to fit the dvdplayer model, you must be able to drop picture frames or dvdplayer will not be able to keep sync with audio...
You can either pass up decoded picture frames or you can 'bypass' this by various means, iOS does a 'bypass' using a opaque corevideoref which is rendered in LinuxRendererGLES.
Another swing point is, are hw decoded pictures auto-rendered on a separate video plane or are they just decoded to argb/yuv and then GLES needs to render it. GLES shader convert of yuv to argb can be very slow depending on GPU, so you might have to use neon to do a yuv to argb. There's existing code to do that (for iOS).
If you are really serious about this, please create a new thread in the development section of the xbmc forums. I'm sure others will chime in.
I've worked on a few 'embedded' flavors of xbmc. iOS is one, sigma is another and there are a few more than I can't talk about yet. Some use a hw decoder together with the dvdplayer model, others have dvdplayer replaced with a custom internal player to handle the hw playback details. If I would know more about exactly what panda can do with respect to hw video decode, then I can point you into the right direction.