freetype.c: fix rendering with X11 vout. Do not ask me why this is

necessary, and even less ask me why the vout used make a difference
parent 73ae5d90
...@@ -203,7 +203,14 @@ static int Create( vlc_object_t *p_this ) ...@@ -203,7 +203,14 @@ static int Create( vlc_object_t *p_this )
for( i = 0; i < 256; i++ ) for( i = 0; i < 256; i++ )
{ {
p_sys->pi_gamma[i] = (uint8_t)( pow( (double)i * 255.0f, 0.5f ) ); double f_i_norm = (double)i/ 255.0;
msg_Dbg( p_filter, "i_norm: %f", f_i_norm );
double f_pow = pow( f_i_norm, 0.5f );
msg_Dbg( p_filter, "pow: %f", f_pow );
double f_res = f_pow * 255.0;
msg_Dbg( p_filter, "res: %f", f_res );
p_sys->pi_gamma[i] = (uint8_t)f_res;
msg_Dbg( p_filter, "%d", p_sys->pi_gamma[i] );
} }
var_Create( p_filter, "freetype-font", var_Create( p_filter, "freetype-font",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment