olena: olena-2.0-514-gb252515 Merge branch 'exp/image2d-ffmpeg' into exp/TL

This is a merge commit message of the following branches: Merge: 67a45da 47b72ac Conflicts: milena/mln/core/image/image2d_ffmpeg.hh milena/mln/core/image/image2d_ffmpeg.hh | 29 ++++++++++++++++++++--------- 1 files changed, 20 insertions(+), 9 deletions(-) diff --cc milena/mln/core/image/image2d_ffmpeg.hh index 2b727bb,6584f1d..ea000da --- a/milena/mln/core/image/image2d_ffmpeg.hh +++ b/milena/mln/core/image/image2d_ffmpeg.hh @@@ -67,7 -67,8 +67,9 @@@ namespace ml V** array_; box2d b_; // theoretical box -- ++ + void deallocate_(); ++ // FIXME: we would like to get border information from ffmpeg. //box2d vb_; }; @@@ -255,8 -256,8 +257,7 @@@ data< image2d_ffmpeg<V> >::data(AVFrame *frame) : frame_(frame) { - b_ = make::box2d(frame->height, frame->linesize); // frame->width ? - - b_ = make::box2d(frame->height, frame->linesize[0]); // frame->width ? - ++ b_ = make::box2d(frame->height, frame->linesize[0]); // frame->width ? unsigned nr = frame->height, nc = frame->width; @@@ -264,9 -266,10 +265,9 @@@ buffer_ = static_cast<V*>((void *)frame->data[0]); V* buf = static_cast<V*>((void *)frame->data[0]); for (unsigned i = 0; i < nr; ++i) - { array_[i] = buf; - buf += frame->linesize; - buf = frame->linesize; ++ buf += frame->linesize[0]; } } @@@ -458,14 -461,14 +459,24 @@@ mln_precondition(this->is_valid()); return this->data_->buffer_; } + + template <typename V> + inline + int + image2d_ffmpeg<V>::delta_offset(const dpoint2d& dp) const + { + mln_precondition(this->is_valid()); - int o = dp[0] * this->data_->frame->linesize + dp[1]; ++ int o = dp[0] * this->data_->frame->linesize[0] + dp[1]; ++ return o; ++ } + + template <typename V> + inline + int + image2d_ffmpeg<V>::delta_offset(const dpoint2d& dp) const + { + mln_precondition(this->is_valid()); - int o = dp[0] * this->data_->frame->linesize + dp[1]; ++ int o = dp[0] * this->data_->frame->linesize[0] + dp[1]; return o; } hooks/post-receive -- Olena, a generic and efficient image processing platform
participants (1)
-
myriam robert-seidowsky