[Mplayer-cvslog] CVS: main mplayer.c,1.527,1.528
pl
p_l at gmx.fr
Sun Jul 21 15:04:40 CEST 2002
Hi,
On Sat, Jul 20, 2002 at 08:08:25PM +0200, Ponekker Zoltan wrote:
> > yes, i told him that nvidia Xv and others too has problems, they are not
> > really problems of drivers but mplayer's xv driver.
> > Xv allows defining custom min/max range for each attribute by the driver,
> > and mplayer's xv should query it and remap its -100..+100 (?) range to that.
> > Could you fix that?
>
> Please, i don't have nvidias shit.
>
> > Anyway I also don't like this commit, it changes -1000..+1000 raneg to
> > -100..+100 dunno why.
>
> Ezt nem tom angolul:
>
> MP_CMD_* mindig -100...100 - at hasznalt. A -bright... meg a tobbi meg
> -1000...1000 - ret, es a driver szorozgatta, osztogatta el. Csak most
> egyseges lett az is, konstans -100...100.
That is ? (english plz)
Your patch suffer from initialization problems as "impossible" values
(-101) arrive in vo_xv::__set*eq, which causes problems.
Another problem is also that you use -101 which sadly happens to be in
-1000 1000 and not very different from -100, which does not trigger
frankly the bugs.
The attached patch replaces -101 by -99999 and adds a "last chance
before breakage" workaround as the warning should not be triggered at
all IMO.
--
Best regards,
pl
-------------- next part --------------
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.528
diff -u -r1.528 mplayer.c
--- mplayer.c 19 Jul 2002 20:51:34 -0000 1.528
+++ mplayer.c 21 Jul 2002 13:05:55 -0000
@@ -1367,10 +1366,10 @@
if( vo_vaa.get_video_eq(&veq) == 0)
{
v_hw_equ_cap = veq.cap;
- if ( ( vo_gamma_brightness == -101 )&&( veq.cap & VEQ_CAP_BRIGHTNESS ) ) vo_gamma_brightness = veq.brightness / 10;
- if ( ( vo_gamma_contrast == -101 )&&( veq.cap & VEQ_CAP_CONTRAST ) ) vo_gamma_contrast = veq.contrast / 10;
- if ( ( vo_gamma_hue == -101 )&&( veq.cap & VEQ_CAP_HUE ) ) vo_gamma_hue = veq.hue / 10;
- if ( ( vo_gamma_saturation == -101 )&&( veq.cap & VEQ_CAP_SATURATION ) ) vo_gamma_saturation=veq.saturation / 10;
+ if ( ( vo_gamma_brightness == -99999 )&&( veq.cap & VEQ_CAP_BRIGHTNESS ) ) vo_gamma_brightness = veq.brightness / 10;
+ if ( ( vo_gamma_contrast == -99999 )&&( veq.cap & VEQ_CAP_CONTRAST ) ) vo_gamma_contrast = veq.contrast / 10;
+ if ( ( vo_gamma_hue == -99999 )&&( veq.cap & VEQ_CAP_HUE ) ) vo_gamma_hue = veq.hue / 10;
+ if ( ( vo_gamma_saturation == -99999 )&&( veq.cap & VEQ_CAP_SATURATION ) ) vo_gamma_saturation=veq.saturation / 10;
/*
v_red_intensity=veq.red_intensity/10;
v_green_intensity=veq.green_intensity/10;
@@ -1379,10 +1378,10 @@
}
}
- if ( vo_gamma_brightness == -101 ) vo_gamma_brightness=0.0f;
- if ( vo_gamma_contrast == -101 ) vo_gamma_contrast=0.0f;
- if ( vo_gamma_hue == -101 ) vo_gamma_hue=0.0f;
- if ( vo_gamma_saturation == -101 ) vo_gamma_saturation=0.0f;
+ if ( vo_gamma_brightness == -99999 ) vo_gamma_brightness=0;
+ if ( vo_gamma_contrast == -99999 ) vo_gamma_contrast=0;
+ if ( vo_gamma_hue == -99999 ) vo_gamma_hue=0;
+ if ( vo_gamma_saturation == -99999 ) vo_gamma_saturation=0;
set_video_eq( v_hw_equ_cap );
Index: libvo/video_out.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/video_out.c,v
retrieving revision 1.53
diff -u -r1.53 video_out.c
--- libvo/video_out.c 19 Jul 2002 20:51:47 -0000 1.53
+++ libvo/video_out.c 21 Jul 2002 13:05:55 -0000
@@ -66,10 +66,10 @@
/****************************************
* GAMMA CORRECTION *
****************************************/
-int vo_gamma_brightness=-101;
-int vo_gamma_saturation=-101;
-int vo_gamma_contrast=-101;
-int vo_gamma_hue=-101;
+int vo_gamma_brightness=-99999;
+int vo_gamma_saturation=-99999;
+int vo_gamma_contrast=-99999;
+int vo_gamma_hue=-99999;
int vo_gamma_red_intensity=0;
int vo_gamma_green_intensity=0;
int vo_gamma_blue_intensity=0;
Index: libvo/vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.107
diff -u -r1.107 vo_xv.c
--- libvo/vo_xv.c 20 Jul 2002 16:27:17 -0000 1.107
+++ libvo/vo_xv.c 21 Jul 2002 13:05:56 -0000
@@ -206,7 +209,10 @@
else continue;
/* means that user has untouched this parameter since
NVidia driver has default == min for XV_HUE but not mid */
- if(!port_value && use_reset) continue;
+ if (port_value < -1000 || port_value > 1000) {
+ mp_msg(MSGT_VO,MSGL_V,"vo_xv: internal error port_value for %s is %d (not in -1000..1000)\n", port_value, attributes[i].name);
+ continue;
+ }
port_min = xv_min;
port_max = xv_max;
port_mid = (port_min + port_max) / 2;
More information about the MPlayer-cvslog
mailing list