60 changes: 30 additions & 30 deletions mythtv/libs/libmythtv/test/test_copyframes/test_copyframes.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_YV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);

int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
Expand All @@ -83,7 +83,7 @@ class TestCopyFrames: public QObject
auto* bufdst = (unsigned char*)av_malloc(sizedst);

init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
// test the stride sizes
QCOMPARE(stride2, dst.pitches[0]);
Expand Down Expand Up @@ -148,7 +148,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -169,7 +169,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

QBENCHMARK
{
Expand Down Expand Up @@ -225,7 +225,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -246,7 +246,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride2, dst.pitches[0]);
QCOMPARE(stride2 / 2, dst.pitches[1]);
Expand Down Expand Up @@ -306,7 +306,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -327,7 +327,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride2, dst.pitches[0]);
Expand Down Expand Up @@ -388,7 +388,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[0]);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[1]);

Expand All @@ -409,7 +409,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST));

init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr, nullptr, 0, 0, ALIGNDST /* align */);
0, 0, ALIGNDST /* align */);
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride, dst.pitches[0]);
QCOMPARE(stride / 2, dst.pitches[1]);
Expand Down Expand Up @@ -469,7 +469,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[0]);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[1]);

Expand All @@ -490,7 +490,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST));

init(&dst, FMT_YV12, bufdst + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride, dst.pitches[0]);
Expand Down Expand Up @@ -552,7 +552,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[0]);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[1]);

Expand All @@ -573,7 +573,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST));

init(&dst, FMT_YV12, bufdst + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride, dst.pitches[0]);
Expand Down Expand Up @@ -636,7 +636,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_NV12, bufsrc, width, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (width + ALIGN - 1) & ~(ALIGN -1) : width;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -657,7 +657,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, width, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, width, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

QBENCHMARK
{
Expand Down Expand Up @@ -706,7 +706,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_YV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);

int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
Expand All @@ -731,7 +731,7 @@ class TestCopyFrames: public QObject
auto* bufdst = (unsigned char*)av_malloc(sizedst);

init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
// test the stride sizes
QCOMPARE(stride2, dst.pitches[0]);
Expand Down Expand Up @@ -799,7 +799,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -820,7 +820,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride2, dst.pitches[0]);
QCOMPARE(stride2 / 2, dst.pitches[1]);
Expand Down Expand Up @@ -882,7 +882,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -903,7 +903,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride2, dst.pitches[0]);
Expand Down Expand Up @@ -966,7 +966,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[0]);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[1]);

Expand All @@ -987,7 +987,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST));

init(&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr, nullptr, 0, 0, ALIGNDST /* align */);
0, 0, ALIGNDST /* align */);
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride, dst.pitches[0]);
QCOMPARE(stride / 2, dst.pitches[1]);
Expand Down Expand Up @@ -1049,7 +1049,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[0]);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[1]);

Expand All @@ -1070,7 +1070,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST));

init(&dst, FMT_YV12, bufdst + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride, dst.pitches[0]);
Expand Down Expand Up @@ -1134,7 +1134,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_NV12, WIDTH, HEIGHT, ALIGN));

init(&src, FMT_NV12, bufsrc + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[0]);
QCOMPARE(ALIGN ? (WIDTH + ALIGN - 1) & ~(ALIGN -1) : WIDTH , src.pitches[1]);

Expand All @@ -1155,7 +1155,7 @@ class TestCopyFrames: public QObject
(unsigned char*)av_malloc(GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST));

init(&dst, FMT_YV12, bufdst + 1, WIDTH, HEIGHT, GetBufferSize(FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1) & ~(ALIGNDST -1) : WIDTH;
QCOMPARE(stride, dst.pitches[0]);
Expand Down Expand Up @@ -1220,7 +1220,7 @@ class TestCopyFrames: public QObject
auto* bufsrc = (unsigned char*)av_malloc(sizesrc);

init(&src, FMT_NV12, bufsrc, width, HEIGHT, sizesrc,
nullptr, nullptr, 0, 0, ALIGN);
0, 0, ALIGN);
int stride = ALIGN ? (width + ALIGN - 1) & ~(ALIGN -1) : width;
QCOMPARE(stride, src.pitches[0]);
QCOMPARE(stride, src.pitches[1]);
Expand All @@ -1241,7 +1241,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize(FMT_YV12, width, HEIGHT, ALIGNDST);
auto* bufdst = (unsigned char*)av_malloc(sizedst);
init(&dst, FMT_YV12, bufdst, width, HEIGHT, sizedst,
nullptr, nullptr, 0, 0, ALIGNDST);
0, 0, ALIGNDST);

