1 /*
2 * Copyright (C) 2010 David Conrad
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_DIRACDSP_H
22 #define AVCODEC_DIRACDSP_H
23
24 #include <stdint.h>
25
28
31 /**
32 * dirac_pixels_tab[width][subpel]
33 * width is 2 for 32, 1 for 16, 0 for 8
34 * subpel is 0 for fpel and hpel (only need to copy from the first plane in src)
35 * 1 if an average of the first 2 planes is needed (TODO: worth it?)
36 * 2 for general qpel (avg of 4)
37 * 3 for general epel (biweight of 4 using the weights in src[4])
38 * src[0-3] is each of the hpel planes
39 * src[4] is the 1/8 pel weights if needed
40 */
43
44 void (*put_signed_rect_clamped)(
uint8_t *dst
/*align 16*/,
int dst_stride,
const int16_t *
src /*align 16*/,
int src_stride,
int width,
int height /*mod 2*/);
45 void (*put_rect_clamped)(
uint8_t *dst
/*align 16*/,
int dst_stride,
const int16_t *
src /*align 16*/,
int src_stride,
int width,
int height /*mod 2*/);
46 void (*add_rect_clamped)(
uint8_t *dst
/*align 16*/,
const uint16_t *
src /*align 16*/,
int stride,
const int16_t *idwt
/*align 16*/,
int idwt_stride,
int width,
int height /*mod 2*/);
48
52
53 #define DECL_DIRAC_PIXOP(PFX, EXT) \
54 void ff_ ## PFX ## _dirac_pixels8_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \
55 void ff_ ## PFX ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h); \
56 void ff_ ## PFX ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h)
57
64
66
67 #endif /* AVCODEC_DIRACDSP_H */