summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-20 14:11:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-20 14:19:08 +0200
commitc4010972c4a7bd1f5f38cf8a75faf7a57da10ee9 (patch)
treef162756b8a21ef9f09fdd9b569364474caca4181 /libavcodec
parent055e5c8e01c57783207861c96a5affbcd9e40160 (diff)
parent7384b7a71338d960e421d6dc3d77da09b0a442cb (diff)
downloadffmpeg-streaming-c4010972c4a7bd1f5f38cf8a75faf7a57da10ee9.zip
ffmpeg-streaming-c4010972c4a7bd1f5f38cf8a75faf7a57da10ee9.tar.gz
Merge commit '7384b7a71338d960e421d6dc3d77da09b0a442cb'
* commit '7384b7a71338d960e421d6dc3d77da09b0a442cb': arm: hpeldsp: Move half-pel assembly from dsputil to hpeldsp Conflicts: libavcodec/arm/Makefile libavcodec/arm/hpeldsp_arm.S libavcodec/arm/hpeldsp_arm.h libavcodec/arm/hpeldsp_armv6.S libavcodec/arm/hpeldsp_init_arm.c libavcodec/arm/hpeldsp_init_armv6.c libavcodec/arm/hpeldsp_init_neon.c libavcodec/arm/hpeldsp_neon.S libavcodec/hpeldsp.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/arm/Makefile15
-rw-r--r--libavcodec/arm/hpeldsp_arm.h2
-rw-r--r--libavcodec/arm/hpeldsp_init_arm.c10
-rw-r--r--libavcodec/arm/hpeldsp_init_armv6.c1
-rw-r--r--libavcodec/arm/hpeldsp_init_neon.c4
-rw-r--r--libavcodec/hpeldsp.c4
6 files changed, 21 insertions, 15 deletions
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 011404c..5b717b7 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -31,8 +31,10 @@ OBJS-$(CONFIG_H264DSP) += arm/h264dsp_init_arm.o
OBJS-$(CONFIG_H264PRED) += arm/h264pred_init_arm.o
OBJS-$(CONFIG_H264QPEL) += arm/h264qpel_init_arm.o
-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_arm.o \
- arm/hpeldsp_init_arm.o
+OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_arm.o \
+ arm/hpeldsp_arm.o
+ARMV6-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_armv6.o \
+ arm/hpeldsp_armv6.o
OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_arm.o
OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_arm.o \
@@ -61,9 +63,6 @@ ARMV6-OBJS += arm/dsputil_init_armv6.o \
arm/dsputil_armv6.o \
arm/simple_idct_armv6.o \
-ARMV6-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_armv6.o \
- arm/hpeldsp_init_armv6.o
-
VFP-OBJS-$(HAVE_ARMV6) += arm/fmtconvert_vfp.o
NEON-OBJS-$(CONFIG_FFT) += arm/fft_neon.o \
@@ -82,9 +81,6 @@ NEON-OBJS-$(CONFIG_H264PRED) += arm/h264pred_neon.o \
NEON-OBJS-$(CONFIG_H264QPEL) += arm/h264qpel_neon.o \
-NEON-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_neon.o \
- arm/hpeldsp_init_neon.o
-
NEON-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_neon.o
NEON-OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_neon.o \
@@ -93,6 +89,9 @@ NEON-OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_neon.o \
NEON-OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_neon.o \
arm/synth_filter_neon.o \
+NEON-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_neon.o \
+ arm/hpeldsp_neon.o
+
NEON-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_neon.o
NEON-OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_neon.o
NEON-OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_neon.o \
diff --git a/libavcodec/arm/hpeldsp_arm.h b/libavcodec/arm/hpeldsp_arm.h
index e79bc6f..3f18c62 100644
--- a/libavcodec/arm/hpeldsp_arm.h
+++ b/libavcodec/arm/hpeldsp_arm.h
@@ -23,7 +23,7 @@
#include "libavcodec/hpeldsp.h"
-void ff_hpeldsp_init_armv6(HpelDSPContext* c, int flags);
+void ff_hpeldsp_init_armv6(HpelDSPContext *c, int flags);
void ff_hpeldsp_init_neon(HpelDSPContext *c, int flags);
#endif /* AVCODEC_ARM_HPELDSP_H */
diff --git a/libavcodec/arm/hpeldsp_init_arm.c b/libavcodec/arm/hpeldsp_init_arm.c
index bae93eb..2cc2b78 100644
--- a/libavcodec/arm/hpeldsp_init_arm.c
+++ b/libavcodec/arm/hpeldsp_init_arm.c
@@ -20,7 +20,9 @@
*/
#include "libavutil/arm/cpu.h"
+#include "libavutil/attributes.h"
#include "libavcodec/bit_depth_template.c" // for CALL_2X_PIXELS
+#include "libavcodec/rnd_avg.h"
#include "hpeldsp_arm.h"
void ff_put_pixels8_arm(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h);
@@ -41,7 +43,7 @@ CALL_2X_PIXELS(ff_put_no_rnd_pixels16_x2_arm, ff_put_no_rnd_pixels8_x2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_y2_arm, ff_put_no_rnd_pixels8_y2_arm, 8)
CALL_2X_PIXELS(ff_put_no_rnd_pixels16_xy2_arm, ff_put_no_rnd_pixels8_xy2_arm,8)
-void ff_hpeldsp_init_arm(HpelDSPContext* c, int flags)
+av_cold void ff_hpeldsp_init_arm(HpelDSPContext *c, int flags)
{
int cpu_flags = av_get_cpu_flags();
@@ -63,6 +65,8 @@ void ff_hpeldsp_init_arm(HpelDSPContext* c, int flags)
c->put_no_rnd_pixels_tab[1][2] = ff_put_no_rnd_pixels8_y2_arm;
c->put_no_rnd_pixels_tab[1][3] = ff_put_no_rnd_pixels8_xy2_arm;
- if (have_armv6(cpu_flags)) ff_hpeldsp_init_armv6(c, flags);
- if (have_neon(cpu_flags)) ff_hpeldsp_init_neon(c, flags);
+ if (have_armv6(cpu_flags))
+ ff_hpeldsp_init_armv6(c, flags);
+ if (have_neon(cpu_flags))
+ ff_hpeldsp_init_neon(c, flags);
}
diff --git a/libavcodec/arm/hpeldsp_init_armv6.c b/libavcodec/arm/hpeldsp_init_armv6.c
index da4caf8..967a8e0 100644
--- a/libavcodec/arm/hpeldsp_init_armv6.c
+++ b/libavcodec/arm/hpeldsp_init_armv6.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stddef.h>
#include <stdint.h>
#include "libavutil/attributes.h"
diff --git a/libavcodec/arm/hpeldsp_init_neon.c b/libavcodec/arm/hpeldsp_init_neon.c
index d577735..d9feadd 100644
--- a/libavcodec/arm/hpeldsp_init_neon.c
+++ b/libavcodec/arm/hpeldsp_init_neon.c
@@ -19,8 +19,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stddef.h>
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "hpeldsp_arm.h"
void ff_put_pixels16_neon(uint8_t *, const uint8_t *, ptrdiff_t, int);
@@ -50,7 +52,7 @@ void ff_avg_pixels16_x2_no_rnd_neon(uint8_t *, const uint8_t *, ptrdiff_t, int);
void ff_avg_pixels16_y2_no_rnd_neon(uint8_t *, const uint8_t *, ptrdiff_t, int);
void ff_avg_pixels16_xy2_no_rnd_neon(uint8_t *, const uint8_t *, ptrdiff_t, int);
-void ff_hpeldsp_init_neon(HpelDSPContext *c, int flags)
+av_cold void ff_hpeldsp_init_neon(HpelDSPContext *c, int flags)
{
c->put_pixels_tab[0][0] = ff_put_pixels16_neon;
c->put_pixels_tab[0][1] = ff_put_pixels16_x2_neon;
diff --git a/libavcodec/hpeldsp.c b/libavcodec/hpeldsp.c
index 2c2d298..a01b322 100644
--- a/libavcodec/hpeldsp.c
+++ b/libavcodec/hpeldsp.c
@@ -54,14 +54,14 @@ av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags)
hpel_funcs(avg, [3], 2);
hpel_funcs(avg_no_rnd,, 16);
+ if (ARCH_ARM)
+ ff_hpeldsp_init_arm(c, flags);
if (ARCH_PPC)
ff_hpeldsp_init_ppc(c, flags);
if (ARCH_X86)
ff_hpeldsp_init_x86(c, flags);
- if (ARCH_ARM) ff_hpeldsp_init_arm (c, flags);
if (HAVE_VIS) ff_hpeldsp_init_vis (c, flags);
if (ARCH_ALPHA) ff_hpeldsp_init_alpha (c, flags);
- if (ARCH_PPC) ff_hpeldsp_init_ppc (c, flags);
if (ARCH_SH4) ff_hpeldsp_init_sh4 (c, flags);
if (ARCH_BFIN) ff_hpeldsp_init_bfin (c, flags);
}
OpenPOWER on IntegriCloud