From 42a122334d594b824c666e5263168386a76801cc Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 7 Jul 2014 13:21:42 +0100 Subject: Initial hack to support 12-bit colour. --- src/lib/dcp_video_frame.cc | 2 +- src/lib/image.cc | 2 ++ src/lib/player_video_frame.cc | 4 ++-- src/lib/player_video_frame.h | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc index 09b909696..c8f8c3cc5 100644 --- a/src/lib/dcp_video_frame.cc +++ b/src/lib/dcp_video_frame.cc @@ -127,7 +127,7 @@ DCPVideoFrame::encode_locally () } shared_ptr xyz = libdcp::rgb_to_xyz ( - _frame->image(), + _frame->image(AV_PIX_FMT_RGB48BE), in_lut, libdcp::GammaLUT::cache.get (16, 1 / _frame->colour_conversion().output_gamma), matrix diff --git a/src/lib/image.cc b/src/lib/image.cc index f340637dc..1c6c02979 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -320,6 +320,8 @@ Image::make_black () case PIX_FMT_ABGR: case PIX_FMT_BGRA: case PIX_FMT_RGB555LE: + case PIX_FMT_RGB48LE: + case PIX_FMT_RGB48BE: memset (data()[0], 0, lines(0) * stride()[0]); break; diff --git a/src/lib/player_video_frame.cc b/src/lib/player_video_frame.cc index 94760e495..63ddc637b 100644 --- a/src/lib/player_video_frame.cc +++ b/src/lib/player_video_frame.cc @@ -84,7 +84,7 @@ PlayerVideoFrame::set_subtitle (shared_ptr image, Position pos } shared_ptr -PlayerVideoFrame::image () const +PlayerVideoFrame::image (AVPixelFormat pixel_format) const { shared_ptr im = _in->image (); @@ -106,7 +106,7 @@ PlayerVideoFrame::image () const break; } - shared_ptr out = im->crop_scale_window (total_crop, _inter_size, _out_size, _scaler, PIX_FMT_RGB24, false); + shared_ptr out = im->crop_scale_window (total_crop, _inter_size, _out_size, _scaler, pixel_format, false); Position const container_offset ((_out_size.width - _inter_size.width) / 2, (_out_size.height - _inter_size.width) / 2); diff --git a/src/lib/player_video_frame.h b/src/lib/player_video_frame.h index b085cb609..6a6868292 100644 --- a/src/lib/player_video_frame.h +++ b/src/lib/player_video_frame.h @@ -18,6 +18,9 @@ */ #include +extern "C" { +#include +} #include "types.h" #include "position.h" #include "colour_conversion.h" @@ -40,7 +43,7 @@ public: void set_subtitle (boost::shared_ptr, Position); - boost::shared_ptr image () const; + boost::shared_ptr image (AVPixelFormat) const; void add_metadata (xmlpp::Node* node) const; void send_binary (boost::shared_ptr socket) const; -- cgit v1.2.3 From 2a80f3002d2c72fd69e3acd65562ab8e3cc6deac Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 16 Oct 2014 16:39:01 +0100 Subject: pot merge. --- src/lib/po/de_DE.po | 2 +- src/lib/po/es_ES.po | 2 +- src/lib/po/fr_FR.po | 2 +- src/lib/po/it_IT.po | 2 +- src/lib/po/nl_NL.po | 2 +- src/lib/po/sv_SE.po | 2 +- src/tools/po/de_DE.po | 2 +- src/tools/po/es_ES.po | 2 +- src/tools/po/fr_FR.po | 2 +- src/tools/po/it_IT.po | 2 +- src/tools/po/nl_NL.po | 4 ++-- src/tools/po/sv_SE.po | 2 +- src/wx/po/de_DE.po | 6 +++--- src/wx/po/es_ES.po | 6 +++--- src/wx/po/fr_FR.po | 6 +++--- src/wx/po/it_IT.po | 6 +++--- src/wx/po/nl_NL.po | 6 +++--- src/wx/po/sv_SE.po | 6 +++--- 18 files changed, 31 insertions(+), 31 deletions(-) (limited to 'src/lib') diff --git a/src/lib/po/de_DE.po b/src/lib/po/de_DE.po index db084cb3e..071f582ce 100644 --- a/src/lib/po/de_DE.po +++ b/src/lib/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-07-13 02:32+0100\n" "Last-Translator: Carsten Kurz\n" "Language-Team: LANGUAGE \n" diff --git a/src/lib/po/es_ES.po b/src/lib/po/es_ES.po index fe5615e1e..3aa8c19fa 100644 --- a/src/lib/po/es_ES.po +++ b/src/lib/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: LIBDCPOMATIC\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-04-20 10:12-0500\n" "Last-Translator: Manuel AC \n" "Language-Team: Manuel AC \n" diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po index 8f26f336a..0242c63e7 100644 --- a/src/lib/po/fr_FR.po +++ b/src/lib/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-07-14 12:04+0100\n" "Last-Translator: Grégoire AUSINA \n" "Language-Team: \n" diff --git a/src/lib/po/it_IT.po b/src/lib/po/it_IT.po index d4760b9d5..0ddbc4a9a 100644 --- a/src/lib/po/it_IT.po +++ b/src/lib/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: IT VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-02-03 10:48+0100\n" "Last-Translator: William Fanelli \n" "Language-Team: \n" diff --git a/src/lib/po/nl_NL.po b/src/lib/po/nl_NL.po index 09f14e1ac..857aa12d4 100644 --- a/src/lib/po/nl_NL.po +++ b/src/lib/po/nl_NL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-09-04 20:34+0100\n" "Last-Translator: Cherif Ben Brahim \n" "Language-Team: UniversalDV \n" diff --git a/src/lib/po/sv_SE.po b/src/lib/po/sv_SE.po index 32843da7a..d4b773c2e 100644 --- a/src/lib/po/sv_SE.po +++ b/src/lib/po/sv_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-01-19 08:59+0100\n" "Last-Translator: Adam Klotblixt \n" "Language-Team: \n" diff --git a/src/tools/po/de_DE.po b/src/tools/po/de_DE.po index 24ed468a8..ba09e24da 100644 --- a/src/tools/po/de_DE.po +++ b/src/tools/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-07-13 03:04+0100\n" "Last-Translator: Carsten Kurz\n" "Language-Team: LANGUAGE \n" diff --git a/src/tools/po/es_ES.po b/src/tools/po/es_ES.po index f6d2e4439..e37d375e0 100644 --- a/src/tools/po/es_ES.po +++ b/src/tools/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCPOMATIC\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-04-20 10:21-0500\n" "Last-Translator: Manuel AC \n" "Language-Team: Manuel AC \n" diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po index 86994dc71..75eed5623 100644 --- a/src/tools/po/fr_FR.po +++ b/src/tools/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-07-14 10:43+0100\n" "Last-Translator: Grégoire AUSINA \n" "Language-Team: \n" diff --git a/src/tools/po/it_IT.po b/src/tools/po/it_IT.po index 56b050df0..07b348c13 100644 --- a/src/tools/po/it_IT.po +++ b/src/tools/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: IT VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-02-03 09:36+0100\n" "Last-Translator: William Fanelli \n" "Language-Team: \n" diff --git a/src/tools/po/nl_NL.po b/src/tools/po/nl_NL.po index f6d076d69..c77c54b95 100644 --- a/src/tools/po/nl_NL.po +++ b/src/tools/po/nl_NL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-09-04 20:29+0100\n" "Last-Translator: Cherif Ben Brahim \n" "Language-Team: UniversalDV \n" @@ -52,7 +52,7 @@ msgstr "&Help" msgid "&Jobs" msgstr "&Projecten" -#: src/tools/dcpomatic.cc: +#: src/tools/dcpomatic.cc:631 msgid "&Make DCP\tCtrl-M" msgstr "&Maak een DCP\tCtrl-M" diff --git a/src/tools/po/sv_SE.po b/src/tools/po/sv_SE.po index 50bf29c9f..fbe64370f 100644 --- a/src/tools/po/sv_SE.po +++ b/src/tools/po/sv_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-01-19 08:59+0100\n" "Last-Translator: Adam Klotblixt \n" "Language-Team: \n" diff --git a/src/wx/po/de_DE.po b/src/wx/po/de_DE.po index 324f266cc..c488cab4b 100644 --- a/src/wx/po/de_DE.po +++ b/src/wx/po/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-07-13 03:08+0100\n" "Last-Translator: Carsten Kurz\n" "Language-Team: LANGUAGE \n" @@ -968,7 +968,7 @@ msgstr "Untertitel Sprache (z.B. EN)" msgid "Subtitles" msgstr "Untertitel" -#: src/wx/about_dialog.cc:164 +#: src/wx/about_dialog.cc:165 msgid "Supported by" msgstr "Unterstützt durch" @@ -992,7 +992,7 @@ msgstr "Gebiet (z.B. UK)" msgid "Test version " msgstr "Test Version" -#: src/wx/about_dialog.cc:209 +#: src/wx/about_dialog.cc:210 msgid "Tested by" msgstr "Getestet von" diff --git a/src/wx/po/es_ES.po b/src/wx/po/es_ES.po index 3d99cd3da..88754e0a6 100644 --- a/src/wx/po/es_ES.po +++ b/src/wx/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libdcpomatic-wx\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-04-20 12:06-0500\n" "Last-Translator: Manuel AC \n" "Language-Team: Manuel AC \n" @@ -980,7 +980,7 @@ msgstr "Idioma del subtítulo (ej. EN)" msgid "Subtitles" msgstr "Subtítulos" -#: src/wx/about_dialog.cc:164 +#: src/wx/about_dialog.cc:165 msgid "Supported by" msgstr "Soportado por" @@ -1005,7 +1005,7 @@ msgstr "Territorio (ej. ES)" msgid "Test version " msgstr "Versión en prueba" -#: src/wx/about_dialog.cc:209 +#: src/wx/about_dialog.cc:210 msgid "Tested by" msgstr "Comprobado por" diff --git a/src/wx/po/fr_FR.po b/src/wx/po/fr_FR.po index 79c18feb2..75fc5754a 100644 --- a/src/wx/po/fr_FR.po +++ b/src/wx/po/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-07-14 11:27+0100\n" "Last-Translator: Grégoire AUSINA \n" "Language-Team: \n" @@ -967,7 +967,7 @@ msgstr "Langue de sous-titres (ex. FR)" msgid "Subtitles" msgstr "Sous-titres" -#: src/wx/about_dialog.cc:164 +#: src/wx/about_dialog.cc:165 msgid "Supported by" msgstr "Soutenu par" @@ -991,7 +991,7 @@ msgstr "Territoire (ex. FR)" msgid "Test version " msgstr "Version test" -#: src/wx/about_dialog.cc:209 +#: src/wx/about_dialog.cc:210 msgid "Tested by" msgstr "Testé par" diff --git a/src/wx/po/it_IT.po b/src/wx/po/it_IT.po index 569f49975..320d15e0c 100644 --- a/src/wx/po/it_IT.po +++ b/src/wx/po/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: IT VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-02-03 10:46+0100\n" "Last-Translator: William Fanelli \n" "Language-Team: \n" @@ -990,7 +990,7 @@ msgstr "Lingua dei Sottotitoli (es. FR)" msgid "Subtitles" msgstr "Sottotitoli" -#: src/wx/about_dialog.cc:164 +#: src/wx/about_dialog.cc:165 msgid "Supported by" msgstr "" @@ -1016,7 +1016,7 @@ msgstr "Nazione (es. UK)" msgid "Test version " msgstr "Versione di test" -#: src/wx/about_dialog.cc:209 +#: src/wx/about_dialog.cc:210 msgid "Tested by" msgstr "" diff --git a/src/wx/po/nl_NL.po b/src/wx/po/nl_NL.po index 3df5b839d..a59f204af 100644 --- a/src/wx/po/nl_NL.po +++ b/src/wx/po/nl_NL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-09-04 20:17+0100\n" "Last-Translator: Cherif Ben Brahim \n" "Language-Team: UniversalDV \n" @@ -977,7 +977,7 @@ msgstr "Ondertitel Taal (vb NL)" msgid "Subtitles" msgstr "Ondertitels" -#: src/wx/about_dialog.cc:164 +#: src/wx/about_dialog.cc:165 msgid "Supported by" msgstr "Ondersteund door" @@ -1001,7 +1001,7 @@ msgstr "Grondgebied (vb NL)" msgid "Test version " msgstr "Test Versie" -#: src/wx/about_dialog.cc:209 +#: src/wx/about_dialog.cc:210 msgid "Tested by" msgstr "Getest door" diff --git a/src/wx/po/sv_SE.po b/src/wx/po/sv_SE.po index 7a75403ab..81fa8c4b3 100644 --- a/src/wx/po/sv_SE.po +++ b/src/wx/po/sv_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-10-03 22:31+0100\n" +"POT-Creation-Date: 2014-10-16 16:38+0100\n" "PO-Revision-Date: 2014-01-19 09:14+0100\n" "Last-Translator: Adam Klotblixt \n" "Language-Team: \n" @@ -1002,7 +1002,7 @@ msgstr "Undertextspråk (ex. SV)" msgid "Subtitles" msgstr "Undertexter" -#: src/wx/about_dialog.cc:164 +#: src/wx/about_dialog.cc:165 msgid "Supported by" msgstr "Stöd från" @@ -1027,7 +1027,7 @@ msgstr "Område (ex. SV)" msgid "Test version " msgstr "Testversion" -#: src/wx/about_dialog.cc:209 +#: src/wx/about_dialog.cc:210 #, fuzzy msgid "Tested by" msgstr "Översatt av" -- cgit v1.2.3 From 734340b52d30cb2dde9aa9e81c77277b261b128e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 18 Oct 2014 22:18:15 +0100 Subject: Fix build on Debian unstable which now has GraphicsMagick rather than ImageMagick. --- src/lib/image_examiner.cc | 2 ++ src/lib/image_proxy.cc | 4 ++++ src/lib/util.cc | 5 +++++ src/tools/wscript | 2 +- src/wx/wscript | 1 - test/image_test.cc | 14 ++++++++++++++ wscript | 10 +++++++++- 7 files changed, 35 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 4ff324f68..7058ea3b2 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -38,7 +38,9 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptrpath(0).string()); _video_size = libdcp::Size (image->columns(), image->rows()); delete image; diff --git a/src/lib/image_proxy.cc b/src/lib/image_proxy.cc index 3aba6cf7c..3851f88e7 100644 --- a/src/lib/image_proxy.cc +++ b/src/lib/image_proxy.cc @@ -156,7 +156,11 @@ MagickImageProxy::image () const /* Write line-by-line here as _image must be aligned, and write() cannot be told about strides */ uint8_t* p = _image->data()[0]; for (int i = 0; i < size.height; ++i) { +#ifdef DCPOMATIC_IMAGE_MAGICK using namespace MagickCore; +#else + using namespace MagickLib; +#endif magick_image->write (0, i, size.width, 1, "RGB", CharPixel, p); p += _image->stride()[0]; } diff --git a/src/lib/util.cc b/src/lib/util.cc index 290dd20ef..2e9ca66b2 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -43,7 +43,12 @@ #endif #include #include +#ifdef DCPOMATIC_IMAGE_MAGICK #include +#else +#include +#include +#endif #include #include #include diff --git a/src/tools/wscript b/src/tools/wscript index c4ea1530f..ac270af70 100644 --- a/src/tools/wscript +++ b/src/tools/wscript @@ -11,7 +11,7 @@ def configure(conf): def build(bld): for t in ['dcpomatic_cli', 'dcpomatic_server_cli', 'server_test', 'dcpomatic_kdm', 'dcpomatic_create']: obj = bld(features = 'cxx cxxprogram') - obj.uselib = 'BOOST_THREAD BOOST_DATETIME OPENJPEG DCP CXML AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC WXWIDGETS QUICKMAIL' + obj.uselib = 'BOOST_THREAD BOOST_DATETIME OPENJPEG DCP CXML AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC QUICKMAIL' obj.includes = ['..'] obj.use = ['libdcpomatic'] obj.source = '%s.cc' % t diff --git a/src/wx/wscript b/src/wx/wscript index 8bf2451c2..071050069 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -64,7 +64,6 @@ def configure(conf): 'wx_gtk2u_adv-3.0', 'wx_gtk2u_core-3.0', 'wx_baseu_xml-3.0', 'wx_baseu-3.0'] conf.env.LIB_WXWIDGETS = ['tiff', 'SM', 'dl', 'jpeg', 'png', 'X11', 'expat'] if conf.env.TARGET_DEBIAN and conf.env.DEBIAN_UNSTABLE: - conf.env.LIB_WXWIDGETS.append('Xxf86vm') conf.env.LIB_WXWIDGETS.append('Xext') conf.env.LIB_WXWIDGETS.append('X11') diff --git a/test/image_test.cc b/test/image_test.cc index 51ad49ebf..5662c729b 100644 --- a/test/image_test.cc +++ b/test/image_test.cc @@ -174,16 +174,24 @@ read_file (string file) boost::shared_ptr image (new Image (PIX_FMT_RGB24, size, true)); +#ifdef DCPOMATIC_IMAGE_MAGICK using namespace MagickCore; +#endif uint8_t* p = image->data()[0]; for (int y = 0; y < size.height; ++y) { uint8_t* q = p; for (int x = 0; x < size.width; ++x) { Magick::Color c = magick_image.pixelColor (x, y); +#ifdef DCPOMATIC_IMAGE_MAGICK *q++ = c.redQuantum() * 255 / QuantumRange; *q++ = c.greenQuantum() * 255 / QuantumRange; *q++ = c.blueQuantum() * 255 / QuantumRange; +#else + *q++ = c.redQuantum() * 255 / MaxRGB; + *q++ = c.greenQuantum() * 255 / MaxRGB; + *q++ = c.blueQuantum() * 255 / MaxRGB; +#endif } p += image->stride()[0]; } @@ -195,14 +203,20 @@ static void write_file (shared_ptr image, string file) { +#ifdef DCPOMATIC_IMAGE_MAGICK using namespace MagickCore; +#endif Magick::Image magick_image (Magick::Geometry (image->size().width, image->size().height), Magick::Color (0, 0, 0)); uint8_t*p = image->data()[0]; for (int y = 0; y < image->size().height; ++y) { uint8_t* q = p; for (int x = 0; x < image->size().width; ++x) { +#ifdef DCPOMATIC_IMAGE_MAGICK Magick::Color c (q[0] * QuantumRange / 256, q[1] * QuantumRange / 256, q[2] * QuantumRange / 256); +#else + Magick::Color c (q[0] * MaxRGB / 256, q[1] * MaxRGB / 256, q[2] * MaxRGB / 256); +#endif magick_image.pixelColor (x, y, c); q += 3; } diff --git a/wscript b/wscript index eb80b9efc..f5d1a1c34 100644 --- a/wscript +++ b/wscript @@ -1,6 +1,8 @@ import subprocess import os import sys +import distutils +import distutils.spawn APPNAME = 'dcpomatic' VERSION = '1.75.1devel' @@ -322,7 +324,13 @@ def configure(conf): # Dependencies which are always dynamically linked conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True) conf.check_cfg(package='glib-2.0', args='--cflags --libs', uselib_store='GLIB', mandatory=True) - conf.check_cfg(package= '', path=conf.options.magickpp_config, args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True) + if distutils.spawn.find_executable(conf.options.magickpp_config): + conf.check_cfg(package='', path=conf.options.magickpp_config, args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True) + conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_IMAGE_MAGICK') + else: + conf.check_cfg(package='GraphicsMagick++', args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True) + conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_GRAPHICS_MAGICK') + conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True) conf.check_cc(fragment=""" -- cgit v1.2.3 From e74b8e1d737deb9979a279d94c909d95f9999995 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 20 Oct 2014 22:39:16 +0100 Subject: Data must be passed to libdcp xyz conversion as little-endian. --- src/lib/dcp_video_frame.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video_frame.cc index 057ed0fae..fac247aeb 100644 --- a/src/lib/dcp_video_frame.cc +++ b/src/lib/dcp_video_frame.cc @@ -125,7 +125,7 @@ DCPVideoFrame::encode_locally () } shared_ptr xyz = libdcp::rgb_to_xyz ( - _frame->image(AV_PIX_FMT_RGB48BE), + _frame->image(AV_PIX_FMT_RGB48LE), in_lut, libdcp::GammaLUT::cache.get (16, 1 / _frame->colour_conversion().output_gamma), matrix -- cgit v1.2.3