Giter VIP home page Giter VIP logo

vapoursynth's Introduction

vapoursynth's People

Contributors

akarinvs avatar arch1t3cht avatar biswa96 avatar captainadamo avatar chikuzen avatar cid-chan avatar darealshinji avatar djatom avatar endilll avatar holywu avatar ichunjo avatar ifeelbloated avatar jsaowji avatar justintarthur avatar kamekameha avatar kuukunen avatar myrsloik avatar pingplug avatar pyguy2 avatar rivenskaye avatar sekrit-twc avatar setsugennoao avatar soldivelot avatar splinter98 avatar stax76 avatar stuxcrystal avatar thechaoscoder avatar tsufeki avatar vxzms avatar yomikor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vapoursynth's Issues

Document all filters in the source tree

Currently these filters are missing documentation:
VIVTC
AviSource
EEDI3
AssVapour
RemoveGrain/Repair

Most of it can be fairly easily created/adapted from their existing proto-filters.

Export frame data in a Python friendly way

There are several library such as PIL and numpy used for image manipulation in python. Add methods to export frames to PIL or numpy (zero memory copy possible) for easier use.

Use LoadLibraryEx on windows

Use LoadLibraryEx instead of messing with the working directory on windows when loading plugins (if the function is available).

Port VS to PowerPC

Since I have access to PPC hardware, might as well port VS to PPC/Linux.

Any documentation/description of using a VSFuncRef?

It seems the C-plugin gets a VSFuncRef object when a function parameter is delivered in the vpy script. I read the source code and find it seem to using vsapi->callFunc() with in and out parameters to use the function to caculate the result. So I wonder what to do if I want to pass a list/an array to the VSFuncRef object that the plugin gets from the script(which is in fact a function that uses a list as parameter in the script). Should I just use vsapi and append all the values needed by the list that the VSFuncRef would use, then just run vsapi->callFunc, or do something different to achieve my goal?

Shuffleplanes doesn't determine the output format properly

import vapoursynth as vs

c = vs.get_core()

src = c.d2v.Source("./vol 01.d2v", rff=True) # YUV420P8

blank = c.std.BlankClip(src, width=src.width_2, height=src.height_2, color=[128, 128, 128])

ret = c.std.ShufflePlanes([blank, src], planes=[0, 0, 0], format=src.format.color_family)

ret = c.ssiq.SSIQ(ret)

ret = c.std.ShufflePlanes([ret, src], planes=[1, 1, 2], format=src.format.color_family)

ret.set_output()

Native QTGMC

Make THE most complicated and appreciated avisynth script run natively.

See if frame errors can be reported in a nicer way in vfw

Currently errors only fail to produce a frame, something that's allowed in vfw, but there's no way to report any other issue. It could be useful to substitute a frame with the error message or something similar.

Popping up a dialog with an error log could also be useful. (and somewhat evil)

Can't build with clang

CC=clang CXX=clang++ waf configure
waf build

The above fails when linking vspipe:

[25/25] cxxprogram: build/src/vspipe/vspipe.cpp.5.o -> build/vspipe
./libvapoursynth.so: error: undefined reference to 'dlclose'
./libvapoursynth.so: error: undefined reference to 'dlerror'
./libvapoursynth.so: error: undefined reference to 'dlopen'
./libvapoursynth.so: error: undefined reference to 'dlsym'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Somehow waf doesn't add -ldl (or -lm for that matter):

