FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vc1dsp.h
Go to the documentation of this file.
1 /*
2  * VC-1 and WMV3 decoder - DSP functions
3  * Copyright (c) 2006 Konstantin Shishkov
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * 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  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * 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
18  * License along with FFmpeg; if not, write to the Free Software
19  * 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 "hpeldsp.h"
32 #include "h264chroma.h"
33 
34 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);
35 
36 typedef struct VC1DSPContext {
37  /* vc1 functions */
38  void (*vc1_inv_trans_8x8)(int16_t *b);
39  void (*vc1_inv_trans_8x4)(uint8_t *dest, int line_size, int16_t *block);
40  void (*vc1_inv_trans_4x8)(uint8_t *dest, int line_size, int16_t *block);
41  void (*vc1_inv_trans_4x4)(uint8_t *dest, int line_size, int16_t *block);
42  void (*vc1_inv_trans_8x8_dc)(uint8_t *dest, int line_size, int16_t *block);
43  void (*vc1_inv_trans_8x4_dc)(uint8_t *dest, int line_size, int16_t *block);
44  void (*vc1_inv_trans_4x8_dc)(uint8_t *dest, int line_size, int16_t *block);
45  void (*vc1_inv_trans_4x4_dc)(uint8_t *dest, int line_size, int16_t *block);
48  void (*vc1_v_s_overlap)(int16_t *top, int16_t *bottom);
49  void (*vc1_h_s_overlap)(int16_t *left, int16_t *right);
56 
57  /* put 8x8 block with bicubic interpolation and quarterpel precision
58  * last argument is actually round value instead of height
59  */
62 
63  /* This is really one func used in VC-1 decoding */
66 
67  /* Windows Media Image functions */
68  void (*sprite_h)(uint8_t *dst, const uint8_t *src, int offset, int advance, int count);
69  void (*sprite_v_single)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width);
70  void (*sprite_v_double_noscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width);
71  void (*sprite_v_double_onescale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1,
72  const uint8_t *src2a, int alpha, int width);
73  void (*sprite_v_double_twoscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1,
74  const uint8_t *src2a, const uint8_t *src2b, int offset2,
75  int alpha, int width);
76 
77  /**
78  * Search buf from the start for up to size bytes. Return the index
79  * of a zero byte, or >= size if not found. Ideally, use lookahead
80  * to filter out any zero bytes that are known to not be followed by
81  * one or more further zero bytes and a one byte.
82  */
85 
91 
92 #endif /* AVCODEC_VC1DSP_H */