From 46275d70ca0950909bf02b85359da473a50f3776 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 13:16:24 +0000 Subject: Bump libdcp for tweaks to its tests. --- cscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscript b/cscript index 988072ecf..a9418c564 100644 --- a/cscript +++ b/cscript @@ -130,7 +130,7 @@ def make_control(debian_version, bits, filename, debug): def dependencies(target): return (('ffmpeg-cdist', '08827fa4e1d483511e6135c424d2ca9c56a9ed50'), - ('libdcp', '57d6bed')) + ('libdcp', '8af7b48')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() -- cgit v1.2.3 From 02e2271a16804a35698f513f536a9ab1893b8612 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 13:42:40 +0000 Subject: Bump ffmpeg to not build postproc any more. --- cscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cscript b/cscript index a9418c564..7e6b769f0 100644 --- a/cscript +++ b/cscript @@ -129,7 +129,7 @@ def make_control(debian_version, bits, filename, debug): print >>f,'' def dependencies(target): - return (('ffmpeg-cdist', '08827fa4e1d483511e6135c424d2ca9c56a9ed50'), + return (('ffmpeg-cdist', 'a0db025'), ('libdcp', '8af7b48')) def build(target, options): -- cgit v1.2.3 From 04ef57589ebb7c0de3377172a03b24698fd2364a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 14:24:08 +0000 Subject: Tentative support for 3D from alternate frames. Also remove references to libpostproc. Requested-by: Jean-Jacques Mantello --- ChangeLog | 4 ++++ src/lib/ffmpeg.cc | 1 - src/lib/ffmpeg_content.cc | 6 +++--- src/lib/ffmpeg_decoder.cc | 2 +- src/lib/ffmpeg_decoder.h | 1 - src/lib/image.cc | 1 - src/lib/image_content.cc | 2 +- src/lib/scaler.h | 2 +- src/lib/types.h | 3 ++- src/lib/util.cc | 2 -- src/lib/video_content.cc | 6 +++++- src/lib/video_content.h | 9 +++++++++ src/lib/video_decoder.cc | 3 +++ src/lib/video_decoder.h | 3 +++ src/wx/timing_panel.cc | 6 +++++- src/wx/video_panel.cc | 1 + test/play_test.cc | 4 ++-- 17 files changed, 40 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a99d30ff..45847805a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-03-18 Carl Hetherington + + * Tentative support for 3D from alternate frames of the source. + 2014-03-17 Carl Hetherington * Improve behaviour of the position slider at the end of films. diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index fae9baa2b..60eea6ec7 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -21,7 +21,6 @@ extern "C" { #include #include #include -#include } #include "ffmpeg.h" #include "ffmpeg_content.h" diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index fadeec9cd..b7551c96a 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -239,7 +239,7 @@ FFmpegContent::information () const stringstream s; - s << String::compose (_("%1 frames; %2 frames per second"), video_length(), video_frame_rate()) << "\n"; + s << String::compose (_("%1 frames; %2 frames per second"), video_length_after_3d_combine(), video_frame_rate()) << "\n"; s << VideoContent::information (); return s.str (); @@ -272,7 +272,7 @@ FFmpegContent::audio_length () const { int const cafr = content_audio_frame_rate (); int const vfr = video_frame_rate (); - VideoContent::Frame const vl = video_length (); + VideoContent::Frame const vl = video_length_after_3d_combine (); boost::mutex::scoped_lock lm (_mutex); if (!_audio_stream) { @@ -429,7 +429,7 @@ FFmpegContent::full_length () const assert (film); FrameRateConversion frc (video_frame_rate (), film->video_frame_rate ()); - return video_length() * frc.factor() * TIME_HZ / film->video_frame_rate (); + return video_length_after_3d_combine() * frc.factor() * TIME_HZ / film->video_frame_rate (); } AudioMapping diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 851c64606..1920f9275 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -142,7 +142,7 @@ FFmpegDecoder::flush () } /* Stop us being asked for any more data */ - _video_position = _ffmpeg_content->video_length (); + _video_position = _ffmpeg_content->video_length_after_3d_combine (); _audio_position = _ffmpeg_content->audio_length (); } diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index 63a8f0c71..d4b4fa1c0 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -29,7 +29,6 @@ #include extern "C" { #include -#include } #include "util.h" #include "decoder.h" diff --git a/src/lib/image.cc b/src/lib/image.cc index 25d1ef276..d083cf3f6 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -26,7 +26,6 @@ extern "C" { #include #include #include -#include } #include "image.h" #include "exceptions.h" diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc index fd0b57894..13f7c52e3 100644 --- a/src/lib/image_content.cc +++ b/src/lib/image_content.cc @@ -127,7 +127,7 @@ ImageContent::full_length () const assert (film); FrameRateConversion frc (video_frame_rate(), film->video_frame_rate ()); - return video_length() * frc.factor() * TIME_HZ / video_frame_rate(); + return video_length_after_3d_combine() * frc.factor() * TIME_HZ / video_frame_rate(); } string diff --git a/src/lib/scaler.h b/src/lib/scaler.h index 6a039edd8..14077ff1d 100644 --- a/src/lib/scaler.h +++ b/src/lib/scaler.h @@ -36,7 +36,7 @@ class Scaler : public boost::noncopyable public: Scaler (int f, std::string i, std::string n); - /** @return id used for calls to FFmpeg's pp_postprocess */ + /** @return id used for calls to FFmpeg's sws_getContext */ int ffmpeg_id () const { return _ffmpeg_id; } diff --git a/src/lib/types.h b/src/lib/types.h index 96b993a8e..8a16818bd 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -69,7 +69,8 @@ enum VideoFrameType { VIDEO_FRAME_TYPE_2D, VIDEO_FRAME_TYPE_3D_LEFT_RIGHT, - VIDEO_FRAME_TYPE_3D_TOP_BOTTOM + VIDEO_FRAME_TYPE_3D_TOP_BOTTOM, + VIDEO_FRAME_TYPE_3D_ALTERNATE }; enum Eyes diff --git a/src/lib/util.cc b/src/lib/util.cc index 35385ab40..85c52b039 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -57,7 +57,6 @@ extern "C" { #include #include #include -#include #include } #include "util.h" @@ -248,7 +247,6 @@ dependency_version_summary () << N_("libavfilter ") << ffmpeg_version_to_string (avfilter_version()) << N_(", ") << N_("libavformat ") << ffmpeg_version_to_string (avformat_version()) << N_(", ") << N_("libavutil ") << ffmpeg_version_to_string (avutil_version()) << N_(", ") - << N_("libpostproc ") << ffmpeg_version_to_string (postproc_version()) << N_(", ") << N_("libswscale ") << ffmpeg_version_to_string (swscale_version()) << N_(", ") << MagickVersion << N_(", ") << N_("libssh ") << ssh_version (0) << N_(", ") diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 966b8e8b3..4a1ef95ac 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -317,7 +317,10 @@ VideoContent::set_video_frame_type (VideoFrameType t) string VideoContent::technical_summary () const { - return String::compose ("video: length %1, size %2x%3, rate %4", video_length(), video_size().width, video_size().height, video_frame_rate()); + return String::compose ( + "video: length %1, size %2x%3, rate %4", + video_length_after_3d_combine(), video_size().width, video_size().height, video_frame_rate() + ); } libdcp::Size @@ -326,6 +329,7 @@ VideoContent::video_size_after_3d_split () const libdcp::Size const s = video_size (); switch (video_frame_type ()) { case VIDEO_FRAME_TYPE_2D: + case VIDEO_FRAME_TYPE_3D_ALTERNATE: return s; case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: return libdcp::Size (s.width / 2, s.height); diff --git a/src/lib/video_content.h b/src/lib/video_content.h index ea4676cec..f846b7ac9 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -96,6 +96,15 @@ public: return _video_length; } + VideoContent::Frame video_length_after_3d_combine () const { + boost::mutex::scoped_lock lm (_mutex); + if (_video_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) { + return _video_length / 2; + } + + return _video_length; + } + libdcp::Size video_size () const { boost::mutex::scoped_lock lm (_mutex); return _video_size; diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index e7ddec5e6..3ae963a20 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -40,6 +40,9 @@ VideoDecoder::video (shared_ptr image, bool same, VideoContent::Fra case VIDEO_FRAME_TYPE_2D: Video (image, EYES_BOTH, same, frame); break; + case VIDEO_FRAME_TYPE_3D_ALTERNATE: + Video (image, (frame % 2) ? EYES_RIGHT : EYES_LEFT, same, frame / 2); + break; case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: { int const half = image->size().width / 2; diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h index 142320a04..255a038a9 100644 --- a/src/lib/video_decoder.h +++ b/src/lib/video_decoder.h @@ -51,6 +51,9 @@ protected: void video (boost::shared_ptr, bool, VideoContent::Frame); boost::shared_ptr _video_content; + /** This is in frames without taking 3D into account (e.g. if we are doing 3D alternate, + * this would equal 2 on the left-eye second frame (not 1)). + */ VideoContent::Frame _video_position; }; diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 34702463c..2321fd0df 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -87,7 +87,11 @@ TimingPanel::film_content_changed (int property) } else { _position->set (0, 24); } - } else if (property == ContentProperty::LENGTH || property == VideoContentProperty::VIDEO_FRAME_RATE) { + } else if ( + property == ContentProperty::LENGTH || + property == VideoContentProperty::VIDEO_FRAME_RATE || + property == VideoContentProperty::VIDEO_FRAME_TYPE + ) { if (content) { _full_length->set (content->full_length (), _editor->film()->video_frame_rate ()); _play_length->set (content->length_after_trim (), _editor->film()->video_frame_rate ()); diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 38604248c..56848907b 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -196,6 +196,7 @@ VideoPanel::VideoPanel (FilmEditor* e) _frame_type->wrapped()->Append (_("2D")); _frame_type->wrapped()->Append (_("3D left/right")); _frame_type->wrapped()->Append (_("3D top/bottom")); + _frame_type->wrapped()->Append (_("3D alternate")); _filters_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&VideoPanel::edit_filters_clicked, this)); _colour_conversion_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&VideoPanel::edit_colour_conversion_clicked, this)); diff --git a/test/play_test.cc b/test/play_test.cc index dfa597431..51e227256 100644 --- a/test/play_test.cc +++ b/test/play_test.cc @@ -89,13 +89,13 @@ BOOST_AUTO_TEST_CASE (play_test) film->examine_and_add_content (A); wait_for_jobs (); - BOOST_CHECK_EQUAL (A->video_length(), 16); + BOOST_CHECK_EQUAL (A->video_length_after_3d_combine(), 16); shared_ptr B (new FFmpegContent (film, "test/data/red_30.mp4")); film->examine_and_add_content (B); wait_for_jobs (); - BOOST_CHECK_EQUAL (B->video_length(), 16); + BOOST_CHECK_EQUAL (B->video_length_after_3d_combine(), 16); /* Film should have been set to 25fps */ BOOST_CHECK_EQUAL (film->video_frame_rate(), 25); -- cgit v1.2.3 From ae27e065d49a5d2476913f677745dd7e4a31cc09 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 15:19:13 +0000 Subject: Fix bad rounding of timecodes for display. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Gérald Maruccia --- ChangeLog | 2 ++ src/wx/timecode.cc | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45847805a..f4830e40d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-03-18 Carl Hetherington + * Fix bad rounding of timecodes. + * Tentative support for 3D from alternate frames of the source. 2014-03-17 Carl Hetherington diff --git a/src/wx/timecode.cc b/src/wx/timecode.cc index ac4fd46c4..a8c90b488 100644 --- a/src/wx/timecode.cc +++ b/src/wx/timecode.cc @@ -85,20 +85,24 @@ Timecode::Timecode (wxWindow* parent) void Timecode::set (Time t, int fps) { - int const h = t / (3600 * TIME_HZ); - t -= h * 3600 * TIME_HZ; - int const m = t / (60 * TIME_HZ); - t -= m * 60 * TIME_HZ; - int const s = t / TIME_HZ; - t -= s * TIME_HZ; - int const f = divide_with_round (t * fps, TIME_HZ); + /* Do this calculation with frames so that we can round + to a frame boundary at the start rather than the end. + */ + int64_t f = divide_with_round (t * fps, TIME_HZ); + + int const h = f / (3600 * fps); + f -= h * 3600 * fps; + int const m = f / (60 * fps); + f -= m * 60 * fps; + int const s = f / fps; + f -= s * fps; checked_set (_hours, lexical_cast (h)); checked_set (_minutes, lexical_cast (m)); checked_set (_seconds, lexical_cast (s)); checked_set (_frames, lexical_cast (f)); - _fixed->SetLabel (wxString::Format ("%02d:%02d:%02d.%02d", h, m, s, f)); + _fixed->SetLabel (wxString::Format ("%02d:%02d:%02d.%02ld", h, m, s, f)); } Time -- cgit v1.2.3 From ff3db365cc62cb68addd3acc5b94d2cdd0b46ae3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 15:50:07 +0000 Subject: Remove postproc from Windows installer. --- platform/windows/wscript | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/windows/wscript b/platform/windows/wscript index 2c16858c2..7efa7d0ca 100644 --- a/platform/windows/wscript +++ b/platform/windows/wscript @@ -112,7 +112,6 @@ File "%cdist_deps%/bin/avutil-52.dll" File "%cdist_deps%/bin/avdevice-55.dll" File "%cdist_deps%/bin/dcp.dll" File "%cdist_deps%/bin/libopenjpeg-1.dll" -File "%cdist_deps%/bin/postproc-52.dll" File "%cdist_deps%/bin/swresample-0.dll" File "%cdist_deps%/bin/swscale-2.dll" File "%cdist_deps%/bin/cxml.dll" -- cgit v1.2.3 From f9b0c993f8c241e538f8947c49aa8e0f24442a7d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 15:50:22 +0000 Subject: Remove postproc from OS X installer. --- platform/osx/make_dmg.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index cabc47741..39dac90af 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -55,7 +55,6 @@ universal_copy $ROOT lib/libavfilter*.dylib $WORK/$libs universal_copy $ROOT lib/libavutil*.dylib $WORK/$libs universal_copy $ROOT lib/libavcodec*.dylib $WORK/$libs universal_copy $ROOT lib/libswscale*.dylib $WORK/$libs -universal_copy $ROOT lib/libpostproc*.dylib $WORK/$libs universal_copy $ROOT lib/libswresample*.dylib $WORK/$libs universal_copy $ROOT bin/ffprobe $WORK/$macos universal_copy $ENV lib/libboost_system.dylib $WORK/$libs -- cgit v1.2.3 From 1d69f61742e08f93e59e9edc9982a9eb5dea391b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 16:20:29 +0000 Subject: Bump version --- ChangeLog | 4 ++++ debian/changelog | 5 +++-- wscript | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4830e40d..418149a18 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-03-18 Carl Hetherington + + * Version 1.66.3 released. + 2014-03-18 Carl Hetherington * Fix bad rounding of timecodes. diff --git a/debian/changelog b/debian/changelog index c7b6fbebc..48e48f1d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -dcpomatic (1.66.2-1) UNRELEASED; urgency=low +dcpomatic (1.66.3-1) UNRELEASED; urgency=low * New upstream release. * New upstream release. @@ -106,8 +106,9 @@ dcpomatic (1.66.2-1) UNRELEASED; urgency=low * New upstream release. * New upstream release. * New upstream release. + * New upstream release. - -- Carl Hetherington Mon, 17 Mar 2014 09:20:12 +0000 + -- Carl Hetherington Tue, 18 Mar 2014 16:20:29 +0000 dcpomatic (0.87-1) UNRELEASED; urgency=low diff --git a/wscript b/wscript index 682ceb9cd..7d3aa3f86 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import sys APPNAME = 'dcpomatic' -VERSION = '1.66.2devel' +VERSION = '1.66.3' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3 From 93ca1bb1302dc2f143377a24c19363dcf2cd444f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Mar 2014 16:20:29 +0000 Subject: Bump version --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index 7d3aa3f86..45e85efd2 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import sys APPNAME = 'dcpomatic' -VERSION = '1.66.3' +VERSION = '1.66.3devel' def options(opt): opt.load('compiler_cxx') -- cgit v1.2.3 From 8da5022c2a32accfc70a4f66a84e5158dcbe467f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 19 Mar 2014 23:09:38 +0000 Subject: I think this is a correction of a supporter name. --- src/wx/about_dialog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wx/about_dialog.cc b/src/wx/about_dialog.cc index 01332dfcc..812772f10 100644 --- a/src/wx/about_dialog.cc +++ b/src/wx/about_dialog.cc @@ -115,7 +115,7 @@ AboutDialog::AboutDialog (wxWindow* parent) supported_by.Add (wxT ("Adam Colt")); supported_by.Add (wxT ("Andres Fink")); supported_by.Add (wxT ("Evan Freeze")); - supported_by.Add (wxT ("Rodolfo Giuliano")); + supported_by.Add (wxT ("Silvio Giuliano")); supported_by.Add (wxT ("Flor Guillaume")); supported_by.Add (wxT ("Jonathan Jensen")); supported_by.Add (wxT ("Adam Klotblixt")); -- cgit v1.2.3 From 4ec7a8070dfcda1fa327df6378eaab754f119f1b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 20 Mar 2014 16:20:51 +0000 Subject: Try to fix missing icons in OS X .dmg. --- platform/osx/make_dmg.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index 39dac90af..bf7512b93 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -102,6 +102,11 @@ done cp build/platform/osx/Info.plist $WORK/$approot cp icons/dcpomatic.icns $WORK/$resources/DCP-o-matic.icns +cp icons/colour_conversions.png $WORK/$resources +cp icons/defaults.png $WORK/$resources +cp icons/kdm_email.png $WORK/$resources +cp icons/servers.png $WORK/$resources +cp icons/tms.png $WORK/$resources # i18n: .mo files for lang in de_DE es_ES fr_FR it_IT sv_SE; do -- cgit v1.2.3