summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/image.cc6
-rw-r--r--src/lib/image.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/image.cc b/src/lib/image.cc
index 2167918f8..7181c4546 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -1171,14 +1171,14 @@ Image::write_to_socket (shared_ptr<Socket> socket) const
float
-Image::bytes_per_pixel (int c) const
+Image::bytes_per_pixel(int component) const
{
auto d = av_pix_fmt_desc_get(_pixel_format);
if (!d) {
throw PixelFormatError ("bytes_per_pixel()", _pixel_format);
}
- if (c >= planes()) {
+ if (component >= planes()) {
return 0;
}
@@ -1213,7 +1213,7 @@ Image::bytes_per_pixel (int c) const
return bpp[0] + bpp[1] + bpp[2] + bpp[3];
}
- return bpp[c];
+ return bpp[component];
}
diff --git a/src/lib/image.h b/src/lib/image.h
index 0237b3d1b..dd9f8b840 100644
--- a/src/lib/image.h
+++ b/src/lib/image.h
@@ -68,7 +68,7 @@ public:
int vertical_factor (int) const;
int horizontal_factor (int) const;
dcp::Size sample_size (int) const;
- float bytes_per_pixel (int) const;
+ float bytes_per_pixel(int component) const;
std::shared_ptr<Image> convert_pixel_format (dcp::YUVToRGB yuv_to_rgb, AVPixelFormat out_format, Alignment alignment, bool fast) const;
std::shared_ptr<Image> scale (dcp::Size out_size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat out_format, Alignment alignment, bool fast) const;