Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(498)

Unified Diff: jfdctflt.c

Issue 1934113002: Update libjpeg_turbo to 1.4.90 from https://github.com/libjpeg-turbo/ (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: jfdctflt.c
diff --git a/jfdctflt.c b/jfdctflt.c
index 79d7a0078749c33f7f05cf11de6e55717c3a0fbf..b3da3ebda89dae87ee74df79d71ad27298ddc19b 100644
--- a/jfdctflt.c
+++ b/jfdctflt.c
@@ -3,7 +3,8 @@
*
* Copyright (C) 1994-1996, Thomas G. Lane.
* This file is part of the Independent JPEG Group's software.
- * For conditions of distribution and use, see the accompanying README file.
+ * For conditions of distribution and use, see the accompanying README.ijg
+ * file.
*
* This file contains a floating-point implementation of the
* forward DCT (Discrete Cosine Transform).
@@ -20,8 +21,8 @@
* This implementation is based on Arai, Agui, and Nakajima's algorithm for
* scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in
* Japanese, but the algorithm is described in the Pennebaker & Mitchell
- * JPEG textbook (see REFERENCES section in file README). The following code
- * is based directly on figure 4-8 in P&M.
+ * JPEG textbook (see REFERENCES section in file README.ijg). The following
+ * code is based directly on figure 4-8 in P&M.
* While an 8-point DCT cannot be done in less than 11 multiplies, it is
* possible to arrange the computation so that many of the multiplies are
* simple scalings of the final outputs. These multiplies can then be
@@ -37,7 +38,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "jdct.h" /* Private declarations for DCT subsystem */
+#include "jdct.h" /* Private declarations for DCT subsystem */
#ifdef DCT_FLOAT_SUPPORTED
@@ -56,7 +57,7 @@
*/
GLOBAL(void)
-jpeg_fdct_float (FAST_FLOAT * data)
+jpeg_fdct_float (FAST_FLOAT *data)
{
FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
FAST_FLOAT tmp10, tmp11, tmp12, tmp13;
@@ -76,24 +77,24 @@ jpeg_fdct_float (FAST_FLOAT * data)
tmp5 = dataptr[2] - dataptr[5];
tmp3 = dataptr[3] + dataptr[4];
tmp4 = dataptr[3] - dataptr[4];
-
+
/* Even part */
-
- tmp10 = tmp0 + tmp3; /* phase 2 */
+
+ tmp10 = tmp0 + tmp3; /* phase 2 */
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
-
+
dataptr[0] = tmp10 + tmp11; /* phase 3 */
dataptr[4] = tmp10 - tmp11;
-
+
z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
- dataptr[2] = tmp13 + z1; /* phase 5 */
+ dataptr[2] = tmp13 + z1; /* phase 5 */
dataptr[6] = tmp13 - z1;
-
+
/* Odd part */
- tmp10 = tmp4 + tmp5; /* phase 2 */
+ tmp10 = tmp4 + tmp5; /* phase 2 */
tmp11 = tmp5 + tmp6;
tmp12 = tmp6 + tmp7;
@@ -103,15 +104,15 @@ jpeg_fdct_float (FAST_FLOAT * data)
z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */
- z11 = tmp7 + z3; /* phase 5 */
+ z11 = tmp7 + z3; /* phase 5 */
z13 = tmp7 - z3;
- dataptr[5] = z13 + z2; /* phase 6 */
+ dataptr[5] = z13 + z2; /* phase 6 */
dataptr[3] = z13 - z2;
dataptr[1] = z11 + z4;
dataptr[7] = z11 - z4;
- dataptr += DCTSIZE; /* advance pointer to next row */
+ dataptr += DCTSIZE; /* advance pointer to next row */
}
/* Pass 2: process columns. */
@@ -126,24 +127,24 @@ jpeg_fdct_float (FAST_FLOAT * data)
tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5];
tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4];
tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4];
-
+
/* Even part */
-
- tmp10 = tmp0 + tmp3; /* phase 2 */
+
+ tmp10 = tmp0 + tmp3; /* phase 2 */
tmp13 = tmp0 - tmp3;
tmp11 = tmp1 + tmp2;
tmp12 = tmp1 - tmp2;
-
+
dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */
dataptr[DCTSIZE*4] = tmp10 - tmp11;
-
+
z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */
dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */
dataptr[DCTSIZE*6] = tmp13 - z1;
-
+
/* Odd part */
- tmp10 = tmp4 + tmp5; /* phase 2 */
+ tmp10 = tmp4 + tmp5; /* phase 2 */
tmp11 = tmp5 + tmp6;
tmp12 = tmp6 + tmp7;
@@ -153,7 +154,7 @@ jpeg_fdct_float (FAST_FLOAT * data)
z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */
z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */
- z11 = tmp7 + z3; /* phase 5 */
+ z11 = tmp7 + z3; /* phase 5 */
z13 = tmp7 - z3;
dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */
@@ -161,7 +162,7 @@ jpeg_fdct_float (FAST_FLOAT * data)
dataptr[DCTSIZE*1] = z11 + z4;
dataptr[DCTSIZE*7] = z11 - z4;
- dataptr++; /* advance pointer to next column */
+ dataptr++; /* advance pointer to next column */
}
}

Powered by Google App Engine
This is Rietveld 408576698