Coverage Report

Created: 2026-07-16 07:45

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/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.11M
{
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.83M
  while (--num_rows >= 0) {
50
2.71M
    inptr0 = input_buf[0][input_row];
51
2.71M
    inptr1 = input_buf[1][input_row];
52
2.71M
    inptr2 = input_buf[2][input_row];
53
2.71M
    input_row++;
54
2.71M
    outptr = *output_buf++;
55
62.3M
    for (col = 0; col < num_cols; col++) {
56
59.6M
      y  = inptr0[col];
57
59.6M
      cb = inptr1[col];
58
59.6M
      cr = inptr2[col];
59
      /* Range-limiting is essential due to noise introduced by DCT losses. */
60
59.6M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
61
59.6M
      outptr[RGB_GREEN] = range_limit[y +
62
59.6M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
63
59.6M
                                                SCALEBITS))];
64
59.6M
      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
18.9M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
69
#endif
70
59.6M
      outptr += RGB_PIXELSIZE;
71
59.6M
    }
72
2.71M
  }
73
#else
74
0
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
75
#endif
76
1.11M
}
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
497k
{
34
497k
#if BITS_IN_JSAMPLE != 16
35
497k
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
36
497k
  register int y, cb, cr;
37
497k
  register _JSAMPROW outptr;
38
497k
  register _JSAMPROW inptr0, inptr1, inptr2;
39
497k
  register JDIMENSION col;
40
497k
  JDIMENSION num_cols = cinfo->output_width;
41
  /* copy these pointers into registers if possible */
42
497k
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
43
497k
  register int *Crrtab = cconvert->Cr_r_tab;
44
497k
  register int *Cbbtab = cconvert->Cb_b_tab;
45
497k
  register JLONG *Crgtab = cconvert->Cr_g_tab;
46
497k
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
47
497k
  SHIFT_TEMPS
48
49
1.85M
  while (--num_rows >= 0) {
50
1.35M
    inptr0 = input_buf[0][input_row];
51
1.35M
    inptr1 = input_buf[1][input_row];
52
1.35M
    inptr2 = input_buf[2][input_row];
53
1.35M
    input_row++;
54
1.35M
    outptr = *output_buf++;
55
42.0M
    for (col = 0; col < num_cols; col++) {
56
40.7M
      y  = inptr0[col];
57
40.7M
      cb = inptr1[col];
58
40.7M
      cr = inptr2[col];
59
      /* Range-limiting is essential due to noise introduced by DCT losses. */
60
40.7M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
61
40.7M
      outptr[RGB_GREEN] = range_limit[y +
62
40.7M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
63
40.7M
                                                SCALEBITS))];
64
40.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
#ifdef RGB_ALPHA
68
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
69
#endif
70
40.7M
      outptr += RGB_PIXELSIZE;
71
40.7M
    }
72
1.35M
  }
73
#else
74
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
75
#endif
76
497k
}
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
495k
{
34
495k
#if BITS_IN_JSAMPLE != 16
35
495k
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
36
495k
  register int y, cb, cr;
37
495k
  register _JSAMPROW outptr;
38
495k
  register _JSAMPROW inptr0, inptr1, inptr2;
39
495k
  register JDIMENSION col;
40
495k
  JDIMENSION num_cols = cinfo->output_width;
41
  /* copy these pointers into registers if possible */
42
495k
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
43
495k
  register int *Crrtab = cconvert->Cr_r_tab;
44
495k
  register int *Cbbtab = cconvert->Cb_b_tab;
45
495k
  register JLONG *Crgtab = cconvert->Cr_g_tab;
46
495k
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
47
495k
  SHIFT_TEMPS
48
49
1.57M
  while (--num_rows >= 0) {
50
1.08M
    inptr0 = input_buf[0][input_row];
51
1.08M
    inptr1 = input_buf[1][input_row];
52
1.08M
    inptr2 = input_buf[2][input_row];
53
1.08M
    input_row++;
54
1.08M
    outptr = *output_buf++;
55
18.5M
    for (col = 0; col < num_cols; col++) {
56
17.4M
      y  = inptr0[col];
57
17.4M
      cb = inptr1[col];
58
17.4M
      cr = inptr2[col];
59
      /* Range-limiting is essential due to noise introduced by DCT losses. */
60
17.4M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
61
17.4M
      outptr[RGB_GREEN] = range_limit[y +
62
17.4M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
63
17.4M
                                                SCALEBITS))];
64
17.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
17.4M
#ifdef RGB_ALPHA
68
17.4M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
69
17.4M
#endif
70
17.4M
      outptr += RGB_PIXELSIZE;
71
17.4M
    }
