}
void
-ABTranscoder::process_video (shared_ptr<Image> yuv, int frame, int index)
+ABTranscoder::process_video (shared_ptr<Image> yuv, int frame, shared_ptr<Subtitle> sub, int index)
{
if (index == 0) {
/* Keep this image around until we get the other half */
for (int i = 0; i < yuv->components(); ++i) {
int const line_size = yuv->line_size()[i];
int const half_line_size = line_size / 2;
+ int const stride = yuv->stride()[i];
uint8_t* p = _image->data()[i];
uint8_t* q = yuv->data()[i];
for (int j = 0; j < yuv->lines (i); ++j) {
memcpy (p + half_line_size, q + half_line_size, half_line_size);
- p += line_size;
- q += line_size;
+ p += stride;
+ q += stride;
}
}
/* And pass it to the encoder */
- _encoder->process_video (_image, frame);
+ _encoder->process_video (_image, frame, sub);
_image.reset ();
}
void
ABTranscoder::go ()
{
- _encoder->process_begin ();
+ _encoder->process_begin (_da->audio_channel_layout());
_da->process_begin ();
_db->process_begin ();
bool const b = _db->pass ();
if (_job) {
- _job->set_progress (float (_last_frame) / _da->decoding_frames ());
+ _job->set_progress (float (_last_frame) / _fs_a->dcp_length());
}
if (a && b) {