X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fgl_video_view.cc;h=04e0bac46ec373e3b731768fa00b949f5290505a;hb=67ff55886b1ee86d99c2ea27d10c73b85b0504b7;hp=4c51326d384cc01da7fe7d71f65242f575beff74;hpb=00da1e02bb8ebfbc377ad34d9810ef1cd72b9cd0;p=dcpomatic.git diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index 4c51326d3..04e0bac46 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -497,9 +497,12 @@ GLVideoView::draw (Position, dcp::Size) void GLVideoView::set_image (shared_ptr 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 video = _optimise_for_j2k ? pv->raw_image() : pv->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, 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_alignment (video, Image::Alignment::COMPACT); /** If _optimise_for_j2k is true we render a XYZ image, doing the colourspace * conversion, scaling and video range conversion in the GL shader. @@ -514,7 +517,7 @@ GLVideoView::set_image (shared_ptr pv) _have_subtitle_to_render = static_cast(text) && _optimise_for_j2k; if (_have_subtitle_to_render) { /* opt: only do this if it's a new subtitle? */ - DCPOMATIC_ASSERT (!text->image->aligned()); + DCPOMATIC_ASSERT (text->image->alignment() == Image::Alignment::COMPACT); _subtitle_texture->set (text->image); } @@ -785,7 +788,7 @@ Texture::set (shared_ptr image) glPixelStorei (GL_UNPACK_ALIGNMENT, _unpack_alignment); check_gl_error ("glPixelStorei"); - DCPOMATIC_ASSERT (!image->aligned()); + DCPOMATIC_ASSERT (image->alignment() == Image::Alignment::COMPACT); GLint internal_format; GLenum format;