Cleanup: move some methods from util to memory_util.
[dcpomatic.git] / src / lib / util.cc
index ccd505e57d8ee263eee8c20b484f9b0e55760d32..f2d35fa2f7fc04c344de5620563e02df15a94872 100644 (file)
@@ -529,18 +529,6 @@ digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t size)
        return digester.get ();
 }
 
-/** Round a number up to the nearest multiple of another number.
- *  @param c Index.
- *  @param stride Array of numbers to round, indexed by c.
- *  @param t Multiple to round to.
- *  @return Rounded number.
- */
-int
-stride_round_up (int c, int const * stride, int t)
-{
-       int const a = stride[c] + (t - 1);
-       return a - (a % t);
-}
 
 /** Trip an assert if the caller is not in the UI thread */
 void
@@ -664,16 +652,6 @@ fit_ratio_within (float ratio, dcp::Size full_frame)
        return dcp::Size (full_frame.width, lrintf (full_frame.width / ratio));
 }
 
-void *
-wrapped_av_malloc (size_t s)
-{
-       auto p = av_malloc (s);
-       if (!p) {
-               throw bad_alloc ();
-       }
-       return p;
-}
-
 map<string, string>
 split_get_request (string url)
 {
@@ -1097,18 +1075,6 @@ copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::fun
        free (buffer);
 }
 
-double
-db_to_linear (double db)
-{
-       return pow(10, db / 20);
-}
-
-double
-linear_to_db (double linear)
-{
-       return 20 * log10(linear);
-}
-
 
 dcp::Size
 scale_for_display (dcp::Size s, dcp::Size display_container, dcp::Size film_container, PixelQuanta quanta)