#include "gpu_j2k_encode_worker.h"
#include "dcp_video.h"
#include "cross.h"
+#include "timer.h"
#include "dcpomatic_log.h"
#include <dcp/openjpeg_image.h>
extern "C" {
init_tiles (&img, width, height, 5, 5);
type_tile* tile = &(img.tile[0]);
+ PeriodTimer encode("poz-encode");
+
// XXX: it's a big shame about this int -> float conversion
for (int i = 0; i < 3; ++i) {
type_tile_comp* c = &tile->tile_comp[i];
shared_ptr<RemoteJ2KEncodeWorker> w (new RemoteJ2KEncodeWorker(i));
_workers.push_back (w);
_threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, w));
- _threads.push_back (new boost::thread(boost::bind(&J2KEncoder::encoder_thread, this, w)));
}
}
shared_ptr<GPUJ2KEncodeWorker> w (new GPUJ2KEncodeWorker());
_workers.push_back (w);
- _threads.push_back (new boost::thread(boost::bind(&J2KEncoder::encoder_thread, this, w)));
+ _threads->create_thread(boost::bind(&J2KEncoder::encoder_thread, this, w));
- _writer->set_encoder_threads (_threads.size());
+ _writer->set_encoder_threads (_threads->size());
}
BOOST_AUTO_TEST_CASE (gpu_test)
{
GPUJ2KEncodeWorker w;
- shared_ptr<ImageProxy> ip (new FFmpegImageProxy(private_data / "card.png"));
+ shared_ptr<ImageProxy> ip (new FFmpegImageProxy(TestPaths::private_data / "card.png"));
shared_ptr<PlayerVideo> pv (
new PlayerVideo(
ip, Crop(), optional<double>(), dcp::Size(1998, 1080), dcp::Size(1998, 1080),
- EYES_BOTH, PART_WHOLE, optional<ColourConversion>(), weak_ptr<Content>(), optional<Frame>()
+ EYES_BOTH, PART_WHOLE, optional<ColourConversion>(), VIDEO_RANGE_FULL, weak_ptr<Content>(), optional<Frame>(), false
)
);
shared_ptr<DCPVideo> vf (new DCPVideo(pv, 0, 24, 100000000, RESOLUTION_2K));