Coverage Report

Created: 2026-03-12 08:02

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, 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_internal(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
32
                         JDIMENSION input_row, _JSAMPARRAY output_buf,
33
                         int num_rows)
34
1.21M
{
35
#if BITS_IN_JSAMPLE != 16
36
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
37
  register int y, cb, cr;
38
  register _JSAMPROW outptr;
39
  register _JSAMPROW inptr0, inptr1, inptr2;
40
  register JDIMENSION col;
41
  JDIMENSION num_cols = cinfo->output_width;
42
  /* copy these pointers into registers if possible */
43
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
44
  register int *Crrtab = cconvert->Cr_r_tab;
45
  register int *Cbbtab = cconvert->Cb_b_tab;
46
  register JLONG *Crgtab = cconvert->Cr_g_tab;
47
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
48
  SHIFT_TEMPS
49
50
3.74M
  while (--num_rows >= 0) {
51
2.53M
    inptr0 = input_buf[0][input_row];
52
2.53M
    inptr1 = input_buf[1][input_row];
53
2.53M
    inptr2 = input_buf[2][input_row];
54
2.53M
    input_row++;
55
2.53M
    outptr = *output_buf++;
56
62.6M
    for (col = 0; col < num_cols; col++) {
57
60.1M
      y  = inptr0[col];
58
60.1M
      cb = inptr1[col];
59
60.1M
      cr = inptr2[col];
60
      /* Range-limiting is essential due to noise introduced by DCT losses. */
61
60.1M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
62
60.1M
      outptr[RGB_GREEN] = range_limit[y +
63
60.1M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
64
60.1M
                                                SCALEBITS))];
65
60.1M
      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
66
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
67
      /* opaque alpha channel value */
68
#ifdef RGB_ALPHA
69
20.4M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
70
#endif
71
60.1M
      outptr += RGB_PIXELSIZE;
72
60.1M
    }
73
2.53M
  }
74
#else
75
0
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
76
#endif
77
1.21M
}
Unexecuted instantiation: jdcolor-8.c:ycc_extrgb_convert_internal
Unexecuted instantiation: jdcolor-8.c:ycc_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-8.c:ycc_extbgr_convert_internal
Unexecuted instantiation: jdcolor-8.c:ycc_extbgrx_convert_internal
Unexecuted instantiation: jdcolor-8.c:ycc_extxbgr_convert_internal
Unexecuted instantiation: jdcolor-8.c:ycc_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-8.c:ycc_rgb_convert_internal
jdcolor-12.c:ycc_extrgb_convert_internal
Line
Count
Source
34
518k
{
35
518k
#if BITS_IN_JSAMPLE != 16
36
518k
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
37
518k
  register int y, cb, cr;
38
518k
  register _JSAMPROW outptr;
39
518k
  register _JSAMPROW inptr0, inptr1, inptr2;
40
518k
  register JDIMENSION col;
41
518k
  JDIMENSION num_cols = cinfo->output_width;
42
  /* copy these pointers into registers if possible */
43
518k
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
44
518k
  register int *Crrtab = cconvert->Cr_r_tab;
45
518k
  register int *Cbbtab = cconvert->Cb_b_tab;
46
518k
  register JLONG *Crgtab = cconvert->Cr_g_tab;
47
518k
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
48
518k
  SHIFT_TEMPS
49
50
1.67M
  while (--num_rows >= 0) {
51
1.15M
    inptr0 = input_buf[0][input_row];
52
1.15M
    inptr1 = input_buf[1][input_row];
53
1.15M
    inptr2 = input_buf[2][input_row];
54
1.15M
    input_row++;
55
1.15M
    outptr = *output_buf++;
56
40.8M
    for (col = 0; col < num_cols; col++) {
57
39.6M
      y  = inptr0[col];
58
39.6M
      cb = inptr1[col];
59
39.6M
      cr = inptr2[col];
60
      /* Range-limiting is essential due to noise introduced by DCT losses. */
61
39.6M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
62
39.6M
      outptr[RGB_GREEN] = range_limit[y +
63
39.6M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
64
39.6M
                                                SCALEBITS))];
65
39.6M
      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
66
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
67
      /* opaque alpha channel value */
68
#ifdef RGB_ALPHA
69
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
70
#endif
71
39.6M
      outptr += RGB_PIXELSIZE;
72
39.6M
    }