[21/25] cxxshlib: build/src/core/asm/x86/check.asm.1.o build/src/core/asm/x86/cpu.asm.1.o build/src/core/asm/x86/expr.asm.1.o build/src/core/asm/x86/transpose.asm.1.o build/src/core/cachefilter.cpp.1.o build/src/core/cpufeatures.cpp.1.o build/src/core/exprfilter.cpp.1.o build/src/core/simplefilters.c.1.o build/src/core/vsapi.cpp.1.o build/src/core/vscore.cpp.1.o build/src/core/vsresize.c.1.o build/src/core/vsthreadpool.cpp.1.o -> build/libvapoursynth.so
12:34:44 runner ['clang++', '-Wl,-O1,--sort-common,--as-needed,-z,relro', '-Wl,-O1,--sort-common,--as-needed,-z,relro', '-shared', '-Wl,-Bsymbolic', '-Wl,-z,noexecstack', 'src/core/asm/x86/check.asm.1.o', 'src/core/asm/x86/cpu.asm.1.o', 'src/core/asm/x86/expr.asm.1.o', 'src/core/asm/x86/transpose.asm.1.o', 'src/core/cachefilter.cpp.1.o', 'src/core/cpufeatures.cpp.1.o', 'src/core/exprfilter.cpp.1.o', 'src/core/simplefilters.c.1.o', 'src/core/vsapi.cpp.1.o', 'src/core/vscore.cpp.1.o', 'src/core/vsresize.c.1.o', 'src/core/vsthreadpool.cpp.1.o', '-o', '/home/asdf/builds/vapoursynth/src/vapoursynth-build/build/libvapoursynth.so', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lQtCore', '-lswscale', '-lavutil', '-lavcodec']

-ldl and -lm are not present when compiling with gcc either, but it works anyway.

Vapoursynth is the latest from git, clang is 3.3, gcc is 4.8.1, python is 3.3.2, waf is 1.7.11. Operating system is 64 bit Arch Linux.

Port VS to ARM

VS should be ported to ARM/Linux. This involves some build system changes to set the proper defines for ARM and a few preprocessor checks in the code.

Could also use optimized assembly.

Plugin management/autoloading on linux

Currently all plugins have to be manually loaded. Avisynth style autoloading would be desirable however this has a fairly high crash risk (as also seen in avisynth) for badly written plugins.

Completely broken filters will of course be blacklisted. Detected misbehaving filters should also be clearly reported.

./waf build failed in ubuntu 13.04 x86_64

when i run ./waf build,i got such error info:

./libvapoursynth-script.so:undefined reference to ‘PyString_FromString’
Build failed
-> task in 'vspipe' failed (exit status 1):
{task 140507158663696: cxxprogram vspipe.cpp.5.o -> vspipe}
['/usr/bin/g++', '-Wl,-Bsymbolic', '-Wl,-z,noexecstack', '-Wl,-Bsymbolic-functions', '-Wl,-z,relro', 'src/vspipe/vspipe.cpp.5.o', '-o', '/home/byron/src/vapoursynth/build/vspipe', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L.', '-L.', '-L/usr/lib/python3.3/config-3.3m-x86_64-linux-gnu', '-lvapoursynth', '-lvapoursynth-script', '-lQtCore', '-lswscale', '-lavutil', '-lavcodec', '-lpython3.3']

Support for timing filters

It could be useful to have good statistics over how much processing time is spent in individual filters when running a complex script.

Adding support for it is however a bit tricky since filters can be destroyed and created lots of times per game when frameeval is used.

Visualizing and reporting it could probably benefit from some kind of graph inspection support as well.

Plugin path information

Plugins should have some way to know where they are stored on disk. This could be very handy for plugins loading additional libraries and other support files.

Lut and Lut2 should also be able to take a function and evaluate it to make the lut

Idea: Perform deduplication of filters at instantiation time

Instead of creating a new filter object each time a filter is invoked in a script, check to see if a filter was invoked with the same arguments. If so, return a handle to the existing filter instead of creating a new one.

Many large scripts contain redundant filter invocations, especially if functions are used to structure logic. Eliminating duplicate filter instances saves memory and improves the effectiveness of caching.

API Defect List (to be corrected for API v4)

Add major API version to the 3 public header files:
vapoursynth4.h
vshelper4.h
vsscript4.h

Add getAPIVersion() to vsapi. Will simplify a lot of things.

A createCore function where you can prevent autoloading of plugins.

Move plugin identifiers to vshelper and adopt consistent naming of things

Don't implement scanline based filters but adjust the API so it's possible to do later. For example require explicit declaration of node dependencies.

Additional Enums #570

Make it possible to cancel in progress requests to getFrameAsync? Return a proper future/promise style object instead?

Add automatic packing/unpacking to avs compat since compat formats are now removed. Easiest done by introducing packing/unpacking filters.

Improve plugin handling on windows to leak less memory

The possibility to register user functions with argument lists and export them through the core like a plugin. Add a user function namespace as an experiment?

Graph inspection - also add a processing time field that can be retrieved

Per core message handler

SUPPORT REMOVED since nobody uses this feature. It's really awkward to write filters that output multiple clips. Or more exactly kinda weird when both frames (such as main frame and alpha) are generated at the same time and therefore pushing both at once would be very helpful for performance.

All "void **instanceData" in filters should be changed to "void *instanceData". If extra indirection is needed it's trivial to do so at creation time. Zero filters have benefited from the extra indirection so far.

The "void **frameData" argument in VSFilterGetFrame should be changed to void *[4] to make it trivial to store a pointer (to a node usually) and an offset without allocation. Will improve splice getframe performance when a temporary allocation is no longer needed (or a complex recalculation of decisions).

Require filters to set a flag to receive arFrameReady events.

Allow a function to declare that it accepts everything and leave the handling to it
Allow a function to declare that it can return anything

Fix the weird cm prefix of colorfamily, should obviously be cf.

Remove ycocg as a colorfamily. Nobody uses it and it belongs to the YUV family anyway

registerFunction should return success or failure (function already exists, uses invalid identifier or other problem)

Review plugin loading in general. The current model makes changes extremely hard with the few things passed to registerFunction.

callFunc(VSFuncRef *func, const VSMap *in, VSMap *out, VSCore *core, const VSAPI *vsapi) should be callFunc(VSFuncRef *func, const VSMap *in, VSMap *out)

Stride should be ptrdiff_t. All other types in the API should be reviewed as well?

createFilter and filterInit overlap a lot. This means that filterInit usually ends up only setting videoinfo and nothing else. Allow videoinfo to be passed to createFilter instead and save some boilerplate code.

readOnly in configPlugin should be renamed to flags and formalized.

Prefix all functions in vshelper4.h with vsh_ or something similar for C. Maybe add a vsh namespace for C++ mode

Rename vs_normalizeRational to vs_reduceRational to make more sense

Enumerating all plugins and their ids/namespaces/whatever is kinda messy. Improve it.

queryCompletedFrame is half-broken. Fix it.

Remove getFormat and friends. Replace with a simple int that codes all the relevant data. Do the same for audio.

.propGetInt/Float should have a version to get a saturated int or float instead of only int64_t or double as the returned type. Will save plugins writers a lot casting without losing the internal representation.

Type hint for binary/utf8 for the vsmap data type make inspection filters behave better and not print junk.

Fix the vsscript api so it actually makes sense.

Add some way to set core creation flags from python and vsscript.

Change the vsscript api to export a single struct with function pointers as well.

Plugin return type hints

#601 Plugin version API

Remove compat formats since mvtools is now fully native.

Add map* functions that consume references

cloneFrame/Node/FunctionRef should be renamed to addFrame/Node/FunctionRef

Drop Ref from VSFrameRef, VSNodeRef and VSFunctionRef since it's pointless indirection

Remove multiple output nodes support completely even for api3 to reduce complexity more

Ideas skipped this time:
Filters cannot simply yield their execution time and return to the end of the execution queue. This could be useful for filters that transfer to/from GPU memory. This feature may not be added or be saved for a later API revision. Or should filters simply be able to reserve/release execution threads like is done internally already?
Support for passing frames stored in OpenCL memory
Tiling/line based filters for more effective cache usage

Also kinda depends on #508

Create more testcases

It would be good to cover most arguments for internal filters to see that the right values are accepted/rejected.

Optimize core filters

In order of importance:
Expr needs to combine constants.
FlipHorizontal/Turn180 probably should be optimized.

Do constant folding in Expr

When both of an operator's operands are (recursively) constants, we should compute the result value ahead of time.

Decrease cache duplication on splice

When n clips are spliced together they will usually have n cache instances as well. The best solution would be if splice could convert all caches attached to the input clips into one cache inserted after the splice.
Maybe some kind of graph inspection/manipulation should be added to the api to help with the transform.

VSScript's set working directory feature

In 36793c6 the ability to optionally change the working directory to the script's directory prior to its evaluation was added to vsscript_evaluateScript. This allows the use of paths relative to the script location. I have two issues with the current state:

  • The description in VSScript.h seems to suggest that the indicated default behavior is to not change the directory while is actually the other way around. Any application should set this flag unless it has its own reasons to not to. Otherwise the users won't be able to rely on this feature.
  • It would make sense to restore the original working directory after evaluating the script (is this the reason why the flag is not set for vsvfw?).

Some filters that take more than one input don't work

This simple script dies straight away with "No frame returned at the end of processing by StackHorizontal" (regardless of thread count):

import vapoursynth as vs

c = vs.get_core()

one = c.std.BlankClip()
two = c.std.BlankClip()

ret = c.std.StackHorizontal([one, two])

ret.set_output()

Same thing with Expr([one, two], "x y + 2 /"), but Interleave([one, two]) works...

Replacing the second clip with the first clip ([one, one]) trips an assert instead of that error:

ASSERT: "mainContext->numFrameRequests >= 0" in file ../src/core/vsthreadpool.cpp, line 162

All this happens with the latest revision, d8bdc22, but also with d1cc089.

Create a plugin and script database

Make a central place to host and list all plugins and scripts to prevent doom9 treasure hunts.

Must have features:
List all plugins with a 1-2 sentence description
Have both source and windows binaries
Have maybe 3 additional links (website, doom9 thread, source code place)

Useful:
Allow plugin writers to update their own files

Some sort of threading bug

What happens is that vapoursynth dies with "No frame returned at the end of processing by $filter". $filter changes randomly between crashes.

This test program should make it crash pretty fast: https://gist.github.com/dubhater/6560627 It's not necessary to request frames n and n+1 over and over like that, but it seems to make the crash happen sooner/more reliably. The filters used don't seem to matter: it crashes the same with blankclip+flipvertical, or d2vsource+applyrff.

Everything is fine with 1 thread. (I think QThread::idealThreadCount() returns 2 here.)

The same happens when running a simple script through vsvpipe, though it takes longer to crash.

Before the commit 987d295 it was crashing less frequently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.