Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
992eace7
Commit
992eace7
authored
Jul 16, 2010
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed some warnings from xcode
parent
131bd567
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
67 deletions
+67
-67
jcmainct.c
3rdparty/libjpeg/jcmainct.c
+52
-52
jdmainct.c
3rdparty/libjpeg/jdmainct.c
+0
-0
tif_print.c
3rdparty/libtiff/tif_print.c
+1
-1
convert.cpp
modules/core/src/convert.cpp
+2
-2
bcameracalibration.cpp
tests/cv/src/bcameracalibration.cpp
+12
-12
No files found.
3rdparty/libjpeg/jcmainct.c
View file @
992eace7
...
...
@@ -5,8 +5,8 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
* This file contains the main buffer controller for compression.
* The main buffer lies between the pre-processor and the JPEG
* This file contains the main
_ptr
buffer controller for compression.
* The main
_ptr
buffer lies between the pre-processor and the JPEG
* compressor proper; it holds downsampled data in the JPEG colorspace.
*/
...
...
@@ -68,32 +68,32 @@ METHODDEF(void) process_data_buffer_main
METHODDEF
(
void
)
start_pass_main
(
j_compress_ptr
cinfo
,
J_BUF_MODE
pass_mode
)
{
my_main_ptr
main
=
(
my_main_ptr
)
cinfo
->
main
;
my_main_ptr
main
_ptr
=
(
my_main_ptr
)
cinfo
->
main
;
/* Do nothing in raw-data mode. */
if
(
cinfo
->
raw_data_in
)
return
;
main
->
cur_iMCU_row
=
0
;
/* initialize counters */
main
->
rowgroup_ctr
=
0
;
main
->
suspended
=
FALSE
;
main
->
pass_mode
=
pass_mode
;
/* save mode for use by process_data */
main
_ptr
->
cur_iMCU_row
=
0
;
/* initialize counters */
main
_ptr
->
rowgroup_ctr
=
0
;
main
_ptr
->
suspended
=
FALSE
;
main
_ptr
->
pass_mode
=
pass_mode
;
/* save mode for use by process_data */
switch
(
pass_mode
)
{
case
JBUF_PASS_THRU
:
#ifdef FULL_MAIN_BUFFER_SUPPORTED
if
(
main
->
whole_image
[
0
]
!=
NULL
)
if
(
main
_ptr
->
whole_image
[
0
]
!=
NULL
)
ERREXIT
(
cinfo
,
JERR_BAD_BUFFER_MODE
);
#endif
main
->
pub
.
process_data
=
process_data_simple_main
;
main
_ptr
->
pub
.
process_data
=
process_data_simple_main
;
break
;
#ifdef FULL_MAIN_BUFFER_SUPPORTED
case
JBUF_SAVE_SOURCE
:
case
JBUF_CRANK_DEST
:
case
JBUF_SAVE_AND_PASS
:
if
(
main
->
whole_image
[
0
]
==
NULL
)
if
(
main
_ptr
->
whole_image
[
0
]
==
NULL
)
ERREXIT
(
cinfo
,
JERR_BAD_BUFFER_MODE
);
main
->
pub
.
process_data
=
process_data_buffer_main
;
main
_ptr
->
pub
.
process_data
=
process_data_buffer_main
;
break
;
#endif
default
:
...
...
@@ -114,46 +114,46 @@ process_data_simple_main (j_compress_ptr cinfo,
JSAMPARRAY
input_buf
,
JDIMENSION
*
in_row_ctr
,
JDIMENSION
in_rows_avail
)
{
my_main_ptr
main
=
(
my_main_ptr
)
cinfo
->
main
;
my_main_ptr
main
_ptr
=
(
my_main_ptr
)
cinfo
->
main
;
while
(
main
->
cur_iMCU_row
<
cinfo
->
total_iMCU_rows
)
{
/* Read input data if we haven't filled the main buffer yet */
if
(
main
->
rowgroup_ctr
<
DCTSIZE
)
while
(
main
_ptr
->
cur_iMCU_row
<
cinfo
->
total_iMCU_rows
)
{
/* Read input data if we haven't filled the main
_ptr
buffer yet */
if
(
main
_ptr
->
rowgroup_ctr
<
DCTSIZE
)
(
*
cinfo
->
prep
->
pre_process_data
)
(
cinfo
,
input_buf
,
in_row_ctr
,
in_rows_avail
,
main
->
buffer
,
&
main
->
rowgroup_ctr
,
main
_ptr
->
buffer
,
&
main_ptr
->
rowgroup_ctr
,
(
JDIMENSION
)
DCTSIZE
);
/* If we don't have a full iMCU row buffered, return to application for
* more data. Note that preprocessor will always pad to fill the iMCU row
* at the bottom of the image.
*/
if
(
main
->
rowgroup_ctr
!=
DCTSIZE
)
if
(
main
_ptr
->
rowgroup_ctr
!=
DCTSIZE
)
return
;
/* Send the completed row to the compressor */
if
(
!
(
*
cinfo
->
coef
->
compress_data
)
(
cinfo
,
main
->
buffer
))
{
if
(
!
(
*
cinfo
->
coef
->
compress_data
)
(
cinfo
,
main
_ptr
->
buffer
))
{
/* If compressor did not consume the whole row, then we must need to
* suspend processing and return to the application. In this situation
* we pretend we didn't yet consume the last input row; otherwise, if
* it happened to be the last row of the image, the application would
* think we were done.
*/
if
(
!
main
->
suspended
)
{
if
(
!
main
_ptr
->
suspended
)
{
(
*
in_row_ctr
)
--
;
main
->
suspended
=
TRUE
;
main
_ptr
->
suspended
=
TRUE
;
}
return
;
}
/* We did finish the row. Undo our little suspension hack if a previous
* call suspended; then mark the main buffer empty.
* call suspended; then mark the main
_ptr
buffer empty.
*/
if
(
main
->
suspended
)
{
if
(
main
_ptr
->
suspended
)
{
(
*
in_row_ctr
)
++
;
main
->
suspended
=
FALSE
;
main
_ptr
->
suspended
=
FALSE
;
}
main
->
rowgroup_ctr
=
0
;
main
->
cur_iMCU_row
++
;
main
_ptr
->
rowgroup_ctr
=
0
;
main
_ptr
->
cur_iMCU_row
++
;
}
}
...
...
@@ -170,25 +170,25 @@ process_data_buffer_main (j_compress_ptr cinfo,
JSAMPARRAY
input_buf
,
JDIMENSION
*
in_row_ctr
,
JDIMENSION
in_rows_avail
)
{
my_main_ptr
main
=
(
my_main_ptr
)
cinfo
->
main
;
my_main_ptr
main
_ptr
=
(
my_main_ptr
)
cinfo
->
main
;
int
ci
;
jpeg_component_info
*
compptr
;
boolean
writing
=
(
main
->
pass_mode
!=
JBUF_CRANK_DEST
);
boolean
writing
=
(
main
_ptr
->
pass_mode
!=
JBUF_CRANK_DEST
);
while
(
main
->
cur_iMCU_row
<
cinfo
->
total_iMCU_rows
)
{
while
(
main
_ptr
->
cur_iMCU_row
<
cinfo
->
total_iMCU_rows
)
{
/* Realign the virtual buffers if at the start of an iMCU row. */
if
(
main
->
rowgroup_ctr
==
0
)
{
if
(
main
_ptr
->
rowgroup_ctr
==
0
)
{
for
(
ci
=
0
,
compptr
=
cinfo
->
comp_info
;
ci
<
cinfo
->
num_components
;
ci
++
,
compptr
++
)
{
main
->
buffer
[
ci
]
=
(
*
cinfo
->
mem
->
access_virt_sarray
)
((
j_common_ptr
)
cinfo
,
main
->
whole_image
[
ci
],
main
->
cur_iMCU_row
*
(
compptr
->
v_samp_factor
*
DCTSIZE
),
main
_ptr
->
buffer
[
ci
]
=
(
*
cinfo
->
mem
->
access_virt_sarray
)
((
j_common_ptr
)
cinfo
,
main
_ptr
->
whole_image
[
ci
],
main
_ptr
->
cur_iMCU_row
*
(
compptr
->
v_samp_factor
*
DCTSIZE
),
(
JDIMENSION
)
(
compptr
->
v_samp_factor
*
DCTSIZE
),
writing
);
}
/* In a read pass, pretend we just read some source data. */
if
(
!
writing
)
{
*
in_row_ctr
+=
cinfo
->
max_v_samp_factor
*
DCTSIZE
;
main
->
rowgroup_ctr
=
DCTSIZE
;
main
_ptr
->
rowgroup_ctr
=
DCTSIZE
;
}
}
...
...
@@ -197,40 +197,40 @@ process_data_buffer_main (j_compress_ptr cinfo,
if
(
writing
)
{
(
*
cinfo
->
prep
->
pre_process_data
)
(
cinfo
,
input_buf
,
in_row_ctr
,
in_rows_avail
,
main
->
buffer
,
&
main
->
rowgroup_ctr
,
main
_ptr
->
buffer
,
&
main_ptr
->
rowgroup_ctr
,
(
JDIMENSION
)
DCTSIZE
);
/* Return to application if we need more data to fill the iMCU row. */
if
(
main
->
rowgroup_ctr
<
DCTSIZE
)
if
(
main
_ptr
->
rowgroup_ctr
<
DCTSIZE
)
return
;
}
/* Emit data, unless this is a sink-only pass. */
if
(
main
->
pass_mode
!=
JBUF_SAVE_SOURCE
)
{
if
(
!
(
*
cinfo
->
coef
->
compress_data
)
(
cinfo
,
main
->
buffer
))
{
if
(
main
_ptr
->
pass_mode
!=
JBUF_SAVE_SOURCE
)
{
if
(
!
(
*
cinfo
->
coef
->
compress_data
)
(
cinfo
,
main
_ptr
->
buffer
))
{
/* If compressor did not consume the whole row, then we must need to
* suspend processing and return to the application. In this situation
* we pretend we didn't yet consume the last input row; otherwise, if
* it happened to be the last row of the image, the application would
* think we were done.
*/
if
(
!
main
->
suspended
)
{
if
(
!
main
_ptr
->
suspended
)
{
(
*
in_row_ctr
)
--
;
main
->
suspended
=
TRUE
;
main
_ptr
->
suspended
=
TRUE
;
}
return
;
}
/* We did finish the row. Undo our little suspension hack if a previous
* call suspended; then mark the main buffer empty.
* call suspended; then mark the main
_ptr
buffer empty.
*/
if
(
main
->
suspended
)
{
if
(
main
_ptr
->
suspended
)
{
(
*
in_row_ctr
)
++
;
main
->
suspended
=
FALSE
;
main
_ptr
->
suspended
=
FALSE
;
}
}
/* If get here, we are done with this iMCU row. Mark buffer empty. */
main
->
rowgroup_ctr
=
0
;
main
->
cur_iMCU_row
++
;
main
_ptr
->
rowgroup_ctr
=
0
;
main
_ptr
->
cur_iMCU_row
++
;
}
}
...
...
@@ -238,21 +238,21 @@ process_data_buffer_main (j_compress_ptr cinfo,
/*
* Initialize main buffer controller.
* Initialize main
_ptr
buffer controller.
*/
GLOBAL
(
void
)
jinit_c_main_controller
(
j_compress_ptr
cinfo
,
boolean
need_full_buffer
)
{
my_main_ptr
main
;
my_main_ptr
main
_ptr
;
int
ci
;
jpeg_component_info
*
compptr
;
main
=
(
my_main_ptr
)
main
_ptr
=
(
my_main_ptr
)
(
*
cinfo
->
mem
->
alloc_small
)
((
j_common_ptr
)
cinfo
,
JPOOL_IMAGE
,
SIZEOF
(
my_main_controller
));
cinfo
->
main
=
(
struct
jpeg_c_main_controller
*
)
main
;
main
->
pub
.
start_pass
=
start_pass_main
;
cinfo
->
main
=
(
struct
jpeg_c_main_controller
*
)
main
_ptr
;
main
_ptr
->
pub
.
start_pass
=
start_pass_main
;
/* We don't need to create a buffer in raw-data mode. */
if
(
cinfo
->
raw_data_in
)
...
...
@@ -267,7 +267,7 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
/* Note we pad the bottom to a multiple of the iMCU height */
for
(
ci
=
0
,
compptr
=
cinfo
->
comp_info
;
ci
<
cinfo
->
num_components
;
ci
++
,
compptr
++
)
{
main
->
whole_image
[
ci
]
=
(
*
cinfo
->
mem
->
request_virt_sarray
)
main
_ptr
->
whole_image
[
ci
]
=
(
*
cinfo
->
mem
->
request_virt_sarray
)
((
j_common_ptr
)
cinfo
,
JPOOL_IMAGE
,
FALSE
,
compptr
->
width_in_blocks
*
DCTSIZE
,
(
JDIMENSION
)
jround_up
((
long
)
compptr
->
height_in_blocks
,
...
...
@@ -279,12 +279,12 @@ jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer)
#endif
}
else
{
#ifdef FULL_MAIN_BUFFER_SUPPORTED
main
->
whole_image
[
0
]
=
NULL
;
/* flag for no virtual arrays */
main
_ptr
->
whole_image
[
0
]
=
NULL
;
/* flag for no virtual arrays */
#endif
/* Allocate a strip buffer for each component */
for
(
ci
=
0
,
compptr
=
cinfo
->
comp_info
;
ci
<
cinfo
->
num_components
;
ci
++
,
compptr
++
)
{
main
->
buffer
[
ci
]
=
(
*
cinfo
->
mem
->
alloc_sarray
)
main
_ptr
->
buffer
[
ci
]
=
(
*
cinfo
->
mem
->
alloc_sarray
)
((
j_common_ptr
)
cinfo
,
JPOOL_IMAGE
,
compptr
->
width_in_blocks
*
DCTSIZE
,
(
JDIMENSION
)
(
compptr
->
v_samp_factor
*
DCTSIZE
));
...
...
3rdparty/libjpeg/jdmainct.c
View file @
992eace7
This diff is collapsed.
Click to expand it.
3rdparty/libtiff/tif_print.c
View file @
992eace7
...
...
@@ -115,7 +115,7 @@ static int
_TIFFPrettyPrintField
(
TIFF
*
tif
,
FILE
*
fd
,
ttag_t
tag
,
uint32
value_count
,
void
*
raw_data
)
{
TIFFDirectory
*
td
=
&
tif
->
tif_dir
;
//
TIFFDirectory *td = &tif->tif_dir;
switch
(
tag
)
{
...
...
modules/core/src/convert.cpp
View file @
992eace7
...
...
@@ -335,7 +335,7 @@ typedef void (*MixChannelsFunc)( const void** src, const int* sdelta0,
void
mixChannels
(
const
Mat
*
src
,
size_t
nsrcs
,
Mat
*
dst
,
size_t
ndsts
,
const
int
*
fromTo
,
size_t
npairs
)
{
size_t
i
;
size_t
i
,
j
;
if
(
npairs
==
0
)
return
;
...
...
@@ -352,7 +352,7 @@ void mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const in
for
(
i
=
0
;
i
<
npairs
;
i
++
)
{
int
i0
=
fromTo
[
i
*
2
],
i1
=
fromTo
[
i
*
2
+
1
]
,
j
;
int
i0
=
fromTo
[
i
*
2
],
i1
=
fromTo
[
i
*
2
+
1
];
if
(
i0
>=
0
)
{
for
(
j
=
0
;
j
<
nsrcs
;
i0
-=
src
[
j
].
channels
(),
j
++
)
...
...
tests/cv/src/bcameracalibration.cpp
View file @
992eace7
...
...
@@ -54,18 +54,6 @@ public:
imgSize
(
800
,
600
)
{
support_testing_modes
=
CvTS
::
CORRECTNESS_CHECK_MODE
;
Mat_
<
float
>
camMat
(
3
,
3
);
Mat_
<
float
>
distCoeffs
(
1
,
5
);
camMat
<<
300.
f
,
0.
f
,
imgSize
.
width
/
2.
f
,
0
,
300.
f
,
imgSize
.
height
/
2.
f
,
0.
f
,
0.
f
,
1.
f
;
distCoeffs
<<
1.2
f
,
0.2
f
,
0.
f
,
0.
f
,
0.
f
;
ChessBoardGenerator
cbg
(
Size
(
8
,
6
));
corSize
=
cbg
.
cornersSize
();
vector
<
Point2f
>
exp_corn
;
chessBoard
=
cbg
(
Mat
(
imgSize
,
CV_8U
,
Scalar
(
0
)),
camMat
,
distCoeffs
,
exp_corn
);
Mat_
<
Point2f
>
(
corSize
.
height
,
corSize
.
width
,
(
Point2f
*
)
&
exp_corn
[
0
]).
copyTo
(
corners
);
};
~
CV_CameraCalibrationBadArgTest
()
{}
;
protected
:
...
...
@@ -102,6 +90,18 @@ protected:
void
CV_CameraCalibrationBadArgTest
::
run
(
int
/* start_from */
)
{
Mat_
<
float
>
camMat
(
3
,
3
);
Mat_
<
float
>
distCoeffs0
(
1
,
5
);
camMat
<<
300.
f
,
0.
f
,
imgSize
.
width
/
2.
f
,
0
,
300.
f
,
imgSize
.
height
/
2.
f
,
0.
f
,
0.
f
,
1.
f
;
distCoeffs0
<<
1.2
f
,
0.2
f
,
0.
f
,
0.
f
,
0.
f
;
ChessBoardGenerator
cbg
(
Size
(
8
,
6
));
corSize
=
cbg
.
cornersSize
();
vector
<
Point2f
>
exp_corn
;
chessBoard
=
cbg
(
Mat
(
imgSize
,
CV_8U
,
Scalar
(
0
)),
camMat
,
distCoeffs0
,
exp_corn
);
Mat_
<
Point2f
>
(
corSize
.
height
,
corSize
.
width
,
(
Point2f
*
)
&
exp_corn
[
0
]).
copyTo
(
corners
);
CvMat
objPts
,
imgPts
,
npoints
,
cameraMatrix
,
distCoeffs
,
rvecs
,
tvecs
;
Mat
zeros
(
1
,
sizeof
(
CvMat
),
CV_8U
,
Scalar
(
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