diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-09-11 23:35:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-09-11 23:35:57 +0100 |
| commit | 88065ad7e9070c7c6a0f9b15202c392084e9e8ba (patch) | |
| tree | 95aa18859010fb3b534a1a860f38b0b62368e98d /src/lib/dcp_video.cc | |
| parent | 61ae2097c03bc287d654a9bab72280312a21d577 (diff) | |
Spot repeated frames from single-image sources and optimise encoding.
Diffstat (limited to 'src/lib/dcp_video.cc')
| -rw-r--r-- | src/lib/dcp_video.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index d84986651..ccfc800c8 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -315,3 +315,18 @@ DCPVideo::eyes () const return _frame->eyes (); } +/** @return true if this DCPVideo is definitely the same as another; + * (apart from the frame index), false if it is probably not. + */ +bool +DCPVideo::same (shared_ptr<const DCPVideo> other) const +{ + if (_frames_per_second != other->_frames_per_second || + _j2k_bandwidth != other->_j2k_bandwidth || + _resolution != other->_resolution || + _burn_subtitles != other->_burn_subtitles) { + return false; + } + + return _frame->same (other->_frame); +} |
