Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
6a4ecdcf
Commit
6a4ecdcf
authored
Aug 23, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes to avoid compiler warnings
parent
5e0cc695
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
177 additions
and
171 deletions
+177
-171
jccolor.cpp
dlib/external/libjpeg/jccolor.cpp
+22
-22
jcdctmgr.cpp
dlib/external/libjpeg/jcdctmgr.cpp
+14
-14
jchuff.cpp
dlib/external/libjpeg/jchuff.cpp
+8
-8
jcphuff.cpp
dlib/external/libjpeg/jcphuff.cpp
+11
-11
jcprepct.cpp
dlib/external/libjpeg/jcprepct.cpp
+1
-1
jcsample.cpp
dlib/external/libjpeg/jcsample.cpp
+9
-9
jdcolor.cpp
dlib/external/libjpeg/jdcolor.cpp
+23
-23
jdhuff.cpp
dlib/external/libjpeg/jdhuff.cpp
+11
-8
jdhuff.h
dlib/external/libjpeg/jdhuff.h
+8
-8
jdmerge.cpp
dlib/external/libjpeg/jdmerge.cpp
+6
-6
jdphuff.cpp
dlib/external/libjpeg/jdphuff.cpp
+6
-3
jdsample.cpp
dlib/external/libjpeg/jdsample.cpp
+14
-14
jquant1.cpp
dlib/external/libjpeg/jquant1.cpp
+14
-14
jquant2.cpp
dlib/external/libjpeg/jquant2.cpp
+22
-22
jutils.cpp
dlib/external/libjpeg/jutils.cpp
+8
-8
No files found.
dlib/external/libjpeg/jccolor.cpp
View file @
6a4ecdcf
...
...
@@ -132,11 +132,11 @@ rgb_ycc_convert (j_compress_ptr cinfo,
JDIMENSION
output_row
,
int
num_rows
)
{
my_cconvert_ptr
cconvert
=
(
my_cconvert_ptr
)
cinfo
->
cconvert
;
register
int
r
,
g
,
b
;
register
long
*
ctab
=
cconvert
->
rgb_ycc_tab
;
register
JSAMPROW
inptr
;
register
JSAMPROW
outptr0
,
outptr1
,
outptr2
;
register
JDIMENSION
col
;
int
r
,
g
,
b
;
long
*
ctab
=
cconvert
->
rgb_ycc_tab
;
JSAMPROW
inptr
;
JSAMPROW
outptr0
,
outptr1
,
outptr2
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
image_width
;
while
(
--
num_rows
>=
0
)
{
...
...
@@ -188,11 +188,11 @@ rgb_gray_convert (j_compress_ptr cinfo,
JDIMENSION
output_row
,
int
num_rows
)
{
my_cconvert_ptr
cconvert
=
(
my_cconvert_ptr
)
cinfo
->
cconvert
;
register
int
r
,
g
,
b
;
register
long
*
ctab
=
cconvert
->
rgb_ycc_tab
;
register
JSAMPROW
inptr
;
register
JSAMPROW
outptr
;
register
JDIMENSION
col
;
int
r
,
g
,
b
;
long
*
ctab
=
cconvert
->
rgb_ycc_tab
;
JSAMPROW
inptr
;
JSAMPROW
outptr
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
image_width
;
while
(
--
num_rows
>=
0
)
{
...
...
@@ -227,11 +227,11 @@ cmyk_ycck_convert (j_compress_ptr cinfo,
JDIMENSION
output_row
,
int
num_rows
)
{
my_cconvert_ptr
cconvert
=
(
my_cconvert_ptr
)
cinfo
->
cconvert
;
register
int
r
,
g
,
b
;
register
long
*
ctab
=
cconvert
->
rgb_ycc_tab
;
register
JSAMPROW
inptr
;
register
JSAMPROW
outptr0
,
outptr1
,
outptr2
,
outptr3
;
register
JDIMENSION
col
;
int
r
,
g
,
b
;
long
*
ctab
=
cconvert
->
rgb_ycc_tab
;
JSAMPROW
inptr
;
JSAMPROW
outptr0
,
outptr1
,
outptr2
,
outptr3
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
image_width
;
while
(
--
num_rows
>=
0
)
{
...
...
@@ -281,9 +281,9 @@ grayscale_convert (j_compress_ptr cinfo,
JSAMPARRAY
input_buf
,
JSAMPIMAGE
output_buf
,
JDIMENSION
output_row
,
int
num_rows
)
{
register
JSAMPROW
inptr
;
register
JSAMPROW
outptr
;
register
JDIMENSION
col
;
JSAMPROW
inptr
;
JSAMPROW
outptr
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
image_width
;
int
instride
=
cinfo
->
input_components
;
...
...
@@ -310,10 +310,10 @@ null_convert (j_compress_ptr cinfo,
JSAMPARRAY
input_buf
,
JSAMPIMAGE
output_buf
,
JDIMENSION
output_row
,
int
num_rows
)
{
register
JSAMPROW
inptr
;
register
JSAMPROW
outptr
;
register
JDIMENSION
col
;
register
int
ci
;
JSAMPROW
inptr
;
JSAMPROW
outptr
;
JDIMENSION
col
;
int
ci
;
int
nc
=
cinfo
->
num_components
;
JDIMENSION
num_cols
=
cinfo
->
image_width
;
...
...
dlib/external/libjpeg/jcdctmgr.cpp
View file @
6a4ecdcf
...
...
@@ -194,9 +194,9 @@ forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
for
(
bi
=
0
;
bi
<
num_blocks
;
bi
++
,
start_col
+=
DCTSIZE
)
{
/* Load data into workspace, applying unsigned->signed conversion */
{
register
DCTELEM
*
workspaceptr
;
register
JSAMPROW
elemptr
;
register
int
elemr
;
{
DCTELEM
*
workspaceptr
;
JSAMPROW
elemptr
;
int
elemr
;
workspaceptr
=
workspace
;
for
(
elemr
=
0
;
elemr
<
DCTSIZE
;
elemr
++
)
{
...
...
@@ -211,7 +211,7 @@ forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
*
workspaceptr
++
=
GETJSAMPLE
(
*
elemptr
++
)
-
CENTERJSAMPLE
;
*
workspaceptr
++
=
GETJSAMPLE
(
*
elemptr
++
)
-
CENTERJSAMPLE
;
#else
{
register
int
elemc
;
{
int
elemc
;
for
(
elemc
=
DCTSIZE
;
elemc
>
0
;
elemc
--
)
{
*
workspaceptr
++
=
GETJSAMPLE
(
*
elemptr
++
)
-
CENTERJSAMPLE
;
}
...
...
@@ -224,9 +224,9 @@ forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr,
(
*
do_dct
)
(
workspace
);
/* Quantize/descale the coefficients, and store into coef_blocks[] */
{
register
DCTELEM
temp
,
qval
;
register
int
i
;
register
JCOEFPTR
output_ptr
=
coef_blocks
[
bi
];
{
DCTELEM
temp
,
qval
;
int
i
;
JCOEFPTR
output_ptr
=
coef_blocks
[
bi
];
for
(
i
=
0
;
i
<
DCTSIZE2
;
i
++
)
{
qval
=
divisors
[
i
];
...
...
@@ -284,9 +284,9 @@ forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
for
(
bi
=
0
;
bi
<
num_blocks
;
bi
++
,
start_col
+=
DCTSIZE
)
{
/* Load data into workspace, applying unsigned->signed conversion */
{
register
FAST_FLOAT
*
workspaceptr
;
register
JSAMPROW
elemptr
;
register
int
elemr
;
{
FAST_FLOAT
*
workspaceptr
;
JSAMPROW
elemptr
;
int
elemr
;
workspaceptr
=
workspace
;
for
(
elemr
=
0
;
elemr
<
DCTSIZE
;
elemr
++
)
{
...
...
@@ -301,7 +301,7 @@ forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
*
workspaceptr
++
=
(
FAST_FLOAT
)(
GETJSAMPLE
(
*
elemptr
++
)
-
CENTERJSAMPLE
);
*
workspaceptr
++
=
(
FAST_FLOAT
)(
GETJSAMPLE
(
*
elemptr
++
)
-
CENTERJSAMPLE
);
#else
{
register
int
elemc
;
{
int
elemc
;
for
(
elemc
=
DCTSIZE
;
elemc
>
0
;
elemc
--
)
{
*
workspaceptr
++
=
(
FAST_FLOAT
)
(
GETJSAMPLE
(
*
elemptr
++
)
-
CENTERJSAMPLE
);
...
...
@@ -315,9 +315,9 @@ forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr,
(
*
do_dct
)
(
workspace
);
/* Quantize/descale the coefficients, and store into coef_blocks[] */
{
register
FAST_FLOAT
temp
;
register
int
i
;
register
JCOEFPTR
output_ptr
=
coef_blocks
[
bi
];
{
FAST_FLOAT
temp
;
int
i
;
JCOEFPTR
output_ptr
=
coef_blocks
[
bi
];
for
(
i
=
0
;
i
<
DCTSIZE2
;
i
++
)
{
/* Apply the quantization and scaling factor */
...
...
dlib/external/libjpeg/jchuff.cpp
View file @
6a4ecdcf
...
...
@@ -303,8 +303,8 @@ emit_bits (working_state * state, unsigned int code, int size)
/* Emit some bits; return TRUE if successful, FALSE if must suspend */
{
/* This routine is heavily used, so it's worth coding tightly. */
register
long
put_buffer
=
(
long
)
code
;
register
int
put_bits
=
state
->
cur
.
put_bits
;
long
put_buffer
=
(
long
)
code
;
int
put_bits
=
state
->
cur
.
put_bits
;
/* if size is 0, caller used an invalid Huffman table entry */
if
(
size
==
0
)
...
...
@@ -353,9 +353,9 @@ LOCAL(int)
encode_one_block
(
working_state
*
state
,
JCOEFPTR
block
,
int
last_dc_val
,
c_derived_tbl
*
dctbl
,
c_derived_tbl
*
actbl
)
{
register
int
temp
,
temp2
;
register
int
nbits
;
register
int
k
,
r
,
i
;
int
temp
,
temp2
;
int
nbits
;
int
k
,
r
,
i
;
/* Encode the DC coefficient difference per section F.1.2.1 */
...
...
@@ -572,9 +572,9 @@ LOCAL(void)
htest_one_block
(
j_compress_ptr
cinfo
,
JCOEFPTR
block
,
int
last_dc_val
,
long
dc_counts
[],
long
ac_counts
[])
{
register
int
temp
;
register
int
nbits
;
register
int
k
,
r
;
int
temp
;
int
nbits
;
int
k
,
r
;
/* Encode the DC coefficient difference per section F.1.2.1 */
...
...
dlib/external/libjpeg/jcphuff.cpp
View file @
6a4ecdcf
...
...
@@ -229,8 +229,8 @@ emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size)
/* Emit some bits, unless we are in gather mode */
{
/* This routine is heavily used, so it's worth coding tightly. */
register
long
put_buffer
=
(
long
)
code
;
register
int
put_bits
=
entropy
->
put_bits
;
long
put_buffer
=
(
long
)
code
;
int
put_bits
=
entropy
->
put_bits
;
/* if size is 0, caller used an invalid Huffman table entry */
if
(
size
==
0
)
...
...
@@ -315,7 +315,7 @@ emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart,
LOCAL
(
void
)
emit_eobrun
(
phuff_entropy_ptr
entropy
)
{
register
int
temp
,
nbits
;
int
temp
,
nbits
;
if
(
entropy
->
EOBRUN
>
0
)
{
/* if there is any pending EOBRUN */
temp
=
entropy
->
EOBRUN
;
...
...
@@ -377,8 +377,8 @@ METHODDEF(int)
encode_mcu_DC_first
(
j_compress_ptr
cinfo
,
JBLOCKROW
*
MCU_data
)
{
phuff_entropy_ptr
entropy
=
(
phuff_entropy_ptr
)
cinfo
->
entropy
;
register
int
temp
,
temp2
;
register
int
nbits
;
int
temp
,
temp2
;
int
nbits
;
int
blkn
,
ci
;
int
Al
=
cinfo
->
Al
;
JBLOCKROW
block
;
...
...
@@ -464,9 +464,9 @@ METHODDEF(int)
encode_mcu_AC_first
(
j_compress_ptr
cinfo
,
JBLOCKROW
*
MCU_data
)
{
phuff_entropy_ptr
entropy
=
(
phuff_entropy_ptr
)
cinfo
->
entropy
;
register
int
temp
,
temp2
;
register
int
nbits
;
register
int
r
,
k
;
int
temp
,
temp2
;
int
nbits
;
int
r
,
k
;
int
Se
=
cinfo
->
Se
;
int
Al
=
cinfo
->
Al
;
JBLOCKROW
block
;
...
...
@@ -571,7 +571,7 @@ METHODDEF(int)
encode_mcu_DC_refine
(
j_compress_ptr
cinfo
,
JBLOCKROW
*
MCU_data
)
{
phuff_entropy_ptr
entropy
=
(
phuff_entropy_ptr
)
cinfo
->
entropy
;
register
int
temp
;
int
temp
;
int
blkn
;
int
Al
=
cinfo
->
Al
;
JBLOCKROW
block
;
...
...
@@ -618,8 +618,8 @@ METHODDEF(int)
encode_mcu_AC_refine
(
j_compress_ptr
cinfo
,
JBLOCKROW
*
MCU_data
)
{
phuff_entropy_ptr
entropy
=
(
phuff_entropy_ptr
)
cinfo
->
entropy
;
register
int
temp
;
register
int
r
,
k
;
int
temp
;
int
r
,
k
;
int
EOB
;
char
*
BR_buffer
;
unsigned
int
BR
;
...
...
dlib/external/libjpeg/jcprepct.cpp
View file @
6a4ecdcf
...
...
@@ -106,7 +106,7 @@ LOCAL(void)
expand_bottom_edge
(
JSAMPARRAY
image_data
,
JDIMENSION
num_cols
,
int
input_rows
,
int
output_rows
)
{
register
int
row
;
int
row
;
for
(
row
=
input_rows
;
row
<
output_rows
;
row
++
)
{
jcopy_sample_rows
(
image_data
,
input_rows
-
1
,
image_data
,
row
,
...
...
dlib/external/libjpeg/jcsample.cpp
View file @
6a4ecdcf
...
...
@@ -87,9 +87,9 @@ LOCAL(void)
expand_right_edge
(
JSAMPARRAY
image_data
,
int
num_rows
,
JDIMENSION
input_cols
,
JDIMENSION
output_cols
)
{
register
JSAMPROW
ptr
;
register
JSAMPLE
pixval
;
register
int
count
;
JSAMPROW
ptr
;
JSAMPLE
pixval
;
int
count
;
int
row
;
int
numcols
=
(
int
)
(
output_cols
-
input_cols
);
...
...
@@ -215,8 +215,8 @@ h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
int
outrow
;
JDIMENSION
outcol
;
JDIMENSION
output_cols
=
compptr
->
width_in_blocks
*
DCTSIZE
;
register
JSAMPROW
inptr
,
outptr
;
register
int
bias
;
JSAMPROW
inptr
,
outptr
;
int
bias
;
/* Expand input data enough to let all the output samples be generated
* by the standard loop. Special-casing padded output would be more
...
...
@@ -252,8 +252,8 @@ h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
int
inrow
,
outrow
;
JDIMENSION
outcol
;
JDIMENSION
output_cols
=
compptr
->
width_in_blocks
*
DCTSIZE
;
register
JSAMPROW
inptr0
,
inptr1
,
outptr
;
register
int
bias
;
JSAMPROW
inptr0
,
inptr1
,
outptr
;
int
bias
;
/* Expand input data enough to let all the output samples be generated
* by the standard loop. Special-casing padded output would be more
...
...
@@ -295,7 +295,7 @@ h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr,
int
inrow
,
outrow
;
JDIMENSION
colctr
;
JDIMENSION
output_cols
=
compptr
->
width_in_blocks
*
DCTSIZE
;
register
JSAMPROW
inptr0
,
inptr1
,
above_ptr
,
below_ptr
,
outptr
;
JSAMPROW
inptr0
,
inptr1
,
above_ptr
,
below_ptr
,
outptr
;
long
membersum
,
neighsum
,
memberscale
,
neighscale
;
/* Expand input data enough to let all the output samples be generated
...
...
@@ -395,7 +395,7 @@ fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr,
int
outrow
;
JDIMENSION
colctr
;
JDIMENSION
output_cols
=
compptr
->
width_in_blocks
*
DCTSIZE
;
register
JSAMPROW
inptr
,
above_ptr
,
below_ptr
,
outptr
;
JSAMPROW
inptr
,
above_ptr
,
below_ptr
,
outptr
;
long
membersum
,
neighsum
,
memberscale
,
neighscale
;
int
colsum
,
lastcolsum
,
nextcolsum
;
...
...
dlib/external/libjpeg/jdcolor.cpp
View file @
6a4ecdcf
...
...
@@ -122,17 +122,17 @@ ycc_rgb_convert (j_decompress_ptr cinfo,
JSAMPARRAY
output_buf
,
int
num_rows
)
{
my_cconvert_ptr
cconvert
=
(
my_cconvert_ptr
)
cinfo
->
cconvert
;
register
int
y
,
cb
,
cr
;
register
JSAMPROW
outptr
;
register
JSAMPROW
inptr0
,
inptr1
,
inptr2
;
register
JDIMENSION
col
;
int
y
,
cb
,
cr
;
JSAMPROW
outptr
;
JSAMPROW
inptr0
,
inptr1
,
inptr2
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
output_width
;
/* copy these pointers into registers if possible */
register
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
register
int
*
Crrtab
=
cconvert
->
Cr_r_tab
;
register
int
*
Cbbtab
=
cconvert
->
Cb_b_tab
;
register
long
*
Crgtab
=
cconvert
->
Cr_g_tab
;
register
long
*
Cbgtab
=
cconvert
->
Cb_g_tab
;
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
int
*
Crrtab
=
cconvert
->
Cr_r_tab
;
int
*
Cbbtab
=
cconvert
->
Cb_b_tab
;
long
*
Crgtab
=
cconvert
->
Cr_g_tab
;
long
*
Cbgtab
=
cconvert
->
Cb_g_tab
;
SHIFT_TEMPS
while
(
--
num_rows
>=
0
)
{
...
...
@@ -170,9 +170,9 @@ null_convert (j_decompress_ptr cinfo,
JSAMPIMAGE
input_buf
,
JDIMENSION
input_row
,
JSAMPARRAY
output_buf
,
int
num_rows
)
{
register
JSAMPROW
inptr
,
outptr
;
register
JDIMENSION
count
;
register
int
num_components
=
cinfo
->
num_components
;
JSAMPROW
inptr
,
outptr
;
JDIMENSION
count
;
int
num_components
=
cinfo
->
num_components
;
JDIMENSION
num_cols
=
cinfo
->
output_width
;
int
ci
;
...
...
@@ -218,8 +218,8 @@ gray_rgb_convert (j_decompress_ptr cinfo,
JSAMPIMAGE
input_buf
,
JDIMENSION
input_row
,
JSAMPARRAY
output_buf
,
int
num_rows
)
{
register
JSAMPROW
inptr
,
outptr
;
register
JDIMENSION
col
;
JSAMPROW
inptr
,
outptr
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
output_width
;
while
(
--
num_rows
>=
0
)
{
...
...
@@ -247,17 +247,17 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
JSAMPARRAY
output_buf
,
int
num_rows
)
{
my_cconvert_ptr
cconvert
=
(
my_cconvert_ptr
)
cinfo
->
cconvert
;
register
int
y
,
cb
,
cr
;
register
JSAMPROW
outptr
;
register
JSAMPROW
inptr0
,
inptr1
,
inptr2
,
inptr3
;
register
JDIMENSION
col
;
int
y
,
cb
,
cr
;
JSAMPROW
outptr
;
JSAMPROW
inptr0
,
inptr1
,
inptr2
,
inptr3
;
JDIMENSION
col
;
JDIMENSION
num_cols
=
cinfo
->
output_width
;
/* copy these pointers into registers if possible */
register
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
register
int
*
Crrtab
=
cconvert
->
Cr_r_tab
;
register
int
*
Cbbtab
=
cconvert
->
Cb_b_tab
;
register
long
*
Crgtab
=
cconvert
->
Cr_g_tab
;
register
long
*
Cbgtab
=
cconvert
->
Cb_g_tab
;
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
int
*
Crrtab
=
cconvert
->
Cr_r_tab
;
int
*
Cbbtab
=
cconvert
->
Cb_b_tab
;
long
*
Crgtab
=
cconvert
->
Cr_g_tab
;
long
*
Cbgtab
=
cconvert
->
Cb_g_tab
;
SHIFT_TEMPS
while
(
--
num_rows
>=
0
)
{
...
...
dlib/external/libjpeg/jdhuff.cpp
View file @
6a4ecdcf
...
...
@@ -19,6 +19,9 @@
#include "jpeglib.h"
#include "jdhuff.h"
/* Declarations shared with jdphuff.c */
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#endif
/*
* Expanded entropy decoder object for Huffman decoding.
...
...
@@ -290,13 +293,13 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, int isDC, int tblno,
GLOBAL
(
int
)
jpeg_fill_bit_buffer
(
bitread_working_state
*
state
,
register
bit_buf_type
get_buffer
,
register
int
bits_left
,
bit_buf_type
get_buffer
,
register
int
bits_left
,
int
nbits
)
/* Load up the bit buffer to a depth of at least nbits */
{
/* Copy heavily used state fields into locals (hopefully registers) */
register
const
JOCTET
*
next_input_byte
=
state
->
next_input_byte
;
register
size_t
bytes_in_buffer
=
state
->
bytes_in_buffer
;
const
JOCTET
*
next_input_byte
=
state
->
next_input_byte
;
size_t
bytes_in_buffer
=
state
->
bytes_in_buffer
;
j_decompress_ptr
cinfo
=
state
->
cinfo
;
/* Attempt to load at least MIN_GET_BITS bits into get_buffer. */
...
...
@@ -305,7 +308,7 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
if
(
cinfo
->
unread_marker
==
0
)
{
/* cannot advance past a marker */
while
(
bits_left
<
MIN_GET_BITS
)
{
register
int
c
;
int
c
;
/* Attempt to read a byte */
if
(
bytes_in_buffer
==
0
)
{
...
...
@@ -396,11 +399,11 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
GLOBAL
(
int
)
jpeg_huff_decode
(
bitread_working_state
*
state
,
register
bit_buf_type
get_buffer
,
register
int
bits_left
,
bit_buf_type
get_buffer
,
register
int
bits_left
,
d_derived_tbl
*
htbl
,
int
min_bits
)
{
register
int
l
=
min_bits
;
register
long
code
;
int
l
=
min_bits
;
long
code
;
/* HUFF_DECODE has determined that the code is at least min_bits */
/* bits long, so fetch that many bits in one swoop. */
...
...
@@ -543,7 +546,7 @@ decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
JBLOCKROW
block
=
MCU_data
[
blkn
];
d_derived_tbl
*
dctbl
=
entropy
->
dc_cur_tbls
[
blkn
];
d_derived_tbl
*
actbl
=
entropy
->
ac_cur_tbls
[
blkn
];
register
int
s
,
k
,
r
;
int
s
,
k
,
r
;
/* Decode a single block's worth of coefficients */
...
...
dlib/external/libjpeg/jdhuff.h
View file @
6a4ecdcf
...
...
@@ -89,7 +89,7 @@ typedef struct { /* Bitreading working state within an MCU */
/* We need a copy, rather than munging the original, in case of suspension */
const
JOCTET
*
next_input_byte
;
/* => next byte to read from source */
size_t
bytes_in_buffer
;
/* # of bytes remaining in source buffer */
/* Bit input buffer --- note these values are kept in
register
variables,
/* Bit input buffer --- note these values are kept in variables,
* not in this struct, inside the inner loops.
*/
bit_buf_type
get_buffer
;
/* current bit-extraction buffer */
...
...
@@ -100,8 +100,8 @@ typedef struct { /* Bitreading working state within an MCU */
/* Macros to declare and load/save bitread local variables. */
#define BITREAD_STATE_VARS \
register
bit_buf_type get_buffer; \
register
int bits_left; \
bit_buf_type get_buffer; \
int bits_left; \
bitread_working_state br_state
#define BITREAD_LOAD_STATE(cinfop,permstate) \
...
...
@@ -152,8 +152,8 @@ typedef struct { /* Bitreading working state within an MCU */
/* Load up the bit buffer to a depth of at least nbits */
EXTERN
(
int
)
jpeg_fill_bit_buffer
JPP
((
bitread_working_state
*
state
,
register
bit_buf_type
get_buffer
,
register
int
bits_left
,
int
nbits
));
JPP
((
bitread_working_state
*
state
,
bit_buf_type
get_buffer
,
int
bits_left
,
int
nbits
));
/*
...
...
@@ -174,7 +174,7 @@ EXTERN(int) jpeg_fill_bit_buffer
*/
#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
{
register
int nb, look; \
{ int nb, look; \
if (bits_left < HUFF_LOOKAHEAD) { \
if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
get_buffer = state.get_buffer; bits_left = state.bits_left; \
...
...
@@ -197,5 +197,5 @@ slowlabel: \
/* Out-of-line case for Huffman code fetching */
EXTERN
(
int
)
jpeg_huff_decode
JPP
((
bitread_working_state
*
state
,
register
bit_buf_type
get_buffer
,
register
int
bits_left
,
d_derived_tbl
*
htbl
,
int
min_bits
));
JPP
((
bitread_working_state
*
state
,
bit_buf_type
get_buffer
,
int
bits_left
,
d_derived_tbl
*
htbl
,
int
min_bits
));
dlib/external/libjpeg/jdmerge.cpp
View file @
6a4ecdcf
...
...
@@ -228,13 +228,13 @@ h2v1_merged_upsample (j_decompress_ptr cinfo,
JSAMPARRAY
output_buf
)
{
my_upsample_ptr
upsample
=
(
my_upsample_ptr
)
cinfo
->
upsample
;
register
int
y
,
cred
,
cgreen
,
cblue
;
int
y
,
cred
,
cgreen
,
cblue
;
int
cb
,
cr
;
register
JSAMPROW
outptr
;
JSAMPROW
outptr
;
JSAMPROW
inptr0
,
inptr1
,
inptr2
;
JDIMENSION
col
;
/* copy these pointers into registers if possible */
register
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
int
*
Crrtab
=
upsample
->
Cr_r_tab
;
int
*
Cbbtab
=
upsample
->
Cb_b_tab
;
long
*
Crgtab
=
upsample
->
Cr_g_tab
;
...
...
@@ -290,13 +290,13 @@ h2v2_merged_upsample (j_decompress_ptr cinfo,
JSAMPARRAY
output_buf
)
{
my_upsample_ptr
upsample
=
(
my_upsample_ptr
)
cinfo
->
upsample
;
register
int
y
,
cred
,
cgreen
,
cblue
;
int
y
,
cred
,
cgreen
,
cblue
;
int
cb
,
cr
;
register
JSAMPROW
outptr0
,
outptr1
;
JSAMPROW
outptr0
,
outptr1
;
JSAMPROW
inptr00
,
inptr01
,
inptr1
,
inptr2
;
JDIMENSION
col
;
/* copy these pointers into registers if possible */
register
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
JSAMPLE
*
range_limit
=
cinfo
->
sample_range_limit
;
int
*
Crrtab
=
upsample
->
Cr_r_tab
;
int
*
Cbbtab
=
upsample
->
Cb_b_tab
;
long
*
Crgtab
=
upsample
->
Cr_g_tab
;
...
...
dlib/external/libjpeg/jdphuff.cpp
View file @
6a4ecdcf
...
...
@@ -19,6 +19,9 @@
#include "jpeglib.h"
#include "jdhuff.h"
/* Declarations shared with jdhuff.c */
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wshift-negative-value"
#endif
#ifdef D_PROGRESSIVE_SUPPORTED
...
...
@@ -287,7 +290,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{
phuff_entropy_ptr
entropy
=
(
phuff_entropy_ptr
)
cinfo
->
entropy
;
int
Al
=
cinfo
->
Al
;
register
int
s
,
r
;
int
s
,
r
;
int
blkn
,
ci
;
JBLOCKROW
block
;
BITREAD_STATE_VARS
;
...
...
@@ -359,7 +362,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
phuff_entropy_ptr
entropy
=
(
phuff_entropy_ptr
)
cinfo
->
entropy
;
int
Se
=
cinfo
->
Se
;
int
Al
=
cinfo
->
Al
;
register
int
s
,
k
,
r
;
int
s
,
k
,
r
;
unsigned
int
EOBRUN
;
JBLOCKROW
block
;
BITREAD_STATE_VARS
;
...
...
@@ -494,7 +497,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
int
Se
=
cinfo
->
Se
;
int
p1
=
1
<<
cinfo
->
Al
;
/* 1 in the bit position being coded */
int
m1
=
(
-
1
)
<<
cinfo
->
Al
;
/* -1 in the bit position being coded */
register
int
s
,
k
,
r
;
int
s
,
k
,
r
;
unsigned
int
EOBRUN
;
JBLOCKROW
block
;
JCOEFPTR
thiscoef
;
...
...
dlib/external/libjpeg/jdsample.cpp
View file @
6a4ecdcf
...
...
@@ -191,9 +191,9 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
{
my_upsample_ptr
upsample
=
(
my_upsample_ptr
)
cinfo
->
upsample
;
JSAMPARRAY
output_data
=
*
output_data_ptr
;
register
JSAMPROW
inptr
,
outptr
;
register
JSAMPLE
invalue
;
register
int
h
;
JSAMPROW
inptr
,
outptr
;
JSAMPLE
invalue
;
int
h
;
JSAMPROW
outend
;
int
h_expand
,
v_expand
;
int
inrow
,
outrow
;
...
...
@@ -234,8 +234,8 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * ,
JSAMPARRAY
input_data
,
JSAMPARRAY
*
output_data_ptr
)
{
JSAMPARRAY
output_data
=
*
output_data_ptr
;
register
JSAMPROW
inptr
,
outptr
;
register
JSAMPLE
invalue
;
JSAMPROW
inptr
,
outptr
;
JSAMPLE
invalue
;
JSAMPROW
outend
;
int
inrow
;
...
...
@@ -262,8 +262,8 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * ,
JSAMPARRAY
input_data
,
JSAMPARRAY
*
output_data_ptr
)
{
JSAMPARRAY
output_data
=
*
output_data_ptr
;
register
JSAMPROW
inptr
,
outptr
;
register
JSAMPLE
invalue
;
JSAMPROW
inptr
,
outptr
;
JSAMPLE
invalue
;
JSAMPROW
outend
;
int
inrow
,
outrow
;
...
...
@@ -305,9 +305,9 @@ h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY
input_data
,
JSAMPARRAY
*
output_data_ptr
)
{
JSAMPARRAY
output_data
=
*
output_data_ptr
;
register
JSAMPROW
inptr
,
outptr
;
register
int
invalue
;
register
JDIMENSION
colctr
;
JSAMPROW
inptr
,
outptr
;
int
invalue
;
JDIMENSION
colctr
;
int
inrow
;
for
(
inrow
=
0
;
inrow
<
cinfo
->
max_v_samp_factor
;
inrow
++
)
{
...
...
@@ -346,13 +346,13 @@ h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
JSAMPARRAY
input_data
,
JSAMPARRAY
*
output_data_ptr
)
{
JSAMPARRAY
output_data
=
*
output_data_ptr
;
register
JSAMPROW
inptr0
,
inptr1
,
outptr
;
JSAMPROW
inptr0
,
inptr1
,
outptr
;
#if BITS_IN_JSAMPLE == 8
register
int
thiscolsum
,
lastcolsum
,
nextcolsum
;
int
thiscolsum
,
lastcolsum
,
nextcolsum
;
#else
register
long
thiscolsum
,
lastcolsum
,
nextcolsum
;
long
thiscolsum
,
lastcolsum
,
nextcolsum
;
#endif
register
JDIMENSION
colctr
;
JDIMENSION
colctr
;
int
inrow
,
outrow
,
v
;
inrow
=
outrow
=
0
;
...
...
dlib/external/libjpeg/jquant1.cpp
View file @
6a4ecdcf
...
...
@@ -462,12 +462,12 @@ color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
JSAMPARRAY
colorindex
=
cquantize
->
colorindex
;
register
int
pixcode
,
ci
;
register
JSAMPROW
ptrin
,
ptrout
;
int
pixcode
,
ci
;
JSAMPROW
ptrin
,
ptrout
;
int
row
;
JDIMENSION
col
;
JDIMENSION
width
=
cinfo
->
output_width
;
register
int
nc
=
cinfo
->
out_color_components
;
int
nc
=
cinfo
->
out_color_components
;
for
(
row
=
0
;
row
<
num_rows
;
row
++
)
{
ptrin
=
input_buf
[
row
];
...
...
@@ -489,8 +489,8 @@ color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
/* Fast path for out_color_components==3, no dithering */
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
register
int
pixcode
;
register
JSAMPROW
ptrin
,
ptrout
;
int
pixcode
;
JSAMPROW
ptrin
,
ptrout
;
JSAMPROW
colorindex0
=
cquantize
->
colorindex
[
0
];
JSAMPROW
colorindex1
=
cquantize
->
colorindex
[
1
];
JSAMPROW
colorindex2
=
cquantize
->
colorindex
[
2
];
...
...
@@ -517,8 +517,8 @@ quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
/* General case, with ordered dithering */
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
register
JSAMPROW
input_ptr
;
register
JSAMPROW
output_ptr
;
JSAMPROW
input_ptr
;
JSAMPROW
output_ptr
;
JSAMPROW
colorindex_ci
;
int
*
dither
;
/* points to active row of dither matrix */
int
row_index
,
col_index
;
/* current indexes into dither matrix */
...
...
@@ -567,9 +567,9 @@ quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
/* Fast path for out_color_components==3, with ordered dithering */
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
register
int
pixcode
;
register
JSAMPROW
input_ptr
;
register
JSAMPROW
output_ptr
;
int
pixcode
;
JSAMPROW
input_ptr
;
JSAMPROW
output_ptr
;
JSAMPROW
colorindex0
=
cquantize
->
colorindex
[
0
];
JSAMPROW
colorindex1
=
cquantize
->
colorindex
[
1
];
JSAMPROW
colorindex2
=
cquantize
->
colorindex
[
2
];
...
...
@@ -612,14 +612,14 @@ quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
/* General case, with Floyd-Steinberg dithering */
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
register
LOCFSERROR
cur
;
/* current error or pixel value */
LOCFSERROR
cur
;
/* current error or pixel value */
LOCFSERROR
belowerr
;
/* error for pixel below cur */
LOCFSERROR
bpreverr
;
/* error for below/prev col */
LOCFSERROR
bnexterr
;
/* error for below/next col */
LOCFSERROR
delta
;
register
FSERRPTR
errorptr
;
/* => fserrors[] at column before current */
register
JSAMPROW
input_ptr
;
register
JSAMPROW
output_ptr
;
FSERRPTR
errorptr
;
/* => fserrors[] at column before current */
JSAMPROW
input_ptr
;
JSAMPROW
output_ptr
;
JSAMPROW
colorindex_ci
;
JSAMPROW
colormap_ci
;
int
pixcode
;
...
...
dlib/external/libjpeg/jquant2.cpp
View file @
6a4ecdcf
...
...
@@ -225,9 +225,9 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
JSAMPARRAY
,
int
num_rows
)
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
register
JSAMPROW
ptr
;
register
histptr
histp
;
register
hist3d
histogram
=
cquantize
->
histogram
;
JSAMPROW
ptr
;
histptr
histp
;
hist3d
histogram
=
cquantize
->
histogram
;
int
row
;
JDIMENSION
col
;
JDIMENSION
width
=
cinfo
->
output_width
;
...
...
@@ -274,9 +274,9 @@ find_biggest_color_pop (boxptr boxlist, int numboxes)
/* Find the splittable box with the largest color population */
/* Returns NULL if no splittable boxes remain */
{
register
boxptr
boxp
;
register
int
i
;
register
long
maxc
=
0
;
boxptr
boxp
;
int
i
;
long
maxc
=
0
;
boxptr
which
=
NULL
;
for
(
i
=
0
,
boxp
=
boxlist
;
i
<
numboxes
;
i
++
,
boxp
++
)
{
...
...
@@ -294,9 +294,9 @@ find_biggest_volume (boxptr boxlist, int numboxes)
/* Find the splittable box with the largest (scaled) volume */
/* Returns NULL if no splittable boxes remain */
{
register
boxptr
boxp
;
register
int
i
;
register
long
maxv
=
0
;
boxptr
boxp
;
int
i
;
long
maxv
=
0
;
boxptr
which
=
NULL
;
for
(
i
=
0
,
boxp
=
boxlist
;
i
<
numboxes
;
i
++
,
boxp
++
)
{
...
...
@@ -427,7 +427,7 @@ median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
{
int
n
,
lb
;
int
c0
,
c1
,
c2
,
cmax
;
register
boxptr
b1
,
b2
;
boxptr
b1
,
b2
;
while
(
numboxes
<
desired_colors
)
{
/* Select box to split.
...
...
@@ -783,12 +783,12 @@ find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
{
int
ic0
,
ic1
,
ic2
;
int
i
,
icolor
;
register
long
*
bptr
;
/* pointer into bestdist[] array */
long
*
bptr
;
/* pointer into bestdist[] array */
JSAMPLE
*
cptr
;
/* pointer into bestcolor[] array */
long
dist0
,
dist1
;
/* initial distance values */
register
long
dist2
;
/* current distance in inner loop */
long
dist2
;
/* current distance in inner loop */
long
xx0
,
xx1
;
/* distance increments */
register
long
xx2
;
long
xx2
;
long
inc0
,
inc1
,
inc2
;
/* initial values for increments */
/* This array holds the distance to the nearest-so-far color for each cell */
long
bestdist
[
BOX_C0_ELEMS
*
BOX_C1_ELEMS
*
BOX_C2_ELEMS
];
...
...
@@ -861,8 +861,8 @@ fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
hist3d
histogram
=
cquantize
->
histogram
;
int
minc0
,
minc1
,
minc2
;
/* lower left corner of update box */
int
ic0
,
ic1
,
ic2
;
register
JSAMPLE
*
cptr
;
/* pointer into bestcolor[] array */
register
histptr
cachep
;
/* pointer into main cache array */
JSAMPLE
*
cptr
;
/* pointer into bestcolor[] array */
histptr
cachep
;
/* pointer into main cache array */
/* This array lists the candidate colormap indexes. */
JSAMPLE
colorlist
[
MAXNUMCOLORS
];
int
numcolors
;
/* number of candidate colors */
...
...
@@ -918,9 +918,9 @@ pass2_no_dither (j_decompress_ptr cinfo,
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
hist3d
histogram
=
cquantize
->
histogram
;
register
JSAMPROW
inptr
,
outptr
;
register
histptr
cachep
;
register
int
c0
,
c1
,
c2
;
JSAMPROW
inptr
,
outptr
;
histptr
cachep
;
int
c0
,
c1
,
c2
;
int
row
;
JDIMENSION
col
;
JDIMENSION
width
=
cinfo
->
output_width
;
...
...
@@ -952,10 +952,10 @@ pass2_fs_dither (j_decompress_ptr cinfo,
{
my_cquantize_ptr
cquantize
=
(
my_cquantize_ptr
)
cinfo
->
cquantize
;
hist3d
histogram
=
cquantize
->
histogram
;
register
LOCFSERROR
cur0
,
cur1
,
cur2
;
/* current error or pixel value */
LOCFSERROR
cur0
,
cur1
,
cur2
;
/* current error or pixel value */
LOCFSERROR
belowerr0
,
belowerr1
,
belowerr2
;
/* error for pixel below cur */
LOCFSERROR
bpreverr0
,
bpreverr1
,
bpreverr2
;
/* error for below/prev col */
register
FSERRPTR
errorptr
;
/* => fserrors[] at column before current */
FSERRPTR
errorptr
;
/* => fserrors[] at column before current */
JSAMPROW
inptr
;
/* => current input pixel */
JSAMPROW
outptr
;
/* => current output pixel */
histptr
cachep
;
...
...
@@ -1030,7 +1030,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
if
(
*
cachep
==
0
)
fill_inverse_cmap
(
cinfo
,
cur0
>>
C0_SHIFT
,
cur1
>>
C1_SHIFT
,
cur2
>>
C2_SHIFT
);
/* Now emit the colormap index for this cell */
{
register
int
pixcode
=
*
cachep
-
1
;
{
int
pixcode
=
*
cachep
-
1
;
*
outptr
=
(
JSAMPLE
)
pixcode
;
/* Compute representation error for this pixel */
cur0
-=
GETJSAMPLE
(
colormap0
[
pixcode
]);
...
...
@@ -1041,7 +1041,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
* Add these into the running sums, and simultaneously shift the
* next-line error sums left by 1 column.
*/
{
register
LOCFSERROR
bnexterr
,
delta
;
{
LOCFSERROR
bnexterr
,
delta
;
bnexterr
=
cur0
;
/* Process component 0 */
delta
=
cur0
*
2
;
...
...
dlib/external/libjpeg/jutils.cpp
View file @
6a4ecdcf
...
...
@@ -117,13 +117,13 @@ jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
* The source and destination arrays must be at least as wide as num_cols.
*/
{
register
JSAMPROW
inptr
,
outptr
;
JSAMPROW
inptr
,
outptr
;
#ifdef FMEMCOPY
register
size_t
count
=
(
size_t
)
(
num_cols
*
SIZEOF
(
JSAMPLE
));
size_t
count
=
(
size_t
)
(
num_cols
*
SIZEOF
(
JSAMPLE
));
#else
register
JDIMENSION
count
;
JDIMENSION
count
;
#endif
register
int
row
;
int
row
;
input_array
+=
source_row
;
output_array
+=
dest_row
;
...
...
@@ -149,8 +149,8 @@ jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
#ifdef FMEMCOPY
FMEMCOPY
(
output_row
,
input_row
,
num_blocks
*
(
DCTSIZE2
*
SIZEOF
(
JCOEF
)));
#else
register
JCOEFPTR
inptr
,
outptr
;
register
long
count
;
JCOEFPTR
inptr
,
outptr
;
long
count
;
inptr
=
(
JCOEFPTR
)
input_row
;
outptr
=
(
JCOEFPTR
)
output_row
;
...
...
@@ -169,8 +169,8 @@ jzero_far (void FAR * target, size_t bytestozero)
#ifdef FMEMZERO
FMEMZERO
(
target
,
bytestozero
);
#else
register
char
FAR
*
ptr
=
(
char
FAR
*
)
target
;
register
size_t
count
;
char
FAR
*
ptr
=
(
char
FAR
*
)
target
;
size_t
count
;
for
(
count
=
bytestozero
;
count
>
0
;
count
--
)
{
*
ptr
++
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment