History

Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'

* commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h

Michael Niedermayer committed 12 years ago

Commit 581b5f02 parents 909f53f e3fcb1484 files · +1332 −996Browse files

Showing the changes to libavcodec/arm (13 of 84 files). Show all

Unified · Split

13 files
  1. libavcodec/arm/Makefile +13 −10
  2. libavcodec/arm/dsputil_arm.h +0 −4
  3. libavcodec/arm/dsputil_armv6.S +0 −27
  4. libavcodec/arm/dsputil_init_arm.c +0 −60
  5. libavcodec/arm/dsputil_init_armv6.c +0 −18
  6. libavcodec/arm/idctdsp_arm.S +1 −1
  7. libavcodec/arm/idctdsp_arm.h +34 −0
  8. libavcodec/arm/idctdsp_armv6.S +48 −0
  9. libavcodec/arm/idctdsp_init_arm.c +98 −0
  10. libavcodec/arm/idctdsp_init_armv5te.c +3 −3
  11. libavcodec/arm/idctdsp_init_armv6.c +48 −0
  12. libavcodec/arm/idctdsp_init_neon.c +4 −4
  13. libavcodec/arm/idctdsp_neon.S +1 −1
libavcodec/arm/Makefile+13−10
@@ -6,10 +6,7 @@ OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_init_arm.o \ · 5 unmodified lines
66 arm/ac3dsp_arm.o
77 OBJS-$(CONFIG_AUDIODSP) += arm/audiodsp_init_arm.o
88 OBJS-$(CONFIG_BLOCKDSP) += arm/blockdsp_init_arm.o
9−OBJS-$(CONFIG_DSPUTIL) += arm/dsputil_init_arm.o \
10− arm/dsputil_arm.o \
11− arm/jrevdct_arm.o \
12− arm/simple_idct_arm.o
9+OBJS-$(CONFIG_DSPUTIL) += arm/dsputil_init_arm.o
1310 OBJS-$(CONFIG_FFT) += arm/fft_init_arm.o \
1411 arm/fft_fixed_init_arm.o
1512 OBJS-$(CONFIG_H264CHROMA) += arm/h264chroma_init_arm.o
@@ -18,6 +15,10 @@ OBJS-$(CONFIG_H264PRED) += arm/h264pred_init_arm.o · 2 unmodified lines
1815 OBJS-$(CONFIG_H264QPEL) += arm/h264qpel_init_arm.o
1916 OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_arm.o \
2017 arm/hpeldsp_arm.o
18+OBJS-$(CONFIG_IDCTDSP) += arm/idctdsp_init_arm.o \
19+ arm/idctdsp_arm.o \
20+ arm/jrevdct_arm.o \
21+ arm/simple_idct_arm.o
2122 OBJS-$(CONFIG_LLAUDDSP) += arm/lossless_audiodsp_init_arm.o
2223 OBJS-$(CONFIG_MPEGAUDIODSP) += arm/mpegaudiodsp_init_arm.o
2324 OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_arm.o
@@ -41,7 +42,7 @@ OBJS-$(CONFIG_RV30_DECODER) += arm/rv34dsp_init_arm.o · 17 unmodified lines
4142 OBJS-$(CONFIG_RV40_DECODER) += arm/rv34dsp_init_arm.o \
4243 arm/rv40dsp_init_arm.o
4344
44−ARMV5TE-OBJS-$(CONFIG_DSPUTIL) += arm/dsputil_init_armv5te.o \
45+ARMV5TE-OBJS-$(CONFIG_IDCTDSP) += arm/idctdsp_init_armv5te.o \
4546 arm/simple_idct_armv5te.o
4647 ARMV5TE-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_armv5te.o \
4748 arm/mpegvideo_armv5te_s.o
@@ -52,11 +53,13 @@ ARMV5TE-OBJS-$(CONFIG_MLP_DECODER) += arm/mlpdsp_armv5te.o · 4 unmodified lines
5253
5354 ARMV6-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_armv6.o
5455 ARMV6-OBJS-$(CONFIG_DSPUTIL) += arm/dsputil_init_armv6.o \
55− arm/dsputil_armv6.o \
56− arm/simple_idct_armv6.o
56+ arm/dsputil_armv6.o
5757 ARMV6-OBJS-$(CONFIG_H264DSP) += arm/startcode_armv6.o
5858 ARMV6-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_armv6.o \
5959 arm/hpeldsp_armv6.o
60+ARMV6-OBJS-$(CONFIG_IDCTDSP) += arm/idctdsp_init_armv6.o \
61+ arm/idctdsp_armv6.o \
62+ arm/simple_idct_armv6.o
6063 ARMV6-OBJS-$(CONFIG_MPEGAUDIODSP) += arm/mpegaudiodsp_fixed_armv6.o
6164
6265 ARMV6-OBJS-$(CONFIG_MLP_DECODER) += arm/mlpdsp_armv6.o
@@ -86,9 +89,6 @@ NEON-OBJS-$(CONFIG_AUDIODSP) += arm/audiodsp_init_neon.o \ · 23 unmodified lines
8689 arm/int_neon.o
8790 NEON-OBJS-$(CONFIG_BLOCKDSP) += arm/blockdsp_init_neon.o \
8891 arm/blockdsp_neon.o
89−NEON-OBJS-$(CONFIG_DSPUTIL) += arm/dsputil_init_neon.o \
90− arm/dsputil_neon.o \
91− arm/simple_idct_neon.o
9292 NEON-OBJS-$(CONFIG_FFT) += arm/fft_neon.o \
9393 arm/fft_fixed_neon.o
9494 NEON-OBJS-$(CONFIG_H264CHROMA) += arm/h264cmc_neon.o
@@ -99,6 +99,9 @@ NEON-OBJS-$(CONFIG_H264QPEL) += arm/h264qpel_neon.o \ · 4 unmodified lines
9999 arm/hpeldsp_neon.o
100100 NEON-OBJS-$(CONFIG_HPELDSP) += arm/hpeldsp_init_neon.o \
101101 arm/hpeldsp_neon.o
102+NEON-OBJS-$(CONFIG_IDCTDSP) += arm/idctdsp_init_neon.o \
103+ arm/idctdsp_neon.o \
104+ arm/simple_idct_neon.o
102105 NEON-OBJS-$(CONFIG_MDCT) += arm/mdct_neon.o \
103106 arm/mdct_fixed_neon.o
104107 NEON-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_neon.o
libavcodec/arm/dsputil_arm.h+0−4
@@ -24,11 +24,7 @@ · 23 unmodified lines
2424 #include "libavcodec/avcodec.h"
2525 #include "libavcodec/dsputil.h"
2626
27−void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx,
28− unsigned high_bit_depth);
2927 void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx,
3028 unsigned high_bit_depth);
31−void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx,
32− unsigned high_bit_depth);
3329
3430 #endif /* AVCODEC_ARM_DSPUTIL_ARM_H */
libavcodec/arm/dsputil_armv6.S+0−27
@@ -20,33 +20,6 @@ · 19 unmodified lines
2020
2121 #include "libavutil/arm/asm.S"
2222
23−function ff_add_pixels_clamped_armv6, export=1
24− push {r4-r8,lr}
25− mov r3, #8
26−1:
27− ldm r0!, {r4,r5,r12,lr}
28− ldrd r6, r7, [r1]
29− pkhbt r8, r4, r5, lsl #16
30− pkhtb r5, r5, r4, asr #16
31− pkhbt r4, r12, lr, lsl #16
32− pkhtb lr, lr, r12, asr #16
33− pld [r1, r2]
34− uxtab16 r8, r8, r6
35− uxtab16 r5, r5, r6, ror #8
36− uxtab16 r4, r4, r7
37− uxtab16 lr, lr, r7, ror #8
38− usat16 r8, #8, r8
39− usat16 r5, #8, r5
40− usat16 r4, #8, r4
41− usat16 lr, #8, lr
42− orr r6, r8, r5, lsl #8
43− orr r7, r4, lr, lsl #8
44− subs r3, r3, #1
45− strd_post r6, r7, r1, r2
46− bgt 1b
47− pop {r4-r8,pc}
48−endfunc
49−
5023 function ff_get_pixels_armv6, export=1
5124 pld [r1, r2]
5225 push {r4-r8, lr}
libavcodec/arm/dsputil_init_arm.c+0−60
@@ -28,71 +28,11 @@ · 27 unmodified lines
2828 #include "libavcodec/dsputil.h"
2929 #include "dsputil_arm.h"
3030
31−void ff_j_rev_dct_arm(int16_t *data);
32−void ff_simple_idct_arm(int16_t *data);
33−
34−/* XXX: local hack */
35−static void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
36−static void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
37−
38−void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
39− int line_size);
40−
41−/* XXX: those functions should be suppressed ASAP when all IDCTs are
42− * converted */
43−static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block)
44−{
45− ff_j_rev_dct_arm(block);
46− ff_put_pixels_clamped(block, dest, line_size);
47−}
48−
49−static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block)
50−{
51− ff_j_rev_dct_arm(block);
52− ff_add_pixels_clamped(block, dest, line_size);
53−}
54−
55−static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block)
56−{
57− ff_simple_idct_arm(block);
58− ff_put_pixels_clamped(block, dest, line_size);
59−}
60−
61−static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block)
62−{
63− ff_simple_idct_arm(block);
64− ff_add_pixels_clamped(block, dest, line_size);
65−}
66−
6731 av_cold void ff_dsputil_init_arm(DSPContext *c, AVCodecContext *avctx,
6832 unsigned high_bit_depth)
6933 {
7034 int cpu_flags = av_get_cpu_flags();
7135
72− ff_put_pixels_clamped = c->put_pixels_clamped;
73− ff_add_pixels_clamped = c->add_pixels_clamped;
74−
75− if (!avctx->lowres && !high_bit_depth) {
76− if (avctx->idct_algo == FF_IDCT_AUTO ||
77− avctx->idct_algo == FF_IDCT_ARM) {
78− c->idct_put = j_rev_dct_arm_put;
79− c->idct_add = j_rev_dct_arm_add;
80− c->idct = ff_j_rev_dct_arm;
81− c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
82− } else if (avctx->idct_algo == FF_IDCT_SIMPLEARM) {
83− c->idct_put = simple_idct_arm_put;
84− c->idct_add = simple_idct_arm_add;
85− c->idct = ff_simple_idct_arm;
86− c->idct_permutation_type = FF_NO_IDCT_PERM;
87− }
88− }
89−
90− c->add_pixels_clamped = ff_add_pixels_clamped_arm;
91−
92− if (have_armv5te(cpu_flags))
93− ff_dsputil_init_armv5te(c, avctx, high_bit_depth);
9436 if (have_armv6(cpu_flags))
9537 ff_dsputil_init_armv6(c, avctx, high_bit_depth);
96− if (have_neon(cpu_flags))
97− ff_dsputil_init_neon(c, avctx, high_bit_depth);
9838 }
libavcodec/arm/dsputil_init_armv6.c+0−18
@@ -26,13 +26,6 @@ · 25 unmodified lines
2626 #include "libavcodec/mpegvideo.h"
2727 #include "dsputil_arm.h"
2828
29−void ff_simple_idct_armv6(int16_t *data);
30−void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data);
31−void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data);
32−
33−void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels,
34− int line_size);
35−
3629 void ff_get_pixels_armv6(int16_t *block, const uint8_t *pixels, int stride);
3730 void ff_diff_pixels_armv6(int16_t *block, const uint8_t *s1,
3831 const uint8_t *s2, int stride);
@@ -56,17 +49,6 @@ int ff_pix_sum_armv6(uint8_t *pix, int line_size); · 17 unmodified lines
5649 av_cold void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx,
5750 unsigned high_bit_depth)
5851 {
59− if (!avctx->lowres && !high_bit_depth) {
60− if (avctx->idct_algo == FF_IDCT_AUTO ||
61− avctx->idct_algo == FF_IDCT_SIMPLEARMV6) {
62− c->idct_put = ff_simple_idct_put_armv6;
63− c->idct_add = ff_simple_idct_add_armv6;
64− c->idct = ff_simple_idct_armv6;
65− c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
66− }
67− }
68− c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
69−
7052 if (!high_bit_depth)
7153 c->get_pixels = ff_get_pixels_armv6;
7254 c->diff_pixels = ff_diff_pixels_armv6;
libavcodec/arm/idctdsp_arm.Srenamed from libavcodec/arm/dsputil_arm.S+1−1
@@ -1,5 +1,5 @@
11 @
2−@ ARMv4 optimized DSP utils
2+@ ARMv4-optimized IDCT functions
33 @ Copyright (c) 2004 AGAWA Koji <i (AT) atty (DOT) jp>
44 @
55 @ This file is part of FFmpeg.
libavcodec/arm/idctdsp_arm.h+34−0
@@ -0,0 +1,34 @@
1+/*
2+ * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
3+ *
4+ * This file is part of FFmpeg.
5+ *
6+ * FFmpeg is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU Lesser General Public
8+ * License as published by the Free Software Foundation; either
9+ * version 2.1 of the License, or (at your option) any later version.
10+ *
11+ * FFmpeg is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+ * Lesser General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU Lesser General Public
17+ * License along with FFmpeg; if not, write to the Free Software
18+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19+ */
20+
21+#ifndef AVCODEC_ARM_IDCTDSP_ARM_H
22+#define AVCODEC_ARM_IDCTDSP_ARM_H
23+
24+#include "libavcodec/avcodec.h"
25+#include "libavcodec/idctdsp.h"
26+
27+void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
28+ unsigned high_bit_depth);
29+void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
30+ unsigned high_bit_depth);
31+void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
32+ unsigned high_bit_depth);
33+
34+#endif /* AVCODEC_ARM_IDCTDSP_ARM_H */
libavcodec/arm/idctdsp_armv6.S+48−0
@@ -0,0 +1,48 @@
1+/*
2+ * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
3+ *
4+ * This file is part of FFmpeg.
5+ *
6+ * FFmpeg is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU Lesser General Public
8+ * License as published by the Free Software Foundation; either
9+ * version 2.1 of the License, or (at your option) any later version.
10+ *
11+ * FFmpeg is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+ * Lesser General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU Lesser General Public
17+ * License along with FFmpeg; if not, write to the Free Software
18+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19+ */
20+
21+#include "libavutil/arm/asm.S"
22+
23+function ff_add_pixels_clamped_armv6, export=1
24+ push {r4-r8,lr}
25+ mov r3, #8
26+1:
27+ ldm r0!, {r4,r5,r12,lr}
28+ ldrd r6, r7, [r1]
29+ pkhbt r8, r4, r5, lsl #16
30+ pkhtb r5, r5, r4, asr #16
31+ pkhbt r4, r12, lr, lsl #16
32+ pkhtb lr, lr, r12, asr #16
33+ pld [r1, r2]
34+ uxtab16 r8, r8, r6
35+ uxtab16 r5, r5, r6, ror #8
36+ uxtab16 r4, r4, r7
37+ uxtab16 lr, lr, r7, ror #8
38+ usat16 r8, #8, r8
39+ usat16 r5, #8, r5
40+ usat16 r4, #8, r4
41+ usat16 lr, #8, lr
42+ orr r6, r8, r5, lsl #8
43+ orr r7, r4, lr, lsl #8
44+ subs r3, r3, #1
45+ strd_post r6, r7, r1, r2
46+ bgt 1b
47+ pop {r4-r8,pc}
48+endfunc
libavcodec/arm/idctdsp_init_arm.c+98−0
@@ -0,0 +1,98 @@
1+/*
2+ * ARM-optimized IDCT functions
3+ * Copyright (c) 2001 Lionel Ulmer
4+ *
5+ * This file is part of FFmpeg.
6+ *
7+ * FFmpeg is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU Lesser General Public
9+ * License as published by the Free Software Foundation; either
10+ * version 2.1 of the License, or (at your option) any later version.
11+ *
12+ * FFmpeg is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+ * Lesser General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU Lesser General Public
18+ * License along with FFmpeg; if not, write to the Free Software
19+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+ */
21+
22+#include <stdint.h>
23+
24+#include "libavutil/attributes.h"
25+#include "libavutil/cpu.h"
26+#include "libavutil/arm/cpu.h"
27+#include "libavcodec/avcodec.h"
28+#include "libavcodec/idctdsp.h"
29+#include "idctdsp_arm.h"
30+
31+void ff_j_rev_dct_arm(int16_t *data);
32+void ff_simple_idct_arm(int16_t *data);
33+
34+/* XXX: local hack */
35+static void (*ff_put_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
36+static void (*ff_add_pixels_clamped)(const int16_t *block, uint8_t *pixels, int line_size);
37+
38+void ff_add_pixels_clamped_arm(const int16_t *block, uint8_t *dest,
39+ int line_size);
40+
41+/* XXX: those functions should be suppressed ASAP when all IDCTs are
42+ * converted */
43+static void j_rev_dct_arm_put(uint8_t *dest, int line_size, int16_t *block)
44+{
45+ ff_j_rev_dct_arm(block);
46+ ff_put_pixels_clamped(block, dest, line_size);
47+}
48+
49+static void j_rev_dct_arm_add(uint8_t *dest, int line_size, int16_t *block)
50+{
51+ ff_j_rev_dct_arm(block);
52+ ff_add_pixels_clamped(block, dest, line_size);
53+}
54+
55+static void simple_idct_arm_put(uint8_t *dest, int line_size, int16_t *block)
56+{
57+ ff_simple_idct_arm(block);
58+ ff_put_pixels_clamped(block, dest, line_size);
59+}
60+
61+static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block)
62+{
63+ ff_simple_idct_arm(block);
64+ ff_add_pixels_clamped(block, dest, line_size);
65+}
66+
67+av_cold void ff_idctdsp_init_arm(IDCTDSPContext *c, AVCodecContext *avctx,
68+ unsigned high_bit_depth)
69+{
70+ int cpu_flags = av_get_cpu_flags();
71+
72+ ff_put_pixels_clamped = c->put_pixels_clamped;
73+ ff_add_pixels_clamped = c->add_pixels_clamped;
74+
75+ if (!avctx->lowres && !high_bit_depth) {
76+ if (avctx->idct_algo == FF_IDCT_AUTO ||
77+ avctx->idct_algo == FF_IDCT_ARM) {
78+ c->idct_put = j_rev_dct_arm_put;
79+ c->idct_add = j_rev_dct_arm_add;
80+ c->idct = ff_j_rev_dct_arm;
81+ c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
82+ } else if (avctx->idct_algo == FF_IDCT_SIMPLEARM) {
83+ c->idct_put = simple_idct_arm_put;
84+ c->idct_add = simple_idct_arm_add;
85+ c->idct = ff_simple_idct_arm;
86+ c->idct_permutation_type = FF_NO_IDCT_PERM;
87+ }
88+ }
89+
90+ c->add_pixels_clamped = ff_add_pixels_clamped_arm;
91+
92+ if (have_armv5te(cpu_flags))
93+ ff_idctdsp_init_armv5te(c, avctx, high_bit_depth);
94+ if (have_armv6(cpu_flags))
95+ ff_idctdsp_init_armv6(c, avctx, high_bit_depth);
96+ if (have_neon(cpu_flags))
97+ ff_idctdsp_init_neon(c, avctx, high_bit_depth);
98+}
libavcodec/arm/idctdsp_init_armv5te.crenamed from libavcodec/arm/dsputil_init_armv5te.c+3−3
@@ -22,14 +22,14 @@ · 21 unmodified lines
2222
2323 #include "libavutil/attributes.h"
2424 #include "libavcodec/avcodec.h"
25−#include "libavcodec/dsputil.h"
26−#include "dsputil_arm.h"
25+#include "libavcodec/idctdsp.h"
26+#include "idctdsp_arm.h"
2727
2828 void ff_simple_idct_armv5te(int16_t *data);
2929 void ff_simple_idct_put_armv5te(uint8_t *dest, int line_size, int16_t *data);
3030 void ff_simple_idct_add_armv5te(uint8_t *dest, int line_size, int16_t *data);
3131
32−av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx,
32+av_cold void ff_idctdsp_init_armv5te(IDCTDSPContext *c, AVCodecContext *avctx,
3333 unsigned high_bit_depth)
3434 {
3535 if (!avctx->lowres && !high_bit_depth &&
libavcodec/arm/idctdsp_init_armv6.c+48−0
@@ -0,0 +1,48 @@
1+/*
2+ * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
3+ *
4+ * This file is part of FFmpeg.
5+ *
6+ * FFmpeg is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU Lesser General Public
8+ * License as published by the Free Software Foundation; either
9+ * version 2.1 of the License, or (at your option) any later version.
10+ *
11+ * FFmpeg is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+ * Lesser General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU Lesser General Public
17+ * License along with FFmpeg; if not, write to the Free Software
18+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19+ */
20+
21+#include <stdint.h>
22+
23+#include "libavutil/attributes.h"
24+#include "libavcodec/avcodec.h"
25+#include "libavcodec/idctdsp.h"
26+#include "idctdsp_arm.h"
27+
28+void ff_simple_idct_armv6(int16_t *data);
29+void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, int16_t *data);
30+void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, int16_t *data);
31+
32+void ff_add_pixels_clamped_armv6(const int16_t *block, uint8_t *pixels,
33+ int line_size);
34+
35+av_cold void ff_idctdsp_init_armv6(IDCTDSPContext *c, AVCodecContext *avctx,
36+ unsigned high_bit_depth)
37+{
38+ if (!avctx->lowres && !high_bit_depth) {
39+ if (avctx->idct_algo == FF_IDCT_AUTO ||
40+ avctx->idct_algo == FF_IDCT_SIMPLEARMV6) {
41+ c->idct_put = ff_simple_idct_put_armv6;
42+ c->idct_add = ff_simple_idct_add_armv6;
43+ c->idct = ff_simple_idct_armv6;
44+ c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
45+ }
46+ }
47+ c->add_pixels_clamped = ff_add_pixels_clamped_armv6;
48+}
libavcodec/arm/idctdsp_init_neon.crenamed from libavcodec/arm/dsputil_init_neon.c+4−4
@@ -1,5 +1,5 @@
11 /*
2− * ARM NEON optimised DSP functions
2+ * ARM-NEON-optimized IDCT functions
33 * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
44 *
55 * This file is part of FFmpeg.
@@ -23,8 +23,8 @@ · 17 unmodified lines
2323
2424 #include "libavutil/attributes.h"
2525 #include "libavcodec/avcodec.h"
26−#include "libavcodec/dsputil.h"
27−#include "dsputil_arm.h"
26+#include "libavcodec/idctdsp.h"
27+#include "idctdsp_arm.h"
2828
2929 void ff_simple_idct_neon(int16_t *data);
3030 void ff_simple_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
@@ -34,7 +34,7 @@ void ff_add_pixels_clamped_neon(const int16_t *, uint8_t *, int); · 3 unmodified lines
3434 void ff_put_pixels_clamped_neon(const int16_t *, uint8_t *, int);
3535 void ff_put_signed_pixels_clamped_neon(const int16_t *, uint8_t *, int);
3636
37−av_cold void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx,
37+av_cold void ff_idctdsp_init_neon(IDCTDSPContext *c, AVCodecContext *avctx,
3838 unsigned high_bit_depth)
3939 {
4040 if (!avctx->lowres && !high_bit_depth) {
libavcodec/arm/idctdsp_neon.Srenamed from libavcodec/arm/dsputil_neon.S+1−1
@@ -1,5 +1,5 @@
11 /*
2− * ARM NEON optimised DSP functions
2+ * ARM-NEON-optimized IDCT functions
33 * Copyright (c) 2008 Mans Rullgard <mans@mansr.com>
44 *
55 * This file is part of FFmpeg.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t