[med-svn] r19611 - in trunk/packages/vxl/trunk/debian: . patches

Andreas Tille tille at moszumanska.debian.org
Wed Jul 15 08:10:44 UTC 2015


Author: tille
Date: 2015-07-15 08:10:42 +0000 (Wed, 15 Jul 2015)
New Revision: 19611

Added:
   trunk/packages/vxl/trunk/debian/patches/gcc-5x.patch
   trunk/packages/vxl/trunk/debian/patches/libav10.patch
Modified:
   trunk/packages/vxl/trunk/debian/changelog
   trunk/packages/vxl/trunk/debian/control
   trunk/packages/vxl/trunk/debian/patches/series
Log:
Apply patch from fedora trying to fix #778165


Modified: trunk/packages/vxl/trunk/debian/changelog
===================================================================
--- trunk/packages/vxl/trunk/debian/changelog	2015-07-14 07:48:44 UTC (rev 19610)
+++ trunk/packages/vxl/trunk/debian/changelog	2015-07-15 08:10:42 UTC (rev 19611)
@@ -1,3 +1,14 @@
+vxl (1.17.0.dfsg-2) UNRELEASED; urgency=medium
+
+  * cme fix dpkg-control
+  * Apply patch from fedora (Thanks to Brett Johnson <brett at hp.com> for
+    forwarding)
+    Closes: #778165
+  TODO: Build error
+     fatal error: libc.h: No such file or directory
+
+ -- Andreas Tille <tille at debian.org>  Thu, 25 Jun 2015 11:12:23 +0200
+
 vxl (1.17.0.dfsg-1) unstable; urgency=low
 
   [ Mathieu Malaterre ]

Modified: trunk/packages/vxl/trunk/debian/control
===================================================================
--- trunk/packages/vxl/trunk/debian/control	2015-07-14 07:48:44 UTC (rev 19610)
+++ trunk/packages/vxl/trunk/debian/control	2015-07-15 08:10:42 UTC (rev 19611)
@@ -29,7 +29,7 @@
                opencl-headers,
                python-dev,
                zlib1g-dev
-Standards-Version: 3.9.5
+Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/vxl/trunk/
 Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/vxl/trunk/
 Homepage: http://vxl.sf.net

Added: trunk/packages/vxl/trunk/debian/patches/gcc-5x.patch
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/gcc-5x.patch	                        (rev 0)
+++ trunk/packages/vxl/trunk/debian/patches/gcc-5x.patch	2015-07-15 08:10:42 UTC (rev 19611)
@@ -0,0 +1,17 @@
+Author: Brett Johnson <brett at hp.com>
+Last-Update: Tue, 14 Jul 2015 17:01:41 -0600
+Description: Patch from Fedora fixes original build problem
+
+--- a/vcl/vcl_compiler.h
++++ b/vcl/vcl_compiler.h
+@@ -119,6 +119,10 @@
+ #  else
+ #   define VCL_GCC_40
+ #  endif
++# elif (__GNUC__==5)
++// pretend to be GCC 4 until upstream fixes this..
++#  define VCL_GCC_4
++#  define VCL_GCC_41
+ # else
+ #  error "Dunno about this gcc"
+ # endif

