~ubuntu-branches/ubuntu/trusty/gavl/trusty

« back to all changes in this revision

Viewing changes to include/scale.h

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis
  • Date: 2009-01-17 20:38:33 UTC
  • mfrom: (1.1.3 upstream) (4.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090117203833-t8fq1e1jdquyelmy
Tags: 1.1.0-2
Fixed debian/copyright 

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
typedef struct gavl_video_scale_context_s gavl_video_scale_context_t;
32
32
 
 
33
typedef struct
 
34
  {
 
35
  int index; /* Index of the first row/column */
 
36
  int32_t * factor_i;
 
37
  float * factor_f;
 
38
  } gavl_video_scale_pixel_t;
 
39
 
 
40
typedef struct
 
41
  {
 
42
  int pixels_alloc;
 
43
  int factors_alloc;
 
44
  int num_pixels; /* Number of pixels (rows/columns) in the output area */
 
45
  float * factors_f;
 
46
  int32_t * factors_i;
 
47
  gavl_video_scale_pixel_t  * pixels;
 
48
  int factors_per_pixel;
 
49
  int do_clip; /* Use routines with clipping */
 
50
  int normalized;
 
51
  } gavl_video_scale_table_t;
 
52
 
33
53
typedef void
34
54
(*gavl_video_scale_scanline_func)(gavl_video_scale_context_t*);
35
55
 
38
58
 
39
59
gavl_video_scale_get_weight
40
60
gavl_video_scale_get_weight_func(gavl_video_options_t * opt,
41
 
                                 int * num_points);
 
61
                                 int * num_points)
 
62
  __attribute__ ((visibility("default")));
42
63
 
43
64
/* Scale functions */
44
65
 
75
96
  gavl_scale_func_tab_t funcs_xy;
76
97
  } gavl_scale_funcs_t;
77
98
 
78
 
void gavl_init_scale_funcs_nearest_c(gavl_scale_funcs_t * tab);
 
99
void gavl_init_scale_funcs_nearest_c(gavl_scale_funcs_t * tab,
 
100
                                     int src_advance,
 
101
                                     int dst_advance);
79
102
 
80
103
void gavl_init_scale_funcs_bilinear_c(gavl_scale_funcs_t * tab);
 
104
void gavl_init_scale_funcs_bilinear_noclip_c(gavl_scale_funcs_t * tab);
 
105
void gavl_init_scale_funcs_bilinear_fast_c(gavl_scale_funcs_t * tab);
81
106
 
82
107
void gavl_init_scale_funcs_quadratic_c(gavl_scale_funcs_t * tab);
 
108
void gavl_init_scale_funcs_quadratic_noclip_c(gavl_scale_funcs_t * tab);
83
109
 
84
110
void gavl_init_scale_funcs_bicubic_c(gavl_scale_funcs_t * tab);
85
 
 
86
111
void gavl_init_scale_funcs_bicubic_noclip_c(gavl_scale_funcs_t * tab);
87
112
 
88
113
 
89
114
void gavl_init_scale_funcs_generic_c(gavl_scale_funcs_t * tab);
 
115
void gavl_init_scale_funcs_generic_noclip_c(gavl_scale_funcs_t * tab);
90
116
 
91
117
 
92
118
#ifdef HAVE_MMX
127
153
 
128
154
/* */
129
155
void gavl_init_scale_funcs_bicubic_y_mmxext(gavl_scale_funcs_t * tab,
130
 
                                         int src_advance,
131
 
                                         int dst_advance);
 
156
                                            int src_advance,
 
157
                                            int dst_advance);
132
158
 
133
159
void gavl_init_scale_funcs_quadratic_y_mmxext(gavl_scale_funcs_t * tab,
134
 
                                           int src_advance,
135
 
                                           int dst_advance);
 
160
                                              int src_advance,
 
161
                                              int dst_advance);
136
162
 
137
163
 
138
164
void gavl_init_scale_funcs_generic_y_mmxext(gavl_scale_funcs_t * tab,
139
 
                                         int src_advance,
140
 
                                         int dst_advance);
 
165
                                            int src_advance,
 
166
                                            int dst_advance);
141
167
 
142
168
void gavl_init_scale_funcs_bilinear_y_mmxext(gavl_scale_funcs_t * tab,
143
 
                                          int src_advance, int dst_advance);
 
169
                                             int src_advance,
 
170
                                             int dst_advance);
144
171
 
145
172
void gavl_init_scale_funcs_bicubic_x_mmxext(gavl_scale_funcs_t * tab,
146
 
                                         int src_advance,
147
 
                                         int dst_advance);
 
173
                                            int src_advance,
 
174
                                            int dst_advance);
148
175
 
149
176
void gavl_init_scale_funcs_quadratic_x_mmxext(gavl_scale_funcs_t * tab,
150
 
                                           int src_advance,
151
 
                                           int dst_advance);
 
177
                                              int src_advance,
 
178
                                              int dst_advance);
152
179
 
153
180
void gavl_init_scale_funcs_bicubic_noclip_x_mmxext(gavl_scale_funcs_t * tab,
154
 
                                                int src_advance,
155
 
                                                int dst_advance);
 
181
                                                   int src_advance,
 
182
                                                   int dst_advance);
156
183
 
157
184
void gavl_init_scale_funcs_generic_x_mmxext(gavl_scale_funcs_t * tab,
158
 
                                         int src_advance,
159
 
                                         int dst_advance);
 
185
                                            int src_advance,
 
186
                                            int dst_advance);
160
187
 
161
188
void gavl_init_scale_funcs_bilinear_x_mmxext(gavl_scale_funcs_t * tab,
162
 
                                          int src_advance, int dst_advance);
 
189
                                             int src_advance,
 
190
                                             int dst_advance);
163
191
 
164
192
#endif
165
193
 
230
258
void gavl_init_scale_funcs(gavl_scale_funcs_t * tab,
231
259
                           gavl_video_options_t * opt,
232
260
                           int src_advance,
233
 
                           int dst_advance);
234
 
 
235
 
typedef struct
236
 
  {
237
 
  int index; /* Index of the first row/column */
238
 
  int32_t * factor_i;
239
 
  float * factor_f;
240
 
  } gavl_video_scale_pixel_t;
241
 
 
242
 
typedef struct
243
 
  {
244
 
  int pixels_alloc;
245
 
  int factors_alloc;
246
 
  int num_pixels; /* Number of pixels (rows/columns) in the output area */
247
 
  float * factors_f;
248
 
  int32_t * factors_i;
249
 
  gavl_video_scale_pixel_t  * pixels;
250
 
  int factors_per_pixel;
251
 
  } gavl_video_scale_table_t;
 
261
                           int dst_advance,
 
262
                           gavl_video_scale_table_t * tab_h,
 
263
                           gavl_video_scale_table_t * tab_v);
 
264
 
252
265
 
253
266
void gavl_video_scale_table_init(gavl_video_scale_table_t * tab,
254
267
                                 gavl_video_options_t * opt,