summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-15 01:00:33 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-27 13:41:46 +0200
commit9bfa07293928c371d59db2091ba2b7e715ce5994 (patch)
treef73bc4c69e13d19c934b0ee798ebfa4a68e46597 /src/wx
parentc59981ce92898f6be6987f10ebb29161e36e6766 (diff)
Various alignment adjustments.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/film_viewer.cc4
-rw-r--r--src/wx/gl_video_view.cc7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 98948b1f2..735ba02eb 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -169,7 +169,7 @@ FilmViewer::set_film (shared_ptr<Film> film)
}
try {
- _player = make_shared<Player>(_film);
+ _player = make_shared<Player>(_film, !_optimise_for_j2k);
_player->set_fast ();
if (_dcp_decode_reduction) {
_player->set_dcp_decode_reduction (_dcp_decode_reduction);
@@ -221,7 +221,7 @@ FilmViewer::recreate_butler ()
_audio_channels,
bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24),
VideoRange::FULL,
- false,
+ !_optimise_for_j2k,
true,
dynamic_pointer_cast<GLVideoView>(_video_view) && _optimise_for_j2k
);
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 4c51326d3..6288a24a3 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -497,9 +497,12 @@ GLVideoView::draw (Position<int>, dcp::Size)
void
GLVideoView::set_image (shared_ptr<const PlayerVideo> pv)
{
- auto video = _optimise_for_j2k ? pv->raw_image() : pv->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, false, true);
+ shared_ptr<const Image> video = _optimise_for_j2k ? pv->raw_image() : pv->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, false, true);
- DCPOMATIC_ASSERT (!video->aligned());
+ /* Only the player's black frames should be aligned at this stage, so this should
+ * almost always have no work to do.
+ */
+ video = Image::ensure_aligned (video, false);
/** If _optimise_for_j2k is true we render a XYZ image, doing the colourspace
* conversion, scaling and video range conversion in the GL shader.