files in the program, then also delete it here.
*/
-#include "data.h"
+
+#include "array_data.h"
+#include "j2k_transcode.h"
+#include "openjpeg_image.h"
#include "util.h"
#include "version.h"
-#include "j2k.h"
-#include "openjpeg_image.h"
#include <sys/time.h>
#include <iostream>
#include <cstdio>
+
using std::cout;
using std::cerr;
-using boost::shared_ptr;
+using std::shared_ptr;
class Timer
{
int const count = 100;
int const j2k_bandwidth = 100000000;
- dcp::Data j2k (boost::filesystem::path (argv[1]) / "thx.j2c");
+ dcp::ArrayData j2k (boost::filesystem::path (argv[1]) / "thx.j2c");
Timer decompress;
Timer compress;
- dcp::Data recomp;
+ dcp::ArrayData recomp;
for (int i = 0; i < count; ++i) {
decompress.start ();
shared_ptr<dcp::OpenJPEGImage> xyz = dcp::decompress_j2k (j2k, 0);
cout << "Compress: " << count / compress.get() << " fps.\n";
FILE* f = fopen ("check.j2c", "wb");
- fwrite (recomp.data().get(), 1, recomp.size(), f);
+ fwrite (recomp.data(), 1, recomp.size(), f);
fclose (f);
}