diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-12 22:50:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-12 22:50:32 +0100 |
| commit | 07ba15f367b36d17ec60edf77aa57fd20ee76740 (patch) | |
| tree | 4440a596ca925ec5bb9302bbe62d5346ec1e4e5e /src/lib/image.cc | |
| parent | ac8c7f049ebaba3fc9561ccb920496ea04f974ef (diff) | |
Get libdcp to do RGB->XYZ conversion.
Diffstat (limited to 'src/lib/image.cc')
| -rw-r--r-- | src/lib/image.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc index 62c26defb..f8dc111b0 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -434,8 +434,8 @@ Image::bytes_per_pixel (int c) const * @param s Size in pixels. */ Image::Image (AVPixelFormat p, libdcp::Size s, bool aligned) - : _pixel_format (p) - , _size (s) + : libdcp::Image (s) + , _pixel_format (p) , _aligned (aligned) { allocate (); @@ -461,8 +461,8 @@ Image::allocate () } Image::Image (Image const & other) - : _pixel_format (other._pixel_format) - , _size (other._size) + : libdcp::Image (other) + , _pixel_format (other._pixel_format) , _aligned (other._aligned) { allocate (); @@ -479,8 +479,8 @@ Image::Image (Image const & other) } Image::Image (AVFrame* frame) - : _pixel_format (static_cast<AVPixelFormat> (frame->format)) - , _size (frame->width, frame->height) + : libdcp::Image (libdcp::Size (frame->width, frame->height)) + , _pixel_format (static_cast<AVPixelFormat> (frame->format)) , _aligned (true) { allocate (); @@ -498,8 +498,8 @@ Image::Image (AVFrame* frame) } Image::Image (shared_ptr<const Image> other, bool aligned) - : _pixel_format (other->_pixel_format) - , _size (other->size()) + : libdcp::Image (other) + , _pixel_format (other->_pixel_format) , _aligned (aligned) { allocate (); @@ -531,8 +531,9 @@ Image::operator= (Image const & other) void Image::swap (Image & other) { + libdcp::Image::swap (other); + std::swap (_pixel_format, other._pixel_format); - std::swap (_size, other._size); for (int i = 0; i < 4; ++i) { std::swap (_data[i], other._data[i]); |
