projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix font_id_map errors when importing DCP subtitles that have no
[dcpomatic.git]
/
src
/
lib
/
j2k_image_proxy.cc
diff --git
a/src/lib/j2k_image_proxy.cc
b/src/lib/j2k_image_proxy.cc
index 21507ca152c3c180e9816d6fa087b2ad3329e6eb..269b01bca7457c65dfe0377240bb4b7fbbdc7348 100644
(file)
--- a/
src/lib/j2k_image_proxy.cc
+++ b/
src/lib/j2k_image_proxy.cc
@@
-19,22
+19,22
@@
*/
*/
-#include "
j2k_image_proxy
.h"
+#include "
dcpomatic_assert
.h"
#include "dcpomatic_socket.h"
#include "image.h"
#include "dcpomatic_socket.h"
#include "image.h"
-#include "dcpomatic_assert.h"
-#include "warnings.h"
-#include <dcp/raw_convert.h>
-#include <dcp/openjpeg_image.h>
-#include <dcp/mono_picture_frame.h>
-#include <dcp/stereo_picture_frame.h>
+#include "j2k_image_proxy.h"
#include <dcp/colour_conversion.h>
#include <dcp/colour_conversion.h>
-#include <dcp/rgb_xyz.h>
#include <dcp/j2k_transcode.h>
#include <dcp/j2k_transcode.h>
+#include <dcp/mono_picture_frame.h>
+#include <dcp/openjpeg_image.h>
+#include <dcp/raw_convert.h>
+#include <dcp/rgb_xyz.h>
+#include <dcp/stereo_picture_frame.h>
+#include <dcp/warnings.h>
#include <libcxml/cxml.h>
#include <libcxml/cxml.h>
-
DCPOMATIC
_DISABLE_WARNINGS
+
LIBDCP
_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
#include <libxml++/libxml++.h>
-
DCPOMATIC
_ENABLE_WARNINGS
+
LIBDCP
_ENABLE_WARNINGS
#include <iostream>
#include "i18n.h"
#include <iostream>
#include "i18n.h"
@@
-42,10
+42,8
@@
DCPOMATIC_ENABLE_WARNINGS
using std::cout;
using std::dynamic_pointer_cast;
using std::cout;
using std::dynamic_pointer_cast;
-using std::make_pair;
using std::make_shared;
using std::max;
using std::make_shared;
using std::max;
-using std::pair;
using std::shared_ptr;
using std::string;
using boost::optional;
using std::shared_ptr;
using std::string;
using boost::optional;
@@
-120,7
+118,7
@@
J2KImageProxy::J2KImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
int
int
-J2KImageProxy::prepare (
bool aligned
, optional<dcp::Size> target_size) const
+J2KImageProxy::prepare (
Image::Alignment alignment
, optional<dcp::Size> target_size) const
{
boost::mutex::scoped_lock lm (_mutex);
{
boost::mutex::scoped_lock lm (_mutex);
@@
-145,7
+143,7
@@
J2KImageProxy::prepare (bool aligned, optional<dcp::Size> target_size) const
try {
/* XXX: should check that potentially trashing _data here doesn't matter */
auto decompressed = dcp::decompress_j2k (const_cast<uint8_t*>(_data->data()), _data->size(), reduce);
try {
/* XXX: should check that potentially trashing _data here doesn't matter */
auto decompressed = dcp::decompress_j2k (const_cast<uint8_t*>(_data->data()), _data->size(), reduce);
- _image = make_shared<Image>(_pixel_format, decompressed->size(), align
ed
);
+ _image = make_shared<Image>(_pixel_format, decompressed->size(), align
ment
);
int const shift = 16 - decompressed->precision (0);
int const shift = 16 - decompressed->precision (0);
@@
-169,7
+167,7
@@
J2KImageProxy::prepare (bool aligned, optional<dcp::Size> target_size) const
}
}
} catch (dcp::J2KDecompressionError& e) {
}
}
} catch (dcp::J2KDecompressionError& e) {
- _image = make_shared<Image>(_pixel_format, _size, align
ed
);
+ _image = make_shared<Image>(_pixel_format, _size, align
ment
);
_image->make_black ();
_error = true;
}
_image->make_black ();
_error = true;
}
@@
-182,9
+180,9
@@
J2KImageProxy::prepare (bool aligned, optional<dcp::Size> target_size) const
ImageProxy::Result
ImageProxy::Result
-J2KImageProxy::image (
bool aligned
, optional<dcp::Size> target_size) const
+J2KImageProxy::image (
Image::Alignment alignment
, optional<dcp::Size> target_size) const
{
{
- int const r = prepare (align
ed
, target_size);
+ int const r = prepare (align
ment
, target_size);
/* I think this is safe without a lock on mutex. _image is guaranteed to be
set up when prepare() has happened.
/* I think this is safe without a lock on mutex. _image is guaranteed to be
set up when prepare() has happened.