72
1.08M
  }
73
#else
74
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
75
#endif
76
495k
}
jdcolor-12.c:ycc_extxbgr_convert
Line
Count
Source
33
124k
{
34
124k
#if BITS_IN_JSAMPLE != 16
35
124k
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
36
124k
  register int y, cb, cr;
37
124k
  register _JSAMPROW outptr;
38
124k
  register _JSAMPROW inptr0, inptr1, inptr2;
39
124k
  register JDIMENSION col;
40
124k
  JDIMENSION num_cols = cinfo->output_width;
41
  /* copy these pointers into registers if possible */
42
124k
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
43
124k
  register int *Crrtab = cconvert->Cr_r_tab;
44
124k
  register int *Cbbtab = cconvert->Cb_b_tab;
45
124k
  register JLONG *Crgtab = cconvert->Cr_g_tab;
46
124k
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
47
124k
  SHIFT_TEMPS
48
49
395k
  while (--num_rows >= 0) {
50
271k
    inptr0 = input_buf[0][input_row];
51
271k
    inptr1 = input_buf[1][input_row];
52
271k
    inptr2 = input_buf[2][input_row];
53
271k
    input_row++;
54
271k
    outptr = *output_buf++;
55
1.72M
    for (col = 0; col < num_cols; col++) {
56
1.45M
      y  = inptr0[col];
57
1.45M
      cb = inptr1[col];
58
1.45M
      cr = inptr2[col];
59
      /* Range-limiting is essential due to noise introduced by DCT losses. */
60
1.45M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
61
1.45M
      outptr[RGB_GREEN] = range_limit[y +
62
1.45M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
63
1.45M
                                                SCALEBITS))];
64
1.45M
      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.45M
#ifdef RGB_ALPHA
68
1.45M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
69
1.45M
#endif
70
1.45M
      outptr += RGB_PIXELSIZE;
71
1.45M
    }
72
271k
  }
73
#else
74
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
75
#endif
76
124k
}
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.55M
{
90
7.55M
  register _JSAMPROW inptr, outptr;
91
7.55M
  register JDIMENSION col;
92
7.55M
  JDIMENSION num_cols = cinfo->output_width;
93
94
19.4M
  while (--num_rows >= 0) {
95
11.8M
    inptr = input_buf[0][input_row++];
96
11.8M
    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
176M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
#endif
104
1.18G
      outptr += RGB_PIXELSIZE;
105
1.18G
    }
106
11.8M
  }
