diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-21 17:18:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-21 17:18:43 +0100 |
commit | a41bf09d9c56215448f14fb086c9f882eb41ecac (patch) | |
tree | 541da01619d95763ff0ee46ae0df50125505b3c4 /libavcodec/arm | |
parent | fb3f28ee289b9ea5106d5a7fa00a1018eb379e65 (diff) | |
parent | 6906b19346ae8a330bfaa1c16ce535be10789723 (diff) | |
download | ffmpeg-streaming-a41bf09d9c56215448f14fb086c9f882eb41ecac.zip ffmpeg-streaming-a41bf09d9c56215448f14fb086c9f882eb41ecac.tar.gz |
Merge commit '6906b19346ae8a330bfaa1c16ce535be10789723'
* commit '6906b19346ae8a330bfaa1c16ce535be10789723':
lavc: add missing files for arm
lavc: introduce VideoDSPContext
Conflicts:
configure
libavcodec/arm/dsputil_init_armv5te.c
libavcodec/dsputil.c
libavcodec/dsputil.h
libavcodec/dsputil_template.c
libavcodec/h264.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_enc.c
libavcodec/x86/dsputil_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/Makefile | 5 | ||||
-rw-r--r-- | libavcodec/arm/dsputil_arm.S | 10 | ||||
-rw-r--r-- | libavcodec/arm/dsputil_init_armv5te.c | 6 | ||||
-rw-r--r-- | libavcodec/arm/videodsp_arm.h | 29 | ||||
-rw-r--r-- | libavcodec/arm/videodsp_armv5te.S | 33 | ||||
-rw-r--r-- | libavcodec/arm/videodsp_init_arm.c | 29 | ||||
-rw-r--r-- | libavcodec/arm/videodsp_init_armv5te.c | 32 |
7 files changed, 129 insertions, 15 deletions
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile index b315d8d..ac486f4 100644 --- a/libavcodec/arm/Makefile +++ b/libavcodec/arm/Makefile @@ -30,6 +30,8 @@ OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_arm.o OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_arm.o \ arm/rv40dsp_init_arm.o \ +OBJS-$(CONFIG_VIDEODSP) += arm/videodsp_init_arm.o \ + OBJS += arm/dsputil_init_arm.o \ arm/dsputil_arm.o \ arm/fft_init_arm.o \ @@ -41,6 +43,9 @@ OBJS += arm/dsputil_init_arm.o \ ARMV5TE-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_armv5te.o \ arm/mpegvideo_armv5te_s.o \ +ARMV5TE-OBJS-$(CONFIG_VIDEODSP) += arm/videodsp_init_armv5te.o \ + arm/videodsp_armv5te.o \ + ARMV5TE-OBJS += arm/dsputil_init_armv5te.o \ arm/simple_idct_armv5te.o \ diff --git a/libavcodec/arm/dsputil_arm.S b/libavcodec/arm/dsputil_arm.S index 9c9bd25..994b440 100644 --- a/libavcodec/arm/dsputil_arm.S +++ b/libavcodec/arm/dsputil_arm.S @@ -22,15 +22,7 @@ #include "config.h" #include "libavutil/arm/asm.S" -#if HAVE_ARMV5TE_EXTERNAL -function ff_prefetch_arm, export=1 - subs r2, r2, #1 - pld [r0] - add r0, r0, r1 - bne ff_prefetch_arm - bx lr -endfunc -#else +#if !HAVE_ARMV5TE_EXTERNAL #define pld @ #endif diff --git a/libavcodec/arm/dsputil_init_armv5te.c b/libavcodec/arm/dsputil_init_armv5te.c index 52c0400..b4f3f06 100644 --- a/libavcodec/arm/dsputil_init_armv5te.c +++ b/libavcodec/arm/dsputil_init_armv5te.c @@ -25,8 +25,6 @@ void ff_simple_idct_armv5te(DCTELEM *data); void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, DCTELEM *data); void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, DCTELEM *data); -void ff_prefetch_arm(void *mem, int stride, int h); - av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx) { if (!avctx->lowres && avctx->bits_per_raw_sample <= 8 && @@ -37,8 +35,4 @@ av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx) c->idct = ff_simple_idct_armv5te; c->idct_permutation_type = FF_NO_IDCT_PERM; } - -#if HAVE_ARMV5TE_EXTERNAL - c->prefetch = ff_prefetch_arm; -#endif } diff --git a/libavcodec/arm/videodsp_arm.h b/libavcodec/arm/videodsp_arm.h new file mode 100644 index 0000000..a708759 --- /dev/null +++ b/libavcodec/arm/videodsp_arm.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2009 Mans Rullgard <mans@mansr.com> + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_ARM_VIDEODSP_ARM_H +#define AVCODEC_ARM_VIDEODSP_ARM_H + +#include "libavcodec/avcodec.h" +#include "libavcodec/videodsp.h" + +void ff_videodsp_init_armv5te(VideoDSPContext* ctx, int bpc); + +#endif /* AVCODEC_ARM_VIDEODSP_ARM_H */ diff --git a/libavcodec/arm/videodsp_armv5te.S b/libavcodec/arm/videodsp_armv5te.S new file mode 100644 index 0000000..96e92d5 --- /dev/null +++ b/libavcodec/arm/videodsp_armv5te.S @@ -0,0 +1,33 @@ +@ +@ ARMv5te optimized DSP utils +@ Copyright (c) 2004 AGAWA Koji <i (AT) atty (DOT) jp> +@ +@ This file is part of Libav. +@ +@ Libav is free software; you can redistribute it and/or +@ modify it under the terms of the GNU Lesser General Public +@ License as published by the Free Software Foundation; either +@ version 2.1 of the License, or (at your option) any later version. +@ +@ Libav is distributed in the hope that it will be useful, +@ but WITHOUT ANY WARRANTY; without even the implied warranty of +@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +@ Lesser General Public License for more details. +@ +@ You should have received a copy of the GNU Lesser General Public +@ License along with Libav; if not, write to the Free Software +@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +@ + +#include "config.h" +#include "libavutil/arm/asm.S" + +#if HAVE_ARMV5TE_EXTERNAL +function ff_prefetch_arm, export=1 + subs r2, r2, #1 + pld [r0] + add r0, r0, r1 + bne ff_prefetch_arm + bx lr +endfunc +#endif diff --git a/libavcodec/arm/videodsp_init_arm.c b/libavcodec/arm/videodsp_init_arm.c new file mode 100644 index 0000000..6c97b2c --- /dev/null +++ b/libavcodec/arm/videodsp_init_arm.c @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2012 Ronald S. Bultje + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/arm/cpu.h" +#include "libavcodec/videodsp.h" +#include "videodsp_arm.h" + +void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc) +{ + int cpu_flags = av_get_cpu_flags(); + if (have_armv5te(cpu_flags)) ff_videodsp_init_armv5te(ctx, bpc); +} diff --git a/libavcodec/arm/videodsp_init_armv5te.c b/libavcodec/arm/videodsp_init_armv5te.c new file mode 100644 index 0000000..3606012 --- /dev/null +++ b/libavcodec/arm/videodsp_init_armv5te.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2012 Ronald S. Bultje + * + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/arm/cpu.h" +#include <libavcodec/videodsp.h> +#include "videodsp_arm.h" + +void ff_prefetch_arm(uint8_t *mem, ptrdiff_t stride, int h); + +void ff_videodsp_init_armv5te(VideoDSPContext *ctx, int bpc) +{ +#if HAVE_ARMV5TE_EXTERNAL + ctx->prefetch = ff_prefetch_arm; +#endif +} |