[FFmpeg-cvslog] swr: reindent.

Ronald S. Bultje git at videolan.org
Mon Jun 16 01:43:10 CEST 2014


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sun Jun 15 18:49:18 2014 -0400| [edf930472bbd892216751413476afcd6e6f0e7e8] | committer: Michael Niedermayer

swr: reindent.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libswresample/resample_template.c |  128 ++++++++++++++++++-------------------
 1 file changed, 64 insertions(+), 64 deletions(-)

diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c
index a132351..f0e1dc0 100644
--- a/libswresample/resample_template.c
+++ b/libswresample/resample_template.c
@@ -123,42 +123,42 @@ int RENAME(swri_resample_common)(ResampleContext *c,
                                  DELEM *dst, const DELEM *src,
                                  int n, int update_ctx)
 {
-            int dst_index;
-            int index= c->index;
-            int frac= c->frac;
-            int dst_incr_frac= c->dst_incr % c->src_incr;
-            int dst_incr=      c->dst_incr / c->src_incr;
-            int sample_index = index >> c->phase_shift;
+    int dst_index;
+    int index= c->index;
+    int frac= c->frac;
+    int dst_incr_frac= c->dst_incr % c->src_incr;
+    int dst_incr=      c->dst_incr / c->src_incr;
+    int sample_index = index >> c->phase_shift;
 
-            index &= c->phase_mask;
-            for (dst_index = 0; dst_index < n; dst_index++) {
-                FELEM *filter = ((FELEM *) c->filter_bank) + c->filter_alloc * index;
+    index &= c->phase_mask;
+    for (dst_index = 0; dst_index < n; dst_index++) {
+        FELEM *filter = ((FELEM *) c->filter_bank) + c->filter_alloc * index;
 
 #ifdef COMMON_CORE
-                COMMON_CORE
+        COMMON_CORE
 #else
-                FELEM2 val=0;
-                int i;
-                for (i = 0; i < c->filter_length; i++) {
-                    val += src[sample_index + i] * (FELEM2)filter[i];
-                }
-                OUT(dst[dst_index], val);
+        FELEM2 val=0;
+        int i;
+        for (i = 0; i < c->filter_length; i++) {
+            val += src[sample_index + i] * (FELEM2)filter[i];
+        }
+        OUT(dst[dst_index], val);
 #endif
 
-                frac += dst_incr_frac;
-                index += dst_incr;
-                if (frac >= c->src_incr) {
-                    frac -= c->src_incr;
-                    index++;
-                }
-                sample_index += index >> c->phase_shift;
-                index &= c->phase_mask;
-            }
-
-            if(update_ctx){
-                c->frac= frac;
-                c->index= index;
-            }
+        frac += dst_incr_frac;
+        index += dst_incr;
+        if (frac >= c->src_incr) {
+            frac -= c->src_incr;
+            index++;
+        }
+        sample_index += index >> c->phase_shift;
+        index &= c->phase_mask;
+    }
+
+    if(update_ctx){
+        c->frac= frac;
+        c->index= index;
+    }
 
     return sample_index;
 }
@@ -167,44 +167,44 @@ int RENAME(swri_resample_linear)(ResampleContext *c,
                                  DELEM *dst, const DELEM *src,
                                  int n, int update_ctx)
 {
-            int dst_index;
-            int index= c->index;
-            int frac= c->frac;
-            int dst_incr_frac= c->dst_incr % c->src_incr;
-            int dst_incr=      c->dst_incr / c->src_incr;
-            int sample_index = index >> c->phase_shift;
-
-            index &= c->phase_mask;
-            for (dst_index = 0; dst_index < n; dst_index++) {
-                FELEM *filter = ((FELEM *) c->filter_bank) + c->filter_alloc * index;
-                FELEM2 val=0, v2 = 0;
+    int dst_index;
+    int index= c->index;
+    int frac= c->frac;
+    int dst_incr_frac= c->dst_incr % c->src_incr;
+    int dst_incr=      c->dst_incr / c->src_incr;
+    int sample_index = index >> c->phase_shift;
+
+    index &= c->phase_mask;
+    for (dst_index = 0; dst_index < n; dst_index++) {
+        FELEM *filter = ((FELEM *) c->filter_bank) + c->filter_alloc * index;
+        FELEM2 val=0, v2 = 0;
 
 #ifdef LINEAR_CORE
-                LINEAR_CORE
+        LINEAR_CORE
 #else
-                int i;
-                for (i = 0; i < c->filter_length; i++) {
-                    val += src[sample_index + i] * (FELEM2)filter[i];
-                    v2  += src[sample_index + i] * (FELEM2)filter[i + c->filter_alloc];
-                }
+        int i;
+        for (i = 0; i < c->filter_length; i++) {
+            val += src[sample_index + i] * (FELEM2)filter[i];
+            v2  += src[sample_index + i] * (FELEM2)filter[i + c->filter_alloc];
+        }
 #endif
-                val += (v2 - val) * (FELEML) frac / c->src_incr;
-                OUT(dst[dst_index], val);
-
-                frac += dst_incr_frac;
-                index += dst_incr;
-                if (frac >= c->src_incr) {
-                    frac -= c->src_incr;
-                    index++;
-                }
-                sample_index += index >> c->phase_shift;
-                index &= c->phase_mask;
-            }
-
-            if(update_ctx){
-                c->frac= frac;
-                c->index= index;
-            }
+        val += (v2 - val) * (FELEML) frac / c->src_incr;
+        OUT(dst[dst_index], val);
+
+        frac += dst_incr_frac;
+        index += dst_incr;
+        if (frac >= c->src_incr) {
+            frac -= c->src_incr;
+            index++;
+        }
+        sample_index += index >> c->phase_shift;
+        index &= c->phase_mask;
+    }
+
+    if(update_ctx){
+        c->frac= frac;
+        c->index= index;
+    }
 
     return sample_index;
 }



More information about the ffmpeg-cvslog mailing list