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 moduleffmpeg.libavutil.pixelutils;
20 21 extern (C):
22 importffmpeg; @nogcnothrow:
23 24 /**
25 * Sum of abs(src1[x] - src2[x])
26 */27 aliasav_pixelutils_sad_fn = intfunction (
28 const(ubyte)* src1,
29 ptrdiff_tstride1,
30 const(ubyte)* src2,
31 ptrdiff_tstride2);
32 33 /**
34 * Get a potentially optimized pointer to a Sum-of-absolute-differences
35 * function (see the av_pixelutils_sad_fn prototype).
36 *
37 * @param w_bits 1<<w_bits is the requested width of the block size
38 * @param h_bits 1<<h_bits is the requested height of the block size
39 * @param aligned If set to 2, the returned sad function will assume src1 and
40 * src2 addresses are aligned on the block size.
41 * If set to 1, the returned sad function will assume src1 is
42 * aligned on the block size.
43 * If set to 0, the returned sad function assume no particular
44 * alignment.
45 * @param log_ctx context used for logging, can be NULL
46 *
47 * @return a pointer to the SAD function or NULL in case of error (because of
48 * invalid parameters)
49 */50 av_pixelutils_sad_fnav_pixelutils_get_sad_fn (
51 intw_bits,
52 inth_bits,
53 intaligned,
54 void* log_ctx);
55 56 /* AVUTIL_PIXELUTILS_H */