summaryrefslogtreecommitdiff
path: root/sci-libs/ViSP/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/ViSP/files
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/ViSP/files')
-rw-r--r--sci-libs/ViSP/files/ViSP-3.0.0-ffmpeg3.patch78
-rw-r--r--sci-libs/ViSP/files/ViSP-3.0.1-opencv.patch12
2 files changed, 90 insertions, 0 deletions
diff --git a/sci-libs/ViSP/files/ViSP-3.0.0-ffmpeg3.patch b/sci-libs/ViSP/files/ViSP-3.0.0-ffmpeg3.patch
new file mode 100644
index 000000000000..8fd3c8b1edb3
--- /dev/null
+++ b/sci-libs/ViSP/files/ViSP-3.0.0-ffmpeg3.patch
@@ -0,0 +1,78 @@
+Index: visp-3.0.0/modules/io/src/video/vpFFMPEG.cpp
+===================================================================
+--- visp-3.0.0.orig/modules/io/src/video/vpFFMPEG.cpp
++++ visp-3.0.0/modules/io/src/video/vpFFMPEG.cpp
+@@ -180,7 +180,7 @@ bool vpFFMPEG::openStream(const char *fi
+ if (pFrameRGB == NULL)
+ return false;
+
+- numBytes = avpicture_get_size (PIX_FMT_RGB24,pCodecCtx->width,pCodecCtx->height);
++ numBytes = avpicture_get_size (AV_PIX_FMT_RGB24,pCodecCtx->width,pCodecCtx->height);
+ }
+
+ else if (color_type == vpFFMPEG::GRAY_SCALED)
+@@ -194,7 +194,7 @@ bool vpFFMPEG::openStream(const char *fi
+ if (pFrameGRAY == NULL)
+ return false;
+
+- numBytes = avpicture_get_size (PIX_FMT_GRAY8,pCodecCtx->width,pCodecCtx->height);
++ numBytes = avpicture_get_size (AV_PIX_FMT_GRAY8,pCodecCtx->width,pCodecCtx->height);
+ }
+
+ /*
+@@ -211,10 +211,10 @@ bool vpFFMPEG::openStream(const char *fi
+ }
+
+ if (color_type == vpFFMPEG::COLORED)
+- avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
++ avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
+
+ else if (color_type == vpFFMPEG::GRAY_SCALED)
+- avpicture_fill((AVPicture *)pFrameGRAY, buffer, PIX_FMT_GRAY8, pCodecCtx->width, pCodecCtx->height);
++ avpicture_fill((AVPicture *)pFrameGRAY, buffer, AV_PIX_FMT_GRAY8, pCodecCtx->width, pCodecCtx->height);
+
+ streamWasOpen = true;
+
+@@ -231,10 +231,10 @@ bool vpFFMPEG::openStream(const char *fi
+ bool vpFFMPEG::initStream()
+ {
+ if (color_type == vpFFMPEG::COLORED)
+- img_convert_ctx= sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,pCodecCtx->height,PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
++ img_convert_ctx= sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,pCodecCtx->height,AV_PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);
+
+ else if (color_type == vpFFMPEG::GRAY_SCALED)
+- img_convert_ctx= sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,pCodecCtx->height,PIX_FMT_GRAY8, SWS_BICUBIC, NULL, NULL, NULL);
++ img_convert_ctx= sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,pCodecCtx->height,AV_PIX_FMT_GRAY8, SWS_BICUBIC, NULL, NULL, NULL);
+
+ int ret = av_seek_frame(pFormatCtx, (int)videoStream, 0, AVSEEK_FLAG_ANY) ;
+ if (ret < 0 )
+@@ -703,7 +703,7 @@ bool vpFFMPEG::openEncoder(const char *f
+ pCodecCtx->time_base.den = framerate_encoder;
+ pCodecCtx->gop_size = 10; /* emit one intra frame every ten frames */
+ pCodecCtx->max_b_frames=1;
+- pCodecCtx->pix_fmt = PIX_FMT_YUV420P;
++ pCodecCtx->pix_fmt = AV_PIX_FMT_YUV420P;
+
+ /* open it */
+ #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53,35,0) // libavcodec 53.35.0
+@@ -726,15 +726,15 @@ bool vpFFMPEG::openEncoder(const char *f
+ outbuf_size = 100000;
+ outbuf = new uint8_t[outbuf_size];
+
+- numBytes = avpicture_get_size (PIX_FMT_YUV420P,pCodecCtx->width,pCodecCtx->height);
++ numBytes = avpicture_get_size (AV_PIX_FMT_YUV420P,pCodecCtx->width,pCodecCtx->height);
+ picture_buf = new uint8_t[numBytes];
+- avpicture_fill((AVPicture *)pFrame, picture_buf, PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
++ avpicture_fill((AVPicture *)pFrame, picture_buf, AV_PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height);
+
+- numBytes = avpicture_get_size (PIX_FMT_RGB24,pCodecCtx->width,pCodecCtx->height);
++ numBytes = avpicture_get_size (AV_PIX_FMT_RGB24,pCodecCtx->width,pCodecCtx->height);
+ buffer = new uint8_t[numBytes];
+- avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
++ avpicture_fill((AVPicture *)pFrameRGB, buffer, AV_PIX_FMT_RGB24, pCodecCtx->width, pCodecCtx->height);
+
+- img_convert_ctx= sws_getContext(pCodecCtx->width, pCodecCtx->height, PIX_FMT_RGB24, pCodecCtx->width,pCodecCtx->height,PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
++ img_convert_ctx= sws_getContext(pCodecCtx->width, pCodecCtx->height, AV_PIX_FMT_RGB24, pCodecCtx->width,pCodecCtx->height,AV_PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL);
+
+ encoderWasOpened = true;
+
diff --git a/sci-libs/ViSP/files/ViSP-3.0.1-opencv.patch b/sci-libs/ViSP/files/ViSP-3.0.1-opencv.patch
new file mode 100644
index 000000000000..c50dcb6d182e
--- /dev/null
+++ b/sci-libs/ViSP/files/ViSP-3.0.1-opencv.patch
@@ -0,0 +1,12 @@
+Index: visp-3.0.1/modules/core/CMakeLists.txt
+===================================================================
+--- visp-3.0.1.orig/modules/core/CMakeLists.txt
++++ visp-3.0.1/modules/core/CMakeLists.txt
+@@ -182,6 +182,7 @@ if(USE_OPENCV)
+ if(OpenCV_INCLUDE_DIRS)
+ list(APPEND opt_incs ${OpenCV_INCLUDE_DIRS})
+ endif()
++ list(APPEND opt_libs ${OpenCV_LIBS})
+ endif(USE_OPENCV)
+
+ if(USE_YARP)