Ignore svn changes up to r30559
[mplayer/kovensky.git] / libmpcodecs / vf_expand.c
blobe39bbeda7f1cad371e245d5c317b4c85e1d5de0f
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 "help_mp.h"
29 #include "options.h"
31 #include "img_format.h"
32 #include "mp_image.h"
33 #include "vf.h"
35 #include "libvo/fastmemcpy.h"
36 #include "libavutil/avutil.h"
38 #ifdef OSD_SUPPORT
39 #include "libvo/sub.h"
40 #include "libvo/osd.h"
41 #endif
43 #include "m_option.h"
44 #include "m_struct.h"
46 static struct vf_priv_s {
47 // These four values are a backup of the values parsed from the command line.
48 // This is necessary so that we do not get a mess upon filter reinit due to
49 // e.g. aspect changes and with only aspect specified on the command line,
50 // where we would otherwise use the values calculated for a different aspect
51 // instead of recalculating them again.
52 int cfg_exp_w, cfg_exp_h;
53 int cfg_exp_x, cfg_exp_y;
54 int exp_w,exp_h;
55 int exp_x,exp_y;
56 int osd_enabled;
57 double aspect;
58 int round;
59 unsigned char* fb_ptr;
60 int passthrough;
61 int first_slice;
62 struct osd_state *osd;
63 } const vf_priv_dflt = {
64 -1,-1,
65 -1,-1,
66 -1,-1,
67 -1,-1,
69 0.,
71 NULL,
76 //===========================================================================//
77 #ifdef OSD_SUPPORT
79 static struct vf_instance* vf=NULL; // fixme (needs sub.c changes)
80 static int orig_w,orig_h;
82 static void remove_func_2(int x0,int y0, int w,int h){
83 // TODO: let's cleanup the place
84 //printf("OSD clear: %d;%d %dx%d \n",x0,y0,w,h);
85 vf_mpi_clear(vf->dmpi,x0,y0,w,h);
88 static void remove_func(int x0,int y0, int w,int h){
89 if(!vo_osd_changed_flag) return;
90 // split it to 4 parts:
91 if(y0<vf->priv->exp_y){
92 // it has parts above the image:
93 int y=y0+h;
94 if(y>vf->priv->exp_y) y=vf->priv->exp_y;
95 remove_func_2(x0,y0,w,y-y0);
96 if(y0+h<=vf->priv->exp_y) return;
97 h-=y-y0;y0=y;
99 if(y0+h>vf->priv->exp_y+orig_h){
100 // it has parts under the image:
101 int y=y0;
102 if(y<vf->priv->exp_y+orig_h) y=vf->priv->exp_y+orig_h;
103 remove_func_2(x0,y,w,y0+h-y);
104 if(y0>=vf->priv->exp_y+orig_h) return;
105 h=y-y0;
107 if(x0<vf->priv->exp_x){
108 // it has parts on the left side of the image:
109 int x=x0+w;
110 if(x>vf->priv->exp_x) x=vf->priv->exp_x;
111 remove_func_2(x0,y0,x-x0,h);
112 if(x0+w<=vf->priv->exp_x) return;
113 w-=x-x0;x0=x;
115 if(x0+w>vf->priv->exp_x+orig_w){
116 // it has parts on the right side of the image:
117 int x=x0;
118 if(x<vf->priv->exp_x+orig_w) x=vf->priv->exp_x+orig_w;
119 remove_func_2(x,y0,x0+w-x,h);
120 if(x0>=vf->priv->exp_x+orig_w) return;
121 w=x-x0;
125 static void draw_func(void *ctx, int x0,int y0, int w,int h,unsigned char* src, unsigned char *srca, int stride){
126 unsigned char* dst;
127 if(!vo_osd_changed_flag && vf->dmpi->planes[0]==vf->priv->fb_ptr){
128 // ok, enough to update the area inside the video, leave the black bands
129 // untouched!
130 if(x0<vf->priv->exp_x){
131 int tmp=vf->priv->exp_x-x0;
132 w-=tmp; src+=tmp; srca+=tmp; x0+=tmp;
134 if(y0<vf->priv->exp_y){
135 int tmp=vf->priv->exp_y-y0;
136 h-=tmp; src+=tmp*stride; srca+=tmp*stride; y0+=tmp;
138 if(x0+w>vf->priv->exp_x+orig_w){
139 w=vf->priv->exp_x+orig_w-x0;
141 if(y0+h>vf->priv->exp_y+orig_h){
142 h=vf->priv->exp_y+orig_h-y0;
145 if(w<=0 || h<=0) return; // nothing to do...
146 // printf("OSD redraw: %d;%d %dx%d \n",x0,y0,w,h);
147 dst=vf->dmpi->planes[0]+
148 vf->dmpi->stride[0]*y0+
149 (vf->dmpi->bpp>>3)*x0;
150 switch(vf->dmpi->imgfmt){
151 case IMGFMT_BGR15:
152 case IMGFMT_RGB15:
153 vo_draw_alpha_rgb15(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
154 break;
155 case IMGFMT_BGR16:
156 case IMGFMT_RGB16:
157 vo_draw_alpha_rgb16(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
158 break;
159 case IMGFMT_BGR24:
160 case IMGFMT_RGB24:
161 vo_draw_alpha_rgb24(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
162 break;
163 case IMGFMT_BGR32:
164 case IMGFMT_RGB32:
165 vo_draw_alpha_rgb32(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
166 break;
167 case IMGFMT_YV12:
168 case IMGFMT_I420:
169 case IMGFMT_IYUV:
170 case IMGFMT_YVU9:
171 case IMGFMT_IF09:
172 case IMGFMT_Y800:
173 case IMGFMT_Y8:
174 vo_draw_alpha_yv12(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
175 break;
176 case IMGFMT_YUY2:
177 vo_draw_alpha_yuy2(w,h,src,srca,stride,dst,vf->dmpi->stride[0]);
178 break;
179 case IMGFMT_UYVY:
180 vo_draw_alpha_yuy2(w,h,src,srca,stride,dst+1,vf->dmpi->stride[0]);
181 break;
185 static void draw_osd(struct vf_instance* vf_,int w,int h){
186 vf=vf_;orig_w=w;orig_h=h;
187 // printf("======================================\n");
188 if(vf->priv->exp_w!=w || vf->priv->exp_h!=h ||
189 vf->priv->exp_x || vf->priv->exp_y){
190 // yep, we're expanding image, not just copy.
191 if(vf->dmpi->planes[0]!=vf->priv->fb_ptr){
192 // double buffering, so we need full clear :(
193 if (vf->priv->exp_y > 0)
194 remove_func_2(0,0,vf->priv->exp_w,vf->priv->exp_y);
195 if (vf->priv->exp_y+h < vf->priv->exp_h)
196 remove_func_2(0,vf->priv->exp_y+h,vf->priv->exp_w,vf->priv->exp_h-h-vf->priv->exp_y);
197 if (vf->priv->exp_x > 0)
198 remove_func_2(0,vf->priv->exp_y,vf->priv->exp_x,h);
199 if (vf->priv->exp_x+w < vf->priv->exp_w)
200 remove_func_2(vf->priv->exp_x+w,vf->priv->exp_y,vf->priv->exp_w-w-vf->priv->exp_x,h);
201 } else {
202 // partial clear:
203 osd_remove_text(vf->priv->osd, vf->priv->exp_w,vf->priv->exp_h,remove_func);
206 osd_draw_text(vf->priv->osd, vf->priv->exp_w,vf->priv->exp_h,draw_func, NULL);
207 // save buffer pointer for double buffering detection - yes, i know it's
208 // ugly method, but note that codecs with DR support does the same...
209 if(vf->dmpi)
210 vf->priv->fb_ptr=vf->dmpi->planes[0];
213 #endif
214 //===========================================================================//
216 static int config(struct vf_instance* vf,
217 int width, int height, int d_width, int d_height,
218 unsigned int flags, unsigned int outfmt)
220 struct MPOpts *opts = vf->opts;
221 if(outfmt == IMGFMT_MPEGPES) {
222 vf->priv->passthrough = 1;
223 return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
225 if (outfmt == IMGFMT_IF09) return 0;
226 vf->priv->exp_x = vf->priv->cfg_exp_x;
227 vf->priv->exp_y = vf->priv->cfg_exp_y;
228 vf->priv->exp_w = vf->priv->cfg_exp_w;
229 vf->priv->exp_h = vf->priv->cfg_exp_h;
230 // calculate the missing parameters:
231 #if 0
232 if(vf->priv->exp_w<width) vf->priv->exp_w=width;
233 if(vf->priv->exp_h<height) vf->priv->exp_h=height;
234 #else
235 if ( vf->priv->exp_w == -1 ) vf->priv->exp_w=width;
236 else if (vf->priv->exp_w < -1 ) vf->priv->exp_w=width - vf->priv->exp_w;
237 else if ( vf->priv->exp_w<width ) vf->priv->exp_w=width;
238 if ( vf->priv->exp_h == -1 ) vf->priv->exp_h=height;
239 else if ( vf->priv->exp_h < -1 ) vf->priv->exp_h=height - vf->priv->exp_h;
240 else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
241 #endif
242 if (vf->priv->aspect) {
243 float adjusted_aspect = vf->priv->aspect;
244 adjusted_aspect *= ((double)width/height) / ((double)d_width/d_height);
245 if (vf->priv->exp_h < vf->priv->exp_w / adjusted_aspect) {
246 vf->priv->exp_h = vf->priv->exp_w / adjusted_aspect + 0.5;
247 } else {
248 vf->priv->exp_w = vf->priv->exp_h * adjusted_aspect + 0.5;
251 if (vf->priv->round > 1) { // round up.
252 vf->priv->exp_w = (1 + (vf->priv->exp_w - 1) / vf->priv->round) * vf->priv->round;
253 vf->priv->exp_h = (1 + (vf->priv->exp_h - 1) / vf->priv->round) * vf->priv->round;
256 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;
257 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;
258 vf->priv->fb_ptr=NULL;
260 if(!opts->screen_size_x && !opts->screen_size_y){
261 d_width=d_width*vf->priv->exp_w/width;
262 d_height=d_height*vf->priv->exp_h/height;
264 return vf_next_config(vf,vf->priv->exp_w,vf->priv->exp_h,d_width,d_height,flags,outfmt);
267 // there are 4 cases:
268 // codec --DR--> expand --DR--> vo
269 // codec --DR--> expand -copy-> vo
270 // codec -copy-> expand --DR--> vo
271 // codec -copy-> expand -copy-> vo (worst case)
273 static void get_image(struct vf_instance* vf, mp_image_t *mpi){
274 // if(mpi->type==MP_IMGTYPE_IPB) return; // not yet working
275 #ifdef OSD_SUPPORT
276 if(vf->priv->osd_enabled && (mpi->flags&MP_IMGFLAG_PRESERVE)){
277 // check if we have to render osd!
278 osd_update(vf->priv->osd, vf->priv->exp_w, vf->priv->exp_h);
279 if(vo_osd_check_range_update(vf->priv->exp_x,vf->priv->exp_y,
280 vf->priv->exp_x+mpi->w,vf->priv->exp_y+mpi->h)) return;
282 #endif
283 if(vf->priv->exp_w==mpi->width ||
284 (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH)) ){
285 // try full DR !
286 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
287 mpi->type, mpi->flags,
288 FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x),
289 FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
290 #if 1
291 if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) &&
292 !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){
293 mp_tmsg(MSGT_VFILTER, MSGL_INFO, "Full DR not possible, trying SLICES instead!\n");
294 return;
296 #endif
297 // set up mpi as a cropped-down image of dmpi:
298 if(mpi->flags&MP_IMGFLAG_PLANAR){
299 mpi->planes[0]=vf->dmpi->planes[0]+
300 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x;
301 mpi->planes[1]=vf->dmpi->planes[1]+
302 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[1]+(vf->priv->exp_x>>mpi->chroma_x_shift);
303 mpi->planes[2]=vf->dmpi->planes[2]+
304 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[2]+(vf->priv->exp_x>>mpi->chroma_x_shift);
305 mpi->stride[1]=vf->dmpi->stride[1];
306 mpi->stride[2]=vf->dmpi->stride[2];
307 } else {
308 mpi->planes[0]=vf->dmpi->planes[0]+
309 vf->priv->exp_y*vf->dmpi->stride[0]+
310 vf->priv->exp_x*(vf->dmpi->bpp/8);
312 mpi->stride[0]=vf->dmpi->stride[0];
313 mpi->width=vf->dmpi->width;
314 mpi->flags|=MP_IMGFLAG_DIRECT;
315 mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK;
316 // vf->dmpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK;
320 static void start_slice(struct vf_instance* vf, mp_image_t *mpi){
321 // printf("start_slice called! flag=%d\n",mpi->flags&MP_IMGFLAG_DRAW_CALLBACK);
322 if(!vf->next->draw_slice){
323 mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK;
324 return;
326 // they want slices!!! allocate the buffer.
327 if(!mpi->priv)
328 mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
329 // MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE,
330 MP_IMGTYPE_TEMP, mpi->flags,
331 FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x),
332 FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y));
333 if(!(vf->dmpi->flags&MP_IMGFLAG_DRAW_CALLBACK))
334 mp_tmsg(MSGT_VFILTER, MSGL_WARN, "WARNING! Next filter doesn't support SLICES, get ready for sig11...\n"); // shouldn't happen.
335 vf->priv->first_slice = 1;
338 static void draw_top_blackbar_slice(struct vf_instance* vf,
339 unsigned char** src, int* stride, int w,int h, int x, int y){
340 if(vf->priv->exp_y>0 && y == 0) {
341 vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride,
342 vf->dmpi->w,vf->priv->exp_y,0,0);
347 static void draw_bottom_blackbar_slice(struct vf_instance* vf,
348 unsigned char** src, int* stride, int w,int h, int x, int y){
349 if(vf->priv->exp_y+vf->h<vf->dmpi->h && y+h == vf->h) {
350 unsigned char *src2[MP_MAX_PLANES];
351 src2[0] = vf->dmpi->planes[0]
352 + (vf->priv->exp_y+vf->h)*vf->dmpi->stride[0];
353 if(vf->dmpi->flags&MP_IMGFLAG_PLANAR){
354 src2[1] = vf->dmpi->planes[1]
355 + ((vf->priv->exp_y+vf->h)>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[1];
356 src2[2] = vf->dmpi->planes[2]
357 + ((vf->priv->exp_y+vf->h)>>vf->dmpi->chroma_y_shift)*vf->dmpi->stride[2];
358 } else {
359 src2[1] = vf->dmpi->planes[1]; // passthrough rgb8 palette
361 vf_next_draw_slice(vf, src2, vf->dmpi->stride,
362 vf->dmpi->w,vf->dmpi->h-(vf->priv->exp_y+vf->h),
363 0,vf->priv->exp_y+vf->h);
367 static void draw_slice(struct vf_instance* vf,
368 unsigned char** src, int* stride, int w,int h, int x, int y){
369 // printf("draw_slice() called %d at %d\n",h,y);
371 if (y == 0 && y+h == vf->h) {
372 // special case - only one slice
373 draw_top_blackbar_slice(vf, src, stride, w, h, x, y);
374 vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y);
375 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y);
376 return;
378 if (vf->priv->first_slice) {
379 draw_top_blackbar_slice(vf, src, stride, w, h, x, y);
380 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y);
382 vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y);
383 if (!vf->priv->first_slice) {
384 draw_top_blackbar_slice(vf, src, stride, w, h, x, y);
385 draw_bottom_blackbar_slice(vf, src, stride, w, h, x, y);
387 vf->priv->first_slice = 0;
390 static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
391 if (vf->priv->passthrough) {
392 mp_image_t *dmpi = vf_get_image(vf->next, IMGFMT_MPEGPES,
393 MP_IMGTYPE_EXPORT, 0, mpi->w, mpi->h);
394 dmpi->planes[0]=mpi->planes[0];
395 return vf_next_put_image(vf,dmpi, pts);
398 if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
399 vf->dmpi=mpi->priv;
400 if(!vf->dmpi) { mp_tmsg(MSGT_VFILTER, MSGL_WARN, "Why do we get NULL??\n"); return 0; }
401 mpi->priv=NULL;
402 #ifdef OSD_SUPPORT
403 if(vf->priv->osd_enabled) draw_osd(vf,mpi->w,mpi->h);
404 #endif
405 // we've used DR, so we're ready...
406 if(!(mpi->flags&MP_IMGFLAG_PLANAR))
407 vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
408 return vf_next_put_image(vf,vf->dmpi, pts);
411 // hope we'll get DR buffer:
412 vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
413 MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
414 vf->priv->exp_w, vf->priv->exp_h);
416 // copy mpi->dmpi...
417 if(mpi->flags&MP_IMGFLAG_PLANAR){
418 memcpy_pic(vf->dmpi->planes[0]+
419 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x,
420 mpi->planes[0], mpi->w, mpi->h,
421 vf->dmpi->stride[0],mpi->stride[0]);
422 memcpy_pic(vf->dmpi->planes[1]+
423 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[1]+(vf->priv->exp_x>>mpi->chroma_x_shift),
424 mpi->planes[1], (mpi->w>>mpi->chroma_x_shift), (mpi->h>>mpi->chroma_y_shift),
425 vf->dmpi->stride[1],mpi->stride[1]);
426 memcpy_pic(vf->dmpi->planes[2]+
427 (vf->priv->exp_y>>mpi->chroma_y_shift)*vf->dmpi->stride[2]+(vf->priv->exp_x>>mpi->chroma_x_shift),
428 mpi->planes[2], (mpi->w>>mpi->chroma_x_shift), (mpi->h>>mpi->chroma_y_shift),
429 vf->dmpi->stride[2],mpi->stride[2]);
430 } else {
431 memcpy_pic(vf->dmpi->planes[0]+
432 vf->priv->exp_y*vf->dmpi->stride[0]+vf->priv->exp_x*(vf->dmpi->bpp/8),
433 mpi->planes[0], mpi->w*(vf->dmpi->bpp/8), mpi->h,
434 vf->dmpi->stride[0],mpi->stride[0]);
435 vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
437 #ifdef OSD_SUPPORT
438 if(vf->priv->osd_enabled) draw_osd(vf,mpi->w,mpi->h);
439 #endif
440 return vf_next_put_image(vf,vf->dmpi, pts);
443 //===========================================================================//
445 static int control(struct vf_instance* vf, int request, void* data){
446 #ifdef OSD_SUPPORT
447 switch(request){
448 case VFCTRL_SET_OSD_OBJ:
449 vf->priv->osd = data;
450 break;
451 case VFCTRL_DRAW_OSD:
452 if(vf->priv->osd_enabled) return CONTROL_TRUE;
453 break;
454 case VFCTRL_REDRAW_OSD:
455 if (vf->priv->osd_enabled)
456 return false;
457 break;
459 #endif
460 return vf_next_control(vf,request,data);
463 static int query_format(struct vf_instance* vf, unsigned int fmt){
464 return vf_next_query_format(vf,fmt);
467 static int open(vf_instance_t *vf, char* args){
468 vf->config=config;
469 vf->control=control;
470 vf->query_format=query_format;
471 vf->start_slice=start_slice;
472 vf->draw_slice=draw_slice;
473 vf->get_image=get_image;
474 vf->put_image=put_image;
475 mp_msg(MSGT_VFILTER, MSGL_INFO, "Expand: %d x %d, %d ; %d, osd: %d, aspect: %f, round: %d\n",
476 vf->priv->cfg_exp_w,
477 vf->priv->cfg_exp_h,
478 vf->priv->cfg_exp_x,
479 vf->priv->cfg_exp_y,
480 vf->priv->osd_enabled,
481 vf->priv->aspect,
482 vf->priv->round);
483 return 1;
486 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
487 static m_option_t vf_opts_fields[] = {
488 {"w", ST_OFF(cfg_exp_w), CONF_TYPE_INT, 0, 0 ,0, NULL},
489 {"h", ST_OFF(cfg_exp_h), CONF_TYPE_INT, 0, 0 ,0, NULL},
490 {"x", ST_OFF(cfg_exp_x), CONF_TYPE_INT, M_OPT_MIN, -1, 0, NULL},
491 {"y", ST_OFF(cfg_exp_y), CONF_TYPE_INT, M_OPT_MIN, -1, 0, NULL},
492 {"osd", ST_OFF(osd_enabled), CONF_TYPE_FLAG, 0 , 0, 1, NULL},
493 {"aspect", ST_OFF(aspect), CONF_TYPE_DOUBLE, M_OPT_MIN, 0, 0, NULL},
494 {"round", ST_OFF(round), CONF_TYPE_INT, M_OPT_MIN, 1, 0, NULL},
495 { NULL, NULL, 0, 0, 0, 0, NULL }
498 static const m_struct_t vf_opts = {
499 "expand",
500 sizeof(struct vf_priv_s),
501 &vf_priv_dflt,
502 vf_opts_fields
507 const vf_info_t vf_info_expand = {
508 #ifdef OSD_SUPPORT
509 "expanding & osd",
510 #else
511 "expanding",
512 #endif
513 "expand",
514 "A'rpi",
516 open,
517 &vf_opts
520 //===========================================================================//