diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2007-03-14 22:07:09 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2007-03-14 22:07:09 -0700 |
| commit | 64d7ea7b604c2ca9ab8f7236374b3a1c05005e55 (patch) | |
| tree | aefb113b164ae28daefaf0405ca5e96fb421781f /com32/lib/jpeg | |
| parent | a80b07e7fb8feec668a435101659e3ed94015a23 (diff) | |
| download | syslinux-64d7ea7b604c2ca9ab8f7236374b3a1c05005e55.tar.gz | |
Stealth whitespace cleanup (automated)
Diffstat (limited to 'com32/lib/jpeg')
| -rw-r--r-- | com32/lib/jpeg/bgr24.c | 8 | ||||
| -rw-r--r-- | com32/lib/jpeg/bgra32.c | 8 | ||||
| -rw-r--r-- | com32/lib/jpeg/decode1.c | 6 | ||||
| -rw-r--r-- | com32/lib/jpeg/decode3.c | 8 | ||||
| -rw-r--r-- | com32/lib/jpeg/grey.c | 4 | ||||
| -rw-r--r-- | com32/lib/jpeg/jidctflt.c | 33 | ||||
| -rw-r--r-- | com32/lib/jpeg/rgb24.c | 8 | ||||
| -rw-r--r-- | com32/lib/jpeg/rgba32.c | 8 | ||||
| -rw-r--r-- | com32/lib/jpeg/tinyjpeg-internal.h | 13 | ||||
| -rw-r--r-- | com32/lib/jpeg/tinyjpeg.c | 52 | ||||
| -rw-r--r-- | com32/lib/jpeg/yuv420p.c | 4 |
11 files changed, 75 insertions, 77 deletions
diff --git a/com32/lib/jpeg/bgr24.c b/com32/lib/jpeg/bgr24.c index 3f2f4f90..ffdcbdf9 100644 --- a/com32/lib/jpeg/bgr24.c +++ b/com32/lib/jpeg/bgr24.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> BGR24 (1x1) diff --git a/com32/lib/jpeg/bgra32.c b/com32/lib/jpeg/bgra32.c index fe6b813a..7e2c72bc 100644 --- a/com32/lib/jpeg/bgra32.c +++ b/com32/lib/jpeg/bgra32.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> BGRA32 (1x1) diff --git a/com32/lib/jpeg/decode1.c b/com32/lib/jpeg/decode1.c index 9d76a05a..554f7f11 100644 --- a/com32/lib/jpeg/decode1.c +++ b/com32/lib/jpeg/decode1.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -47,7 +47,7 @@ static void decode_MCU_1x1_1plane(struct jdec_private *priv) // Y tinyjpeg_process_Huffman_data_unit(priv, cY); IDCT(&priv->component_infos[cY], priv->Y, 8); - + // Cb tinyjpeg_process_Huffman_data_unit(priv, cCb); IDCT(&priv->component_infos[cCb], priv->Cb, 8); diff --git a/com32/lib/jpeg/decode3.c b/com32/lib/jpeg/decode3.c index 9e49eee0..2f79ec97 100644 --- a/com32/lib/jpeg/decode3.c +++ b/com32/lib/jpeg/decode3.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -40,14 +40,14 @@ #include "tinyjpeg-internal.h" /* - * Decode all the 3 components for 1x1 + * Decode all the 3 components for 1x1 */ static void decode_MCU_1x1_3planes(struct jdec_private *priv) { // Y tinyjpeg_process_Huffman_data_unit(priv, cY); IDCT(&priv->component_infos[cY], priv->Y, 8); - + // Cb tinyjpeg_process_Huffman_data_unit(priv, cCb); IDCT(&priv->component_infos[cCb], priv->Cb, 8); diff --git a/com32/lib/jpeg/grey.c b/com32/lib/jpeg/grey.c index bb55b7e2..0034ce2b 100644 --- a/com32/lib/jpeg/grey.c +++ b/com32/lib/jpeg/grey.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE diff --git a/com32/lib/jpeg/jidctflt.c b/com32/lib/jpeg/jidctflt.c index 1327b823..e5e66edc 100644 --- a/com32/lib/jpeg/jidctflt.c +++ b/com32/lib/jpeg/jidctflt.c @@ -5,7 +5,7 @@ * This file is part of the Independent JPEG Group's software. * * The authors make NO WARRANTY or representation, either express or implied, - * with respect to this software, its quality, accuracy, merchantability, or + * with respect to this software, its quality, accuracy, merchantability, or * fitness for a particular purpose. This software is provided "AS IS", and you, * its user, assume the entire risk as to its quality and accuracy. * @@ -25,16 +25,16 @@ * (3) Permission for use of this software is granted only if the user accepts * full responsibility for any undesirable consequences; the authors accept * NO LIABILITY for damages of any kind. - * + * * These conditions apply to any software derived from or based on the IJG code, * not just to the unmodified library. If you use our work, you ought to * acknowledge us. - * + * * Permission is NOT granted for the use of any IJG author's name or company name * in advertising or publicity relating to this software or products derived from * it. This software may be referred to only as "the Independent JPEG Group's * software". - * + * * We specifically permit and encourage the use of this software as the basis of * commercial products, provided that all warranty or liability claims are * assumed by the product vendor. @@ -80,7 +80,7 @@ #define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) -#if defined(__GNUC__) && defined(__i686__) || defined(__x86_64__) +#if defined(__GNUC__) && defined(__i686__) || defined(__x86_64__) static inline unsigned char descale_and_clamp(int x, int shift) { @@ -89,9 +89,9 @@ static inline unsigned char descale_and_clamp(int x, int shift) "\tsar %2,%1\n" "\tsub $-128,%1\n" "\tcmovl %5,%1\n" /* Use the sub to compare to 0 */ - "\tcmpl %4,%1\n" + "\tcmpl %4,%1\n" "\tcmovg %4,%1\n" - : "=r"(x) + : "=r"(x) : "0"(x), "i"(shift), "i"(1UL<<(shift-1)), "r" (0xff), "r" (0) ); return x; @@ -110,7 +110,7 @@ static inline unsigned char descale_and_clamp(int x, int shift) return 255; else if (x<0) return 0; - else + else return x; } #endif @@ -146,14 +146,14 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) * With typical images and quantization tables, half or more of the * column DCT calculations can be simplified this way. */ - + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && inptr[DCTSIZE*7] == 0) { /* AC terms all zero */ FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); - + wsptr[DCTSIZE*0] = dcval; wsptr[DCTSIZE*1] = dcval; wsptr[DCTSIZE*2] = dcval; @@ -162,13 +162,13 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) wsptr[DCTSIZE*5] = dcval; wsptr[DCTSIZE*6] = dcval; wsptr[DCTSIZE*7] = dcval; - + inptr++; /* advance pointers to next column */ quantptr++; wsptr++; continue; } - + /* Even part */ tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); @@ -186,7 +186,7 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) tmp3 = tmp10 - tmp13; tmp1 = tmp11 + tmp12; tmp2 = tmp11 - tmp12; - + /* Odd part */ tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); @@ -223,7 +223,7 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) quantptr++; wsptr++; } - + /* Pass 2: process rows from work array, store into output array. */ /* Note that we must descale the results by a factor of 8 == 2**3. */ @@ -235,7 +235,7 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) * the simplification applies less often (typically 5% to 10% of the time). * And testing floats for zero is relatively expensive, so we don't bother. */ - + /* Even part */ tmp10 = wsptr[0] + wsptr[4]; @@ -278,9 +278,8 @@ jpeg_idct_float (struct component *compptr, uint8_t *output_buf, int stride) outptr[4] = descale_and_clamp(tmp3 + tmp4, 3); outptr[3] = descale_and_clamp(tmp3 - tmp4, 3); - + wsptr += DCTSIZE; /* advance pointer to next row */ outptr += stride; } } - diff --git a/com32/lib/jpeg/rgb24.c b/com32/lib/jpeg/rgb24.c index d3ee07a8..e37cc77d 100644 --- a/com32/lib/jpeg/rgb24.c +++ b/com32/lib/jpeg/rgb24.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> RGB24 (1x1) diff --git a/com32/lib/jpeg/rgba32.c b/com32/lib/jpeg/rgba32.c index 2ad91125..5fcbe992 100644 --- a/com32/lib/jpeg/rgba32.c +++ b/com32/lib/jpeg/rgba32.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,7 +51,7 @@ * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static unsigned char clamp(int i) { @@ -61,7 +61,7 @@ static unsigned char clamp(int i) return 255; else return i; -} +} /** * YCrCb -> RGBA32 (1x1) diff --git a/com32/lib/jpeg/tinyjpeg-internal.h b/com32/lib/jpeg/tinyjpeg-internal.h index a4145817..78cb0421 100644 --- a/com32/lib/jpeg/tinyjpeg-internal.h +++ b/com32/lib/jpeg/tinyjpeg-internal.h @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -51,13 +51,13 @@ struct huffman_table short int lookup[HUFFMAN_HASH_SIZE]; /* code size: give the number of bits of a symbol is encoded */ unsigned char code_size[HUFFMAN_HASH_SIZE]; - /* some place to store value that is not encoded in the lookup table + /* some place to store value that is not encoded in the lookup table * FIXME: Calculate if 256 value is enough to store all values */ uint16_t slowtable[16-HUFFMAN_HASH_NBITS][256]; }; -struct component +struct component { unsigned int Hfactor; unsigned int Vfactor; @@ -175,13 +175,12 @@ static void print_next_16bytes(int offset, const unsigned char *stream) { trace("%4.4x: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n", offset, - stream[0], stream[1], stream[2], stream[3], + stream[0], stream[1], stream[2], stream[3], stream[4], stream[5], stream[6], stream[7], - stream[8], stream[9], stream[10], stream[11], + stream[8], stream[9], stream[10], stream[11], stream[12], stream[13], stream[14], stream[15]); } #endif #endif - diff --git a/com32/lib/jpeg/tinyjpeg.c b/com32/lib/jpeg/tinyjpeg.c index a93a5125..f8e881f0 100644 --- a/com32/lib/jpeg/tinyjpeg.c +++ b/com32/lib/jpeg/tinyjpeg.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -42,7 +42,7 @@ /* Global variable to return the last error found while deconding */ static char error_string[256]; -static const unsigned char zigzag[64] = +static const unsigned char zigzag[64] = { 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, @@ -57,26 +57,26 @@ static const unsigned char zigzag[64] = /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ /* IMPORTANT: these are only valid for 8-bit data precision! */ static const unsigned char bits_dc_luminance[17] = -{ - 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 +{ + 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; static const unsigned char val_dc_luminance[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - + static const unsigned char bits_dc_chrominance[17] = { - 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 + 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; -static const unsigned char val_dc_chrominance[] = +static const unsigned char val_dc_chrominance[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; - + static const unsigned char bits_ac_luminance[17] = { - 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d + 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; static const unsigned char val_ac_luminance[] = { @@ -104,8 +104,8 @@ static const unsigned char val_ac_luminance[] = }; static const unsigned char bits_ac_chrominance[17] = -{ - 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 +{ + 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; static const unsigned char val_ac_chrominance[] = @@ -145,7 +145,7 @@ static const unsigned char val_ac_chrominance[] = * bits. * look_nbits: read nbits from the stream without marking as read. * skip_nbits: read nbits from the stream but do not return the result. - * + * * stream: current pointer in the jpeg data (read bytes per bytes) * nbits_in_reservoir: number of bits filled into the reservoir * reservoir: register that contains bits information. Only nbits_in_reservoir @@ -216,7 +216,7 @@ static int get_next_huffman_code(struct jdec_private *priv, struct huffman_table look_nbits(priv->reservoir, priv->nbits_in_reservoir, priv->stream, HUFFMAN_HASH_NBITS, hcode); value = huffman_table->lookup[hcode]; if (value>=0) - { + { int code_size = huffman_table->code_size[value]; skip_nbits(priv->reservoir, priv->nbits_in_reservoir, priv->stream, code_size); return value; @@ -303,7 +303,7 @@ void tinyjpeg_process_Huffman_data_unit(struct jdec_private *priv, int component /* * Takes two array of bits, and build the huffman table for size, and code - * + * * lookup will return the symbol if the code is less or equal than HUFFMAN_HASH_NBITS. * code_size will be used to known how many bits this symbol is encoded. * slowtable will be used when the first lookup didn't give the result. @@ -316,7 +316,7 @@ static void build_huffman_table(const unsigned char *bits, const unsigned char * int next_free_entry; /* - * Build a temp array + * Build a temp array * huffsize[X] => numbers of bits to write vals[X] */ hz = huffsize; @@ -365,7 +365,7 @@ static void build_huffman_table(const unsigned char *bits, const unsigned char * { /* * Good: val can be put in the lookup table, so fill all value of this - * column with value val + * column with value val */ int repeat = 1UL<<(HUFFMAN_HASH_NBITS - code_size); code <<= HUFFMAN_HASH_NBITS - code_size; @@ -391,7 +391,7 @@ static void build_huffman_table(const unsigned char *bits, const unsigned char * static void build_default_huffman_tables(struct jdec_private *priv) { - if ( (priv->flags & TINYJPEG_FLAGS_MJPEG_TABLE) + if ( (priv->flags & TINYJPEG_FLAGS_MJPEG_TABLE) && priv->default_huffman_table_initialized) return; @@ -418,7 +418,7 @@ static void build_default_huffman_tables(struct jdec_private *priv) * R = Y + 1.40200 * Cr * G = Y - 0.34414 * Cb - 0.71414 * Cr * B = Y + 1.77200 * Cb - * + * ******************************************************************************/ static void print_SOF(const unsigned char *stream) @@ -440,7 +440,7 @@ static void print_SOF(const unsigned char *stream) nr_components = stream[7]; trace("> SOF marker\n"); - trace("Size:%dx%d nr_components:%d (%s) precision:%d\n", + trace("Size:%dx%d nr_components:%d (%s) precision:%d\n", width, height, nr_components, nr_components_to_string[nr_components], precision); @@ -696,7 +696,7 @@ static int parse_JFIF(struct jdec_private *priv, const unsigned char *stream) if ( (priv->component_infos[cY].Vfactor < priv->component_infos[cCb].Vfactor) || (priv->component_infos[cY].Vfactor < priv->component_infos[cCr].Vfactor)) error("Vertical sampling factor for Y should be greater than vertical sampling factor for Cb or Cr\n"); - if ( (priv->component_infos[cCb].Hfactor!=1) + if ( (priv->component_infos[cCb].Hfactor!=1) || (priv->component_infos[cCr].Hfactor!=1) || (priv->component_infos[cCb].Vfactor!=1) || (priv->component_infos[cCr].Vfactor!=1)) @@ -728,7 +728,7 @@ bogus_jpeg_format: struct jdec_private *tinyjpeg_init(void) { struct jdec_private *priv; - + priv = (struct jdec_private *)calloc(1, sizeof(struct jdec_private)); if (priv == NULL) return NULL; @@ -888,7 +888,7 @@ int tinyjpeg_get_bytes_per_row(struct jdec_private *priv, for (i=0; i<ncomponents; i++) bytes[i] = priv->bytes_per_row[i]; return 0; -} +} int tinyjpeg_set_bytes_per_row(struct jdec_private *priv, const unsigned int *bytes, @@ -900,7 +900,7 @@ int tinyjpeg_set_bytes_per_row(struct jdec_private *priv, for (i=0; i<ncomponents; i++) priv->bytes_per_row[i] = bytes[i]; return 0; -} +} int tinyjpeg_set_flags(struct jdec_private *priv, int flags) { diff --git a/com32/lib/jpeg/yuv420p.c b/com32/lib/jpeg/yuv420p.c index 6d2bd056..0c5edf7c 100644 --- a/com32/lib/jpeg/yuv420p.c +++ b/com32/lib/jpeg/yuv420p.c @@ -5,7 +5,7 @@ * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: - * + * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * @@ -16,7 +16,7 @@ * - Neither the name of the author nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
