projects
/
profile
/
ivi
/
opencv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some formal changes (generally adding constness)
[profile/ivi/opencv.git]
/
modules
/
imgcodecs
/
src
/
grfmt_jpeg2000.cpp
diff --git
a/modules/imgcodecs/src/grfmt_jpeg2000.cpp
b/modules/imgcodecs/src/grfmt_jpeg2000.cpp
index
d711846
..
83fd55a
100644
(file)
--- a/
modules/imgcodecs/src/grfmt_jpeg2000.cpp
+++ b/
modules/imgcodecs/src/grfmt_jpeg2000.cpp
@@
-154,7
+154,7
@@
bool Jpeg2KDecoder::readData( Mat& img )
{
bool result = false;
int color = img.channels() > 1;
{
bool result = false;
int color = img.channels() > 1;
- uchar* data = img.
data
;
+ uchar* data = img.
ptr()
;
int step = (int)img.step;
jas_stream_t* stream = (jas_stream_t*)m_stream;
jas_image_t* image = (jas_image_t*)m_image;
int step = (int)img.step;
jas_stream_t* stream = (jas_stream_t*)m_stream;
jas_image_t* image = (jas_image_t*)m_image;
@@
-478,7
+478,7
@@
bool Jpeg2KEncoder::writeComponent8u( void *__img, const Mat& _img )
for( int y = 0; y < h; y++ )
{
for( int y = 0; y < h; y++ )
{
-
uchar* data = _img.data + _img.step*y
;
+
const uchar* data = _img.ptr(y)
;
for( int i = 0; i < ncmpts; i++ )
{
for( int x = 0; x < w; x++)
for( int i = 0; i < ncmpts; i++ )
{
for( int x = 0; x < w; x++)
@@
-502,7
+502,7
@@
bool Jpeg2KEncoder::writeComponent16u( void *__img, const Mat& _img )
for( int y = 0; y < h; y++ )
{
for( int y = 0; y < h; y++ )
{
-
uchar* data = _img.data + _img.step*y
;
+
const uchar* data = _img.ptr(y)
;
for( int i = 0; i < ncmpts; i++ )
{
for( int x = 0; x < w; x++)
for( int i = 0; i < ncmpts; i++ )
{
for( int x = 0; x < w; x++)