73
1.15M
  }
74
#else
75
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
76
#endif
77
518k
}
Unexecuted instantiation: jdcolor-12.c:ycc_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-12.c:ycc_extbgr_convert_internal
jdcolor-12.c:ycc_extbgrx_convert_internal
Line
Count
Source
34
559k
{
35
559k
#if BITS_IN_JSAMPLE != 16
36
559k
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
37
559k
  register int y, cb, cr;
38
559k
  register _JSAMPROW outptr;
39
559k
  register _JSAMPROW inptr0, inptr1, inptr2;
40
559k
  register JDIMENSION col;
41
559k
  JDIMENSION num_cols = cinfo->output_width;
42
  /* copy these pointers into registers if possible */
43
559k
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
44
559k
  register int *Crrtab = cconvert->Cr_r_tab;
45
559k
  register int *Cbbtab = cconvert->Cb_b_tab;
46
559k
  register JLONG *Crgtab = cconvert->Cr_g_tab;
47
559k
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
48
559k
  SHIFT_TEMPS
49
50
1.65M
  while (--num_rows >= 0) {
51
1.09M
    inptr0 = input_buf[0][input_row];
52
1.09M
    inptr1 = input_buf[1][input_row];
53
1.09M
    inptr2 = input_buf[2][input_row];
54
1.09M
    input_row++;
55
1.09M
    outptr = *output_buf++;
56
19.9M
    for (col = 0; col < num_cols; col++) {
57
18.8M
      y  = inptr0[col];
58
18.8M
      cb = inptr1[col];
59
18.8M
      cr = inptr2[col];
60
      /* Range-limiting is essential due to noise introduced by DCT losses. */
61
18.8M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
62
18.8M
      outptr[RGB_GREEN] = range_limit[y +
63
18.8M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
64
18.8M
                                                SCALEBITS))];
65
18.8M
      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
66
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
67
      /* opaque alpha channel value */
68
18.8M
#ifdef RGB_ALPHA
69
18.8M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
70
18.8M
#endif
71
18.8M
      outptr += RGB_PIXELSIZE;
72
18.8M
    }
73
1.09M
  }
74
#else
75
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
76
#endif
77
559k
}
jdcolor-12.c:ycc_extxbgr_convert_internal
Line
Count
Source
34
140k
{
35
140k
#if BITS_IN_JSAMPLE != 16
36
140k
  my_cconvert_ptr cconvert = (my_cconvert_ptr)cinfo->cconvert;
37
140k
  register int y, cb, cr;
38
140k
  register _JSAMPROW outptr;
39
140k
  register _JSAMPROW inptr0, inptr1, inptr2;
40
140k
  register JDIMENSION col;
41
140k
  JDIMENSION num_cols = cinfo->output_width;
42
  /* copy these pointers into registers if possible */
43
140k
  register _JSAMPLE *range_limit = (_JSAMPLE *)cinfo->sample_range_limit;
44
140k
  register int *Crrtab = cconvert->Cr_r_tab;
45
140k
  register int *Cbbtab = cconvert->Cb_b_tab;
46
140k
  register JLONG *Crgtab = cconvert->Cr_g_tab;
47
140k
  register JLONG *Cbgtab = cconvert->Cb_g_tab;
48
140k
  SHIFT_TEMPS
49
50
415k
  while (--num_rows >= 0) {
51
275k
    inptr0 = input_buf[0][input_row];
52
275k
    inptr1 = input_buf[1][input_row];
53
275k
    inptr2 = input_buf[2][input_row];
54
275k
    input_row++;
55
275k
    outptr = *output_buf++;
56
1.80M
    for (col = 0; col < num_cols; col++) {
57
1.52M
      y  = inptr0[col];
58
1.52M
      cb = inptr1[col];
59
1.52M
      cr = inptr2[col];
60
      /* Range-limiting is essential due to noise introduced by DCT losses. */
61
1.52M
      outptr[RGB_RED] =   range_limit[y + Crrtab[cr]];
62
1.52M
      outptr[RGB_GREEN] = range_limit[y +
63
1.52M
                              ((int)RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
64
1.52M
                                                SCALEBITS))];
65
1.52M
      outptr[RGB_BLUE] =  range_limit[y + Cbbtab[cb]];
66
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
67
      /* opaque alpha channel value */
68
1.52M
#ifdef RGB_ALPHA
69
1.52M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
70
1.52M
#endif
71
1.52M
      outptr += RGB_PIXELSIZE;
72
1.52M
    }
73
275k
  }
