def build(bld):
- obj = bld(features = 'cxx cxxprogram')
+ obj = bld(features='cxx cxxprogram')
obj.name = 'make_dcp'
obj.use = 'libdcp%s' % bld.env.API_VERSION
- obj.uselib = 'OPENJPEG CXML'
+ obj.uselib = 'OPENJPEG CXML OPENMP'
obj.source = 'make_dcp.cc'
obj.target = 'make_dcp'
obj.install_path = ''
- obj = bld(features = 'cxx cxxprogram')
+ obj = bld(features='cxx cxxprogram')
obj.name = 'read_dcp'
obj.use = 'libdcp%s' % bld.env.API_VERSION
- obj.uselib = 'OPENJPEG CXML MAGICK'
+ obj.uselib = 'OPENJPEG CXML MAGICK OPENMP'
obj.source = 'read_dcp.cc'
obj.target = 'read_dcp'
obj.install_path = ''
bool result = true;
+#pragma omp parallel for
for (int i = 0; i < _intrinsic_duration; ++i) {
if (i >= other_picture->intrinsic_duration()) {
- return false;
+ result = false;
}
- note (DCP_PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration));
- shared_ptr<const MonoPictureFrame> frame_A = get_frame (i);
- shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i);
-
- if (!frame_buffer_equals (
- i, opt, note,
- frame_A->j2k_data(), frame_A->j2k_size(),
- frame_B->j2k_data(), frame_B->j2k_size()
- )) {
- result = false;
- if (!opt.keep_going) {
- return result;
+ if (result || opt.keep_going) {
+ note (DCP_PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration));
+ shared_ptr<const MonoPictureFrame> frame_A = get_frame (i);
+ shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i);
+
+ if (!frame_buffer_equals (
+ i, opt, note,
+ frame_A->j2k_data(), frame_A->j2k_size(),
+ frame_B->j2k_data(), frame_B->j2k_size()
+ )) {
+ result = false;
}
}
}
def build(bld):
obj = bld(features='cxx cxxprogram')
obj.name = 'tests'
- obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML XMLSEC1 SNDFILE'
+ obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML XMLSEC1 SNDFILE OPENMP'
obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
if bld.is_defined('HAVE_GCOV'):
obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION
obj = bld(features='cxx cxxprogram')
obj.name = 'subs_in_out'
- obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML'
+ obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML OPENMP'
obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
if bld.is_defined('HAVE_GCOV'):
obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION
obj = bld(features='cxx cxxprogram')
obj.name = 'rewrite_subs'
- obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML'
+ obj.uselib = 'BOOST_TEST BOOST_FILESYSTEM OPENJPEG CXML OPENMP'
obj.cppflags = ['-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']
if bld.is_defined('HAVE_GCOV'):
obj.use = 'libdcp%s_gcov' % bld.env.API_VERSION
obj = bld(features='cxx cxxprogram')
obj.name = 'bench'
- obj.uselib = 'BOOST_FILESYSTEM OPENJPEG CXML'
+ obj.uselib = 'BOOST_FILESYSTEM OPENJPEG CXML OPENMP'
obj.use = 'libdcp%s' % bld.env.API_VERSION
obj.source = 'bench.cc'
obj.target = 'bench'
<< " -v, --verbose be verbose\n"
<< " --cpl-annotation-texts allow differing CPL annotation texts\n"
<< " --reel-annotation-texts allow differing reel annotation texts\n"
+ << " -a, --annotation-texts allow different CPL and reel annotation texts\n"
<< " -m, --mean-pixel maximum allowed mean pixel error (default 5)\n"
<< " -s, --std-dev-pixel maximum allowed standard deviation of pixel error (default 5)\n"
<< " --key hexadecimal key to use to decrypt MXFs\n"
{ "mean-pixel", required_argument, 0, 'm'},
{ "std-dev-pixel", required_argument, 0, 's'},
{ "keep-going", no_argument, 0, 'k'},
+ { "annotation-texts", no_argument, 0, 'a'},
/* From here we're using random capital letters for the short option */
{ "ignore-missing-assets", no_argument, 0, 'A'},
{ "cpl-annotation-texts", no_argument, 0, 'C'},
{ 0, 0, 0, 0 }
};
- int c = getopt_long (argc, argv, "Vhvm:s:kACD:E", long_options, &option_index);
+ int c = getopt_long (argc, argv, "Vhvm:s:kaACD:E", long_options, &option_index);
if (c == -1) {
break;
case 'k':
options.keep_going = true;
break;
+ case 'a':
+ options.cpl_annotation_texts_can_differ = options.reel_annotation_texts_can_differ = true;
+ break;
case 'A':
ignore_missing_assets = true;
break;
def build(bld):
- obj = bld(features = 'cxx cxxprogram')
+ obj = bld(features='cxx cxxprogram')
obj.use = ['libdcp%s' % bld.env.API_VERSION]
- obj.uselib = 'OPENJPEG CXML'
+ obj.uselib = 'OPENJPEG CXML OPENMP'
obj.source = 'dcpdiff.cc common.cc'
obj.target = 'dcpdiff'
- obj = bld(features = 'cxx cxxprogram')
+ obj = bld(features='cxx cxxprogram')
obj.use = ['libdcp%s' % bld.env.API_VERSION]
- obj.uselib = 'OPENJPEG CXML'
+ obj.uselib = 'OPENJPEG CXML OPENMP'
obj.source = 'dcpinfo.cc common.cc'
obj.target = 'dcpinfo'
- obj = bld(features = 'cxx cxxprogram')
+ obj = bld(features='cxx cxxprogram')
obj.use = ['libdcp%s' % bld.env.API_VERSION]
- obj.uselib = 'OPENJPEG CXML'
+ obj.uselib = 'OPENJPEG CXML OPENMP'
obj.source = 'dcpdumpsub.cc'
obj.target = 'dcpdumpsub'
-
opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests')
opt.add_option('--disable-gcov', action='store_true', default=False, help='don''t use gcov in tests')
opt.add_option('--disable-examples', action='store_true', default=False, help='disable building of examples')
+ opt.add_option('--enable-openmp', action='store_true', default=False, help='enable use of OpenMP')
def configure(conf):
conf.load('compiler_cxx')
if not conf.env.TARGET_OSX:
conf.env.append_value('CXXFLAGS', ['-Wno-unused-result', '-Wno-unused-parameter'])
+ if conf.options.enable_openmp:
+ conf.env.append_value('CXXFLAGS', '-fopenmp')
+ conf.env.LIB_OPENMP = ['gomp']
+
conf.check_cfg(package='openssl', args='--cflags --libs', uselib_store='OPENSSL', mandatory=True)
conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='LIBXML++', mandatory=True)
conf.check_cfg(package='xmlsec1', args='--cflags --libs', uselib_store='XMLSEC1', mandatory=True)