arm: dsputil: K&R formatting cosmetics
authorDiego Biurrun <diego@biurrun.de>
Thu, 30 Jan 2014 14:03:55 +0000 (06:03 -0800)
committerDiego Biurrun <diego@biurrun.de>
Thu, 20 Mar 2014 12:03:23 +0000 (05:03 -0700)
libavcodec/arm/dsputil_arm.h
libavcodec/arm/dsputil_init_arm.c
libavcodec/arm/dsputil_init_armv6.c
libavcodec/arm/dsputil_init_neon.c

index 4ac8019..cc14b2c 100644 (file)
@@ -24,8 +24,8 @@
 #include "libavcodec/avcodec.h"
 #include "libavcodec/dsputil.h"
 
 #include "libavcodec/avcodec.h"
 #include "libavcodec/dsputil.h"
 
-void ff_dsputil_init_armv5te(DSPContextc, AVCodecContext *avctx);
-void ff_dsputil_init_armv6(DSPContextc, AVCodecContext *avctx);
+void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx);
+void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx);
 void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx);
 
 #endif /* AVCODEC_ARM_DSPUTIL_ARM_H */
 void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx);
 
 #endif /* AVCODEC_ARM_DSPUTIL_ARM_H */
index 358734b..2c348ec 100644 (file)
@@ -39,25 +39,28 @@ void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
                                int line_size);
 
 /* XXX: those functions should be suppressed ASAP when all IDCTs are
                                int line_size);
 
 /* XXX: those functions should be suppressed ASAP when all IDCTs are
  converted */
* converted */
 static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block)
 {
 static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block)
 {
-    ff_j_rev_dct_arm (block);
+    ff_j_rev_dct_arm(block);
     ff_put_pixels_clamped(block, dest, line_size);
 }
     ff_put_pixels_clamped(block, dest, line_size);
 }
+
 static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block)
 {
 static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block)
 {
-    ff_j_rev_dct_arm (block);
+    ff_j_rev_dct_arm(block);
     ff_add_pixels_clamped(block, dest, line_size);
 }
     ff_add_pixels_clamped(block, dest, line_size);
 }
+
 static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block)
 {
 static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block)
 {
-    ff_simple_idct_arm (block);
+    ff_simple_idct_arm(block);
     ff_put_pixels_clamped(block, dest, line_size);
 }
     ff_put_pixels_clamped(block, dest, line_size);
 }
+
 static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block)
 {
 static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block)
 {
-    ff_simple_idct_arm (block);
+    ff_simple_idct_arm(block);
     ff_add_pixels_clamped(block, dest, line_size);
 }
 
     ff_add_pixels_clamped(block, dest, line_size);
 }
 
