]> git.sesse.net Git - nageru/blobdiff - x264_encoder.h
Make the histograms more flexible.
[nageru] / x264_encoder.h
index 19ce1dfb7ac2e946ad00b921675267fcd1be6cf0..b8a3562a38da57e0be03437c87ecbd799facb689 100644 (file)
@@ -33,6 +33,7 @@ extern "C" {
 #include <movit/image_format.h>
 
 #include "defs.h"
+#include "metrics.h"
 #include "print_latency.h"
 #include "x264_dynamic.h"
 
@@ -122,10 +123,7 @@ private:
        std::atomic<int64_t> metric_x264_output_frames_i{0};
        std::atomic<int64_t> metric_x264_output_frames_p{0};
        std::atomic<int64_t> metric_x264_output_frames_b{0};
-
-       static constexpr size_t crf_buckets = 50;
-       std::atomic<int64_t> metric_x264_crf[crf_buckets]{{0}};
-        std::atomic<double> metric_x264_crf_sum{0.0};
+       Histogram metric_x264_crf;
 };
 
 #endif  // !defined(_X264ENCODE_H)