diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-01-05 09:37:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-01-05 09:37:57 +0000 |
| commit | c8be0644833dce6ff39202430bba0ab358f3e096 (patch) | |
| tree | 1007061e5aac388825260ad1c016e8efd6f43919 /src/lib | |
| parent | 23690fa77d69f841569b7b7e03feb55db34622bb (diff) | |
| parent | 736f9d8154080ea5837b31af623ef863eea1a7c5 (diff) | |
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/content.cc | 2 | ||||
| -rw-r--r-- | src/lib/dcpomatic_time.h | 17 | ||||
| -rw-r--r-- | src/lib/ffmpeg.cc | 2 | ||||
| -rw-r--r-- | src/lib/film.cc | 2 | ||||
| -rw-r--r-- | src/lib/po/fr_FR.po | 12 |
5 files changed, 18 insertions, 17 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc index b5bae69b6..942e9e533 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -327,7 +327,7 @@ Content::reel_split_points () const { list<DCPTime> t; /* XXX: this is questionable; perhaps the position itself should be forced to be on a frame boundary */ - t.push_back (position().round_up (film()->video_frame_rate())); + t.push_back (position().ceil (film()->video_frame_rate())); return t; } diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h index 893bce257..16d93ca28 100644 --- a/src/lib/dcpomatic_time.h +++ b/src/lib/dcpomatic_time.h @@ -118,10 +118,12 @@ public: * at some sampling rate. * @param r Sampling rate. */ - Time<S, O> round_up (float r) const { - Type const n = llrintf (HZ / r); - Type const a = _t + n - 1; - return Time<S, O> (a - (a % n)); + Time<S, O> ceil (float r) const { + return Time<S, O> (llrint (HZ * frames_ceil(r) / double(r))); + } + + Time<S, O> floor (float r) const { + return Time<S, O> (llrint (HZ * frames_floor(r) / double(r))); } double seconds () const { @@ -143,7 +145,7 @@ public: template <typename T> int64_t frames_floor (T r) const { - return floor (_t * r / HZ); + return ::floor (_t * r / HZ); } template <typename T> @@ -152,7 +154,7 @@ public: the calculation will round down before we get the chance to ceil(). */ - return ceil (_t * double(r) / HZ); + return ::ceil (_t * double(r) / HZ); } /** @param r Frames per second */ @@ -211,7 +213,8 @@ public: } private: - friend struct dcptime_round_up_test; + friend struct dcptime_ceil_test; + friend struct dcptime_floor_test; Type _t; static const int HZ = 96000; diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index af6c8e167..ce87cc14f 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -381,7 +381,7 @@ FFmpeg::pts_offset (vector<shared_ptr<FFmpegAudioStream> > audio_streams, option /* Now adjust so that the video pts starts on a frame */ if (first_video) { ContentTime const fvc = first_video.get() + po; - po += fvc.round_up (video_frame_rate) - fvc; + po += fvc.ceil (video_frame_rate) - fvc; } return po; diff --git a/src/lib/film.cc b/src/lib/film.cc index d331516dd..68266b4ec 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1416,7 +1416,7 @@ list<DCPTimePeriod> Film::reels () const { list<DCPTimePeriod> p; - DCPTime const len = length().round_up (video_frame_rate ()); + DCPTime const len = length().ceil (video_frame_rate ()); switch (reel_type ()) { case REELTYPE_SINGLE: diff --git a/src/lib/po/fr_FR.po b/src/lib/po/fr_FR.po index 89fb615b0..3e872127f 100644 --- a/src/lib/po/fr_FR.po +++ b/src/lib/po/fr_FR.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: DCP-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-12-16 16:15+0000\n" -"PO-Revision-Date: 2016-11-14 01:09+0100\n" +"PO-Revision-Date: 2016-12-23 11:11+0100\n" "Last-Translator: Grégoire AUSINA <gregoire@gisele-productions.eu>\n" "Language-Team: \n" "Language: fr_FR\n" @@ -920,7 +920,7 @@ msgstr "ArD" #: src/lib/colour_conversion.cc:288 msgid "S-Gamut3/S-Log3" -msgstr "" +msgstr "S-Gamut3/S-Log3" #: src/lib/ffmpeg_content.cc:516 src/lib/ffmpeg_content.cc:535 msgid "SMPTE 170M (BT601)" @@ -932,7 +932,7 @@ msgstr "SMPTE 170M (BT601-6)" #: src/lib/ffmpeg_content.cc:565 msgid "SMPTE 2085, Y'D'zD'x" -msgstr "" +msgstr "SMPTE 2085, Y'D'zD'x" #: src/lib/ffmpeg_content.cc:517 src/lib/ffmpeg_content.cc:536 #: src/lib/ffmpeg_content.cc:561 @@ -952,14 +952,12 @@ msgid "SMPTE ST 428-1 (CIE 1931 XYZ)" msgstr "SMPTE ST 428-1 (CIE 1931 XYZ)" #: src/lib/ffmpeg_content.cc:521 -#, fuzzy msgid "SMPTE ST 431-2 (2011)" -msgstr "SMPTE ST 428-1" +msgstr "SMPTE ST 431-2 (2011)" #: src/lib/ffmpeg_content.cc:522 -#, fuzzy msgid "SMPTE ST 432-1 D65 (2010)" -msgstr "SMPTE ST 428-1" +msgstr "SMPTE ST 432-1 D65 (2010)" #: src/lib/scp_uploader.cc:56 msgid "SSH error (%1)" |