Added: trunk/packages/vxl/trunk/debian/patches/libav10.patch
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/libav10.patch	                        (rev 0)
+++ trunk/packages/vxl/trunk/debian/patches/libav10.patch	2015-07-15 08:10:42 UTC (rev 19611)
@@ -0,0 +1,234 @@
+From: anton at khirnov.net
+To: 739457 at bugs.debian.org
+Subject: Re: FTBFS with libav10
+Date: Tue, 25 Feb 2014 16:49:25 +0100
+
+--- a/core/vidl/vidl_ffmpeg_istream_v3.txx
++++ b/core/vidl/vidl_ffmpeg_istream_v3.txx
+@@ -182,7 +182,7 @@ open(const vcl_string& filename)
+   // The MPEG 2 codec has a latency of 1 frame when encoded in an AVI
+   // stream, so the dts of the last packet (stored in last_dts) is
+   // actually the next frame's dts.
+-  if ( is_->vid_str_->codec->codec_id == CODEC_ID_MPEG2VIDEO &&
++  if ( is_->vid_str_->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO &&
+        vcl_string("avi") == is_->fmt_cxt_->iformat->name ) {
+     is_->frame_number_offset_ = 1;
+   }
+@@ -216,7 +216,7 @@ close()
+     is_->vid_str_ = 0;
+   }
+   if ( is_->fmt_cxt_ ) {
+-    av_close_input_file( is_->fmt_cxt_ );
++    avformat_close_input( &is_->fmt_cxt_ );
+     is_->fmt_cxt_ = 0;
+   }
+ }
+@@ -286,7 +286,7 @@ frame_number() const
+   }
+ 
+   return (unsigned int)( ((is_->last_dts - is_->start_time)
+-                          * is_->vid_str_->r_frame_rate.num / is_->vid_str_->r_frame_rate.den
++                          * is_->vid_str_->avg_frame_rate.num / is_->vid_str_->avg_frame_rate.den
+                           * is_->vid_str_->time_base.num + is_->vid_str_->time_base.den/2)
+                            / is_->vid_str_->time_base.den
+                            - int(is_->frame_number_offset_) );
+@@ -349,7 +349,7 @@ vidl_ffmpeg_istream
+     return 0.0;
+   }
+ 
+-  return static_cast<double>(is_->vid_str_->r_frame_rate.num) / is_->vid_str_->r_frame_rate.den;
++  return static_cast<double>(is_->vid_str_->avg_frame_rate.num) / is_->vid_str_->avg_frame_rate.den;
+ }
+ 
+ 
+@@ -422,8 +422,8 @@ advance()
+     if ( avcodec_decode_video2( codec,
+                                 is_->frame_, &got_picture,
+                                 &is_->packet_ ) >= 0 ) {
+-      is_->last_dts += int64_t(is_->vid_str_->time_base.den) * is_->vid_str_->r_frame_rate.den
+-        / is_->vid_str_->time_base.num / is_->vid_str_->r_frame_rate.num;
++      is_->last_dts += int64_t(is_->vid_str_->time_base.den) * is_->vid_str_->avg_frame_rate.den
++        / is_->vid_str_->time_base.num / is_->vid_str_->avg_frame_rate.num;
+     }
+   }
+ 
+@@ -555,9 +555,9 @@ seek_frame(unsigned int frame)
+   int64_t req_timestamp =
+     int64_t(frame + is_->frame_number_offset_)
+     * is_->vid_str_->time_base.den
+-    * is_->vid_str_->r_frame_rate.den
++    * is_->vid_str_->avg_frame_rate.den
+     / is_->vid_str_->time_base.num
+-    / is_->vid_str_->r_frame_rate.num
++    / is_->vid_str_->avg_frame_rate.num
+     + is_->start_time;
+ 
+   // Seek to a keyframe before the timestamp that we want.
+--- a/core/vidl/vidl_ffmpeg_ostream_v4.txx
++++ b/core/vidl/vidl_ffmpeg_ostream_v4.txx
+@@ -25,7 +25,9 @@
+ extern "C" {
+ #if FFMPEG_IN_SEVERAL_DIRECTORIES
+ #include <libavformat/avformat.h>
++#include <libavutil/mathematics.h>
+ #include <libavutil/mem.h>
++#include <libavutil/opt.h>
+ #else
+ #include <ffmpeg/avformat.h>
+ #endif
+@@ -56,7 +58,6 @@ struct vidl_ffmpeg_ostream::pimpl
+   AVFormatContext* fmt_cxt_;
+   bool file_opened_;
+   bool codec_opened_;
+-  vil_memory_chunk_sptr bit_buf_;
+   unsigned int cur_frame_;
+   char* video_rc_eq_;
+ };
+@@ -102,10 +103,6 @@ open()
+   // Close any open files
+   close();
+ 
+-  // a raw video packet is the same size as the input image. Others
+-  // are smaller.
+-  os_->bit_buf_ = new vil_memory_chunk( params_.ni_ * params_.nj_ * 3, VIL_PIXEL_FORMAT_BYTE );
+-
+   os_->fmt_cxt_ = avformat_alloc_context();
+ 
+   AVOutputFormat* file_oformat = 0;
+@@ -151,25 +148,25 @@ open()
+     video_enc->codec_id = file_oformat->video_codec;
+     break;
+    case vidl_ffmpeg_ostream_params::MPEG4:
+-    video_enc->codec_id = CODEC_ID_MPEG4;
++    video_enc->codec_id = AV_CODEC_ID_MPEG4;
+     break;
+    case vidl_ffmpeg_ostream_params::MPEG2VIDEO:
+-    video_enc->codec_id = CODEC_ID_MPEG2VIDEO;
++    video_enc->codec_id = AV_CODEC_ID_MPEG2VIDEO;
+     break;
+    case vidl_ffmpeg_ostream_params::MSMPEG4V2:
+-    video_enc->codec_id = CODEC_ID_MSMPEG4V2;
++    video_enc->codec_id = AV_CODEC_ID_MSMPEG4V2;
+     break;
+    case vidl_ffmpeg_ostream_params::RAWVIDEO:
+-    video_enc->codec_id = CODEC_ID_RAWVIDEO;
++    video_enc->codec_id = AV_CODEC_ID_RAWVIDEO;
+     break;
+    case vidl_ffmpeg_ostream_params::LJPEG:
+-    video_enc->codec_id = CODEC_ID_LJPEG;
++    video_enc->codec_id = AV_CODEC_ID_LJPEG;
+     break;
+    case vidl_ffmpeg_ostream_params::HUFFYUV:
+-    video_enc->codec_id = CODEC_ID_HUFFYUV;
++    video_enc->codec_id = AV_CODEC_ID_HUFFYUV;
+     break;
+    case vidl_ffmpeg_ostream_params::DVVIDEO:
+-    video_enc->codec_id = CODEC_ID_DVVIDEO;
++    video_enc->codec_id = AV_CODEC_ID_DVVIDEO;
+     break;
+    default:
+     vcl_cout << "ffmpeg: Unknown encoder type\n";
+@@ -225,8 +222,8 @@ open()
+     if ( *p == -1 )
+       video_enc->pix_fmt = codec->pix_fmts[0];
+   }
+-  else if ( codec && ( codec->id == CODEC_ID_RAWVIDEO ||
+-                      codec->id == CODEC_ID_HUFFYUV ) )
++  else if ( codec && ( codec->id == AV_CODEC_ID_RAWVIDEO ||
++                      codec->id == AV_CODEC_ID_HUFFYUV ) )
+   {
+     // these formats only support the YUV input image formats
+     video_enc->pix_fmt = PIX_FMT_YUV420P;
+@@ -256,7 +253,7 @@ open()
+   video_enc->spatial_cplx_masking = params_.scplx_mask_;
+   video_enc->temporal_cplx_masking = params_.tcplx_mask_;
+   video_enc->p_masking = params_.p_mask_;
+-  video_enc->quantizer_noise_shaping= params_.qns_;
++  av_opt_set_int(video_enc, "quantizer_noise_shaping", params_.qns_, AV_OPT_SEARCH_CHILDREN);
+ 
+   if (params_.use_umv_)
+   {
+@@ -305,11 +302,11 @@ open()
+   }
+   if (params_.use_qprd_)
+   {
+-    video_enc->flags |= CODEC_FLAG_QP_RD;
++    av_opt_set(video_enc, "mpv_flags", "+qp_rd", AV_OPT_SEARCH_CHILDREN);
+   }
+   if (params_.use_cbprd_)
+   {
+-    video_enc->flags |= CODEC_FLAG_CBP_RD;
++    av_opt_set(video_enc, "mpv_flags", "+cbp_rd", AV_OPT_SEARCH_CHILDREN);
+   }
+   if (params_.b_frames_)
+   {
+@@ -325,6 +322,8 @@ open()
+   {
+     video_enc->flags |= CODEC_FLAG_INTERLACED_ME;
+   }
++
++
+   video_enc->qmin = params_.video_qmin_;
+   video_enc->qmax = params_.video_qmax_;
+   video_enc->lmin = params_.video_lmin_;
+@@ -490,13 +489,14 @@ write_frame(const vidl_frame_sptr& frame
+   vidl_pixel_format target_fmt = vidl_pixel_format_from_ffmpeg(codec->pix_fmt);
+   static vidl_frame_sptr temp_frame = new vidl_shared_frame(NULL,frame->ni(),frame->nj(),target_fmt);
+ 
+-  AVFrame out_frame;
+-  avcodec_get_frame_defaults( &out_frame );
++  AVFrame *out_frame = av_frame_alloc();
++  if (!out_frame)
++    return false;
+ 
+   // The frame is in the correct format to encode directly
+   if ( codec->pix_fmt == fmt )
+   {
+-    avpicture_fill((AVPicture*)&out_frame, (uint8_t*) frame->data(),
++    avpicture_fill((AVPicture*)out_frame, (uint8_t*) frame->data(),
+                    fmt, frame->ni(), frame->nj());
+   }
+   else
+@@ -516,30 +516,26 @@ write_frame(const vidl_frame_sptr& frame
+         return false;
+       }
+     }
+-    avpicture_fill((AVPicture*)&out_frame, (uint8_t*) temp_frame->data(),
++    avpicture_fill((AVPicture*)out_frame, (uint8_t*) temp_frame->data(),
+                    codec->pix_fmt, frame->ni(), frame->nj());
+   }
+ 
+-  AVPacket pkt;
+-  av_init_packet( &pkt );
+-  pkt.stream_index = 0;
++  AVPacket pkt = { 0 };
+ 
+-  out_frame.pts = os_->cur_frame_;
++  out_frame->pts = os_->cur_frame_;
+ 
+-  int ret = avcodec_encode_video( codec, (uint8_t*)os_->bit_buf_->data(), os_->bit_buf_->size(), &out_frame );
++  int got_packet;
++  int ret = avcodec_encode_video2( codec, &pkt, out_frame, &got_packet );
++  av_frame_free(&out_frame);
+ 
+-  if ( ret ) {
+-    pkt.data = (uint8_t*)os_->bit_buf_->data();
+-    pkt.size = ret;
+-    if ( codec->coded_frame ) {
+-      pkt.pts = codec->coded_frame->pts;
+-    }
+-    if ( codec->coded_frame && codec->coded_frame->key_frame ) {
+-      pkt.flags |= AV_PKT_FLAG_KEY;
+-    }
++  pkt.stream_index = 0;
++  if ( ret >= 0 && got_packet) {
++    AVStream *st = os_->fmt_cxt_->streams[0];
++    pkt.pts = av_rescale_q(pkt.pts, codec->time_base, st->time_base);
++    pkt.dts = av_rescale_q(pkt.dts, codec->time_base, st->time_base);
+     av_interleaved_write_frame( os_->fmt_cxt_, &pkt );
+   }
+-  else {
++  else if (ret < 0) {
+     return false;
+   }
+ 

Modified: trunk/packages/vxl/trunk/debian/patches/series
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/series	2015-07-14 07:48:44 UTC (rev 19610)
+++ trunk/packages/vxl/trunk/debian/patches/series	2015-07-15 08:10:42 UTC (rev 19611)
@@ -18,3 +18,4 @@
 shared-lib-without-dependency-information.patch
 #compflags.patch
 libav10.patch
+gcc-5x.patch




More information about the debian-med-commit mailing list