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.
26 #include "cpudetect.h"
29 #include "img_format.h"
32 #include "fmt-conversion.h"
35 #include "libswscale/swscale.h"
41 static struct vf_priv_s
{
46 struct SwsContext
*ctx
;
47 struct SwsContext
*ctx2
; //for interlaced slices only
48 unsigned char* palette
;
52 } const vf_priv_dflt
= {
55 {SWS_PARAM_DEFAULT
, SWS_PARAM_DEFAULT
},
62 //===========================================================================//
64 void sws_getFlagsAndFilterFromCmdLine(int *flags
, SwsFilter
**srcFilterParam
, SwsFilter
**dstFilterParam
);
66 static const unsigned int outfmt_list
[]={
88 // RGB and grayscale (Y8 and Y800):
115 * A list of preferred conversions, in order of preference.
116 * This should be used for conversions that e.g. involve no scaling
117 * or to stop vf_scale from choosing a conversion that has no
118 * fast assembler implementation.
120 static int preferred_conversions
[][2] = {
121 {IMGFMT_YUY2
, IMGFMT_UYVY
},
122 {IMGFMT_YUY2
, IMGFMT_422P
},
123 {IMGFMT_UYVY
, IMGFMT_YUY2
},
124 {IMGFMT_UYVY
, IMGFMT_422P
},
125 {IMGFMT_422P
, IMGFMT_YUY2
},
126 {IMGFMT_422P
, IMGFMT_UYVY
},
130 static unsigned int find_best_out(vf_instance_t
*vf
, int in_format
){
136 // find the best outfmt:
143 while (preferred_conversions
[j
][0] &&
144 preferred_conversions
[j
][0] != in_format
)
146 format
= preferred_conversions
[j
++][1];
147 // switch to standard list
152 format
= outfmt_list
[i
++];
155 ret
= vf_next_query_format(vf
, format
);
157 mp_msg(MSGT_VFILTER
,MSGL_DBG2
,"scale: query(%s) -> %d\n",vo_format_name(format
),ret
&3);
158 if(ret
&VFCAP_CSP_SUPPORTED_BY_HW
){
159 best
=format
; // no conversion -> bingo!
162 if(ret
&VFCAP_CSP_SUPPORTED
&& !best
)
163 best
=format
; // best with conversion
168 static int config(struct vf_instance
*vf
,
169 int width
, int height
, int d_width
, int d_height
,
170 unsigned int flags
, unsigned int outfmt
){
171 struct MPOpts
*opts
= vf
->opts
;
172 unsigned int best
=find_best_out(vf
, outfmt
);
175 int round_w
=0, round_h
=0;
177 SwsFilter
*srcFilter
, *dstFilter
;
178 enum PixelFormat dfmt
, sfmt
;
181 mp_msg(MSGT_VFILTER
,MSGL_WARN
,"SwScale: no supported outfmt found :(\n");
184 sfmt
= imgfmt2pixfmt(outfmt
);
185 if (outfmt
== IMGFMT_RGB8
|| outfmt
== IMGFMT_BGR8
) sfmt
= PIX_FMT_PAL8
;
186 dfmt
= imgfmt2pixfmt(best
);
188 vo_flags
=vf
->next
->query_format(vf
->next
,best
);
190 // scaling to dwidth*d_height, if all these TRUE:
192 // - no other sw/hw up/down scaling avail.
193 // - we're after postproc
194 // - user didn't set w:h
195 if(!(vo_flags
&VFCAP_POSTPROC
) && (flags
&4) &&
196 vf
->priv
->w
<0 && vf
->priv
->h
<0){ // -zoom
197 int x
=(vo_flags
&VFCAP_SWSCALE
) ? 0 : 1;
198 if(d_width
<width
|| d_height
<height
){
200 if(vo_flags
&VFCAP_HWSCALE_DOWN
) x
=0;
203 if(vo_flags
&VFCAP_HWSCALE_UP
) x
=0;
206 // user wants sw scaling! (-zoom)
208 vf
->priv
->h
=d_height
;
213 if((vf
->priv
->w
> width
) + (vf
->priv
->h
> height
) >= vf
->priv
->noup
){
219 if (vf
->priv
->w
<= -8) {
223 if (vf
->priv
->h
<= -8) {
228 if (vf
->priv
->w
< -3 || vf
->priv
->h
< -3 ||
229 (vf
->priv
->w
< -1 && vf
->priv
->h
< -1)) {
230 // TODO: establish a direct connection to the user's brain
231 // and find out what the heck he thinks MPlayer should do
232 // with this nonsense.
233 mp_msg(MSGT_VFILTER
, MSGL_ERR
, "SwScale: EUSERBROKEN Check your parameters, they make no sense!\n");
237 if (vf
->priv
->w
== -1)
239 if (vf
->priv
->w
== 0)
240 vf
->priv
->w
= d_width
;
242 if (vf
->priv
->h
== -1)
243 vf
->priv
->h
= height
;
244 if (vf
->priv
->h
== 0)
245 vf
->priv
->h
= d_height
;
247 if (vf
->priv
->w
== -3)
248 vf
->priv
->w
= vf
->priv
->h
* width
/ height
;
249 if (vf
->priv
->w
== -2)
250 vf
->priv
->w
= vf
->priv
->h
* d_width
/ d_height
;
252 if (vf
->priv
->h
== -3)
253 vf
->priv
->h
= vf
->priv
->w
* height
/ width
;
254 if (vf
->priv
->h
== -2)
255 vf
->priv
->h
= vf
->priv
->w
* d_height
/ d_width
;
258 vf
->priv
->w
= ((vf
->priv
->w
+ 8) / 16) * 16;
260 vf
->priv
->h
= ((vf
->priv
->h
+ 8) / 16) * 16;
262 // calculate the missing parameters:
264 case IMGFMT_YV12
: /* YV12 needs w & h rounded to 2 */
269 vf
->priv
->h
= (vf
->priv
->h
+ 1) & ~1;
270 case IMGFMT_YUY2
: /* YUY2 needs w rounded to 2 */
272 vf
->priv
->w
= (vf
->priv
->w
+ 1) & ~1;
275 mp_msg(MSGT_VFILTER
,MSGL_DBG2
,"SwScale: scaling %dx%d %s to %dx%d %s \n",
276 width
,height
,vo_format_name(outfmt
),
277 vf
->priv
->w
,vf
->priv
->h
,vo_format_name(best
));
280 if(vf
->priv
->ctx
) sws_freeContext(vf
->priv
->ctx
);
281 if(vf
->priv
->ctx2
)sws_freeContext(vf
->priv
->ctx2
);
284 sws_getFlagsAndFilterFromCmdLine(&int_sws_flags
, &srcFilter
, &dstFilter
);
285 int_sws_flags
|= vf
->priv
->v_chr_drop
<< SWS_SRC_V_CHR_DROP_SHIFT
;
286 int_sws_flags
|= vf
->priv
->accurate_rnd
* SWS_ACCURATE_RND
;
287 vf
->priv
->ctx
=sws_getContext(width
, height
>> vf
->priv
->interlaced
,
289 vf
->priv
->w
, vf
->priv
->h
>> vf
->priv
->interlaced
,
291 int_sws_flags
| get_sws_cpuflags(), srcFilter
, dstFilter
, vf
->priv
->param
);
292 if(vf
->priv
->interlaced
){
293 vf
->priv
->ctx2
=sws_getContext(width
, height
>> 1,
295 vf
->priv
->w
, vf
->priv
->h
>> 1,
297 int_sws_flags
| get_sws_cpuflags(), srcFilter
, dstFilter
, vf
->priv
->param
);
301 mp_msg(MSGT_VFILTER
,MSGL_WARN
,"Couldn't init SwScaler for this setup\n");
306 free(vf
->priv
->palette
);
307 vf
->priv
->palette
=NULL
;
310 /* set 332 palette for 8 bpp */
311 vf
->priv
->palette
=malloc(4*256);
312 for(i
=0; i
<256; i
++){
313 vf
->priv
->palette
[4*i
+0]=4*(i
>>6)*21;
314 vf
->priv
->palette
[4*i
+1]=4*((i
>>3)&7)*9;
315 vf
->priv
->palette
[4*i
+2]=4*((i
&7)&7)*9;
316 vf
->priv
->palette
[4*i
+3]=0;
320 /* set 332 palette for 8 bpp */
321 vf
->priv
->palette
=malloc(4*256);
322 for(i
=0; i
<256; i
++){
323 vf
->priv
->palette
[4*i
+0]=4*(i
&3)*21;
324 vf
->priv
->palette
[4*i
+1]=4*((i
>>2)&7)*9;
325 vf
->priv
->palette
[4*i
+2]=4*((i
>>5)&7)*9;
326 vf
->priv
->palette
[4*i
+3]=0;
331 vf
->priv
->palette
=malloc(4*16);
333 vf
->priv
->palette
[4*i
+0]=4*(i
&1)*63;
334 vf
->priv
->palette
[4*i
+1]=4*((i
>>1)&3)*21;
335 vf
->priv
->palette
[4*i
+2]=4*((i
>>3)&1)*63;
336 vf
->priv
->palette
[4*i
+3]=0;
341 vf
->priv
->palette
=malloc(4*16);
343 vf
->priv
->palette
[4*i
+0]=4*(i
>>3)*63;
344 vf
->priv
->palette
[4*i
+1]=4*((i
>>1)&3)*21;
345 vf
->priv
->palette
[4*i
+2]=4*((i
&1)&1)*63;
346 vf
->priv
->palette
[4*i
+3]=0;
351 if (!opts
->screen_size_x
&& !opts
->screen_size_y
352 && !(opts
->screen_size_xy
>= 0.001)) {
353 // Compute new d_width and d_height, preserving aspect
354 // while ensuring that both are >= output size in pixels.
355 if (vf
->priv
->h
* d_width
> vf
->priv
->w
* d_height
) {
356 d_width
= vf
->priv
->h
* d_width
/ d_height
;
357 d_height
= vf
->priv
->h
;
359 d_height
= vf
->priv
->w
* d_height
/ d_width
;
360 d_width
= vf
->priv
->w
;
362 //d_width=d_width*vf->priv->w/width;
363 //d_height=d_height*vf->priv->h/height;
365 return vf_next_config(vf
,vf
->priv
->w
,vf
->priv
->h
,d_width
,d_height
,flags
,best
);
368 static void start_slice(struct vf_instance
*vf
, mp_image_t
*mpi
){
369 // printf("start_slice called! flag=%d\n",mpi->flags&MP_IMGFLAG_DRAW_CALLBACK);
370 if(!(mpi
->flags
&MP_IMGFLAG_DRAW_CALLBACK
)) return; // shouldn't happen
371 // they want slices!!! allocate the buffer.
372 mpi
->priv
=vf
->dmpi
=vf_get_image(vf
->next
,vf
->priv
->fmt
,
373 // mpi->type, mpi->flags & (~MP_IMGFLAG_DRAW_CALLBACK),
374 MP_IMGTYPE_TEMP
, MP_IMGFLAG_ACCEPT_STRIDE
| MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
375 vf
->priv
->w
, vf
->priv
->h
);
378 static void scale(struct SwsContext
*sws1
, struct SwsContext
*sws2
, uint8_t *src
[MP_MAX_PLANES
], int src_stride
[MP_MAX_PLANES
],
379 int y
, int h
, uint8_t *dst
[MP_MAX_PLANES
], int dst_stride
[MP_MAX_PLANES
], int interlaced
){
380 uint8_t *src2
[MP_MAX_PLANES
]={src
[0], src
[1], src
[2], src
[3]};
383 if (src
[1] && !src
[2]){
386 pal2
[i
]= bswap_32(((uint32_t*)src
[1])[i
]);
393 uint8_t *dst2
[MP_MAX_PLANES
]={dst
[0], dst
[1], dst
[2], dst
[3]};
394 int src_stride2
[MP_MAX_PLANES
]={2*src_stride
[0], 2*src_stride
[1], 2*src_stride
[2], 2*src_stride
[3]};
395 int dst_stride2
[MP_MAX_PLANES
]={2*dst_stride
[0], 2*dst_stride
[1], 2*dst_stride
[2], 2*dst_stride
[3]};
397 sws_scale(sws1
, src2
, src_stride2
, y
>>1, h
>>1, dst2
, dst_stride2
);
398 for(i
=0; i
<MP_MAX_PLANES
; i
++){
399 src2
[i
] += src_stride
[i
];
400 dst2
[i
] += dst_stride
[i
];
402 sws_scale(sws2
, src2
, src_stride2
, y
>>1, h
>>1, dst2
, dst_stride2
);
404 sws_scale(sws1
, src2
, src_stride
, y
, h
, dst
, dst_stride
);
408 static void draw_slice(struct vf_instance
*vf
,
409 unsigned char** src
, int* stride
, int w
,int h
, int x
, int y
){
410 mp_image_t
*dmpi
=vf
->dmpi
;
412 mp_msg(MSGT_VFILTER
,MSGL_FATAL
,"vf_scale: draw_slice() called with dmpi=NULL (no get_image?)\n");
415 // printf("vf_scale::draw_slice() y=%d h=%d\n",y,h);
416 scale(vf
->priv
->ctx
, vf
->priv
->ctx2
, src
, stride
, y
, h
, dmpi
->planes
, dmpi
->stride
, vf
->priv
->interlaced
);
419 static int put_image(struct vf_instance
*vf
, mp_image_t
*mpi
, double pts
){
420 mp_image_t
*dmpi
=mpi
->priv
;
422 // printf("vf_scale::put_image(): processing whole frame! dmpi=%p flag=%d\n",
423 // dmpi, (mpi->flags&MP_IMGFLAG_DRAW_CALLBACK));
425 if(!(mpi
->flags
&MP_IMGFLAG_DRAW_CALLBACK
&& dmpi
)){
427 // hope we'll get DR buffer:
428 dmpi
=vf_get_image(vf
->next
,vf
->priv
->fmt
,
429 MP_IMGTYPE_TEMP
, MP_IMGFLAG_ACCEPT_STRIDE
| MP_IMGFLAG_PREFER_ALIGNED_STRIDE
,
430 vf
->priv
->w
, vf
->priv
->h
);
432 scale(vf
->priv
->ctx
, vf
->priv
->ctx
, mpi
->planes
,mpi
->stride
,0,mpi
->h
,dmpi
->planes
,dmpi
->stride
, vf
->priv
->interlaced
);
435 if(vf
->priv
->w
==mpi
->w
&& vf
->priv
->h
==mpi
->h
){
436 // just conversion, no scaling -> keep postprocessing data
437 // this way we can apply pp filter to non-yv12 source using scaler
438 vf_clone_mpi_attributes(dmpi
, mpi
);
441 if(vf
->priv
->palette
) dmpi
->planes
[1]=vf
->priv
->palette
; // export palette!
443 return vf_next_put_image(vf
,dmpi
, pts
);
446 static int control(struct vf_instance
*vf
, int request
, void* data
){
450 int brightness
, contrast
, saturation
, srcRange
, dstRange
;
455 case VFCTRL_GET_EQUALIZER
:
456 r
= sws_getColorspaceDetails(vf
->priv
->ctx
, &inv_table
, &srcRange
, &table
, &dstRange
, &brightness
, &contrast
, &saturation
);
460 if (!strcmp(eq
->item
,"brightness")) {
461 eq
->value
= ((brightness
*100) + (1<<15))>>16;
463 else if (!strcmp(eq
->item
,"contrast")) {
464 eq
->value
= (((contrast
*100) + (1<<15))>>16) - 100;
466 else if (!strcmp(eq
->item
,"saturation")) {
467 eq
->value
= (((saturation
*100) + (1<<15))>>16) - 100;
472 case VFCTRL_SET_EQUALIZER
:
473 r
= sws_getColorspaceDetails(vf
->priv
->ctx
, &inv_table
, &srcRange
, &table
, &dstRange
, &brightness
, &contrast
, &saturation
);
475 //printf("set %f %f %f\n", brightness/(float)(1<<16), contrast/(float)(1<<16), saturation/(float)(1<<16));
478 if (!strcmp(eq
->item
,"brightness")) {
479 brightness
= (( eq
->value
<<16) + 50)/100;
481 else if (!strcmp(eq
->item
,"contrast")) {
482 contrast
= (((eq
->value
+100)<<16) + 50)/100;
484 else if (!strcmp(eq
->item
,"saturation")) {
485 saturation
= (((eq
->value
+100)<<16) + 50)/100;
490 r
= sws_setColorspaceDetails(vf
->priv
->ctx
, inv_table
, srcRange
, table
, dstRange
, brightness
, contrast
, saturation
);
493 r
= sws_setColorspaceDetails(vf
->priv
->ctx2
, inv_table
, srcRange
, table
, dstRange
, brightness
, contrast
, saturation
);
502 return vf_next_control(vf
,request
,data
);
505 //===========================================================================//
507 // supported Input formats: YV12, I420, IYUV, YUY2, UYVY, BGR32, BGR24, BGR16, BGR15, RGB32, RGB24, Y8, Y800
509 static int query_format(struct vf_instance
*vf
, unsigned int fmt
){
510 if (!IMGFMT_IS_HWACCEL(fmt
) && imgfmt2pixfmt(fmt
) != PIX_FMT_NONE
) {
511 unsigned int best
=find_best_out(vf
, fmt
);
513 if(!best
) return 0; // no matching out-fmt
514 flags
=vf_next_query_format(vf
,best
);
515 if(!(flags
&(VFCAP_CSP_SUPPORTED
|VFCAP_CSP_SUPPORTED_BY_HW
))) return 0; // huh?
516 if(fmt
!=best
) flags
&=~VFCAP_CSP_SUPPORTED_BY_HW
;
517 // do not allow scaling, if we are before the PP fliter!
518 if(!(flags
&VFCAP_POSTPROC
)) flags
|=VFCAP_SWSCALE
;
521 return 0; // nomatching in-fmt
524 static void uninit(struct vf_instance
*vf
){
525 if(vf
->priv
->ctx
) sws_freeContext(vf
->priv
->ctx
);
526 if(vf
->priv
->ctx2
) sws_freeContext(vf
->priv
->ctx2
);
527 free(vf
->priv
->palette
);
531 static int vf_open(vf_instance_t
*vf
, char *args
){
533 vf
->start_slice
=start_slice
;
534 vf
->draw_slice
=draw_slice
;
535 vf
->put_image
=put_image
;
536 vf
->query_format
=query_format
;
537 vf
->control
= control
;
539 mp_msg(MSGT_VFILTER
,MSGL_V
,"SwScale params: %d x %d (-1=no scaling)\n",
546 //global sws_flags from the command line
550 static SwsFilter
*src_filter
= NULL
;
552 float sws_lum_gblur
= 0.0;
553 float sws_chr_gblur
= 0.0;
554 int sws_chr_vshift
= 0;
555 int sws_chr_hshift
= 0;
556 float sws_chr_sharpen
= 0.0;
557 float sws_lum_sharpen
= 0.0;
559 int get_sws_cpuflags(void){
561 (gCpuCaps
.hasMMX
? SWS_CPU_CAPS_MMX
: 0)
562 | (gCpuCaps
.hasMMX2
? SWS_CPU_CAPS_MMX2
: 0)
563 | (gCpuCaps
.has3DNow
? SWS_CPU_CAPS_3DNOW
: 0)
564 | (gCpuCaps
.hasAltiVec
? SWS_CPU_CAPS_ALTIVEC
: 0);
567 void sws_getFlagsAndFilterFromCmdLine(int *flags
, SwsFilter
**srcFilterParam
, SwsFilter
**dstFilterParam
)
569 static int firstTime
=1;
574 __asm__
volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions)
579 *flags
= SWS_PRINT_INFO
;
581 else if( mp_msg_test(MSGT_VFILTER
,MSGL_DBG2
) ) *flags
= SWS_PRINT_INFO
;
583 if(src_filter
) sws_freeFilter(src_filter
);
585 src_filter
= sws_getDefaultFilter(
586 sws_lum_gblur
, sws_chr_gblur
,
587 sws_lum_sharpen
, sws_chr_sharpen
,
588 sws_chr_hshift
, sws_chr_vshift
, verbose
>1);
592 case 0: *flags
|= SWS_FAST_BILINEAR
; break;
593 case 1: *flags
|= SWS_BILINEAR
; break;
594 case 2: *flags
|= SWS_BICUBIC
; break;
595 case 3: *flags
|= SWS_X
; break;
596 case 4: *flags
|= SWS_POINT
; break;
597 case 5: *flags
|= SWS_AREA
; break;
598 case 6: *flags
|= SWS_BICUBLIN
; break;
599 case 7: *flags
|= SWS_GAUSS
; break;
600 case 8: *flags
|= SWS_SINC
; break;
601 case 9: *flags
|= SWS_LANCZOS
; break;
602 case 10:*flags
|= SWS_SPLINE
; break;
603 default:*flags
|= SWS_BILINEAR
; break;
606 *srcFilterParam
= src_filter
;
607 *dstFilterParam
= NULL
;
610 // will use sws_flags & src_filter (from cmd line)
611 struct SwsContext
*sws_getContextFromCmdLine(int srcW
, int srcH
, int srcFormat
, int dstW
, int dstH
, int dstFormat
)
614 SwsFilter
*dstFilterParam
, *srcFilterParam
;
615 enum PixelFormat dfmt
, sfmt
;
617 dfmt
= imgfmt2pixfmt(dstFormat
);
618 sfmt
= imgfmt2pixfmt(srcFormat
);
619 if (srcFormat
== IMGFMT_RGB8
|| srcFormat
== IMGFMT_BGR8
) sfmt
= PIX_FMT_PAL8
;
620 sws_getFlagsAndFilterFromCmdLine(&flags
, &srcFilterParam
, &dstFilterParam
);
622 return sws_getContext(srcW
, srcH
, sfmt
, dstW
, dstH
, dfmt
, flags
| get_sws_cpuflags(), srcFilterParam
, dstFilterParam
, NULL
);
625 /// An example of presets usage
626 static const struct size_preset
{
629 } vf_size_presets_defs
[] = {
630 // TODO add more 'standard' resolutions
631 { "qntsc", 352, 240 },
632 { "qpal", 352, 288 },
633 { "ntsc", 720, 480 },
635 { "sntsc", 640, 480 },
636 { "spal", 768, 576 },
640 #define ST_OFF(f) M_ST_OFF(struct size_preset,f)
641 static const m_option_t vf_size_preset_fields
[] = {
642 {"w", ST_OFF(w
), CONF_TYPE_INT
, M_OPT_MIN
,1 ,0, NULL
},
643 {"h", ST_OFF(h
), CONF_TYPE_INT
, M_OPT_MIN
,1 ,0, NULL
},
644 { NULL
, NULL
, 0, 0, 0, 0, NULL
}
647 static const m_struct_t vf_size_preset
= {
649 sizeof(struct size_preset
),
651 vf_size_preset_fields
654 static const m_struct_t vf_opts
;
655 static const m_obj_presets_t size_preset
= {
656 &vf_size_preset
, // Input struct desc
657 &vf_opts
, // Output struct desc
658 vf_size_presets_defs
, // The list of presets
659 ST_OFF(name
) // At wich offset is the name field in the preset struct
664 #define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
665 static const m_option_t vf_opts_fields
[] = {
666 {"w", ST_OFF(w
), CONF_TYPE_INT
, M_OPT_MIN
,-11,0, NULL
},
667 {"h", ST_OFF(h
), CONF_TYPE_INT
, M_OPT_MIN
,-11,0, NULL
},
668 {"interlaced", ST_OFF(interlaced
), CONF_TYPE_INT
, M_OPT_RANGE
, 0, 1, NULL
},
669 {"chr-drop", ST_OFF(v_chr_drop
), CONF_TYPE_INT
, M_OPT_RANGE
, 0, 3, NULL
},
670 {"param" , ST_OFF(param
[0]), CONF_TYPE_DOUBLE
, M_OPT_RANGE
, 0.0, 100.0, NULL
},
671 {"param2", ST_OFF(param
[1]), CONF_TYPE_DOUBLE
, M_OPT_RANGE
, 0.0, 100.0, NULL
},
672 // Note that here the 2 field is NULL (ie 0)
673 // As we want this option to act on the option struct itself
674 {"presize", 0, CONF_TYPE_OBJ_PRESETS
, 0, 0, 0, &size_preset
},
675 {"noup", ST_OFF(noup
), CONF_TYPE_INT
, M_OPT_RANGE
, 0, 2, NULL
},
676 {"arnd", ST_OFF(accurate_rnd
), CONF_TYPE_FLAG
, 0, 0, 1, NULL
},
677 { NULL
, NULL
, 0, 0, 0, 0, NULL
}
680 static const m_struct_t vf_opts
= {
682 sizeof(struct vf_priv_s
),
687 const vf_info_t vf_info_scale
= {
696 //===========================================================================//