107
7.55M
}
jdcolor-8.c:gray_extrgb_convert
Line
Count
Source
89
2.47M
{
90
2.47M
  register _JSAMPROW inptr, outptr;
91
2.47M
  register JDIMENSION col;
92
2.47M
  JDIMENSION num_cols = cinfo->output_width;
93
94
6.28M
  while (--num_rows >= 0) {
95
3.80M
    inptr = input_buf[0][input_row++];
96
3.80M
    outptr = *output_buf++;
97
561M
    for (col = 0; col < num_cols; col++) {
98
557M
      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
557M
      outptr += RGB_PIXELSIZE;
105
557M
    }
106
3.80M
  }
107
2.47M
}
jdcolor-8.c:gray_extrgbx_convert
Line
Count
Source
89
226k
{
90
226k
  register _JSAMPROW inptr, outptr;
91
226k
  register JDIMENSION col;
92
226k
  JDIMENSION num_cols = cinfo->output_width;
93
94
452k
  while (--num_rows >= 0) {
95
226k
    inptr = input_buf[0][input_row++];
96
226k
    outptr = *output_buf++;
97
11.4M
    for (col = 0; col < num_cols; col++) {
98
11.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
11.2M
#ifdef RGB_ALPHA
102
11.2M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
11.2M
#endif
104
11.2M
      outptr += RGB_PIXELSIZE;
105
11.2M
    }
106
226k
  }
107
226k
}
jdcolor-8.c:gray_extbgr_convert
Line
Count
Source
89
301k
{
90
301k
  register _JSAMPROW inptr, outptr;
91
301k
  register JDIMENSION col;
92
301k
  JDIMENSION num_cols = cinfo->output_width;
93
94
602k
  while (--num_rows >= 0) {
95
301k
    inptr = input_buf[0][input_row++];
96
301k
    outptr = *output_buf++;
97
19.5M
    for (col = 0; col < num_cols; col++) {
98
19.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
#ifdef RGB_ALPHA
102
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
#endif
104
19.2M
      outptr += RGB_PIXELSIZE;
105
19.2M
    }
106
301k
  }
107
301k
}
jdcolor-8.c:gray_extbgrx_convert
Line
Count
Source
89
1.12M
{
90
1.12M
  register _JSAMPROW inptr, outptr;
91
1.12M
  register JDIMENSION col;
92
1.12M
  JDIMENSION num_cols = cinfo->output_width;
93
94
2.87M
  while (--num_rows >= 0) {
95
1.74M
    inptr = input_buf[0][input_row++];
96
1.74M
    outptr = *output_buf++;
97
86.3M
    for (col = 0; col < num_cols; col++) {
98
84.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
84.5M
#ifdef RGB_ALPHA
102
84.5M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
84.5M
#endif
104
84.5M
      outptr += RGB_PIXELSIZE;
105
84.5M
    }
106
1.74M
  }
107
1.12M
}
jdcolor-8.c:gray_extxbgr_convert
Line
Count
Source
89
306k
{
90
306k
  register _JSAMPROW inptr, outptr;
91
306k
  register JDIMENSION col;
92
306k
  JDIMENSION num_cols = cinfo->output_width;
93
94
776k
  while (--num_rows >= 0) {
95
470k
    inptr = input_buf[0][input_row++];
96
470k
    outptr = *output_buf++;
97
9.70M
    for (col = 0; col < num_cols; col++) {
98
9.23M
      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.23M
#ifdef RGB_ALPHA
102
9.23M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
9.23M
#endif
104
9.23M
      outptr += RGB_PIXELSIZE;
105
9.23M
    }
106
470k
  }
107
306k
}
jdcolor-8.c:gray_extxrgb_convert
Line
Count
Source
89
75.3k
{
90
75.3k
  register _JSAMPROW inptr, outptr;
91
75.3k
  register JDIMENSION col;
92
75.3k
  JDIMENSION num_cols = cinfo->output_width;
93
94
150k
  while (--num_rows >= 0) {
95
75.3k
    inptr = input_buf[0][input_row++];
96
75.3k
    outptr = *output_buf++;
97
1.41M
    for (col = 0; col < num_cols; col++) {
98
1.34M
      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.34M
#ifdef RGB_ALPHA
102
1.34M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
1.34M
#endif
104
1.34M
      outptr += RGB_PIXELSIZE;
105
1.34M
    }
106
75.3k
  }
107
75.3k
}
jdcolor-12.c:gray_extrgb_convert
Line
Count
Source
89
1.89M
{
90
1.89M
  register _JSAMPROW inptr, outptr;
91
1.89M
  register JDIMENSION col;
92
1.89M
  JDIMENSION num_cols = cinfo->output_width;
93
94
5.15M
  while (--num_rows >= 0) {
95
3.26M
    inptr = input_buf[0][input_row++];
96
3.26M
    outptr = *output_buf++;
97
432M
    for (col = 0; col < num_cols; col++) {
98
429M
      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
429M
      outptr += RGB_PIXELSIZE;
105
429M
    }
106
3.26M
  }
107
1.89M
}
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
905k
{
90
905k
  register _JSAMPROW inptr, outptr;
91
905k
  register JDIMENSION col;
92
905k
  JDIMENSION num_cols = cinfo->output_width;
93
94
2.46M
  while (--num_rows >= 0) {
95
1.55M
    inptr = input_buf[0][input_row++];
96
1.55M
    outptr = *output_buf++;
97
64.2M
    for (col = 0; col < num_cols; col++) {
98
62.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
62.6M
#ifdef RGB_ALPHA
102
62.6M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
62.6M
#endif
104
62.6M
      outptr += RGB_PIXELSIZE;
105
62.6M
    }
106
1.55M
  }
107
905k
}
jdcolor-12.c:gray_extxbgr_convert
Line
Count
Source
89
236k
{
90
236k
  register _JSAMPROW inptr, outptr;
91
236k
  register JDIMENSION col;
92
236k
  JDIMENSION num_cols = cinfo->output_width;
93
94
643k
  while (--num_rows >= 0) {
95
407k
    inptr = input_buf[0][input_row++];
96
407k
    outptr = *output_buf++;
97
7.55M
    for (col = 0; col < num_cols; col++) {
98
7.15M
      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.15M
#ifdef RGB_ALPHA
102
7.15M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
103
7.15M
#endif
104
7.15M
      outptr += RGB_PIXELSIZE;
105
7.15M
    }
106
407k
  }
107
236k
}
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.96M
{
119
2.96M
  register _JSAMPROW inptr0, inptr1, inptr2;
120
2.96M
  register _JSAMPROW outptr;
121
2.96M
  register JDIMENSION col;
122
2.96M
  JDIMENSION num_cols = cinfo->output_width;
123
124
7.31M
  while (--num_rows >= 0) {
125
4.34M
    inptr0 = input_buf[0][input_row];
126
4.34M
    inptr1 = input_buf[1][input_row];
127
4.34M
    inptr2 = input_buf[2][input_row];
128
4.34M
    input_row++;
129
4.34M
    outptr = *output_buf++;
130
132M
    for (col = 0; col < num_cols; col++) {
131
128M
      outptr[RGB_RED] = inptr0[col];
132
128M
      outptr[RGB_GREEN] = inptr1[col];
133
128M
      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
84.6M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
#endif
139
128M
      outptr += RGB_PIXELSIZE;
140
128M
    }
141
4.34M
  }
142
2.96M
}
Unexecuted instantiation: jdcolor-8.c:rgb_extrgb_convert
jdcolor-8.c:rgb_extrgbx_convert
Line
Count
Source
118
12.6k
{
119
12.6k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
12.6k
  register _JSAMPROW outptr;
121
12.6k
  register JDIMENSION col;
122
12.6k
  JDIMENSION num_cols = cinfo->output_width;
123
124
37.4k
  while (--num_rows >= 0) {
125
24.8k
    inptr0 = input_buf[0][input_row];
126
24.8k
    inptr1 = input_buf[1][input_row];
127
24.8k
    inptr2 = input_buf[2][input_row];
128
24.8k
    input_row++;
129
24.8k
    outptr = *output_buf++;
130
4.79M
    for (col = 0; col < num_cols; col++) {
131
4.77M
      outptr[RGB_RED] = inptr0[col];
132
4.77M
      outptr[RGB_GREEN] = inptr1[col];
133
4.77M
      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.77M
#ifdef RGB_ALPHA
137
4.77M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
4.77M
#endif
139
4.77M
      outptr += RGB_PIXELSIZE;
140
4.77M
    }
141
24.8k
  }
142
12.6k
}
jdcolor-8.c:rgb_extbgr_convert
Line
Count
Source
118
1.65M
{
119
1.65M
  register _JSAMPROW inptr0, inptr1, inptr2;
120
1.65M
  register _JSAMPROW outptr;
121
1.65M
  register JDIMENSION col;
122
1.65M
  JDIMENSION num_cols = cinfo->output_width;
123
124
3.43M
  while (--num_rows >= 0) {
125
1.78M
    inptr0 = input_buf[0][input_row];
126
1.78M
    inptr1 = input_buf[1][input_row];
127
1.78M
    inptr2 = input_buf[2][input_row];
128
1.78M
    input_row++;
129
1.78M
    outptr = *output_buf++;
130
45.7M
    for (col = 0; col < num_cols; col++) {
131
43.9M
      outptr[RGB_RED] = inptr0[col];
132
43.9M
      outptr[RGB_GREEN] = inptr1[col];
133
43.9M
      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
43.9M
      outptr += RGB_PIXELSIZE;
140
43.9M
    }
141
1.78M
  }
142
1.65M
}
jdcolor-8.c:rgb_extbgrx_convert
Line
Count
Source
118
202k
{
119
202k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
202k
  register _JSAMPROW outptr;
121
202k
  register JDIMENSION col;
122
202k
  JDIMENSION num_cols = cinfo->output_width;
123
124
688k
  while (--num_rows >= 0) {
125
485k
    inptr0 = input_buf[0][input_row];
126
485k
    inptr1 = input_buf[1][input_row];
127
485k
    inptr2 = input_buf[2][input_row];
128
485k
    input_row++;
129
485k
    outptr = *output_buf++;
130
9.60M
    for (col = 0; col < num_cols; col++) {
131
9.11M
      outptr[RGB_RED] = inptr0[col];
132
9.11M
      outptr[RGB_GREEN] = inptr1[col];
133
9.11M
      outptr[RGB_BLUE] = inptr2[col];
134
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
135
      /* opaque alpha channel value */
136
9.11M
#ifdef RGB_ALPHA
137
9.11M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
9.11M
#endif
139
9.11M
      outptr += RGB_PIXELSIZE;
140
9.11M
    }
141
485k
  }
142
202k
}
jdcolor-8.c:rgb_extxbgr_convert
Line
Count
Source
118
172k
{
119
172k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
172k
  register _JSAMPROW outptr;
121
172k
  register JDIMENSION col;
122
172k
  JDIMENSION num_cols = cinfo->output_width;
123
124
573k
  while (--num_rows >= 0) {
125
401k
    inptr0 = input_buf[0][input_row];
126
401k
    inptr1 = input_buf[1][input_row];
127
401k
    inptr2 = input_buf[2][input_row];
128
401k
    input_row++;
129
401k
    outptr = *output_buf++;
130
8.52M
    for (col = 0; col < num_cols; col++) {
131
8.12M
      outptr[RGB_RED] = inptr0[col];
132
8.12M
      outptr[RGB_GREEN] = inptr1[col];
133
8.12M
      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.12M
#ifdef RGB_ALPHA
137
8.12M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
8.12M
#endif
139
8.12M
      outptr += RGB_PIXELSIZE;
140
8.12M
    }
141
401k
  }
142
172k
}
jdcolor-8.c:rgb_extxrgb_convert
Line
Count
Source
118
4.22k
{
119
4.22k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
4.22k
  register _JSAMPROW outptr;
121
4.22k
  register JDIMENSION col;
122
4.22k
  JDIMENSION num_cols = cinfo->output_width;
123
124
12.5k
  while (--num_rows >= 0) {
125
8.28k
    inptr0 = input_buf[0][input_row];
126
8.28k
    inptr1 = input_buf[1][input_row];
127
8.28k
    inptr2 = input_buf[2][input_row];
128
8.28k
    input_row++;
129
8.28k
    outptr = *output_buf++;
130
586k
    for (col = 0; col < num_cols; col++) {
131
578k
      outptr[RGB_RED] = inptr0[col];
132
578k
      outptr[RGB_GREEN] = inptr1[col];
133
578k
      outptr[RGB_BLUE] = inptr2[col];
134
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
135
      /* opaque alpha channel value */
136
578k
#ifdef RGB_ALPHA
137
578k
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
578k
#endif
139
578k
      outptr += RGB_PIXELSIZE;
140
578k
    }
141
8.28k
  }
142
4.22k
}
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
239k
{
119
239k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
239k
  register _JSAMPROW outptr;
121
239k
  register JDIMENSION col;
122
239k
  JDIMENSION num_cols = cinfo->output_width;
123
124
696k
  while (--num_rows >= 0) {
125
456k
    inptr0 = input_buf[0][input_row];
126
456k
    inptr1 = input_buf[1][input_row];
127
456k
    inptr2 = input_buf[2][input_row];
128
456k
    input_row++;
129
456k
    outptr = *output_buf++;
130
16.0M
    for (col = 0; col < num_cols; col++) {
131
15.5M
      outptr[RGB_RED] = inptr0[col];
132
15.5M
      outptr[RGB_GREEN] = inptr1[col];
133
15.5M
      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.5M
#ifdef RGB_ALPHA
137
15.5M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
15.5M
#endif
139
15.5M
      outptr += RGB_PIXELSIZE;
140
15.5M
    }
141
456k
  }
142
239k
}
jdcolor-12.c:rgb_extxbgr_convert
Line
Count
Source
118
183k
{
119
183k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
183k
  register _JSAMPROW outptr;
121
183k
  register JDIMENSION col;
122
183k
  JDIMENSION num_cols = cinfo->output_width;
123
124
481k
  while (--num_rows >= 0) {
125
298k
    inptr0 = input_buf[0][input_row];
126
298k
    inptr1 = input_buf[1][input_row];
127
298k
    inptr2 = input_buf[2][input_row];
128
298k
    input_row++;
129
298k
    outptr = *output_buf++;
130
12.3M
    for (col = 0; col < num_cols; col++) {
131
12.0M
      outptr[RGB_RED] = inptr0[col];
132
12.0M
      outptr[RGB_GREEN] = inptr1[col];
133
12.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
12.0M
#ifdef RGB_ALPHA
137
12.0M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
12.0M
#endif
139
12.0M
      outptr += RGB_PIXELSIZE;
140
12.0M
    }
141
298k
  }
142
183k
}
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
251k
{
119
251k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
251k
  register _JSAMPROW outptr;
121
251k
  register JDIMENSION col;
122
251k
  JDIMENSION num_cols = cinfo->output_width;
123
124
695k
  while (--num_rows >= 0) {
125
444k
    inptr0 = input_buf[0][input_row];
126
444k
    inptr1 = input_buf[1][input_row];
127
444k
    inptr2 = input_buf[2][input_row];
128
444k
    input_row++;
129
444k
    outptr = *output_buf++;
130
17.6M
    for (col = 0; col < num_cols; col++) {
131
17.1M
      outptr[RGB_RED] = inptr0[col];
132
17.1M
      outptr[RGB_GREEN] = inptr1[col];
133
17.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
17.1M
#ifdef RGB_ALPHA
137
17.1M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
17.1M
#endif
139
17.1M
      outptr += RGB_PIXELSIZE;
140
17.1M
    }
141
444k
  }
142
251k
}
jdcolor-16.c:rgb_extxbgr_convert
Line
Count
Source
118
251k
{
119
251k
  register _JSAMPROW inptr0, inptr1, inptr2;
120
251k
  register _JSAMPROW outptr;
121
251k
  register JDIMENSION col;
122
251k
  JDIMENSION num_cols = cinfo->output_width;
123
124
695k
  while (--num_rows >= 0) {
125
444k
    inptr0 = input_buf[0][input_row];
126
444k
    inptr1 = input_buf[1][input_row];
127
444k
    inptr2 = input_buf[2][input_row];
128
444k
    input_row++;
129
444k
    outptr = *output_buf++;
130
17.6M
    for (col = 0; col < num_cols; col++) {
131
17.1M
      outptr[RGB_RED] = inptr0[col];
132
17.1M
      outptr[RGB_GREEN] = inptr1[col];
133
17.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
17.1M
#ifdef RGB_ALPHA
137
17.1M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
138
17.1M
#endif
139
17.1M
      outptr += RGB_PIXELSIZE;
140
17.1M
    }
141
444k
  }
142
251k
}
Unexecuted instantiation: jdcolor-16.c:rgb_extxrgb_convert