diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-21 12:36:17 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-21 12:36:17 +0000 |
| commit | e6f28e7cda23c1ba3c49cc1bf2dc1491c2f87160 (patch) | |
| tree | ab7de2b131c3543d170b167c8b93ea2113ac112e | |
| parent | 76f601f5edbdfceec91ff6f6ce4b310e0d3a6ce9 (diff) | |
| parent | 4ec7a8070dfcda1fa327df6378eaab754f119f1b (diff) | |
Mostly-merge master.
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | debian/changelog | 5 | ||||
| -rw-r--r-- | platform/osx/make_dmg.sh | 6 | ||||
| -rw-r--r-- | platform/windows/wscript | 1 | ||||
| -rw-r--r-- | src/lib/ffmpeg.cc | 1 | ||||
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 14 | ||||
| -rw-r--r-- | src/lib/ffmpeg_decoder.h | 1 | ||||
| -rw-r--r-- | src/lib/image.cc | 1 | ||||
| -rw-r--r-- | src/lib/image_content.cc | 2 | ||||
| -rw-r--r-- | src/lib/scaler.h | 2 | ||||
| -rw-r--r-- | src/lib/types.h | 3 | ||||
| -rw-r--r-- | src/lib/util.cc | 2 | ||||
| -rw-r--r-- | src/lib/video_content.cc | 3 | ||||
| -rw-r--r-- | src/lib/video_content.h | 9 | ||||
| -rw-r--r-- | src/lib/video_decoder.cc | 3 | ||||
| -rw-r--r-- | src/wx/about_dialog.cc | 2 | ||||
| -rw-r--r-- | src/wx/timecode.cc | 20 | ||||
| -rw-r--r-- | src/wx/timing_panel.cc | 6 | ||||
| -rw-r--r-- | src/wx/video_panel.cc | 1 | ||||
| -rw-r--r-- | test/play_test.cc | 4 |
21 files changed, 64 insertions, 34 deletions
@@ -2,6 +2,16 @@ * Add subtitle view. +2014-03-18 Carl Hetherington <cth@carlh.net> + + * Version 1.66.3 released. + +2014-03-18 Carl Hetherington <cth@carlh.net> + + * Fix bad rounding of timecodes. + + * Tentative support for 3D from alternate frames of the source. + 2014-03-17 Carl Hetherington <cth@carlh.net> * Improve behaviour of the position slider at the end of films. @@ -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', '1.0')) def build(target, options): 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 <carl@d1stkfactory> Mon, 17 Mar 2014 09:20:12 +0000 + -- Carl Hetherington <carl@d1stkfactory> Tue, 18 Mar 2014 16:20:29 +0000 dcpomatic (0.87-1) UNRELEASED; urgency=low diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index cabc47741..bf7512b93 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 @@ -103,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 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" diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 5fc333489..a98aa9828 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -21,7 +21,6 @@ extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> #include <libswscale/swscale.h> -#include <libpostproc/postprocess.h> } #include "ffmpeg.h" #include "ffmpeg_content.h" diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 90c00283d..86ce7503c 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -237,7 +237,7 @@ FFmpegContent::information () const stringstream s; - s << String::compose (_("%1 frames; %2 frames per second"), video_length().frames (video_frame_rate()), video_frame_rate()) << "\n"; + s << String::compose (_("%1 frames; %2 frames per second"), video_length_after_3d_combine().frames (video_frame_rate()), video_frame_rate()) << "\n"; s << VideoContent::information (); return s.str (); @@ -268,14 +268,12 @@ FFmpegContent::set_audio_stream (shared_ptr<FFmpegAudioStream> s) ContentTime FFmpegContent::audio_length () const { - { - boost::mutex::scoped_lock lm (_mutex); - if (!_audio_stream) { - return ContentTime (); - } + boost::mutex::scoped_lock lm (_mutex); + if (!_audio_stream) { + return ContentTime (); } - return video_length(); + return video_length (); } int @@ -422,7 +420,7 @@ FFmpegContent::full_length () const { shared_ptr<const Film> film = _film.lock (); assert (film); - return DCPTime (video_length(), FrameRateChange (video_frame_rate (), film->video_frame_rate ())); + return DCPTime (video_length_after_3d_combine(), FrameRateChange (video_frame_rate (), film->video_frame_rate ())); } AudioMapping diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h index fbf802bb0..15fe5d9a4 100644 --- a/src/lib/ffmpeg_decoder.h +++ b/src/lib/ffmpeg_decoder.h @@ -29,7 +29,6 @@ #include <boost/thread/mutex.hpp> extern "C" { #include <libavcodec/avcodec.h> -#include <libpostproc/postprocess.h> } #include "util.h" #include "decoder.h" diff --git a/src/lib/image.cc b/src/lib/image.cc index c3b1ca77a..926aefd36 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -26,7 +26,6 @@ extern "C" { #include <libswscale/swscale.h> #include <libavutil/pixfmt.h> #include <libavutil/pixdesc.h> -#include <libpostproc/postprocess.h> } #include "image.h" #include "exceptions.h" diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc index 6a37f3067..d7b37a835 100644 --- a/src/lib/image_content.cc +++ b/src/lib/image_content.cc @@ -125,7 +125,7 @@ ImageContent::full_length () const { shared_ptr<const Film> film = _film.lock (); assert (film); - return DCPTime (video_length(), FrameRateChange (video_frame_rate(), film->video_frame_rate())); + return DCPTime (video_length_after_3d_combine(), FrameRateChange (video_frame_rate(), film->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 dafea92f8..4e1f59ca8 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -64,7 +64,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 15109eee0..5b3bd76ba 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -58,7 +58,6 @@ extern "C" { #include <libavformat/avformat.h> #include <libswscale/swscale.h> #include <libavfilter/avfiltergraph.h> -#include <libpostproc/postprocess.h> #include <libavutil/pixfmt.h> } #include "util.h" @@ -249,7 +248,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 b6a2d0318..5864342a2 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -319,7 +319,7 @@ VideoContent::technical_summary () const { return String::compose ( "video: length %1, size %2x%3, rate %4", - video_length().seconds(), + video_length_after_3d_combine().seconds(), video_size().width, video_size().height, video_frame_rate() @@ -332,6 +332,7 @@ VideoContent::video_size_after_3d_split () const dcp::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 dcp::Size (s.width / 2, s.height); diff --git a/src/lib/video_content.h b/src/lib/video_content.h index d2b19480f..eeb49cfa5 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -96,6 +96,15 @@ public: return _video_length; } + ContentTime video_length_after_3d_combine () const { + boost::mutex::scoped_lock lm (_mutex); + if (_video_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) { + return ContentTime (_video_length.get() / 2); + } + + return _video_length; + } + dcp::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 15f91b892..144a494dc 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -40,6 +40,9 @@ VideoDecoder::video (shared_ptr<const Image> image, bool same, ContentTime time) case VIDEO_FRAME_TYPE_2D: _pending.push_back (shared_ptr<DecodedVideo> (new DecodedVideo (time, image, EYES_BOTH, same))); break; + case VIDEO_FRAME_TYPE_3D_ALTERNATE: + Video (image, (frame % 2) ? EYES_RIGHT : EYES_LEFT, same); + break; case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: { int const half = image->size().width / 2; 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")); diff --git a/src/wx/timecode.cc b/src/wx/timecode.cc index 045327254..634a15625 100644 --- a/src/wx/timecode.cc +++ b/src/wx/timecode.cc @@ -85,20 +85,24 @@ Timecode::Timecode (wxWindow* parent) void Timecode::set (DCPTime t, int fps) { - int const h = t.seconds() / 3600; - t -= DCPTime::from_seconds (h * 3600); - int const m = t.seconds() / 60; - t -= DCPTime::from_seconds (m * 60); - int const s = t.seconds(); - t -= DCPTime::from_seconds (s); - int const f = rint (t.seconds() * fps); + /* Do this calculation with frames so that we can round + to a frame boundary at the start rather than the end. + */ + int64_t f = rint (t.seconds() * fps); + + 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<string> (h)); checked_set (_minutes, lexical_cast<string> (m)); checked_set (_seconds, lexical_cast<string> (s)); checked_set (_frames, lexical_cast<string> (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)); } DCPTime diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index b8b923a6b..3fcb9b175 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 (DCPTime () , 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 533545f64..fad824727 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 690b042d8..ed3e497ed 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().frames (24), 16); + BOOST_CHECK_EQUAL (A->video_length_after_3d_combine().frames (24), 16); shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/red_30.mp4")); film->examine_and_add_content (B); wait_for_jobs (); - BOOST_CHECK_EQUAL (B->video_length().frames (30), 16); + BOOST_CHECK_EQUAL (B->video_length_after_3d_combine().frames (30), 16); /* Film should have been set to 25fps */ BOOST_CHECK_EQUAL (film->video_frame_rate(), 25); |
