Add basic verification report.
[libdcp.git] / benchmark / j2k_transcode.cc
index 1a814b69a765229f568f240f9505a217461b9695..71602e0b293548d067854466ac00641256d0d4be 100644 (file)
     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
 {
@@ -87,12 +89,12 @@ main (int argc, char* argv[])
        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);
@@ -109,6 +111,6 @@ main (int argc, char* argv[])
        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);
 }