/src/libjpeg-turbo.main/src/jdcolext.c
Line | Count | Source |
1 | | /* |
2 | | * jdcolext.c |
3 | | * |
4 | | * This file was part of the Independent JPEG Group's software: |
5 | | * Copyright (C) 1991-1997, Thomas G. Lane. |
6 | | * libjpeg-turbo Modifications: |
7 | | * Copyright (C) 2009, 2011, 2015, 2022-2023, 2025, D. R. Commander. |
8 | | * For conditions of distribution and use, see the accompanying README.ijg |
9 | | * file. |
10 | | * |
11 | | * This file contains output colorspace conversion routines. |
12 | | */ |
13 | | |
14 | | |
15 | | /* This file is included by jdcolor.c */ |
16 | | |
17 | | |
18 | | /* |
19 | | * Convert some rows of samples to the output colorspace. |
20 | | * |
21 | | * Note that we change from noninterleaved, one-plane-per-component format |
22 | | * to interleaved-pixel format. The output buffer is therefore three times |
23 | | * as wide as the input buffer. |
24 | | * A starting row offset is provided only for the input buffer. The caller |
25 | | * can easily adjust the passed output_buf value to accommodate any row |
26 | | * offset required on that side. |
27 | | */ |
28 | | |
29 | | INLINE |
30 | | LOCAL(void) |
31 | | ycc_rgb_convert(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf, |
32 | | JDIMENSION input_row, _JSAMPARRAY output_buf, int num_rows) |
33 | 1.01M | { |
34 | | #if BITS_IN_JSAMPLE != 16 |
35 | | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; |
36 | | register int y, cb, cr; |
37 | | register _JSAMPROW outptr; |
38 | | register _JSAMPROW inptr0, inptr1, inptr2; |
39 | | register JDIMENSION col; |
40 | | JDIMENSION num_cols = cinfo->output_width; |
41 | | /* copy these pointers into registers if possible */ |
42 | | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; |
43 | | register int *Crrtab = cconvert->Cr_r_tab; |
44 | | register int *Cbbtab = cconvert->Cb_b_tab; |
45 | | register JLONG *Crgtab = cconvert->Cr_g_tab; |
46 | | register JLONG *Cbgtab = cconvert->Cb_g_tab; |
47 | | SHIFT_TEMPS |
48 | | |
49 | 3.51M | while (--num_rows >= 0) { |
50 | 2.49M | inptr0 = input_buf[0][input_row]; |
51 | 2.49M | inptr1 = input_buf[1][input_row]; |
52 | 2.49M | inptr2 = input_buf[2][input_row]; |
53 | 2.49M | input_row++; |
54 | 2.49M | outptr = *output_buf++; |
55 | 55.8M | for (col = 0; col < num_cols; col++) { |
56 | 53.3M | y = inptr0[col]; |
57 | 53.3M | cb = inptr1[col]; |
58 | 53.3M | cr = inptr2[col]; |
59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ |
60 | 53.3M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; |
61 | 53.3M | outptr[RGB_GREEN] = range_limit[y + |
62 | 53.3M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], |
63 | 53.3M | SCALEBITS))]; |
64 | 53.3M | outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; |
65 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ |
66 | | /* opaque alpha channel value */ |
67 | | #ifdef RGB_ALPHA |
68 | 16.0M | outptr[RGB_ALPHA] = _MAXJSAMPLE; |
69 | | #endif |
70 | 53.3M | outptr += RGB_PIXELSIZE; |
71 | 53.3M | } |
72 | 2.49M | } |
73 | | #else |
74 | 0 | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); |
75 | | #endif |
76 | 1.01M | } Unexecuted instantiation: jdcolor-8.c:ycc_extrgb_convert Unexecuted instantiation: jdcolor-8.c:ycc_extrgbx_convert Unexecuted instantiation: jdcolor-8.c:ycc_extbgr_convert Unexecuted instantiation: jdcolor-8.c:ycc_extbgrx_convert Unexecuted instantiation: jdcolor-8.c:ycc_extxbgr_convert Unexecuted instantiation: jdcolor-8.c:ycc_extxrgb_convert Unexecuted instantiation: jdcolor-8.c:ycc_rgb_convert jdcolor-12.c:ycc_extrgb_convert Line | Count | Source | 33 | 463k | { | 34 | 463k | #if BITS_IN_JSAMPLE != 16 | 35 | 463k | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; | 36 | 463k | register int y, cb, cr; | 37 | 463k | register _JSAMPROW outptr; | 38 | 463k | register _JSAMPROW inptr0, inptr1, inptr2; | 39 | 463k | register JDIMENSION col; | 40 | 463k | JDIMENSION num_cols = cinfo->output_width; | 41 | | /* copy these pointers into registers if possible */ | 42 | 463k | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; | 43 | 463k | register int *Crrtab = cconvert->Cr_r_tab; | 44 | 463k | register int *Cbbtab = cconvert->Cb_b_tab; | 45 | 463k | register JLONG *Crgtab = cconvert->Cr_g_tab; | 46 | 463k | register JLONG *Cbgtab = cconvert->Cb_g_tab; | 47 | 463k | SHIFT_TEMPS | 48 | | | 49 | 1.73M | while (--num_rows >= 0) { | 50 | 1.27M | inptr0 = input_buf[0][input_row]; | 51 | 1.27M | inptr1 = input_buf[1][input_row]; | 52 | 1.27M | inptr2 = input_buf[2][input_row]; | 53 | 1.27M | input_row++; | 54 | 1.27M | outptr = *output_buf++; | 55 | 38.5M | for (col = 0; col < num_cols; col++) { | 56 | 37.3M | y = inptr0[col]; | 57 | 37.3M | cb = inptr1[col]; | 58 | 37.3M | cr = inptr2[col]; | 59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ | 60 | 37.3M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; | 61 | 37.3M | outptr[RGB_GREEN] = range_limit[y + | 62 | 37.3M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], | 63 | 37.3M | SCALEBITS))]; | 64 | 37.3M | outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; | 65 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 66 | | /* opaque alpha channel value */ | 67 | | #ifdef RGB_ALPHA | 68 | | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 69 | | #endif | 70 | 37.3M | outptr += RGB_PIXELSIZE; | 71 | 37.3M | } | 72 | 1.27M | } | 73 | | #else | 74 | | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); | 75 | | #endif | 76 | 463k | } |
Unexecuted instantiation: jdcolor-12.c:ycc_extrgbx_convert Unexecuted instantiation: jdcolor-12.c:ycc_extbgr_convert jdcolor-12.c:ycc_extbgrx_convert Line | Count | Source | 33 | 442k | { | 34 | 442k | #if BITS_IN_JSAMPLE != 16 | 35 | 442k | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; | 36 | 442k | register int y, cb, cr; | 37 | 442k | register _JSAMPROW outptr; | 38 | 442k | register _JSAMPROW inptr0, inptr1, inptr2; | 39 | 442k | register JDIMENSION col; | 40 | 442k | JDIMENSION num_cols = cinfo->output_width; | 41 | | /* copy these pointers into registers if possible */ | 42 | 442k | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; | 43 | 442k | register int *Crrtab = cconvert->Cr_r_tab; | 44 | 442k | register int *Cbbtab = cconvert->Cb_b_tab; | 45 | 442k | register JLONG *Crgtab = cconvert->Cr_g_tab; | 46 | 442k | register JLONG *Cbgtab = cconvert->Cb_g_tab; | 47 | 442k | SHIFT_TEMPS | 48 | | | 49 | 1.42M | while (--num_rows >= 0) { | 50 | 978k | inptr0 = input_buf[0][input_row]; | 51 | 978k | inptr1 = input_buf[1][input_row]; | 52 | 978k | inptr2 = input_buf[2][input_row]; | 53 | 978k | input_row++; | 54 | 978k | outptr = *output_buf++; | 55 | 15.6M | for (col = 0; col < num_cols; col++) { | 56 | 14.7M | y = inptr0[col]; | 57 | 14.7M | cb = inptr1[col]; | 58 | 14.7M | cr = inptr2[col]; | 59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ | 60 | 14.7M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; | 61 | 14.7M | outptr[RGB_GREEN] = range_limit[y + | 62 | 14.7M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], | 63 | 14.7M | SCALEBITS))]; | 64 | 14.7M | outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; | 65 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 66 | | /* opaque alpha channel value */ | 67 | 14.7M | #ifdef RGB_ALPHA | 68 | 14.7M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 69 | 14.7M | #endif | 70 | 14.7M | outptr += RGB_PIXELSIZE; | 71 | 14.7M | } | 72 | 978k | } | 73 | | #else | 74 | | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); | 75 | | #endif | 76 | 442k | } |
jdcolor-12.c:ycc_extxbgr_convert Line | Count | Source | 33 | 111k | { | 34 | 111k | #if BITS_IN_JSAMPLE != 16 | 35 | 111k | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; | 36 | 111k | register int y, cb, cr; | 37 | 111k | register _JSAMPROW outptr; | 38 | 111k | register _JSAMPROW inptr0, inptr1, inptr2; | 39 | 111k | register JDIMENSION col; | 40 | 111k | JDIMENSION num_cols = cinfo->output_width; | 41 | | /* copy these pointers into registers if possible */ | 42 | 111k | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; | 43 | 111k | register int *Crrtab = cconvert->Cr_r_tab; | 44 | 111k | register int *Cbbtab = cconvert->Cb_b_tab; | 45 | 111k | register JLONG *Crgtab = cconvert->Cr_g_tab; | 46 | 111k | register JLONG *Cbgtab = cconvert->Cb_g_tab; | 47 | 111k | SHIFT_TEMPS | 48 | | | 49 | 357k | while (--num_rows >= 0) { | 50 | 246k | inptr0 = input_buf[0][input_row]; | 51 | 246k | inptr1 = input_buf[1][input_row]; | 52 | 246k | inptr2 = input_buf[2][input_row]; | 53 | 246k | input_row++; | 54 | 246k | outptr = *output_buf++; | 55 | 1.56M | for (col = 0; col < num_cols; col++) { | 56 | 1.31M | y = inptr0[col]; | 57 | 1.31M | cb = inptr1[col]; | 58 | 1.31M | cr = inptr2[col]; | 59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ | 60 | 1.31M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; | 61 | 1.31M | outptr[RGB_GREEN] = range_limit[y + | 62 | 1.31M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], | 63 | 1.31M | SCALEBITS))]; | 64 | 1.31M | outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; | 65 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 66 | | /* opaque alpha channel value */ | 67 | 1.31M | #ifdef RGB_ALPHA | 68 | 1.31M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 69 | 1.31M | #endif | 70 | 1.31M | outptr += RGB_PIXELSIZE; | 71 | 1.31M | } | 72 | 246k | } | 73 | | #else | 74 | | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); | 75 | | #endif | 76 | 111k | } |
Unexecuted instantiation: jdcolor-12.c:ycc_extxrgb_convert Unexecuted instantiation: jdcolor-16.c:ycc_extrgb_convert Unexecuted instantiation: jdcolor-16.c:ycc_extrgbx_convert Unexecuted instantiation: jdcolor-16.c:ycc_extbgr_convert Unexecuted instantiation: jdcolor-16.c:ycc_extbgrx_convert Unexecuted instantiation: jdcolor-16.c:ycc_extxbgr_convert Unexecuted instantiation: jdcolor-16.c:ycc_extxrgb_convert Unexecuted instantiation: jdcolor-16.c:ycc_rgb_convert |
77 | | |
78 | | |
79 | | /* |
80 | | * Convert grayscale to RGB: just duplicate the graylevel three times. |
81 | | * This is provided to support applications that don't want to cope |
82 | | * with grayscale as a separate case. |
83 | | */ |
84 | | |
85 | | INLINE |
86 | | LOCAL(void) |
87 | | gray_rgb_convert(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf, |
88 | | JDIMENSION input_row, _JSAMPARRAY output_buf, int num_rows) |
89 | 7.92M | { |
90 | 7.92M | register _JSAMPROW inptr, outptr; |
91 | 7.92M | register JDIMENSION col; |
92 | 7.92M | JDIMENSION num_cols = cinfo->output_width; |
93 | | |
94 | 20.3M | while (--num_rows >= 0) { |
95 | 12.3M | inptr = input_buf[0][input_row++]; |
96 | 12.3M | outptr = *output_buf++; |
97 | 1.19G | for (col = 0; col < num_cols; col++) { |
98 | 1.18G | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; |
99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ |
100 | | /* opaque alpha channel value */ |
101 | | #ifdef RGB_ALPHA |
102 | 183M | outptr[RGB_ALPHA] = _MAXJSAMPLE; |
103 | | #endif |
104 | 1.18G | outptr += RGB_PIXELSIZE; |
105 | 1.18G | } |
106 | 12.3M | } |
107 | 7.92M | } jdcolor-8.c:gray_extrgb_convert Line | Count | Source | 89 | 2.64M | { | 90 | 2.64M | register _JSAMPROW inptr, outptr; | 91 | 2.64M | register JDIMENSION col; | 92 | 2.64M | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 6.68M | while (--num_rows >= 0) { | 95 | 4.03M | inptr = input_buf[0][input_row++]; | 96 | 4.03M | outptr = *output_buf++; | 97 | 544M | for (col = 0; col < num_cols; col++) { | 98 | 540M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | | #ifdef RGB_ALPHA | 102 | | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | | #endif | 104 | 540M | outptr += RGB_PIXELSIZE; | 105 | 540M | } | 106 | 4.03M | } | 107 | 2.64M | } |
jdcolor-8.c:gray_extrgbx_convert Line | Count | Source | 89 | 241k | { | 90 | 241k | register _JSAMPROW inptr, outptr; | 91 | 241k | register JDIMENSION col; | 92 | 241k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 483k | while (--num_rows >= 0) { | 95 | 241k | inptr = input_buf[0][input_row++]; | 96 | 241k | outptr = *output_buf++; | 97 | 13.4M | for (col = 0; col < num_cols; col++) { | 98 | 13.2M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | 13.2M | #ifdef RGB_ALPHA | 102 | 13.2M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 13.2M | #endif | 104 | 13.2M | outptr += RGB_PIXELSIZE; | 105 | 13.2M | } | 106 | 241k | } | 107 | 241k | } |
jdcolor-8.c:gray_extbgr_convert Line | Count | Source | 89 | 322k | { | 90 | 322k | register _JSAMPROW inptr, outptr; | 91 | 322k | register JDIMENSION col; | 92 | 322k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 644k | while (--num_rows >= 0) { | 95 | 322k | inptr = input_buf[0][input_row++]; | 96 | 322k | outptr = *output_buf++; | 97 | 23.1M | for (col = 0; col < num_cols; col++) { | 98 | 22.8M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | | #ifdef RGB_ALPHA | 102 | | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | | #endif | 104 | 22.8M | outptr += RGB_PIXELSIZE; | 105 | 22.8M | } | 106 | 322k | } | 107 | 322k | } |
jdcolor-8.c:gray_extbgrx_convert Line | Count | Source | 89 | 1.22M | { | 90 | 1.22M | register _JSAMPROW inptr, outptr; | 91 | 1.22M | register JDIMENSION col; | 92 | 1.22M | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 3.11M | while (--num_rows >= 0) { | 95 | 1.88M | inptr = input_buf[0][input_row++]; | 96 | 1.88M | outptr = *output_buf++; | 97 | 89.6M | for (col = 0; col < num_cols; col++) { | 98 | 87.7M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | 87.7M | #ifdef RGB_ALPHA | 102 | 87.7M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 87.7M | #endif | 104 | 87.7M | outptr += RGB_PIXELSIZE; | 105 | 87.7M | } | 106 | 1.88M | } | 107 | 1.22M | } |
jdcolor-8.c:gray_extxbgr_convert Line | Count | Source | 89 | 327k | { | 90 | 327k | register _JSAMPROW inptr, outptr; | 91 | 327k | register JDIMENSION col; | 92 | 327k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 828k | while (--num_rows >= 0) { | 95 | 500k | inptr = input_buf[0][input_row++]; | 96 | 500k | outptr = *output_buf++; | 97 | 9.53M | for (col = 0; col < num_cols; col++) { | 98 | 9.03M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | 9.03M | #ifdef RGB_ALPHA | 102 | 9.03M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 9.03M | #endif | 104 | 9.03M | outptr += RGB_PIXELSIZE; | 105 | 9.03M | } | 106 | 500k | } | 107 | 327k | } |
jdcolor-8.c:gray_extxrgb_convert Line | Count | Source | 89 | 80.5k | { | 90 | 80.5k | register _JSAMPROW inptr, outptr; | 91 | 80.5k | register JDIMENSION col; | 92 | 80.5k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 161k | while (--num_rows >= 0) { | 95 | 80.5k | inptr = input_buf[0][input_row++]; | 96 | 80.5k | outptr = *output_buf++; | 97 | 1.64M | for (col = 0; col < num_cols; col++) { | 98 | 1.56M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | 1.56M | #ifdef RGB_ALPHA | 102 | 1.56M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 1.56M | #endif | 104 | 1.56M | outptr += RGB_PIXELSIZE; | 105 | 1.56M | } | 106 | 80.5k | } | 107 | 80.5k | } |
jdcolor-12.c:gray_extrgb_convert Line | Count | Source | 89 | 1.92M | { | 90 | 1.92M | register _JSAMPROW inptr, outptr; | 91 | 1.92M | register JDIMENSION col; | 92 | 1.92M | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 5.24M | while (--num_rows >= 0) { | 95 | 3.32M | inptr = input_buf[0][input_row++]; | 96 | 3.32M | outptr = *output_buf++; | 97 | 441M | for (col = 0; col < num_cols; col++) { | 98 | 437M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | | #ifdef RGB_ALPHA | 102 | | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | | #endif | 104 | 437M | outptr += RGB_PIXELSIZE; | 105 | 437M | } | 106 | 3.32M | } | 107 | 1.92M | } |
Unexecuted instantiation: jdcolor-12.c:gray_extrgbx_convert Unexecuted instantiation: jdcolor-12.c:gray_extbgr_convert jdcolor-12.c:gray_extbgrx_convert Line | Count | Source | 89 | 919k | { | 90 | 919k | register _JSAMPROW inptr, outptr; | 91 | 919k | register JDIMENSION col; | 92 | 919k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 2.50M | while (--num_rows >= 0) { | 95 | 1.58M | inptr = input_buf[0][input_row++]; | 96 | 1.58M | outptr = *output_buf++; | 97 | 66.2M | for (col = 0; col < num_cols; col++) { | 98 | 64.6M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | 64.6M | #ifdef RGB_ALPHA | 102 | 64.6M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 64.6M | #endif | 104 | 64.6M | outptr += RGB_PIXELSIZE; | 105 | 64.6M | } | 106 | 1.58M | } | 107 | 919k | } |
jdcolor-12.c:gray_extxbgr_convert Line | Count | Source | 89 | 239k | { | 90 | 239k | register _JSAMPROW inptr, outptr; | 91 | 239k | register JDIMENSION col; | 92 | 239k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 654k | while (--num_rows >= 0) { | 95 | 414k | inptr = input_buf[0][input_row++]; | 96 | 414k | outptr = *output_buf++; | 97 | 7.68M | for (col = 0; col < num_cols; col++) { | 98 | 7.27M | outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; | 99 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 100 | | /* opaque alpha channel value */ | 101 | 7.27M | #ifdef RGB_ALPHA | 102 | 7.27M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 7.27M | #endif | 104 | 7.27M | outptr += RGB_PIXELSIZE; | 105 | 7.27M | } | 106 | 414k | } | 107 | 239k | } |
Unexecuted instantiation: jdcolor-12.c:gray_extxrgb_convert Unexecuted instantiation: jdcolor-16.c:gray_extrgb_convert Unexecuted instantiation: jdcolor-16.c:gray_extrgbx_convert Unexecuted instantiation: jdcolor-16.c:gray_extbgr_convert Unexecuted instantiation: jdcolor-16.c:gray_extbgrx_convert Unexecuted instantiation: jdcolor-16.c:gray_extxbgr_convert Unexecuted instantiation: jdcolor-16.c:gray_extxrgb_convert Unexecuted instantiation: jdcolor-16.c:gray_rgb_convert |
108 | | |
109 | | |
110 | | /* |
111 | | * Convert RGB to extended RGB: just swap the order of source pixels |
112 | | */ |
113 | | |
114 | | INLINE |
115 | | LOCAL(void) |
116 | | rgb_rgb_convert(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf, |
117 | | JDIMENSION input_row, _JSAMPARRAY output_buf, int num_rows) |
118 | 2.82M | { |
119 | 2.82M | register _JSAMPROW inptr0, inptr1, inptr2; |
120 | 2.82M | register _JSAMPROW outptr; |
121 | 2.82M | register JDIMENSION col; |
122 | 2.82M | JDIMENSION num_cols = cinfo->output_width; |
123 | | |
124 | 7.10M | while (--num_rows >= 0) { |
125 | 4.28M | inptr0 = input_buf[0][input_row]; |
126 | 4.28M | inptr1 = input_buf[1][input_row]; |
127 | 4.28M | inptr2 = input_buf[2][input_row]; |
128 | 4.28M | input_row++; |
129 | 4.28M | outptr = *output_buf++; |
130 | 123M | for (col = 0; col < num_cols; col++) { |
131 | 119M | outptr[RGB_RED] = inptr0[col]; |
132 | 119M | outptr[RGB_GREEN] = inptr1[col]; |
133 | 119M | outptr[RGB_BLUE] = inptr2[col]; |
134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ |
135 | | /* opaque alpha channel value */ |
136 | | #ifdef RGB_ALPHA |
137 | 82.6M | outptr[RGB_ALPHA] = _MAXJSAMPLE; |
138 | | #endif |
139 | 119M | outptr += RGB_PIXELSIZE; |
140 | 119M | } |
141 | 4.28M | } |
142 | 2.82M | } Unexecuted instantiation: jdcolor-8.c:rgb_extrgb_convert jdcolor-8.c:rgb_extrgbx_convert Line | Count | Source | 118 | 26.0k | { | 119 | 26.0k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 26.0k | register _JSAMPROW outptr; | 121 | 26.0k | register JDIMENSION col; | 122 | 26.0k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 77.1k | while (--num_rows >= 0) { | 125 | 51.1k | inptr0 = input_buf[0][input_row]; | 126 | 51.1k | inptr1 = input_buf[1][input_row]; | 127 | 51.1k | inptr2 = input_buf[2][input_row]; | 128 | 51.1k | input_row++; | 129 | 51.1k | outptr = *output_buf++; | 130 | 4.34M | for (col = 0; col < num_cols; col++) { | 131 | 4.29M | outptr[RGB_RED] = inptr0[col]; | 132 | 4.29M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 4.29M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 4.29M | #ifdef RGB_ALPHA | 137 | 4.29M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 4.29M | #endif | 139 | 4.29M | outptr += RGB_PIXELSIZE; | 140 | 4.29M | } | 141 | 51.1k | } | 142 | 26.0k | } |
jdcolor-8.c:rgb_extbgr_convert Line | Count | Source | 118 | 1.49M | { | 119 | 1.49M | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 1.49M | register _JSAMPROW outptr; | 121 | 1.49M | register JDIMENSION col; | 122 | 1.49M | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 3.17M | while (--num_rows >= 0) { | 125 | 1.67M | inptr0 = input_buf[0][input_row]; | 126 | 1.67M | inptr1 = input_buf[1][input_row]; | 127 | 1.67M | inptr2 = input_buf[2][input_row]; | 128 | 1.67M | input_row++; | 129 | 1.67M | outptr = *output_buf++; | 130 | 38.6M | for (col = 0; col < num_cols; col++) { | 131 | 37.0M | outptr[RGB_RED] = inptr0[col]; | 132 | 37.0M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 37.0M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | | #ifdef RGB_ALPHA | 137 | | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | | #endif | 139 | 37.0M | outptr += RGB_PIXELSIZE; | 140 | 37.0M | } | 141 | 1.67M | } | 142 | 1.49M | } |
jdcolor-8.c:rgb_extbgrx_convert Line | Count | Source | 118 | 163k | { | 119 | 163k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 163k | register _JSAMPROW outptr; | 121 | 163k | register JDIMENSION col; | 122 | 163k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 449k | while (--num_rows >= 0) { | 125 | 285k | inptr0 = input_buf[0][input_row]; | 126 | 285k | inptr1 = input_buf[1][input_row]; | 127 | 285k | inptr2 = input_buf[2][input_row]; | 128 | 285k | input_row++; | 129 | 285k | outptr = *output_buf++; | 130 | 11.9M | for (col = 0; col < num_cols; col++) { | 131 | 11.6M | outptr[RGB_RED] = inptr0[col]; | 132 | 11.6M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 11.6M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 11.6M | #ifdef RGB_ALPHA | 137 | 11.6M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 11.6M | #endif | 139 | 11.6M | outptr += RGB_PIXELSIZE; | 140 | 11.6M | } | 141 | 285k | } | 142 | 163k | } |
jdcolor-8.c:rgb_extxbgr_convert Line | Count | Source | 118 | 143k | { | 119 | 143k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 143k | register _JSAMPROW outptr; | 121 | 143k | register JDIMENSION col; | 122 | 143k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 378k | while (--num_rows >= 0) { | 125 | 234k | inptr0 = input_buf[0][input_row]; | 126 | 234k | inptr1 = input_buf[1][input_row]; | 127 | 234k | inptr2 = input_buf[2][input_row]; | 128 | 234k | input_row++; | 129 | 234k | outptr = *output_buf++; | 130 | 10.8M | for (col = 0; col < num_cols; col++) { | 131 | 10.6M | outptr[RGB_RED] = inptr0[col]; | 132 | 10.6M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 10.6M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 10.6M | #ifdef RGB_ALPHA | 137 | 10.6M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 10.6M | #endif | 139 | 10.6M | outptr += RGB_PIXELSIZE; | 140 | 10.6M | } | 141 | 234k | } | 142 | 143k | } |
jdcolor-8.c:rgb_extxrgb_convert Line | Count | Source | 118 | 8.67k | { | 119 | 8.67k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 8.67k | register _JSAMPROW outptr; | 121 | 8.67k | register JDIMENSION col; | 122 | 8.67k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 25.7k | while (--num_rows >= 0) { | 125 | 17.0k | inptr0 = input_buf[0][input_row]; | 126 | 17.0k | inptr1 = input_buf[1][input_row]; | 127 | 17.0k | inptr2 = input_buf[2][input_row]; | 128 | 17.0k | input_row++; | 129 | 17.0k | outptr = *output_buf++; | 130 | 545k | for (col = 0; col < num_cols; col++) { | 131 | 528k | outptr[RGB_RED] = inptr0[col]; | 132 | 528k | outptr[RGB_GREEN] = inptr1[col]; | 133 | 528k | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 528k | #ifdef RGB_ALPHA | 137 | 528k | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 528k | #endif | 139 | 528k | outptr += RGB_PIXELSIZE; | 140 | 528k | } | 141 | 17.0k | } | 142 | 8.67k | } |
Unexecuted instantiation: jdcolor-12.c:rgb_extrgb_convert Unexecuted instantiation: jdcolor-12.c:rgb_extrgbx_convert Unexecuted instantiation: jdcolor-12.c:rgb_extbgr_convert jdcolor-12.c:rgb_extbgrx_convert Line | Count | Source | 118 | 226k | { | 119 | 226k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 226k | register _JSAMPROW outptr; | 121 | 226k | register JDIMENSION col; | 122 | 226k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 630k | while (--num_rows >= 0) { | 125 | 404k | inptr0 = input_buf[0][input_row]; | 126 | 404k | inptr1 = input_buf[1][input_row]; | 127 | 404k | inptr2 = input_buf[2][input_row]; | 128 | 404k | input_row++; | 129 | 404k | outptr = *output_buf++; | 130 | 14.8M | for (col = 0; col < num_cols; col++) { | 131 | 14.4M | outptr[RGB_RED] = inptr0[col]; | 132 | 14.4M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 14.4M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 14.4M | #ifdef RGB_ALPHA | 137 | 14.4M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 14.4M | #endif | 139 | 14.4M | outptr += RGB_PIXELSIZE; | 140 | 14.4M | } | 141 | 404k | } | 142 | 226k | } |
jdcolor-12.c:rgb_extxbgr_convert Line | Count | Source | 118 | 179k | { | 119 | 179k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 179k | register _JSAMPROW outptr; | 121 | 179k | register JDIMENSION col; | 122 | 179k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 460k | while (--num_rows >= 0) { | 125 | 280k | inptr0 = input_buf[0][input_row]; | 126 | 280k | inptr1 = input_buf[1][input_row]; | 127 | 280k | inptr2 = input_buf[2][input_row]; | 128 | 280k | input_row++; | 129 | 280k | outptr = *output_buf++; | 130 | 13.0M | for (col = 0; col < num_cols; col++) { | 131 | 12.7M | outptr[RGB_RED] = inptr0[col]; | 132 | 12.7M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 12.7M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 12.7M | #ifdef RGB_ALPHA | 137 | 12.7M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 12.7M | #endif | 139 | 12.7M | outptr += RGB_PIXELSIZE; | 140 | 12.7M | } | 141 | 280k | } | 142 | 179k | } |
Unexecuted instantiation: jdcolor-12.c:rgb_extxrgb_convert Unexecuted instantiation: jdcolor-16.c:rgb_extrgb_convert Unexecuted instantiation: jdcolor-16.c:rgb_extrgbx_convert Unexecuted instantiation: jdcolor-16.c:rgb_extbgr_convert jdcolor-16.c:rgb_extbgrx_convert Line | Count | Source | 118 | 290k | { | 119 | 290k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 290k | register _JSAMPROW outptr; | 121 | 290k | register JDIMENSION col; | 122 | 290k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 955k | while (--num_rows >= 0) { | 125 | 665k | inptr0 = input_buf[0][input_row]; | 126 | 665k | inptr1 = input_buf[1][input_row]; | 127 | 665k | inptr2 = input_buf[2][input_row]; | 128 | 665k | input_row++; | 129 | 665k | outptr = *output_buf++; | 130 | 14.8M | for (col = 0; col < num_cols; col++) { | 131 | 14.1M | outptr[RGB_RED] = inptr0[col]; | 132 | 14.1M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 14.1M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 14.1M | #ifdef RGB_ALPHA | 137 | 14.1M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 14.1M | #endif | 139 | 14.1M | outptr += RGB_PIXELSIZE; | 140 | 14.1M | } | 141 | 665k | } | 142 | 290k | } |
jdcolor-16.c:rgb_extxbgr_convert Line | Count | Source | 118 | 290k | { | 119 | 290k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 290k | register _JSAMPROW outptr; | 121 | 290k | register JDIMENSION col; | 122 | 290k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 955k | while (--num_rows >= 0) { | 125 | 665k | inptr0 = input_buf[0][input_row]; | 126 | 665k | inptr1 = input_buf[1][input_row]; | 127 | 665k | inptr2 = input_buf[2][input_row]; | 128 | 665k | input_row++; | 129 | 665k | outptr = *output_buf++; | 130 | 14.8M | for (col = 0; col < num_cols; col++) { | 131 | 14.1M | outptr[RGB_RED] = inptr0[col]; | 132 | 14.1M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 14.1M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 14.1M | #ifdef RGB_ALPHA | 137 | 14.1M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 14.1M | #endif | 139 | 14.1M | outptr += RGB_PIXELSIZE; | 140 | 14.1M | } | 141 | 665k | } | 142 | 290k | } |
Unexecuted instantiation: jdcolor-16.c:rgb_extxrgb_convert |