diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-20 21:58:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-20 21:58:16 +0100 |
commit | a87188ebdb8307fb4733e04d482a3ae617bd9da4 (patch) | |
tree | 7bbc253b56f66e5ab502c532b7d47bfadcf8271e /libavcodec/arm | |
parent | b20b7724744b2125a2787dd9a70084d806db9862 (diff) | |
parent | cf7a2167570e6ccb9dfbd62e9d8ba8f4f065b17e (diff) | |
download | ffmpeg-a87188ebdb8307fb4733e04d482a3ae617bd9da4.tar.gz |
Merge commit 'cf7a2167570e6ccb9dfbd62e9d8ba8f4f065b17e'
* commit 'cf7a2167570e6ccb9dfbd62e9d8ba8f4f065b17e':
arm: dsputil: K&R formatting cosmetics
Conflicts:
libavcodec/arm/dsputil_init_arm.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/dsputil_arm.h | 4 | ||||
-rw-r--r-- | libavcodec/arm/dsputil_init_arm.c | 28 | ||||
-rw-r--r-- | libavcodec/arm/dsputil_init_armv6.c | 4 | ||||
-rw-r--r-- | libavcodec/arm/dsputil_init_neon.c | 14 |
4 files changed, 29 insertions, 21 deletions
diff --git a/libavcodec/arm/dsputil_arm.h b/libavcodec/arm/dsputil_arm.h index f21e1e82d0..35feff29fa 100644 --- a/libavcodec/arm/dsputil_arm.h +++ b/libavcodec/arm/dsputil_arm.h @@ -24,8 +24,8 @@ #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" -void ff_dsputil_init_armv5te(DSPContext* c, AVCodecContext *avctx); -void ff_dsputil_init_armv6(DSPContext* c, 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 */ diff --git a/libavcodec/arm/dsputil_init_arm.c b/libavcodec/arm/dsputil_init_arm.c index cca260604d..aa2b9714fb 100644 --- a/libavcodec/arm/dsputil_init_arm.c +++ b/libavcodec/arm/dsputil_init_arm.c @@ -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 - converted */ + * converted */ 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); } + 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); } + 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); } + 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); } @@ -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->lowres && 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; - } 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; @@ -85,7 +88,10 @@ av_cold void ff_dsputil_init_arm(DSPContext *c, AVCodecContext *avctx) 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); } diff --git a/libavcodec/arm/dsputil_init_armv6.c b/libavcodec/arm/dsputil_init_armv6.c index b72d32f65e..ee967c0d25 100644 --- a/libavcodec/arm/dsputil_init_armv6.c +++ b/libavcodec/arm/dsputil_init_armv6.c @@ -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 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->add_pixels_clamped = ff_add_pixels_clamped_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; diff --git a/libavcodec/arm/dsputil_init_neon.c b/libavcodec/arm/dsputil_init_neon.c index 0450598be3..94dec38a30 100644 --- a/libavcodec/arm/dsputil_init_neon.c +++ b/libavcodec/arm/dsputil_init_neon.c @@ -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 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; } - 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_and_madd_int16 = ff_scalarproduct_and_madd_int16_neon; } |