annotate vp8dsp.h @ 12488:351a81a23343 libavcodec

Set a constant frame size for encoding G.726 audio.
author jbr
date Sat, 11 Sep 2010 19:52:09 +0000
parents b4c63ffd959b
children
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]);
12342
b4c63ffd959b VP8: much faster DC transform handling
darkshikari
parents: 12241
diff changeset
34 void (*vp8_luma_dc_wht_dc)(DCTELEM block[4][4][16], DCTELEM dc[16]);
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
35 void (*vp8_idct_add)(uint8_t *dst, DCTELEM block[16], int stride);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
36 void (*vp8_idct_dc_add)(uint8_t *dst, DCTELEM block[16], int stride);
12241
c7f6ddcc5c01 VP8: optimize DC-only chroma case in the same way as luma.
darkshikari
parents: 12238
diff changeset
37 void (*vp8_idct_dc_add4y)(uint8_t *dst, DCTELEM block[4][16], int stride);
c7f6ddcc5c01 VP8: optimize DC-only chroma case in the same way as luma.
darkshikari
parents: 12238
diff changeset
38 void (*vp8_idct_dc_add4uv)(uint8_t *dst, DCTELEM block[4][16], int stride);
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
39
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
40 // loop filter applied to edges between macroblocks
12194
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
41 void (*vp8_v_loop_filter16y)(uint8_t *dst, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
42 int flim_E, int flim_I, int hev_thresh);
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
43 void (*vp8_h_loop_filter16y)(uint8_t *dst, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
44 int flim_E, int flim_I, int hev_thresh);
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
45 void (*vp8_v_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
46 int flim_E, int flim_I, int hev_thresh);
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
47 void (*vp8_h_loop_filter8uv)(uint8_t *dstU, uint8_t *dstV, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
48 int flim_E, int flim_I, int hev_thresh);
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
49
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
50 // loop filter applied to inner macroblock edges
12194
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
51 void (*vp8_v_loop_filter16y_inner)(uint8_t *dst, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
52 int flim_E, int flim_I, int hev_thresh);
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
53 void (*vp8_h_loop_filter16y_inner)(uint8_t *dst, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
54 int flim_E, int flim_I, int hev_thresh);
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
55 void (*vp8_v_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
56 int flim_E, int flim_I, int hev_thresh);
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
57 void (*vp8_h_loop_filter8uv_inner)(uint8_t *dstU, uint8_t *dstV, int stride,
80b142c2e9f7 Change function prototypes for width=8 inner and mbedge loopfilter functions
rbultje
parents: 12011
diff changeset
58 int flim_E, int flim_I, int hev_thresh);
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
59
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
60 void (*vp8_v_loop_filter_simple)(uint8_t *dst, int stride, int flim);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
61 void (*vp8_h_loop_filter_simple)(uint8_t *dst, int stride, int flim);
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
62
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
63 /**
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
64 * first dimension: width>>3, height is assumed equal to width
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
65 * second dimension: 0 if no vertical interpolation is needed;
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
66 * 1 4-tap vertical interpolation filter (my & 1)
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
67 * 2 6-tap vertical interpolation filter (!(my & 1))
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
68 * third dimension: same as second dimention, for horizontal interpolation
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
69 * 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
70 */
11950
56aba5a9761c Make VP8 DSP functions take two strides
darkshikari
parents: 11921
diff changeset
71 vp8_mc_func put_vp8_epel_pixels_tab[3][3][3];
11974
356b20a6566d VP8 bilinear filter
conrad
parents: 11950
diff changeset
72 vp8_mc_func put_vp8_bilinear_pixels_tab[3][3][3];
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
73 } VP8DSPContext;
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
74
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
75 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
76 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
77 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
78
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
79 void ff_vp8dsp_init(VP8DSPContext *c);
11975
c3afb5be0d9b First shot at VP8 optimizations:
rbultje
parents: 11974
diff changeset
80 void ff_vp8dsp_init_x86(VP8DSPContext *c);
12011
f96187e79438 Altivec VP8 MC functions
conrad
parents: 11975
diff changeset
81 void ff_vp8dsp_init_altivec(VP8DSPContext *c);
11921
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
82
f2007d7c3f1d Native VP8 decoder.
rbultje
parents:
diff changeset
83 #endif /* AVCODEC_VP8DSP_H */