@@ -300,7 +300,7 @@ void pass_sample_oversample(struct gl_shader_cache *sc, struct scaler *scaler,
300300 gl_sc_uniform_vec2 (sc , "output_size" , (float [2 ]){w , h });
301301 GLSL (vec2 coeff = fcoord * output_size /size ;)
302302 float threshold = scaler -> conf .kernel .params [0 ];
303- threshold = isnan (threshold ) ? 0.0 : threshold ;
303+ threshold = mp_isnan (threshold ) ? 0.0 : threshold ;
304304 GLSLF ("coeff = (coeff - %f) * 1.0/%f;\n" , threshold , 1.0 - 2 * threshold );
305305 GLSL (coeff = clamp (coeff , 0.0 , 1.0 );)
306306 // Compute the right blend of colors
@@ -723,12 +723,12 @@ static void pass_tone_map(struct gl_shader_cache *sc,
723723 float param = opts -> curve_param ;
724724 switch (curve ) {
725725 case TONE_MAPPING_CLIP :
726- GLSLF ("sig = min(%f * sig, 1.0);\n" , isnan (param ) ? 1.0 : param );
726+ GLSLF ("sig = min(%f * sig, 1.0);\n" , mp_isnan (param ) ? 1.0 : param );
727727 break ;
728728
729729 case TONE_MAPPING_MOBIUS :
730730 GLSLF ("if (sig_peak > (1.0 + 1e-6)) {\n" );
731- GLSLF ("const float j = %f;\n" , isnan (param ) ? 0.3 : param );
731+ GLSLF ("const float j = %f;\n" , mp_isnan (param ) ? 0.3 : param );
732732 // solve for M(j) = j; M(sig_peak) = 1.0; M'(j) = 1.0
733733 // where M(x) = scale * (x+a)/(x+b)
734734 GLSLF ("float a = -j*j * (sig_peak - 1.0) / (j*j - 2.0*j + sig_peak);\n" );
@@ -742,7 +742,7 @@ static void pass_tone_map(struct gl_shader_cache *sc,
742742 break ;
743743
744744 case TONE_MAPPING_REINHARD : {
745- float contrast = isnan (param ) ? 0.5 : param ,
745+ float contrast = mp_isnan (param ) ? 0.5 : param ,
746746 offset = (1.0 - contrast ) / contrast ;
747747 GLSLF ("sig = sig / (sig + vec3(%f));\n" , offset );
748748 GLSLF ("float scale = (sig_peak + %f) / sig_peak;\n" , offset );
@@ -765,7 +765,7 @@ static void pass_tone_map(struct gl_shader_cache *sc,
765765 }
766766
767767 case TONE_MAPPING_GAMMA : {
768- float gamma = isnan (param ) ? 1.8 : param ;
768+ float gamma = mp_isnan (param ) ? 1.8 : param ;
769769 GLSLF ("const float cutoff = 0.05, gamma = 1.0/%f;\n" , gamma );
770770 GLSL (float scale = pow (cutoff / sig_peak , gamma .x ) / cutoff ;)
771771 GLSLF ("sig = mix(scale * sig,"
@@ -776,7 +776,7 @@ static void pass_tone_map(struct gl_shader_cache *sc,
776776 }
777777
778778 case TONE_MAPPING_LINEAR : {
779- float coeff = isnan (param ) ? 1.0 : param ;
779+ float coeff = mp_isnan (param ) ? 1.0 : param ;
780780 GLSLF ("sig = min(%f / sig_peak, 1.0) * sig;\n" , coeff );
781781 break ;
782782 }
0 commit comments