derive kernel sizes from the diagonal

pull/3471/head
kallaballa 3 years ago
parent 054489e071
commit 81eabc5549
  1. 4
      src/beauty/beauty-demo.cpp
  2. 3
      src/tetra/tetra-demo.cpp
  3. 4
      src/video/video-demo.cpp

@ -15,7 +15,9 @@ constexpr unsigned long HEIGHT = 1080;
constexpr double SCALE = 0.125;
constexpr bool OFFSCREEN = false;
constexpr int VA_HW_DEVICE_INDEX = 0;
constexpr int BLUR_KERNEL_SIZE = WIDTH / 360 % 2 == 0 ? WIDTH / 360 + 1 : WIDTH / 360;
constexpr unsigned long DIAG = hypot(double(WIDTH), double(HEIGHT));
constexpr int BLUR_KERNEL_SIZE = DIAG / 413 % 2 == 0 ? DIAG / 413 + 1 : DIAG / 413;
using std::cerr;
using std::endl;

@ -8,8 +8,9 @@ constexpr double FPS = 60;
constexpr bool OFFSCREEN = false;
constexpr const char* OUTPUT_FILENAME = "tetra-demo.mkv";
constexpr const int VA_HW_DEVICE_INDEX = 0;
constexpr unsigned long DIAG = hypot(double(WIDTH), double(HEIGHT));
constexpr int GLOW_KERNEL_SIZE = WIDTH / 120 % 2 == 0 ? WIDTH / 120 + 1 : WIDTH / 120;
constexpr int GLOW_KERNEL_SIZE = DIAG / 138 % 2 == 0 ? DIAG / 138 + 1 : DIAG / 138;
using std::cerr;
using std::endl;

@ -8,8 +8,10 @@ constexpr long unsigned int HEIGHT = 1080;
constexpr const int VA_HW_DEVICE_INDEX = 0;
constexpr bool OFFSCREEN = false;
constexpr const char *OUTPUT_FILENAME = "video-demo.mkv";
constexpr unsigned long DIAG = hypot(double(WIDTH), double(HEIGHT));
constexpr int GLOW_KERNEL_SIZE = DIAG / 138 % 2 == 0 ? DIAG / 138 + 1 : DIAG / 138;
constexpr int GLOW_KERNEL_SIZE = WIDTH / 120 % 2 == 0 ? WIDTH / 120 + 1 : WIDTH / 120;
using std::cerr;
using std::endl;

Loading…
Cancel
Save