diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-14 12:58:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-14 12:58:57 +0100 |
| commit | b5e7d7127cf06f5309d2ac652d41861de59d6232 (patch) | |
| tree | a20e9c99823078b3c5d895b69f7861946f4fa7f4 /src/lib | |
| parent | a30b789020ae356d8e15c6943ae5706b83df5b84 (diff) | |
Discard right-eye images when using 3D sources to make 2D DCPs.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/encoder.cc | 13 | ||||
| -rw-r--r-- | src/lib/player_video.h | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index f766cccd9..38bf4e290 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -173,6 +173,17 @@ void Encoder::encode (list<shared_ptr<PlayerVideo> > pv) { BOOST_FOREACH (shared_ptr<PlayerVideo> i, pv) { + if (!_film->three_d()) { + /* 2D DCP */ + if (i->eyes() == EYES_RIGHT) { + /* Discard right-eye images */ + continue; + } else if (i->eyes() == EYES_LEFT) { + /* Use left-eye images for both eyes */ + i->set_eyes (EYES_BOTH); + } + } + enqueue (i); } ++_position; @@ -191,8 +202,6 @@ Encoder::enqueue (shared_ptr<PlayerVideo> pv) boost::mutex::scoped_lock queue_lock (_queue_mutex); - /* XXX: discard 3D here if required */ - /* Wait until the queue has gone down a bit */ while (_queue.size() >= threads * 2) { LOG_TIMING ("decoder-sleep queue=%1", _queue.size()); diff --git a/src/lib/player_video.h b/src/lib/player_video.h index 50848cde7..b5acd9686 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -74,6 +74,10 @@ public: return _eyes; } + void set_eyes (Eyes e) { + _eyes = e; + } + boost::optional<ColourConversion> colour_conversion () const { return _colour_conversion; } |
