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 (
- 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");
_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>
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_RGB24, _video_size.get(), false));
+ shared_ptr<Image> image (new Image (PIX_FMT_RGB48LE, _video_size.get(), false));
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 {
- 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]));
}
}
av_free (_stride);
}
-uint8_t **
+uint8_t * const *
Image::data () const
{
return _data;
return _line_size;
}
-int *
+int const *
Image::stride () const
{
return _stride;
Image& operator= (Image const &);
~Image ();
- uint8_t ** data () const;
+ uint8_t * const * data () const;
int * line_size () const;
- int * stride () const;
+ int const * stride () const;
dcp::Size size () const;
bool aligned () const;
shared_ptr<Image>
J2KImageProxy::image () const
{
- shared_ptr<Image> image (new Image (PIX_FMT_RGB24, _size, false));
+ shared_ptr<Image> image (new Image (PIX_FMT_RGB48LE, _size, false));
if (_mono) {
- _mono->rgb_frame (image->data()[0]);
+ _mono->rgb_frame (reinterpret_cast<uint16_t*> (image->data()[0]));
} 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));
if (i->effect() == dcp::SHADOW) {
/* Drop-shadow effect */
- dcp::Color const ec = i->effect_color ();
+ dcp::Colour const ec = i->effect_colour ();
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);
/* The actual subtitle */
context->move_to (x, y);
- dcp::Color const c = i->color ();
+ dcp::Colour const c = i->colour ();
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 ();
if (i->effect() == dcp::BORDER) {
/* Border effect */
context->move_to (x, y);
- dcp::Color ec = i->effect_color ();
+ dcp::Colour ec = i->effect_colour ();
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 ();
dcp::SubtitleString (
SubRipContent::font_id,
j->italic,
- dcp::Color (255, 255, 255),
+ dcp::Colour (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)),
dcp::TOP,
j->text,
dcp::NONE,
- dcp::Color (255, 255, 255),
+ dcp::Colour (255, 255, 255),
0,
0
)
bool bold;
bool italic;
bool underline;
- dcp::Color color;
+ dcp::Colour color;
};
struct SubRipSubtitle
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 ())),
conversion.set_in (
shared_ptr<dcp::GammaTransferFunction> (
new dcp::GammaTransferFunction (
+ false,
_input_gamma->GetValue ()
)
)
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;
}