XV: Making use of Radeon's YV12 scaler
Roland Scheidegger
rscheidegger_lists at hispeed.ch
Thu Mar 23 17:25:26 PST 2006
Tilman Sauerbeck wrote:
> Alex Deucher [2006-01-25 20:12]:
>> On 1/8/06, Tilman Sauerbeck <tilman at code-monkey.de> wrote:
>>> Hi,
>>> I noticed that the Radeon's driver support for YUV420 just sucks
>>> (it's going through software conversion from YUV420 to YUV422) ;)
>>>
>>> Radeon has a YV12 BES though, which I think can be used for this.
>>> I tried to use that YV12 scaler, but I cannot get it to work properly.
>>> All I get is b/w video output (which tells me it cannot be *that* much
>>> off).
>> perhaps the UV need to be swapped? try this out (based on your code, untested):
>>
>> # define RADEON_OV0_SWAP_UV (1<<5)
>> [snip]
>
> Thanks for your replay. Unfortunately, setting the SWAP_UV bit doesn't
> seem to affect the output at all.
You forgot to setup some regs for plane2/3, probably most notably the
RADEON_OV0_P23_BLANK_LINES_AT_TOP (so you had no active p23 lines) and
RADEON_OV0_P23_V_ACCUM_INIT. I finally managed to get it working, though
I broke for instance clipping (for all formats). I think I changed some
things not really necessary (which just seemed wrong...), it should be
possible to fix that easily though the video overlay code is a bit messy
imho. One reason clipping is broken is because I hacked in some offset
calculation - yours destroyed my pixmaps :-), but since it doesn't work
for other formats no longer too I guess I was a little too enthusiastic
with those offset changes (that left >> 16 didn't seem to make sense).
The patch would certainly also need some proper hostdata blit instead of
the memcopy. Do you (or someone else) feel tempted to clean it up :-)?
I'm pretty certain I didn't get aligning and stuff correct. The chip
could also support other planar formats too (yuv9 for instance) though I
guess most people aren't interested in those.
Roland
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: radeon_yuv_planar.diff
URL: <http://lists.x.org/archives/xorg/attachments/20060324/66b8a16f/attachment.ksh>
More information about the xorg
mailing list