Skip to contentSkip to conversation

package/opencv: fix build with jasper >= 2.0.17

PATCH New Fabrice Fontaine 3 participants 3 messages Aug 16, 2020 – Aug 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/opencv: fix build with jasper >= 2.0.17

Fixes:
- http://autobuild.buildroot.org/results/656e2232a0566ba8f7826a87b1fab9cc2c3d8e46

---
 ...0001-Fix-build-of-grfmt_jpeg2000-cpp.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/opencv/0001-Fix-build-of-grfmt_jpeg2000-cpp.patch
package/opencv/0001-Fix-build-of-grfmt_jpeg2000-cpp.patch new file +37 -0
new file mode 100644
index 0000000000..683dd95d97
@@ -0,0 +1,37 @@
+From f66fc199a20882c546fa31142e9c0f5a8b3cf983 Mon Sep 17 00:00:00 2001
+From: Florian Jung <[email protected]>
+Date: Wed, 29 Jul 2020 18:51:55 +0200
+Subject: [PATCH] Fix build of grfmt_jpeg2000.cpp
+
+libjasper has recently changed `jas_matrix_get` from a macro to an inline function
+(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.
+
+[Retrieved (and backported) from:
+https://github.com/opencv/opencv/commit/f66fc199a20882c546fa31142e9c0f5a8b3cf983]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ modules/imgcodecs/src/grfmt_jpeg2000.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/highgui/src/grfmt_jpeg2000.cpp b/modules/highgui/src/grfmt_jpeg2000.cpp
+index fe69f80c86f..0f4d28d6f4d 100644
+--- a/modules/highgui/src/grfmt_jpeg2000.cpp
++++ b/modules/highgui/src/grfmt_jpeg2000.cpp
+@@ -377,7 +377,7 @@ bool  Jpeg2KDecoder::readComponent8u( uchar *data, void *_buffer,
+ 
+     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 )
+@@ -443,7 +443,7 @@ bool  Jpeg2KDecoder::readComponent16u( unsigned short *data, void *_buffer,
+ 
+     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 )
Signature · 1 line
2.27.0
#1 lore raw

PATCH 1/1 package/opencv: fix build with jasper >= 2.0.17

Fabrice, All,

On 2020-08-16 14:09 +0200, Fabrice Fontaine spake thusly:

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/656e2232a0566ba8f7826a87b1fab9cc2c3d8e46

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 55 lines
---
 ...0001-Fix-build-of-grfmt_jpeg2000-cpp.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/opencv/0001-Fix-build-of-grfmt_jpeg2000-cpp.patch
package/opencv/0001-Fix-build-of-grfmt_jpeg2000-cpp.patch new file +37 -0
new file mode 100644
index 0000000000..683dd95d97
@@ -0,0 +1,37 @@
+From f66fc199a20882c546fa31142e9c0f5a8b3cf983 Mon Sep 17 00:00:00 2001
+From: Florian Jung <[email protected]>
+Date: Wed, 29 Jul 2020 18:51:55 +0200
+Subject: [PATCH] Fix build of grfmt_jpeg2000.cpp
+
+libjasper has recently changed `jas_matrix_get` from a macro to an inline function
+(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.
+
+[Retrieved (and backported) from:
+https://github.com/opencv/opencv/commit/f66fc199a20882c546fa31142e9c0f5a8b3cf983]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ modules/imgcodecs/src/grfmt_jpeg2000.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/highgui/src/grfmt_jpeg2000.cpp b/modules/highgui/src/grfmt_jpeg2000.cpp
+index fe69f80c86f..0f4d28d6f4d 100644
+--- a/modules/highgui/src/grfmt_jpeg2000.cpp
++++ b/modules/highgui/src/grfmt_jpeg2000.cpp
+@@ -377,7 +377,7 @@ bool  Jpeg2KDecoder::readComponent8u( uchar *data, void *_buffer,
+ 
+     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 )
+@@ -443,7 +443,7 @@ bool  Jpeg2KDecoder::readComponent16u( unsigned short *data, void *_buffer,
+ 
+     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 )
Signature · 6 lines
2.27.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'