x11_common.c: Some indentation fixes
[mplayer/glamo.git] / libmpcodecs / vf_expand.c
blob57226acb938906a86f9673290c755995e3edaaa3
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #define OSD_SUPPORT
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <string.h>
24 #include <stdbool.h>
26 #include "config.h"
27 #include "mp_msg.h"
28 #include "options.h"
30 #include "img_format.h"
31 #include "mp_image.h"
32 #include "vf.h"
34 #include "libvo/fastmemcpy.h"
35 #include "libavutil/avutil.h"
37 #ifdef OSD_SUPPORT
38 #include "libvo/sub.h"
39 #include "libvo/osd.h"
40 #endif
42 #include "m_option.h"
43 #include "m_struct.h"
45 static struct vf_priv_s {
46 // These four values are a backup of the values parsed from the command line.
47 // This is necessary so that we do not get a mess upon filter reinit due to
48 // e.g. aspect changes and with only aspect specified on the command line,
49 // where we would otherwise use the values calculated for a different aspect
50 // instead of recalculating them again.
51 int cfg_exp_w, cfg_exp_h;
52 int cfg_exp_x, cfg_exp_y;
53 int exp_w,exp_h;
54 int exp_x,exp_y;
55 int osd_enabled;
56 double aspect;
57 int round;
58 unsigned char* fb_ptr;
59 int passthrough;
60 int first_slice;
61 struct osd_state *osd;
62 } const vf_priv_dflt = {
63 -1,-1,
64 -1,-1,
65 -1,-1,
66 -1,-1,
68 0.,
70 NULL,
75 //===========================================================================//
76 #ifdef OSD_SUPPORT
78 static struct vf_instance *vf=NULL; // fixme (needs sub.c changes)
79 static int orig_w,orig_h;
81 static void remove_func_2(int x0,int y0, int w,int h){
82 // TODO: let's cleanup the place
83 //printf("OSD clear: %d;%d %dx%d \n",x0,y0,w,h);
84 vf_mpi_clear(vf->dmpi,x0,y0,w,h);
87 static void remove_func(int x0,int y0, int w,int h){
88 if(!vo_osd_changed_flag) return;
89 // split it to 4 parts:
90 if(y0<vf->priv->exp_y){
91 // it has parts above the image:
92 int y=y0+h;
93 if(y>vf->priv->exp_y) y=vf->priv->exp_y;
94 remove_func_2(x0,y0,w,y-y0);
95 if(y0+h<=vf->priv->exp_y) return;
96 h-=y-y0;y0=y;
98 if(y0+h>vf->priv->exp_y+orig_h){
99 // it has parts under the image:
100 int y=y0;
101 if(y<vf->priv->exp_y+orig_h) y=vf->priv->exp_y+orig_h;
102 remove_func_2(x0,y,w,y0+h-y);
103 if(y0>=vf->priv->exp_y+orig_h) return;
104 h=y-y0;
106 if(x0<vf->priv->exp_x){
107 // it has parts on the left side of the image:
108 int x=x0+w;
109 if(x>vf->priv->exp_x) x=vf->priv->exp_x;
110 remove_func_2(x0,y0,x-x0,h);
111 if(x0+w<=vf->priv->exp_x) return;
112 w-=x-x0;x0=x;
114 if(x0+w>vf->priv->exp_x+orig_w){
115 // it has parts on the right side of the image:
116 int x=x0;
117 if(x<vf->priv->exp_x+orig_w) x=vf->priv->exp_x+orig_w;
118 remove_func_2(x,y0,x0+w-x,h);
119 if(x0>=vf->priv->exp_x+orig_w) return;
120 w=x-x0;
124 static void draw_func(void *ctx, int x0,int y0, int w,int h,unsigned char* src, unsigned char *srca, int stride){
125 unsigned char* dst;
126 if(!vo_osd_changed_flag && vf->dmpi->planes[0]==vf->priv->fb_ptr){
127 // ok, enough to update the area inside the video, leave the black bands
128 // untouched!
129 if(x0<vf->priv->exp_x){
130 int tmp=vf->priv->exp_x-x0;
131 w-=tmp; src+=tmp; srca+=tmp; x0+=tmp;
133 if(y0<vf->priv->exp_y){
134 int tmp=vf->priv->exp_y-y0;
135 h-=tmp; src+=tmp*stride; srca+=tmp*stride; y0+=tmp;
137 if(x0+w>vf->priv->exp_x+orig_w){
138 w=vf->priv->exp_x+orig_w-x0;
140 if(y0+h>vf->priv->exp_y+orig_h){
141 h=vf->priv->exp_y+orig_h-y0;
144 if(w<=0 || h<=0) return; // nothing to do...
145 // printf("OSD redraw: %d;%d %dx%d \n",x0,y0,w,h);
146 dst=vf->dmpi->planes[0]+
147 vf->dmpi->stride[0]*y0+
148 (vf->dmpi->bpp>>3)*x0;
149 switch(vf->dmpi->imgfmt){
150 case IMGFMT_BGR12:
151 case IMGFMT_RGB12:
152 vo_draw_alpha_rgb12(w, h, src, srca, stride, dst, vf->dmpi->stride[0]);
153 break;
154 case IMGFMT_BGR15:
155 case IMGFMT_RGB15:
156 vo_draw_alpha_rgb15(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
157 break;
158 case IMGFMT_BGR16:
159 case IMGFMT_RGB16:
160 vo_draw_alpha_rgb16(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
161 break;
162 case IMGFMT_BGR24:
163 case IMGFMT_RGB24:
164 vo_draw_alpha_rgb24(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
165 break;
166 case IMGFMT_BGR32:
167 case IMGFMT_RGB32:
168 vo_draw_alpha_rgb32(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
169 break;
170 case IMGFMT_YV12:
171 case IMGFMT_I420:
172 case IMGFMT_IYUV:
173 case IMGFMT_YVU9:
174 case IMGFMT_IF09:
175 case IMGFMT_Y800:
176 case IMGFMT_Y8:
177 vo_draw_alpha_yv12(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
178 break;
179 case IMGFMT_YUY2:
180 vo_draw_alpha_yuy2(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
181 break;
182 case IMGFMT_UYVY:
183 vo_draw_alpha_yuy2(w,h,src,srca,stride,dst+1,vf->dmpi->stride[0]);
184 break;
188 static void draw_osd(struct vf_instance *vf_,int w,int h){
189 vf=vf_;orig_w=w;orig_h=h;
190 // printf("======================================\n");
191 if(vf->priv->exp_w!=w || vf->priv->exp_h!=h ||
192 vf->priv->exp_x || vf->priv->exp_y){
193 // yep, we're expanding image, not just copy.
194 if(vf->dmpi->planes[0]!=vf->priv->fb_ptr){
195 // double buffering, so we need full clear :(
196 if (vf->priv->exp_y > 0)
197 remove_func_2(0,0,vf->priv->exp_w,vf->priv->exp_y);
198 if (vf->priv->exp_y+h < vf->priv->exp_h)
199 remove_func_2(0,vf->priv->exp_y+h,vf->priv->exp_w,vf->priv->exp_h-h-vf->priv->exp_y);
200 if (vf->priv->exp_x > 0)
201 remove_func_2(0,vf->priv->exp_y,vf->priv->exp_x,h);
202 if (vf->priv->exp_x+w < vf->priv->exp_w)
203 remove_func_2(vf->priv->exp_x+w,vf->priv->exp_y,vf->priv->exp_w-w-vf->priv->exp_x,h);
204 } else {
205 // partial clear:
206 osd_remove_text(vf->priv->osd, vf->priv->exp_w,vf->priv->exp_h,remove_func);
209 osd_draw_text(vf->priv->osd, vf->priv->exp_w,vf->priv->exp_h,draw_func, NULL);
210 // save buffer pointer for double buffering detection - yes, i know it's
211 // ugly method, but note that codecs with DR support does the same...
212 if(vf->dmpi)
213 vf->priv->fb_ptr=vf->dmpi->planes[0];
216 #endif
217 //===========================================================================//
219 static int config(struct vf_instance *vf,
220 int width, int height, int d_width, int d_height,
221 unsigned int flags, unsigned int outfmt)
223 struct MPOpts *opts = vf->opts;
224 if(outfmt == IMGFMT_MPEGPES) {
225 vf->priv->passthrough = 1;
226 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
228 if (outfmt == IMGFMT_IF09) return 0;
229 vf->priv->exp_x = vf->priv->cfg_exp_x;
230 vf->priv->exp_y = vf->priv->cfg_exp_y;
231 vf->priv->exp_w = vf->priv->cfg_exp_w;
232 vf->priv->exp_h = vf->priv->cfg_exp_h;
233 // calculate the missing parameters:
234 #if 0
235 if(vf->priv->exp_w<width) vf->priv->exp_w=width;
236 if(vf->priv->exp_h<height) vf->priv->exp_h=height;
237 #else
238 if ( vf->priv->exp_w == -1 ) vf->priv->exp_w=width;
239 else if (vf->priv->exp_w < -1 ) vf->priv->exp_w=width - vf->priv->exp_w;
240 else if ( vf->priv->exp_w<width ) vf->priv->exp_w=width;
241 if ( vf->priv->exp_h == -1 ) vf->priv->exp_h=height;
242 else if ( vf->priv->exp_h < -1 ) vf->priv->exp_h=height - vf->priv->exp_h;
243 else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
244 #endif
245 if (vf->priv->aspect) {
246 float adjusted_aspect = vf->priv->aspect;
247 adjusted_aspect *= ((double)width/height) / ((double)d_width/d_height);
248 if (vf->priv->exp_h < vf->priv->exp_w / adjusted_aspect) {
249 vf->priv->exp_h = vf->priv->exp_w / adjusted_aspect + 0.5;
250 } else {
251 vf->priv->exp_w = vf->priv->exp_h * adjusted_aspect + 0.5;
254 if (vf->priv->round > 1) { // round up.
255 vf->priv->exp_w = (1 + (vf->priv->exp_w - 1) / vf->priv->round) * vf->priv->round;
256 vf->priv->exp_h = (1 + (vf->priv->exp_h - 1) / vf->priv->round) * vf->priv->round;
259 if(vf->priv->exp_x<0 || vf->priv->exp_x+width>vf->priv->exp_w) vf->priv->exp_x=(vf->priv->exp_w-width)/2;
260 if(vf->priv->exp_y<0 || vf->priv->exp_y+height>vf->priv->exp_h) vf->priv->exp_y=(vf->priv->exp_h-height)/2;
261 vf->priv->fb_ptr=NULL;
263 if(!opts->screen_size_x && !opts->screen_size_y){
264 d_width=d_width*vf->priv->exp_w/width;
265 d_height=d_height*vf->priv->exp_h/height;
267 return vf_next_config(vf,vf->priv->exp_w,vf->priv->exp_h,d_width,d_height,flags,outfmt);
270 // there are 4 cases:
271 // codec --DR--> expand --DR--> vo
272 // codec --DR--> expand -copy-> vo
273 // codec -copy-> expand --DR--> vo
274 // codec -copy-> expand -copy-> vo (worst case)
276 static void get_image(struct vf_instance *vf, mp_image_t *mpi){
277 // if(mpi->type==MP_IMGTYPE_IPB) return; // not yet working
278 #ifdef OSD_SUPPORT
279 if(vf->priv->osd_enabled && (mpi->flags&MP_IMGFLAG_PRESERVE)){
280 // check if we have to render osd!
281 osd_update(vf->priv->osd, vf->priv->exp_w, vf->priv->exp_h);
282 if(vo_osd_check_range_update(vf->priv->exp_x,vf->priv->exp_y,
283 vf->priv->exp_x+mpi->w,vf->priv->exp_y+mpi->h)) return;
285 #endif
286 if(vf->priv->exp_w==mpi->width ||
287 (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) ){
288 // try full DR !
289 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
290 mpi->type, mpi->flags,
291 FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x),
292 FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
293 if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
294 !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){
295 mp_tmsg(MSGT_VFILTER, MSGL_INFO, "Full DR not possible, trying SLICES instead!\n");
296 return;
298 // set up mpi as a cropped-down image of dmpi:
299 if(mpi->flags&MP_IMGFLAG_PLANAR){
300 mpi->planes[0]=vf->dmpi->planes[0]+
301 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x;
302 mpi->planes[1]=vf->dmpi->planes[1]+
303 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[1]+(vf->priv->exp_x>>mpi->chroma_x_shift);
304 mpi->planes[2]=vf->dmpi->planes[2]+
305 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[2]+(vf->priv->exp_x>>mpi->chroma_x_shift);
306 mpi->stride[1]=vf->dmpi->stride[1];
307 mpi->stride[2]=vf->dmpi->stride[2];
308 } else {
309 mpi->planes[0]=vf->dmpi->planes[0]+
310 vf->priv->exp_y*vf->dmpi->stride[0]+
311 vf->priv->exp_x*(vf->dmpi->bpp/8);
313 mpi->stride[0]=vf->dmpi->stride[0];
314 mpi->width=vf->dmpi->width;
315 mpi->flags|=MP_IMGFLAG_DIRECT;
316 mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK;
317 // vf->dmpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK;
321 static void start_slice(struct vf_instance *vf, mp_image_t *mpi){
322 // printf("start_slice called! flag=%d\n",mpi->flags&MP_IMGFLAG_DRAW_CALLBACK);
323 if(!vf->next->draw_slice){
324 mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK;
325 return;
327 // they want slices!!! allocate the buffer.
328 if(!mpi->priv)
329 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
330 // MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
331 MP_IMGTYPE_TEMP, mpi->flags,
332 FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x),
333 FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
334 if(!(vf->dmpi->flags&MP_IMGFLAG_DRAW_CALLBACK))
335 mp_tmsg(MSGT_VFILTER, MSGL_WARN, "WARNING! Next filter doesn't support SLICES, get ready for sig11...\n"); // shouldn't happen.
336 vf->priv->first_slice = 1;
339 static void draw_top_blackbar_slice(struct vf_instance *vf,
340 unsigned char** src, int* stride, int w,int h, int x, int y){
341 if(vf->priv->exp_y>0 && y == 0) {
342 vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride,
343 vf->dmpi->w,vf->priv->exp_y,0,0);
348 static void draw_bottom_blackbar_slice(struct vf_instance *vf,
349 unsigned char** src, int* stride, int w,int h, int x, int y){
350 if(vf->priv->exp_y+vf->h<vf->dmpi->h && y+h == vf->h) {
351 unsigned char *src2[MP_MAX_PLANES];
352 src2[0] = vf->dmpi->planes[0]
353 + (vf->priv->exp_y+vf->h)*vf->dmpi->stride[0];
354 if(vf->dmpi->flags&MP_IMGFLAG_PLANAR){
355 src2[1] = vf->dmpi->planes[1]
356 + ((vf->priv->exp_y+vf->h)>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1];
357 src2[2] = vf->dmpi->planes[2]
358 + ((vf->priv->exp_y+vf->h)>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2];
359 } else {
360 src2[1] = vf->dmpi->planes[1]; // passthrough rgb8 palette
362 vf_next_draw_slice(vf, src2, vf->dmpi->stride,
363 vf->dmpi->w,vf->dmpi->h-(vf->priv->exp_y+vf->h),
364 0,vf->priv->exp_y+vf->h);
368 static void draw_slice(struct vf_instance *vf,
369 unsigned char** src, int* stride, int w,int h, int x, int y){
370 // printf("draw_slice() called %d at %d\n",h,y);
372 if (y == 0 && y+h == vf->h) {
373 // special case - only one slice
374 draw_top_blackbar_slice(vf, src, stride, w, h, x, y);
375 vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y);
376 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y);
377 return;
379 if (vf->priv->first_slice) {
380 draw_top_blackbar_slice(vf, src, stride, w, h, x, y);
381 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y);
383 vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y);
384 if (!vf->priv->first_slice) {
385 draw_top_blackbar_slice(vf, src, stride, w, h, x, y);
386 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y);
388 vf->priv->first_slice = 0;
391 static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
392 if (vf->priv->passthrough) {
393 mp_image_t *dmpi = vf_get_image(vf->next, IMGFMT_MPEGPES,
394 MP_IMGTYPE_EXPORT, 0, mpi->w, mpi->h);
395 dmpi->planes[0]=mpi->planes[0];
396 return vf_next_put_image(vf,dmpi, pts);
399 if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
400 vf->dmpi=mpi->priv;
401 if(!vf->dmpi) { mp_tmsg(MSGT_VFILTER, MSGL_WARN, "Why do we get NULL??\n"); return 0; }
402 mpi->priv=NULL;
403 #ifdef OSD_SUPPORT
404 if(vf->priv->osd_enabled) draw_osd(vf,mpi->w,mpi->h);
405 #endif
406 // we've used DR, so we're ready...
407 if(!(mpi->flags&MP_IMGFLAG_PLANAR))
408 vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
409 return vf_next_put_image(vf,vf->dmpi, pts);
412 // hope we'll get DR buffer:
413 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
414 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
415 vf->priv->exp_w, vf->priv->exp_h);
417 // copy mpi->dmpi...
418 if(mpi->flags&MP_IMGFLAG_PLANAR){
419 memcpy_pic(vf->dmpi->planes[0]+
420 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x,
421 mpi->planes[0], mpi->w, mpi->h,
422 vf->dmpi->stride[0],mpi->stride[0]);
423 memcpy_pic(vf->dmpi->planes[1]+
424 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[1]+(vf->priv->exp_x>>mpi->chroma_x_shift),
425 mpi->planes[1], (mpi->w>>mpi->chroma_x_shift), (mpi->h>>mpi->chroma_y_shift),
426 vf->dmpi->stride[1],mpi->stride[1]);
427 memcpy_pic(vf->dmpi->planes[2]+
428 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[2]+(vf->priv->exp_x>>mpi->chroma_x_shift),
429 mpi->planes[2], (mpi->w>>mpi->chroma_x_shift), (mpi->h>>mpi->chroma_y_shift),
430 vf->dmpi->stride[2],mpi->stride[2]);
431 } else {
432 memcpy_pic(vf->dmpi->planes[0]+
433 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x*(vf->dmpi->bpp/8),
434 mpi->planes[0], mpi->w*(vf->dmpi->bpp/8), mpi->h,
435 vf->dmpi->stride[0],mpi->stride[0]);
436 vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
438 #ifdef OSD_SUPPORT
439 if(vf->priv->osd_enabled) draw_osd(vf,mpi->w,mpi->h);
440 #endif
441 return vf_next_put_image(vf,vf->dmpi, pts);
444 //===========================================================================//
446 static int control(struct vf_instance *vf, int request, void* data){
447 #ifdef OSD_SUPPORT
448 switch(request){
449 case VFCTRL_SET_OSD_OBJ:
450 vf->priv->osd = data;
451 break;
452 case VFCTRL_DRAW_OSD:
453 if(vf->priv->osd_enabled) return CONTROL_TRUE;
454 break;
455 case VFCTRL_REDRAW_OSD:
456 if (vf->priv->osd_enabled)
457 return false;
458 break;
460 #endif
461 return vf_next_control(vf,request,data);
464 static int query_format(struct vf_instance *vf, unsigned int fmt){
465 return vf_next_query_format(vf,fmt);
468 static int vf_open(vf_instance_t *vf, char *args){
469 vf->config=config;
470 vf->control=control;
471 vf->query_format=query_format;
472 vf->start_slice=start_slice;
473 vf->draw_slice=draw_slice;
474 vf->get_image=get_image;
475 vf->put_image=put_image;
476 mp_msg(MSGT_VFILTER, MSGL_INFO, "Expand: %d x %d, %d ; %d, osd: %d, aspect: %f, round: %d\n",
477 vf->priv->cfg_exp_w,
478 vf->priv->cfg_exp_h,
479 vf->priv->cfg_exp_x,
480 vf->priv->cfg_exp_y,
481 vf->priv->osd_enabled,
482 vf->priv->aspect,
483 vf->priv->round);
484 return 1;
487 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
488 static m_option_t vf_opts_fields[] = {
489 {"w", ST_OFF(cfg_exp_w), CONF_TYPE_INT, 0, 0 ,0, NULL},
490 {"h", ST_OFF(cfg_exp_h), CONF_TYPE_INT, 0, 0 ,0, NULL},
491 {"x", ST_OFF(cfg_exp_x), CONF_TYPE_INT, M_OPT_MIN, -1, 0, NULL},
492 {"y", ST_OFF(cfg_exp_y), CONF_TYPE_INT, M_OPT_MIN, -1, 0, NULL},
493 {"osd", ST_OFF(osd_enabled), CONF_TYPE_FLAG, 0 , 0, 1, NULL},
494 {"aspect", ST_OFF(aspect), CONF_TYPE_DOUBLE, M_OPT_MIN, 0, 0, NULL},
495 {"round", ST_OFF(round), CONF_TYPE_INT, M_OPT_MIN, 1, 0, NULL},
496 { NULL, NULL, 0, 0, 0, 0, NULL }
499 static const m_struct_t vf_opts = {
500 "expand",
501 sizeof(struct vf_priv_s),
502 &vf_priv_dflt,
503 vf_opts_fields
508 const vf_info_t vf_info_expand = {
509 #ifdef OSD_SUPPORT
510 "expanding & osd",
511 #else
512 "expanding",
513 #endif
514 "expand",
515 "A'rpi",
517 vf_open,
518 &vf_opts
521 //===========================================================================//