]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 5 Nov 2012 16:58:06 +0000 (16:58 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 5 Nov 2012 16:58:06 +0000 (16:58 +0000)
coders/dpx.c

index 2ff7fcd80dc677056ef6f758c8baca00f59ae57c..3109ec8d441c8404f5c3f28c2c6dcc8b2b30918b 100644 (file)
@@ -372,8 +372,9 @@ static MagickBooleanType IsDPX(const unsigned char *magick,const size_t extent)
 %
 */
 
-static size_t GetBytesPerRow(size_t columns,size_t samples_per_pixel,
-  size_t bits_per_pixel,MagickBooleanType pad)
+static size_t GetBytesPerRow(const size_t columns,
+  const size_t samples_per_pixel,const size_t bits_per_pixel,
+  const MagickBooleanType pad)
 {
   size_t
     bytes_per_row;
@@ -382,23 +383,23 @@ static size_t GetBytesPerRow(size_t columns,size_t samples_per_pixel,
   {
     case 1:
     {
-      bytes_per_row=4*(((size_t) samples_per_pixel*columns*
-        bits_per_pixel+31)/32);
+      bytes_per_row=4*(((size_t) samples_per_pixel*columns*bits_per_pixel+31)/
+        32);
       break;
     }
     case 8:
     default:
     {
-      bytes_per_row=4*(((size_t) samples_per_pixel*columns*
-        bits_per_pixel+31)/32);
+      bytes_per_row=4*(((size_t) samples_per_pixel*columns*bits_per_pixel+31)/
+        32);
       break;
     }
     case 10:
     {
       if (pad == MagickFalse)
         {
-          bytes_per_row=4*(((size_t) samples_per_pixel*columns*
-            bits_per_pixel+31)/32);
+          bytes_per_row=4*(((size_t) samples_per_pixel*columns*bits_per_pixel+
+            31)/32);
           break;
         }
       bytes_per_row=4*(((size_t) (32*((samples_per_pixel*columns+2)/3))+31)/32);
@@ -408,8 +409,8 @@ static size_t GetBytesPerRow(size_t columns,size_t samples_per_pixel,
     {
       if (pad == MagickFalse)
         {
-          bytes_per_row=4*(((size_t) samples_per_pixel*columns*
-            bits_per_pixel+31)/32);
+          bytes_per_row=4*(((size_t) samples_per_pixel*columns*bits_per_pixel+
+            31)/32);
           break;
         }
       bytes_per_row=2*(((size_t) (16*samples_per_pixel*columns)+15)/16);
@@ -417,20 +418,20 @@ static size_t GetBytesPerRow(size_t columns,size_t samples_per_pixel,
     }
     case 16:
     {
-      bytes_per_row=2*(((size_t) samples_per_pixel*columns*
-        bits_per_pixel+8)/16);
+      bytes_per_row=2*(((size_t) samples_per_pixel*columns*bits_per_pixel+8)/
+        16);
       break;
     }
     case 32:
     {
-      bytes_per_row=4*(((size_t) samples_per_pixel*columns*
-        bits_per_pixel+31)/32);
+      bytes_per_row=4*(((size_t) samples_per_pixel*columns*bits_per_pixel+31)/
+        32);
       break;
     }
     case 64:
     {
-      bytes_per_row=8*(((size_t) samples_per_pixel*columns*
-        bits_per_pixel+63)/64);
+      bytes_per_row=8*(((size_t) samples_per_pixel*columns*bits_per_pixel+63)/
+        64);
       break;
     }
   }