aboutsummaryrefslogtreecommitdiffhomepage
path: root/drivers/radeon
diff options
context:
space:
mode:
authorGravatar nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-07 12:01:43 +0000
committerGravatar nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-07 12:01:43 +0000
commitd84ca04a9804eff1b779258fdbdb53c0f5731776 (patch)
treec954ddce99d544d727f35efb0cce8f7827955aff /drivers/radeon
parent002561f996b7322fe09da899b2eecc2f5ff18fc6 (diff)
Fixed scaling in doublescan modes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3370 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'drivers/radeon')
-rw-r--r--drivers/radeon/radeon_vid.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/radeon/radeon_vid.c b/drivers/radeon/radeon_vid.c
index 4e43f73597..a697d329d8 100644
--- a/drivers/radeon/radeon_vid.c
+++ b/drivers/radeon/radeon_vid.c
@@ -37,7 +37,6 @@
Y42T, V422, V655, CLJR, YUVP, UYVP, Mpeg PES (mpeg-1,2) support
...........................................................
BUGS and LACKS:
- Wrong aspect of scaling if image_height < 200 && screen_height == 200
Color and video keys don't work
Contrast and brightness are unconfigurable on radeons
*/
@@ -327,6 +326,12 @@ static uint32_t radeon_vid_get_dbpp( void )
return retval;
}
+static int radeon_is_dbl_scan( void )
+{
+ return (INREG(CRTC_GEN_CNTL))&CRTC_DBL_SCAN_EN;
+}
+
+
static void __init radeon_vid_save_state( void )
{
size_t i;
@@ -471,12 +476,6 @@ void radeon_vid_set_color_key(int ckey_on, uint8_t R, uint8_t G, uint8_t B)
#define XXX_SRC_X 0
#define XXX_SRC_Y 0
-#define XXX_WIDTH config->src_width
-#define XXX_HEIGHT config->src_height
-
-#define XXX_DRW_W config->dest_width
-#define XXX_DRW_H config->dest_height
-
static int radeon_vid_init_video( mga_vid_config_t *config )
{
uint32_t tmp,src_w,src_h,pitch,h_inc,step_by,left,leftUV,top;
@@ -497,6 +496,8 @@ RTRACE(RVID_MSG"usr_config: version = %x format=%x card=%x ram=%u src(%ux%u) des
radeon_vid_stop_video();
left = XXX_SRC_X << 16;
top = XXX_SRC_Y << 16;
+/* FIXME !!! interlace? */
+ if(radeon_is_dbl_scan()) config->dest_height *= 2;
src_h = config->src_height;
src_w = config->src_width;
switch(config->format)
@@ -553,8 +554,8 @@ RTRACE(RVID_MSG"usr_config: version = %x format=%x card=%x ram=%u src(%ux%u) des
besr.dest_bpp = radeon_vid_get_dbpp();
besr.fourcc = config->format;
- besr.v_inc = (src_h << 20) / XXX_DRW_H;
- h_inc = (src_w << 12) / XXX_DRW_W;
+ besr.v_inc = (src_h << 20) / config->dest_height;
+ h_inc = (src_w << 12) / config->dest_width;
step_by = 1;
while(h_inc >= (2 << 12)) {