Vapoursynth syntax error with DGCube()

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
Post Reply
User avatar
Rocky
Posts: 3455
Joined: Fri Sep 06, 2019 12:57 pm

Vapoursynth syntax error with DGCube()

Post by Rocky »

It's been a while since I worked on DGCube() and today I was going to work on some changes. This is a line in my test script for Vapoursynth:

c=core.dgcube.DGCube(c,cube="PQ_to_BT709_slope.cube",in="lim",lut="full",out="lim",interp="tetrahedral")

This line causes a Vapoursynth syntax error. I tracked it down to the fact that "in" is a Python keyword, and so this line now works without error:

c=core.dgcube.DGCube(c,cube="PQ_to_BT709_slope.cube",in_="lim",lut="full",out="lim",interp="tetrahedral")

Notice that "in" has been changed to "in_". The underscore prevents it from being interpreted by Python. This is documented in the Vapoursynth documentation. Apparently, after renaming the DGCube() argument names, I never tested under Vapoursynth. :oops:

I have updated the example in the DGCube() manual to include this fix.

https://rationalqm.us/misc/DGCube.zip
Post Reply