ae27f7e0824e828e8cfbd21aa6cbb6e3c6c488ca
[platform/upstream/gst-plugins-good.git] / ext / vpx / gstvp9dec.h
1 /* VP9
2  * Copyright (C) 2006 David Schleef <ds@schleef.org>
3  * Copyright (C) 2008,2009,2010 Entropy Wave Inc
4  * Copyright (C) 2010-2013 Sebastian Dröge <slomo@circular-chaos.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22
23 #ifndef __GST_VP9_DEC_H__
24 #define __GST_VP9_DEC_H__
25
26 #include <gst/gst.h>
27 #include <gst/video/gstvideodecoder.h>
28
29 /* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it,
30  * which causes compilation failures */
31 #ifdef HAVE_CONFIG_H
32 #undef HAVE_CONFIG_H
33 #endif
34
35 #include <vpx/vpx_decoder.h>
36 #include <vpx/vp8dx.h>
37
38 G_BEGIN_DECLS
39
40 #define GST_TYPE_VP9_DEC \
41   (gst_vp9_dec_get_type())
42 #define GST_VP9_DEC(obj) \
43   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VP9_DEC,GstVP9Dec))
44 #define GST_VP9_DEC_CLASS(klass) \
45   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VP9_DEC,GstVP9DecClass))
46 #define GST_IS_VP9_DEC(obj) \
47   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VP9_DEC))
48 #define GST_IS_VP9_DEC_CLASS(obj) \
49   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VP9_DEC))
50
51 typedef struct _GstVP9Dec GstVP9Dec;
52 typedef struct _GstVP9DecClass GstVP9DecClass;
53
54 struct _GstVP9Dec
55 {
56   GstVideoDecoder base_video_decoder;
57
58   /* < private > */
59   vpx_codec_ctx_t decoder;
60
61   /* state */
62   gboolean decoder_inited;
63
64   /* properties */
65   gboolean post_processing;
66   enum vp8_postproc_level post_processing_flags;
67   gint deblocking_level;
68   gint noise_level;
69   gint threads;
70
71   GstVideoCodecState *input_state;
72   GstVideoCodecState *output_state;
73 };
74
75 struct _GstVP9DecClass
76 {
77   GstVideoDecoderClass base_video_decoder_class;
78 };
79
80 GType gst_vp9_dec_get_type (void);
81
82 G_END_DECLS
83
84 #endif /* __GST_VP9_DEC_H__ */