diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index 386142f08b5..91c532e0c0d 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -2403,13 +2403,13 @@ int AvFormatDecoder::ScanStreams(bool novideo) if (tvformat == "ntsc" || tvformat == "ntsc-jp" || tvformat == "pal-m" || tvformat == "atsc") { - m_fps = 29.97f; - m_parent->SetVideoParams(-1, -1, 29.97, 1.0f, false, 16); + m_fps = 29.97F; + m_parent->SetVideoParams(-1, -1, 29.97, 1.0F, false, 16); } else { - m_fps = 25.0; - m_parent->SetVideoParams(-1, -1, 25.0, 1.0f, false, 16); + m_fps = 25.0F; + m_parent->SetVideoParams(-1, -1, 25.0, 1.0F, false, 16); } } @@ -3067,7 +3067,7 @@ void AvFormatDecoder::MpegPreProcessPkt(AVStream *stream, AVPacket *pkt) // some hardware decoders (e.g. VAAPI MPEG2) will reset when the aspect // ratio changes - bool forceaspectchange = !qFuzzyCompare(m_current_aspect + 10.0f, aspect + 10.0f) && + bool forceaspectchange = !qFuzzyCompare(m_current_aspect + 10.0F, aspect + 10.0F) && m_mythcodecctx && m_mythcodecctx->DecoderWillResetOnAspect(); m_current_aspect = aspect; @@ -3179,7 +3179,7 @@ int AvFormatDecoder::H264PreProcessPkt(AVStream *stream, AVPacket *pkt) bool res_changed = ((width != m_current_width) || (height != m_current_height)); bool fps_changed = (seqFPS > 0.0) && ((seqFPS > static_cast(m_fps) + 0.01) || (seqFPS < static_cast(m_fps) - 0.01)); - bool forcechange = !qFuzzyCompare(aspect + 10.0f, m_current_aspect) && + bool forcechange = !qFuzzyCompare(aspect + 10.0F, m_current_aspect) && m_mythcodecctx && m_mythcodecctx->DecoderWillResetOnAspect(); m_current_aspect = aspect; diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp index 9ce268f6e54..5883d92368e 100644 --- a/mythtv/libs/libmythtv/mythplayer.cpp +++ b/mythtv/libs/libmythtv/mythplayer.cpp @@ -654,7 +654,7 @@ void MythPlayer::SetVideoParams(int width, int height, double fps, { paramsChanged = true; video_dim = video_disp_dim = QSize(width, height); - video_aspect = aspect > 0.0f ? aspect : static_cast(width) / height; + video_aspect = aspect > 0.0F ? aspect : static_cast(width) / height; } if (!qIsNaN(fps) && fps > 0.0 && fps < 121.0) @@ -731,7 +731,7 @@ void MythPlayer::OpenDummy(void) if (!videoOutput) { SetKeyframeDistance(15); - SetVideoParams(720, 576, 25.00, 1.25f, false, 2); + SetVideoParams(720, 576, 25.00, 1.25F, false, 2); } player_ctx->LockPlayingInfo(__FILE__, __LINE__); @@ -1936,7 +1936,7 @@ void MythPlayer::AVSync2(VideoFrame *buffer) int64_t audio_adjustment = 0; int64_t unow = 0; int64_t lateness = 0; - int64_t playspeed1000 = static_cast(1000.0f / play_speed); + int64_t playspeed1000 = static_cast(1000.0F / play_speed); bool reset = false; while (framedue == 0) diff --git a/mythtv/libs/libmythtv/mythvideoout.cpp b/mythtv/libs/libmythtv/mythvideoout.cpp index 073b592b4c0..d14481441a8 100644 --- a/mythtv/libs/libmythtv/mythvideoout.cpp +++ b/mythtv/libs/libmythtv/mythvideoout.cpp @@ -483,7 +483,7 @@ QRect MythVideoOutput::GetVisibleOSDBounds(float &VisibleAspect, float ova = m_window.GetOverridenVideoAspect(); QRect vr = m_window.GetVideoRect(); float vs = vr.height() ? static_cast(vr.width()) / vr.height() : 1.0F; - VisibleAspect = ThemeAspect * (ova > 0.0f ? vs / ova : 1.F) * dispPixelAdj; + VisibleAspect = ThemeAspect * (ova > 0.0F ? vs / ova : 1.F) * dispPixelAdj; FontScaling = 1.0F; return { QPoint(0,0), dvr.size() }; @@ -965,7 +965,7 @@ void MythVideoOutput::ResizeForVideo(int Width, int Height) return; } - float rate = m_dbDisplayProfile ? m_dbDisplayProfile->GetOutput() : 0.0f; + float rate = m_dbDisplayProfile ? m_dbDisplayProfile->GetOutput() : 0.0F; if (m_displayRes && m_displayRes->SwitchToVideo(Width, Height, static_cast(rate))) { // Switching to custom display resolution succeeded diff --git a/mythtv/libs/libmythtv/opengl/mythopenglvideo.cpp b/mythtv/libs/libmythtv/opengl/mythopenglvideo.cpp index fefebde6324..d6a0d1ee0b4 100644 --- a/mythtv/libs/libmythtv/opengl/mythopenglvideo.cpp +++ b/mythtv/libs/libmythtv/opengl/mythopenglvideo.cpp @@ -106,7 +106,7 @@ void MythOpenGLVideo::UpdateColourSpace(bool PrimariesChanged) } float colourgamma = m_videoColourSpace->GetColourGamma(); - float displaygamma = 1.0f / m_videoColourSpace->GetDisplayGamma(); + float displaygamma = 1.0F / m_videoColourSpace->GetDisplayGamma(); QMatrix4x4 primary = m_videoColourSpace->GetPrimaryMatrix(); for (int i = Progressive; i < ShaderCount; ++i) { @@ -127,9 +127,9 @@ void MythOpenGLVideo::UpdateShaderParameters(void) OpenGLLocker locker(m_render); bool rect = m_textureTarget == QOpenGLTexture::TargetRectangle; - GLfloat lineheight = rect ? 1.0f : 1.0f / m_inputTextureSize.height(); + GLfloat lineheight = rect ? 1.0F : 1.0F / m_inputTextureSize.height(); GLfloat maxheight = rect ? m_videoDispDim.height() : m_videoDispDim.height() / static_cast(m_inputTextureSize.height()); - GLfloat fieldsize = rect ? 0.5f : m_inputTextureSize.height() / 2.0f; + GLfloat fieldsize = rect ? 0.5F : m_inputTextureSize.height() / 2.0F; QVector4D parameters(lineheight, /* lineheight */ static_cast(m_inputTextureSize.width()), /* 'Y' select */ maxheight - lineheight, /* maxheight */ diff --git a/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp b/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp index 8c762265e09..268af323181 100644 --- a/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp +++ b/mythtv/libs/libmythtv/opengl/mythvideooutopengl.cpp @@ -103,7 +103,7 @@ MythVideoOutputOpenGL::MythVideoOutputOpenGL(QString Profile) m_newCodecId(kCodec_NONE), m_newVideoDim(), m_newVideoDispDim(), - m_newAspect(0.0f), + m_newAspect(0.0F), m_buffersCreated(false), m_openGLPerf(nullptr) { @@ -442,7 +442,7 @@ void MythVideoOutputOpenGL::ProcessFrame(VideoFrame *Frame, OSD */*osd*/, m_newCodecId = kCodec_NONE; m_newVideoDim = QSize(); m_newVideoDispDim = QSize(); - m_newAspect = 0.0f; + m_newAspect = 0.0F; if (wasembedding && ok) EmbedInWidget(oldrect); @@ -840,7 +840,7 @@ void MythVideoOutputOpenGL::ShowPIP(VideoFrame*, MythPlayer *PiPPlayer, PIPLocat const QSize pipvideodim = PiPPlayer->GetVideoBufferSize(); QRect pipvideorect = QRect(QPoint(0, 0), pipvideodim); - if ((PiPPlayer->GetVideoAspect() <= 0.0f) || !pipimage || !pipimage->buf || + if ((PiPPlayer->GetVideoAspect() <= 0.0F) || !pipimage || !pipimage->buf || (pipimage->codec != FMT_YV12) || !PiPPlayer->IsPIPVisible()) { PiPPlayer->ReleaseCurrentFrame(pipimage); diff --git a/mythtv/libs/libmythtv/opengl/mythvideotexture.cpp b/mythtv/libs/libmythtv/opengl/mythvideotexture.cpp index d9942c52ae0..4f8cce8904a 100644 --- a/mythtv/libs/libmythtv/opengl/mythvideotexture.cpp +++ b/mythtv/libs/libmythtv/opengl/mythvideotexture.cpp @@ -576,7 +576,7 @@ MythVideoTexture* MythVideoTexture::CreateHelperTexture(MythRenderOpenGL *Contex for (int i = 0; i < width; i++) { - float x = (i + 0.5f) / static_cast(width); + float x = (i + 0.5F) / static_cast(width); StoreBicubicWeights(x, ref); ref += 4; } diff --git a/mythtv/libs/libmythtv/videobuffers.cpp b/mythtv/libs/libmythtv/videobuffers.cpp index 50c424a30ae..4531f6ee498 100644 --- a/mythtv/libs/libmythtv/videobuffers.cpp +++ b/mythtv/libs/libmythtv/videobuffers.cpp @@ -983,7 +983,7 @@ QString VideoBuffers::GetStatus(uint Num) const unsigned long long x = to_bitmap(m_decode, count); for (uint i = 0; i < Num; i++) { - unsigned long long mask = 1Ull << i; + unsigned long long mask = 1ULL << i; QString tmp(""); if (a & mask) tmp += (x & mask) ? "a" : "A"; diff --git a/mythtv/libs/libmythtv/videocolourspace.cpp b/mythtv/libs/libmythtv/videocolourspace.cpp index cf9238d1a24..a72c097386e 100644 --- a/mythtv/libs/libmythtv/videocolourspace.cpp +++ b/mythtv/libs/libmythtv/videocolourspace.cpp @@ -14,13 +14,13 @@ extern "C" { #include const VideoColourSpace::ColourPrimaries VideoColourSpace::BT709 = - {{{0.640f, 0.330f}, {0.300f, 0.600f}, {0.150f, 0.060f}}, {0.3127f, 0.3290f}}; + {{{0.640F, 0.330F}, {0.300F, 0.600F}, {0.150F, 0.060F}}, {0.3127F, 0.3290F}}; const VideoColourSpace::ColourPrimaries VideoColourSpace::BT610_525 = - {{{0.640f, 0.340f}, {0.310f, 0.595f}, {0.155f, 0.070f}}, {0.3127f, 0.3290f}}; + {{{0.640F, 0.340F}, {0.310F, 0.595F}, {0.155F, 0.070F}}, {0.3127F, 0.3290F}}; const VideoColourSpace::ColourPrimaries VideoColourSpace::BT610_625 = - {{{0.640f, 0.330f}, {0.290f, 0.600f}, {0.150f, 0.060f}}, {0.3127f, 0.3290f}}; + {{{0.640F, 0.330F}, {0.290F, 0.600F}, {0.150F, 0.060F}}, {0.3127F, 0.3290F}}; const VideoColourSpace::ColourPrimaries VideoColourSpace::BT2020 = - {{{0.708f, 0.292f}, {0.170f, 0.797f}, {0.131f, 0.046f}}, {0.3127f, 0.3290f}}; + {{{0.708F, 0.292F}, {0.170F, 0.797F}, {0.131F, 0.046F}}, {0.3127F, 0.3290F}}; #define LOC QString("ColourSpace: ") @@ -72,10 +72,10 @@ VideoColourSpace::VideoColourSpace(VideoColourSpace *Parent) m_primariesMode(PrimariesAuto), m_colourPrimaries(AVCOL_PRI_BT709), m_displayPrimaries(AVCOL_PRI_BT709), - m_colourGamma(2.2f), - m_displayGamma(2.2f), + m_colourGamma(2.2F), + m_displayGamma(2.2F), m_primaryMatrix(), - m_customDisplayGamma(2.2f), + m_customDisplayGamma(2.2F), m_customDisplayPrimaries(nullptr), m_parent(Parent) { @@ -269,7 +269,7 @@ void VideoColourSpace::Update(void) // Works for NVDEC and VAAPI. VideoToolBox untested. if ((m_colourSpaceDepth > 8) && !m_colourShifted) { - float scaler = 65535.0f / ((1 << m_colourSpaceDepth) -1); + float scaler = 65535.0F / ((1 << m_colourSpaceDepth) -1); scale(scaler); } static_cast(this)->operator = (this->transposed()); @@ -413,7 +413,7 @@ void VideoColourSpace::SetContrast(int Value) void VideoColourSpace::SetHue(int Value) { - m_hue = Value * -3.6f; + m_hue = Value * -3.6F; Update(); } @@ -425,7 +425,7 @@ void VideoColourSpace::SetSaturation(int Value) void VideoColourSpace::SetAlpha(int Value) { - m_alpha = 100.0f / Value; + m_alpha = 100.0F / Value; Update(); } @@ -505,7 +505,7 @@ QMatrix4x4 VideoColourSpace::GetPrimaryConversion(int Source, int Dest) // and destination. Most people will not notice the difference bt709 and bt610 etc // and we avoid extra GPU processing. // BT2020 is currently the main target - which is easily differentiated by its gamma. - if ((m_primariesMode == PrimariesAuto) && qFuzzyCompare(m_colourGamma + 1.0f, m_displayGamma + 1.0f)) + if ((m_primariesMode == PrimariesAuto) && qFuzzyCompare(m_colourGamma + 1.0F, m_displayGamma + 1.0F)) return result; // N.B. Custom primaries are not yet implemented but will, some day soon, @@ -522,14 +522,14 @@ QMatrix4x4 VideoColourSpace::GetPrimaryConversion(int Source, int Dest) void VideoColourSpace::GetPrimaries(int Primary, ColourPrimaries &Out, float &Gamma) { AVColorPrimaries primary = static_cast(Primary); - Gamma = 2.2f; + Gamma = 2.2F; switch (primary) { case AVCOL_PRI_BT470BG: case AVCOL_PRI_BT470M: Out = BT610_625; return; case AVCOL_PRI_SMPTE170M: case AVCOL_PRI_SMPTE240M: Out = BT610_525; return; - case AVCOL_PRI_BT2020: Out = BT2020; Gamma = 2.4f; return; + case AVCOL_PRI_BT2020: Out = BT2020; Gamma = 2.4F; return; default: Out = BT709; return; } } @@ -552,7 +552,7 @@ inline float CalcGy(const float p[3][2], const float w[2], const float By) inline float CalcRy(const float By, const float Gy) { - return 1.0f - Gy - By; + return 1.0F - Gy - By; } /*! \brief Create a conversion matrix for RGB to XYZ with the given primaries @@ -578,7 +578,7 @@ QMatrix4x4 VideoColourSpace::RGBtoXYZ(ColourPrimaries Primaries) temp[2][0] = Ry / Primaries.primaries[0][1] * (1- Primaries.primaries[0][0] - Primaries.primaries[0][1]); temp[2][1] = Gy / Primaries.primaries[1][1] * (1- Primaries.primaries[1][0] - Primaries.primaries[1][1]); temp[2][2] = By / Primaries.primaries[2][1] * (1- Primaries.primaries[2][0] - Primaries.primaries[2][1]); - temp[0][3] = temp[1][3] = temp[2][3] = temp[3][0] = temp[3][1] = temp[3][2] = 0.0f; - temp[3][3] = 1.0f; + temp[0][3] = temp[1][3] = temp[2][3] = temp[3][0] = temp[3][1] = temp[3][2] = 0.0F; + temp[3][3] = 1.0F; return QMatrix4x4(temp[0]); } diff --git a/mythtv/libs/libmythtv/videodisplayprofile.cpp b/mythtv/libs/libmythtv/videodisplayprofile.cpp index a11eb797332..39f4b5ebc72 100644 --- a/mythtv/libs/libmythtv/videodisplayprofile.cpp +++ b/mythtv/libs/libmythtv/videodisplayprofile.cpp @@ -395,7 +395,7 @@ void VideoDisplayProfile::SetInput(const QSize &Size, float Framerate, const QSt m_lastSize = Size; change = true; } - if (Framerate > 0.0F && !qFuzzyCompare(Framerate + 1.0f, m_lastRate + 1.0f)) + if (Framerate > 0.0F && !qFuzzyCompare(Framerate + 1.0F, m_lastRate + 1.0F)) { m_lastRate = Framerate; change = true; @@ -412,7 +412,7 @@ void VideoDisplayProfile::SetInput(const QSize &Size, float Framerate, const QSt void VideoDisplayProfile::SetOutput(float Framerate) { QMutexLocker locker(&m_lock); - if (!qFuzzyCompare(Framerate + 1.0f, m_lastRate + 1.0f)) + if (!qFuzzyCompare(Framerate + 1.0F, m_lastRate + 1.0F)) { m_lastRate = Framerate; LoadBestPreferences(m_lastSize, m_lastRate, m_lastCodecName); diff --git a/mythtv/libs/libmythtv/videooutwindow.cpp b/mythtv/libs/libmythtv/videooutwindow.cpp index 88e1158c713..fe69e2ffa8f 100644 --- a/mythtv/libs/libmythtv/videooutwindow.cpp +++ b/mythtv/libs/libmythtv/videooutwindow.cpp @@ -193,7 +193,7 @@ void VideoOutWindow::Rotate(void) m_manualHorizScale = m_manualVertScale; m_manualVertScale = temp; m_manualMove = QPoint(m_manualMove.y(), m_manualMove.x()); - m_displayAspect = 1.0f / m_displayAspect; + m_displayAspect = 1.0F / m_displayAspect; m_displayVisibleRect = QRect(QPoint(m_displayVisibleRect.top(), m_displayVisibleRect.left()), QSize(m_displayVisibleRect.height(), m_displayVisibleRect.width())); @@ -566,7 +566,7 @@ void VideoOutWindow::InputChanged(const QSize &VideoDim, const QSize &VideoDispD QSize newvideodispdim = Fix1088(VideoDispDim); if (!((VideoDim == m_videoDim) && (newvideodispdim == m_videoDispDim) && - qFuzzyCompare(Aspect + 100.0f, m_videoAspect + 100.0f))) + qFuzzyCompare(Aspect + 100.0F, m_videoAspect + 100.0F))) { m_videoDispDim = newvideodispdim; m_videoDim = VideoDim; @@ -636,8 +636,8 @@ void VideoOutWindow::SetVideoScalingAllowed(bool Change) m_dbScalingAllowed = false; } - if (!(qFuzzyCompare(oldvert + 100.0f, m_dbVertScale + 100.0f) && - qFuzzyCompare(oldhoriz + 100.0f, m_dbHorizScale + 100.0f))) + if (!(qFuzzyCompare(oldvert + 100.0F, m_dbVertScale + 100.0F) && + qFuzzyCompare(oldhoriz + 100.0F, m_dbHorizScale + 100.0F))) { LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Over/underscan. V: %1, H: %2") .arg(static_cast(m_dbVertScale)).arg(static_cast(m_dbHorizScale))); @@ -647,7 +647,7 @@ void VideoOutWindow::SetVideoScalingAllowed(bool Change) void VideoOutWindow::SetDisplayProperties(QSize DisplayDim, float DisplayAspect) { - if (DisplayDim != m_displayDimensions || !qFuzzyCompare(DisplayAspect + 10.0f, m_displayAspect + 10.0f)) + if (DisplayDim != m_displayDimensions || !qFuzzyCompare(DisplayAspect + 10.0F, m_displayAspect + 10.0F)) { LOG(VB_GENERAL, LOG_INFO, LOC + QString("New display properties: %1mmx%2mm Aspect %3") .arg(DisplayDim.width()).arg(DisplayDim.height()) @@ -925,7 +925,7 @@ void VideoOutWindow::Zoom(ZoomDirection Direction) float oldhorizscale = m_manualHorizScale; QPoint oldmove = m_manualMove; - const float zf = 0.02f; + const float zf = 0.02F; if (kZoomHome == Direction) { m_manualVertScale = 1.0F; @@ -1000,8 +1000,8 @@ void VideoOutWindow::Zoom(ZoomDirection Direction) m_manualVertScale = snap(m_manualVertScale, 1.0F, zf / 2); m_manualHorizScale = snap(m_manualHorizScale, 1.0F, zf / 2); - if (!((oldmove == m_manualMove) && qFuzzyCompare(m_manualVertScale + 100.0f, oldvertscale + 100.0f) && - qFuzzyCompare(m_manualHorizScale + 100.0f, oldhorizscale + 100.0f))) + if (!((oldmove == m_manualMove) && qFuzzyCompare(m_manualVertScale + 100.0F, oldvertscale + 100.0F) && + qFuzzyCompare(m_manualHorizScale + 100.0F, oldhorizscale + 100.0F))) { LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("New zoom: Offset %1x%2 HScale %3 VScale %4") .arg(m_manualMove.x()).arg(m_manualMove.y()) @@ -1037,8 +1037,8 @@ void VideoOutWindow::ToggleMoveBottomLine(void) m_bottomLine = true; } - if (!((oldmove == m_manualMove) && qFuzzyCompare(m_manualVertScale + 100.0f, oldvertscale + 100.0f) && - qFuzzyCompare(m_manualHorizScale + 100.0f, oldhorizscale + 100.0f))) + if (!((oldmove == m_manualMove) && qFuzzyCompare(m_manualVertScale + 100.0F, oldvertscale + 100.0F) && + qFuzzyCompare(m_manualHorizScale + 100.0F, oldhorizscale + 100.0F))) { LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("New custom zoom: Offset %1x%2 HScale %3 VScale %4") .arg(m_manualMove.x()).arg(m_manualMove.y()) diff --git a/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp b/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp index b09428f06f0..b1088638149 100644 --- a/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp +++ b/mythtv/libs/libmythui/opengl/mythrenderopengl.cpp @@ -603,7 +603,7 @@ void MythRenderOpenGL::SetBackground(int r, int g, int b, int a) m_background = tmp; makeCurrent(); - glClearColor(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f); + glClearColor(r / 255.0F, g / 255.0F, b / 255.0F, a / 255.0F); doneCurrent(); } @@ -826,7 +826,7 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture *Texture, QOpenGLFramebufferObje glEnableVertexAttribArray(VERTEX_INDEX); glEnableVertexAttribArray(TEXTURE_INDEX); glVertexAttribPointerI(VERTEX_INDEX, VERTEX_SIZE, GL_FLOAT, GL_FALSE, VERTEX_SIZE * sizeof(GLfloat), kVertexOffset); - glVertexAttrib4f(COLOR_INDEX, 1.0f, 1.0f, 1.0f, Alpha / 255.0f); + glVertexAttrib4f(COLOR_INDEX, 1.0F, 1.0F, 1.0F, Alpha / 255.0F); glVertexAttribPointerI(TEXTURE_INDEX, TEXTURE_SIZE, GL_FLOAT, GL_FALSE, TEXTURE_SIZE * sizeof(GLfloat), kTextureOffset); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); glDisableVertexAttribArray(TEXTURE_INDEX); @@ -899,8 +899,8 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture **Textures, uint TextureCount, doneCurrent(); } -static const float kLimitedRangeOffset = (16.0f / 255.0f); -static const float kLimitedRangeScale = (219.0f / 255.0f); +static const float kLimitedRangeOffset = (16.0F / 255.0F); +static const float kLimitedRangeScale = (219.0F / 255.0F); /// \brief An optimised method to clear a QRect to the given color void MythRenderOpenGL::ClearRect(QOpenGLFramebufferObject *Target, const QRect &Area, int Color) @@ -910,8 +910,8 @@ void MythRenderOpenGL::ClearRect(QOpenGLFramebufferObject *Target, const QRect & glEnableVertexAttribArray(VERTEX_INDEX); // Set the fill color - float color = m_fullRange ? Color / 255.0f : (Color * kLimitedRangeScale) + kLimitedRangeOffset; - glVertexAttrib4f(COLOR_INDEX, color, color, color, 255.0f); + float color = m_fullRange ? Color / 255.0F : (Color * kLimitedRangeScale) + kLimitedRangeOffset; + glVertexAttrib4f(COLOR_INDEX, color, color, color, 255.0F); SetShaderProgramParams(m_defaultPrograms[kShaderSimple], m_projection, "u_projection"); SetShaderProgramParams(m_defaultPrograms[kShaderSimple], m_transforms.top(), "u_transform"); @@ -970,10 +970,10 @@ void MythRenderOpenGL::DrawRoundRect(QOpenGLFramebufferObject *Target, if (m_fullRange) { glVertexAttrib4f(COLOR_INDEX, - FillBrush.color().red() / 255.0f, - FillBrush.color().green() / 255.0f, - FillBrush.color().blue() / 255.0f, - (FillBrush.color().alpha() / 255.0f) * (Alpha / 255.0f)); + FillBrush.color().red() / 255.0F, + FillBrush.color().green() / 255.0F, + FillBrush.color().blue() / 255.0F, + (FillBrush.color().alpha() / 255.0F) * (Alpha / 255.0F)); } else { @@ -981,12 +981,12 @@ void MythRenderOpenGL::DrawRoundRect(QOpenGLFramebufferObject *Target, (FillBrush.color().red() * kLimitedRangeScale) + kLimitedRangeOffset, (FillBrush.color().blue() * kLimitedRangeScale) + kLimitedRangeOffset, (FillBrush.color().green() * kLimitedRangeScale) + kLimitedRangeOffset, - (FillBrush.color().alpha() / 255.0f) * (Alpha / 255.0f)); + (FillBrush.color().alpha() / 255.0F) * (Alpha / 255.0F)); } // Set the radius m_parameters(2,0) = rad; - m_parameters(3,0) = rad - 1.0f; + m_parameters(3,0) = rad - 1.0F; // Enable the Circle shader SetShaderProgramParams(elip, m_projection, "u_projection"); @@ -1056,10 +1056,10 @@ void MythRenderOpenGL::DrawRoundRect(QOpenGLFramebufferObject *Target, if (m_fullRange) { glVertexAttrib4f(COLOR_INDEX, - LinePen.color().red() / 255.0f, - LinePen.color().green() / 255.0f, - LinePen.color().blue() / 255.0f, - (LinePen.color().alpha() / 255.0f) * (Alpha / 255.0f)); + LinePen.color().red() / 255.0F, + LinePen.color().green() / 255.0F, + LinePen.color().blue() / 255.0F, + (LinePen.color().alpha() / 255.0F) * (Alpha / 255.0F)); } else { @@ -1067,12 +1067,12 @@ void MythRenderOpenGL::DrawRoundRect(QOpenGLFramebufferObject *Target, (LinePen.color().red() * kLimitedRangeScale) + kLimitedRangeOffset, (LinePen.color().blue() * kLimitedRangeScale) + kLimitedRangeOffset, (LinePen.color().green() * kLimitedRangeScale) + kLimitedRangeOffset, - (FillBrush.color().alpha() / 255.0f) * (Alpha / 255.0f)); + (FillBrush.color().alpha() / 255.0F) * (Alpha / 255.0F)); } // Set the radius and width - m_parameters(2,0) = rad - lineWidth / 2.0f; - m_parameters(3,0) = lineWidth / 2.0f; + m_parameters(2,0) = rad - lineWidth / 2.0F; + m_parameters(3,0) = lineWidth / 2.0F; // Enable the edge shader SetShaderProgramParams(edge, m_projection, "u_projection"); @@ -1114,7 +1114,7 @@ void MythRenderOpenGL::DrawRoundRect(QOpenGLFramebufferObject *Target, SetShaderProgramParams(vline, m_projection, "u_projection"); SetShaderProgramParams(vline, m_transforms.top(), "u_transform"); - m_parameters(1,0) = lineWidth / 2.0f; + m_parameters(1,0) = lineWidth / 2.0F; QRect vl(r.left(), r.top() + rad, lineWidth, r.height() - dia); // Draw the left line segment @@ -1174,7 +1174,7 @@ void MythRenderOpenGL::Init2DState(void) glDisable(GL_DEPTH_TEST); glDepthMask(GL_FALSE); glDisable(GL_CULL_FACE); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + glClearColor(0.0F, 0.0F, 0.0F, 0.0F); glClear(GL_COLOR_BUFFER_BIT); Flush(); } @@ -1464,7 +1464,7 @@ int MythRenderOpenGL::GetBufferSize(QSize Size, QOpenGLTexture::PixelFormat Form void MythRenderOpenGL::PushTransformation(const UIEffects &fx, QPointF ¢er) { QMatrix4x4 newtop = m_transforms.top(); - if (fx.m_hzoom != 1.0f || fx.m_vzoom != 1.0f || fx.m_angle != 0.0f) + if (fx.m_hzoom != 1.0F || fx.m_vzoom != 1.0F || fx.m_angle != 0.0F) { newtop.translate(static_cast(center.x()), static_cast(center.y())); newtop.scale(fx.m_hzoom, fx.m_vzoom);