LiVES  3.2.0
weed-effects-utils.h
Go to the documentation of this file.
1 // weed-effects-utils.c
2 // - will probaly become libweed-effects-utils or something
3 // LiVES
4 // (c) G. Finch 2003 - 2019 <salsaman+lives@gmail.com>
5 // released under the GNU GPL 3 or later
6 // see file ../COPYING for licensing details
7 
8 // weed filter utility functions designed for Weed Filter hosts
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif /* __cplusplus */
14 
15 #ifndef _WEED_FILTER_UTILS_H_
16 #define _WEEED_FILTER_UTILS_H_
17 
18 #ifndef __WEED_HOST__
19 #error This header is designed for Weed hosts. Plugins have their own utilities in weed-plugin-utils.h
20 #endif
21 
22 #ifdef __GNUC__
23 # define WARN_UNUSED __attribute__((warn_unused_result))
24 #else
25 # define WARN_UNUSED
26 #endif
27 
28 /* general Weed functions and definitions */
29 int32_t weed_plant_get_type(weed_plant_t *);
30 
31 #define WEED_PLANT_IS_PLUGIN_INFO(plant) (weed_plant_get_type(plant) == WEED_PLANT_PLUGIN_INFO ? WEED_TRUE : \
32  WEED_FALSE)
33 
34 #define WEED_PLANT_IS_HOST_INFO(plant) (weed_plant_get_type(plant) == WEED_PLANT_HOST_INFO ? WEED_TRUE : WEED_FALSE)
35 
36 #define WEED_PLANT_IS_FILTER_CLASS(plant) (weed_plant_get_type(plant) == WEED_PLANT_FILTER_CLASS ? WEED_TRUE : \
37  WEED_FALSE)
38 #define WEED_PLANT_IS_FILTER_INSTANCE(plant) (weed_plant_get_type(plant) == WEED_PLANT_FILTER_INSTANCE ? WEED_TRUE : \
39  WEED_FALSE)
40 
41 #define WEED_PLANT_IS_CHANNEL(plant) (weed_plant_get_type(plant) == WEED_PLANT_CHANNEL ? WEED_TRUE : WEED_FALSE)
42 
43 #define WEED_PLANT_IS_CHANNEL_TEMPLATE(plant) (weed_plant_get_type(plant) == WEED_PLANT_CHANNEL_TEMPLATE ? \
44  WEED_TRUE : WEED_FALSE)
45 
46 #define WEED_PLANT_IS_PARAMETER(plant) (weed_plant_get_type(plant) == WEED_PLANT_PARAMETER ? WEED_TRUE : WEED_FALSE)
47 
48 #define WEED_PLANT_IS_PARAMETER_TEMPLATE(plant) (weed_plant_get_type(plant) == WEED_PLANT_PARAMETER_TEMPLATE ? \
49  WEED_TRUE : WEED_FALSE)
50 
51 #define WEED_PLANT_IS_GUI(plant) (weed_plant_get_type(plant) == WEED_PLANT_GUI ? WEED_TRUE : WEED_FALSE)
52 
53 // set flags for each leaf in a plant. If ign_prefix is not NULL, ignore leaves with keys that begin with ign_prefix
54 // this enables a host to do: weed_add_plant_flags(plant, WEED_FLAG_IMMUTABLE | WEED_FLAG_UNDELETABLE, "plugin_")
55 void weed_add_plant_flags(weed_plant_t *, uint32_t flags, const char *ign_prefix);
56 void weed_clear_plant_flags(weed_plant_t *t, uint32_t flags, const char *ign_prefix);
57 
58 // add / clear bits for leaf flags, returns value of flags before alteration
59 uint32_t weed_leaf_set_flagbits(weed_plant_t *, const char *leaf, uint32_t flagbits);
60 uint32_t weed_leaf_clear_flagbits(weed_plant_t *, const char *leaf, uint32_t flagbits);
61 
62 /* HOST_INFO functions */
63 int weed_host_info_get_flags(weed_plant_t *host_info);
64 void weed_host_info_set_flags(weed_plant_t *host_info, int flags);
65 void weed_host_set_supports_linear_gamma(weed_plant_t *host_info);
66 void weed_host_set_supports_premult_alpha(weed_plant_t *host_info);
67 void weed_host_set_verbosity(weed_plant_t *host_info, int verbosityy);
68 
69 /* PLUGIN_INFO functions */
70 char *weed_plugin_info_get_package_name(weed_plant_t *pinfo);
71 
72 
73 /* FILTER functions */
74 int weed_filter_get_flags(weed_plant_t *filter);
75 int weed_filter_is_resizer(weed_plant_t *filter);
76 char *weed_filter_get_name(weed_plant_t *filter);
77 weed_plant_t **weed_filter_get_in_chantmpls(weed_plant_t *filter, int *ntmpls);
78 weed_plant_t **weed_filter_get_out_chantmpls(weed_plant_t *filter, int *ntmpls);
79 weed_plant_t **weed_filter_get_in_paramtmpls(weed_plant_t *filter, int *ntmpls);
80 weed_plant_t **weed_filter_get_out_paramtmpls(weed_plant_t *filter, int *ntmpls);
81 weed_plant_t *weed_filter_get_gui(weed_plant_t *filter, int create_if_not_exists);
82 weed_plant_t *weed_filter_get_plugin_info(weed_plant_t *filter);
83 char *weed_filter_get_package_name(weed_plant_t *filter);
84 int weed_filter_hints_unstable(weed_plant_t *filter);
85 int weed_filter_hints_hidden(weed_plant_t *filter);
86 int weed_filter_hints_stateless(weed_plant_t *filter);
87 int weed_filter_is_converter(weed_plant_t *filter);
88 int weed_filter_is_process_last(weed_plant_t *filter);
89 int weed_filter_prefers_linear_gamma(weed_plant_t *filter);
90 int weed_filter_prefers_premult_alpha(weed_plant_t *filter);
91 int weed_filter_non_realtime(weed_plant_t *filter);
92 int weed_filter_may_thread(weed_plant_t *filter);
93 int weed_filter_channel_sizes_vary(weed_plant_t *filter);
94 int weed_filter_palettes_vary(weed_plant_t *filter);
95 
96 
97 /* FILTER_INSTANCE functions */
98 weed_plant_t **weed_instance_get_out_channels(weed_plant_t *instance, int *nchans);
99 weed_plant_t **weed_instance_get_in_channels(weed_plant_t *instance, int *nchans);
100 weed_plant_t **weed_instance_get_in_params(weed_plant_t *instance, int *nparams);
101 weed_plant_t **weed_instance_get_out_params(weed_plant_t *instance, int *nparams);
102 weed_plant_t *weed_instance_get_gui(weed_plant_t *inst, int create_if_not_exists);
103 int weed_instance_get_flags(weed_plant_t *instance);
104 void weed_instance_set_flags(weed_plant_t *instance, int flags);
105 
106 /* CHANNEL_TEMPLATE functions */
107 char *weed_chantmpl_get_name(weed_plant_t *chantmpl);
108 int weed_chantmpl_get_flags(weed_plant_t *chantmpl);
109 int weed_chantmpl_is_optional(weed_plant_t *chantmpl);
110 int weed_chantmpl_is_audio(weed_plant_t *chantmpl);
111 int *weed_chantmpl_get_palette_list(weed_plant_t *filter, weed_plant_t *chantmpl, int *nvals);
112 
113 // audio
114 int weed_chantmpl_get_max_audio_length(weed_plant_t *chantmpl);
115 
116 /* a return value of zero means unlimited repeats */
117 int weed_chantmpl_get_max_repeats(weed_plant_t *chantmpl);
118 
119 /* CHANNEL functions */
120 void *weed_channel_get_pixel_data(weed_plant_t *channel);
121 void **weed_channel_get_pixel_data_planar(weed_plant_t *channel, int *nplanes);
122 
124 int weed_channel_get_width(weed_plant_t *channel);
125 int weed_channel_get_height(weed_plant_t *channel);
126 int weed_channel_get_palette(weed_plant_t *channel);
127 int weed_channel_get_gamma_type(weed_plant_t *channel);
128 int weed_channel_get_palette_yuv(weed_plant_t *channel, int *clamping, int *sampling, int *subspace);
129 int weed_channel_get_rowstride(weed_plant_t *channel);
130 int *weed_channel_get_rowstrides(weed_plant_t *channel, int *nplanes);
131 int weed_channel_is_disabled(weed_plant_t *channel);
132 weed_plant_t *weed_channel_get_template(weed_plant_t *channel);
133 
135 void weed_channel_set_width(weed_plant_t *channel, int width);
136 void weed_channel_set_height(weed_plant_t *channel, int height);
137 void weed_channel_set_size(weed_plant_t *channel, int width, int height);
138 void weed_channel_set_palette(weed_plant_t *channel, int palette);
139 
141 weed_plant_t *weed_channel_set_gamma_type(weed_plant_t *channel, int gamma_type);
142 
144 int weed_channel_get_width_pixels(weed_plant_t *channel);
145 
146 // audio channels
147 int weed_channel_get_audio_rate(weed_plant_t *channel);
148 int weed_channel_get_naudchans(weed_plant_t *channel);
149 int weed_channel_get_audio_length(weed_plant_t *channel);
150 float **weed_channel_get_audio_data(weed_plant_t *channel, int *naudchans);
151 
152 weed_plant_t *weed_channel_set_audio_data(weed_plant_t *channel, float **data, int arate, int naudchans, int nsamps);
153 
154 // paramtmpls
155 weed_plant_t *weed_paramtmpl_get_gui(weed_plant_t *paramtmpl, int create_if_not_exists);
156 int weed_paramtmpl_get_flags(weed_plant_t *paramtmpl);
157 char *weed_paramtmpl_get_name(weed_plant_t *paramtmpl);
158 int weed_paramtmpl_get_type(weed_plant_t *paramtmpl);
159 int weed_paramtmpl_has_variable_size(weed_plant_t *paramtmpl);
160 int weed_paramtmpl_has_value_perchannel(weed_plant_t *paramtmpl);
161 uint32_t weed_paramtmpl_value_type(weed_plant_t *paramtmpl);
162 int weed_paramtmpl_does_wrap(weed_plant_t *paramtmpl);
163 int weed_paramtmpl_hints_string_choice(weed_plant_t *paramtmpl);
164 int weed_paramtmpl_hints_hidden(weed_plant_t *paramtmpl);
165 int weed_paramtmpl_value_irrelevant(weed_plant_t *paramtmpl);
166 
167 // params
168 
169 // if temporary is WEED_TRUE, then we return the current state,
170 // otherwise we return the permanent (structural) state
171 int weed_param_is_hidden(weed_plant_t *param, int temporary);
172 weed_plant_t *weed_param_get_gui(weed_plant_t *param, int create_if_not_exists);
173 weed_plant_t *weed_param_get_template(weed_plant_t *param);
174 int weed_param_get_type(weed_plant_t *param);
175 int weed_param_has_variable_size(weed_plant_t *param);
176 int weed_param_has_value_perchannel(weed_plant_t *param);
177 int weed_param_does_wrap(weed_plant_t *param);
178 int weed_param_get_value_type(weed_plant_t *param);
179 int weed_param_value_irrelevant(weed_plant_t *param);
180 
181 int weed_param_get_value_int(weed_plant_t *param);
182 int weed_param_get_value_boolean(weed_plant_t *param);
183 double weed_param_get_value_double(weed_plant_t *param);
184 int64_t weed_param_get_value_int64(weed_plant_t *param);
185 char *weed_param_get_value_string(weed_plant_t *param);
186 
187 /* if param is WEED_SEED_STRING and WEED_LEAF_CHOICES is set in param or template, returns the length, else returns 0 */
188 int weed_param_get_nchoices(weed_plant_t *param);
189 
191 int weed_gui_get_flags(weed_plant_t *gui);
192 
193 // utils
194 char *weed_seed_type_to_text(uint32_t seed_type) WARN_UNUSED;
195 char *weed_error_to_text(weed_error_t error) WARN_UNUSED;
196 char *weed_palette_get_name_full(int pal, int clamping, int subspace) WARN_UNUSED;
197 
198 const char *weed_palette_get_name(int pal);
199 const char *weed_yuv_clamping_get_name(int clamping);
200 const char *weed_yuv_subspace_get_name(int subspace);
201 const char *weed_gamma_get_name(int gamma);
202 
203 double weed_palette_get_compression_ratio(int pal);
204 
205 #ifndef WEED_ADVANCED_PALETTES
206 
208 
209 #define weed_palette_is_alpha(pal) ((((pal >= 1024) && (pal < 2048))) ? WEED_TRUE : WEED_FALSE)
210 #define weed_palette_is_rgb(pal) (pal >0 && pal < 512 ? WEED_TRUE : WEED_FALSE)
211 #define weed_palette_is_yuv(pal) (pal >= 512 && pal < 1024 ? WEED_TRUE : WEED_FALSE)
212 
213 #define weed_palette_is_float(pal) ((pal == WEED_PALETTE_RGBAFLOAT || pal == WEED_PALETTE_AFLOAT || \
214  pal == WEED_PALETTE_RGBFLOAT) ? WEED_TRUE : WEED_FALSE)
215 
217 #define pixel_size(pal) ((pal == WEED_PALETTE_RGB24 || pal == WEED_PALETTE_BGR24 || pal == WEED_PALETTE_YUV888) ? 3 : \
218  (pal == WEED_PALETTE_RGBA32 || pal == WEED_PALETTE_BGRA32 || pal == WEED_PALETTE_ARGB32 || \
219  pal == WEED_PALETTE_YUVA8888 || pal == WEED_PALETTE_UYVY || pal == WEED_PALETTE_YUYV) ? 4 : 1)
220 
221 #define weed_palette_has_alpha(pal) ((pal == WEED_PALETTE_RGBA32 || pal == WEED_PALETTE_BGRA32 || \
222  pal == WEED_PALETTE_ARGB32 || pal == WEED_PALETTE_YUVA4444P || pal == WEED_PALETTE_YUVA8888 || \
223  pal == WEED_PALETTE_RGBAFLOAT || weed_palette_is_alpha(pal)) ? WEED_TRUE : WEED_FALSE)
224 
225 // return ratio of plane[n] width/plane[0] width
226 #define weed_palette_get_plane_ratio_horizontal(pal, plane) ((double)(plane == 0 ? 1.0 : (plane == 1 || plane == 2) ? \
227  (pal == WEED_PALETTE_YUV444P || pal == WEED_PALETTE_YUVA4444P) ? 1.0 : \
228  (pal == WEED_PALETTE_YUV422P || pal == WEED_PALETTE_YUV420P || \
229  pal == WEED_PALETTE_YVU420P) ? 0.5 : plane == 3 ? \
230  pal == WEED_PALETTE_YUVA4444P ? 1.0 : 0.0 : 0.0 : 0.0))
231 
232 // return ratio of plane[n] height/plane[n] height
233 #define weed_palette_get_plane_ratio_vertical(pal, plane) ((double)(plane == 0 ? 1.0 : (plane == 1 || plane == 2) ? \
234  (pal == WEED_PALETTE_YUV444P || pal == WEED_PALETTE_YUVA4444P || \
235  pal == WEED_PALETTE_YUV422P) ? 1.0 : (pal == WEED_PALETTE_YUV420P || \
236  pal == WEED_PALETTE_YVU420P) ? 0.5 : plane == 3 ? \
237  pal == WEED_PALETTE_YUVA4444P ? 1.0 : 0.0 : 0.0 : 0.0))
238 
239 #define weed_palette_get_nplanes(pal) ((pal == WEED_PALETTE_RGB24 || pal == WEED_PALETTE_BGR24 || \
240  pal == WEED_PALETTE_RGBA32 || pal == WEED_PALETTE_BGRA32 || pal == WEED_PALETTE_ARGB32 || \
241  pal == WEED_PALETTE_UYVY || pal == WEED_PALETTE_YUYV || pal == WEED_PALETTE_YUV411 || \
242  pal == WEED_PALETTE_YUV888 || pal == WEED_PALETTE_YUVA8888 || pal == WEED_PALETTE_AFLOAT || \
243  pal == WEED_PALETTE_A8 || pal == WEED_PALETTE_A1 || pal == WEED_PALETTE_RGBFLOAT || \
244  pal == WEED_PALETTE_RGBAFLOAT) ? 1 : (pal == WEED_PALETTE_YUV420P || \
245  pal == WEED_PALETTE_YVU420P || pal == WEED_PALETTE_YUV422P || \
246  pal == WEED_PALETTE_YUV444P) ? 3 : pal == WEED_PALETTE_YUVA4444P ? 4 : 0)
247 
248 #define weed_palette_get_pixels_per_macropixel(pal) ((pal == WEED_PALETTE_UYVY || pal == WEED_PALETTE_YUYV) ? 2 : \
249  (pal == WEED_PALETTE_YUV411) ? 4 : (weed_palette_is_valid(pal) ? 1 : 0))
250 
251 #define weed_palette_is_valid(pal) (weed_palette_get_nplanes(pal) == 0 ? WEED_FALSE : WEED_TRUE)
252 
253 #endif
254 
255 #define weed_palette_is_planar(pal) (weed_palette_get_nplanes(pal) > 1)
256 
257 #ifdef __cplusplus
258 }
259 #endif /* __cplusplus */
260 
261 #endif
weed_channel_get_rowstrides
int * weed_channel_get_rowstrides(weed_plant_t *channel, int *nplanes)
Definition: weed-effects-utils.c:487
weed_chantmpl_get_palette_list
int * weed_chantmpl_get_palette_list(weed_plant_t *filter, weed_plant_t *chantmpl, int *nvals)
Definition: weed-effects-utils.c:386
weed_filter_hints_stateless
int weed_filter_hints_stateless(weed_plant_t *filter)
Definition: weed-effects-utils.c:186
weed_instance_get_in_channels
weed_plant_t ** weed_instance_get_in_channels(weed_plant_t *instance, int *nchans)
Definition: weed-effects-utils.c:590
weed_chantmpl_is_optional
int weed_chantmpl_is_optional(weed_plant_t *chantmpl)
Definition: weed-effects-utils.c:367
weed_paramtmpl_get_type
int weed_paramtmpl_get_type(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:312
weed_instance_get_out_channels
weed_plant_t ** weed_instance_get_out_channels(weed_plant_t *instance, int *nchans)
Definition: weed-effects-utils.c:596
weed_yuv_clamping_get_name
const char * weed_yuv_clamping_get_name(int clamping)
Definition: weed-effects-utils.c:751
weed_param_does_wrap
int weed_param_does_wrap(weed_plant_t *param)
Definition: weed-effects-utils.c:548
weed_palette_get_compression_ratio
double weed_palette_get_compression_ratio(int pal)
Definition: weed-effects-utils.c:803
weed_paramtmpl_does_wrap
int weed_paramtmpl_does_wrap(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:334
weed_channel_get_width
int weed_channel_get_width(weed_plant_t *channel)
width in macropixels
Definition: weed-effects-utils.c:415
weed_paramtmpl_get_flags
int weed_paramtmpl_get_flags(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:300
weed_host_set_supports_premult_alpha
void weed_host_set_supports_premult_alpha(weed_plant_t *host_info)
Definition: weed-effects-utils.c:136
weed_param_get_gui
weed_plant_t * weed_param_get_gui(weed_plant_t *param, int create_if_not_exists)
Definition: weed-effects-utils.c:166
weed_palette_get_name_full
char * weed_palette_get_name_full(int pal, int clamping, int subspace) WARN_UNUSED
Definition: weed-effects-utils.c:764
weed_param_is_hidden
int weed_param_is_hidden(weed_plant_t *param, int temporary)
Definition: weed-effects-utils.c:170
weed_filter_get_flags
int weed_filter_get_flags(weed_plant_t *filter)
Definition: weed-effects-utils.c:176
weed_filter_get_name
char * weed_filter_get_name(weed_plant_t *filter)
Definition: weed-effects-utils.c:240
weed_channel_get_naudchans
int weed_channel_get_naudchans(weed_plant_t *channel)
Definition: weed-effects-utils.c:498
weed_filter_may_thread
int weed_filter_may_thread(weed_plant_t *filter)
Definition: weed-effects-utils.c:196
weed_param_get_nchoices
int weed_param_get_nchoices(weed_plant_t *param)
Definition: weed-effects-utils.c:553
weed_param_get_value_boolean
int weed_param_get_value_boolean(weed_plant_t *param)
Definition: weed-effects-utils.c:619
weed_param_get_type
int weed_param_get_type(weed_plant_t *param)
Definition: weed-effects-utils.c:523
weed_paramtmpl_value_irrelevant
int weed_paramtmpl_value_irrelevant(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:360
weed_chantmpl_get_name
char * weed_chantmpl_get_name(weed_plant_t *chantmpl)
Definition: weed-effects-utils.c:285
weed_leaf_clear_flagbits
uint32_t weed_leaf_clear_flagbits(weed_plant_t *, const char *leaf, uint32_t flagbits)
~value ANDed with flags
Definition: weed-effects-utils.c:58
weed_filter_get_package_name
char * weed_filter_get_package_name(weed_plant_t *filter)
Definition: weed-effects-utils.c:154
weed_param_get_template
weed_plant_t * weed_param_get_template(weed_plant_t *param)
Definition: weed-effects-utils.c:518
weed_instance_set_flags
void weed_instance_set_flags(weed_plant_t *instance, int flags)
Definition: weed-effects-utils.c:585
weed_param_get_value_int64
int64_t weed_param_get_value_int64(weed_plant_t *param)
Definition: weed-effects-utils.c:629
weed_filter_is_resizer
int weed_filter_is_resizer(weed_plant_t *filter)
Definition: weed-effects-utils.c:822
weed_gamma_get_name
const char * weed_gamma_get_name(int gamma)
Definition: weed-effects-utils.c:774
weed_param_has_variable_size
int weed_param_has_variable_size(weed_plant_t *param)
Definition: weed-effects-utils.c:533
weed_paramtmpl_hints_hidden
int weed_paramtmpl_hints_hidden(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:351
weed_chantmpl_is_audio
int weed_chantmpl_is_audio(weed_plant_t *chantmpl)
Definition: weed-effects-utils.c:381
weed_filter_get_plugin_info
weed_plant_t * weed_filter_get_plugin_info(weed_plant_t *filter)
Definition: weed-effects-utils.c:150
weed_filter_prefers_premult_alpha
int weed_filter_prefers_premult_alpha(weed_plant_t *filter)
Definition: weed-effects-utils.c:216
weed_clear_plant_flags
void weed_clear_plant_flags(weed_plant_t *t, uint32_t flags, const char *ign_prefix)
Definition: weed-effects-utils.c:85
weed_channel_get_audio_data
float ** weed_channel_get_audio_data(weed_plant_t *channel, int *naudchans)
Definition: weed-effects-utils.c:564
WARN_UNUSED
#define WARN_UNUSED
Definition: weed-effects-utils.h:25
weed_leaf_set_flagbits
uint32_t weed_leaf_set_flagbits(weed_plant_t *, const char *leaf, uint32_t flagbits)
value ORed with flags
Definition: weed-effects-utils.c:49
weed_plugin_info_get_package_name
char * weed_plugin_info_get_package_name(weed_plant_t *pinfo)
Definition: weed-effects-utils.c:141
weed_param_get_value_type
int weed_param_get_value_type(weed_plant_t *param)
Definition: weed-effects-utils.c:528
weed_instance_get_flags
int weed_instance_get_flags(weed_plant_t *instance)
Definition: weed-effects-utils.c:580
weed_add_plant_flags
void weed_add_plant_flags(weed_plant_t *, uint32_t flags, const char *ign_prefix)
Definition: weed-effects-utils.c:67
weed_yuv_subspace_get_name
const char * weed_yuv_subspace_get_name(int subspace)
Definition: weed-effects-utils.c:757
weed_channel_get_palette
int weed_channel_get_palette(weed_plant_t *channel)
Definition: weed-effects-utils.c:453
weed_channel_get_rowstride
int weed_channel_get_rowstride(weed_plant_t *channel)
Definition: weed-effects-utils.c:482
weed_filter_hints_hidden
int weed_filter_hints_hidden(weed_plant_t *filter)
Definition: weed-effects-utils.c:231
weed_param_value_irrelevant
int weed_param_value_irrelevant(weed_plant_t *param)
Definition: weed-effects-utils.c:543
weed_filter_non_realtime
int weed_filter_non_realtime(weed_plant_t *filter)
Definition: weed-effects-utils.c:191
weed_param_get_value_double
double weed_param_get_value_double(weed_plant_t *param)
Definition: weed-effects-utils.c:624
weed_paramtmpl_get_name
char * weed_paramtmpl_get_name(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:317
palette
_palette * palette
interface colour settings
Definition: main.c:101
weed_filter_get_out_chantmpls
weed_plant_t ** weed_filter_get_out_chantmpls(weed_plant_t *filter, int *ntmpls)
Definition: weed-effects-utils.c:251
weed_channel_set_gamma_type
weed_plant_t * weed_channel_set_gamma_type(weed_plant_t *channel, int gamma_type)
only sets value; no conversion of pixel_data done
Definition: weed-effects-utils.c:463
weed_filter_prefers_linear_gamma
int weed_filter_prefers_linear_gamma(weed_plant_t *filter)
Definition: weed-effects-utils.c:211
weed_filter_is_converter
int weed_filter_is_converter(weed_plant_t *filter)
Definition: weed-effects-utils.c:221
error
error("LSD_RANDFUNC(ptr, size) must be defined")
weed_channel_get_width_pixels
int weed_channel_get_width_pixels(weed_plant_t *channel)
width in pixels: only relevant when comparing widths of diferrent palettes
Definition: weed-effects-utils.c:427
weed_plant_get_type
int32_t weed_plant_get_type(weed_plant_t *)
Definition: weed-effects-utils.c:44
weed_host_info_set_flags
void weed_host_info_set_flags(weed_plant_t *host_info, int flags)
Definition: weed-effects-utils.c:121
weed_filter_get_out_paramtmpls
weed_plant_t ** weed_filter_get_out_paramtmpls(weed_plant_t *filter, int *ntmpls)
Definition: weed-effects-utils.c:263
weed_param_get_value_int
int weed_param_get_value_int(weed_plant_t *param)
Definition: weed-effects-utils.c:614
weed_channel_get_audio_length
int weed_channel_get_audio_length(weed_plant_t *channel)
Definition: weed-effects-utils.c:503
weed_channel_get_palette_yuv
int weed_channel_get_palette_yuv(weed_plant_t *channel, int *clamping, int *sampling, int *subspace)
Definition: weed-effects-utils.c:469
weed_channel_set_height
void weed_channel_set_height(weed_plant_t *channel, int height)
Definition: weed-effects-utils.c:437
weed_host_set_supports_linear_gamma
void weed_host_set_supports_linear_gamma(weed_plant_t *host_info)
Definition: weed-effects-utils.c:131
weed_filter_palettes_vary
int weed_filter_palettes_vary(weed_plant_t *filter)
Definition: weed-effects-utils.c:206
weed_channel_set_audio_data
weed_plant_t * weed_channel_set_audio_data(weed_plant_t *channel, float **data, int arate, int naudchans, int nsamps)
Definition: weed-effects-utils.c:570
weed_channel_get_gamma_type
int weed_channel_get_gamma_type(weed_plant_t *channel)
Definition: weed-effects-utils.c:458
weed_channel_set_width
void weed_channel_set_width(weed_plant_t *channel, int width)
width in macropixels
Definition: weed-effects-utils.c:421
weed_channel_get_pixel_data_planar
void ** weed_channel_get_pixel_data_planar(weed_plant_t *channel, int *nplanes)
Definition: weed-effects-utils.c:409
weed_chantmpl_get_flags
int weed_chantmpl_get_flags(weed_plant_t *chantmpl)
Definition: weed-effects-utils.c:290
weed_paramtmpl_hints_string_choice
int weed_paramtmpl_hints_string_choice(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:342
weed_filter_get_in_paramtmpls
weed_plant_t ** weed_filter_get_in_paramtmpls(weed_plant_t *filter, int *ntmpls)
Definition: weed-effects-utils.c:257
weed_paramtmpl_get_gui
weed_plant_t * weed_paramtmpl_get_gui(weed_plant_t *paramtmpl, int create_if_not_exists)
Definition: weed-effects-utils.c:162
weed_paramtmpl_value_type
uint32_t weed_paramtmpl_value_type(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:305
weed_error_to_text
char * weed_error_to_text(weed_error_t error) WARN_UNUSED
Definition: weed-effects-utils.c:647
weed_filter_hints_unstable
int weed_filter_hints_unstable(weed_plant_t *filter)
Definition: weed-effects-utils.c:181
weed_channel_get_height
int weed_channel_get_height(weed_plant_t *channel)
Definition: weed-effects-utils.c:432
weed_filter_get_in_chantmpls
weed_plant_t ** weed_filter_get_in_chantmpls(weed_plant_t *filter, int *ntmpls)
Definition: weed-effects-utils.c:245
weed_channel_get_audio_rate
int weed_channel_get_audio_rate(weed_plant_t *channel)
Definition: weed-effects-utils.c:493
weed_chantmpl_get_max_audio_length
int weed_chantmpl_get_max_audio_length(weed_plant_t *chantmpl)
Definition: weed-effects-utils.c:295
weed_chantmpl_get_max_repeats
int weed_chantmpl_get_max_repeats(weed_plant_t *chantmpl)
Definition: weed-effects-utils.c:373
weed_filter_get_gui
weed_plant_t * weed_filter_get_gui(weed_plant_t *filter, int create_if_not_exists)
Definition: weed-effects-utils.c:146
weed_filter_channel_sizes_vary
int weed_filter_channel_sizes_vary(weed_plant_t *filter)
Definition: weed-effects-utils.c:201
weed_channel_set_palette
void weed_channel_set_palette(weed_plant_t *channel, int palette)
Definition: weed-effects-utils.c:448
weed_channel_is_disabled
int weed_channel_is_disabled(weed_plant_t *channel)
Definition: weed-effects-utils.c:508
weed_host_info_get_flags
int weed_host_info_get_flags(weed_plant_t *host_info)
Definition: weed-effects-utils.c:116
weed_host_set_verbosity
void weed_host_set_verbosity(weed_plant_t *host_info, int verbosityy)
Definition: weed-effects-utils.c:126
weed_instance_get_out_params
weed_plant_t ** weed_instance_get_out_params(weed_plant_t *instance, int *nparams)
Definition: weed-effects-utils.c:608
weed_paramtmpl_has_variable_size
int weed_paramtmpl_has_variable_size(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:322
weed_palette_get_name
const char * weed_palette_get_name(int pal)
Definition: weed-effects-utils.c:703
weed_paramtmpl_has_value_perchannel
int weed_paramtmpl_has_value_perchannel(weed_plant_t *paramtmpl)
Definition: weed-effects-utils.c:328
weed_seed_type_to_text
char * weed_seed_type_to_text(uint32_t seed_type) WARN_UNUSED
Definition: weed-effects-utils.c:680
weed_param_get_value_string
char * weed_param_get_value_string(weed_plant_t *param)
Definition: weed-effects-utils.c:634
weed_channel_get_pixel_data
void * weed_channel_get_pixel_data(weed_plant_t *channel)
Definition: weed-effects-utils.c:404
weed_filter_is_process_last
int weed_filter_is_process_last(weed_plant_t *filter)
Definition: weed-effects-utils.c:226
weed_palette_get_bits_per_macropixel
int weed_palette_get_bits_per_macropixel(int pal)
Definition: colourspace.c:1411
weed_instance_get_gui
weed_plant_t * weed_instance_get_gui(weed_plant_t *inst, int create_if_not_exists)
Definition: weed-effects-utils.c:158
weed_param_has_value_perchannel
int weed_param_has_value_perchannel(weed_plant_t *param)
Definition: weed-effects-utils.c:538
weed_channel_set_size
void weed_channel_set_size(weed_plant_t *channel, int width, int height)
Definition: weed-effects-utils.c:442
weed_gui_get_flags
int weed_gui_get_flags(weed_plant_t *gui)
gui plants
Definition: weed-effects-utils.c:640
weed_channel_get_template
weed_plant_t * weed_channel_get_template(weed_plant_t *channel)
Definition: weed-effects-utils.c:513
weed_instance_get_in_params
weed_plant_t ** weed_instance_get_in_params(weed_plant_t *instance, int *nparams)
Definition: weed-effects-utils.c:602