74
#else
75
  ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL);
76
#endif
77
140k
}
Unexecuted instantiation: jdcolor-12.c:ycc_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-12.c:ycc_rgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_extrgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_extbgr_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_extbgrx_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_extxbgr_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:ycc_rgb_convert_internal
78
79
80
/*
81
 * Convert grayscale to RGB: just duplicate the graylevel three times.
82
 * This is provided to support applications that don't want to cope
83
 * with grayscale as a separate case.
84
 */
85
86
INLINE
87
LOCAL(void)
88
gray_rgb_convert_internal(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
89
                          JDIMENSION input_row, _JSAMPARRAY output_buf,
90
                          int num_rows)
91
7.99M
{
92
7.99M
  register _JSAMPROW inptr, outptr;
93
7.99M
  register JDIMENSION col;
94
7.99M
  JDIMENSION num_cols = cinfo->output_width;
95
96
20.3M
  while (--num_rows >= 0) {
97
12.3M
    inptr = input_buf[0][input_row++];
98
12.3M
    outptr = *output_buf++;
99
1.05G
    for (col = 0; col < num_cols; col++) {
100
1.04G
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
#ifdef RGB_ALPHA
104
158M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
#endif
106
1.04G
      outptr += RGB_PIXELSIZE;
107
1.04G
    }
108
12.3M
  }
109
7.99M
}
jdcolor-8.c:gray_extrgb_convert_internal
Line
Count
Source
91
2.83M
{
92
2.83M
  register _JSAMPROW inptr, outptr;
93
2.83M
  register JDIMENSION col;
94
2.83M
  JDIMENSION num_cols = cinfo->output_width;
95
96
6.96M
  while (--num_rows >= 0) {
97
4.13M
    inptr = input_buf[0][input_row++];
98
4.13M
    outptr = *output_buf++;
99
506M
    for (col = 0; col < num_cols; col++) {
100
501M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
#ifdef RGB_ALPHA
104
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
#endif
106
501M
      outptr += RGB_PIXELSIZE;
107
501M
    }
108
4.13M
  }
109
2.83M
}
jdcolor-8.c:gray_extrgbx_convert_internal
Line
Count
Source
91
240k
{
92
240k
  register _JSAMPROW inptr, outptr;
93
240k
  register JDIMENSION col;
94
240k
  JDIMENSION num_cols = cinfo->output_width;
95
96
481k
  while (--num_rows >= 0) {
97
240k
    inptr = input_buf[0][input_row++];
98
240k
    outptr = *output_buf++;
99
13.4M
    for (col = 0; col < num_cols; col++) {
100
13.2M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
13.2M
#ifdef RGB_ALPHA
104
13.2M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
13.2M
#endif
106
13.2M
      outptr += RGB_PIXELSIZE;
107
13.2M
    }
108
240k
  }
109
240k
}
jdcolor-8.c:gray_extbgr_convert_internal
Line
Count
Source
91
321k
{
92
321k
  register _JSAMPROW inptr, outptr;
93
321k
  register JDIMENSION col;
94
321k
  JDIMENSION num_cols = cinfo->output_width;
95
96
642k
  while (--num_rows >= 0) {
97
321k
    inptr = input_buf[0][input_row++];
98
321k
    outptr = *output_buf++;
99
23.1M
    for (col = 0; col < num_cols; col++) {
100
22.8M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
#ifdef RGB_ALPHA
104
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
#endif
106
22.8M
      outptr += RGB_PIXELSIZE;
107
22.8M
    }
108
321k
  }
109
321k
}
jdcolor-8.c:gray_extbgrx_convert_internal
Line
Count
Source
91
1.33M
{
92
1.33M
  register _JSAMPROW inptr, outptr;
93
1.33M
  register JDIMENSION col;
94
1.33M
  JDIMENSION num_cols = cinfo->output_width;
95
96
3.27M
  while (--num_rows >= 0) {
97
1.94M
    inptr = input_buf[0][input_row++];
98
1.94M
    outptr = *output_buf++;
99
79.1M
    for (col = 0; col < num_cols; col++) {
100
77.1M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
77.1M
#ifdef RGB_ALPHA
104
77.1M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
77.1M
#endif
106
77.1M
      outptr += RGB_PIXELSIZE;
107
77.1M
    }
108
1.94M
  }
109
1.33M
}
jdcolor-8.c:gray_extxbgr_convert_internal
Line
Count
Source
91
351k
{
92
351k
  register _JSAMPROW inptr, outptr;
93
351k
  register JDIMENSION col;
94
351k
  JDIMENSION num_cols = cinfo->output_width;
95
96
864k
  while (--num_rows >= 0) {
97
512k
    inptr = input_buf[0][input_row++];
98
512k
    outptr = *output_buf++;
99
8.93M
    for (col = 0; col < num_cols; col++) {
100
8.42M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
8.42M
#ifdef RGB_ALPHA
104
8.42M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
8.42M
#endif
106
8.42M
      outptr += RGB_PIXELSIZE;
107
8.42M
    }
108
512k
  }
109
351k
}
jdcolor-8.c:gray_extxrgb_convert_internal
Line
Count
Source
91
80.2k
{
92
80.2k
  register _JSAMPROW inptr, outptr;
93
80.2k
  register JDIMENSION col;
94
80.2k
  JDIMENSION num_cols = cinfo->output_width;
95
96
160k
  while (--num_rows >= 0) {
97
80.2k
    inptr = input_buf[0][input_row++];
98
80.2k
    outptr = *output_buf++;
99
1.64M
    for (col = 0; col < num_cols; col++) {
100
1.56M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
1.56M
#ifdef RGB_ALPHA
104
1.56M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
1.56M
#endif
106
1.56M
      outptr += RGB_PIXELSIZE;
107
1.56M
    }
108
80.2k
  }
109
80.2k
}
Unexecuted instantiation: jdcolor-8.c:gray_rgb_convert_internal
jdcolor-12.c:gray_extrgb_convert_internal
Line
Count
Source
91
1.76M
{
92
1.76M
  register _JSAMPROW inptr, outptr;
93
1.76M
  register JDIMENSION col;
94
1.76M
  JDIMENSION num_cols = cinfo->output_width;
95
96
4.94M
  while (--num_rows >= 0) {
97
3.18M
    inptr = input_buf[0][input_row++];
98
3.18M
    outptr = *output_buf++;
99
367M
    for (col = 0; col < num_cols; col++) {
100
363M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
#ifdef RGB_ALPHA
104
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
#endif
106
363M
      outptr += RGB_PIXELSIZE;
107
363M
    }
108
3.18M
  }
109
1.76M
}
Unexecuted instantiation: jdcolor-12.c:gray_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-12.c:gray_extbgr_convert_internal
jdcolor-12.c:gray_extbgrx_convert_internal
Line
Count
Source
91
856k
{
92
856k
  register _JSAMPROW inptr, outptr;
93
856k
  register JDIMENSION col;
94
856k
  JDIMENSION num_cols = cinfo->output_width;
95
96
2.40M
  while (--num_rows >= 0) {
97
1.55M
    inptr = input_buf[0][input_row++];
98
1.55M
    outptr = *output_buf++;
99
53.6M
    for (col = 0; col < num_cols; col++) {
100
52.0M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
52.0M
#ifdef RGB_ALPHA
104
52.0M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
52.0M
#endif
106
52.0M
      outptr += RGB_PIXELSIZE;
107
52.0M
    }
108
1.55M
  }
109
856k
}
jdcolor-12.c:gray_extxbgr_convert_internal
Line
Count
Source
91
220k
{
92
220k
  register _JSAMPROW inptr, outptr;
93
220k
  register JDIMENSION col;
94
220k
  JDIMENSION num_cols = cinfo->output_width;
95
96
619k
  while (--num_rows >= 0) {
97
398k
    inptr = input_buf[0][input_row++];
98
398k
    outptr = *output_buf++;
99
6.50M
    for (col = 0; col < num_cols; col++) {
100
6.10M
      outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col];
101
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
102
      /* opaque alpha channel value */
103
6.10M
#ifdef RGB_ALPHA
104
6.10M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
105
6.10M
#endif
106
6.10M
      outptr += RGB_PIXELSIZE;
107
6.10M
    }
108
398k
  }
