XV: Making use of Radeon's YV12 scaler
Alex Deucher
alexdeucher at gmail.com
Wed Jan 25 17:12:19 PST 2006
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).
>
> Can anyone please look at these patches and tell me where the problem
> might be?
perhaps the UV need to be swapped? try this out (based on your code, untested):
# define RADEON_OV0_SWAP_UV (1<<5)
scale_cntl = RADEON_SCALER_ADAPTIVE_DEINT |
RADEON_SCALER_DOUBLE_BUFFER |
RADEON_SCALER_ENABLE | RADEON_SCALER_SMART_SWITCH |
(0x7f << 16) | scaler_src;
switch(id) {
case FOURCC_UYVY:
OUTREG(RADEON_OV0_TEST, RADEON_OV0_SWAP_UV);
scale_cntl |= RADEON_SCALER_SOURCE_YVYU422;
break;
case FOURCC_RGB24:
case FOURCC_RGBA32:
OUTREG(RADEON_OV0_TEST, 0);
scale_cntl |= RADEON_SCALER_SOURCE_32BPP |
RADEON_SCALER_PRG_LOAD_START;
break;
case FOURCC_RGBT16:
case FOURCC_RGB16:
OUTREG(RADEON_OV0_TEST, 0);
scale_cntl |= RADEON_SCALER_SOURCE_16BPP |
RADEON_SCALER_PRG_LOAD_START;
break;
case FOURCC_YV12:
OUTREG(RADEON_OV0_TEST, RADEON_OV0_SWAP_UV);
scale_cntl |= RADEON_SCALER_SOURCE_YUV12;
break;
case FOURCC_I420:
OUTREG(RADEON_OV0_TEST, 0);
scale_cntl |= RADEON_SCALER_SOURCE_YUV12;
break;
case FOURCC_YUY2:
OUTREG(RADEON_OV0_TEST, RADEON_OV0_SWAP_UV);
default:
scale_cntl |= RADEON_SCALER_SOURCE_VYUY422;
if (info->ChipFamily >= CHIP_FAMILY_R200)
scale_cntl |= RADEON_SCALER_TEMPORAL_DEINT;
}
OUTREG(RADEON_OV0_SCALE_CNTL, scale_cntl);
Alex
>
> Thanks,
> Tilman
>
> --
> GnuPG key available at
> http://code-monkey.de/files/tsauerbeck-public-key.asc
>
>
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>
>
>
More information about the xorg
mailing list