1 /*
2 * Copyright (c) 2014 Michael Niedermayer <michaelni@gmx.at>
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
26
27 #define OFFSET(x) offsetof(AVDCT,x)
28 #define DEFAULT 0 //should be NAN but it does not work as it is not a constant in glibc as required by ANSI/ISO C
29 //these names are too long to be readable
30 #define V AV_OPT_FLAG_VIDEO_PARAM
31 #define A AV_OPT_FLAG_AUDIO_PARAM
32 #define E AV_OPT_FLAG_ENCODING_PARAM
33 #define D AV_OPT_FLAG_DECODING_PARAM
34
42 {
"faan",
"floating point AAN DCT (experimental / for debugging)", 0,
AV_OPT_TYPE_CONST, {.i64 =
FF_DCT_FAAN }, INT_MIN, INT_MAX,
V|
E, .unit =
"dct"},
43
59
62 };
63
68 };
69
71 {
73 }
74
76 {
78
79 if (!dsp)
81
84
85 return dsp;
86 }
87
89 {
91
92 if (!avctx)
94
98
99 #define COPY(src, name) memcpy(&dsp->name, &src.name, sizeof(dsp->name))
100
101 #if CONFIG_IDCTDSP
102 {
106 COPY(idsp, idct_permutation);
107 }
108 #endif
109
110 #if CONFIG_FDCTDSP
111 {
115 }
116 #endif
117
118 #if CONFIG_PIXBLOCKDSP
119 {
122 COPY(pdsp, get_pixels);
123 COPY(pdsp, get_pixels_unaligned);
124 }
125 #endif
126
128
129 return 0;
130 }