diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index 339cdfa07..72dfb0cd3 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -1875,6 +1875,7 @@ bool ImProcCoordinator::updateVectorscopeHC() params->crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); constexpr int size = VECTORSCOPE_SIZE; + constexpr float norm_factor = size / (128.f * 655.36f); vectorscope_hc.fill(0); vectorscopeScale = (x2 - x1) * (y2 - y1); @@ -1893,8 +1894,8 @@ bool ImProcCoordinator::updateVectorscopeHC() #endif for (int i = y1; i < y2; ++i) { for (int j = x1, ofs_lab = (i - y1) * (x2 - x1); j < x2; ++j, ++ofs_lab) { - const int col = (size / 96000.f) * a[ofs_lab] + size / 2; - const int row = (size / 96000.f) * b[ofs_lab] + size / 2; + const int col = norm_factor * a[ofs_lab] + size / 2 + 0.5f; + const int row = norm_factor * b[ofs_lab] + size / 2 + 0.5f; if (col >= 0 && col < size && row >= 0 && row < size) { vectorscopeThr[row][col]++; } diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index a0acaebc9..b79262426 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -1666,7 +1666,7 @@ void HistogramArea::drawVectorscope(Cairo::RefPtr &cr, int w, in cx = (w + scope_size * S * std::cos(H * 2 * RT_PI_F)) / 2; cy = (h - scope_size * S * std::sin(H * 2 * RT_PI_F)) / 2; } else { - constexpr float ab_factor = 327.68f / 96000.f; + constexpr float ab_factor = 1.f / 256.f; cx = w / 2.f + scope_size * pointer_a * ab_factor; cy = h / 2.f - scope_size * pointer_b * ab_factor; }