DCPVideoFrame::DCPVideoFrame (
shared_ptr<const Image> yuv, shared_ptr<Subtitle> sub,
Size out, int p, int subtitle_offset, float subtitle_scale,
- Scaler const * s, int f, float fps, string pp, int clut, int bw, Log* l
+ Scaler const * s, SourceFrame f, float fps, string pp, int clut, int bw, Log* l
)
: _input (yuv)
, _subtitle (sub)
DCPVideoFrame::encode_locally ()
{
if (!_post_process.empty ()) {
- _input = _input->post_process (_post_process);
+ _input = _input->post_process (_post_process, true);
}
- shared_ptr<Image> prepared = _input->scale_and_convert_to_rgb (_out_size, _padding, _scaler);
+ shared_ptr<Image> prepared = _input->scale_and_convert_to_rgb (_out_size, _padding, _scaler, true);
if (_subtitle) {
Rect tx = subtitle_transformed_area (
_subtitle->area(), _subtitle_offset, _subtitle_scale
);
- shared_ptr<Image> im = _subtitle->image()->scale (tx.size(), _scaler);
+ shared_ptr<Image> im = _subtitle->image()->scale (tx.size(), _scaler, true);
prepared->alpha_blend (im, tx.position());
}
* @param frame Frame index.
*/
void
-EncodedData::write (shared_ptr<const Options> opt, int frame)
+EncodedData::write (shared_ptr<const EncodeOptions> opt, SourceFrame frame)
{
string const tmp_j2k = opt->frame_out_path (frame, true);
boost::filesystem::rename (tmp_j2k, real_j2k);
/* Write a file containing the hash */
- string const hash = real_j2k + ".md5";
+ string const hash = opt->hash_out_path (frame, false);
ofstream h (hash.c_str());
h << md5_digest (_data, _size) << "\n";
h.close ();