[FFmpeg-cvslog] Merge commit 'a638e9184d63e57e67901f34afe919fd56fd3ac4'

Derek Buitenhuis git at videolan.org
Thu Apr 21 17:52:24 CEST 2016


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Thu Apr 21 16:52:03 2016 +0100| [aa40df483b210ec95154848e068300ccd055286f] | committer: Derek Buitenhuis

Merge commit 'a638e9184d63e57e67901f34afe919fd56fd3ac4'

* commit 'a638e9184d63e57e67901f34afe919fd56fd3ac4':
  vf_fade: make sure the slice end is always in the frame

Merged-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa40df483b210ec95154848e068300ccd055286f
---

 libavfilter/vf_fade.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index f7b2b6a..cf77d87 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -247,7 +247,7 @@ static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr,
     const int width = AV_CEIL_RSHIFT(frame->width, s->hsub);
     const int height= AV_CEIL_RSHIFT(frame->height, s->vsub);
     int slice_start = (height *  jobnr   ) / nb_jobs;
-    int slice_end   = (height * (jobnr+1)) / nb_jobs;
+    int slice_end   = FFMIN(((height * (jobnr+1)) / nb_jobs), frame->height);
 
     for (plane = 1; plane < 3; plane++) {
         for (i = slice_start; i < slice_end; i++) {


======================================================================

diff --cc libavfilter/vf_fade.c
index f7b2b6a,eb6d82a..cf77d87
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@@ -243,11 -121,10 +243,11 @@@ static int filter_slice_chroma(AVFilter
  {
      FadeContext *s = ctx->priv;
      AVFrame *frame = arg;
 -    int slice_h     = FFALIGN(frame->height / nb_jobs, 1 << s->vsub);
 -    int slice_start = jobnr * slice_h;
 -    int slice_end   = FFMIN((jobnr + 1) * slice_h, frame->height);
      int i, j, plane;
 +    const int width = AV_CEIL_RSHIFT(frame->width, s->hsub);
 +    const int height= AV_CEIL_RSHIFT(frame->height, s->vsub);
 +    int slice_start = (height *  jobnr   ) / nb_jobs;
-     int slice_end   = (height * (jobnr+1)) / nb_jobs;
++    int slice_end   = FFMIN(((height * (jobnr+1)) / nb_jobs), frame->height);
  
      for (plane = 1; plane < 3; plane++) {
          for (i = slice_start; i < slice_end; i++) {



More information about the ffmpeg-cvslog mailing list