Fix last-but-one commit.
[dcpomatic.git] / src / wx / film_viewer.cc
index 21d4ae1fe1938e1da5d45de9e4b3e9a8bb0d07a7..a1cc5dfc4bd37dd1751523895291005069975909 100644 (file)
@@ -26,7 +26,6 @@
 #include "lib/util.h"
 #include "lib/job_manager.h"
 #include "lib/image.h"
-#include "lib/scaler.h"
 #include "lib/exceptions.h"
 #include "lib/examine_content_job.h"
 #include "lib/filter.h"
@@ -181,7 +180,13 @@ FilmViewer::get (DCPTime p, bool accurate)
        if (!pvf.empty ()) {
                try {
                        _frame = pvf.front()->image (PIX_FMT_RGB24, true, boost::bind (&Log::dcp_log, _film->log().get(), _1, _2));
-                       _frame = _frame->scale (_frame->size(), Scaler::from_id ("fastbilinear"), PIX_FMT_RGB24, false);
+
+                       dcp::YUVToRGB yuv_to_rgb = dcp::YUV_TO_RGB_REC601;
+                       if (pvf.front()->colour_conversion()) {
+                               yuv_to_rgb = pvf.front()->colour_conversion().get().yuv_to_rgb();
+                       }
+                       
+                       _frame = _frame->scale (_frame->size(), yuv_to_rgb, PIX_FMT_RGB24, false);
                        _position = pvf.front()->time ();
                        _inter_position = pvf.front()->inter_position ();
                        _inter_size = pvf.front()->inter_size ();