mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Minor bug fix PatternSource.
This commit is contained in:
@@ -186,7 +186,7 @@ glm::ivec2 GlmToolkit::resolutionFromDescription(int aspectratio, int height)
|
|||||||
int h = glm::clamp(height, 0, 8);
|
int h = glm::clamp(height, 0, 8);
|
||||||
|
|
||||||
static glm::vec2 aspect_ratio_size[6] = { glm::vec2(1.f,1.f), glm::vec2(4.f,3.f), glm::vec2(3.f,2.f), glm::vec2(16.f,10.f), glm::vec2(16.f,9.f), glm::vec2(21.f,9.f) };
|
static glm::vec2 aspect_ratio_size[6] = { glm::vec2(1.f,1.f), glm::vec2(4.f,3.f), glm::vec2(3.f,2.f), glm::vec2(16.f,10.f), glm::vec2(16.f,9.f), glm::vec2(21.f,9.f) };
|
||||||
static float resolution_height[9] = { 16.f, 64.f, 200.f, 320.f, 480.f, 720.f, 1080.f, 1440.f, 2160.f };
|
static float resolution_height[10] = { 16.f, 64.f, 200.f, 320.f, 480.f, 576.f, 720.f, 1080.f, 1440.f, 2160.f };
|
||||||
|
|
||||||
float width = aspect_ratio_size[ar].x * resolution_height[h] / aspect_ratio_size[ar].y;
|
float width = aspect_ratio_size[ar].x * resolution_height[h] / aspect_ratio_size[ar].y;
|
||||||
glm::ivec2 res = glm::ivec2( width, resolution_height[h]);
|
glm::ivec2 res = glm::ivec2( width, resolution_height[h]);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ void Pattern::open( uint pattern, glm::ivec2 res )
|
|||||||
case 17:
|
case 17:
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << " kx2=" << (int)(aspectRatio() * 10.f) << " ky2=10 kt=4";
|
oss << " kx2=" << (int)(res.x * 10.f / res.y) << " ky2=10 kt=4";
|
||||||
gstreamer_pattern += oss.str(); // Zone plate
|
gstreamer_pattern += oss.str(); // Zone plate
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user