]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit 'ba09675f44612fad9f7169f71b8276beb50a0dcd'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 16 May 2013 08:14:00 +0000 (10:14 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 16 May 2013 08:14:00 +0000 (10:14 +0200)
* commit 'ba09675f44612fad9f7169f71b8276beb50a0dcd':
  vf_delogo: use the name 's' for the pointer to the private context
  vf_cropdetect: use the name 's' for the pointer to the private context
  vf_crop: cosmetics, break lines

Conflicts:
libavfilter/vf_delogo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavfilter/vf_crop.c
libavfilter/vf_cropdetect.c
libavfilter/vf_delogo.c

index 829d0bb422462bf9eb448e68fc7bdcf61894ce7e,bf9e85f424e4ad1031acb2a775e3af2542b0d9a6..4edb7cfb05830e507c0781fd54b5d0302d77b8b0
@@@ -176,18 -165,22 +176,22 @@@ static int config_input(AVFilterLink *l
      s->hsub = pix_desc->log2_chroma_w;
      s->vsub = pix_desc->log2_chroma_h;
  
 -    if ((ret = av_expr_parse_and_eval(&res, (expr = s->ow_expr),
 +    if ((ret = av_expr_parse_and_eval(&res, (expr = s->w_expr),
                                        var_names, s->var_values,
-                                       NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) goto fail_expr;
+                                       NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
+         goto fail_expr;
      s->var_values[VAR_OUT_W] = s->var_values[VAR_OW] = res;
 -    if ((ret = av_expr_parse_and_eval(&res, (expr = s->oh_expr),
 +    if ((ret = av_expr_parse_and_eval(&res, (expr = s->h_expr),
                                        var_names, s->var_values,
-                                       NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) goto fail_expr;
+                                       NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
+         goto fail_expr;
      s->var_values[VAR_OUT_H] = s->var_values[VAR_OH] = res;
      /* evaluate again ow as it may depend on oh */
 -    if ((ret = av_expr_parse_and_eval(&res, (expr = s->ow_expr),
 +    if ((ret = av_expr_parse_and_eval(&res, (expr = s->w_expr),
                                        var_names, s->var_values,
-                                       NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0) goto fail_expr;
+                                       NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
+         goto fail_expr;
      s->var_values[VAR_OUT_W] = s->var_values[VAR_OW] = res;
      if (normalize_double(&s->w, s->var_values[VAR_OUT_W]) < 0 ||
          normalize_double(&s->h, s->var_values[VAR_OUT_H]) < 0) {
Simple merge
index 7acb01d89497d4ac25e4e7b28be597902d8784c2,4c917baee79efc12b55c6691f24ac6a393a752b6..4bf0867bd9a0a115db956e583df2ccaaeecb38b7
@@@ -182,18 -187,16 +182,18 @@@ static av_cold int init(AVFilterContex
      CHECK_UNSET_OPT(w);
      CHECK_UNSET_OPT(h);
  
-     if (delogo->band < 0 || delogo->show) {
-         delogo->show = 1;
-         delogo->band = 4;
 -    if (s->show)
++    if (s->band < 0 || s->show) {
++        s->show = 1;
+         s->band = 4;
 +    }
  
 -    av_log(ctx, AV_LOG_DEBUG, "x:%d y:%d, w:%d h:%d band:%d show:%d\n",
 +    av_log(ctx, AV_LOG_VERBOSE, "x:%d y:%d, w:%d h:%d band:%d show:%d\n",
-            delogo->x, delogo->y, delogo->w, delogo->h, delogo->band, delogo->show);
+            s->x, s->y, s->w, s->h, s->band, s->show);
  
-     delogo->w += delogo->band*2;
-     delogo->h += delogo->band*2;
-     delogo->x -= delogo->band;
-     delogo->y -= delogo->band;
+     s->w += s->band*2;
+     s->h += s->band*2;
+     s->x -= s->band;
+     s->y -= s->band;
  
      return 0;
  }
@@@ -228,13 -233,11 +228,13 @@@ static int filter_frame(AVFilterLink *i
  
          apply_delogo(out->data[plane], out->linesize[plane],
                       in ->data[plane], in ->linesize[plane],
 -                     inlink->w>>hsub, inlink->h>>vsub,
 +                     FF_CEIL_RSHIFT(inlink->w, hsub),
 +                     FF_CEIL_RSHIFT(inlink->h, vsub),
-                      delogo->x>>hsub, delogo->y>>vsub,
-                      FF_CEIL_RSHIFT(delogo->w, hsub),
-                      FF_CEIL_RSHIFT(delogo->h, vsub),
-                      delogo->band>>FFMIN(hsub, vsub),
-                      delogo->show, direct);
+                      s->x>>hsub, s->y>>vsub,
 -                     s->w>>hsub, s->h>>vsub,
++                     FF_CEIL_RSHIFT(s->w, hsub),
++                     FF_CEIL_RSHIFT(s->h, vsub),
+                      s->band>>FFMIN(hsub, vsub),
+                      s->show, direct);
      }
  
      if (!direct)