summaryrefslogtreecommitdiff
path: root/src/j2k.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-06 08:28:18 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-10 13:09:45 +0000
commit93f29880839dc5589bb35f63260a7152ead7655f (patch)
tree865dd65298dd11d949efed2ac3f58f3564c7cc8f /src/j2k.cc
parentd7965cce4c5f95da7971bce6f800739a4cd2f17d (diff)
Introduce dc::Package, changing lots of namespaces in the process.
Diffstat (limited to 'src/j2k.cc')
-rw-r--r--src/j2k.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/j2k.cc b/src/j2k.cc
index 4f14ed25..5fac8666 100644
--- a/src/j2k.cc
+++ b/src/j2k.cc
@@ -31,10 +31,10 @@ using std::min;
using std::pow;
using boost::shared_ptr;
using boost::shared_array;
-using namespace dcp::dc;
+using namespace dcp;
shared_ptr<OpenJPEGImage>
-dcp::dc::decompress_j2k (Data data, int reduce)
+dcp::decompress_j2k (Data data, int reduce)
{
return decompress_j2k (data.data().get(), data.size(), reduce);
}
@@ -84,7 +84,7 @@ read_free_function (void* data)
* @return OpenJPEGImage.
*/
shared_ptr<OpenJPEGImage>
-dcp::dc::decompress_j2k (uint8_t* data, int64_t size, int reduce)
+dcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
{
uint8_t const jp2_magic[] = {
0x00,
@@ -104,7 +104,7 @@ dcp::dc::decompress_j2k (uint8_t* data, int64_t size, int reduce)
opj_codec_t* decoder = opj_create_decompress (format);
if (!decoder) {
- boost::throw_exception (DCPReadError ("could not create JPEG2000 decompresser"));
+ boost::throw_exception (PackageReadError ("could not create JPEG2000 decompresser"));
}
opj_dparameters_t parameters;
opj_set_default_decoder_parameters (&parameters);
@@ -127,9 +127,9 @@ dcp::dc::decompress_j2k (uint8_t* data, int64_t size, int reduce)
opj_destroy_codec (decoder);
opj_stream_destroy (stream);
if (format == OPJ_CODEC_J2K) {
- boost::throw_exception (DCPReadError (String::compose ("could not decode JPEG2000 codestream of %1 bytes.", size)));
+ boost::throw_exception (PackageReadError (String::compose ("could not decode JPEG2000 codestream of %1 bytes.", size)));
} else {
- boost::throw_exception (DCPReadError (String::compose ("could not decode JP2 file of %1 bytes.", size)));
+ boost::throw_exception (PackageReadError (String::compose ("could not decode JP2 file of %1 bytes.", size)));
}
}
@@ -205,7 +205,7 @@ error_callback (char const * msg, void *)
}
Data
-dcp::dc::compress_j2k (shared_ptr<const OpenJPEGImage> xyz, int bandwidth, int frames_per_second, bool threed, bool fourk)
+dcp::compress_j2k (shared_ptr<const OpenJPEGImage> xyz, int bandwidth, int frames_per_second, bool threed, bool fourk)
{
/* get a J2K compressor handle */
opj_codec_t* encoder = opj_create_compress (OPJ_CODEC_J2K);