Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th September 2006, 23:49   #21  |  Link
Chainmax
Huh?
 
Chainmax's Avatar
 
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
I see, thanks .
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it.
Chainmax is offline   Reply With Quote
Old 24th February 2008, 05:19   #22  |  Link
zambelli
Doom9ing since 2001
 
zambelli's Avatar
 
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
Does anybody know how the size and strength and of the grain correlate to compression quantization? In other words, what size and strength of grain needs to be used in order for it to be preserved by H.264, VC-1 or MPEG-2 quantization?
zambelli is offline   Reply With Quote
Old 24th February 2008, 08:20   #23  |  Link
Sagittaire
Testeur de codecs
 
Sagittaire's Avatar
 
Join Date: May 2003
Location: France
Posts: 2,484
Quote:
Originally Posted by zambelli View Post
Does anybody know how the size and strength and of the grain correlate to compression quantization? In other words, what size and strength of grain needs to be used in order for it to be preserved by H.264, VC-1 or MPEG-2 quantization?
Well not simple because for example grain retention is not the same between AVC implementation. Anyway for all codec big grain size with low temporal complexity is alway more simple to compress. Small grain size with high temporal complexity is really hard to compress for all codec and particulary for AVC. In this case the better way to compress is degrain/regrain pre-process.
__________________
Le Sagittaire ... ;-)

