olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
7.99k stars 542 forks source link

[BUILD] OpenColorIO 2.3.0 demands new argument at GetColorContext #2284

Open meerfrau opened 9 months ago

meerfrau commented 9 months ago

Commit Hash 8ce00fd97589d53f3e0d2ce1fda60374db381a04

Platform ArchLinux

Summary Sorry for being in German:

./olive/app/render/renderer.cpp: In Elementfunktion »bool olive::Renderer::GetColorContext(const olive::ColorTransformJob&, ColorContext*)«:
./olive/app/render/renderer.cpp:245:30: Fehler: keine passende Funktion für Aufruf von »OpenColorIO_v2_3dev::GpuShaderDesc::getTexture(unsigned int&, const char*&, const char*&, unsigned int&, unsigned int&, OpenColorIO_v2_3dev::GpuShaderCreator::TextureType&, OpenColorIO_v2_3dev::Interpolation&)«
  245 |       shader_desc->getTexture(i, tex_name, sampler_name, width, height, channel, interpolation);
      |       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In Datei, eingebunden von ./olive/app/common/ocioutils.h:24,
                 von ./olive/app/render/colorprocessor.h:25,
                 von ./olive/app/render/renderer.h:30,
                 von ./olive/app/render/renderer.cpp:21:
/usr/include/OpenColorIO/OpenColorIO.h:3534:18: Anmerkung: Kandidat: »virtual void OpenColorIO_v2_3dev::GpuShaderDesc::getTexture(unsigned int, const char*&, const char*&, unsigned int&, unsigned int&, OpenColorIO_v2_3dev::GpuShaderCreator::TextureType&, OpenColorIO_v2_3dev::GpuShaderCreator::TextureDimensions&, OpenColorIO_v2_3dev::Interpolation&) const«
 3534 |     virtual void getTexture(unsigned index,
      |                  ^~~~~~~~~~
/usr/include/OpenColorIO/OpenColorIO.h:3534:18: Anmerkung:   Kandidat erwartet 8 Argumente, 7 angegeben

OpenColorIO 3.2.02.3.0 introduced TextureDimensions & dimensions between channel and interpolation:

    virtual void getTexture(unsigned index,
                            const char *& textureName,
                            const char *& samplerName,
                            unsigned & width,
                            unsigned & height,
                            TextureType & channel,
                            TextureDimensions & dimensions,
                            Interpolation & interpolation) const = 0;

which is either TEXTURE_1D = 1, or TEXTURE_2D = 2,

ThomasWilshaw commented 9 months ago

As far as I'm aware there is no OpenColorIO 3, the latest is 2.3

ThomasWilshaw commented 9 months ago

Ah, but yes that is an issue with 2.3. Olive aims to compile to the VFX Reference Platform (more or less) and that is still using OCIO 2.2

meerfrau commented 9 months ago

Fixable by adding OCIO::GpuShaderDesc::TextureDimensions dimensions = OCIO::GpuShaderDesc::TEXTURE_2D;

@ThomasWilshaw May I ask you how to enforce compiling against system libraries? My system e.g. has OpenEXR 3.2.0, but olive has chosen libOpenEXR-3_1.so.30 ...

ThomasWilshaw commented 9 months ago

Thanks, we'll keep this around for as and when we update to OCIO 2.3

I'm afraid I'm not a Linuxexpert so can't reall help here mayeb @Simran-B can?

david-geiger commented 8 months ago

A krita patch for reference:

https://invent.kde.org/graphics/krita/-/commit/520c633c2c868f2236d8e56eefecdcb6e3ebd840

3rdmate commented 6 months ago

Fixable by adding OCIO::GpuShaderDesc::TextureDimensions dimensions = OCIO::GpuShaderDesc::TEXTURE_2D;

@ThomasWilshaw May I ask you how to enforce compiling against system libraries? My system e.g. has OpenEXR 3.2.0, but olive has chosen libOpenEXR-3_1.so.30 ...

works like a charm (no other change needed) :) tested on a M1