Advertisement
Ucurrent

AvisynthPluginInit_cuda.cpp

Jan 17th, 2023 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.83 KB | Source Code | 0 0
  1. //AvisynthPluginInit.cpp cuda attempt
  2. #pragma once
  3. #include "CDegrain.h"
  4.  
  5. AVSValue __cdecl Create_CDegrain(AVSValue args, void* user_data, IScriptEnvironment* env)
  6. {
  7.     return new CDegrain(args[0].AsClip(), args[1].AsInt(1), args[2].AsInt(5), args[3].AsInt(32), args[4].AsInt(4), args[5].IsClip() ? args[5].AsClip() : NULL, env);
  8. }
  9.  
  10. const AVS_Linkage* AVS_linkage = 0;
  11.  
  12. extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit3(IScriptEnvironment * env, const AVS_Linkage* const vectors)
  13. {
  14.     AVS_linkage = vectors;
  15.    
  16.     env->AddFunction("CDegrain", "c[radius]i[nt]i[thr]i[blksize]i[dClip]c", Create_CDegrain, 0);
  17.     env->AddFunction("CDegrain_cuda", "c[radius]i[nt]i[thr]i[blksize]i[dClip]c", Create_CDegrain_cuda, 0);
  18.     return "CTools_LE_cuda plugin beta 0.1 (with CUDA support)";
  19. }
  20.  
Tags: CUDA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement