diff options
author | Roland Scheidegger <rscheidegger_lists@hispeed.ch> | 2006-11-29 16:46:57 +0100 |
---|---|---|
committer | Roland Scheidegger <rscheidegger_lists@hispeed.ch> | 2006-11-29 16:46:57 +0100 |
commit | 9f5ea3981449f29ff204eb154166e8fc813205fa (patch) | |
tree | c4b1d13aab46ee52e97862e999633eac525a9d52 /src/radeon_driver.c | |
parent | 35a5eaf5adf103ef57f8d4590dae25b0c50bd780 (diff) |
radeon: bug #1462, predownscale to make HD video work.
Use the overlay scaler's predownscale capability to make videos with large
horizontal resolution work if it exceeds the scaler buffer width. Make the
scaler buffer width user-configurable since we don't know it for all chips,
and using predownscaling may otherwise reduce quality even if it wouldn't
be needed. This should fix bug #1462.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 1950f750..251c4397 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -182,8 +182,9 @@ static const OptionInfoRec RADEONOptions[] = { { OPTION_RAGE_THEATRE_COMPOSITE_PORT, "RageTheatreCompositePort", OPTV_INTEGER, {0}, FALSE }, { OPTION_RAGE_THEATRE_SVIDEO_PORT, "RageTheatreSVideoPort", OPTV_INTEGER, {0}, FALSE }, { OPTION_TUNER_TYPE, "TunerType", OPTV_INTEGER, {0}, FALSE }, - { OPTION_RAGE_THEATRE_MICROC_PATH, "RageTheatreMicrocPath", OPTV_STRING, {0}, FALSE }, - { OPTION_RAGE_THEATRE_MICROC_TYPE, "RageTheatreMicrocType", OPTV_STRING, {0}, FALSE }, + { OPTION_RAGE_THEATRE_MICROC_PATH, "RageTheatreMicrocPath", OPTV_STRING, {0}, FALSE }, + { OPTION_RAGE_THEATRE_MICROC_TYPE, "RageTheatreMicrocType", OPTV_STRING, {0}, FALSE }, + { OPTION_SCALER_WIDTH, "ScalerWidth", OPTV_INTEGER, {0}, FALSE }, #endif #ifdef RENDER { OPTION_RENDER_ACCEL, "RenderAccel", OPTV_BOOLEAN, {0}, FALSE }, @@ -3049,6 +3050,30 @@ _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) info->tunerType=-1; } + if(xf86GetOptValInteger(info->Options, OPTION_SCALER_WIDTH, &(info->overlay_scaler_buffer_width))) { + if ((info->overlay_scaler_buffer_width < 1024) || + (info->overlay_scaler_buffer_width > 2048) || + ((info->overlay_scaler_buffer_width % 64) != 0)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Attempt to set illegal scaler width. Using default\n"); + info->overlay_scaler_buffer_width = 0; + } + } + else info->overlay_scaler_buffer_width = 0; + if (!info->overlay_scaler_buffer_width) { + /* overlay scaler line length differs for different revisions + this needs to be maintained by hand */ + switch(info->ChipFamily){ + case CHIP_FAMILY_R200: + case CHIP_FAMILY_R300: + info->overlay_scaler_buffer_width = 1920; + break; + default: + info->overlay_scaler_buffer_width = 1536; + } + } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Assuming overlay scaler buffer width is %d\n", + info->overlay_scaler_buffer_width); + if(info->tunerType>31){ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Attempt to set tuner type to invalid value. Disabling setting\n"); info->tunerType=-1; |