[5/6] vf_crop: Reindent after previous commit

Message ID 20180214225431.14353-5-sw@jkqxz.net
State New
Headers show
Series
  • [1/6] lavfi: VAAPI VPP common infrastructure.
Related show

Commit Message

Mark Thompson Feb. 14, 2018, 10:54 p.m.
---
 libavfilter/vf_crop.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

Comments

Diego Biurrun Feb. 15, 2018, 9:29 a.m. | #1
On Wed, Feb 14, 2018 at 10:54:30PM +0000, Mark Thompson wrote:
> ---
>  libavfilter/vf_crop.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)

Just squash it with 4/6 IMO.

Diego
Mark Thompson Feb. 15, 2018, 11:09 a.m. | #2
On 15/02/18 09:29, Diego Biurrun wrote:
> On Wed, Feb 14, 2018 at 10:54:30PM +0000, Mark Thompson wrote:
>> ---
>>  libavfilter/vf_crop.c | 30 +++++++++++++++---------------
>>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> Just squash it with 4/6 IMO.

Ok, sure.  (The diff is easier to read in this form, at least.)

- Mark

Patch

diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index dc7fa0dde..abc27c8de 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -168,8 +168,8 @@  static int config_input(AVFilterLink *link)
         s->hsub = 1;
         s->vsub = 1;
     } else {
-    s->hsub = pix_desc->log2_chroma_w;
-    s->vsub = pix_desc->log2_chroma_h;
+        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),
@@ -283,23 +283,23 @@  static int filter_frame(AVFilterLink *link, AVFrame *frame)
         frame->width  = s->w;
         frame->height = s->h;
 
-    frame->data[0] += s->y * frame->linesize[0];
-    frame->data[0] += s->x * s->max_step[0];
+        frame->data[0] += s->y * frame->linesize[0];
+        frame->data[0] += s->x * s->max_step[0];
 
-    if (!(desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)) {
-        for (i = 1; i < 3; i ++) {
-            if (frame->data[i]) {
-                frame->data[i] += (s->y >> s->vsub) * frame->linesize[i];
-                frame->data[i] += (s->x * s->max_step[i]) >> s->hsub;
+        if (!(desc->flags & AV_PIX_FMT_FLAG_PAL || desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL)) {
+            for (i = 1; i < 3; i ++) {
+                if (frame->data[i]) {
+                    frame->data[i] += (s->y >> s->vsub) * frame->linesize[i];
+                    frame->data[i] += (s->x * s->max_step[i]) >> s->hsub;
+                }
             }
         }
-    }
 
-    /* alpha plane */
-    if (frame->data[3]) {
-        frame->data[3] += s->y * frame->linesize[3];
-        frame->data[3] += s->x * s->max_step[3];
-    }
+        /* alpha plane */
+        if (frame->data[3]) {
+            frame->data[3] += s->y * frame->linesize[3];
+            frame->data[3] += s->x * s->max_step[3];
+        }
     }
 
     s->var_values[VAR_N] += 1.0;