use OIIO DWAA for cache

This commit is contained in:
itsmattkc
2019-08-29 14:44:01 +10:00
parent 836943e58a
commit 27effb9473
11 changed files with 140 additions and 40 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#include "colorservice.h"
const int kRGBAChannels = 4;
#include "common/define.h"
ColorService::ColorService(const char* source_space, const char* dest_space)
{
+5 -1
View File
@@ -24,7 +24,7 @@
#include <QDebug>
#include <QFloat16>
const int kRGBAChannels = 4;
#include "common/define.h"
PixelService::PixelService()
{
@@ -39,21 +39,25 @@ PixelFormatInfo PixelService::GetPixelFormatInfo(const olive::PixelFormat &forma
info.name = tr("8-bit");
info.internal_format = GL_RGBA8;
info.pixel_type = GL_UNSIGNED_BYTE;
info.oiio_desc = OIIO::TypeDesc::UINT8;
break;
case olive::PIX_FMT_RGBA16:
info.name = tr("16-bit Integer");
info.internal_format = GL_RGBA16;
info.pixel_type = GL_UNSIGNED_SHORT;
info.oiio_desc = OIIO::TypeDesc::UINT16;
break;
case olive::PIX_FMT_RGBA16F:
info.name = tr("Half-Float (16-bit)");
info.internal_format = GL_RGBA16F;
info.pixel_type = GL_HALF_FLOAT;
info.oiio_desc = OIIO::TypeDesc::HALF;
break;
case olive::PIX_FMT_RGBA32F:
info.name = tr("Full-Float (32-bit)");
info.internal_format = GL_RGBA32F;
info.pixel_type = GL_FLOAT;
info.oiio_desc = OIIO::TypeDesc::FLOAT;
break;
default:
qFatal("Invalid pixel format requested");
+2
View File
@@ -23,6 +23,7 @@
#include <QString>
#include <QOpenGLExtraFunctions>
#include <OpenImageIO/imageio.h>
#include "decoder/frame.h"
#include "pixelformat.h"
@@ -43,6 +44,7 @@ struct PixelFormatInfo {
GLenum pixel_format;
GLenum pixel_type;
int bytes_per_pixel;
OIIO::TypeDesc oiio_desc;
};
class PixelService : public QObject {
+2
View File
@@ -79,6 +79,8 @@ private:
olive::PixelFormat format_;
olive::RenderMode mode_;
int divider_;
};
#endif // GLINSTANCE_H