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 4th October 2019, 20:36   #281  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Quote:
Originally Posted by groucho86 View Post
Hi everyone,
Just opened up an issue on fmtconv's github, wondering if anyone had any insight here.

I have a SGamut3.Cine Linear EXR. It seems like the Linear to Slog3 conversion is clipping in the highlights.
What is the bitdepth of the EXR and it is a float representation?
Cary Knoop is offline   Reply With Quote
Old 4th October 2019, 21:09   #282  |  Link
groucho86
Registered User
 
Join Date: Apr 2016
Posts: 85
Hey Cary,
EXR is 16bit half float. Sample file is downloadable here.

exrheader inspection:
Code:
$ exrheader source_sgamut3cine_linear.exr 

file source_sgamut3cine_linear.exr:

file format version: 2, flags 0x0
channels (type chlist):
    B, 16-bit floating-point, sampling 1 1
    G, 16-bit floating-point, sampling 1 1
    R, 16-bit floating-point, sampling 1 1
compression (type compression): none
dataWindow (type box2i): (0 0) - (319 239)
displayWindow (type box2i): (0 0) - (319 239)
framesPerSecond (type rational): 24/1 (24)
lineOrder (type lineOrder): increasing y
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
timeCode (type timecode):
    time 00:00:00:00
    drop frame 0, color frame 0, field/phase 0
    bgf0 0, bgf1 0, bgf2 0
    user data 0x0
type (type string): "scanlineimage"
groucho86 is offline   Reply With Quote
Old 28th October 2019, 15:49   #283  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
Is there any differences between fmtc Spline36 and internal Vapoursynth Spline36? If yes, what is better for HDR downscale? Thanks!
redbtn is offline   Reply With Quote
Old 28th October 2019, 17:23   #284  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by redbtn View Post
better for HDR downscale
There is information on these pages:
http://www.vapoursynth.com/doc/functions/resize.html
http://avisynth.nl/index.php/Resize
But some say it is out of date.
I don’t know, I use bicubic with b=0,c=0.5.
Jukus is offline   Reply With Quote
Old 8th December 2019, 15:34   #285  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Quote:
Originally Posted by groucho86 View Post
Any idea why fmtconv would be clipping? I looked at TransOpSLog3.cpp and nothing's jumping out at me. Maybe I'm not looking in the right place.
I just fixed this issue. The clipping was caused by an inappropriate lookup table selection. There is a new release, check fmtconv r21.
Sorry for the trouble! It’s been years since I worked on fmtconv so it was a bit difficult to dive into the code again.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 8th December 2019, 15:56   #286  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
Quote:
Originally Posted by cretindesalpes View Post
I just fixed this issue. The clipping was caused by an inappropriate lookup table selection. There is a new release, check fmtconv r21.

Sorry for the trouble! It’s been years since I worked on fmtconv so it was a bit difficult to dive into the code again.
Thank you for new release!
Glad to see you!

Last edited by redbtn; 8th December 2019 at 16:10.
redbtn is offline   Reply With Quote
Old 8th December 2019, 16:35   #287  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Could you also make a release on github?
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 8th December 2019, 17:03   #288  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
Quote:
Originally Posted by Wolfberry View Post
If you are using the dll from the official release, I will recommend to use the one from ChaosKing's FATPACK or the one in my signature as it is compiled with a newer compiler and might save you from random crashes.
I checked the files in your signature but couldn't find the newly compiled fmtconv.dll.
Can you tell me the name of the file ?
Thank you !
Pat357 is offline   Reply With Quote
Old 8th December 2019, 17:48   #289  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Just use the new r21 version posted by cretindesalpes.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 9th December 2019, 11:54   #290  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Quote:
Originally Posted by adsun701 View Post
I actually discovered a bug in the primaries conversion code. When converting to ciexyz primaries, there is a divide by zero error due to the coordinates of the primaries. Hopefully it gets fixed!
Fixed. Thanks for your report!
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 10th December 2019, 14:48   #291  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Quote:
Originally Posted by J1Man View Post
When "1886a" (alternative approximation of 1886) transfer function is used before and after primaries conversion, it creates heavy pink artifacts on bright areas of the video.
Fixed now.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 10th December 2019, 23:34   #292  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
Quote:
Originally Posted by cretindesalpes View Post
Fixed now.
Any link to the "fixed" version ? (Windows binaries)

