blob: 677bc37bbe9e7dae6265ffefac9286491143a8d3 [file] [log] [blame]
Ronald S. Bultje12802ec2011-02-17 19:45:031/*
2 * VC-1 and WMV3 decoder - DSP functions
3 * Copyright (c) 2006 Konstantin Shishkov
4 *
Mans Rullgard2912e872011-03-18 17:35:105 * This file is part of Libav.
Ronald S. Bultje12802ec2011-02-17 19:45:036 *
Mans Rullgard2912e872011-03-18 17:35:107 * Libav is free software; you can redistribute it and/or
Ronald S. Bultje12802ec2011-02-17 19:45:038 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
Mans Rullgard2912e872011-03-18 17:35:1012 * Libav is distributed in the hope that it will be useful,
Ronald S. Bultje12802ec2011-02-17 19:45:0313 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
Mans Rullgard2912e872011-03-18 17:35:1018 * License along with Libav; if not, write to the Free Software
Ronald S. Bultje12802ec2011-02-17 19:45:0319 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22/**
23 * @file
24 * VC-1 and WMV3 decoder
25 *
26 */
27
28#ifndef AVCODEC_VC1DSP_H
29#define AVCODEC_VC1DSP_H
30
31#include "dsputil.h"
Ronald S. Bultje54cd5e42013-03-10 21:23:4632#include "hpeldsp.h"
Diego Biurrun79dad2a2013-01-19 02:34:4733#include "h264chroma.h"
Ronald S. Bultje12802ec2011-02-17 19:45:0334
35typedef struct VC1DSPContext {
36 /* vc1 functions */
Diego Biurrun88bd7fd2013-01-20 00:02:2937 void (*vc1_inv_trans_8x8)(int16_t *b);
38 void (*vc1_inv_trans_8x4)(uint8_t *dest, int line_size, int16_t *block);
39 void (*vc1_inv_trans_4x8)(uint8_t *dest, int line_size, int16_t *block);
40 void (*vc1_inv_trans_4x4)(uint8_t *dest, int line_size, int16_t *block);
41 void (*vc1_inv_trans_8x8_dc)(uint8_t *dest, int line_size, int16_t *block);
42 void (*vc1_inv_trans_8x4_dc)(uint8_t *dest, int line_size, int16_t *block);
43 void (*vc1_inv_trans_4x8_dc)(uint8_t *dest, int line_size, int16_t *block);
44 void (*vc1_inv_trans_4x4_dc)(uint8_t *dest, int line_size, int16_t *block);
Ronald S. Bultje7d2e03a2011-05-04 11:40:5345 void (*vc1_v_overlap)(uint8_t *src, int stride);
46 void (*vc1_h_overlap)(uint8_t *src, int stride);
Diego Biurrun88bd7fd2013-01-20 00:02:2947 void (*vc1_v_s_overlap)(int16_t *top, int16_t *bottom);
48 void (*vc1_h_s_overlap)(int16_t *left, int16_t *right);
Ronald S. Bultje12802ec2011-02-17 19:45:0349 void (*vc1_v_loop_filter4)(uint8_t *src, int stride, int pq);
50 void (*vc1_h_loop_filter4)(uint8_t *src, int stride, int pq);
51 void (*vc1_v_loop_filter8)(uint8_t *src, int stride, int pq);
52 void (*vc1_h_loop_filter8)(uint8_t *src, int stride, int pq);
53 void (*vc1_v_loop_filter16)(uint8_t *src, int stride, int pq);
54 void (*vc1_h_loop_filter16)(uint8_t *src, int stride, int pq);
55
56 /* put 8x8 block with bicubic interpolation and quarterpel precision
57 * last argument is actually round value instead of height
58 */
59 op_pixels_func put_vc1_mspel_pixels_tab[16];
60 op_pixels_func avg_vc1_mspel_pixels_tab[16];
61
62 /* This is really one func used in VC-1 decoding */
63 h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3];
64 h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3];
Alberto Delmás45ecda82011-08-17 12:24:4265
66 /* Windows Media Image functions */
67 void (*sprite_h)(uint8_t *dst, const uint8_t *src, int offset, int advance, int count);
68 void (*sprite_v_single)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width);
69 void (*sprite_v_double_noscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width);
70 void (*sprite_v_double_onescale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1,
71 const uint8_t *src2a, int alpha, int width);
72 void (*sprite_v_double_twoscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1,
73 const uint8_t *src2a, const uint8_t *src2b, int offset2,
74 int alpha, int width);
Ronald S. Bultje12802ec2011-02-17 19:45:0375} VC1DSPContext;
76
77void ff_vc1dsp_init(VC1DSPContext* c);
78void ff_vc1dsp_init_altivec(VC1DSPContext* c);
Janne Grunau7e522852012-10-07 15:41:1079void ff_vc1dsp_init_x86(VC1DSPContext* dsp);
Ronald S. Bultje12802ec2011-02-17 19:45:0380
81#endif /* AVCODEC_VC1DSP_H */