* qatar/master: dsputil: fix invalid array indexing configure: add libavresample to rpath build: icc: silence some warnings fft-test: add option to set cpuflag mask cpu: recognise only cpu flag names pertinent to the architecture avutil: add av_parse_cpu_flags() function vp8: armv6: fix non-armv6t2 build vp8: armv6 optimisations vp8: arm: separate ARMv6 functions from NEON ARM: add some compatibility macros mov: support eac3 audio avf: fix faulty check in has_duration Conflicts: configure doc/APIchanges ffmpeg.c libavcodec/arm/Makefile libavcodec/arm/asm.S libavcodec/arm/vp8dsp_armv6.S libavcodec/arm/vp8dsp_init_arm.c libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>tags/n0.11
| @@ -3358,7 +3358,7 @@ enabled extra_warnings && check_cflags -Winline | |||
| # add some linker flags | |||
| check_ldflags -Wl,--warn-common | |||
| check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil | |||
| check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample | |||
| test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic | |||
| enabled xmm_clobber_test && \ | |||
| @@ -3407,10 +3407,11 @@ if enabled icc; then | |||
| # -wd: Disable following warnings | |||
| # 144, 167, 556: -Wno-pointer-sign | |||
| # 1292: attribute "foo" ignored | |||
| # 1419: external declaration in primary source file | |||
| # 10006: ignoring unknown option -fno-signed-zeros | |||
| # 10148: ignoring unknown option -Wno-parentheses | |||
| # 10156: ignoring option '-W'; no argument required | |||
| check_cflags -wd144,167,556,1292,10006,10148,10156 | |||
| check_cflags -wd144,167,556,1292,1419,10006,10148,10156 | |||
| # 11030: Warning unknown option --as-needed | |||
| # 10156: ignoring option '-export'; no argument required | |||
| check_ldflags -wd10156,11030 | |||
| @@ -23,6 +23,9 @@ API changes, most recent first: | |||
| 2012-03-26 - a67d9cf - lavfi 2.66.100 | |||
| Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions. | |||
| 2012-04-25 - xxxxxxx - lavu 51.29.0 - cpu.h | |||
| Add av_parse_cpu_flags() | |||
| 2012-xx-xx - xxxxxxx - lavr 0.0.0 | |||
| Add libavresample audio conversion library | |||
| @@ -14,6 +14,7 @@ OBJS-$(CONFIG_VP5_DECODER) += arm/vp56dsp_init_arm.o | |||
| OBJS-$(CONFIG_VP6_DECODER) += arm/vp56dsp_init_arm.o | |||
| OBJS-$(CONFIG_VP8_DECODER) += arm/vp8dsp_init_arm.o | |||
| ARMV6-OBJS-$(CONFIG_VP8_DECODER) += arm/vp8_armv6.o \ | |||
| arm/vp8dsp_init_armv6.o \ | |||
| arm/vp8dsp_armv6.o | |||
| OBJS-$(CONFIG_H264DSP) += arm/h264dsp_init_arm.o | |||
| @@ -80,7 +81,8 @@ NEON-OBJS-$(CONFIG_VP5_DECODER) += arm/vp56dsp_neon.o \ | |||
| NEON-OBJS-$(CONFIG_VP6_DECODER) += arm/vp56dsp_neon.o \ | |||
| arm/vp3dsp_neon.o \ | |||
| NEON-OBJS-$(CONFIG_VP8_DECODER) += arm/vp8dsp_neon.o | |||
| NEON-OBJS-$(CONFIG_VP8_DECODER) += arm/vp8dsp_init_neon.o \ | |||
| arm/vp8dsp_neon.o | |||
| NEON-OBJS += arm/dsputil_init_neon.o \ | |||
| arm/dsputil_neon.o \ | |||
| @@ -88,6 +88,13 @@ ELF .size \name, . - \name | |||
| \name: | |||
| .endm | |||
| #if !HAVE_ARMV6T2 | |||
| .macro movw rd, val | |||
| mov \rd, \val & 255 | |||
| orr \rd, \val & ~255 | |||
| .endm | |||
| #endif | |||
| .macro mov32 rd, val | |||
| #if HAVE_ARMV6T2 | |||
| movw \rd, #(\val) & 0xffff | |||
| @@ -120,7 +127,7 @@ T sub \rn, \rn, \rm | |||
| T ldr \rt, [\rn] | |||
| .endm | |||
| .macro ldr_dpren rt, rn, rm:vararg | |||
| .macro ldr_nreg rt, rn, rm:vararg | |||
| A ldr \rt, [\rn, -\rm] | |||
| T sub \rt, \rn, \rm | |||
| T ldr \rt, [\rt] | |||
| @@ -0,0 +1,78 @@ | |||
| /* | |||
| * 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_VP8DSP_H | |||
| #define AVCODEC_ARM_VP8DSP_H | |||
| #include "libavcodec/vp8dsp.h" | |||
| void ff_vp8dsp_init_armv6(VP8DSPContext *dsp); | |||
| void ff_vp8dsp_init_neon(VP8DSPContext *dsp); | |||
| #define VP8_LF_Y(hv, inner, opt) \ | |||
| void ff_vp8_##hv##_loop_filter16##inner##_##opt(uint8_t *dst, \ | |||
| ptrdiff_t stride, \ | |||
| int flim_E, int flim_I, \ | |||
| int hev_thresh) | |||
| #define VP8_LF_UV(hv, inner, opt) \ | |||
| void ff_vp8_##hv##_loop_filter8uv##inner##_##opt(uint8_t *dstU, \ | |||
| uint8_t *dstV, \ | |||
| ptrdiff_t stride, \ | |||
| int flim_E, int flim_I, \ | |||
| int hev_thresh) | |||
| #define VP8_LF_SIMPLE(hv, opt) \ | |||
| void ff_vp8_##hv##_loop_filter16_simple_##opt(uint8_t *dst, \ | |||
| ptrdiff_t stride, \ | |||
| int flim) | |||
| #define VP8_LF_HV(inner, opt) \ | |||
| VP8_LF_Y(h, inner, opt); \ | |||
| VP8_LF_Y(v, inner, opt); \ | |||
| VP8_LF_UV(h, inner, opt); \ | |||
| VP8_LF_UV(v, inner, opt) | |||
| #define VP8_LF(opt) \ | |||
| VP8_LF_HV(, opt); \ | |||
| VP8_LF_HV(_inner, opt); \ | |||
| VP8_LF_SIMPLE(h, opt); \ | |||
| VP8_LF_SIMPLE(v, opt) | |||
| #define VP8_MC(n, opt) \ | |||
| void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ | |||
| uint8_t *src, ptrdiff_t srcstride, \ | |||
| int h, int x, int y) | |||
| #define VP8_EPEL(w, opt) \ | |||
| VP8_MC(pixels ## w, opt); \ | |||
| VP8_MC(epel ## w ## _h4, opt); \ | |||
| VP8_MC(epel ## w ## _h6, opt); \ | |||
| VP8_MC(epel ## w ## _v4, opt); \ | |||
| VP8_MC(epel ## w ## _h4v4, opt); \ | |||
| VP8_MC(epel ## w ## _h6v4, opt); \ | |||
| VP8_MC(epel ## w ## _v6, opt); \ | |||
| VP8_MC(epel ## w ## _h4v6, opt); \ | |||
| VP8_MC(epel ## w ## _h6v6, opt) | |||
| #define VP8_BILIN(w, opt) \ | |||
| VP8_MC(bilin ## w ## _h, opt); \ | |||
| VP8_MC(bilin ## w ## _v, opt); \ | |||
| VP8_MC(bilin ## w ## _hv, opt) | |||
| #endif /* AVCODEC_ARM_VP8DSP_H */ | |||
| @@ -20,294 +20,14 @@ | |||
| #include "libavutil/arm/cpu.h" | |||
| #include "libavcodec/vp8dsp.h" | |||
| void ff_vp8_luma_dc_wht_dc_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]); | |||
| #define idct_funcs(opt) \ | |||
| void ff_vp8_luma_dc_wht_ ## opt(DCTELEM block[4][4][16], DCTELEM dc[16]); \ | |||
| void ff_vp8_idct_add_ ## opt(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride); \ | |||
| void ff_vp8_idct_dc_add_ ## opt(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride); \ | |||
| void ff_vp8_idct_dc_add4y_ ## opt(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride); \ | |||
| void ff_vp8_idct_dc_add4uv_ ## opt(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride) | |||
| idct_funcs(neon); | |||
| idct_funcs(armv6); | |||
| void ff_vp8_v_loop_filter16_neon(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh); | |||
| void ff_vp8_h_loop_filter16_neon(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh); | |||
| void ff_vp8_v_loop_filter8uv_neon(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh); | |||
| void ff_vp8_h_loop_filter8uv_neon(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh); | |||
| void ff_vp8_v_loop_filter16_inner_neon(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh); | |||
| void ff_vp8_h_loop_filter16_inner_neon(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh); | |||
| void ff_vp8_v_loop_filter8uv_inner_neon(uint8_t *dstU, uint8_t *dstV, | |||
| ptrdiff_t stride, int flim_E, int flim_I, | |||
| int hev_thresh); | |||
| void ff_vp8_h_loop_filter8uv_inner_neon(uint8_t *dstU, uint8_t *dstV, | |||
| ptrdiff_t stride, int flim_E, int flim_I, | |||
| int hev_thresh); | |||
| void ff_vp8_v_loop_filter_inner_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, | |||
| int hev_thresh, int count); | |||
| void ff_vp8_h_loop_filter_inner_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, | |||
| int hev_thresh, int count); | |||
| void ff_vp8_v_loop_filter_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, | |||
| int hev_thresh, int count); | |||
| void ff_vp8_h_loop_filter_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, | |||
| int hev_thresh, int count); | |||
| static void ff_vp8_v_loop_filter16_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh) | |||
| { | |||
| ff_vp8_v_loop_filter_armv6(dst, stride, flim_E, flim_I, hev_thresh, 4); | |||
| } | |||
| static void ff_vp8_h_loop_filter16_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh) | |||
| { | |||
| ff_vp8_h_loop_filter_armv6(dst, stride, flim_E, flim_I, hev_thresh, 4); | |||
| } | |||
| static void ff_vp8_v_loop_filter8uv_armv6(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh) | |||
| { | |||
| ff_vp8_v_loop_filter_armv6(dstU, stride, flim_E, flim_I, hev_thresh, 2); | |||
| ff_vp8_v_loop_filter_armv6(dstV, stride, flim_E, flim_I, hev_thresh, 2); | |||
| } | |||
| static void ff_vp8_h_loop_filter8uv_armv6(uint8_t *dstU, uint8_t *dstV, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh) | |||
| { | |||
| ff_vp8_h_loop_filter_armv6(dstU, stride, flim_E, flim_I, hev_thresh, 2); | |||
| ff_vp8_h_loop_filter_armv6(dstV, stride, flim_E, flim_I, hev_thresh, 2); | |||
| } | |||
| static void ff_vp8_v_loop_filter16_inner_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh) | |||
| { | |||
| ff_vp8_v_loop_filter_inner_armv6(dst, stride, flim_E, flim_I, hev_thresh, 4); | |||
| } | |||
| static void ff_vp8_h_loop_filter16_inner_armv6(uint8_t *dst, ptrdiff_t stride, | |||
| int flim_E, int flim_I, int hev_thresh) | |||
| { | |||
| ff_vp8_h_loop_filter_inner_armv6(dst, stride, flim_E, flim_I, hev_thresh, 4); | |||
| } | |||
| static void ff_vp8_v_loop_filter8uv_inner_armv6(uint8_t *dstU, uint8_t *dstV, | |||
| ptrdiff_t stride, int flim_E, int flim_I, | |||
| int hev_thresh) | |||
| { | |||
| ff_vp8_v_loop_filter_inner_armv6(dstU, stride, flim_E, flim_I, hev_thresh, 2); | |||
| ff_vp8_v_loop_filter_inner_armv6(dstV, stride, flim_E, flim_I, hev_thresh, 2); | |||
| } | |||
| static void ff_vp8_h_loop_filter8uv_inner_armv6(uint8_t *dstU, uint8_t *dstV, | |||
| ptrdiff_t stride, int flim_E, int flim_I, | |||
| int hev_thresh) | |||
| { | |||
| ff_vp8_h_loop_filter_inner_armv6(dstU, stride, flim_E, flim_I, hev_thresh, 2); | |||
| ff_vp8_h_loop_filter_inner_armv6(dstV, stride, flim_E, flim_I, hev_thresh, 2); | |||
| } | |||
| #define simple_lf_funcs(opt) \ | |||
| void ff_vp8_v_loop_filter16_simple_ ## opt(uint8_t *dst, ptrdiff_t stride, int flim); \ | |||
| void ff_vp8_h_loop_filter16_simple_ ## opt(uint8_t *dst, ptrdiff_t stride, int flim) | |||
| simple_lf_funcs(neon); | |||
| simple_lf_funcs(armv6); | |||
| #define VP8_MC_OPT(n, opt) \ | |||
| void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ | |||
| uint8_t *src, ptrdiff_t srcstride, \ | |||
| int h, int x, int y) | |||
| #define VP8_MC(n) \ | |||
| VP8_MC_OPT(n, neon) | |||
| #define VP8_EPEL(w) \ | |||
| VP8_MC(epel ## w ## _h4); \ | |||
| VP8_MC(epel ## w ## _h6); \ | |||
| VP8_MC(epel ## w ## _h4v4); \ | |||
| VP8_MC(epel ## w ## _h6v4); \ | |||
| VP8_MC(epel ## w ## _v4); \ | |||
| VP8_MC(epel ## w ## _v6); \ | |||
| VP8_MC(epel ## w ## _h4v6); \ | |||
| VP8_MC(epel ## w ## _h6v6) | |||
| VP8_EPEL(16); | |||
| VP8_MC(pixels16); | |||
| VP8_MC_OPT(pixels16, armv6); | |||
| VP8_EPEL(8); | |||
| VP8_MC(pixels8); | |||
| VP8_MC_OPT(pixels8, armv6); | |||
| VP8_EPEL(4); | |||
| VP8_MC_OPT(pixels4, armv6); | |||
| VP8_MC(bilin16_h); | |||
| VP8_MC(bilin16_v); | |||
| VP8_MC(bilin16_hv); | |||
| VP8_MC(bilin8_h); | |||
| VP8_MC(bilin8_v); | |||
| VP8_MC(bilin8_hv); | |||
| VP8_MC(bilin4_h); | |||
| VP8_MC(bilin4_v); | |||
| VP8_MC(bilin4_hv); | |||
| #define VP8_V6_MC(n) \ | |||
| void ff_put_vp8_##n##_armv6(uint8_t *dst, int dststride, uint8_t *src, \ | |||
| int srcstride, int w, int h, int mxy) | |||
| VP8_V6_MC(epel_v6); | |||
| VP8_V6_MC(epel_h6); | |||
| VP8_V6_MC(epel_v4); | |||
| VP8_V6_MC(epel_h4); | |||
| VP8_V6_MC(bilin_v); | |||
| VP8_V6_MC(bilin_h); | |||
| #define VP8_EPEL_HV(SIZE, TAPNUMX, TAPNUMY, NAME, HNAME, VNAME, MAXHEIGHT) \ | |||
| static void ff_put_vp8_##NAME##SIZE##_##HNAME##VNAME##_armv6( \ | |||
| uint8_t *dst, int dststride, uint8_t *src, \ | |||
| int srcstride, int h, int mx, int my) \ | |||
| { \ | |||
| DECLARE_ALIGNED(4, uint8_t, tmp)[SIZE * (MAXHEIGHT + TAPNUMY - 1)]; \ | |||
| uint8_t *tmpptr = tmp + SIZE * (TAPNUMY / 2 - 1); \ | |||
| src -= srcstride * (TAPNUMY / 2 - 1); \ | |||
| ff_put_vp8_ ## NAME ## _ ## HNAME ## _armv6(tmp, SIZE, src, srcstride, \ | |||
| SIZE, h + TAPNUMY - 1, mx); \ | |||
| ff_put_vp8_ ## NAME ## _ ## VNAME ## _armv6(dst, dststride, tmpptr, SIZE, \ | |||
| SIZE, h, my); \ | |||
| } | |||
| VP8_EPEL_HV(16, 6, 6, epel, h6, v6, 16); | |||
| VP8_EPEL_HV(16, 2, 2, bilin, h, v, 16); | |||
| VP8_EPEL_HV(8, 6, 6, epel, h6, v6, 16); | |||
| VP8_EPEL_HV(8, 4, 6, epel, h4, v6, 16); | |||
| VP8_EPEL_HV(8, 6, 4, epel, h6, v4, 16); | |||
| VP8_EPEL_HV(8, 4, 4, epel, h4, v4, 16); | |||
| VP8_EPEL_HV(8, 2, 2, bilin, h, v, 16); | |||
| VP8_EPEL_HV(4, 6, 6, epel, h6, v6, 8); | |||
| VP8_EPEL_HV(4, 4, 6, epel, h4, v6, 8); | |||
| VP8_EPEL_HV(4, 6, 4, epel, h6, v4, 8); | |||
| VP8_EPEL_HV(4, 4, 4, epel, h4, v4, 8); | |||
| VP8_EPEL_HV(4, 2, 2, bilin, h, v, 8); | |||
| extern void put_vp8_epel4_v6_c(uint8_t *dst, int d, uint8_t *src, int s, int h, int mx, int my); | |||
| #undef printf | |||
| #define VP8_EPEL_H_OR_V(SIZE, NAME, HV) \ | |||
| static void ff_put_vp8_##NAME##SIZE##_##HV##_armv6( \ | |||
| uint8_t *dst, int dststride, uint8_t *src, \ | |||
| int srcstride, int h, int mx, int my) \ | |||
| { \ | |||
| ff_put_vp8_## NAME ## _ ## HV ## _armv6(dst, dststride, src, srcstride, \ | |||
| SIZE, h, mx | my); \ | |||
| } | |||
| VP8_EPEL_H_OR_V(4, epel, h6); | |||
| VP8_EPEL_H_OR_V(4, epel, h4); | |||
| VP8_EPEL_H_OR_V(4, epel, v6); | |||
| VP8_EPEL_H_OR_V(4, epel, v4); | |||
| VP8_EPEL_H_OR_V(4, bilin, v); | |||
| VP8_EPEL_H_OR_V(4, bilin, h); | |||
| VP8_EPEL_H_OR_V(8, epel, h6); | |||
| VP8_EPEL_H_OR_V(8, epel, h4); | |||
| VP8_EPEL_H_OR_V(8, epel, v6); | |||
| VP8_EPEL_H_OR_V(8, epel, v4); | |||
| VP8_EPEL_H_OR_V(8, bilin, v); | |||
| VP8_EPEL_H_OR_V(8, bilin, h); | |||
| VP8_EPEL_H_OR_V(16, epel, h6); | |||
| VP8_EPEL_H_OR_V(16, epel, v6); | |||
| VP8_EPEL_H_OR_V(16, bilin, v); | |||
| VP8_EPEL_H_OR_V(16, bilin, h); | |||
| #include "vp8dsp.h" | |||
| av_cold void ff_vp8dsp_init_arm(VP8DSPContext *dsp) | |||
| { | |||
| #define set_func_ptrs(opt) \ | |||
| dsp->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_##opt; \ | |||
| dsp->vp8_luma_dc_wht_dc = ff_vp8_luma_dc_wht_dc_armv6; \ | |||
| \ | |||
| dsp->vp8_idct_add = ff_vp8_idct_add_##opt; \ | |||
| dsp->vp8_idct_dc_add = ff_vp8_idct_dc_add_##opt; \ | |||
| dsp->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_##opt; \ | |||
| dsp->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_##opt; \ | |||
| \ | |||
| dsp->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16_##opt; \ | |||
| dsp->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16_##opt; \ | |||
| dsp->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_##opt; \ | |||
| dsp->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_##opt; \ | |||
| \ | |||
| dsp->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16_inner_##opt; \ | |||
| dsp->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16_inner_##opt; \ | |||
| dsp->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_##opt; \ | |||
| dsp->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_##opt; \ | |||
| \ | |||
| dsp->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter16_simple_##opt; \ | |||
| dsp->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter16_simple_##opt; \ | |||
| \ | |||
| dsp->put_vp8_epel_pixels_tab[0][0][0] = ff_put_vp8_pixels16_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[0][0][2] = ff_put_vp8_epel16_h6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[0][2][0] = ff_put_vp8_epel16_v6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[0][2][2] = ff_put_vp8_epel16_h6v6_##opt; \ | |||
| \ | |||
| dsp->put_vp8_epel_pixels_tab[1][0][0] = ff_put_vp8_pixels8_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][0][1] = ff_put_vp8_epel8_h4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][0][2] = ff_put_vp8_epel8_h6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][1][0] = ff_put_vp8_epel8_v4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][1][1] = ff_put_vp8_epel8_h4v4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][1][2] = ff_put_vp8_epel8_h6v4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][2][0] = ff_put_vp8_epel8_v6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][2][1] = ff_put_vp8_epel8_h4v6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[1][2][2] = ff_put_vp8_epel8_h6v6_##opt; \ | |||
| \ | |||
| dsp->put_vp8_epel_pixels_tab[2][0][0] = ff_put_vp8_pixels4_armv6; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][0][1] = ff_put_vp8_epel4_h4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][0][2] = ff_put_vp8_epel4_h6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][1][0] = ff_put_vp8_epel4_v4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][1][1] = ff_put_vp8_epel4_h4v4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][1][2] = ff_put_vp8_epel4_h6v4_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][2][0] = ff_put_vp8_epel4_v6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][2][1] = ff_put_vp8_epel4_h4v6_##opt; \ | |||
| dsp->put_vp8_epel_pixels_tab[2][2][2] = ff_put_vp8_epel4_h6v6_##opt; \ | |||
| \ | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][2] = ff_put_vp8_bilin16_h_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][0] = ff_put_vp8_bilin16_v_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][2] = ff_put_vp8_bilin16_hv_##opt; \ | |||
| \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][1] = ff_put_vp8_bilin8_h_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][2] = ff_put_vp8_bilin8_h_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][0] = ff_put_vp8_bilin8_v_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][1] = ff_put_vp8_bilin8_hv_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][2] = ff_put_vp8_bilin8_hv_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][0] = ff_put_vp8_bilin8_v_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][1] = ff_put_vp8_bilin8_hv_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][2] = ff_put_vp8_bilin8_hv_##opt; \ | |||
| \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][0] = ff_put_vp8_pixels4_armv6; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][1] = ff_put_vp8_bilin4_h_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][2] = ff_put_vp8_bilin4_h_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][0] = ff_put_vp8_bilin4_v_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][1] = ff_put_vp8_bilin4_hv_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][2] = ff_put_vp8_bilin4_hv_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][0] = ff_put_vp8_bilin4_v_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_##opt; \ | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_##opt | |||
| int cpu_flags = av_get_cpu_flags(); | |||
| if (have_neon(cpu_flags)) { | |||
| set_func_ptrs(neon); | |||
| } else if (HAVE_ARMV6) { | |||
| set_func_ptrs(armv6); | |||
| } | |||
| if (have_armv6(cpu_flags)) | |||
| ff_vp8dsp_init_armv6(dsp); | |||
| if (have_neon(cpu_flags)) | |||
| ff_vp8dsp_init_neon(dsp); | |||
| } | |||
| @@ -0,0 +1,118 @@ | |||
| /* | |||
| * 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 <stdint.h> | |||
| #include "libavcodec/vp8dsp.h" | |||
| #include "vp8dsp.h" | |||
| void ff_vp8_luma_dc_wht_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]); | |||
| void ff_vp8_luma_dc_wht_dc_armv6(DCTELEM block[4][4][16], DCTELEM dc[16]); | |||
| void ff_vp8_idct_add_armv6(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride); | |||
| void ff_vp8_idct_dc_add_armv6(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride); | |||
| void ff_vp8_idct_dc_add4y_armv6(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride); | |||
| void ff_vp8_idct_dc_add4uv_armv6(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride); | |||
| VP8_LF(armv6); | |||
| VP8_EPEL(16, armv6); | |||
| VP8_EPEL(8, armv6); | |||
| VP8_EPEL(4, armv6); | |||
| VP8_BILIN(16, armv6); | |||
| VP8_BILIN(8, armv6); | |||
| VP8_BILIN(4, armv6); | |||
| av_cold void ff_vp8dsp_init_armv6(VP8DSPContext *dsp) | |||
| { | |||
| dsp->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_armv6; | |||
| dsp->vp8_luma_dc_wht_dc = ff_vp8_luma_dc_wht_dc_armv6; | |||
| dsp->vp8_idct_add = ff_vp8_idct_add_armv6; | |||
| dsp->vp8_idct_dc_add = ff_vp8_idct_dc_add_armv6; | |||
| dsp->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_armv6; | |||
| dsp->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_armv6; | |||
| dsp->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16_armv6; | |||
| dsp->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16_armv6; | |||
| dsp->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_armv6; | |||
| dsp->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_armv6; | |||
| dsp->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16_inner_armv6; | |||
| dsp->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16_inner_armv6; | |||
| dsp->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_armv6; | |||
| dsp->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_armv6; | |||
| dsp->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter16_simple_armv6; | |||
| dsp->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter16_simple_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[0][0][0] = ff_put_vp8_pixels16_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[0][0][2] = ff_put_vp8_epel16_h6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[0][2][0] = ff_put_vp8_epel16_v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[0][2][2] = ff_put_vp8_epel16_h6v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][0][0] = ff_put_vp8_pixels8_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][0][1] = ff_put_vp8_epel8_h4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][0][2] = ff_put_vp8_epel8_h6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][1][0] = ff_put_vp8_epel8_v4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][1][1] = ff_put_vp8_epel8_h4v4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][1][2] = ff_put_vp8_epel8_h6v4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][2][0] = ff_put_vp8_epel8_v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][2][1] = ff_put_vp8_epel8_h4v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[1][2][2] = ff_put_vp8_epel8_h6v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][0][0] = ff_put_vp8_pixels4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][0][1] = ff_put_vp8_epel4_h4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][0][2] = ff_put_vp8_epel4_h6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][1][0] = ff_put_vp8_epel4_v4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][1][1] = ff_put_vp8_epel4_h4v4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][1][2] = ff_put_vp8_epel4_h6v4_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][2][0] = ff_put_vp8_epel4_v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][2][1] = ff_put_vp8_epel4_h4v6_armv6; | |||
| dsp->put_vp8_epel_pixels_tab[2][2][2] = ff_put_vp8_epel4_h6v6_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][1] = ff_put_vp8_bilin16_h_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][2] = ff_put_vp8_bilin16_h_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][1][0] = ff_put_vp8_bilin16_v_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][1][1] = ff_put_vp8_bilin16_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][1][2] = ff_put_vp8_bilin16_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][0] = ff_put_vp8_bilin16_v_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][1] = ff_put_vp8_bilin16_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][2] = ff_put_vp8_bilin16_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][1] = ff_put_vp8_bilin8_h_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][2] = ff_put_vp8_bilin8_h_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][0] = ff_put_vp8_bilin8_v_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][1] = ff_put_vp8_bilin8_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][2] = ff_put_vp8_bilin8_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][0] = ff_put_vp8_bilin8_v_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][1] = ff_put_vp8_bilin8_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][2] = ff_put_vp8_bilin8_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][0] = ff_put_vp8_pixels4_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][1] = ff_put_vp8_bilin4_h_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][2] = ff_put_vp8_bilin4_h_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][0] = ff_put_vp8_bilin4_v_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][1] = ff_put_vp8_bilin4_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][2] = ff_put_vp8_bilin4_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][0] = ff_put_vp8_bilin4_v_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_armv6; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_armv6; | |||
| } | |||
| @@ -0,0 +1,114 @@ | |||
| /* | |||
| * 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 <stdint.h> | |||
| #include "libavcodec/vp8dsp.h" | |||
| #include "vp8dsp.h" | |||
| void ff_vp8_luma_dc_wht_neon(DCTELEM block[4][4][16], DCTELEM dc[16]); | |||
| void ff_vp8_idct_add_neon(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride); | |||
| void ff_vp8_idct_dc_add_neon(uint8_t *dst, DCTELEM block[16], ptrdiff_t stride); | |||
| void ff_vp8_idct_dc_add4y_neon(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride); | |||
| void ff_vp8_idct_dc_add4uv_neon(uint8_t *dst, DCTELEM block[4][16], ptrdiff_t stride); | |||
| VP8_LF(neon); | |||
| VP8_EPEL(16, neon); | |||
| VP8_EPEL(8, neon); | |||
| VP8_EPEL(4, neon); | |||
| VP8_BILIN(16, neon); | |||
| VP8_BILIN(8, neon); | |||
| VP8_BILIN(4, neon); | |||
| av_cold void ff_vp8dsp_init_neon(VP8DSPContext *dsp) | |||
| { | |||
| dsp->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_neon; | |||
| dsp->vp8_idct_add = ff_vp8_idct_add_neon; | |||
| dsp->vp8_idct_dc_add = ff_vp8_idct_dc_add_neon; | |||
| dsp->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_neon; | |||
| dsp->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_neon; | |||
| dsp->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16_neon; | |||
| dsp->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16_neon; | |||
| dsp->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_neon; | |||
| dsp->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_neon; | |||
| dsp->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16_inner_neon; | |||
| dsp->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16_inner_neon; | |||
| dsp->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_neon; | |||
| dsp->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_neon; | |||
| dsp->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter16_simple_neon; | |||
| dsp->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter16_simple_neon; | |||
| dsp->put_vp8_epel_pixels_tab[0][0][0] = ff_put_vp8_pixels16_neon; | |||
| dsp->put_vp8_epel_pixels_tab[0][0][2] = ff_put_vp8_epel16_h6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[0][2][0] = ff_put_vp8_epel16_v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[0][2][2] = ff_put_vp8_epel16_h6v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][0][0] = ff_put_vp8_pixels8_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][0][1] = ff_put_vp8_epel8_h4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][0][2] = ff_put_vp8_epel8_h6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][1][0] = ff_put_vp8_epel8_v4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][1][1] = ff_put_vp8_epel8_h4v4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][1][2] = ff_put_vp8_epel8_h6v4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][2][0] = ff_put_vp8_epel8_v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][2][1] = ff_put_vp8_epel8_h4v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[1][2][2] = ff_put_vp8_epel8_h6v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][0][1] = ff_put_vp8_epel4_h4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][0][2] = ff_put_vp8_epel4_h6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][1][0] = ff_put_vp8_epel4_v4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][1][1] = ff_put_vp8_epel4_h4v4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][1][2] = ff_put_vp8_epel4_h6v4_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][2][0] = ff_put_vp8_epel4_v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][2][1] = ff_put_vp8_epel4_h4v6_neon; | |||
| dsp->put_vp8_epel_pixels_tab[2][2][2] = ff_put_vp8_epel4_h6v6_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][1] = ff_put_vp8_bilin16_h_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][0][2] = ff_put_vp8_bilin16_h_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][1][0] = ff_put_vp8_bilin16_v_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][1][1] = ff_put_vp8_bilin16_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][1][2] = ff_put_vp8_bilin16_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][0] = ff_put_vp8_bilin16_v_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][1] = ff_put_vp8_bilin16_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[0][2][2] = ff_put_vp8_bilin16_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][1] = ff_put_vp8_bilin8_h_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][0][2] = ff_put_vp8_bilin8_h_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][0] = ff_put_vp8_bilin8_v_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][1] = ff_put_vp8_bilin8_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][1][2] = ff_put_vp8_bilin8_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][0] = ff_put_vp8_bilin8_v_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][1] = ff_put_vp8_bilin8_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[1][2][2] = ff_put_vp8_bilin8_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][1] = ff_put_vp8_bilin4_h_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][0][2] = ff_put_vp8_bilin4_h_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][0] = ff_put_vp8_bilin4_v_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][1] = ff_put_vp8_bilin4_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][1][2] = ff_put_vp8_bilin4_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][0] = ff_put_vp8_bilin4_v_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][1] = ff_put_vp8_bilin4_hv_neon; | |||
| dsp->put_vp8_bilinear_pixels_tab[2][2][2] = ff_put_vp8_bilin4_hv_neon; | |||
| } | |||
| @@ -2819,7 +2819,7 @@ int ff_check_alignment(void){ | |||
| av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) | |||
| { | |||
| int i; | |||
| int i, j; | |||
| ff_check_alignment(); | |||
| @@ -3178,11 +3178,15 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) | |||
| if (ARCH_SH4) ff_dsputil_init_sh4 (c, avctx); | |||
| if (ARCH_BFIN) ff_dsputil_init_bfin (c, avctx); | |||
| for(i=0; i<64; i++){ | |||
| if(!c->put_2tap_qpel_pixels_tab[0][i]) | |||
| c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i]; | |||
| if(!c->avg_2tap_qpel_pixels_tab[0][i]) | |||
| c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i]; | |||
| for (i = 0; i < 4; i++) { | |||
| for (j = 0; j < 16; j++) { | |||
| if(!c->put_2tap_qpel_pixels_tab[i][j]) | |||
| c->put_2tap_qpel_pixels_tab[i][j] = | |||
| c->put_h264_qpel_pixels_tab[i][j]; | |||
| if(!c->avg_2tap_qpel_pixels_tab[i][j]) | |||
| c->avg_2tap_qpel_pixels_tab[i][j] = | |||
| c->avg_h264_qpel_pixels_tab[i][j]; | |||
| } | |||
| } | |||
| ff_init_scantable_permutation(c->idct_permutation, | |||
| @@ -23,6 +23,7 @@ | |||
| * FFT and MDCT tests. | |||
| */ | |||
| #include "libavutil/cpu.h" | |||
| #include "libavutil/mathematics.h" | |||
| #include "libavutil/lfg.h" | |||
| #include "libavutil/log.h" | |||
| @@ -240,6 +241,7 @@ int main(int argc, char **argv) | |||
| FFTComplex *tab, *tab1, *tab_ref; | |||
| FFTSample *tab2; | |||
| int it, i, c; | |||
| int cpuflags; | |||
| int do_speed = 0; | |||
| int err = 1; | |||
| enum tf_transform transform = TRANSFORM_FFT; | |||
| @@ -258,7 +260,7 @@ int main(int argc, char **argv) | |||
| fft_nbits = 9; | |||
| for(;;) { | |||
| c = getopt(argc, argv, "hsimrdn:f:"); | |||
| c = getopt(argc, argv, "hsimrdn:f:c:"); | |||
| if (c == -1) | |||
| break; | |||
| switch(c) { | |||
| @@ -286,6 +288,12 @@ int main(int argc, char **argv) | |||
| case 'f': | |||
| scale = atof(optarg); | |||
| break; | |||
| case 'c': | |||
| cpuflags = av_parse_cpu_flags(optarg); | |||
| if (cpuflags < 0) | |||
| return 1; | |||
| av_set_cpu_flags_mask(cpuflags); | |||
| break; | |||
| } | |||
| } | |||
| @@ -249,6 +249,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = { | |||
| { CODEC_ID_DTS, MKTAG('d', 't', 's', 'h') }, /* DTS-HD audio formats */ | |||
| { CODEC_ID_DTS, MKTAG('d', 't', 's', 'l') }, /* DTS-HD Lossless formats */ | |||
| { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */ | |||
| { CODEC_ID_EAC3, MKTAG('e', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F (only valid in ISOBMFF) */ | |||
| { CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') }, | |||
| { CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') }, | |||
| { CODEC_ID_EAC3, MKTAG('e', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */ | |||
| @@ -1985,7 +1985,7 @@ static int has_duration(AVFormatContext *ic) | |||
| if (st->duration != AV_NOPTS_VALUE) | |||
| return 1; | |||
| } | |||
| if (ic->duration) | |||
| if (ic->duration != AV_NOPTS_VALUE) | |||
| return 1; | |||
| return 0; | |||
| } | |||
| @@ -153,7 +153,7 @@ | |||
| */ | |||
| #define LIBAVUTIL_VERSION_MAJOR 51 | |||
| #define LIBAVUTIL_VERSION_MINOR 47 | |||
| #define LIBAVUTIL_VERSION_MINOR 48 | |||
| #define LIBAVUTIL_VERSION_MICRO 100 | |||
| #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ | |||
| @@ -18,6 +18,7 @@ | |||
| #include "cpu.h" | |||
| #include "config.h" | |||
| #include "opt.h" | |||
| static int flags, checked; | |||
| @@ -46,6 +47,69 @@ void av_set_cpu_flags_mask(int mask) | |||
| checked = 1; | |||
| } | |||
| int av_parse_cpu_flags(const char *s) | |||
| { | |||
| #define CPUFLAG_MMX2 (AV_CPU_FLAG_MMX | AV_CPU_FLAG_MMX2) | |||
| #define CPUFLAG_3DNOW (AV_CPU_FLAG_3DNOW | AV_CPU_FLAG_MMX) | |||
| #define CPUFLAG_3DNOWEXT (AV_CPU_FLAG_3DNOWEXT | CPUFLAG_3DNOW) | |||
| #define CPUFLAG_SSE (AV_CPU_FLAG_SSE | CPUFLAG_MMX2) | |||
| #define CPUFLAG_SSE2 (AV_CPU_FLAG_SSE2 | CPUFLAG_SSE) | |||
| #define CPUFLAG_SSE2SLOW (AV_CPU_FLAG_SSE2SLOW | CPUFLAG_SSE2) | |||
| #define CPUFLAG_SSE3 (AV_CPU_FLAG_SSE3 | CPUFLAG_SSE2) | |||
| #define CPUFLAG_SSE3SLOW (AV_CPU_FLAG_SSE3SLOW | CPUFLAG_SSE3) | |||
| #define CPUFLAG_SSSE3 (AV_CPU_FLAG_SSSE3 | CPUFLAG_SSE3) | |||
| #define CPUFLAG_SSE4 (AV_CPU_FLAG_SSE4 | CPUFLAG_SSSE3) | |||
| #define CPUFLAG_SSE42 (AV_CPU_FLAG_SSE42 | CPUFLAG_SSE4) | |||
| #define CPUFLAG_AVX (AV_CPU_FLAG_AVX | CPUFLAG_SSE42) | |||
| #define CPUFLAG_XOP (AV_CPU_FLAG_XOP | CPUFLAG_AVX) | |||
| #define CPUFLAG_FMA4 (AV_CPU_FLAG_FMA4 | CPUFLAG_AVX) | |||
| static const AVOption cpuflags_opts[] = { | |||
| { "flags" , NULL, 0, AV_OPT_TYPE_FLAGS, { 0 }, INT64_MIN, INT64_MAX, .unit = "flags" }, | |||
| #if ARCH_PPC | |||
| { "altivec" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ALTIVEC }, .unit = "flags" }, | |||
| #elif ARCH_X86 | |||
| { "mmx" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_MMX }, .unit = "flags" }, | |||
| { "mmx2" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_MMX2 }, .unit = "flags" }, | |||
| { "sse" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE }, .unit = "flags" }, | |||
| { "sse2" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE2 }, .unit = "flags" }, | |||
| { "sse2slow", NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE2SLOW }, .unit = "flags" }, | |||
| { "sse3" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE3 }, .unit = "flags" }, | |||
| { "sse3slow", NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE3SLOW }, .unit = "flags" }, | |||
| { "ssse3" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSSE3 }, .unit = "flags" }, | |||
| { "atom" , NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ATOM }, .unit = "flags" }, | |||
| { "sse4.1" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE4 }, .unit = "flags" }, | |||
| { "sse4.2" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_SSE42 }, .unit = "flags" }, | |||
| { "avx" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_AVX }, .unit = "flags" }, | |||
| { "xop" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_XOP }, .unit = "flags" }, | |||
| { "fma4" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_FMA4 }, .unit = "flags" }, | |||
| { "3dnow" , NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_3DNOW }, .unit = "flags" }, | |||
| { "3dnowext", NULL, 0, AV_OPT_TYPE_CONST, { CPUFLAG_3DNOWEXT }, .unit = "flags" }, | |||
| #elif ARCH_ARM | |||
| { "armv5te", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV5TE }, .unit = "flags" }, | |||
| { "armv6", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6 }, .unit = "flags" }, | |||
| { "armv6t2", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_ARMV6T2 }, .unit = "flags" }, | |||
| { "vfp", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_VFP }, .unit = "flags" }, | |||
| { "vfpv3", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_VFPV3 }, .unit = "flags" }, | |||
| { "neon", NULL, 0, AV_OPT_TYPE_CONST, { AV_CPU_FLAG_NEON }, .unit = "flags" }, | |||
| #endif | |||
| { NULL }, | |||
| }; | |||
| static const AVClass class = { | |||
| .class_name = "cpuflags", | |||
| .item_name = av_default_item_name, | |||
| .option = cpuflags_opts, | |||
| .version = LIBAVUTIL_VERSION_INT, | |||
| }; | |||
| int flags = 0, ret; | |||
| const AVClass *pclass = &class; | |||
| if ((ret = av_opt_eval_flags(&pclass, &cpuflags_opts[0], s, &flags)) < 0) | |||
| return ret; | |||
| return flags & INT_MAX; | |||
| } | |||
| #ifdef TEST | |||
| #undef printf | |||
| @@ -72,6 +72,13 @@ void av_force_cpu_flags(int flags); | |||
| */ | |||
| attribute_deprecated void av_set_cpu_flags_mask(int mask); | |||
| /** | |||
| * Parse CPU flags from a string. | |||
| * | |||
| * @return a combination of AV_CPU_* flags, negative on error. | |||
| */ | |||
| int av_parse_cpu_flags(const char *s); | |||
| /* The following CPU-specific functions shall not be called directly. */ | |||
| int ff_get_cpu_flags_arm(void); | |||
| int ff_get_cpu_flags_ppc(void); | |||
| @@ -4,36 +4,38 @@ FATE_FFT += fate-fft-$(1) fate-ifft-$(1) \ | |||
| fate-rdft-$(1) fate-irdft-$(1) \ | |||
| fate-dct1d-$(1) fate-idct1d-$(1) | |||
| fate-fft-$(N): CMD = run libavcodec/fft-test -n$(1) | |||
| fate-ifft-$(N): CMD = run libavcodec/fft-test -n$(1) -i | |||
| fate-mdct-$(N): CMD = run libavcodec/fft-test -n$(1) -m | |||
| fate-imdct-$(N): CMD = run libavcodec/fft-test -n$(1) -m -i | |||
| fate-rdft-$(N): CMD = run libavcodec/fft-test -n$(1) -r | |||
| fate-irdft-$(N): CMD = run libavcodec/fft-test -n$(1) -r -i | |||
| fate-dct1d-$(N): CMD = run libavcodec/fft-test -n$(1) -d | |||
| fate-idct1d-$(N): CMD = run libavcodec/fft-test -n$(1) -d -i | |||
| fate-fft-$(N): ARGS = -n$(1) | |||
| fate-ifft-$(N): ARGS = -n$(1) -i | |||
| fate-mdct-$(N): ARGS = -n$(1) -m | |||
| fate-imdct-$(N): ARGS = -n$(1) -m -i | |||
| fate-rdft-$(N): ARGS = -n$(1) -r | |||
| fate-irdft-$(N): ARGS = -n$(1) -r -i | |||
| fate-dct1d-$(N): ARGS = -n$(1) -d | |||
| fate-idct1d-$(N): ARGS = -n$(1) -d -i | |||
| endef | |||
| $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT,$(N)))) | |||
| fate-fft-test: $(FATE_FFT) | |||
| $(FATE_FFT): libavcodec/fft-test$(EXESUF) | |||
| $(FATE_FFT): CMD = run libavcodec/fft-test $(CPUFLAGS:%=-c%) $(ARGS) | |||
| $(FATE_FFT): REF = /dev/null | |||
| define DEF_FFT_FIXED | |||
| FATE_FFT_FIXED += fate-fft-fixed-$(1) fate-ifft-fixed-$(1) \ | |||
| fate-mdct-fixed-$(1) fate-imdct-fixed-$(1) | |||
| fate-fft-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) | |||
| fate-ifft-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) -i | |||
| fate-mdct-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) -m | |||
| fate-imdct-fixed-$(1): CMD = run libavcodec/fft-fixed-test -n$(1) -m -i | |||
| fate-fft-fixed-$(1): ARGS = -n$(1) | |||
| fate-ifft-fixed-$(1): ARGS = -n$(1) -i | |||
| fate-mdct-fixed-$(1): ARGS = -n$(1) -m | |||
| fate-imdct-fixed-$(1): ARGS = -n$(1) -m -i | |||
| endef | |||
| $(foreach N, 4 5 6 7 8 9 10 11 12, $(eval $(call DEF_FFT_FIXED,$(N)))) | |||
| fate-fft-fixed-test: $(FATE_FFT_FIXED) | |||
| $(FATE_FFT_FIXED): libavcodec/fft-fixed-test$(EXESUF) | |||
| $(FATE_FFT_FIXED): CMD = run libavcodec/fft-fixed-test $(CPUFLAGS:%=-c%) $(ARGS) | |||
| $(FATE_FFT_FIXED): REF = /dev/null | |||
| FATE_TESTS += $(FATE_FFT) $(FATE_FFT_FIXED) | |||