/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.04M | { |
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.30M | while (--num_rows >= 0) { |
50 | 2.26M | inptr0 = input_buf[0][input_row]; |
51 | 2.26M | inptr1 = input_buf[1][input_row]; |
52 | 2.26M | inptr2 = input_buf[2][input_row]; |
53 | 2.26M | input_row++; |
54 | 2.26M | outptr = *output_buf++; |
55 | 57.6M | for (col = 0; col < num_cols; col++) { |
56 | 55.4M | y = inptr0[col]; |
57 | 55.4M | cb = inptr1[col]; |
58 | 55.4M | cr = inptr2[col]; |
59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ |
60 | 55.4M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; |
61 | 55.4M | outptr[RGB_GREEN] = range_limit[y + |
62 | 55.4M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], |
63 | 55.4M | SCALEBITS))]; |
64 | 55.4M | 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 | 17.9M | outptr[RGB_ALPHA] = _MAXJSAMPLE; |
69 | | #endif |
70 | 55.4M | outptr += RGB_PIXELSIZE; |
71 | 55.4M | } |
72 | 2.26M | } |
73 | | #else |
74 | 0 | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); |
75 | | #endif |
76 | 1.04M | } 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 | 465k | { | 34 | 465k | #if BITS_IN_JSAMPLE != 16 | 35 | 465k | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; | 36 | 465k | register int y, cb, cr; | 37 | 465k | register _JSAMPROW outptr; | 38 | 465k | register _JSAMPROW inptr0, inptr1, inptr2; | 39 | 465k | register JDIMENSION col; | 40 | 465k | JDIMENSION num_cols = cinfo->output_width; | 41 | | /* copy these pointers into registers if possible */ | 42 | 465k | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; | 43 | 465k | register int *Crrtab = cconvert->Cr_r_tab; | 44 | 465k | register int *Cbbtab = cconvert->Cb_b_tab; | 45 | 465k | register JLONG *Crgtab = cconvert->Cr_g_tab; | 46 | 465k | register JLONG *Cbgtab = cconvert->Cb_g_tab; | 47 | 465k | SHIFT_TEMPS | 48 | | | 49 | 1.57M | while (--num_rows >= 0) { | 50 | 1.11M | inptr0 = input_buf[0][input_row]; | 51 | 1.11M | inptr1 = input_buf[1][input_row]; | 52 | 1.11M | inptr2 = input_buf[2][input_row]; | 53 | 1.11M | input_row++; | 54 | 1.11M | outptr = *output_buf++; | 55 | 38.5M | for (col = 0; col < num_cols; col++) { | 56 | 37.4M | y = inptr0[col]; | 57 | 37.4M | cb = inptr1[col]; | 58 | 37.4M | cr = inptr2[col]; | 59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ | 60 | 37.4M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; | 61 | 37.4M | outptr[RGB_GREEN] = range_limit[y + | 62 | 37.4M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], | 63 | 37.4M | SCALEBITS))]; | 64 | 37.4M | 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.4M | outptr += RGB_PIXELSIZE; | 71 | 37.4M | } | 72 | 1.11M | } | 73 | | #else | 74 | | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); | 75 | | #endif | 76 | 465k | } |
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 | 459k | { | 34 | 459k | #if BITS_IN_JSAMPLE != 16 | 35 | 459k | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; | 36 | 459k | register int y, cb, cr; | 37 | 459k | register _JSAMPROW outptr; | 38 | 459k | register _JSAMPROW inptr0, inptr1, inptr2; | 39 | 459k | register JDIMENSION col; | 40 | 459k | JDIMENSION num_cols = cinfo->output_width; | 41 | | /* copy these pointers into registers if possible */ | 42 | 459k | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; | 43 | 459k | register int *Crrtab = cconvert->Cr_r_tab; | 44 | 459k | register int *Cbbtab = cconvert->Cb_b_tab; | 45 | 459k | register JLONG *Crgtab = cconvert->Cr_g_tab; | 46 | 459k | register JLONG *Cbgtab = cconvert->Cb_g_tab; | 47 | 459k | SHIFT_TEMPS | 48 | | | 49 | 1.38M | while (--num_rows >= 0) { | 50 | 925k | inptr0 = input_buf[0][input_row]; | 51 | 925k | inptr1 = input_buf[1][input_row]; | 52 | 925k | inptr2 = input_buf[2][input_row]; | 53 | 925k | input_row++; | 54 | 925k | outptr = *output_buf++; | 55 | 17.4M | for (col = 0; col < num_cols; col++) { | 56 | 16.5M | y = inptr0[col]; | 57 | 16.5M | cb = inptr1[col]; | 58 | 16.5M | cr = inptr2[col]; | 59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ | 60 | 16.5M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; | 61 | 16.5M | outptr[RGB_GREEN] = range_limit[y + | 62 | 16.5M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], | 63 | 16.5M | SCALEBITS))]; | 64 | 16.5M | 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 | 16.5M | #ifdef RGB_ALPHA | 68 | 16.5M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 69 | 16.5M | #endif | 70 | 16.5M | outptr += RGB_PIXELSIZE; | 71 | 16.5M | } | 72 | 925k | } | 73 | | #else | 74 | | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); | 75 | | #endif | 76 | 459k | } |
jdcolor-12.c:ycc_extxbgr_convert Line | Count | Source | 33 | 115k | { | 34 | 115k | #if BITS_IN_JSAMPLE != 16 | 35 | 115k | my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert; | 36 | 115k | register int y, cb, cr; | 37 | 115k | register _JSAMPROW outptr; | 38 | 115k | register _JSAMPROW inptr0, inptr1, inptr2; | 39 | 115k | register JDIMENSION col; | 40 | 115k | JDIMENSION num_cols = cinfo->output_width; | 41 | | /* copy these pointers into registers if possible */ | 42 | 115k | register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit; | 43 | 115k | register int *Crrtab = cconvert->Cr_r_tab; | 44 | 115k | register int *Cbbtab = cconvert->Cb_b_tab; | 45 | 115k | register JLONG *Crgtab = cconvert->Cr_g_tab; | 46 | 115k | register JLONG *Cbgtab = cconvert->Cb_g_tab; | 47 | 115k | SHIFT_TEMPS | 48 | | | 49 | 348k | while (--num_rows >= 0) { | 50 | 233k | inptr0 = input_buf[0][input_row]; | 51 | 233k | inptr1 = input_buf[1][input_row]; | 52 | 233k | inptr2 = input_buf[2][input_row]; | 53 | 233k | input_row++; | 54 | 233k | outptr = *output_buf++; | 55 | 1.61M | for (col = 0; col < num_cols; col++) { | 56 | 1.38M | y = inptr0[col]; | 57 | 1.38M | cb = inptr1[col]; | 58 | 1.38M | cr = inptr2[col]; | 59 | | /* Range-limiting is essential due to noise introduced by DCT losses. */ | 60 | 1.38M | outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; | 61 | 1.38M | outptr[RGB_GREEN] = range_limit[y + | 62 | 1.38M | ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], | 63 | 1.38M | SCALEBITS))]; | 64 | 1.38M | 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.38M | #ifdef RGB_ALPHA | 68 | 1.38M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 69 | 1.38M | #endif | 70 | 1.38M | outptr += RGB_PIXELSIZE; | 71 | 1.38M | } | 72 | 233k | } | 73 | | #else | 74 | | ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); | 75 | | #endif | 76 | 115k | } |
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.75M | { |
90 | 7.75M | register _JSAMPROW inptr, outptr; |
91 | 7.75M | register JDIMENSION col; |
92 | 7.75M | JDIMENSION num_cols = cinfo->output_width; |
93 | | |
94 | 20.0M | while (--num_rows >= 0) { |
95 | 12.2M | inptr = input_buf[0][input_row++]; |
96 | 12.2M | outptr = *output_buf++; |
97 | 1.10G | for (col = 0; col < num_cols; col++) { |
98 | 1.09G | 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 | 165M | outptr[RGB_ALPHA] = _MAXJSAMPLE; |
103 | | #endif |
104 | 1.09G | outptr += RGB_PIXELSIZE; |
105 | 1.09G | } |
106 | 12.2M | } |
107 | 7.75M | } jdcolor-8.c:gray_extrgb_convert Line | Count | Source | 89 | 2.69M | { | 90 | 2.69M | register _JSAMPROW inptr, outptr; | 91 | 2.69M | register JDIMENSION col; | 92 | 2.69M | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 6.78M | while (--num_rows >= 0) { | 95 | 4.09M | inptr = input_buf[0][input_row++]; | 96 | 4.09M | outptr = *output_buf++; | 97 | 516M | for (col = 0; col < num_cols; col++) { | 98 | 511M | 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 | 511M | outptr += RGB_PIXELSIZE; | 105 | 511M | } | 106 | 4.09M | } | 107 | 2.69M | } |
jdcolor-8.c:gray_extrgbx_convert Line | Count | Source | 89 | 240k | { | 90 | 240k | register _JSAMPROW inptr, outptr; | 91 | 240k | register JDIMENSION col; | 92 | 240k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 481k | while (--num_rows >= 0) { | 95 | 240k | inptr = input_buf[0][input_row++]; | 96 | 240k | outptr = *output_buf++; | 97 | 13.8M | for (col = 0; col < num_cols; col++) { | 98 | 13.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 | 13.6M | #ifdef RGB_ALPHA | 102 | 13.6M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 13.6M | #endif | 104 | 13.6M | outptr += RGB_PIXELSIZE; | 105 | 13.6M | } | 106 | 240k | } | 107 | 240k | } |
jdcolor-8.c:gray_extbgr_convert Line | Count | Source | 89 | 321k | { | 90 | 321k | register _JSAMPROW inptr, outptr; | 91 | 321k | register JDIMENSION col; | 92 | 321k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 642k | while (--num_rows >= 0) { | 95 | 321k | inptr = input_buf[0][input_row++]; | 96 | 321k | outptr = *output_buf++; | 97 | 23.8M | for (col = 0; col < num_cols; col++) { | 98 | 23.5M | 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 | 23.5M | outptr += RGB_PIXELSIZE; | 105 | 23.5M | } | 106 | 321k | } | 107 | 321k | } |
jdcolor-8.c:gray_extbgrx_convert Line | Count | Source | 89 | 1.26M | { | 90 | 1.26M | register _JSAMPROW inptr, outptr; | 91 | 1.26M | register JDIMENSION col; | 92 | 1.26M | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 3.19M | while (--num_rows >= 0) { | 95 | 1.92M | inptr = input_buf[0][input_row++]; | 96 | 1.92M | outptr = *output_buf++; | 97 | 82.7M | for (col = 0; col < num_cols; col++) { | 98 | 80.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 | 80.7M | #ifdef RGB_ALPHA | 102 | 80.7M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 80.7M | #endif | 104 | 80.7M | outptr += RGB_PIXELSIZE; | 105 | 80.7M | } | 106 | 1.92M | } | 107 | 1.26M | } |
jdcolor-8.c:gray_extxbgr_convert Line | Count | Source | 89 | 335k | { | 90 | 335k | register _JSAMPROW inptr, outptr; | 91 | 335k | register JDIMENSION col; | 92 | 335k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 844k | while (--num_rows >= 0) { | 95 | 508k | inptr = input_buf[0][input_row++]; | 96 | 508k | outptr = *output_buf++; | 97 | 9.10M | for (col = 0; col < num_cols; col++) { | 98 | 8.59M | 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 | 8.59M | #ifdef RGB_ALPHA | 102 | 8.59M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 8.59M | #endif | 104 | 8.59M | outptr += RGB_PIXELSIZE; | 105 | 8.59M | } | 106 | 508k | } | 107 | 335k | } |
jdcolor-8.c:gray_extxrgb_convert Line | Count | Source | 89 | 80.3k | { | 90 | 80.3k | register _JSAMPROW inptr, outptr; | 91 | 80.3k | register JDIMENSION col; | 92 | 80.3k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 160k | while (--num_rows >= 0) { | 95 | 80.3k | inptr = input_buf[0][input_row++]; | 96 | 80.3k | outptr = *output_buf++; | 97 | 1.70M | for (col = 0; col < num_cols; col++) { | 98 | 1.62M | 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.62M | #ifdef RGB_ALPHA | 102 | 1.62M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 1.62M | #endif | 104 | 1.62M | outptr += RGB_PIXELSIZE; | 105 | 1.62M | } | 106 | 80.3k | } | 107 | 80.3k | } |
jdcolor-12.c:gray_extrgb_convert Line | Count | Source | 89 | 1.75M | { | 90 | 1.75M | register _JSAMPROW inptr, outptr; | 91 | 1.75M | register JDIMENSION col; | 92 | 1.75M | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 4.92M | while (--num_rows >= 0) { | 95 | 3.16M | inptr = input_buf[0][input_row++]; | 96 | 3.16M | outptr = *output_buf++; | 97 | 392M | for (col = 0; col < num_cols; col++) { | 98 | 389M | 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 | 389M | outptr += RGB_PIXELSIZE; | 105 | 389M | } | 106 | 3.16M | } | 107 | 1.75M | } |
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 | 843k | { | 90 | 843k | register _JSAMPROW inptr, outptr; | 91 | 843k | register JDIMENSION col; | 92 | 843k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 2.36M | while (--num_rows >= 0) { | 95 | 1.52M | inptr = input_buf[0][input_row++]; | 96 | 1.52M | outptr = *output_buf++; | 97 | 56.0M | for (col = 0; col < num_cols; col++) { | 98 | 54.5M | 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 | 54.5M | #ifdef RGB_ALPHA | 102 | 54.5M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 54.5M | #endif | 104 | 54.5M | outptr += RGB_PIXELSIZE; | 105 | 54.5M | } | 106 | 1.52M | } | 107 | 843k | } |
jdcolor-12.c:gray_extxbgr_convert Line | Count | Source | 89 | 219k | { | 90 | 219k | register _JSAMPROW inptr, outptr; | 91 | 219k | register JDIMENSION col; | 92 | 219k | JDIMENSION num_cols = cinfo->output_width; | 93 | | | 94 | 615k | while (--num_rows >= 0) { | 95 | 396k | inptr = input_buf[0][input_row++]; | 96 | 396k | outptr = *output_buf++; | 97 | 6.86M | for (col = 0; col < num_cols; col++) { | 98 | 6.47M | 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 | 6.47M | #ifdef RGB_ALPHA | 102 | 6.47M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 103 | 6.47M | #endif | 104 | 6.47M | outptr += RGB_PIXELSIZE; | 105 | 6.47M | } | 106 | 396k | } | 107 | 219k | } |
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 | 1.94M | { |
119 | 1.94M | register _JSAMPROW inptr0, inptr1, inptr2; |
120 | 1.94M | register _JSAMPROW outptr; |
121 | 1.94M | register JDIMENSION col; |
122 | 1.94M | JDIMENSION num_cols = cinfo->output_width; |
123 | | |
124 | 5.21M | while (--num_rows >= 0) { |
125 | 3.27M | inptr0 = input_buf[0][input_row]; |
126 | 3.27M | inptr1 = input_buf[1][input_row]; |
127 | 3.27M | inptr2 = input_buf[2][input_row]; |
128 | 3.27M | input_row++; |
129 | 3.27M | outptr = *output_buf++; |
130 | 121M | for (col = 0; col < num_cols; col++) { |
131 | 118M | outptr[RGB_RED] = inptr0[col]; |
132 | 118M | outptr[RGB_GREEN] = inptr1[col]; |
133 | 118M | 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 | 86.8M | outptr[RGB_ALPHA] = _MAXJSAMPLE; |
138 | | #endif |
139 | 118M | outptr += RGB_PIXELSIZE; |
140 | 118M | } |
141 | 3.27M | } |
142 | 1.94M | } Unexecuted instantiation: jdcolor-8.c:rgb_extrgb_convert jdcolor-8.c:rgb_extrgbx_convert Line | Count | Source | 118 | 2.08k | { | 119 | 2.08k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 2.08k | register _JSAMPROW outptr; | 121 | 2.08k | register JDIMENSION col; | 122 | 2.08k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 5.60k | while (--num_rows >= 0) { | 125 | 3.51k | inptr0 = input_buf[0][input_row]; | 126 | 3.51k | inptr1 = input_buf[1][input_row]; | 127 | 3.51k | inptr2 = input_buf[2][input_row]; | 128 | 3.51k | input_row++; | 129 | 3.51k | outptr = *output_buf++; | 130 | 3.94M | for (col = 0; col < num_cols; col++) { | 131 | 3.94M | outptr[RGB_RED] = inptr0[col]; | 132 | 3.94M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 3.94M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 3.94M | #ifdef RGB_ALPHA | 137 | 3.94M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 3.94M | #endif | 139 | 3.94M | outptr += RGB_PIXELSIZE; | 140 | 3.94M | } | 141 | 3.51k | } | 142 | 2.08k | } |
jdcolor-8.c:rgb_extbgr_convert Line | Count | Source | 118 | 806k | { | 119 | 806k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 806k | register _JSAMPROW outptr; | 121 | 806k | register JDIMENSION col; | 122 | 806k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 1.68M | while (--num_rows >= 0) { | 125 | 875k | inptr0 = input_buf[0][input_row]; | 126 | 875k | inptr1 = input_buf[1][input_row]; | 127 | 875k | inptr2 = input_buf[2][input_row]; | 128 | 875k | input_row++; | 129 | 875k | outptr = *output_buf++; | 130 | 32.5M | for (col = 0; col < num_cols; col++) { | 131 | 31.7M | outptr[RGB_RED] = inptr0[col]; | 132 | 31.7M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 31.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 | | #ifdef RGB_ALPHA | 137 | | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | | #endif | 139 | 31.7M | outptr += RGB_PIXELSIZE; | 140 | 31.7M | } | 141 | 875k | } | 142 | 806k | } |
jdcolor-8.c:rgb_extbgrx_convert Line | Count | Source | 118 | 184k | { | 119 | 184k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 184k | register _JSAMPROW outptr; | 121 | 184k | register JDIMENSION col; | 122 | 184k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 500k | while (--num_rows >= 0) { | 125 | 316k | inptr0 = input_buf[0][input_row]; | 126 | 316k | inptr1 = input_buf[1][input_row]; | 127 | 316k | inptr2 = input_buf[2][input_row]; | 128 | 316k | input_row++; | 129 | 316k | outptr = *output_buf++; | 130 | 8.98M | for (col = 0; col < num_cols; col++) { | 131 | 8.67M | outptr[RGB_RED] = inptr0[col]; | 132 | 8.67M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 8.67M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 8.67M | #ifdef RGB_ALPHA | 137 | 8.67M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 8.67M | #endif | 139 | 8.67M | outptr += RGB_PIXELSIZE; | 140 | 8.67M | } | 141 | 316k | } | 142 | 184k | } |
jdcolor-8.c:rgb_extxbgr_convert Line | Count | Source | 118 | 182k | { | 119 | 182k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 182k | register _JSAMPROW outptr; | 121 | 182k | register JDIMENSION col; | 122 | 182k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 494k | while (--num_rows >= 0) { | 125 | 312k | inptr0 = input_buf[0][input_row]; | 126 | 312k | inptr1 = input_buf[1][input_row]; | 127 | 312k | inptr2 = input_buf[2][input_row]; | 128 | 312k | input_row++; | 129 | 312k | outptr = *output_buf++; | 130 | 8.62M | for (col = 0; col < num_cols; col++) { | 131 | 8.31M | outptr[RGB_RED] = inptr0[col]; | 132 | 8.31M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 8.31M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 8.31M | #ifdef RGB_ALPHA | 137 | 8.31M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 8.31M | #endif | 139 | 8.31M | outptr += RGB_PIXELSIZE; | 140 | 8.31M | } | 141 | 312k | } | 142 | 182k | } |
jdcolor-8.c:rgb_extxrgb_convert Line | Count | Source | 118 | 706 | { | 119 | 706 | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 706 | register _JSAMPROW outptr; | 121 | 706 | register JDIMENSION col; | 122 | 706 | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 1.88k | while (--num_rows >= 0) { | 125 | 1.18k | inptr0 = input_buf[0][input_row]; | 126 | 1.18k | inptr1 = input_buf[1][input_row]; | 127 | 1.18k | inptr2 = input_buf[2][input_row]; | 128 | 1.18k | input_row++; | 129 | 1.18k | outptr = *output_buf++; | 130 | 481k | for (col = 0; col < num_cols; col++) { | 131 | 480k | outptr[RGB_RED] = inptr0[col]; | 132 | 480k | outptr[RGB_GREEN] = inptr1[col]; | 133 | 480k | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 480k | #ifdef RGB_ALPHA | 137 | 480k | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 480k | #endif | 139 | 480k | outptr += RGB_PIXELSIZE; | 140 | 480k | } | 141 | 1.18k | } | 142 | 706 | } |
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 | 121k | { | 119 | 121k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 121k | register _JSAMPROW outptr; | 121 | 121k | register JDIMENSION col; | 122 | 121k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 430k | while (--num_rows >= 0) { | 125 | 309k | inptr0 = input_buf[0][input_row]; | 126 | 309k | inptr1 = input_buf[1][input_row]; | 127 | 309k | inptr2 = input_buf[2][input_row]; | 128 | 309k | input_row++; | 129 | 309k | outptr = *output_buf++; | 130 | 17.5M | for (col = 0; col < num_cols; col++) { | 131 | 17.2M | outptr[RGB_RED] = inptr0[col]; | 132 | 17.2M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 17.2M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 17.2M | #ifdef RGB_ALPHA | 137 | 17.2M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 17.2M | #endif | 139 | 17.2M | outptr += RGB_PIXELSIZE; | 140 | 17.2M | } | 141 | 309k | } | 142 | 121k | } |
jdcolor-12.c:rgb_extxbgr_convert Line | Count | Source | 118 | 91.4k | { | 119 | 91.4k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 91.4k | register _JSAMPROW outptr; | 121 | 91.4k | register JDIMENSION col; | 122 | 91.4k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 316k | while (--num_rows >= 0) { | 125 | 224k | inptr0 = input_buf[0][input_row]; | 126 | 224k | inptr1 = input_buf[1][input_row]; | 127 | 224k | inptr2 = input_buf[2][input_row]; | 128 | 224k | input_row++; | 129 | 224k | outptr = *output_buf++; | 130 | 15.6M | for (col = 0; col < num_cols; col++) { | 131 | 15.4M | outptr[RGB_RED] = inptr0[col]; | 132 | 15.4M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 15.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 | 15.4M | #ifdef RGB_ALPHA | 137 | 15.4M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 15.4M | #endif | 139 | 15.4M | outptr += RGB_PIXELSIZE; | 140 | 15.4M | } | 141 | 224k | } | 142 | 91.4k | } |
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 | 277k | { | 119 | 277k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 277k | register _JSAMPROW outptr; | 121 | 277k | register JDIMENSION col; | 122 | 277k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 892k | while (--num_rows >= 0) { | 125 | 614k | inptr0 = input_buf[0][input_row]; | 126 | 614k | inptr1 = input_buf[1][input_row]; | 127 | 614k | inptr2 = input_buf[2][input_row]; | 128 | 614k | input_row++; | 129 | 614k | outptr = *output_buf++; | 130 | 16.9M | for (col = 0; col < num_cols; col++) { | 131 | 16.3M | outptr[RGB_RED] = inptr0[col]; | 132 | 16.3M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 16.3M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 16.3M | #ifdef RGB_ALPHA | 137 | 16.3M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 16.3M | #endif | 139 | 16.3M | outptr += RGB_PIXELSIZE; | 140 | 16.3M | } | 141 | 614k | } | 142 | 277k | } |
jdcolor-16.c:rgb_extxbgr_convert Line | Count | Source | 118 | 277k | { | 119 | 277k | register _JSAMPROW inptr0, inptr1, inptr2; | 120 | 277k | register _JSAMPROW outptr; | 121 | 277k | register JDIMENSION col; | 122 | 277k | JDIMENSION num_cols = cinfo->output_width; | 123 | | | 124 | 892k | while (--num_rows >= 0) { | 125 | 614k | inptr0 = input_buf[0][input_row]; | 126 | 614k | inptr1 = input_buf[1][input_row]; | 127 | 614k | inptr2 = input_buf[2][input_row]; | 128 | 614k | input_row++; | 129 | 614k | outptr = *output_buf++; | 130 | 16.9M | for (col = 0; col < num_cols; col++) { | 131 | 16.3M | outptr[RGB_RED] = inptr0[col]; | 132 | 16.3M | outptr[RGB_GREEN] = inptr1[col]; | 133 | 16.3M | outptr[RGB_BLUE] = inptr2[col]; | 134 | | /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */ | 135 | | /* opaque alpha channel value */ | 136 | 16.3M | #ifdef RGB_ALPHA | 137 | 16.3M | outptr[RGB_ALPHA] = _MAXJSAMPLE; | 138 | 16.3M | #endif | 139 | 16.3M | outptr += RGB_PIXELSIZE; | 140 | 16.3M | } | 141 | 614k | } | 142 | 277k | } |
Unexecuted instantiation: jdcolor-16.c:rgb_extxrgb_convert |