1- Ateme AVC or x264
2- VP7 or RV10 only for anime
3- XviD, DivX or WMV9
Sagittaire is offline   Reply With Quote
Old 24th February 2008, 16:36   #24  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
Zambelli : i advise you to make a gradient of noise (stacking grey videos with noises of different variances), and encode that in intra at different quantizer. You'll easily see the quantizer at which a noise of variance X disappear (or the variance needed for a noise to remain at quantizer Y). Do remember that in AVC, quantizers are exponential, so you don't need to test standard deviation 1,2,3,4,5,6....,n but rather 1.12^n (1.12^6 = 2 is the key factor behind AVC's quantization).
__________________
Manao is offline   Reply With Quote
Old 31st May 2008, 20:46   #25  |  Link
McCauley
Registered User
 
Join Date: Nov 2006
Posts: 83
Hi foxyshadis,

thanks for this nice little PlugIn.
Would it be possible to add the option to add a grain pattern that is constant for a specified amount of frames and then changes to the next pattern for the specified length and so on?
I basically want to use it for something like GrainOptimizer does.

Regards and thanks in advance
McCauley
McCauley is offline   Reply With Quote
Old 31st May 2008, 22:04   #26  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
Just use trim.

Ex.

source=avisource("example.avi)
a=source.trim(0.500).addgrainc(blah)
b=source.trim(501,1000).addgrainc(blah)
c=.....
a+b+c+....
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 31st May 2008, 23:38   #27  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,389
More likely the aim is to change the noise pattern after only a few frames, ie. have like 2, 3, 4 or 5 frames with the same noise pattern, then switch to the next pattern, repeat, a.s.o.

Code:
x = 4   #  set the no. of frames with same noise pattern

clp   = last
grey  = BlankClip(clp,color_yuv=$808080)
noise = grey.AddGrainC(...)
noise = noise.changefps(framerate(clp)*x).trim(0,framecount(clp))

clp.mt_makediff(noise,U=3,V=3)  #  if it's only luma noise, use "U=2,V=2"
edit: "clip" => "clp", silly me.
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 1st June 2008 at 01:03.
Didée is offline   Reply With Quote
Old 2nd June 2008, 12:41   #28  |  Link
McCauley
Registered User
 
Join Date: Nov 2006
Posts: 83
Thanks Didée, that's what i need for my purposes! As always you had a few simple lines that did the trick!
But since this should'nt be closely as fast as the same thing in AddgrainC, i would be happy too see it implemented directly in AddgrainC.

Regards
McCauley
McCauley is offline   Reply With Quote
Old 3rd June 2008, 18:14   #29  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Test it, that shouldn't be noticeably slower unless you use timecodec. Since my computer was stolen last weekend, I won't be updating anything for a while, but the source is in the package.
foxyshadis is offline   Reply With Quote
Old 4th June 2008, 08:48   #30  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,441
Quote:
Originally Posted by foxyshadis View Post
Since my computer was stolen last weekend, [...]
o_O;;;

(Thank god my machine + radiator is so bulky they'd probably leave it behind; or should I fill it with concrete just to be sure?)
__________________
now playing: [artist] - [track] ([album])
Leak is offline   Reply With Quote
Old 5th June 2008, 20:21   #31  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
I'm wondering...

Why would one add chroma grain? I know it can be beneficial in certain cases or for artistic reasons to add luma grain, but chroma?

Just curious

Quote:
Since my computer was stolen last weekend
NO! That's terrible I hope you didn't loose any vital data. Best of luck getting things back in order!

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 30th September 2008, 12:06   #32  |  Link
pitch.fr
Didée 4 President
 
Join Date: Jun 2008
Posts: 239
just FIY, this plugin creates mad memory leaks above 2 threads in MT via ffdshow.

problem doesn't exist in v1.0 and v1.1...they strictly obey SetMemoryMax()

too bad you said noisegen was improved in v1.3, but 1.5 Gb of memory leak on 4 threads is a tad too much

GrainFactory() works fine w/ any version

Last edited by pitch.fr; 1st October 2008 at 14:56.
pitch.fr is offline   Reply With Quote
Old 20th April 2009, 16:45   #33  |  Link
swaaye
Registered User
 
Join Date: Jun 2004
Posts: 144
Can someone post AddGrainC v1.4 somewhere? The link to foxyshadis site is down. Mad googling has only gotten me v1.3.
swaaye is offline   Reply With Quote
Old 20th April 2009, 23:38   #34  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 957
It might not remain there but sure: http://users.telenet.be/darnley/avis...grainc_1.4.zip
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.
J_Darnley is offline   Reply With Quote
Old 20th April 2009, 23:54   #35  |  Link
swaaye
Registered User
 
Join Date: Jun 2004
Posts: 144
Quote:
Originally Posted by J_Darnley View Post
It might not remain there but sure: http://users.telenet.be/darnley/avis...grainc_1.4.zip
Thanks much

I put it up on megaupload too for anyone else in case your link dies
http://www.megaupload.com/?d=90EXJZGZ
swaaye is offline   Reply With Quote
Old 8th May 2010, 03:46   #36  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
I finally reinstalled a build environment and built a fix for a memory bug that mainly rears its head with MT. Thanks to leeperry for bugging me to fix it a while back.
foxyshadis is offline   Reply With Quote
Old 26th May 2010, 07:28   #37  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
yay, too awesome! I've been stuck w/ 1.1 since forever...what are the improvements exactly in the newer versions please? Could they make a noticeable difference in GrainFactory3()
Quote:
1.2 2006/06/06 Foxyshadis Supports YUY2, RGB. Fix cache mess.
1.3 2006/06/10 Foxyshadis Crashfix, noisegen optimization
1.4 2006/08/11 Foxyshadis Constant replaces seed, seed repeatable
what does "noisegen optimization" mean exactly? a million!
leeperry is offline   Reply With Quote
Old 27th May 2010, 00:44   #38  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
I believe that was from combining the two chroma noise planes into one, faster & less memory w/ no real difference. Wish I'd recognized the other major memory hog at the time.

I was also informed that this version won't run on Win2k, thanks to using VC 2010. Intentionally, since 2000 is out of support; I bet IanB's going to be hatin'. Damn it, Microsoft. Apparently there might be a way to patch it out, in the meantime cretindesalpes sent me a working fix built with 2005.
foxyshadis is offline   Reply With Quote
Old 27th May 2010, 22:34   #39  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
oh, so it's mostly about speed improvements making compromises on PQ? coz somehow I prefer 1.1 over 1.4 in GrainF3() I think...but maybe it's placebo, I'll try again several times.
leeperry is offline   Reply With Quote
Old 28th May 2010, 03:07   #40  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
The grain's the grain, I've never messed with how it gets created or combined with the frame. The only thing that I've ever changed is how it randomizes the per-frame, in order to support constant grain and defined grain even with random access, and enabling chroma (which is identical to luma in YV12) and RGB/YUY2 (which won't affect YV12 at all).

If you do prefer it, that might be because in 1.1, if a frame gets flushed out of cache it'll have a whole new randomized grainy image. I don't know how GrainF3 munges the image, but if it uses that fact, it will look different. It might be worth enlarging the possible grain size though.

The only thing pre-1.3 calculation would be good for is having different strength in the U and V planes... I can't think of any good reason why you would.
foxyshadis is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.