aboutsummaryrefslogtreecommitdiff
path: root/ports/opencv4/0006-jpeg2000_getref.patch
blob: 7b0fc09c0cb1efd9f50b4411abe9d7008cebc06f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff --git a/modules/imgcodecs/src/grfmt_jpeg2000.cpp b/modules/imgcodecs/src/grfmt_jpeg2000.cpp
--- a/modules/imgcodecs/src/grfmt_jpeg2000.cpp
+++ b/modules/imgcodecs/src/grfmt_jpeg2000.cpp
@@ -375,13 +375,13 @@
     int lshift = MAX(0, -rshift);
     rshift = MAX(0, rshift);
     int delta = (rshift > 0 ? 1 << (rshift - 1) : 0) + offset;
 
     for( y = 0; y < yend - ystart; )
     {
-        jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
+        jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
         uchar* dst = data + (y - yoffset) * step - xoffset;
 
         if( xstep == 1 )
         {
             if( maxval == 256 && offset == 0 )
                 for( x = 0; x < xend - xstart; x++ )
@@ -441,13 +441,13 @@
     int lshift = MAX(0, -rshift);
     rshift = MAX(0, rshift);
     int delta = (rshift > 0 ? 1 << (rshift - 1) : 0) + offset;
 
     for( y = 0; y < yend - ystart; )
     {
-        jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
+        jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
         ushort* dst = data + (y - yoffset) * step - xoffset;
 
         if( xstep == 1 )
         {
             if( maxval == 65536 && offset == 0 )
                 for( x = 0; x < xend - xstart; x++ )