mirror of https://github.com/mpv-player/mpv
Minor fixes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3348 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2b4005e8f6
commit
80c8cc6972
|
@ -510,8 +510,13 @@
|
|||
#define OV0_SCALE_CNTL 0x0420
|
||||
# define SCALER_PIX_EXPAND 0x00000001L
|
||||
# define SCALER_Y2R_TEMP 0x00000002L
|
||||
#ifdef RAGE128
|
||||
# define SCALER_HORZ_PICK_NEAREST 0x00000003L
|
||||
# define SCALER_VERT_PICK_NEAREST 0x00000004L
|
||||
#else
|
||||
# define SCALER_HORZ_PICK_NEAREST 0x00000004L
|
||||
# define SCALER_VERT_PICK_NEAREST 0x00000008L
|
||||
#endif
|
||||
# define SCALER_SIGNED_UV 0x00000010L
|
||||
# define SCALER_GAMMA_SEL_MASK 0x00000060L
|
||||
# define SCALER_GAMMA_SEL_BRIGHT 0x00000000L
|
||||
|
@ -540,7 +545,11 @@
|
|||
# define SCALER_UNKNOWN_FLAG0 0x00002000L /* ??? */
|
||||
# define SCALER_UNKNOWN_FLAG1 0x00004000L /* ??? */
|
||||
# define SCALER_SMART_SWITCH 0x00008000L
|
||||
#ifdef RAGE128
|
||||
# define SCALER_BURST_PER_PLANE 0x00ff0000L
|
||||
#else
|
||||
# define SCALER_BURST_PER_PLANE 0x007f0000L
|
||||
#endif
|
||||
# define SCALER_DOUBLE_BUFFER 0x01000000L
|
||||
# define SCALER_UNKNOWN_FLAG3 0x02000000L /* ??? */
|
||||
# define SCALER_UNKNOWN_FLAG4 0x04000000L /* ??? */
|
||||
|
@ -628,16 +637,34 @@
|
|||
#define OV0_GRAPHICS_KEY_CLR 0x04EC
|
||||
#define OV0_GRAPHICS_KEY_MSK 0x04F0
|
||||
#define OV0_KEY_CNTL 0x04F4
|
||||
#ifdef RAGE128
|
||||
# define VIDEO_KEY_FN_MASK 0x00000007L
|
||||
#else
|
||||
# define VIDEO_KEY_FN_MASK 0x00000003L
|
||||
#endif
|
||||
# define VIDEO_KEY_FN_FALSE 0x00000000L
|
||||
# define VIDEO_KEY_FN_TRUE 0x00000001L
|
||||
#ifdef RAGE128
|
||||
# define VIDEO_KEY_FN_EQ 0x00000004L
|
||||
# define VIDEO_KEY_FN_NE 0x00000005L
|
||||
#else
|
||||
# define VIDEO_KEY_FN_EQ 0x00000002L
|
||||
# define VIDEO_KEY_FN_NE 0x00000003L
|
||||
#endif
|
||||
#ifdef RAGE128
|
||||
# define GRAPHIC_KEY_FN_MASK 0x00000070L
|
||||
#else
|
||||
# define GRAPHIC_KEY_FN_MASK 0x00000030L
|
||||
#endif
|
||||
# define GRAPHIC_KEY_FN_FALSE 0x00000000L
|
||||
# define GRAPHIC_KEY_FN_TRUE 0x00000010L
|
||||
#ifdef RAGE128
|
||||
# define GRAPHIC_KEY_FN_EQ 0x00000040L
|
||||
# define GRAPHIC_KEY_FN_NE 0x00000050L
|
||||
#else
|
||||
# define GRAPHIC_KEY_FN_EQ 0x00000020L
|
||||
# define GRAPHIC_KEY_FN_NE 0x00000030L
|
||||
#endif
|
||||
# define CMP_MIX_MASK 0x00000100L
|
||||
# define CMP_MIX_OR 0x00000000L
|
||||
# define CMP_MIX_AND 0x00000100L
|
||||
|
|
|
@ -378,7 +378,7 @@ static void radeon_vid_display_video( void )
|
|||
{
|
||||
OUTREG(OV0_GRAPHICS_KEY_MSK, besr.graphics_key_msk);
|
||||
OUTREG(OV0_GRAPHICS_KEY_CLR, besr.graphics_key_clr);
|
||||
OUTREG(OV0_KEY_CNTL,GRAPHIC_KEY_FN_FALSE|VIDEO_KEY_FN_FALSE|CMP_MIX_OR);
|
||||
OUTREG(OV0_KEY_CNTL,GRAPHIC_KEY_FN_EQ|VIDEO_KEY_FN_FALSE|CMP_MIX_OR);
|
||||
}
|
||||
else OUTREG(OV0_KEY_CNTL,GRAPHIC_KEY_FN_NE);
|
||||
|
||||
|
@ -457,15 +457,24 @@ static void radeon_vid_display_video( void )
|
|||
void radeon_vid_set_color_key(int ckey_on, uint8_t R, uint8_t G, uint8_t B)
|
||||
{
|
||||
besr.ckey_on = ckey_on;
|
||||
if(radeon_vid_get_dbpp() == 16)
|
||||
{ /* 5.6.5 mode,
|
||||
note that these values depend on DAC_CNTL.EXPAND_MODE setting */
|
||||
R = (R<<3);
|
||||
G = (G<<2);
|
||||
B = (B<<3);
|
||||
besr.graphics_key_msk=((R|0x7)<<16)|((G|0x3)<<8)|(B|0x7)|(0xff<<24);
|
||||
switch(radeon_vid_get_dbpp() == 16)
|
||||
{
|
||||
case 16:
|
||||
/* 5.6.5 mode,
|
||||
note that these values depend on DAC_CNTL.EXPAND_MODE setting */
|
||||
R = (R<<3);
|
||||
G = (G<<2);
|
||||
B = (B<<3);
|
||||
// besr.graphics_key_msk=((R|0x7)<<16)|((G|0x3)<<8)|(B|0x7)|(0xff<<24);
|
||||
besr.graphics_key_msk=((R|0x7)<<16)|((G|0x3)<<8)|(B|0x7)|(0xff<<24);
|
||||
break;
|
||||
case 24: besr.graphics_key_msk = ((R)<<16)|((G)<<8)|(B);
|
||||
break;
|
||||
case 32:
|
||||
default: besr.graphics_key_msk = ((R)<<16)|((G)<<8)|(B)|(0xff<<24);
|
||||
break;
|
||||
}
|
||||
else besr.graphics_key_msk = ((R)<<16)|((G) <<8)|(B)|(0xff<<24);
|
||||
besr.graphics_key_msk=(1ULL<<radeon_vid_get_dbpp()) - 1;
|
||||
besr.graphics_key_clr=(R<<16)|(G<<8)|(B)|(0x00 << 24);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue