FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vc1dsp_init_neon.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include <stdint.h>
20 
21 #include "libavutil/attributes.h"
22 #include "libavcodec/vc1dsp.h"
23 #include "vc1dsp.h"
24 
25 #include "config.h"
26 
27 void ff_vc1_inv_trans_8x8_neon(int16_t *block);
28 void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
29 void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
30 void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
31 
32 void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
33 void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
34 void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
35 void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block);
36 
38  ptrdiff_t line_size, int rnd);
39 
40 #define DECL_PUT(X, Y) \
41 void ff_put_vc1_mspel_mc##X##Y##_neon(uint8_t *dst, const uint8_t *src, \
42  ptrdiff_t stride, int rnd); \
43 static void ff_put_vc1_mspel_mc##X##Y##_16_neon(uint8_t *dst, const uint8_t *src, \
44  ptrdiff_t stride, int rnd) \
45 { \
46  ff_put_vc1_mspel_mc##X##Y##_neon(dst+0, src+0, stride, rnd); \
47  ff_put_vc1_mspel_mc##X##Y##_neon(dst+8, src+8, stride, rnd); \
48  dst += 8*stride; src += 8*stride; \
49  ff_put_vc1_mspel_mc##X##Y##_neon(dst+0, src+0, stride, rnd); \
50  ff_put_vc1_mspel_mc##X##Y##_neon(dst+8, src+8, stride, rnd); \
51 }
52 
53 DECL_PUT(1, 0)
54 DECL_PUT(2, 0)
55 DECL_PUT(3, 0)
56 
57 DECL_PUT(0, 1)
58 DECL_PUT(0, 2)
59 DECL_PUT(0, 3)
60 
61 DECL_PUT(1, 1)
62 DECL_PUT(1, 2)
63 DECL_PUT(1, 3)
64 
65 DECL_PUT(2, 1)
66 DECL_PUT(2, 2)
67 DECL_PUT(2, 3)
68 
69 DECL_PUT(3, 1)
70 DECL_PUT(3, 2)
71 DECL_PUT(3, 3)
72 
73 void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
74  int h, int x, int y);
75 void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
76  int h, int x, int y);
77 void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
78  int h, int x, int y);
79 void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
80  int h, int x, int y);
81 
82 #define FN_ASSIGN(X, Y) \
83  dsp->put_vc1_mspel_pixels_tab[0][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_16_neon; \
84  dsp->put_vc1_mspel_pixels_tab[1][X+4*Y] = ff_put_vc1_mspel_mc##X##Y##_neon
85 
87 {
96 
98  if (HAVE_AS_DN_DIRECTIVE) {
99  FN_ASSIGN(1, 0);
100  FN_ASSIGN(2, 0);
101  FN_ASSIGN(3, 0);
102 
103  FN_ASSIGN(0, 1);
104  FN_ASSIGN(1, 1);
105  FN_ASSIGN(2, 1);
106  FN_ASSIGN(3, 1);
107 
108  FN_ASSIGN(0, 2);
109  FN_ASSIGN(1, 2);
110  FN_ASSIGN(2, 2);
111  FN_ASSIGN(3, 2);
112 
113  FN_ASSIGN(0, 3);
114  FN_ASSIGN(1, 3);
115  FN_ASSIGN(2, 3);
116  FN_ASSIGN(3, 3);
117  }
118 
123 }
VC-1 and WMV3 decoder.
void ff_put_pixels8x8_neon(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int rnd)
#define src
Definition: vp8dsp.c:254
vc1op_pixels_func put_vc1_mspel_pixels_tab[2][16]
Definition: vc1dsp.h:59
Macro definitions for various function/variable attributes.
static int16_t block[64]
Definition: dct.c:115
void ff_vc1_inv_trans_4x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
uint8_t
#define DECL_PUT(X, Y)
#define av_cold
Definition: attributes.h:82
void(* vc1_inv_trans_8x8)(int16_t *b)
Definition: vc1dsp.h:37
void ff_vc1_inv_trans_8x8_neon(int16_t *block)
void ff_vc1_inv_trans_4x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
void(* vc1_inv_trans_8x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:41
void(* vc1_inv_trans_8x4)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:38
void(* vc1_inv_trans_4x4)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:40
void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y)
void(* vc1_inv_trans_8x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:42
h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3]
Definition: vc1dsp.h:64
void(* vc1_inv_trans_4x8)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:39
void(* vc1_inv_trans_4x8_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:43
void(* vc1_inv_trans_4x4_dc)(uint8_t *dest, ptrdiff_t stride, int16_t *block)
Definition: vc1dsp.h:44
void ff_vc1_inv_trans_8x4_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
void ff_vc1_inv_trans_8x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y)
void ff_vc1_inv_trans_4x8_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3]
Definition: vc1dsp.h:63
GLint GLenum GLboolean GLsizei stride
Definition: opengl_enc.c:105
void ff_vc1_inv_trans_8x8_dc_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
#define FN_ASSIGN(X, Y)
#define rnd()
Definition: checkasm.h:74
int pixels
Definition: avisynth_c.h:429
av_cold void ff_vc1dsp_init_neon(VC1DSPContext *dsp)
void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y)
void ff_vc1_inv_trans_4x4_neon(uint8_t *dest, ptrdiff_t stride, int16_t *block)
void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y)