projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4a291fd
)
Various libdcp API changes.
author
Carl Hetherington
<cth@carlh.net>
Sat, 3 Jan 2015 23:08:27 +0000
(23:08 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 3 Jan 2015 23:08:27 +0000
(23:08 +0000)
src/lib/colour_conversion.cc
patch
|
blob
|
history
src/lib/dcp_examiner.cc
patch
|
blob
|
history
src/lib/image.cc
patch
|
blob
|
history
src/lib/image.h
patch
|
blob
|
history
src/lib/j2k_image_proxy.cc
patch
|
blob
|
history
src/lib/render_subtitles.cc
patch
|
blob
|
history
src/lib/subrip_decoder.cc
patch
|
blob
|
history
src/lib/subrip_subtitle.h
patch
|
blob
|
history
src/wx/colour_conversion_editor.cc
patch
|
blob
|
history
diff --git
a/src/lib/colour_conversion.cc
b/src/lib/colour_conversion.cc
index 32bc3c1a5c31c6803ce087883ebb580698e025ef..6b3d3b0f16a5a15c58d8664b3fa9064e54fca67d 100644
(file)
--- a/
src/lib/colour_conversion.cc
+++ b/
src/lib/colour_conversion.cc
@@
-58,14
+58,15
@@
ColourConversion::ColourConversion (cxml::NodePtr node)
cxml::ConstNodePtr in_node = node->node_child ("InputTransferFunction");
string in_type = in_node->string_child ("Type");
if (in_type == "Gamma") {
cxml::ConstNodePtr in_node = node->node_child ("InputTransferFunction");
string in_type = in_node->string_child ("Type");
if (in_type == "Gamma") {
- _in.reset (new dcp::GammaTransferFunction (in_node->number_child<double> ("Gamma")));
+ _in.reset (new dcp::GammaTransferFunction (
false,
in_node->number_child<double> ("Gamma")));
} else if (in_type == "ModifiedGamma") {
_in.reset (new dcp::ModifiedGammaTransferFunction (
} else if (in_type == "ModifiedGamma") {
_in.reset (new dcp::ModifiedGammaTransferFunction (
- in_node->number_child<double> ("Power"),
- in_node->number_child<double> ("Threshold"),
- in_node->number_child<double> ("A"),
- in_node->number_child<double> ("B")
- ));
+ false,
+ in_node->number_child<double> ("Power"),
+ in_node->number_child<double> ("Threshold"),
+ in_node->number_child<double> ("A"),
+ in_node->number_child<double> ("B")
+ ));
}
list<cxml::NodePtr> m = node->node_children ("Matrix");
}
list<cxml::NodePtr> m = node->node_children ("Matrix");
@@
-75,7
+76,7
@@
ColourConversion::ColourConversion (cxml::NodePtr node)
_matrix(ti, tj) = raw_convert<double> ((*i)->content ());
}
_matrix(ti, tj) = raw_convert<double> ((*i)->content ());
}
- _out.reset (new dcp::GammaTransferFunction (node->number_child<double> ("OutputGamma")));
+ _out.reset (new dcp::GammaTransferFunction (
true,
node->number_child<double> ("OutputGamma")));
}
boost::optional<ColourConversion>
}
boost::optional<ColourConversion>
diff --git
a/src/lib/dcp_examiner.cc
b/src/lib/dcp_examiner.cc
index 052c8bd76c9b35a827665a4ca92de069a7f4e8cc..de7e9539976c08ff94c7dae4c567b625adb92197 100644
(file)
--- a/
src/lib/dcp_examiner.cc
+++ b/
src/lib/dcp_examiner.cc
@@
-117,12
+117,12
@@
DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
shared_ptr<dcp::MonoPictureMXF> mono = dynamic_pointer_cast<dcp::MonoPictureMXF> (mxf);
shared_ptr<dcp::StereoPictureMXF> stereo = dynamic_pointer_cast<dcp::StereoPictureMXF> (mxf);
shared_ptr<dcp::MonoPictureMXF> mono = dynamic_pointer_cast<dcp::MonoPictureMXF> (mxf);
shared_ptr<dcp::StereoPictureMXF> stereo = dynamic_pointer_cast<dcp::StereoPictureMXF> (mxf);
- shared_ptr<Image> image (new Image (PIX_FMT_RGB
24
, _video_size.get(), false));
+ shared_ptr<Image> image (new Image (PIX_FMT_RGB
48LE
, _video_size.get(), false));
if (mono) {
if (mono) {
- mono->get_frame(0)->rgb_frame (
image->data()[0]
);
+ mono->get_frame(0)->rgb_frame (
reinterpret_cast<uint16_t*> (image->data()[0])
);
} else {
} else {
- stereo->get_frame(0)->rgb_frame (dcp::EYE_LEFT,
image->data()[0]
);
+ stereo->get_frame(0)->rgb_frame (dcp::EYE_LEFT,
reinterpret_cast<uint16_t*> (image->data()[0])
);
}
}
}
}
diff --git
a/src/lib/image.cc
b/src/lib/image.cc
index 847ad104631c32b3c181d1fe9d41c5f8a7f0084b..ffe9f3e0b5f656eac2b8f5204a718e387922dd23 100644
(file)
--- a/
src/lib/image.cc
+++ b/
src/lib/image.cc
@@
-660,7
+660,7
@@
Image::~Image ()
av_free (_stride);
}
av_free (_stride);
}
-uint8_t **
+uint8_t *
const
*
Image::data () const
{
return _data;
Image::data () const
{
return _data;
@@
-672,7
+672,7
@@
Image::line_size () const
return _line_size;
}
return _line_size;
}
-int *
+int
const
*
Image::stride () const
{
return _stride;
Image::stride () const
{
return _stride;
diff --git
a/src/lib/image.h
b/src/lib/image.h
index 8ca6aae09b751a05512fd44038694e081ce946b5..22f3f6e502ca6f6775f7c71265220efe9d84d399 100644
(file)
--- a/
src/lib/image.h
+++ b/
src/lib/image.h
@@
-48,9
+48,9
@@
public:
Image& operator= (Image const &);
~Image ();
Image& operator= (Image const &);
~Image ();
- uint8_t ** data () const;
+ uint8_t *
const
* data () const;
int * line_size () const;
int * line_size () const;
- int * stride () const;
+ int
const
* stride () const;
dcp::Size size () const;
bool aligned () const;
dcp::Size size () const;
bool aligned () const;
diff --git
a/src/lib/j2k_image_proxy.cc
b/src/lib/j2k_image_proxy.cc
index 9312a7763ba8e5c959cf48e39cd227de5c686a9f..20bf70cf17eb92eb710905a2aad5250d8502d052 100644
(file)
--- a/
src/lib/j2k_image_proxy.cc
+++ b/
src/lib/j2k_image_proxy.cc
@@
-76,12
+76,12
@@
J2KImageProxy::J2KImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
shared_ptr<Image>
J2KImageProxy::image () const
{
shared_ptr<Image>
J2KImageProxy::image () const
{
- shared_ptr<Image> image (new Image (PIX_FMT_RGB
24
, _size, false));
+ shared_ptr<Image> image (new Image (PIX_FMT_RGB
48LE
, _size, false));
if (_mono) {
if (_mono) {
- _mono->rgb_frame (
image->data()[0]
);
+ _mono->rgb_frame (
reinterpret_cast<uint16_t*> (image->data()[0])
);
} else {
} else {
- _stereo->rgb_frame (_eye,
image->data()[0]
);
+ _stereo->rgb_frame (_eye,
reinterpret_cast<uint16_t*> (image->data()[0])
);
}
return shared_ptr<Image> (new Image (image, true));
}
return shared_ptr<Image> (new Image (image, true));
diff --git
a/src/lib/render_subtitles.cc
b/src/lib/render_subtitles.cc
index b2900d27a8dfdc3e99f0f5fd289b45beb3b56c8e..4ff28df6a7548cbcd4326e3e12ee9bcaf9e23db2 100644
(file)
--- a/
src/lib/render_subtitles.cc
+++ b/
src/lib/render_subtitles.cc
@@
-119,7
+119,7
@@
render_subtitles (list<dcp::SubtitleString> subtitles, dcp::Size target)
if (i->effect() == dcp::SHADOW) {
/* Drop-shadow effect */
if (i->effect() == dcp::SHADOW) {
/* Drop-shadow effect */
- dcp::Colo
r const ec = i->effect_colo
r ();
+ dcp::Colo
ur const ec = i->effect_colou
r ();
context->set_source_rgba (float(ec.r) / 255, float(ec.g) / 255, float(ec.b) / 255, fade_factor);
context->move_to (x + 4, y + 4);
layout->add_to_cairo_context (context);
context->set_source_rgba (float(ec.r) / 255, float(ec.g) / 255, float(ec.b) / 255, fade_factor);
context->move_to (x + 4, y + 4);
layout->add_to_cairo_context (context);
@@
-128,7
+128,7
@@
render_subtitles (list<dcp::SubtitleString> subtitles, dcp::Size target)
/* The actual subtitle */
context->move_to (x, y);
/* The actual subtitle */
context->move_to (x, y);
- dcp::Colo
r const c = i->colo
r ();
+ dcp::Colo
ur const c = i->colou
r ();
context->set_source_rgba (float(c.r) / 255, float(c.g) / 255, float(c.b) / 255, fade_factor);
layout->add_to_cairo_context (context);
context->fill ();
context->set_source_rgba (float(c.r) / 255, float(c.g) / 255, float(c.b) / 255, fade_factor);
layout->add_to_cairo_context (context);
context->fill ();
@@
-136,7
+136,7
@@
render_subtitles (list<dcp::SubtitleString> subtitles, dcp::Size target)
if (i->effect() == dcp::BORDER) {
/* Border effect */
context->move_to (x, y);
if (i->effect() == dcp::BORDER) {
/* Border effect */
context->move_to (x, y);
- dcp::Colo
r ec = i->effect_colo
r ();
+ dcp::Colo
ur ec = i->effect_colou
r ();
context->set_source_rgba (float(ec.r) / 255, float(ec.g) / 255, float(ec.b) / 255, fade_factor);
layout->add_to_cairo_context (context);
context->stroke ();
context->set_source_rgba (float(ec.r) / 255, float(ec.g) / 255, float(ec.b) / 255, fade_factor);
layout->add_to_cairo_context (context);
context->stroke ();
diff --git
a/src/lib/subrip_decoder.cc
b/src/lib/subrip_decoder.cc
index 77c3f16a5f6d9179385da6272bfdb936e614db09..0ef747cf17a44c94d3ddff92e1017af66c0b2612 100644
(file)
--- a/
src/lib/subrip_decoder.cc
+++ b/
src/lib/subrip_decoder.cc
@@
-62,7
+62,7
@@
SubRipDecoder::pass ()
dcp::SubtitleString (
SubRipContent::font_id,
j->italic,
dcp::SubtitleString (
SubRipContent::font_id,
j->italic,
- dcp::Color (255, 255, 255),
+ dcp::Colo
u
r (255, 255, 255),
j->font_size.points (72 * 11),
dcp::Time (rint (_subtitles[_next].from.metric().get().all_as_milliseconds() / 4)),
dcp::Time (rint (_subtitles[_next].to.metric().get().all_as_milliseconds() / 4)),
j->font_size.points (72 * 11),
dcp::Time (rint (_subtitles[_next].from.metric().get().all_as_milliseconds() / 4)),
dcp::Time (rint (_subtitles[_next].to.metric().get().all_as_milliseconds() / 4)),
@@
-70,7
+70,7
@@
SubRipDecoder::pass ()
dcp::TOP,
j->text,
dcp::NONE,
dcp::TOP,
j->text,
dcp::NONE,
- dcp::Color (255, 255, 255),
+ dcp::Colo
u
r (255, 255, 255),
0,
0
)
0,
0
)
diff --git
a/src/lib/subrip_subtitle.h
b/src/lib/subrip_subtitle.h
index 6fd0bdf74da490cab2fdbc63689e3a6ff35d7c11..d4d27e1400013865653395b0ddf6159cb74c0663 100644
(file)
--- a/
src/lib/subrip_subtitle.h
+++ b/
src/lib/subrip_subtitle.h
@@
-37,7
+37,7
@@
struct SubRipSubtitlePiece
bool bold;
bool italic;
bool underline;
bool bold;
bool italic;
bool underline;
- dcp::Color color;
+ dcp::Colo
u
r color;
};
struct SubRipSubtitle
};
struct SubRipSubtitle
diff --git
a/src/wx/colour_conversion_editor.cc
b/src/wx/colour_conversion_editor.cc
index e11c09f1761ea18e038a1d2313fda63666eb960c..4658716c6bb091bb500ce1bbf368db965a39fb9c 100644
(file)
--- a/
src/wx/colour_conversion_editor.cc
+++ b/
src/wx/colour_conversion_editor.cc
@@
-171,6
+171,7
@@
ColourConversionEditor::get () const
conversion.set_in (
shared_ptr<dcp::ModifiedGammaTransferFunction> (
new dcp::ModifiedGammaTransferFunction (
conversion.set_in (
shared_ptr<dcp::ModifiedGammaTransferFunction> (
new dcp::ModifiedGammaTransferFunction (
+ false,
_input_power->GetValue (),
raw_convert<double> (wx_to_std (_input_threshold->GetValue ())),
raw_convert<double> (wx_to_std (_input_A->GetValue ())),
_input_power->GetValue (),
raw_convert<double> (wx_to_std (_input_threshold->GetValue ())),
raw_convert<double> (wx_to_std (_input_A->GetValue ())),
@@
-182,6
+183,7
@@
ColourConversionEditor::get () const
conversion.set_in (
shared_ptr<dcp::GammaTransferFunction> (
new dcp::GammaTransferFunction (
conversion.set_in (
shared_ptr<dcp::GammaTransferFunction> (
new dcp::GammaTransferFunction (
+ false,
_input_gamma->GetValue ()
)
)
_input_gamma->GetValue ()
)
)
@@
-202,7
+204,7
@@
ColourConversionEditor::get () const
conversion.set_matrix (matrix);
conversion.set_matrix (matrix);
- conversion.set_out (shared_ptr<dcp::GammaTransferFunction> (new dcp::GammaTransferFunction (_output_gamma->GetValue ())));
+ conversion.set_out (shared_ptr<dcp::GammaTransferFunction> (new dcp::GammaTransferFunction (
true,
_output_gamma->GetValue ())));
return conversion;
}
return conversion;
}