mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
Explicitly define float constants as float
With MSVC, this gives the following warning: warning C4305: 'function': truncation from 'double' to 'gfloat' Apparently, MSVC does not figure out what type to use for constants based on the assignment. This warning is very spammy, so let's try to fix it.
This commit is contained in:
parent
9758f25430
commit
503822eb20
3 changed files with 23 additions and 23 deletions
|
@ -251,7 +251,7 @@ gst_gl_transformation_init (GstGLTransformation * filter)
|
||||||
filter->shader = NULL;
|
filter->shader = NULL;
|
||||||
filter->fov = 90;
|
filter->fov = 90;
|
||||||
filter->aspect = 1.0;
|
filter->aspect = 1.0;
|
||||||
filter->znear = 0.1;
|
filter->znear = 0.1f;
|
||||||
filter->zfar = 100;
|
filter->zfar = 100;
|
||||||
|
|
||||||
filter->xscale = 1.0;
|
filter->xscale = 1.0;
|
||||||
|
|
|
@ -69,19 +69,19 @@ static gboolean _do_convert_draw (GstGLContext * context,
|
||||||
* Y = [16..235] (of 255)
|
* Y = [16..235] (of 255)
|
||||||
* Cb/Cr = [16..240] (of 255)
|
* Cb/Cr = [16..240] (of 255)
|
||||||
*/
|
*/
|
||||||
static const gfloat from_yuv_bt601_offset[] = {-0.0625, -0.5, -0.5};
|
static const gfloat from_yuv_bt601_offset[] = {-0.0625f, -0.5f, -0.5f};
|
||||||
static const gfloat from_yuv_bt601_rcoeff[] = {1.164, 0.000, 1.596};
|
static const gfloat from_yuv_bt601_rcoeff[] = {1.164f, 0.000f, 1.596f};
|
||||||
static const gfloat from_yuv_bt601_gcoeff[] = {1.164,-0.391,-0.813};
|
static const gfloat from_yuv_bt601_gcoeff[] = {1.164f,-0.391f,-0.813f};
|
||||||
static const gfloat from_yuv_bt601_bcoeff[] = {1.164, 2.018, 0.000};
|
static const gfloat from_yuv_bt601_bcoeff[] = {1.164f, 2.018f, 0.000f};
|
||||||
|
|
||||||
/* BT. 709 standard with the following ranges:
|
/* BT. 709 standard with the following ranges:
|
||||||
* Y = [16..235] (of 255)
|
* Y = [16..235] (of 255)
|
||||||
* Cb/Cr = [16..240] (of 255)
|
* Cb/Cr = [16..240] (of 255)
|
||||||
*/
|
*/
|
||||||
static const gfloat from_yuv_bt709_offset[] = {-0.0625, -0.5, -0.5};
|
static const gfloat from_yuv_bt709_offset[] = {-0.0625f, -0.5f, -0.5f};
|
||||||
static const gfloat from_yuv_bt709_rcoeff[] = {1.164, 0.000, 1.787};
|
static const gfloat from_yuv_bt709_rcoeff[] = {1.164f, 0.000f, 1.787f};
|
||||||
static const gfloat from_yuv_bt709_gcoeff[] = {1.164,-0.213,-0.531};
|
static const gfloat from_yuv_bt709_gcoeff[] = {1.164f,-0.213f,-0.531f};
|
||||||
static const gfloat from_yuv_bt709_bcoeff[] = {1.164,2.112, 0.000};
|
static const gfloat from_yuv_bt709_bcoeff[] = {1.164f,2.112f, 0.000f};
|
||||||
|
|
||||||
#define RGB_TO_YUV_COEFFICIENTS \
|
#define RGB_TO_YUV_COEFFICIENTS \
|
||||||
"uniform vec3 offset;\n" \
|
"uniform vec3 offset;\n" \
|
||||||
|
@ -94,19 +94,19 @@ static const gfloat from_yuv_bt709_bcoeff[] = {1.164,2.112, 0.000};
|
||||||
* Y = [16..235] (of 255)
|
* Y = [16..235] (of 255)
|
||||||
* Cb/Cr = [16..240] (of 255)
|
* Cb/Cr = [16..240] (of 255)
|
||||||
*/
|
*/
|
||||||
static const gfloat from_rgb_bt601_offset[] = {0.0625, 0.5, 0.5};
|
static const gfloat from_rgb_bt601_offset[] = {0.0625f, 0.5f, 0.5f};
|
||||||
static const gfloat from_rgb_bt601_ycoeff[] = {0.256816, 0.504154, 0.0979137};
|
static const gfloat from_rgb_bt601_ycoeff[] = {0.256816f, 0.504154f, 0.0979137f};
|
||||||
static const gfloat from_rgb_bt601_ucoeff[] = {-0.148246, -0.29102, 0.439266};
|
static const gfloat from_rgb_bt601_ucoeff[] = {-0.148246f, -0.29102f, 0.439266f};
|
||||||
static const gfloat from_rgb_bt601_vcoeff[] = {0.439271, -0.367833, -0.071438};
|
static const gfloat from_rgb_bt601_vcoeff[] = {0.439271f, -0.367833f, -0.071438f};
|
||||||
|
|
||||||
/* BT. 709 standard with the following ranges:
|
/* BT. 709 standard with the following ranges:
|
||||||
* Y = [16..235] (of 255)
|
* Y = [16..235] (of 255)
|
||||||
* Cb/Cr = [16..240] (of 255)
|
* Cb/Cr = [16..240] (of 255)
|
||||||
*/
|
*/
|
||||||
static const gfloat from_rgb_bt709_offset[] = {0.0625, 0.5, 0.5};
|
static const gfloat from_rgb_bt709_offset[] = {0.0625f, 0.5f, 0.5f};
|
||||||
static const gfloat from_rgb_bt709_ycoeff[] = { 0.182604, 0.614526, 0.061976 };
|
static const gfloat from_rgb_bt709_ycoeff[] = {0.182604f, 0.614526f, 0.061976f};
|
||||||
static const gfloat from_rgb_bt709_ucoeff[] = { -0.100640, -0.338688, 0.439327 };
|
static const gfloat from_rgb_bt709_ucoeff[] = {-0.100640f, -0.338688f, 0.439327f};
|
||||||
static const gfloat from_rgb_bt709_vcoeff[] = { 0.440654, -0.400285, -0.040370 };
|
static const gfloat from_rgb_bt709_vcoeff[] = {0.440654f, -0.400285f, -0.040370f};
|
||||||
|
|
||||||
/* GRAY16 to RGB conversion
|
/* GRAY16 to RGB conversion
|
||||||
* data transfered as GL_LUMINANCE_ALPHA then convert back to GRAY16
|
* data transfered as GL_LUMINANCE_ALPHA then convert back to GRAY16
|
||||||
|
|
|
@ -132,17 +132,17 @@ gst_gl_stereo_downmix_mode_get_type (void)
|
||||||
/* These match the order and number of DOWNMIX_ANAGLYPH_* modes */
|
/* These match the order and number of DOWNMIX_ANAGLYPH_* modes */
|
||||||
static GLfloat downmix_matrices[][2][9] = {
|
static GLfloat downmix_matrices[][2][9] = {
|
||||||
{ /* Green-Magenta Dubois */
|
{ /* Green-Magenta Dubois */
|
||||||
{-0.062, 0.284, -0.015, -0.158, 0.668, -0.027, -0.039, 0.143, 0.021},
|
{-0.062f, 0.284f, -0.015f, -0.158f, 0.668f, -0.027f, -0.039f, 0.143f, 0.021f},
|
||||||
{0.529, -0.016, 0.009, 0.705, -0.015, 0.075, 0.024, -0.065, 0.937}
|
{0.529f, -0.016f, 0.009f, 0.705f, -0.015f, 0.075f, 0.024f, -0.065f, 0.937f}
|
||||||
},
|
},
|
||||||
{ /* Red-Cyan Dubois */
|
{ /* Red-Cyan Dubois */
|
||||||
/* Source of this matrix: http://www.site.uottawa.ca/~edubois/anaglyph/LeastSquaresHowToPhotoshop.pdf */
|
/* Source of this matrix: http://www.site.uottawa.ca/~edubois/anaglyph/LeastSquaresHowToPhotoshop.pdf */
|
||||||
{0.437, -0.062, -0.048, 0.449, -0.062, -0.050, 0.164, -0.024, -0.017},
|
{0.437f, -0.062f, -0.048f, 0.449f, -0.062f, -0.050f, 0.164f, -0.024f, -0.017f},
|
||||||
{-0.011, 0.377, -0.026, -0.032, 0.761, -0.093, -0.007, 0.009, 1.234}
|
{-0.011f, 0.377f, -0.026f, -0.032f, 0.761f, -0.093f, -0.007f, 0.009f, 1.234f}
|
||||||
},
|
},
|
||||||
{ /* Amber-blue Dubois */
|
{ /* Amber-blue Dubois */
|
||||||
{1.062, -0.026, -0.038, -0.205, 0.908, -0.173, 0.299, 0.068, 0.022},
|
{1.062f, -0.026f, -0.038f, -0.205f, 0.908f, -0.173f, 0.299f, 0.068f, 0.022f},
|
||||||
{-0.016, 0.006, 0.094, -0.123, 0.062, 0.185, -0.017, -0.017, 0.911}
|
{-0.016f, 0.006f, 0.094f, -0.123f, 0.062f, 0.185f, -0.017f, -0.017f, 0.911f}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue