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 Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th April 2016, 19:43   #1041  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
official mvtools v2.5.11.20 has been released and pinterf did some fix too https://github.com/pinterf/mvtools/tree/mvtools-pfmod

can we have new mvtools mod16 ?
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 10th April 2016, 20:14   #1042  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
Quote:
Originally Posted by real.finder View Post
official mvtools v2.5.11.20 has been released and pinterf did some fix too https://github.com/pinterf/mvtools/tree/mvtools-pfmod

can we have new mvtools mod16 ?
pinterf's mod is based on mvtools v2.6.0.5 so it already includes mod16.
Reel.Deel is offline   Reply With Quote
Old 10th April 2016, 20:24   #1043  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Reel.Deel View Post
pinterf's mod is based on mvtools v2.6.0.5 so it already includes mod16.
but it don't have official mvtools v2.5.11.20 changes

and not work with avs 2.5 (some people still use it)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 10th April 2016, 20:44   #1044  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by real.finder View Post
but it don't have official mvtools v2.5.11.20 changes

and not work with avs 2.5 (some people still use it)
Hmm, so I just upgraded the wrong AviSynth mvtools?! LOL. Guys, please, don't confuse me. It's hard enough to keep everything apart as it is.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 11th April 2016, 00:03   #1045  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
I came up with the my mod mainly because of the 2.6 Api and to fix some memory exceptions of the x64 version. Really not big modifications. At about the same time Physic came back to business after many years and fixed some other things with the 2.5.11.20 version. But this is for 32 bit only. Note that the 2.6.0.5 version (and thus my mod also) is still 8 bit except the output of mdegrain. Looking at the complexity of the code I think it would be easier to backport the plugin from VapourSynth when we need a true (stacked )16 bit or even float! (Avisynth+ 2017 ) version.
pinterf is offline   Reply With Quote
Old 11th April 2016, 01:21   #1046  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Well, looks like your modded version works great! Thanks for all your hard work!
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 15th April 2016, 18:48   #1047  |  Link
James Freeman
Registered User
 
Join Date: Sep 2013
Posts: 919
With this line:
Quote:
Dither_convert_rgb_to_yuv(matrix="2020")


What can be the cause??
__________________
System: i7 3770K, GTX660, Win7 64bit, Panasonic ST60, Dell U2410.
James Freeman is offline   Reply With Quote
Old 15th April 2016, 21:03   #1048  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by James Freeman View Post
With this line:



What can be the cause??
Either Avisynth cannot find dither.dll or you're missing some MS runtime libraries (or both).
You can troubleshoot your Avisynth install with this tool.

Also, post your full script.
Groucho2004 is offline   Reply With Quote
Old 15th April 2016, 22:37   #1049  |  Link
James Freeman
Registered User
 
Join Date: Sep 2013
Posts: 919
Quote:
Originally Posted by Groucho2004 View Post
Either Avisynth cannot find dither.dll or you're missing some MS runtime libraries (or both).
You can troubleshoot your Avisynth install with this tool.

Also, post your full script.
My Script:
Quote:
AVISource("D:\renderin\signpost.avi",audio=false).AssumeFPS(25,1)
Dither_convert_rgb_to_yuv(matrix="2020")
That's it.

Am I supposed to copy the files from the Win32 directory to the same with the .avsi file?
__________________
System: i7 3770K, GTX660, Win7 64bit, Panasonic ST60, Dell U2410.
James Freeman is offline   Reply With Quote
Old 15th April 2016, 22:41   #1050  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by James Freeman View Post
Am I supposed to copy the files from the Win32 directory to the same with the .avsi file?
Correct.
Groucho2004 is offline   Reply With Quote
Old 15th April 2016, 22:51   #1051  |  Link
James Freeman
Registered User
 
Join Date: Sep 2013
Posts: 919
It works.
__________________
System: i7 3770K, GTX660, Win7 64bit, Panasonic ST60, Dell U2410.
James Freeman is offline   Reply With Quote
Old 2nd June 2016, 08:53   #1052  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
So, I was told in another thread that this is the proper way to use dither tools to change the color matrix whilst downscaling:
Code:
Dither_convert_8_to_16 ()
Dither_resize16 (640, 480, csp="YV24") # change to the desired dimensions
Dither_convert_yuv_to_rgb (matrix="709", output="rgb48y", lsb_in=true)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
Dither_convert_rgb_to_yuv (r, g, b, matrix="601", lsb=false, mode=0, output="YV12")
Two questions about this:
First, why is the downscale being done here as opposed to just using AviSynth's resizers at the very end of the script? What benefit comes from doing this? Having less to process for the color matrix conversion?
Second, why process in rgb48y?
I'm not asking because I'm skeptical. I just would like to know how this works, as I'm new to Dither.
bilditup1 is offline   Reply With Quote
Old 2nd June 2016, 22:18   #1053  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
maybe the resize can be done this way if you don't want Dither_convert_yuv_to_rgb to upscale chroma planes, you can use chromak="spline36" to reduce the chroma blurring too, but differences will be negible.
You can use Dither_resize16 at the end too, it will be better than internal avs resizers coz works with better input precision (I don't know for avs+).

internally conversion between colorimetries is done using rgb coz those define how to convert yuv to/from rgb

I don't know how well colormatrix will do, sure it can't get/output at 16bit precision, but I hope all calculation are done internally in float/double, not integer as MisterX said.
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 4th June 2016, 01:04   #1054  |  Link
bilditup1
Registered User
 
bilditup1's Avatar
 
Join Date: Feb 2004
Location: NYC
Posts: 124
Quote:
Originally Posted by Motenai Yoda View Post
...
Thanks for taking the time to explain.
bilditup1 is offline   Reply With Quote
Old 6th June 2016, 21:04   #1055  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
Quote:
Originally Posted by bilditup1 View Post
First, why is the downscale being done here as opposed to just using AviSynth's resizers at the very end of the script? What benefit comes from doing this? Having less to process for the color matrix conversion?
Quote:
Originally Posted by Motenai Yoda View Post
maybe the resize can be done this way if you don't want Dither_convert_yuv_to_rgb to upscale chroma planes, you can use chromak="spline36" to reduce the chroma blurring too, but differences will be negible.
You can use Dither_resize16 at the end too, it will be better than internal avs resizers coz works with better input precision (I don't know for avs+).
AVS and AVS+ both use 16-bit fixed point precision internally (iirc), but they accept and produce only 8-bit output. By using Dither_resize16, you get less rounding error, and if you want an 8-bit output, you now also have the option to apply error diffusion to make it all pretty and dithered. (The posted script does have error diffusion disabled for some reason, though. Bizarre.)

And yes, the downscaling is done right after padding the input to 16-bit as this reduces the number of samples needed to process, thus increasing the speed. Leaving downscaling to the end wouldn't affect accuracy much (might even be very slightly better?), but would be considerably slower depending on the downscaling factor.

The YCbCr→RGB conversion requires the chroma subsampling to be undone at some point, so by converting to 4:4:4 directly in Dither_resize16, we avoid unnecessary resampling, which is both faster and more accurate.
__________________
Say no to AviSynth 2.5.8 and DirectShowSource!
colours is offline   Reply With Quote
Old 6th June 2016, 23:00   #1056  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
Quote:
Originally Posted by colours View Post
The YCbCr→RGB conversion requires the chroma subsampling to be undone at some point, so by converting to 4:4:4 directly in Dither_resize16, we avoid unnecessary resampling, which is both faster and more accurate.
for me doing this way is definitively better, but I agree slower
Code:
Dither_convert_8_to_16 ()
Dither_convert_yuv_to_rgb (matrix="709", output="rgb48y", lsb_in=true, chromak="spline36")
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
Dither_convert_rgb_to_yuv (r, g, b, matrix="601", output="YV24")
Dither_resize16 (640, 480, csp="YV12") # change to the desired dimensions
ditherpost()
PS for cretindesalpes
I was trying this and that with paris clip from Derf's, and I notice some values in the V channel (the yellow papers on the table, the orange of the ball) change, even without resize and the same matrix, just doing yuv->rgb->yuv

ps2 it also happen with avs internal converttorgb, but less
__________________
powered by Google Translator

Last edited by Motenai Yoda; 7th June 2016 at 15:35.
Motenai Yoda is offline   Reply With Quote
Old 7th June 2016, 16:23   #1057  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,666
Quote:
Originally Posted by colours View Post
(The posted script does have error diffusion disabled for some reason, though. Bizarre.)
The script started out as just a sample from the documentation, forgot to change it.


Quote:
Originally Posted by Motenai Yoda View Post
for me doing this way is definitively better, but I agree slower
Regarding the script in post #1055, if you add chromak="spline36" to Dither_convert_rgb_to_yuv then you get visually the same result as your script above but much faster (around 70% in my tests).
Here's a comparison between the two methods: 1x | 3x
Here's the original picture I used in the script below, I also change the dithering mode to satisfy colours.


Code:
FFImageSource("IMG_4850.png")
Dither_convert_rgb_to_yuv (matrix="709", output="YV12", lsb=true)
o = last

o.Dither_resize16 (640, 360, csp="YV24") # change to the desired dimensions
Dither_convert_yuv_to_rgb (matrix="709", output="rgb48y", lsb_in=true)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
Dither_convert_rgb_to_yuv (r, g, b, matrix="601", lsb=true, output="YV12", chromak="spline36")
a = last

o.Dither_convert_yuv_to_rgb (matrix="709", output="rgb48y", lsb_in=true, chromak="spline36")
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
Dither_convert_rgb_to_yuv (r, g, b, matrix="601", output="YV24")
Dither_resize16 (640, 360, csp="YV12") # change to the desired dimensions
b = last

a = a.Dither_convert_yuv_to_rgb (matrix="601", output="rgb24", lsb_in=true, chromak="spline36", mode=6).Subtitle("A")
b = b.Dither_convert_yuv_to_rgb (matrix="601", output="rgb24", lsb_in=true, chromak="spline36", mode=6).Subtitle("B")
Interleave(a,b)
Reel.Deel is offline   Reply With Quote
Old 7th June 2016, 17:55   #1058  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
Quote:
Regarding the script in post #1055, if you add chromak="spline36" to Dither_convert_rgb_to_yuv then you get visually the same result as your script above but much faster (around 70% in my tests).
yep is still faster and difference is negible, but I think B is still a little bit better

I suspected resize was optional as if you would to downsize or not.
if not you can add chromak="spline36" to Dither_convert_yuv_to_rgb too and remove Dither_resize16 call.
__________________
powered by Google Translator

Last edited by Motenai Yoda; 7th June 2016 at 18:25.
Motenai Yoda is offline   Reply With Quote
Old 12th June 2016, 19:07   #1059  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Motenai Yoda View Post
yep is still faster and difference is negible, but I think B is still a little bit better

I suspected resize was optional as if you would to downsize or not.
if not you can add chromak="spline36" to Dither_convert_yuv_to_rgb too and remove Dither_resize16 call.
did you try HDRMatrix? http://forum.doom9.org/showthread.ph...67#post1753267
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 14th July 2016, 10:24   #1060  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,582
@cretindesalpes

AVS+ is getting more features in these days, such as high bit colors spaces.

Do you think it could be useful to create a specific build of your suite?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Reply

Tags
color banding, deblocking, noise reduction


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 02:06.


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