X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_video.cc;h=a2668c4a767f60586b9c79bfbc4fd3da4bd1f625;hb=527deef6f18c46badb396e4520d802333997add2;hp=a01a72f6b83aebb0a698a957549ea8a37019cbc7;hpb=bfe277e664a03ec47cd6bee7e1b1e4aca6eb38e6;p=dcpomatic.git diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index a01a72f6b..a2668c4a7 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2014 Carl Hetherington + Copyright (C) 2012-2015 Carl Hetherington Taken from code Copyright (C) 2010-2011 Terrence Meiczinger This program is free software; you can redistribute it and/or modify @@ -33,14 +33,13 @@ #include "exceptions.h" #include "server.h" #include "dcpomatic_socket.h" -#include "scaler.h" #include "image.h" #include "log.h" #include "cross.h" #include "player_video.h" #include "encoded_data.h" #include -#include +#include #include #include #include @@ -109,15 +108,18 @@ DCPVideo::DCPVideo (shared_ptr frame, shared_ptr DCPVideo::encode_locally (dcp::NoteHandler note) { - shared_ptr xyz; + shared_ptr xyz; + shared_ptr image = _frame->image (AV_PIX_FMT_RGB48LE, _burn_subtitles, note); if (_frame->colour_conversion()) { xyz = dcp::rgb_to_xyz ( - _frame->image (AV_PIX_FMT_RGB48LE, _burn_subtitles, note), + image->data()[0], + image->size(), + image->stride()[0], _frame->colour_conversion().get() ); } else { - xyz = dcp::xyz_to_xyz (_frame->image (AV_PIX_FMT_RGB48LE, _burn_subtitles, note)); + xyz = dcp::xyz_to_xyz (image->data()[0], image->size(), image->stride()[0]); } /* Set the max image and component sizes based on frame_rate */