diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-11-29 04:40:31 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-11-29 04:40:31 +0100 |
commit | 2c080e248a47cb94d2069f6523c314d039f70919 (patch) | |
tree | 46180621f350edfb63ac578a04125dcd9db31f9d /fitz/filt_dctd.c | |
parent | af27ce7576c323665bb9986fbbab63acb6c81c17 (diff) | |
download | mupdf-2c080e248a47cb94d2069f6523c314d039f70919.tar.xz |
Fix up indentation.
Diffstat (limited to 'fitz/filt_dctd.c')
-rw-r--r-- | fitz/filt_dctd.c | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/fitz/filt_dctd.c b/fitz/filt_dctd.c index 99c7821a..f9b30e42 100644 --- a/fitz/filt_dctd.c +++ b/fitz/filt_dctd.c @@ -175,79 +175,79 @@ fz_processdctd(fz_filter *filter, fz_buffer *in, fz_buffer *out) switch (d->stage) { - case 0: - i = jpeg_read_header(&d->cinfo, TRUE); - if (i == JPEG_SUSPENDED) - goto needinput; + case 0: + i = jpeg_read_header(&d->cinfo, TRUE); + if (i == JPEG_SUSPENDED) + goto needinput; - /* default value if ColorTransform is not set */ - if (d->colortransform == -1) - { - if (d->cinfo.num_components == 3) + /* default value if ColorTransform is not set */ + if (d->colortransform == -1) + { + if (d->cinfo.num_components == 3) d->colortransform = 1; - else + else d->colortransform = 0; - } - - if (d->cinfo.saw_Adobe_marker) - d->colortransform = d->cinfo.Adobe_transform; - - /* Guess the input colorspace, and set output colorspace accordingly */ - switch (d->cinfo.num_components) - { - case 3: - if (d->colortransform) - d->cinfo.jpeg_color_space = JCS_YCbCr; - else - d->cinfo.jpeg_color_space = JCS_RGB; - break; - case 4: - if (d->colortransform) - d->cinfo.jpeg_color_space = JCS_YCCK; - else - d->cinfo.jpeg_color_space = JCS_CMYK; - break; - } - - /* fall through */ - d->stage = 1; - - case 1: - b = jpeg_start_decompress(&d->cinfo); - if (b == FALSE) - goto needinput; + } - /* fall through */ - d->stage = 2; + if (d->cinfo.saw_Adobe_marker) + d->colortransform = d->cinfo.Adobe_transform; + + /* Guess the input colorspace, and set output colorspace accordingly */ + switch (d->cinfo.num_components) + { + case 3: + if (d->colortransform) + d->cinfo.jpeg_color_space = JCS_YCbCr; + else + d->cinfo.jpeg_color_space = JCS_RGB; + break; + case 4: + if (d->colortransform) + d->cinfo.jpeg_color_space = JCS_YCCK; + else + d->cinfo.jpeg_color_space = JCS_CMYK; + break; + } - case 2: - stride = d->cinfo.output_width * d->cinfo.output_components; + /* fall through */ + d->stage = 1; - while (d->cinfo.output_scanline < d->cinfo.output_height) - { - if (out->wp + stride > out->ep) - goto needoutput; + case 1: + b = jpeg_start_decompress(&d->cinfo); + if (b == FALSE) + goto needinput; - scanlines[0] = out->wp; + /* fall through */ + d->stage = 2; - i = jpeg_read_scanlines(&d->cinfo, scanlines, 1); + case 2: + stride = d->cinfo.output_width * d->cinfo.output_components; - if (i == 0) - goto needinput; + while (d->cinfo.output_scanline < d->cinfo.output_height) + { + if (out->wp + stride > out->ep) + goto needoutput; - out->wp += stride; - } + scanlines[0] = out->wp; - /* fall through */ - d->stage = 3; + i = jpeg_read_scanlines(&d->cinfo, scanlines, 1); - case 3: - b = jpeg_finish_decompress(&d->cinfo); - if (b == FALSE) + if (i == 0) goto needinput; - d->stage = 4; - in->rp = in->wp - d->src.super.bytes_in_buffer; - return fz_iodone; + + out->wp += stride; + } + + /* fall through */ + d->stage = 3; + + case 3: + b = jpeg_finish_decompress(&d->cinfo); + if (b == FALSE) + goto needinput; + d->stage = 4; + in->rp = in->wp - d->src.super.bytes_in_buffer; + return fz_iodone; } needinput: |