109
220k
}
Unexecuted instantiation: jdcolor-12.c:gray_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-12.c:gray_rgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_extrgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_extbgr_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_extbgrx_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_extxbgr_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:gray_rgb_convert_internal
110
111
112
/*
113
 * Convert RGB to extended RGB: just swap the order of source pixels
114
 */
115
116
INLINE
117
LOCAL(void)
118
rgb_rgb_convert_internal(j_decompress_ptr cinfo, _JSAMPIMAGE input_buf,
119
                         JDIMENSION input_row, _JSAMPARRAY output_buf,
120
                         int num_rows)
121
2.32M
{
122
2.32M
  register _JSAMPROW inptr0, inptr1, inptr2;
123
2.32M
  register _JSAMPROW outptr;
124
2.32M
  register JDIMENSION col;
125
2.32M
  JDIMENSION num_cols = cinfo->output_width;
126
127
6.07M
  while (--num_rows >= 0) {
128
3.75M
    inptr0 = input_buf[0][input_row];
129
3.75M
    inptr1 = input_buf[1][input_row];
130
3.75M
    inptr2 = input_buf[2][input_row];
131
3.75M
    input_row++;
132
3.75M
    outptr = *output_buf++;
133
120M
    for (col = 0; col < num_cols; col++) {
134
116M
      outptr[RGB_RED] = inptr0[col];
135
116M
      outptr[RGB_GREEN] = inptr1[col];
136
116M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
#ifdef RGB_ALPHA
140
84.9M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
#endif
142
116M
      outptr += RGB_PIXELSIZE;
143
116M
    }
144
3.75M
  }
145
2.32M
}
Unexecuted instantiation: jdcolor-8.c:rgb_extrgb_convert_internal
jdcolor-8.c:rgb_extrgbx_convert_internal
Line
Count
Source
121
1.92k
{
122
1.92k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
1.92k
  register _JSAMPROW outptr;
124
1.92k
  register JDIMENSION col;
125
1.92k
  JDIMENSION num_cols = cinfo->output_width;
126
127
4.93k
  while (--num_rows >= 0) {
128
3.00k
    inptr0 = input_buf[0][input_row];
129
3.00k
    inptr1 = input_buf[1][input_row];
130
3.00k
    inptr2 = input_buf[2][input_row];
131
3.00k
    input_row++;
132
3.00k
    outptr = *output_buf++;
133
3.93M
    for (col = 0; col < num_cols; col++) {
134
3.92M
      outptr[RGB_RED] = inptr0[col];
135
3.92M
      outptr[RGB_GREEN] = inptr1[col];
136
3.92M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
3.92M
#ifdef RGB_ALPHA
140
3.92M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
3.92M
#endif
142
3.92M
      outptr += RGB_PIXELSIZE;
143
3.92M
    }
144
3.00k
  }
145
1.92k
}
jdcolor-8.c:rgb_extbgr_convert_internal
Line
Count
Source
121
1.09M
{
122
1.09M
  register _JSAMPROW inptr0, inptr1, inptr2;
123
1.09M
  register _JSAMPROW outptr;
124
1.09M
  register JDIMENSION col;
125
1.09M
  JDIMENSION num_cols = cinfo->output_width;
126
127
2.34M
  while (--num_rows >= 0) {
128
1.24M
    inptr0 = input_buf[0][input_row];
129
1.24M
    inptr1 = input_buf[1][input_row];
130
1.24M
    inptr2 = input_buf[2][input_row];
131
1.24M
    input_row++;
132
1.24M
    outptr = *output_buf++;
133
32.7M
    for (col = 0; col < num_cols; col++) {
134
31.4M
      outptr[RGB_RED] = inptr0[col];
135
31.4M
      outptr[RGB_GREEN] = inptr1[col];
136
31.4M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
#ifdef RGB_ALPHA
140
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
#endif
142
31.4M
      outptr += RGB_PIXELSIZE;
143
31.4M
    }
144
1.24M
  }
145
1.09M
}
jdcolor-8.c:rgb_extbgrx_convert_internal
Line
Count
Source
121
190k
{
122
190k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
190k
  register _JSAMPROW outptr;
124
190k
  register JDIMENSION col;
125
190k
  JDIMENSION num_cols = cinfo->output_width;
126
127
479k
  while (--num_rows >= 0) {
128
288k
    inptr0 = input_buf[0][input_row];
129
288k
    inptr1 = input_buf[1][input_row];
130
288k
    inptr2 = input_buf[2][input_row];
131
288k
    input_row++;
132
288k
    outptr = *output_buf++;
133
10.9M
    for (col = 0; col < num_cols; col++) {
134
10.6M
      outptr[RGB_RED] = inptr0[col];
135
10.6M
      outptr[RGB_GREEN] = inptr1[col];
136
10.6M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
10.6M
#ifdef RGB_ALPHA
140
10.6M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
10.6M
#endif
142
10.6M
      outptr += RGB_PIXELSIZE;
143
10.6M
    }
144
288k
  }
145
190k
}
jdcolor-8.c:rgb_extxbgr_convert_internal
Line
Count
Source
121
187k
{
122
187k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
187k
  register _JSAMPROW outptr;
124
187k
  register JDIMENSION col;
125
187k
  JDIMENSION num_cols = cinfo->output_width;
126
127
469k
  while (--num_rows >= 0) {
128
281k
    inptr0 = input_buf[0][input_row];
129
281k
    inptr1 = input_buf[1][input_row];
130
281k
    inptr2 = input_buf[2][input_row];
131
281k
    input_row++;
132
281k
    outptr = *output_buf++;
133
9.93M
    for (col = 0; col < num_cols; col++) {
134
9.65M
      outptr[RGB_RED] = inptr0[col];
135
9.65M
      outptr[RGB_GREEN] = inptr1[col];
136
9.65M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
9.65M
#ifdef RGB_ALPHA
140
9.65M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
9.65M
#endif
142
9.65M
      outptr += RGB_PIXELSIZE;
143
9.65M
    }
144
281k
  }
145
187k
}
jdcolor-8.c:rgb_extxrgb_convert_internal
Line
Count
Source
121
652
{
122
652
  register _JSAMPROW inptr0, inptr1, inptr2;
123
652
  register _JSAMPROW outptr;
124
652
  register JDIMENSION col;
125
652
  JDIMENSION num_cols = cinfo->output_width;
126
127
1.66k
  while (--num_rows >= 0) {
128
1.01k
    inptr0 = input_buf[0][input_row];
129
1.01k
    inptr1 = input_buf[1][input_row];
130
1.01k
    inptr2 = input_buf[2][input_row];
131
1.01k
    input_row++;
132
1.01k
    outptr = *output_buf++;
133
480k
    for (col = 0; col < num_cols; col++) {
134
478k
      outptr[RGB_RED] = inptr0[col];
135
478k
      outptr[RGB_GREEN] = inptr1[col];
136
478k
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
478k
#ifdef RGB_ALPHA
140
478k
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
478k
#endif
142
478k
      outptr += RGB_PIXELSIZE;
143
478k
    }
144
1.01k
  }
145
652
}
Unexecuted instantiation: jdcolor-8.c:rgb_rgb_convert_internal
Unexecuted instantiation: jdcolor-12.c:rgb_extrgb_convert_internal
Unexecuted instantiation: jdcolor-12.c:rgb_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-12.c:rgb_extbgr_convert_internal
jdcolor-12.c:rgb_extbgrx_convert_internal
Line
Count
Source
121
115k
{
122
115k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
115k
  register _JSAMPROW outptr;
124
115k
  register JDIMENSION col;
125
115k
  JDIMENSION num_cols = cinfo->output_width;
126
127
391k
  while (--num_rows >= 0) {
128
276k
    inptr0 = input_buf[0][input_row];
129
276k
    inptr1 = input_buf[1][input_row];
130
276k
    inptr2 = input_buf[2][input_row];
131
276k
    input_row++;
132
276k
    outptr = *output_buf++;
133
16.2M
    for (col = 0; col < num_cols; col++) {
134
16.0M
      outptr[RGB_RED] = inptr0[col];
135
16.0M
      outptr[RGB_GREEN] = inptr1[col];
136
16.0M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
16.0M
#ifdef RGB_ALPHA
140
16.0M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
16.0M
#endif
142
16.0M
      outptr += RGB_PIXELSIZE;
143
16.0M
    }
144
276k
  }
145
115k
}
jdcolor-12.c:rgb_extxbgr_convert_internal
Line
Count
Source
121
92.9k
{
122
92.9k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
92.9k
  register _JSAMPROW outptr;
124
92.9k
  register JDIMENSION col;
125
92.9k
  JDIMENSION num_cols = cinfo->output_width;
126
127
318k
  while (--num_rows >= 0) {
128
225k
    inptr0 = input_buf[0][input_row];
129
225k
    inptr1 = input_buf[1][input_row];
130
225k
    inptr2 = input_buf[2][input_row];
131
225k
    input_row++;
132
225k
    outptr = *output_buf++;
133
13.5M
    for (col = 0; col < num_cols; col++) {
134
13.3M
      outptr[RGB_RED] = inptr0[col];
135
13.3M
      outptr[RGB_GREEN] = inptr1[col];
136
13.3M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
13.3M
#ifdef RGB_ALPHA
140
13.3M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
13.3M
#endif
142
13.3M
      outptr += RGB_PIXELSIZE;
143
13.3M
    }
144
225k
  }
145
92.9k
}
Unexecuted instantiation: jdcolor-12.c:rgb_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-12.c:rgb_rgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:rgb_extrgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:rgb_extrgbx_convert_internal
Unexecuted instantiation: jdcolor-16.c:rgb_extbgr_convert_internal
jdcolor-16.c:rgb_extbgrx_convert_internal
Line
Count
Source
121
317k
{
122
317k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
317k
  register _JSAMPROW outptr;
124
317k
  register JDIMENSION col;
125
317k
  JDIMENSION num_cols = cinfo->output_width;
126
127
1.03M
  while (--num_rows >= 0) {
128
713k
    inptr0 = input_buf[0][input_row];
129
713k
    inptr1 = input_buf[1][input_row];
130
713k
    inptr2 = input_buf[2][input_row];
131
713k
    input_row++;
132
713k
    outptr = *output_buf++;
133
16.1M
    for (col = 0; col < num_cols; col++) {
134
15.4M
      outptr[RGB_RED] = inptr0[col];
135
15.4M
      outptr[RGB_GREEN] = inptr1[col];
136
15.4M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
15.4M
#ifdef RGB_ALPHA
140
15.4M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
15.4M
#endif
142
15.4M
      outptr += RGB_PIXELSIZE;
143
15.4M
    }
144
713k
  }
145
317k
}
jdcolor-16.c:rgb_extxbgr_convert_internal
Line
Count
Source
121
317k
{
122
317k
  register _JSAMPROW inptr0, inptr1, inptr2;
123
317k
  register _JSAMPROW outptr;
124
317k
  register JDIMENSION col;
125
317k
  JDIMENSION num_cols = cinfo->output_width;
126
127
1.03M
  while (--num_rows >= 0) {
128
713k
    inptr0 = input_buf[0][input_row];
129
713k
    inptr1 = input_buf[1][input_row];
130
713k
    inptr2 = input_buf[2][input_row];
131
713k
    input_row++;
132
713k
    outptr = *output_buf++;
133
16.1M
    for (col = 0; col < num_cols; col++) {
134
15.4M
      outptr[RGB_RED] = inptr0[col];
135
15.4M
      outptr[RGB_GREEN] = inptr1[col];
136
15.4M
      outptr[RGB_BLUE] = inptr2[col];
137
      /* Set unused byte to _MAXJSAMPLE so it can be interpreted as an */
138
      /* opaque alpha channel value */
139
15.4M
#ifdef RGB_ALPHA
140
15.4M
      outptr[RGB_ALPHA] = _MAXJSAMPLE;
141
15.4M
#endif
142
15.4M
      outptr += RGB_PIXELSIZE;
143
15.4M
    }
144
713k
  }
145
317k
}
Unexecuted instantiation: jdcolor-16.c:rgb_extxrgb_convert_internal
Unexecuted instantiation: jdcolor-16.c:rgb_rgb_convert_internal