yading@10
|
1 /*
|
yading@10
|
2 * VC-1 and WMV3 decoder - DSP functions
|
yading@10
|
3 * Copyright (c) 2006 Konstantin Shishkov
|
yading@10
|
4 *
|
yading@10
|
5 * This file is part of FFmpeg.
|
yading@10
|
6 *
|
yading@10
|
7 * FFmpeg is free software; you can redistribute it and/or
|
yading@10
|
8 * modify it under the terms of the GNU Lesser General Public
|
yading@10
|
9 * License as published by the Free Software Foundation; either
|
yading@10
|
10 * version 2.1 of the License, or (at your option) any later version.
|
yading@10
|
11 *
|
yading@10
|
12 * FFmpeg is distributed in the hope that it will be useful,
|
yading@10
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
yading@10
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
yading@10
|
15 * Lesser General Public License for more details.
|
yading@10
|
16 *
|
yading@10
|
17 * You should have received a copy of the GNU Lesser General Public
|
yading@10
|
18 * License along with FFmpeg; if not, write to the Free Software
|
yading@10
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
yading@10
|
20 */
|
yading@10
|
21
|
yading@10
|
22 /**
|
yading@10
|
23 * @file
|
yading@10
|
24 * VC-1 and WMV3 decoder
|
yading@10
|
25 *
|
yading@10
|
26 */
|
yading@10
|
27
|
yading@10
|
28 #ifndef AVCODEC_VC1DSP_H
|
yading@10
|
29 #define AVCODEC_VC1DSP_H
|
yading@10
|
30
|
yading@10
|
31 #include "dsputil.h"
|
yading@10
|
32 #include "hpeldsp.h"
|
yading@10
|
33 #include "h264chroma.h"
|
yading@10
|
34
|
yading@10
|
35 typedef void (*vc1op_pixels_func)(uint8_t *block/*align width (8 or 16)*/, const uint8_t *pixels/*align 1*/, ptrdiff_t line_size, int h);
|
yading@10
|
36
|
yading@10
|
37 typedef struct VC1DSPContext {
|
yading@10
|
38 /* vc1 functions */
|
yading@10
|
39 void (*vc1_inv_trans_8x8)(int16_t *b);
|
yading@10
|
40 void (*vc1_inv_trans_8x4)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
41 void (*vc1_inv_trans_4x8)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
42 void (*vc1_inv_trans_4x4)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
43 void (*vc1_inv_trans_8x8_dc)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
44 void (*vc1_inv_trans_8x4_dc)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
45 void (*vc1_inv_trans_4x8_dc)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
46 void (*vc1_inv_trans_4x4_dc)(uint8_t *dest, int line_size, int16_t *block);
|
yading@10
|
47 void (*vc1_v_overlap)(uint8_t *src, int stride);
|
yading@10
|
48 void (*vc1_h_overlap)(uint8_t *src, int stride);
|
yading@10
|
49 void (*vc1_v_s_overlap)(int16_t *top, int16_t *bottom);
|
yading@10
|
50 void (*vc1_h_s_overlap)(int16_t *left, int16_t *right);
|
yading@10
|
51 void (*vc1_v_loop_filter4)(uint8_t *src, int stride, int pq);
|
yading@10
|
52 void (*vc1_h_loop_filter4)(uint8_t *src, int stride, int pq);
|
yading@10
|
53 void (*vc1_v_loop_filter8)(uint8_t *src, int stride, int pq);
|
yading@10
|
54 void (*vc1_h_loop_filter8)(uint8_t *src, int stride, int pq);
|
yading@10
|
55 void (*vc1_v_loop_filter16)(uint8_t *src, int stride, int pq);
|
yading@10
|
56 void (*vc1_h_loop_filter16)(uint8_t *src, int stride, int pq);
|
yading@10
|
57
|
yading@10
|
58 /* put 8x8 block with bicubic interpolation and quarterpel precision
|
yading@10
|
59 * last argument is actually round value instead of height
|
yading@10
|
60 */
|
yading@10
|
61 vc1op_pixels_func put_vc1_mspel_pixels_tab[16];
|
yading@10
|
62 vc1op_pixels_func avg_vc1_mspel_pixels_tab[16];
|
yading@10
|
63
|
yading@10
|
64 /* This is really one func used in VC-1 decoding */
|
yading@10
|
65 h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3];
|
yading@10
|
66 h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3];
|
yading@10
|
67
|
yading@10
|
68 /* Windows Media Image functions */
|
yading@10
|
69 void (*sprite_h)(uint8_t *dst, const uint8_t *src, int offset, int advance, int count);
|
yading@10
|
70 void (*sprite_v_single)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width);
|
yading@10
|
71 void (*sprite_v_double_noscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width);
|
yading@10
|
72 void (*sprite_v_double_onescale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1,
|
yading@10
|
73 const uint8_t *src2a, int alpha, int width);
|
yading@10
|
74 void (*sprite_v_double_twoscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1,
|
yading@10
|
75 const uint8_t *src2a, const uint8_t *src2b, int offset2,
|
yading@10
|
76 int alpha, int width);
|
yading@10
|
77 } VC1DSPContext;
|
yading@10
|
78
|
yading@10
|
79 void ff_vc1dsp_init(VC1DSPContext* c);
|
yading@10
|
80 void ff_vc1dsp_init_altivec(VC1DSPContext* c);
|
yading@10
|
81 void ff_vc1dsp_init_x86(VC1DSPContext* dsp);
|
yading@10
|
82
|
yading@10
|
83 #endif /* AVCODEC_VC1DSP_H */
|