X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage.cc;h=bd527e91ef5c3fcc2961b605e9fc3dfb50b28ed9;hb=599233fc9ce3014de2cb522b28a536147fc331dd;hp=b166dfac6a0c72054531dc19cce0b9a7fd445971;hpb=3fc3aad8735903ced3dae65f764eb33e3f5b3f11;p=dcpomatic.git diff --git a/src/lib/image.cc b/src/lib/image.cc index b166dfac6..bd527e91e 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -68,7 +68,7 @@ Image::lines (int n) const throw PixelFormatError (N_("lines()"), _pixel_format); } - return size().height / pow(2, d->log2_chroma_h); + return size().height / pow(2.0f, d->log2_chroma_h); } /** @return Number of components */ @@ -417,13 +417,13 @@ Image::bytes_per_pixel (int c) const bpp[0] = floor ((d->comp[0].depth_minus1 + 1 + 7) / 8); if (d->nb_components > 1) { - bpp[1] = floor ((d->comp[1].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w); + bpp[1] = floor ((d->comp[1].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w); } if (d->nb_components > 2) { - bpp[2] = floor ((d->comp[2].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w); + bpp[2] = floor ((d->comp[2].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w); } if (d->nb_components > 3) { - bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2, d->log2_chroma_w); + bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w); } if ((d->flags & PIX_FMT_PLANAR) == 0) {