ReactOS 0.4.15-dev-7907-g95bf896
jutils.c File Reference
#include "jinclude.h"
#include "jpeglib.h"
Include dependency graph for jutils.c:

Go to the source code of this file.

Macros

#define JPEG_INTERNALS
 
#define FMEMCOPY(dest, src, size)   MEMCOPY(dest,src,size)
 

Functions

 jdiv_round_up (long a, long b)
 
 jround_up (long a, long b)
 
 jcopy_sample_rows (JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
 
 jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks)
 

Variables

const int jpeg_natural_order [DCTSIZE2+16]
 
const int jpeg_natural_order7 [7 *7+16]
 
const int jpeg_natural_order6 [6 *6+16]
 
const int jpeg_natural_order5 [5 *5+16]
 
const int jpeg_natural_order4 [4 *4+16]
 
const int jpeg_natural_order3 [3 *3+16]
 
const int jpeg_natural_order2 [2 *2+16]
 

Macro Definition Documentation

◆ FMEMCOPY

#define FMEMCOPY (   dest,
  src,
  size 
)    MEMCOPY(dest,src,size)

Definition at line 152 of file jutils.c.

◆ JPEG_INTERNALS

#define JPEG_INTERNALS

Definition at line 15 of file jutils.c.

Function Documentation

◆ jcopy_block_row()

jcopy_block_row ( JBLOCKROW  input_row,
JBLOCKROW  output_row,
JDIMENSION  num_blocks 
)

Definition at line 211 of file jutils.c.

214{
215#ifdef FMEMCOPY
216 FMEMCOPY(output_row, input_row, (size_t) num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
217#else
218 register JCOEFPTR inptr, outptr;
219 register long count;
220
221 inptr = (JCOEFPTR) input_row;
222 outptr = (JCOEFPTR) output_row;
223 for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) {
224 *outptr++ = *inptr++;
225 }
226#endif
227}
#define SIZEOF(_ar)
Definition: calc.h:97
GLuint GLuint GLsizei count
Definition: gl.h:1545
short JCOEF
Definition: jmorecfg.h:151
JBLOCKROW output_row
Definition: jpegint.h:422
JBLOCKROW JDIMENSION num_blocks
Definition: jpegint.h:423
JCOEF FAR * JCOEFPTR
Definition: jpeglib.h:84
#define DCTSIZE2
Definition: jpeglib.h:51
#define FMEMCOPY(dest, src, size)
Definition: jutils.c:152

◆ jcopy_sample_rows()

jcopy_sample_rows ( JSAMPARRAY  input_array,
int  source_row,
JSAMPARRAY  output_array,
int  dest_row,
int  num_rows,
JDIMENSION  num_cols 
)

Definition at line 177 of file jutils.c.

185{
186 register JSAMPROW inptr, outptr;
187#ifdef FMEMCOPY
188 register size_t count = (size_t) num_cols * SIZEOF(JSAMPLE);
189#else
190 register JDIMENSION count;
191#endif
192 register int row;
193
194 input_array += source_row;
196
197 for (row = num_rows; row > 0; row--) {
198 inptr = *input_array++;
199 outptr = *output_array++;
200#ifdef FMEMCOPY
201 FMEMCOPY(outptr, inptr, count);
202#else
203 for (count = num_cols; count > 0; count--)
204 *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */
205#endif
206 }
207}
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
__kernel_size_t size_t
Definition: linux.h:237
unsigned int JDIMENSION
Definition: jmorecfg.h:229
char JSAMPLE
Definition: jmorecfg.h:74
int JSAMPARRAY int int num_rows
Definition: jpegint.h:421
int JSAMPARRAY int int JDIMENSION num_cols
Definition: jpegint.h:421
int JSAMPARRAY output_array
Definition: jpegint.h:420
int source_row
Definition: jpegint.h:419
int JSAMPARRAY int dest_row
Definition: jpegint.h:420
JSAMPLE FAR * JSAMPROW
Definition: jpeglib.h:75

Referenced by expand_bottom_edge(), fullsize_downsample(), grayscale_convert(), h2v2_upsample(), and int_upsample().

◆ jdiv_round_up()

jdiv_round_up ( long  a,
long  b 
)

Definition at line 124 of file jutils.c.

127{
128 return (a + b - 1L) / b;
129}
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define b
Definition: ke_i.h:79

Referenced by initial_setup(), jpeg_calc_jpeg_dimensions(), jpeg_calc_output_dimensions(), and per_scan_setup().

◆ jround_up()

jround_up ( long  a,
long  b 
)

Definition at line 133 of file jutils.c.

136{
137 a += b - 1L;
138 return a - (a % b);
139}

Referenced by jinit_c_coef_controller(), jinit_c_main_controller(), jinit_d_coef_controller(), jinit_d_post_controller(), and jinit_upsampler().

Variable Documentation

◆ jpeg_natural_order

const int jpeg_natural_order[DCTSIZE2+16]
Initial value:
= {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 7, 14, 21, 28,
35, 42, 49, 56, 57, 50, 43, 36,
29, 22, 15, 23, 30, 37, 44, 51,
58, 59, 52, 45, 38, 31, 39, 46,
53, 60, 61, 54, 47, 55, 62, 63,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 54 of file jutils.c.

Referenced by decode_mcu(), get_dqt(), initial_setup(), and jpeg_CreateCompress().

◆ jpeg_natural_order2

const int jpeg_natural_order2[2 *2+16]
Initial value:
= {
0, 1, 8, 9,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 112 of file jutils.c.

Referenced by get_dqt(), and initial_setup().

◆ jpeg_natural_order3

const int jpeg_natural_order3[3 *3+16]
Initial value:
= {
0, 1, 8, 16, 9, 2, 10, 17,
18,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 105 of file jutils.c.

Referenced by get_dqt(), and initial_setup().

◆ jpeg_natural_order4

const int jpeg_natural_order4[4 *4+16]
Initial value:
= {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 25, 18, 11, 19, 26, 27,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 98 of file jutils.c.

Referenced by get_dqt(), and initial_setup().

◆ jpeg_natural_order5

const int jpeg_natural_order5[5 *5+16]
Initial value:
= {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 12,
19, 26, 33, 34, 27, 20, 28, 35,
36,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 89 of file jutils.c.

Referenced by get_dqt(), and initial_setup().

◆ jpeg_natural_order6

const int jpeg_natural_order6[6 *6+16]
Initial value:
= {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 41, 34, 27,
20, 13, 21, 28, 35, 42, 43, 36,
29, 37, 44, 45,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 79 of file jutils.c.

Referenced by get_dqt(), and initial_setup().

◆ jpeg_natural_order7

const int jpeg_natural_order7[7 *7+16]
Initial value:
= {
0, 1, 8, 16, 9, 2, 3, 10,
17, 24, 32, 25, 18, 11, 4, 5,
12, 19, 26, 33, 40, 48, 41, 34,
27, 20, 13, 6, 14, 21, 28, 35,
42, 49, 50, 43, 36, 29, 22, 30,
37, 44, 51, 52, 45, 38, 46, 53,
54,
63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63
}

Definition at line 67 of file jutils.c.

Referenced by get_dqt(), and initial_setup().