X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_video.cc;h=f6c671fd14774b655acb67708b75084c6a49eaf8;hb=cb990adba9c57e5107ef2aa9716cf0a26c1df83d;hp=d849866512d4cdc0e983ca42201631fe3fe88d70;hpb=8c7a308c03e4b4196b4e2379a26d432b100ae2b1;p=dcpomatic.git diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index d84986651..f6c671fd1 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -125,7 +125,7 @@ DCPVideo::encode_locally () } shared_ptr xyz = dcp::rgb_to_xyz ( - _frame->image (_burn_subtitles), + _frame->image (AV_PIX_FMT_RGB48LE, _burn_subtitles), in_lut, dcp::GammaLUT::cache.get (16, 1 / _frame->colour_conversion().output_gamma, false), matrix @@ -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 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); +}