From: Marco Gittler Date: Wed, 6 Jan 2010 11:04:08 +0000 (+0100) Subject: user array with 100 values X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=99688dc834e7cdd60e6b5e8b178771b4202d4c44;p=mlt user array with 100 values yml file updated --- diff --git a/src/modules/oldfilm/filter_oldfilm.c b/src/modules/oldfilm/filter_oldfilm.c index 63e38cc2..511aaa84 100644 --- a/src/modules/oldfilm/filter_oldfilm.c +++ b/src/modules/oldfilm/filter_oldfilm.c @@ -24,16 +24,19 @@ #include #include static double sinarr[]={ - 0.0,0.125270029508395,0.2485664757507,0.3679468485397,0.481530353985902, - 0.587527525713892,0.684268417247276,0.770228911401552,0.84405473219009,0.904582780944473, - 0.95085946050647,0.982155698800724,0.997978435097294,0.99807838800221,0.982453982794196, - 0.951351376233828,0.90526057845426,0.844907733031696,0.771243676860277,0.685428960066342, - 0.588815561967795,0.48292559113694,0.369427305139443,0.250108827749629,0.12684997771773, - 0.00159265291648683,-0.123689763546002,-0.247023493251739,-0.366465458626247,-0.48013389541149, - -0.586237999170027,-0.683106138750633,-0.769212192222595,-0.84319959036574,-0.903902688919827, - -0.950365132881376,-0.981854923525203,-0.997875950775248,-0.998175809236459,-0.982749774749007, - -0.951840878815686,-0.905936079729926,-0.845758590726883,-0.772256486024771,-0.68658776426406, - -0.590102104664575,-0.484319603325524,-0.37090682467023,-0.251650545336281,-0.128429604166398,0.0}; +// 0.0,0.125270029508395,0.2485664757507,0.3679468485397,0.481530353985902, +// 0.587527525713892,0.684268417247276,0.770228911401552,0.84405473219009,0.904582780944473, +// 0.95085946050647,0.982155698800724,0.997978435097294,0.99807838800221,0.982453982794196, +// 0.951351376233828,0.90526057845426,0.844907733031696,0.771243676860277,0.685428960066342, +// 0.588815561967795,0.48292559113694,0.369427305139443,0.250108827749629,0.12684997771773, +// 0.00159265291648683,-0.123689763546002,-0.247023493251739,-0.366465458626247,-0.48013389541149, +// -0.586237999170027,-0.683106138750633,-0.769212192222595,-0.84319959036574,-0.903902688919827, +// -0.950365132881376,-0.981854923525203,-0.997875950775248,-0.998175809236459,-0.982749774749007, +// -0.951840878815686,-0.905936079729926,-0.845758590726883,-0.772256486024771,-0.68658776426406, +// -0.590102104664575,-0.484319603325524,-0.37090682467023,-0.251650545336281,-0.128429604166398,0.0 +0.0,0.0627587292804297,0.125270029508395,0.18728744713136,0.2485664757507,0.308865520098932,0.3679468485397,0.425577530335206,0.481530353985902,0.535584723021826,0.587527525713892,0.637153975276265,0.684268417247276,0.728685100865749,0.770228911401552,0.80873606055313,0.84405473219009,0.876045680894979,0.904582780944473,0.929553523565587,0.95085946050647,0.968416592172968,0.982155698800724,0.99202261335714,0.997978435097294,0.999999682931835,0.99807838800221,0.992222125098244,0.982453982794196,0.968812472421035,0.951351376233828,0.930139535372831,0.90526057845426,0.876812591860795,0.844907733031696,0.809671788277164,0.771243676860277,0.72977490330168,0.685428960066342,0.638380682987321,0.588815561967795,0.536929009678953,0.48292559113694,0.427018217196276,0.369427305139443,0.310379909672042,0.250108827749629,0.188851680765468,0.12684997771773,0.064348163049637,0.00159265291648683,-0.0611691363208864,-0.123689763546002,-0.18572273843423,-0.247023493251739,-0.307350347074556,-0.366465458626247,-0.424135763977612,-0.48013389541149,-0.534239077829989,-0.586237999170027,-0.635925651395529,-0.683106138750633,-0.727593450087328,-0.769212192222595,-0.807798281433749,-0.84319959036574,-0.875276547799941,-0.903902688919827,-0.928965153904073,-0.950365132881376,-0.968018255492714,-0.981854923525203,-0.991820585306115,-0.997875950775248,-0.999997146387718,-0.998175809236459,-0.992419120023356,-0.982749774749007,-0.969205895232745,-0.951840878815686,-0.930723187839362,-0.905936079729926,-0.877577278752084,-0.845758590726883,-0.810605462232336,-0.772256486024771,-0.730862854630786,-0.68658776426406,-0.639605771417098,-0.590102104664575,-0.538271934391528,-0.484319603325524,-0.428457820906457,-0.37090682467023,-0.311893511952568,-0.251650545336281,-0.190415435368805,-0.128429604166398,-0.0659374335968388,0.0, + +}; static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *format, int *width, int *height, int writable ) { @@ -81,9 +84,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format * int yend,ydiff; int unevendevelop_delta=0; if (uduration>0){ - float uval= sinarr[ ( ((int)position) % uduration) *50 / uduration ] ; + float uval= sinarr[ ( ((int)position) % uduration) * 100 / uduration ] ; unevendevelop_delta = uval * ( uval>0 ? udu : udd ); - printf("pos=%d delta =%d uval=%f\n", ( ((int)position) % uduration) *50 / uduration ,unevendevelop_delta ,uval); } diff --git a/src/modules/oldfilm/filter_oldfilm.yml b/src/modules/oldfilm/filter_oldfilm.yml index e0bdcaa6..71c6cb52 100644 --- a/src/modules/oldfilm/filter_oldfilm.yml +++ b/src/modules/oldfilm/filter_oldfilm.yml @@ -66,7 +66,7 @@ parameters: required: yes minimum: 0 maximum: 100 - default: 20 + default: 30 mutable: no widget: spinner @@ -82,3 +82,40 @@ parameters: mutable: no widget: spinner unit: % + + - identifier: unevendevelop_up + title: Unevendevelop up + type: integer + description: Makes image n values lighter + readonly: no + required: yes + minimum: 0 + maximum: 100 + default: 60 + mutable: no + widget: spinner + + - identifier: unevendevelop_down + title: Unevendevelop down + type: integer + description: Makes image n values darker + readonly: no + required: yes + minimum: 0 + maximum: 100 + default: 20 + mutable: no + widget: spinner + + - identifier: unevendevelop_duration + title: Unevendevelop Duration + type: integer + description: Time (in frames) of a up/down cycle + readonly: no + required: yes + minimum: 0 + maximum: 10000 + default: 70 + mutable: no + widget: spinner + unit: %