Getting Xv to work with radeon driver and r500 card
I've tried using Xv with the newly-compatable radeon driver and my x1600. There appear to be two problems: It's glacially slow (I assume a drm problem which will eventually be resolved,) and the color is wrong.
The first issue is probably beyond my ability (as a fairly novice programmer) to fix, but I may be able to help with the second. It appears from the look of the image that the card is trying to scanout what looks like YUV as RGB. The odd thing is that the correctly sized part of the image (which is obviously the luma component) is green, which means somehow the luma component is being interpreted as green. I'm guessing there is a register for setting color format that has changed with the r500 and needs to be added to the driver.
However, after taking a look at both the radeon driver source and the ATI docs that have been released, I'm rather unenlightened. I wonder if anyone familiar with the radeon driver could point me to the right place to start looking for the color format setup for overlays. Once I can find that, I might be able to to start deciphering how things work and possibly identify the problem.
I admit I'm coming at this from a position of ignorance, as I have little programming experience, but I am interested in driver development and would like to start learning a bit about it. I figure this problem seems to be relatively simple and shouldn't be to difficult to solve.
Edit: Since posting the above, I have looked further into the registers involved in the overlay. I believe that the released ATI docs are not complete in this regard, but I can find no matching register addresses between the ati docs and radeon_reg.h that have to do with overlays. How then does the overlay work at all?
Last edited by TechMage89; 11-21-2007 at 11:36 PM.
I also experienced a problem with XVideo on the radeon driver. The image was a lime and lavendar combo, and the image was stretched 2X in the horizontal direction. Is this what you are seeing?
The problem affected only UYVY decoding, other formats were unaffected. I was able to work-around the problem by swapping every pair of bytes and decoding as YUY2.
You don't mention anything about versions. My problem showed up in Fedora 5. The
xorg-x11-drv-ati-22.214.171.124-4 package was OK, then xorg-x11-drv-ati-126.96.36.199-1 was broken. The problem persisted in Fedora 6, which was driver version xorg-x11-drv-ati-6.6.3-1.fc6. Just this week I updated to Fedora 8 and the bug is fixed; driver xorg-x11-drv-ati-6.7.195-3.fc8.
I'm talking specifically about the overlay on r500 cards. There aren't any packaged versions with Atombios support, so my version is the latest git with the AtomBios branch.
I probably should check to see how it handles different input formats. I would still like to know how the overlay works at all though, because the registers documented in the ATI docs aren't even defined in the Radeon driver.
I don't think we have released all the overlay documentation yet. We were planning to do video stuff *after* 3d although there does seem to be a lot more interest in video than we initially expected. Is the video interest mostly from "everything being on YouTube these days" or are we talking about actual movie playback, tv watching etc ?
Maybe it's time for another survey
I doubt the radeon devs have spent any time at all on overlay support yet. The main change from 4xx to 5xx was that some of the older video processing hardware built into the overlay was replaced with shader code. Using shaders gives us more flexibility and the potential for higher video quality but it also means a lot more driver work.
I think the original poster's theory is correct, that the app is feeding in one video format and expecting the overlay hardware to do the colour space conversion... which it doesn't do any more. Right now overlay and video support is on the list for *after* we get 3d info out to the developers -- I think that's still the right sequence, do you all agree ?
Last edited by bridgman; 11-22-2007 at 03:58 PM.
"Actual" videos in various sizes, shapes, and forms ^^; I use mplayer for the majority of my video watching. Overlay is Xv.
Various res' including HD res videos. Card is an ATI x1800, or on my laptop, a mobility x1400.
Working Xv is a *must have* for me. I am using TVTime (yes, it is already ancient) and it does rely on this very feature. This is IMO currently the best and easiest program to "just watch" analog TV.
So personally for me having this work is more important than the 3D part since I would just switch over for some hours to the proprietary driver for gaming anyway.
Though probably the whole stuff on 3D acceleration takes more work than Xv, so it is better to have those specs and code examples earlier since it needs more time to have it working.
Of course I would feel best if all the specs would be released at once (and before new years eve). But probably sanitizing the specs really takes a whole lot of time, so any progress on that front is really welcome. Looks like it could be a *great* future for all the AMD/ATI users out there due to the heavy effords regarding open drivers.
In my case, it's scientific research. We need to display streaming video from a digital camera. The camera provides teh stream in UYVY-oncoded form.
Originally Posted by bridgman
The new overlay hardware is no longer able to display this directly.
Originally Posted by CrystalCowboy
I bought a 690G motherboard + energy efficient AMD X2 (after the documentation release announcements) specifically to use as a PVR, so full screen DVD and TV is a must for me.
Originally Posted by bridgman
At the moment I'm not watching TV through the PVR because the frame update isn't quite fast enough and after a while it irritates me. I can cope with watching 1 or 2 recorded shows, because I know I can switch back to the TV and the drivers will get better...
The 3d acceleration is good enough for me, but I'm only a casual gamer.
Movie Playback is very important for me. It was nice back when XV basically worked in fullscreen with my card (< 8.40)...
Originally Posted by bridgman