COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
jutils.cpp File Reference
#include "jinclude.h"
#include "jpeglib.h"
Include dependency graph for jutils.cpp:

Macros

#define JPEG_INTERNALS
 
#define FMEMCOPY(dest, src, size)   MEMCOPY(dest,src,size)
 
#define FMEMZERO(target, size)   MEMZERO(target,size)
 

Functions

long jdiv_round_up (long a, long b)
 
long jround_up (long a, long b)
 
void jcopy_sample_rows (JSAMPARRAY input_array, int source_row, JSAMPARRAY output_array, int dest_row, int num_rows, JDIMENSION num_cols)
 
void jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, JDIMENSION num_blocks)
 
void jzero_far (void *target, size_t bytestozero)
 

Variables

const int jpeg_natural_order [64+16]
 

Macro Definition Documentation

#define JPEG_INTERNALS
#define FMEMCOPY (   dest,
  src,
  size 
)    MEMCOPY(dest,src,size)
#define FMEMZERO (   target,
  size 
)    MEMZERO(target,size)

Function Documentation

long jdiv_round_up ( long  a,
long  b 
)
75 {
76  return (a + b - 1L) / b;
77 }
long b
Definition: jpegint.h:371
Definition: eci2kep_test.cpp:33
long jround_up ( long  a,
long  b 
)
84 {
85  a += b - 1L;
86  return a - (a % b);
87 }
long b
Definition: jpegint.h:371
Definition: eci2kep_test.cpp:33
void jcopy_sample_rows ( JSAMPARRAY  input_array,
int  source_row,
JSAMPARRAY  output_array,
int  dest_row,
int  num_rows,
JDIMENSION  num_cols 
)
119 {
120  register JSAMPROW inptr, outptr;
121 #ifdef FMEMCOPY
122  register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
123 #else
124  register JDIMENSION count;
125 #endif
126  register int row;
127 
128  input_array += source_row;
130 
131  for (row = num_rows; row > 0; row--) {
132  inptr = *input_array++;
133  outptr = *output_array++;
134 #ifdef FMEMCOPY
135  FMEMCOPY(outptr, inptr, count);
136 #else
137  for (count = num_cols; count > 0; count--)
138  *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */
139 #endif
140  }
141 }
char JSAMPLE
Definition: jmorecfg.h:64
int count
Definition: rw_test.cpp:36
#define SIZEOF(object)
Definition: jinclude.h:80
JSAMPLE * JSAMPROW
Definition: jpeglib.h:71
int JSAMPARRAY int dest_row
Definition: jpegint.h:373
int source_row
Definition: jpegint.h:373
int JSAMPARRAY int int num_rows
Definition: jpegint.h:373
int JSAMPARRAY int int JDIMENSION num_cols
Definition: jpegint.h:373
unsigned int JDIMENSION
Definition: jmorecfg.h:171
#define FMEMCOPY(dest, src, size)
Definition: jutils.cpp:100
int JSAMPARRAY output_array
Definition: jpegint.h:373
void jcopy_block_row ( JBLOCKROW  input_row,
JBLOCKROW  output_row,
JDIMENSION  num_blocks 
)
148 {
149 #ifdef FMEMCOPY
150  FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
151 #else
152  register JCOEFPTR inptr, outptr;
153  register long count;
154 
155  inptr = (JCOEFPTR) input_row;
156  outptr = (JCOEFPTR) output_row;
157  for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) {
158  *outptr++ = *inptr++;
159  }
160 #endif
161 }
int count
Definition: rw_test.cpp:36
#define SIZEOF(object)
Definition: jinclude.h:80
short JCOEF
Definition: jmorecfg.h:99
#define DCTSIZE2
Definition: jpeglib.h:47
JBLOCKROW JDIMENSION num_blocks
Definition: jpegint.h:376
JBLOCKROW output_row
Definition: jpegint.h:376
JCOEF * JCOEFPTR
Definition: jpeglib.h:80
#define FMEMCOPY(dest, src, size)
Definition: jutils.cpp:100
void jzero_far ( void *  target,
size_t  bytestozero 
)
168 {
169 #ifdef FMEMZERO
171 #else
172  register char FAR * ptr = (char FAR *) target;
173  register size_t count;
174 
175  for (count = bytestozero; count > 0; count--) {
176  *ptr++ = 0;
177  }
178 #endif
179 }
static antstruc target
Definition: agent_antenna.cpp:160
int count
Definition: rw_test.cpp:36
#define FMEMZERO(target, size)
Definition: jutils.cpp:101
#define FAR
Definition: jmorecfg.h:215
size_t bytestozero
Definition: jpegint.h:378

Variable Documentation

const int jpeg_natural_order[64+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
}