Your message dated Tue, 26 Jul 2011 13:49:27 +0000
with message-id <[email protected]>
and subject line Bug#634818: fixed in opencv 2.1.0-7
has caused the Debian Bug report #634818,
regarding FTBFS against Libav 0.7
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
634818: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634818
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: src:opencv
Version: 2.1.0-6
Severity: important
Tags: patch

Hi,

I've uploaded the attached patch to ubuntu that allows the opencv
package to build against Libav 0.7. Libav 0.7 can be found currently in
experimental, and is waiting for clearance to land in unstable since
May 1 (#624807).

The patch itself should also work with Libav 0.6 as currently found in
unstable. If you experience problems, please let me know.

Cheers,

-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 
'natty-proposed'), (500, 'natty')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-0300rc7-generic (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Author: Gal Shalif <[email protected]>
Debian BTS: N/A
Bug-Ubuntu: https://launchpad.net/bugs/756154
Description: Fix opencv-2.1.0 compilation errors when copiled with libav-0.7 (a.k.a. ffmpeg 0.7) - as applicable for Ubuntu 11.10 Oneiric
 Note: Ubuntu 11.04 Natty use libav-0.6.2 with:
       #define LIBAVCODEC_VERSION_MAJOR 52
       #define LIBAVUTIL_VERSION_MAJOR  50
       #define LIBAVFORMAT_BUILD       (52<<16 | 64<<8 | 2)
 Note: Ubuntu 11.10 Oneiric use libav-0.7 with:
       #define LIBAVCODEC_VERSION_MAJOR 53 
       #define LIBAVUTIL_VERSION_MAJOR  51
       #define LIBAVFORMAT_BUILD       (53<<16 | 2<<8 | 0)
--- a/src/highgui/cvcap_ffmpeg.cpp	2011-07-06 12:44:09.585566733 +0300
+++ b/src/highgui/cvcap_ffmpeg.cpp	2011-07-06 13:09:43.261010471 +0300
@@ -464,7 +464,7 @@
         AVCodecContext *enc = &ic->streams[i]->codec;
 #endif
 
-        if( CODEC_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
+        if( AVMEDIA_TYPE_VIDEO == enc->codec_type && video_stream < 0) {
             AVCodec *codec = avcodec_find_decoder(enc->codec_id);
             if (!codec ||
             avcodec_open(enc, codec) < 0)
@@ -514,6 +514,24 @@
 }
 
 
+#if LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */
+/* Gal Shalif: temporary add a backward compatible function - till OpenCV is properly ported to compile against ffmpeg 0.7 */
+/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.6.2/libavcodec/utils.c */
+int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
+                         int *got_picture_ptr,
+                         uint8_t *buf, int buf_size)
+{
+    AVPacket avpkt;
+    av_init_packet(&avpkt);
+    avpkt.data = buf;
+    avpkt.size = buf_size;
+    // HACK for CorePNG to decode as normal PNG by default
+    avpkt.flags = AV_PKT_FLAG_KEY;
+
+    return avcodec_decode_video2(avctx, picture, got_picture_ptr, &avpkt);
+}
+#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) */
+
 bool CvCapture_FFMPEG::grabFrame()
 {
     bool valid = false;
@@ -795,6 +813,17 @@
 #endif
 };
 
+#if LIBAVFORMAT_BUILD >= (53<<16 | 0<<8 | 0) /* As defined when compiled against libav-0.7 from Ubuntu 11.10 Oneiric */
+/* Gal Shalif: temporary add a backward compatible define - till OpenCV is properly ported to compile against ffmpeg 0.7 */
+
+/* Gal Shalif: code is copy from Ubuntu 11.04 Natty libav-0.6.2/libavutil/error.h and is enclosed within LIBAVUTIL_VERSION_MAJOR < 51 ... #endif */
+#define AVERROR_NUMEXPECTED AVERROR(EDOM)    ///< Number syntax expected in filename
+#define AVERROR_NOFMT       AVERROR(EILSEQ)  ///< Unknown format
+#define AVERROR_IO          AVERROR(EIO)     ///< I/O error
+#define AVERROR_NOMEM       AVERROR(ENOMEM)  ///< Not enough memory
+
+#endif /* LIBAVFORMAT_BUILD >= (53<<16 | 2<<8 | 0) */
+
 static const char * icvFFMPEGErrStr(int err)
 {
     switch(err) {
@@ -891,7 +920,7 @@
 #endif
 
 #if LIBAVFORMAT_BUILD > 4621
-	c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
+	c->codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
 #else
 	c->codec_id = oc->oformat->video_codec;
 #endif
@@ -903,7 +932,7 @@
     //if(codec_tag) c->codec_tag=codec_tag;
 	codec = avcodec_find_encoder(c->codec_id);
 
-	c->codec_type = CODEC_TYPE_VIDEO;
+	c->codec_type = AVMEDIA_TYPE_VIDEO;
 
 	/* put sample parameters */
 	c->bit_rate = bitrate;
@@ -990,7 +1019,7 @@
         AVPacket pkt;
         av_init_packet(&pkt);
 
-        pkt.flags |= PKT_FLAG_KEY;
+        pkt.flags |= AV_PKT_FLAG_KEY;
         pkt.stream_index= video_st->index;
         pkt.data= (uint8_t *)picture;
         pkt.size= sizeof(AVPicture);
@@ -1010,7 +1039,7 @@
 			pkt.pts = c->coded_frame->pts;
 #endif
             if(c->coded_frame->key_frame)
-                pkt.flags |= PKT_FLAG_KEY;
+                pkt.flags |= AV_PKT_FLAG_KEY;
             pkt.stream_index= video_st->index;
             pkt.data= outbuf;
             pkt.size= out_size;
@@ -1210,7 +1239,7 @@
 	av_register_all ();
 
 	/* auto detect the output format from the name and fourcc code. */
-	fmt = guess_format(NULL, filename, NULL);
+	fmt = av_guess_format(NULL, filename, NULL);
 	if (!fmt)
         return false;
 
@@ -1233,7 +1262,7 @@
 #endif
 
     // alloc memory for context
-	oc = av_alloc_format_context();
+	oc = avformat_alloc_context();
 	assert (oc);
 
 	/* set file name */

--- End Message ---
--- Begin Message ---
Source: opencv
Source-Version: 2.1.0-7

We believe that the bug you reported is fixed in the latest version of
opencv, which is due to be installed in the Debian FTP archive:

libcv-dev_2.1.0-7_amd64.deb
  to main/o/opencv/libcv-dev_2.1.0-7_amd64.deb
libcv2.1_2.1.0-7_amd64.deb
  to main/o/opencv/libcv2.1_2.1.0-7_amd64.deb
libcvaux-dev_2.1.0-7_amd64.deb
  to main/o/opencv/libcvaux-dev_2.1.0-7_amd64.deb
libcvaux2.1_2.1.0-7_amd64.deb
  to main/o/opencv/libcvaux2.1_2.1.0-7_amd64.deb
libhighgui-dev_2.1.0-7_amd64.deb
  to main/o/opencv/libhighgui-dev_2.1.0-7_amd64.deb
libhighgui2.1_2.1.0-7_amd64.deb
  to main/o/opencv/libhighgui2.1_2.1.0-7_amd64.deb
opencv-doc_2.1.0-7_all.deb
  to main/o/opencv/opencv-doc_2.1.0-7_all.deb
opencv_2.1.0-7.diff.gz
  to main/o/opencv/opencv_2.1.0-7.diff.gz
opencv_2.1.0-7.dsc
  to main/o/opencv/opencv_2.1.0-7.dsc
python-opencv_2.1.0-7_amd64.deb
  to main/o/opencv/python-opencv_2.1.0-7_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Nobuhiro Iwamatsu <[email protected]> (supplier of updated opencv package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 25 Jul 2011 17:06:08 +0900
Source: opencv
Binary: opencv-doc libcv-dev libcvaux-dev libhighgui-dev libcv2.1 libcvaux2.1 
libhighgui2.1 python-opencv
Architecture: source all amd64
Version: 2.1.0-7
Distribution: unstable
Urgency: low
Maintainer: Debian Scientific Computing Team 
<[email protected]>
Changed-By: Nobuhiro Iwamatsu <[email protected]>
Description: 
 libcv-dev  - development files for libcv
 libcv2.1   - computer vision library
 libcvaux-dev - development files for libcvaux
 libcvaux2.1 - computer vision extension library
 libhighgui-dev - development files for libhighgui
 libhighgui2.1 - computer vision GUI library
 opencv-doc - OpenCV documentation and examples
 python-opencv - Python bindings for the computer vision library
Closes: 634818
Changes: 
 opencv (2.1.0-7) unstable; urgency=low
 .
   * Fix FTBFS with libav 0.7. (Closes: #634818)
     Add patches/vcap_ffmpeg_fix_compile_against_libav0.7.patch.
Checksums-Sha1: 
 8dc8fd4cc8f7796ab6fe40b0a97be3ddbfab5c3d 2519 opencv_2.1.0-7.dsc
 1e155dcb064a8d74096a935db65673ab70689e30 19839 opencv_2.1.0-7.diff.gz
 58d9f3002ca823e7eac3614f9b81d380146260a2 9040670 opencv-doc_2.1.0-7_all.deb
 f63f7fb130d50a8e1205ac12ada1860ad43bf36e 3120580 libcv-dev_2.1.0-7_amd64.deb
 85b18d4349952273eb8e09c78a632fe564df24c2 813994 libcvaux-dev_2.1.0-7_amd64.deb
 4189537ed36baacd7f39976d2427e14f7113d371 169188 
libhighgui-dev_2.1.0-7_amd64.deb
 28def2175571c90ef2326b5d0911e54064465c59 2170946 libcv2.1_2.1.0-7_amd64.deb
 e2ae89e5a17b0d069051e8605efd1a48cbd2d71b 568716 libcvaux2.1_2.1.0-7_amd64.deb
 a15326200f4e42963b867b6d2a051ca02dd7120b 121168 libhighgui2.1_2.1.0-7_amd64.deb
 854b2bcc5b37a6b6f4f981d4bda5d0778a8b226b 938892 python-opencv_2.1.0-7_amd64.deb
Checksums-Sha256: 
 e6f0ef19ea8b50f31f21174db37440990fc245f1a3d38b96f0bef90f521f08a2 2519 
opencv_2.1.0-7.dsc
 080725170bcccf34c6b889682612109263ffa81e2f91e3fd31200617e3c55cda 19839 
opencv_2.1.0-7.diff.gz
 8acf5d9fc229f58f4f2d4ce9e05b97ef5bfb5bac3fec3d1ee3966848e8dd26c9 9040670 
opencv-doc_2.1.0-7_all.deb
 3849e06bb21ca0c033a0e6bfea2667cb259101d20d89fd4f7397c9f8ed222cb7 3120580 
libcv-dev_2.1.0-7_amd64.deb
 01cba98df44ce54f4c4f38aef27d03fff1d4b013b536cb30acccb21c2f3ef38e 813994 
libcvaux-dev_2.1.0-7_amd64.deb
 0015719758c988dd7ac479ec8ced02b103d84264ce802b2bb4f2e079a8f5432e 169188 
libhighgui-dev_2.1.0-7_amd64.deb
 33accbe86f41a22a9897ed123aaddd0ad216bd42f563d6d42234f16dadb204db 2170946 
libcv2.1_2.1.0-7_amd64.deb
 cb1547bf7c4b68cc57d5413fbf414b9044ce3c3616750eabf9397df9ddf79783 568716 
libcvaux2.1_2.1.0-7_amd64.deb
 d9f1437069aa3d8c7196a60f6abfade29e166b5eacc9081f00eeb5e17f366582 121168 
libhighgui2.1_2.1.0-7_amd64.deb
 8289e2b6dd5d47d2b90a8a5c13e922cbee49c2c8557d6a1a8858c84ae1f64ca5 938892 
python-opencv_2.1.0-7_amd64.deb
Files: 
 4d3bfd037f65ef6243f2f81c2027ce0a 2519 devel optional opencv_2.1.0-7.dsc
 a416ee839a88533bcbcff0d01f0e4822 19839 devel optional opencv_2.1.0-7.diff.gz
 cb697b72176b153ebc9cbcebb060c99d 9040670 doc optional 
opencv-doc_2.1.0-7_all.deb
 35f06debc4999b4befbe20e56ba49efd 3120580 libdevel optional 
libcv-dev_2.1.0-7_amd64.deb
 ab2d74acb066084f81162432f16ff4a9 813994 libdevel optional 
libcvaux-dev_2.1.0-7_amd64.deb
 1637c98fd71855dd38ac4656de751fee 169188 libdevel optional 
libhighgui-dev_2.1.0-7_amd64.deb
 00de2aa67cb0f0834c657bbcde18736f 2170946 libs optional 
libcv2.1_2.1.0-7_amd64.deb
 40e155677658d1eaaf59ed06f520b45e 568716 libs optional 
libcvaux2.1_2.1.0-7_amd64.deb
 7dc26b9bb75ff66734d3c6620219758a 121168 libs optional 
libhighgui2.1_2.1.0-7_amd64.deb
 c2010bae4dd45266473b179dcd59edf5 938892 python optional 
python-opencv_2.1.0-7_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJOLsF9AAoJEDIkf7tArR+mfV8P/iKXtclZqFlU42t/o8Kgocrc
t9Cx1YGcwRAtQg+cSAE467lMhFIUO10a4ktAKdvb4Dvvcwx32q1wkkpSzDVCFzEA
J1IH6lF6jcV8rwWVQzW5ynHVRoUZ53K82H8i8387bbqDZJ5Bc4bCs2WMo+WHYwtU
fahP2gCyJ+SR3KV0v9/EeoyUqI8bJ1f+I+8O9l7+e8243Y08Adhbh2N7kfbu8Awu
82XLEDcShVkHk28Yl1vEaa2xKe1O9FI135hDP5/6TpPcDkg/DHqHOEdwwU81/hpm
g4uGt3FdBoGNLh9dFfLSIt7amVStGJ2cwIN0vaeX9DVmh/Lf8cJ1ufxwQ7bhM1gm
C34zLHGSrxWUOffVq5odVG8ags9ujtOB99Hkym0CJuf6hP1vC3zYvJAGG4fQ7Xi9
hK06tm2lzIq4PAX0Ou+6J1c1+0S+N4eMkxlmuw+xE1Q6cpQ4Nt9GLaehOPbZMWGG
1Rxs1hhQAdZ5I8PsTTAYfNYmj4g0Gk7tvOc67i3pBBivY7IIv7eGYkp8hHXi5I7e
/8Fy90c6ZXonUN4uYOVAAoeb1VtNgd6NRvjVKSrXcoAeka/xPnRoAKKhNtkweqWB
jfKgK7RT+6OCzvZf9kPY6gcTjIUh2yx0+tqa0zyiwPrsAWMbTHRupRzsQiRwfMrr
Q8t9ZX/t/E3zFKD6AK7q
=dGfF
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to