@@ -69,13 +72,13 @@ av_cold void ff_dsputil_init_arm(DSPContext *c, AVCodecContext *avctx)
     ff_add_pixels_clamped = c->add_pixels_clamped;
 
     if (avctx->bits_per_raw_sample <= 8) {
     ff_add_pixels_clamped = c->add_pixels_clamped;
 
     if (avctx->bits_per_raw_sample <= 8) {
-        if(avctx->idct_algo == FF_IDCT_AUTO ||
-           avctx->idct_algo == FF_IDCT_ARM){
+        if (avctx->idct_algo == FF_IDCT_AUTO ||
+            avctx->idct_algo == FF_IDCT_ARM) {
             c->idct_put              = j_rev_dct_arm_put;
             c->idct_add              = j_rev_dct_arm_add;
             c->idct                  = ff_j_rev_dct_arm;
             c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
             c->idct_put              = j_rev_dct_arm_put;
             c->idct_add              = j_rev_dct_arm_add;
             c->idct                  = ff_j_rev_dct_arm;
             c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
-        } else if (avctx->idct_algo == FF_IDCT_SIMPLEARM){
+        } else if (avctx->idct_algo == FF_IDCT_SIMPLEARM) {
             c->idct_put              = simple_idct_arm_put;
             c->idct_add              = simple_idct_arm_add;
             c->idct                  = ff_simple_idct_arm;
             c->idct_put              = simple_idct_arm_put;
             c->idct_add              = simple_idct_arm_add;
             c->idct                  = ff_simple_idct_arm;
@@ -85,7 +88,10 @@ av_cold void ff_dsputil_init_arm(DSPContext *c, AVCodecContext *avctx)
 
     c->add_pixels_clamped = ff_add_pixels_clamped_arm;
 
 
     c->add_pixels_clamped = ff_add_pixels_clamped_arm;
 
-    if (have_armv5te(cpu_flags)) ff_dsputil_init_armv5te(c, avctx);
-    if (have_armv6(cpu_flags))   ff_dsputil_init_armv6(c, avctx);
-    if (have_neon(cpu_flags))    ff_dsputil_init_neon(c, avctx);
+    if (have_armv5te(cpu_flags))
+        ff_dsputil_init_armv5te(c, avctx);
+    if (have_armv6(cpu_flags))
+        ff_dsputil_init_armv6(c, avctx);
+    if (have_neon(cpu_flags))
+        ff_dsputil_init_neon(c, avctx);
 }
 }
index 09a30cf..f412ff2 100644 (file)
@@ -44,7 +44,7 @@ int ff_pix_abs16_y2_armv6(void *s, uint8_t *blk1, uint8_t *blk2,
                           int line_size, int h);
 
 int ff_pix_abs8_armv6(void *s, uint8_t *blk1, uint8_t *blk2,
                           int line_size, int h);
 
 int ff_pix_abs8_armv6(void *s, uint8_t *blk1, uint8_t *blk2,
-                       int line_size, int h);
+                      int line_size, int h);
 
 int ff_sse16_armv6(void *s, uint8_t *blk1, uint8_t *blk2,
                    int line_size, int h);
 
 int ff_sse16_armv6(void *s, uint8_t *blk1, uint8_t *blk2,
                    int line_size, int h);
@@ -64,10 +64,10 @@ av_cold void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx)
         c->idct                  = ff_simple_idct_armv6;
         c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
     }
         c->idct                  = ff_simple_idct_armv6;
         c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
     }
+    c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
 
     if (!high_bit_depth)
         c->get_pixels = ff_get_pixels_armv6;
 
     if (!high_bit_depth)
         c->get_pixels = ff_get_pixels_armv6;
-    c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
     c->diff_pixels = ff_diff_pixels_armv6;
 
     c->pix_abs[0][0] = ff_pix_abs16_armv6;
     c->diff_pixels = ff_diff_pixels_armv6;
 
     c->pix_abs[0][0] = ff_pix_abs16_armv6;
index f30be97..c39fcc1 100644 (file)
@@ -43,6 +43,7 @@ void ff_vector_clip_int32_neon(int32_t *dst, const int32_t *src, int32_t min,
                                int32_t max, unsigned int len);
 
 int32_t ff_scalarproduct_int16_neon(const int16_t *v1, const int16_t *v2, int len);
                                int32_t max, unsigned int len);
 
 int32_t ff_scalarproduct_int16_neon(const int16_t *v1, const int16_t *v2, int len);
+
 int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, const int16_t *v2,
                                              const int16_t *v3, int len, int mul);
 
 int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, const int16_t *v2,
                                              const int16_t *v3, int len, int mul);
 
@@ -60,18 +61,19 @@ av_cold void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
         }
     }
 
         }
     }
 
+    c->add_pixels_clamped        = ff_add_pixels_clamped_neon;
+    c->put_pixels_clamped        = ff_put_pixels_clamped_neon;
+    c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
+
     if (!high_bit_depth) {
         c->clear_block  = ff_clear_block_neon;
         c->clear_blocks = ff_clear_blocks_neon;
     }
 
     if (!high_bit_depth) {
         c->clear_block  = ff_clear_block_neon;
         c->clear_blocks = ff_clear_blocks_neon;
     }
 
-    c->add_pixels_clamped = ff_add_pixels_clamped_neon;
-    c->put_pixels_clamped = ff_put_pixels_clamped_neon;
-    c->put_signed_pixels_clamped = ff_put_signed_pixels_clamped_neon;
-
-    c->vector_clipf               = ff_vector_clipf_neon;
-    c->vector_clip_int32          = ff_vector_clip_int32_neon;
+    c->vector_clipf      = ff_vector_clipf_neon;
+    c->vector_clip_int32 = ff_vector_clip_int32_neon;
 
     c->scalarproduct_int16 = ff_scalarproduct_int16_neon;
 
     c->scalarproduct_int16 = ff_scalarproduct_int16_neon;
+
     c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_neon;
 }
     c->scalarproduct_and_madd_int16 = ff_scalarproduct_and_madd_int16_neon;
 }