diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-10-29 16:57:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-10-29 18:44:04 +0000 |
| commit | aa7edc3114fa3b7868088a9f8f22b5ee195a8668 (patch) | |
| tree | 5e5fef8156320f47aaa7626e557f85e8eb236ff5 /src/wx | |
| parent | e1c23a19b93d7bb66bd439af511d6666e56a7d29 (diff) | |
Fix incorrect colourspace conversion of XYZ content
when it is not being passed through as untouched
JPEG2000 (#730).
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/film_viewer.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 5cbe884ec..ead1cf9ae 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -37,6 +37,9 @@ #include "lib/log.h" #include "film_viewer.h" #include "wx_util.h" +extern "C" { +#include <libavutil/pixfmt.h> +} #include <dcp/exceptions.h> #include <wx/tglbtn.h> #include <iostream> @@ -186,7 +189,11 @@ FilmViewer::get (DCPTime p, bool accurate) if (!pvf.empty ()) { try { - _frame = pvf.front()->image (AV_PIX_FMT_RGB24, boost::bind (&Log::dcp_log, _film->log().get(), _1, _2)); + /* XXX: this could now give us a 48-bit image, which is a bit wasteful, + or a XYZ image, which the code below will currently rely on FFmpeg + to colourspace-convert. + */ + _frame = pvf.front()->image (boost::bind (&Log::dcp_log, _film->log().get(), _1, _2)); ImageChanged (pvf.front ()); dcp::YUVToRGB yuv_to_rgb = dcp::YUV_TO_RGB_REC601; |
