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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th November 2012, 17:40   #41  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,515
Quote:
Originally Posted by cretindesalpes View Post
If your input is YUV422P10 it must be converted to 4:4:4 before applying the matrix, and converted back to 4:2:2 after. This is how it should be done. This will yield a more reliable result than for example ColorMatrix, which processes the chroma without taking the luma into account (well, this is not important for the specific 601<->709 case), and processes the luma by point-resizing the chroma on the fly. This approximation is fast but not very accurate.

So matrix on something other than 4:4:4 is not just not yet implemented, but is not implemented on purpose?
sneaker_ger is offline   Reply With Quote
Old 20th November 2012, 19:14   #42  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
Reel.Deel:

Try with the syntax: impulse=[-1, 6, -1]. This is no longer a string but a wonderful datastructure called array.

However I don't understand what's happening with these error messages that don't match the actual error. I need to investigate this.

sneaker_ger:

Yes, more or less. As mentioned previously, I could implement specific cases differently but at the moment it works as designed. It needs to be optimized, though.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 21st November 2012, 13:27   #43  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 789
Would it be possible to add support for the Jinc resizer (in madVR)?
ajp_anton is offline   Reply With Quote
Old 22nd November 2012, 16:56   #44  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,439
cretindesalpes:

Source is YUY2:

b= core.fmtc.resample(clip=ret, w=720, h=576, kernel="spline36", css="444")
c= core.fmtc.matrix (clip=b, mats="709", matd="601", col_fam=vs.YUV)
a= core.fmtc.bitdepth (clip=c, bitdepth=8, dmode=1)

I seams to have some issues with dither tools- resizing seams to mess with chroma placement, specially with css=444, which is required for matrix conversions. There are issues without css=444 also, but less visible.
Test on HD bars going to SD shows chroma shifts compared to Vdub and internal Edius resizing (they are both about the same). There is something wrong going on with dither tools. Another issue are dithering (higher modes, eg 3) artefacts, which seams to break solid nature of bars (specially green one).
This was also visible a lot when I tested YUV->RGB->YUV conversion- avisynth was way more lossless, which is not the way how it should be taking into account dither precision.
I will try to put some grabs later.


update: it's all related to last line in my script which is: last=core.resize.Spline(clip=h,format=vs.COMPATYUY2) - it's not dither tools, but this line messing with good output of dither tools. Is this part of swscale?

Last edited by kolak; 22nd November 2012 at 19:12.
kolak is offline   Reply With Quote
Old 23rd November 2012, 22:52   #45  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
ajp_anton:

Not at the moment. Jinc is quite different of the other kernels (the transform is not separable) so it would need a significant rewrite to add it. Currently I focus on making everything work correctly.

kolak:

Yes, core.resize.Spline uses swscale. Do I understand that finally you haven't any more problem with fmtconv?

— - —

Time for a new release:

fmtconv r3
  • bitdepth: changed the "bitdepth" parameter to "bits"
  • bitdepth: added SSE2 optimizations for upconversions.
  • resample: added interlaced resizing ("interlaced" parameter)
  • resample: now sets "_ColorRange" and "_ChromaLocation" properties when known
  • resample: fixed the "planes" parameter previously interpreted as 0 (black or green screen).
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 23rd November 2012, 23:14   #46  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,439
Yes- fmtconv is absolutely fine (at least bits which I tested)- all problems were related to swscale!

Question- how interlaced resizing is handled- resize per field?
kolak is offline   Reply With Quote
Old 9th December 2012, 15:18   #47  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
kolak:

For interlaced resizing, you have to separate the fields first. Then the relative field position is automatically taken into account when resizing.


fmtconv r4:
  • Added a documentation.
  • Filters now write some frame properties when known.
  • Fixed the code so it can be compiled on Linux. Thanks to Jackoneill/Nodame for testing.
  • bitdepth: no need to specify any bitdepth or colorspace (for simple range conversions).
  • matrix: Added SSE2 implementation for integer processing.
  • matrix: Allows the destination bitdepth to be higher than the input (added the bits parameter).
  • matrix: col_fam completes csp instead of replacing it.
  • resample: Added interlacedd to specify if output is interlaced (allows simple bobbing).
  • resample: Added tff and tffd to specify field parity.
  • resample: Added scale, scaleh and scalev for easier magnification.
  • resample: Added a two-digit mode to css.
  • resample: Fixed a typo preventing to select 4:1:1 chroma subsampling.
  • Added nativetostack16.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 9th December 2012, 19:27   #48  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Documentation needs a fix. The resample() parameters scalev and scaleh are defined as scalex and scaley.

