1
/*
2
 * Copyright (C) 2010 Nokia Corporation
3
 *
4
 * Authors:
5
 * Elamparithi Shanmugam <parithi@ti.com>
6
 * Felipe Contreras <felipe.contreras@nokia.com>
7
 *
8
 * This file may be used under the terms of the GNU Lesser General Public
9
 * License version 2.1, a copy of which is found in LICENSE included in the
10
 * packaging of this file.
11
 */
12
13
#ifndef GST_DSP_IPP_H
14
#define GST_DSP_IPP_H
15
16
#include "gstdspbase.h"
17
#include "sem.h"
18
19
G_BEGIN_DECLS
20
21
#define GST_DSP_IPP(obj) (GstDspIpp *)(obj)
22
#define GST_DSP_IPP_TYPE (gst_dsp_ipp_get_type())
23
#define GST_DSP_IPP_CLASS(obj) (GstDspIppClass *)(obj)
24
25
#define IPP_MAX_NUM_OF_ALGOS 5
26
27
typedef struct _GstDspIpp GstDspIpp;
28
typedef struct _GstDspIppClass GstDspIppClass;
29
30
struct ipp_algo {
31
	dmm_buffer_t *create_params;
32
	const char *fxn;
33
	const char *dma_fxn;
34
	dmm_buffer_t *in;
35
	dmm_buffer_t *out;
36
37
	/* TODO no need to keep these around */
38
	dmm_buffer_t *b_algo_fxn;
39
	dmm_buffer_t *b_dma_fxn;
40
};
41
42
struct ipp_eenf_params {
43
	uint32_t size;
44
	int16_t in_place;
45
	int16_t edge_enhancement_strength;
46
	int16_t weak_edge_threshold;
47
	int16_t strong_edge_threshold;
48
	int16_t low_freq_luma_noise_filter_strength;
49
	int16_t mid_freq_luma_noise_filter_strength;
50
	int16_t high_freq_luma_noise_filter_strength;
51
	int16_t low_freq_cb_noise_filter_strength;
52
	int16_t mid_freq_cb_noise_filter_strength;
53
	int16_t high_freq_cb_noise_filter_strength;
54
	int16_t low_freq_cr_noise_filter_strength;
55
	int16_t mid_freq_cr_noise_filter_strength;
56
	int16_t high_freq_cr_noise_filter_strength;
57
	int16_t shading_vert_param_1;
58
	int16_t shading_vert_param_2;
59
	int16_t shading_horz_param_1;
60
	int16_t shading_horz_param_2;
61
	int16_t shading_gain_scale;
62
	int16_t shading_gain_offset;
63
	int16_t shading_gain_max_value;
64
	int16_t ratio_downsample_cb_cr;
65
};
66
67
struct _GstDspIpp {
68
	GstDspBase element;
69
	int width, height;
70
	int in_pix_fmt;
71
	struct ipp_algo *algos[IPP_MAX_NUM_OF_ALGOS];
72
	unsigned nr_algos;
73
	GSem *msg_sem;
74
	struct ipp_eenf_params eenf_params;
75
	int eenf_strength;
76
77
	dmm_buffer_t *msg_ptr[3];
78
	dmm_buffer_t *flt_graph;
79
	struct td_buffer *in_buf_ptr;
80
	struct td_buffer *out_buf_ptr;
81
	dmm_buffer_t *intermediate_buf;
82
	dmm_buffer_t *dyn_params;
83
	dmm_buffer_t *status_params;
84
};
85
86
struct _GstDspIppClass {
87
	GstDspBaseClass parent_class;
88
};
89
90
GType gst_dsp_ipp_get_type(void);
91
92
G_END_DECLS
93
94
#endif /* GST_DSP_IPP_H */