projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add basic verification report.
[libdcp.git]
/
benchmark
/
j2k_transcode.cc
diff --git
a/benchmark/j2k_transcode.cc
b/benchmark/j2k_transcode.cc
index 1a814b69a765229f568f240f9505a217461b9695..71602e0b293548d067854466ac00641256d0d4be 100644
(file)
--- a/
benchmark/j2k_transcode.cc
+++ b/
benchmark/j2k_transcode.cc
@@
-31,18
+31,20
@@
files in the program, then also delete it here.
*/
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 "util.h"
#include "version.h"
-#include "j2k.h"
-#include "openjpeg_image.h"
#include <sys/time.h>
#include <iostream>
#include <cstdio>
#include <sys/time.h>
#include <iostream>
#include <cstdio>
+
using std::cout;
using std::cerr;
using std::cout;
using std::cerr;
-using
boost
::shared_ptr;
+using
std
::shared_ptr;
class Timer
{
class Timer
{
@@
-87,12
+89,12
@@
main (int argc, char* argv[])
int const count = 100;
int const j2k_bandwidth = 100000000;
int const count = 100;
int const j2k_bandwidth = 100000000;
- dcp::Data j2k (boost::filesystem::path (argv[1]) / "thx.j2c");
+ dcp::
Array
Data j2k (boost::filesystem::path (argv[1]) / "thx.j2c");
Timer decompress;
Timer compress;
Timer decompress;
Timer compress;
- dcp::Data recomp;
+ dcp::
Array
Data recomp;
for (int i = 0; i < count; ++i) {
decompress.start ();
shared_ptr<dcp::OpenJPEGImage> xyz = dcp::decompress_j2k (j2k, 0);
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");
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);
}
fclose (f);
}