I like the new bobbing method. Way easier to implement.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.
Revgen is offline   Reply With Quote
Old 9th December 2012, 20:03   #49  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
Oh right! I fixed the doc without changing the version number, just download again the zip file.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 10th December 2012, 05:15   #50  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
Just noticed a small typo in one of your error messages, it looks like fmtc/Resample.cpp, on line 251, says 'w' where it should say 'h' to indicate that the user's provided an invalid height for the output colorspace.
Robert Martens is offline   Reply With Quote
Old 10th December 2012, 07:38   #51  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
Thanks for reporting it. Copy/paste is the most evil invention ever.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 19th December 2012, 17:07   #52  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 468
howto build in linux? (to linux)

greettings
sl1pkn07 is offline   Reply With Quote
Old 19th December 2012, 18:53   #53  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 728
Quote:
Originally Posted by sl1pkn07 View Post
howto build in linux? (to linux)

greettings
Code:
g++ -O3 -shared -msse2 -fPIC -o libfmtconv.so AvstpWrapper.cpp main.cpp fmtc/*.cpp fstb/*.cpp vsutl/*.cpp -I.
Add -march=your_cpu_here if you get "undefined symbol __sync_val_compare_and_swap_16" or something like that.

clang from svn should work as well.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 19th December 2012, 19:59   #54  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 468
thanks man.
sl1pkn07 is offline   Reply With Quote
Old 4th January 2013, 22:18   #55  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,439
Quote:
Originally Posted by cretindesalpes View Post
kolak:

For interlaced resizing, you have to separate the fields first. Then the relative field position is automatically taken into account when resizing.


fmtconv r4:
  • Added a documentation.
  • Filters now write some frame properties when known.
  • Fixed the code so it can be compiled on Linux. Thanks to Jackoneill/Nodame for testing.
  • bitdepth: no need to specify any bitdepth or colorspace (for simple range conversions).
  • matrix: Added SSE2 implementation for integer processing.
  • matrix: Allows the destination bitdepth to be higher than the input (added the bits parameter).
  • matrix: col_fam completes csp instead of replacing it.
  • resample: Added interlacedd to specify if output is interlaced (allows simple bobbing).
  • resample: Added tff and tffd to specify field parity.
  • resample: Added scale, scaleh and scalev for easier magnification.
  • resample: Added a two-digit mode to css.
  • resample: Fixed a typo preventing to select 4:1:1 chroma subsampling.
  • Added nativetostack16.
Is random noise coming? Small amount after dithering always helps
kolak is offline   Reply With Quote
Old 5th January 2013, 19:58   #56  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,439
Another thing:
just had a case where I had to convert interlaced 10bit 422 to 8bit 420 for QTGMC processing- it needs 5 additional lines to achieve. Even if it's not very complicated than it's way "to long"- it should be done with one (or 2) line. Can't we have most of the processing included in one command?
kolak is offline   Reply With Quote
Old 18th August 2013, 21:52   #57  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
fmtconv r5:
  • Added 12-bit support for all the functions.
  • Added matrix2020cl to convert between linear RGB and Y’Cb’Cr’ colorspaces using the BT.2020 constant luminance matrix.
  • matrix: Added the BT.2020 matrix, non constant luminance mode only.
  • matrix: Added single-plane output with the singleout parameter.
  • resample: allows x:y:z form for specifying the colorspace subsampling css.
  • resample: added SSE2 integer calculations for slight speed improvement. Activated by default, use flt=1 to compute everything in float (previous operating mode).

Kolak:

I’ll add simple wrapping functions when the library is stabilized.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding

Last edited by cretindesalpes; 18th August 2013 at 21:55.
cretindesalpes is offline   Reply With Quote
Old 18th August 2013, 22:06   #58  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,131
cretindesalpes, the binary is still the same one as r4.

Edit:
Thanks for the update!

Last edited by Reel.Deel; 18th August 2013 at 22:20.
Reel.Deel is offline   Reply With Quote
Old 18th August 2013, 22:17   #59  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 617
Doh! Sorry. I replaced the .dll file. Just download again ftmconv-r5.zip.
__________________
dither 1.27.2 for AviSynth | avstp 1.0.3 for AviSynth development | fmtconv r22 for Vapoursynth | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 22nd August 2013, 14:38   #60  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 709
I got a 'matrix: Function does not take argument(s) named singleout' error message.


HolyWu 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 05:52.


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