Skip to content

Commit

Permalink
修改OpenGL渲染;
Browse files Browse the repository at this point in the history
增加更多图片格式,支持动态加载shader;
  • Loading branch information
RealChuan committed Oct 27, 2023
1 parent 1c6b2a0 commit becea2d
Show file tree
Hide file tree
Showing 21 changed files with 586 additions and 413 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- macos-latest
- ubuntu-latest
qt_ver:
- 6.5.2
- 6.6.0
build_type:
- "RelWithDebInfo"
generators:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/qmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- macos-latest
- ubuntu-latest
qt_ver:
- 6.5.2
- 6.6.0

steps:
- name: cache vcpkg
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(utils)

if(CMAKE_HOST_WIN32)
list(APPEND CMAKE_PREFIX_PATH "C:\\Qt\\6.5.2\\msvc2019_64")
list(APPEND CMAKE_PREFIX_PATH "C:\\Qt\\6.6.0\\msvc2019_64")
elseif(CMAKE_HOST_APPLE)

elseif(CMAKE_HOST_UNIX)
list(APPEND CMAKE_PREFIX_PATH "/opt/Qt/6.5.2/gcc_64")
list(APPEND CMAKE_PREFIX_PATH "/opt/Qt/6.6.0/gcc_64")
endif()

project(
Expand Down
3 changes: 2 additions & 1 deletion ffmpeg/clock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Clock::ClockPrivate

static std::atomic<qint64> s_serial;
static std::atomic<double> s_speed;
static constexpr auto s_diffThreshold = 200 * 1000; // 200 milliseconds
static constexpr auto s_diffThreshold = 100 * 1000; // 100 milliseconds
// static constexpr auto s_diffThreshold = 200 * 1000; // 200 milliseconds
static Clock *s_clock;
};

Expand Down
17 changes: 8 additions & 9 deletions ffmpeg/colorspace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@

#include <QVector3D>

namespace Ffmpeg {
#include <array>

namespace ColorSpace {
namespace Ffmpeg::ColorSpace {

static constexpr QVector3D kJPEGOffset = {0, -0.501960814, -0.501960814};

static constexpr float kJPEGMatrix[] = {1, 1, 1, 0.000, -0.3441, 1.772, 1.402, -0.7141, 0.000};
static constexpr std::array<float, 9> kJPEGMatrix
= {1, 1, 1, 0.000, -0.3441, 1.772, 1.402, -0.7141, 0.000};

static constexpr QVector3D kBT601Offset = {-0.0627451017, -0.501960814, -0.501960814};

static constexpr float kBT601Matrix[]
static constexpr std::array<float, 9> kBT601Matrix
= {1.1644, 1.1644, 1.1644, 0.000, -0.3918, 2.0172, 1.596, -0.813, 0.000};

static constexpr QVector3D kBT7090ffset = {-0.0627451017, -0.501960814, -0.501960814};

static constexpr float kBT709Matrix[]
static constexpr std::array<float, 9> kBT709Matrix
= {1.1644, 1.1644, 1.1644, 0.000, -0.2132, 2.112, 1.7927, -0.5329, 0.000};

static constexpr QVector3D kBT2020ffset = {-0.0627451017, -0.501960814, -0.501960814};

static constexpr float kBT2020Matrix[]
static constexpr std::array<float, 9> kBT2020Matrix
= {1.1644, 1.1644, 1.1644, 0.000, -0.187326f, 2.141772f, 1.678674f, -0.650424f, 0.000};

} // namespace ColorSpace

} // namespace Ffmpeg
} // namespace Ffmpeg::ColorSpace

#endif // COLORSPACE_HPP
Loading

0 comments on commit becea2d

Please sign in to comment.