QBENCHMARK
{
Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/visualisations/videovisualgoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ void VideoVisualGoom::Draw(const QRect &area, MythPainter */*painter*/,
// goom doesn't render properly due to changes in video alpha blending
// so turn blend off
glrender->SetBlend(false);
glrender->DrawBitmap(&m_glSurface, 1, nullptr, m_area, area, nullptr, 0);
std::vector<MythGLTexture*> surfaces {m_glSurface};
glrender->DrawBitmap(surfaces, nullptr, m_area, area, nullptr, 0);
glrender->SetBlend(true);
}
glrender->doneCurrent();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/opengl/mythpainteropengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class MUI_PUBLIC MythOpenGLPainter : public MythPainter
QMutex m_textureDeleteLock;

QVector<MythGLTexture*> m_mappedTextures;
QOpenGLBuffer* m_mappedBufferPool[MAX_BUFFER_POOL] { nullptr };
std::array<QOpenGLBuffer*,MAX_BUFFER_POOL> m_mappedBufferPool { nullptr };
int m_mappedBufferPoolIdx { 0 };
bool m_mappedBufferPoolReady { false };
};
Expand Down
24 changes: 16 additions & 8 deletions mythtv/libs/libmythui/opengl/mythrenderopengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,12 +824,16 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture *Texture, QOpenGLFramebufferObje
{
void* target = buffer->map(QOpenGLBuffer::WriteOnly);
if (target)
memcpy(target, Texture->m_vertexData, kVertexSize);
{
std::copy(Texture->m_vertexData.cbegin(),
Texture->m_vertexData.cend(),
static_cast<GLfloat*>(target));
}
buffer->unmap();
}
else
{
buffer->write(0, Texture->m_vertexData, kVertexSize);
buffer->write(0, Texture->m_vertexData.data(), kVertexSize);
}
}

Expand All @@ -845,13 +849,13 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture *Texture, QOpenGLFramebufferObje
doneCurrent();
}

void MythRenderOpenGL::DrawBitmap(MythGLTexture **Textures, uint TextureCount,
void MythRenderOpenGL::DrawBitmap(std::vector<MythGLTexture *> &Textures,
QOpenGLFramebufferObject *Target,
const QRect &Source, const QRect &Destination,
QOpenGLShaderProgram *Program,
int Rotation)
{
if (!Textures || !TextureCount)
if (Textures.empty())
return;

makeCurrent();
Expand All @@ -867,7 +871,7 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture **Textures, uint TextureCount,
SetShaderProjection(Program);

GLenum textarget = first->m_target;
for (uint i = 0; i < TextureCount; i++)
for (uint i = 0; i < Textures.size(); i++)
{
QString uniform = QString("s_texture%1").arg(i);
Program->setUniformValue(qPrintable(uniform), i);
Expand All @@ -886,12 +890,16 @@ void MythRenderOpenGL::DrawBitmap(MythGLTexture **Textures, uint TextureCount,
{
void* target = buffer->map(QOpenGLBuffer::WriteOnly);
if (target)
memcpy(target, first->m_vertexData, kVertexSize);
{
std::copy(first->m_vertexData.cbegin(),
first->m_vertexData.cend(),
static_cast<GLfloat*>(target));
}
buffer->unmap();
}
else
{
buffer->write(0, first->m_vertexData, kVertexSize);
buffer->write(0, first->m_vertexData.data(), kVertexSize);
}
}

Expand Down Expand Up @@ -1266,7 +1274,7 @@ bool MythRenderOpenGL::UpdateTextureVertices(MythGLTexture *Texture, const QRect
Texture->m_destination = Destination;
Texture->m_rotation = Rotation;

GLfloat *data = Texture->m_vertexData;
GLfloat *data = Texture->m_vertexData.data();
QSize size = Texture->m_size;

int width = Texture->m_crop ? min(Source.width(), size.width()) : Source.width();
Expand Down
9 changes: 6 additions & 3 deletions mythtv/libs/libmythui/opengl/mythrenderopengl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef MYTHRENDER_OPENGL_H_
#define MYTHRENDER_OPENGL_H_

// C++
#include <vector>

// Qt
#include <QObject>
#include <QtGlobal>
Expand Down Expand Up @@ -69,7 +72,7 @@ class MUI_PUBLIC MythGLTexture
bool m_crop { false };
QRect m_source { QRect() };
QRect m_destination { QRect() };
GLfloat m_vertexData[16] { 0.0F };
std::array<GLfloat,16> m_vertexData { 0.0F };
GLenum m_target { QOpenGLTexture::Target2D };
int m_rotation { 0 };

Expand Down Expand Up @@ -152,7 +155,7 @@ class MUI_PUBLIC MythRenderOpenGL : public QOpenGLContext, public QOpenGLFunctio
void DrawBitmap(MythGLTexture *Texture, QOpenGLFramebufferObject *Target,
const QRect &Source, const QRect &Destination,
QOpenGLShaderProgram *Program, int Alpha = 255, qreal Scale = 1.0);
void DrawBitmap(MythGLTexture **Textures, uint TextureCount,
void DrawBitmap(std::vector<MythGLTexture *> &Textures,
QOpenGLFramebufferObject *Target,
const QRect &Source, const QRect &Destination,
QOpenGLShaderProgram *Program, int Rotation);
Expand Down Expand Up @@ -203,7 +206,7 @@ class MUI_PUBLIC MythRenderOpenGL : public QOpenGLContext, public QOpenGLFunctio
GLuint m_fence { 0 };

// Shaders
QOpenGLShaderProgram* m_defaultPrograms[kShaderCount] { nullptr };
std::array<QOpenGLShaderProgram*,kShaderCount> m_defaultPrograms { nullptr };
QOpenGLShaderProgram* m_activeProgram { nullptr };

// Vertices
Expand Down
2 changes: 1 addition & 1 deletion mythtv/programs/mythtranscode/transcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ int Transcode::TranscodeFile(const QString &inputname,
{
// Set a stride identical to actual width, to ease fifo post-conversion process.
init(&frame, FMT_YV12, newFrame, video_width, video_height,
static_cast<int>(newSize), nullptr, nullptr, -1, -1, 0 /* aligned */);
static_cast<int>(newSize), {}, {}, -1, -1, 0 /* aligned */);
}
else
{
Expand Down