0001-Fix-build-of-grfmt_jpeg2000-cpp.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From f66fc199a20882c546fa31142e9c0f5a8b3cf983 Mon Sep 17 00:00:00 2001
  2. From: Florian Jung <flo@windfis.ch>
  3. Date: Wed, 29 Jul 2020 18:51:55 +0200
  4. Subject: [PATCH] Fix build of grfmt_jpeg2000.cpp
  5. libjasper has recently changed `jas_matrix_get` from a macro to an inline function
  6. (389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.
  7. [Retrieved (and backported) from:
  8. https://github.com/opencv/opencv/commit/f66fc199a20882c546fa31142e9c0f5a8b3cf983]
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. modules/imgcodecs/src/grfmt_jpeg2000.cpp | 4 ++--
  12. 1 file changed, 2 insertions(+), 2 deletions(-)
  13. diff --git a/modules/highgui/src/grfmt_jpeg2000.cpp b/modules/highgui/src/grfmt_jpeg2000.cpp
  14. index fe69f80c86f..0f4d28d6f4d 100644
  15. --- a/modules/highgui/src/grfmt_jpeg2000.cpp
  16. +++ b/modules/highgui/src/grfmt_jpeg2000.cpp
  17. @@ -377,7 +377,7 @@ bool Jpeg2KDecoder::readComponent8u( uchar *data, void *_buffer,
  18. for( y = 0; y < yend - ystart; )
  19. {
  20. - jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
  21. + jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
  22. uchar* dst = data + (y - yoffset) * step - xoffset;
  23. if( xstep == 1 )
  24. @@ -443,7 +443,7 @@ bool Jpeg2KDecoder::readComponent16u( unsigned short *data, void *_buffer,
  25. for( y = 0; y < yend - ystart; )
  26. {
  27. - jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
  28. + jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
  29. ushort* dst = data + (y - yoffset) * step - xoffset;
  30. if( xstep == 1 )