The link to r21 still has 8/12/2019 date-stamp
Pat357 is offline   Reply With Quote
Old 11th December 2019, 09:41   #293  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
There is no new release yet, but there will be soon a r22 with all the fixes. In the meantime, it is possible to compile the source code from the git repository.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 11th December 2019, 15:46   #294  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Here it is. fmtconv r22:
  • bitdepth: upconversions for full range data now scale to the maximum value instead of shifting bits. Thanks to Z4ST1N for the report.
  • matrix: added support for the YDzDx, ICtCp-PQ and ICtCp-HLG colorspaces.
  • matrix: fixed a case issue for matrix identifiers.
  • primaries: added support for P3-DCI, P3-D65 and P3-D60. The old DCI-P3 was actually P3-D65. The code "dcip3" remains for backward compatibility but is deprecated.
  • primaries: added support for the EBU 3213-E colorspace.
  • primaries: added a "2100" alias for the BT.2020/BT.2100 colorspace.
  • primaries: fixed a divide-by-0 crash when using CIEXYZ as destination colorspace
  • primaries: fixed a bug preventing to use the "uhdtv" string for BT.2020 primaries
  • transfer: added support for hybrid log-gamma (HLG) curves.
  • transfer: for the SMPTE SM 2084 curve, the specific value of 0 now gives a true 0 in both directions (minor change).
  • transfer: BT.2020 curve for 12-bit data now uses exact values giving a continuous derivative (minor change).
  • transfer: now uses more accurate constants for the sRGB curve, giving a better derivative continuity (minor change).
  • transfer: fixed a bug with the alternate formula for BT.1886 curve.
  • Should now build correctly on FreeBSD (patch by jbeich)
  • Fixed compilation for Linux on ARM or aarch64. Binaries not tested yet.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 12th December 2019, 15:53   #295  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Location: Russia
Posts: 105
Quote:
Originally Posted by cretindesalpes View Post
Here it is. fmtconv r22
Thank you!
Can I ask why spline64 and spline taps=4 doesn't produce the same result?

Last edited by redbtn; 13th December 2019 at 00:31.
redbtn is offline   Reply With Quote
Old 13th December 2019, 09:15   #296  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Quote:
Originally Posted by redbtn View Post
Can I ask why spline64 and spline taps=4 doesn't produce the same result?
This is because the splineNN algorithms are hardcoded plain cubic splines (see here for details), while the spline + taps are natural cubic splines, as implemented by Wilbert in SplineResize 0.2.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding

Last edited by cretindesalpes; 13th December 2019 at 09:33. Reason: URL error
cretindesalpes is offline   Reply With Quote
Old 15th December 2019, 21:25   #297  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
I have some problems building fmtconv for x64 using Mingw64.

Created an issue on your git : https://github.com/EleonoreMizo/fmtconv/issues/14

After applying the patch I attached at the issue https://github.com/EleonoreMizo/fmtc...fmtc.patch.txt , the building works ok, but I'm not sure my patch doesn't mess up anything.....

Last edited by Pat357; 15th December 2019 at 21:28.
Pat357 is offline   Reply With Quote
Old 19th December 2019, 14:23   #298  |  Link
cretindesalpes
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
 
cretindesalpes's Avatar
 
Join Date: Feb 2009
Location: No support in PM
Posts: 712
Quote:
Originally Posted by Pat357 View Post
I have some problems building fmtconv for x64 using Mingw64.
Thank you, the patch was correct. I did several other modifications. Please check the git repository.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding
cretindesalpes is offline   Reply With Quote
Old 25th January 2020, 19:33   #299  |  Link
dev-null
Registered User
 
Join Date: Jan 2020
Posts: 5
One of the primary issues I run into, when building myself a VapourSynth setup for my outdated OS X system (10.10), was a broken/ non working build of "fmtconv".

I fetched the r22 release and build it with clang ("clang-700.1.81", as included in XCode 7.2, last available for Yosemite). It compiled w/o a hitch, just had the known linking problem with a missing libatomic (the GCC thingy). Removing the respective -latomic flag fixed that. But calling any "fmtc" stuff from a VapourSynth script made vspipe never return. It was busy looping a single thread @ ~100% CPU usage. A build of the older r21 release works fine. Also a build of r22 with gcc 9.2 works fine too (no -latomic linking problem this way either.) So there's some sort of change in r22 that makes older clang mess up the build.

Interestingly I can't build the current master version from git with old clang nor gcc 9.2. The compilation fails rather similarly on stuff in src/conc/Interlocked.hpp. Here's the gcc9.2 output: https://pastebin.com/3NWWBJKW . Sadly I can't wrap my brain around this C++ stuff, so I have no idea what it wants to do there and how I could fix it. Also interesting is that this Interlocked stuff seems to be the stuff where the broken r22 clang build has trouble with. That's according to a process sample taken with Activity Monitor: it seems to hang around some of those "OSAtomicCompareAndSwap" functions in the stack trace.

Just reporting. Maybe someone has run into the same issue and knows details why it happens exactly: compiler bug, fmtconv's code broken, etc.? Anyway… to make it short: if you got busy-looping issues with fmtc[onv] stuff on an outdated Mac OS X system, try a build of the lib with gcc-9.2!
dev-null is offline   Reply With Quote
Old 22nd July 2020, 08:41   #300  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Bitdept function fails for ProRes 4444

Any idea why this fails on a ProRes4444 format? I presume it is the alpha channel.

Code:
c = core.ffms2.Source("prores4444.mov")
c = core.fmtc.bitdepth(c, bits=16)
Error:
c = core.fmtc.bitdepth(c, bits=16)
File "src\cython\vapoursynth.pyx", line 1862, in vapoursynth.Function.__call__
vapoursynth.Error: bitdepth: argument clip is not of array type but more than one value was supplied


Edited to add:

Found out the solution myself, if an alpha channel is present two clips will be returned.
This works fine:
Code:
c = core.ffms2.Source("prores4444.mov")
c = core.fmtc.bitdepth(c[0], bits=16)

Last edited by Cary Knoop; 22nd July 2020 at 08:56.
Cary Knoop 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 00:57.


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