Easy to implement for eg mplayer? Why has no-one done this..?
IMHO, yes, it should be pretty easy. I have no idea why no-one has done this yet. Maybe everyone has been busy with other projects...
Apologies, I must have misunderstood Karlos, or plans have changed (http://www.amiga.org/forums/archive/index.php/t-61993.html)
Karlos wrote:
Right now, as far as I know no specific implementation exists for the RadeonHD drivers. With adequate 3D support, however, implementing a hardware video surface via video texturing becomes feasible. Since both 3D and video playback are desirable features, it makes sense to focus on the overlap.
What would be the best approach to improving video playback in your experience Hans? (Who do OS4.x users nag at to get this done...
)
Well, once OpenGL with shader support is available, then application developers could easily write their own GPU assisted YUV=>RGB conversion code. So, he's correct in that. However, that doesn't mean that 3D is the only way, nor would the appearance of 3D drivers magically improve anything.
Don't nag anyone; we're aware of the situation and the various options to fix it. :razz:
I was trying to be fair but frank. "Pretty good" doesn't sound like a ringing endorsement. Can DVDs be watched on Sam460 with no frame dropping? Does resizing/fullscreening impact upon playback? Can you watch video windowsed/scaled whilst doing other stuff (eg web browsing)? What percent cpu is used by stuff that could/should be offloaded to overlay/textured-video?*
Yes, I can watch a DVD on the Sam460 without frame skipping. At least, I didn't notice any skipping last time I tried. No video scaling for now. However, that's not due to driver limitations. I can't remember what the CPU usage was.
Overlay/textured-video handles the YUV=>RGB conversion and scaling. That alone helps quite a bit, but its still no match for a hardware decoder.
BTW, the DVD drive can also have a big effect on DVD playback. There are a lot of poor quality drives out there, or drives that really need a firmware update. My A1-XE G4 stopped being able to play DVDs smoothly after "upgrading" to a new DVD drive. So, if someone else with a Sam460 can't play DVDs smoothly, then their DVD drive would be the prime suspect.
From the same thread (PCI>PCIe adapter notwithstanding, how much bandwidth does 480p video need anyway...), albeit an extreme case:
For 704x480 @24fps, you need:
- 30.9 MiB/s when using 32-bit RGBA
- 11.6 MiB/s for the YUV420p pixel format (a possibility with overlay/textured-video)
Based on
this GfxBench2D result, a Sam440ep-flex with Radeon HD 6670 can manage:
- 13.52 MiB/s with a CPU-based copy routine
- 90.23 MiB/s if DMA is used via WritePixelArray()/BlitBitMap()
AFAIK, MPlayer and DvPlayer use their own CPU-based copy routine, so the copy bandwidth is killing any chance of smooth playback (NOTE: the CPU needs time to decode the video too). Needless to say, I encourage developers to use WritePixelArray()/BlitBitMap() for transfers to/from VRAM.
By contrast, here are the bandwidth results for the Radeon M9 in a Sam440ep (
link):
- 53.45 MiB/s CPU copy
- 90.98 MiB/s WritePixelArray
Clearly the bandwidth is enough for 480p video, especially if overlay is used.
Hans