annotate vp8dsp.h @ 12011:f96187e79438 libavcodec

Altivec VP8 MC functions
author conrad
date Tue, 29 Jun 2010 06:42:17 +0000
parents c3afb5be0d9b
children 80b142c2e9f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
1 /**
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
2 * VP8 compatible video decoder
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
3 *
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
4 * Copyright (C) 2010 David Conrad
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
5 * Copyright (C) 2010 Ronald S. Bultje
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
6 *
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
7 * This file is part of FFmpeg.
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
8 *
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
13 *
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
17 * Lesser General Public License for more details.
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
18 *
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
22 */
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
23
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
24
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
25 #ifndef AVCODEC_VP8DSP_H
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
26 #define AVCODEC_VP8DSP_H
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
27
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
28 #include "dsputil.h"
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
29
11950
56aba5a9761c Make VP8 DSP functions take two strides
darkshikari
parents: 11921
diff changeset
30 typedef void (*vp8_mc_func)(uint8_t *dst/*align 8*/, int dstStride, uint8_t *src/*align 1*/, int srcStride, int h, int x, int y);
56aba5a9761c Make VP8 DSP functions take two strides
darkshikari
parents: 11921
diff changeset
31
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
32 typedef struct VP8DSPContext {
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
33 void (*vp8_luma_dc_wht)(DCTELEM block[4][4][16], DCTELEM dc[16]);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
34 void (*vp8_idct_add)(uint8_t *dst, DCTELEM block[16], int stride);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
35 void (*vp8_idct_dc_add)(uint8_t *dst, DCTELEM block[16], int stride);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
36
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
37 // loop filter applied to edges between macroblocks
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
38 void (*vp8_v_loop_filter16)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
39 void (*vp8_h_loop_filter16)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
40 void (*vp8_v_loop_filter8)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
41 void (*vp8_h_loop_filter8)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
42
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
43 // loop filter applied to inner macroblock edges
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
44 void (*vp8_v_loop_filter16_inner)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
45 void (*vp8_h_loop_filter16_inner)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
46 void (*vp8_v_loop_filter8_inner)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
47 void (*vp8_h_loop_filter8_inner)(uint8_t *dst, int stride, int flim_E, int flim_I, int hev_thresh);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
48
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
49 void (*vp8_v_loop_filter_simple)(uint8_t *dst, int stride, int flim);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
50 void (*vp8_h_loop_filter_simple)(uint8_t *dst, int stride, int flim);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
51
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
52 /**
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
53 * first dimension: width>>3, height is assumed equal to width
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
54 * second dimension: 0 if no vertical interpolation is needed;
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
55 * 1 4-tap vertical interpolation filter (my & 1)
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
56 * 2 6-tap vertical interpolation filter (!(my & 1))
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
57 * third dimension: same as second dimention, for horizontal interpolation
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
58 * so something like put_vp8_epel_pixels_tab[width>>3][2*!!my-(my&1)][2*!!mx-(mx&1)](..., mx, my)
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
59 */
11950
56aba5a9761c Make VP8 DSP functions take two strides
darkshikari
parents: 11921
diff changeset
60 vp8_mc_func put_vp8_epel_pixels_tab[3][3][3];
11974
356b20a6566d VP8 bilinear filter
conrad
parents: 11950
diff changeset
61 vp8_mc_func put_vp8_bilinear_pixels_tab[3][3][3];
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
62 } VP8DSPContext;
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
63
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
64 void ff_put_vp8_pixels16_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
65 void ff_put_vp8_pixels8_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
66 void ff_put_vp8_pixels4_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
67
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
68 void ff_vp8dsp_init(VP8DSPContext *c);
11975
c3afb5be0d9b First shot at VP8 optimizations:
rbultje
parents: 11974
diff changeset
69 void ff_vp8dsp_init_x86(VP8DSPContext *c);
12011
f96187e79438 Altivec VP8 MC functions
conrad
parents: 11975
diff changeset
70 void ff_vp8dsp_init_altivec(VP8DSPContext *c);
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
71
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
72 #endif /* AVCODEC_VP8DSP_H */