Re: [CinCV] [PATCH] Fixed interpolation in "Blur" video plugin
Hi. On Mon, Nov 21, 2011 at 11:23 PM, Johannes Sixt wrote: > Am 21.11.2011 19:41, schrieb Einar Rünkaru: >> Linear interoplation is not applicable to on/off switch >> Rounding interpolated blur radius value >> Fix proposed by Michal Fapso > > BTW, I would very much appreciate if you would include the complete > explanation why this fix is needed in the commit message, including the > symptoms that can be seen without the patch. For example: > > - > Do not interpolate on-off-switches for two reasons: > > - It does not make sense. To use the setting of the preceding keyframe > is the only thing that makes sense. > > - When both the previous and the next keyframe have the setting at one, > then the exact result of the numeric computation should be one as > well. However, the sum of prev_scale and next_scale can be slightly > less than one due to floatingpoint rounding. In such a case, the > value is truncated to zero, and causes the blur to be turned off > spuriously, causing flickering video in the interpolated range. Just the first reason is enough. Thogh for educational purposes the second reason can be added too: floating point calculation is always inexact - it has errors and the errors can show up in very weird places. Ok, i change the commit message. > > Also do not just truncate the interpolated value of the blur radius, > but round it. > > Fix proposed by Michal Fapso > -- > > - this->vertical = (int)(prev.vertical * prev_scale + next.vertical * > next_scale); > - this->horizontal = (int)(prev.horizontal * prev_scale + > next.horizontal * next_scale); > - this->radius = (int)(prev.radius * prev_scale + next.radius * > next_scale); > + this->vertical = prev.vertical; > + this->horizontal = prev.horizontal; > + this->radius = round(prev.radius * prev_scale + next.radius * > next_scale); > > Don't you see a warning here? There result of round() is still double > and should require a cast to int. No. There are well defined implict conversions that do not need casts. To improve the readability all unneeded suff must be removed. Casts can be used in places there one wants some non-standard conversion or where is no good default conversion. Float - int - double conversions are well defined. Einar ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Feature Films in Cinelerra
;) first of all, sorry to come late...and to give my 2 cents with no reading all thread also (basically no time to do that). Hi, hi! here is Valentina, linux videomaker since 2003. NB questions i put below you're not suppossed to answer meit's a way to anticipate problems you'll probably face, ok? I would like to know where I could find information about people editing feature films meant for theatrical release with Cinelerra. so, for example: which format for your film? Cinelerra doesn't handle all. Which is the format you normally use "for theatrical release" ? I'm ready for a little sweat when it comes to figure out and put together the best machine to run it on. What worries me, though is whether the software will be able to handle the task somehow easily. it depends on the taski mean a clean editing with the best quality footage is not difficult at all... I try to use as much free software as possible not just for economic reasons but to back the philosophy behind it. I would love to add Cinelerra to my professional kit. welli'll try to be short with 3 simple but basically tips: - you need a perfect workig OS - you need a perfect working version of cinelerra (avoid packaging: compile your own version) - you need to loose time and patience...since, gnu-linux or not, learn how to use a new tools takes time and patience Andaccording to my experience 1 on 10 is able to learn a new tool (overall if that new is a gnu-linx tool) simple because "it's not that easy". Hope you'll be in that 10%. all the best! Valentina Thanks a lot! Good work for you guys. This message was sent using IMP, the Internet Messaging Program. ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] Feature Films in Cinelerra
Le 22/11/2011 12:13, Valentina Messeri a écrit : - you need a perfect working version of cinelerra (avoid packaging: compile your own version) I definitively need a deep explanation on that one! Does that comment deals with cooperation between cinelerra and the different external codecs libs? What else? -- Nicolas Ecarnot ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] [PATCH] Fixed interpolation in "Blur" video plugin
Hi New version with changed commit message is attached Einar From dcdaa0575aac460809528761bb5d748141164aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Einar=20R=C3=BCnkaru?= Date: Mon, 21 Nov 2011 19:55:40 +0200 Subject: [PATCH] Fixed interpolation in "Blur" video plugin Do not interpolate on-off-switches for two reasons: - It does not make sense. To use the setting of the preceding keyframe is the only thing that makes sense. - When both the previous and the next keyframe have the setting at one, then the exact result of the numeric computation should be one as well. However, the sum of prev_scale and next_scale can be slightly less than one due to floatingpoint rounding. In such a case, the value is truncated to zero, and causes the blur to be turned off spuriously, causing flickering video in the interpolated range. Also do not just truncate the interpolated value of the blur radius, but round it. Fix proposed by Michal Fapso --- plugins/blur/blur.C |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/blur/blur.C b/plugins/blur/blur.C index fff9572..5505577 100644 --- a/plugins/blur/blur.C +++ b/plugins/blur/blur.C @@ -79,9 +79,9 @@ void BlurConfig::interpolate(BlurConfig &prev, //printf("BlurConfig::interpolate %d %d %d\n", prev_frame, next_frame, current_frame); - this->vertical = (int)(prev.vertical * prev_scale + next.vertical * next_scale); - this->horizontal = (int)(prev.horizontal * prev_scale + next.horizontal * next_scale); - this->radius = (int)(prev.radius * prev_scale + next.radius * next_scale); + this->vertical = prev.vertical; + this->horizontal = prev.horizontal; + this->radius = round(prev.radius * prev_scale + next.radius * next_scale); a = prev.a; r = prev.r; g = prev.g; -- 1.7.0.4
Re: [CinCV] [PATCH] Fixed interpolation in "Blur" video plugin
Le 22/11/2011 21:25, Einar Rünkaru a écrit : Hi New version with changed commit message is attached Einar http://youtu.be/KwlNZWt6Uvg You people are great, you are responsive, passionate and are proving if needs be the superiority of open source spirit. Thank you. -- Nicolas Ecarnot ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
Re: [CinCV] [PATCH] Fixed interpolation in "Blur" video plugin
For those who want to code : the C41 plugin has some blurring code using the boxing algorithm http://en.wikipedia.org/wiki/Box_blur Cheers Edouard On 11/23/2011 11:19 AM, Nicolas Ecarnot wrote: Le 22/11/2011 21:25, Einar Rünkaru a écrit : Hi New version with changed commit message is attached Einar http://youtu.be/KwlNZWt6Uvg You people are great, you are responsive, passionate and are proving if needs be the superiority of open source spirit. Thank you. ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra
[CinCV] 5.1 audio
Hello All, so I am working on a project and I am using 5.1 audio. I have my channels setup in cinelerra like this 1. center 2. front left 3. front right 4 rear left 5. rear right 6. sub This renders out fine and the file plays like it is intended However when I edit the audio in cinelerra the audio channels outputs are all messed up. In cinelerra the channels play like this 1. left (not center) 2. right (not left) 3.rear left (not right) 4.rear right (not rear L) 5. center (not rear right) 6.sub. Any idea how to fix this? I am using cinelerra cv 2.2 with ALSA 32 bit on a ASUS 7.1 xnoar. All the channels are setup correctly in ubuntu (center is center, left is left, etc) ___ Cinelerra mailing list Cinelerra@skolelinux.no https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra