edit to r58425, BLI_math is available here, better not copy,paste from linearrgb_to_srgb.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 20 Jul 2013 00:35:41 +0000 (00:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 20 Jul 2013 00:35:41 +0000 (00:35 +0000)
also remove redundant check in AUD_FFMPEGReader::seek.

intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/KX_FontObject.cpp

index 3d830df83e8e1fe3a97ef4f694370991cbaad1c5..ba961f0cb78c4be9162f3e63127bc90d9cb6148f 100644 (file)
@@ -347,10 +347,6 @@ void AUD_FFMPEGReader::seek(int position)
                uint64_t st_time = m_formatCtx->start_time;
                uint64_t seek_pos = ((uint64_t)position) * ((uint64_t)AV_TIME_BASE) / ((uint64_t)m_specs.rate);
 
-               if (seek_pos < 0) {
-                       seek_pos = 0;
-               }
-
                if (st_time != AV_NOPTS_VALUE) {
                        seek_pos += st_time;
                }
index b507e2bda7b94e993da930b72ae88101dcf8e43e..7420218ffbb7eabd1ed5b0272c8b20d67ffe4e9f 100644 (file)
@@ -43,7 +43,7 @@ incs = [
     '#intern/guardedalloc',
     '#intern/moto/include',
     '#intern/container',
-       '#intern/audaspace/intern',
+    '#intern/audaspace/intern',
     '#source/gameengine/Rasterizer/RAS_OpenGLRasterizer',
     '#source/gameengine/BlenderRoutines',
     '#source/gameengine/Converter',
index 63f715779f3137410585b17d518520560e5ac7fc..c6d1041a12aca95727328181825d6a2e7073a684 100644 (file)
@@ -178,19 +178,12 @@ void KX_FontObject::DrawText()
 
        /* Font Objects don't use the glsl shader, this color management code is copied from gpu_shader_material.glsl */
        float color[4];
-       for (int i = 0; i < 3; i++) {
-               if (m_do_color_management) {
-                       float c = m_color[i];
-                       if(c < 0.0031308)
-                               c = (c < 0.0) ? 0.0: c * 12.92;
-                       else
-                               c = 1.055 * pow(c, 1.0f/2.4f) - 0.055;
-                       color[i] = c;
-               }
-               else
-                       color[i] = m_color[i];
+       if (m_do_color_management) {
+               linearrgb_to_srgb_v4(color, m_color);
+       }
+       else {
+               copy_v4_v4(color, m_color);
        }
-       color[3] = m_color[3];
 
        /* HARDCODED MULTIPLICATION FACTOR - this will affect the render resolution directly */
        const float RES = BGE_FONT_RES * m_resolution;