Skip to content

Commit

Permalink
Merge branch 'dubhater:master' into mod
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium authored Sep 6, 2024
2 parents c539650 + e516e90 commit 02d06a5
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 20 deletions.
6 changes: 6 additions & 0 deletions src/CommonMacros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __COMMON_M__
#define __COMMON_M__

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))

#endif // __COMMON_M__
3 changes: 2 additions & 1 deletion src/MVAnalyse.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "DCTFFTW.h"
#include "GroupOfPlanes.h"
#include "MVAnalysisData.h"
#include "CommonMacros.h"


typedef struct MVAnalyseData {
Expand Down Expand Up @@ -630,7 +631,7 @@ static void VS_CC mvanalyseCreate(const VSMap *in, VSMap *out, void *userData, V
{data->node, rpGeneral} //super
};

vsapi->createVideoFilter(out, "Analyse", data->vi, mvanalyseGetFrame, mvanalyseFree, fmParallel, deps, 1, data, core);
vsapi->createVideoFilter(out, "Analyse", data->vi, mvanalyseGetFrame, mvanalyseFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVBlockFPS.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "MVAnalysisData.h"
#include "Overlap.h"
#include "SimpleResize.h"
#include "CommonMacros.h"



typedef struct MVBlockFPSData {
Expand Down Expand Up @@ -982,7 +984,7 @@ static void VS_CC mvblockfpsCreate(const VSMap *in, VSMap *out, void *userData,
{data->mvbw, rpGeneral},
{data->mvfw, rpGeneral},
};
vsapi->createVideoFilter(out, "BlockFPS", &data->vi, mvblockfpsGetFrame, mvblockfpsFree, fmParallel, deps, 4, data, core);
vsapi->createVideoFilter(out, "BlockFPS", &data->vi, mvblockfpsGetFrame, mvblockfpsFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);

// AssumeFPS sets the _DurationNum and _DurationDen properties.
VSNode *node = vsapi->mapGetNode(out, "clip", 0, NULL);
Expand Down
4 changes: 3 additions & 1 deletion src/MVCompensate.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "Overlap.h"
#include "MaskFun.h"
#include "MVAnalysisData.h"
#include "CommonMacros.h"



typedef struct MVCompensateData {
Expand Down Expand Up @@ -569,7 +571,7 @@ static void VS_CC mvcompensateCreate(const VSMap *in, VSMap *out, void *userData
{data->vectors, rpGeneral},
};

vsapi->createVideoFilter(out, "Compensate", data->vi, mvcompensateGetFrame, mvcompensateFree, fmParallel, deps, 3, data, core);
vsapi->createVideoFilter(out, "Compensate", data->vi, mvcompensateGetFrame, mvcompensateFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
2 changes: 2 additions & 0 deletions src/MVDegrains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "MVDegrains.h"
#include "MVFrame.h"
#include "Overlap.h"
#include "CommonMacros.h"


struct MVDegrainData {
VSNode *node;
Expand Down
14 changes: 8 additions & 6 deletions src/MVDepan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "Fakery.h"
#include "MVAnalysisData.h"
#include "CommonMacros.h"



#define prop_DepanAnalyse_info "DepanAnalyse_info"
Expand Down Expand Up @@ -597,7 +599,7 @@ static void VS_CC depanAnalyseCreate(const VSMap *in, VSMap *out, void *userData
{data->mask, rpStrictSpatial},
};

vsapi->createVideoFilter(out, "DepanAnalyse", data->vi, depanAnalyseGetFrame, depanAnalyseFree, fmParallel, deps, 1, data, core);
vsapi->createVideoFilter(out, "DepanAnalyse", data->vi, depanAnalyseGetFrame, depanAnalyseFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);

if (vsapi->mapGetError(out)) {
depanAnalyseFree(data, core, vsapi);
Expand Down Expand Up @@ -1454,7 +1456,7 @@ static void VS_CC depanEstimateCreate(const VSMap *in, VSMap *out, void *userDat
{data1->clip, rpStrictSpatial},
};

vsapi->createVideoFilter(out, "DepanEstimateStage1", data1->vi, depanEstimateStage1GetFrame, depanEstimateFree, fmParallel, deps1, 1, data1, core);
vsapi->createVideoFilter(out, "DepanEstimateStage1", data1->vi, depanEstimateStage1GetFrame, depanEstimateFree, fmParallel, deps1, ARRAY_SIZE(deps1), data1, core);

if (vsapi->mapGetError(out)) {
depanEstimateFree(data1, core, vsapi);
Expand All @@ -1470,7 +1472,7 @@ static void VS_CC depanEstimateCreate(const VSMap *in, VSMap *out, void *userDat
{data2->clip, rpGeneral},
};

vsapi->createVideoFilter(out, "DepanEstimateStage2", data2->vi, depanEstimateStage2GetFrame, depanEstimateFree, fmParallel, deps2, 1, data2, core);
vsapi->createVideoFilter(out, "DepanEstimateStage2", data2->vi, depanEstimateStage2GetFrame, depanEstimateFree, fmParallel, deps2, ARRAY_SIZE(deps2), data2, core);

if (vsapi->mapGetError(out)) {
depanEstimateFree(data2, core, vsapi);
Expand All @@ -1485,7 +1487,7 @@ static void VS_CC depanEstimateCreate(const VSMap *in, VSMap *out, void *userDat
{data3->clip, rpGeneral},
};

vsapi->createVideoFilter(out, "DepanEstimateStage3", data3->vi, depanEstimateStage3GetFrame, depanEstimateFree, fmParallel, deps3, 1, data3, core);
vsapi->createVideoFilter(out, "DepanEstimateStage3", data3->vi, depanEstimateStage3GetFrame, depanEstimateFree, fmParallel, deps3, ARRAY_SIZE(deps3), data3, core);

if (vsapi->mapGetError(out)) {
depanEstimateFree(data3, core, vsapi);
Expand Down Expand Up @@ -2863,7 +2865,7 @@ static void VS_CC depanCompensateCreate(const VSMap *in, VSMap *out, void *userD
{data->data, rpGeneral},
};

vsapi->createVideoFilter(out, "DepanCompensate", data->vi, depanCompensateGetFrame, depanCompensateFree, fmParallel, deps, 2, data, core);
vsapi->createVideoFilter(out, "DepanCompensate", data->vi, depanCompensateGetFrame, depanCompensateFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);

if (vsapi->mapGetError(out)) {
depanCompensateFree(data, core, vsapi);
Expand Down Expand Up @@ -4190,7 +4192,7 @@ static void VS_CC depanStabiliseCreate(const VSMap *in, VSMap *out, void *userDa
{d->data, rpGeneral},
};

vsapi->createVideoFilter(out, "DepanStabilise", d->vi, getframe_functions[d->method], depanStabiliseFree, fmParallel, deps, 2, d, core);
vsapi->createVideoFilter(out, "DepanStabilise", d->vi, getframe_functions[d->method], depanStabiliseFree, fmParallel, deps, ARRAY_SIZE(deps), d, core);

if (vsapi->mapGetError(out)) {
depanStabiliseFree(d, core, vsapi);
Expand Down
4 changes: 3 additions & 1 deletion src/MVFinest.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <VSHelper4.h>

#include "MaskFun.h"
#include "CommonMacros.h"



typedef struct MVFinestData {
Expand Down Expand Up @@ -204,7 +206,7 @@ static void VS_CC mvfinestCreate(const VSMap *in, VSMap *out, void *userData, VS
{data->super, rpStrictSpatial},
};

vsapi->createVideoFilter(out, "Finest", &data->vi, mvfinestGetFrame, mvfinestFree, fmParallel, deps, 1, data, core);
vsapi->createVideoFilter(out, "Finest", &data->vi, mvfinestGetFrame, mvfinestFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "MaskFun.h"
#include "MVAnalysisData.h"
#include "SimpleResize.h"
#include "CommonMacros.h"



enum FlowModes {
Expand Down Expand Up @@ -587,7 +589,7 @@ static void VS_CC mvflowCreate(const VSMap *in, VSMap *out, void *userData, VSCo
{data->vectors, rpStrictSpatial},
};

vsapi->createVideoFilter(out, "Flow", data->vi, mvflowGetFrame, mvflowFree, fmParallel, deps, 3, data, core);
vsapi->createVideoFilter(out, "Flow", data->vi, mvflowGetFrame, mvflowFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVFlowBlur.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "MaskFun.h"
#include "MVAnalysisData.h"
#include "SimpleResize.h"
#include "CommonMacros.h"



typedef struct MVFlowBlurData {
Expand Down Expand Up @@ -545,7 +547,7 @@ static void VS_CC mvflowblurCreate(const VSMap *in, VSMap *out, void *userData,
{data->mvfw, rpGeneral},
};

vsapi->createVideoFilter(out, "FlowBlur", data->vi, mvflowblurGetFrame, mvflowblurFree, fmParallel, deps, 4, data, core);
vsapi->createVideoFilter(out, "FlowBlur", data->vi, mvflowblurGetFrame, mvflowblurFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
8 changes: 5 additions & 3 deletions src/MVFlowFPS.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include "SimpleResize.h"

#include "MVFlowFPSHelper.h"
#include "CommonMacros.h"



typedef struct MVFlowFPSData {
Expand Down Expand Up @@ -858,11 +860,11 @@ static void VS_CC mvflowfpsCreate(const VSMap *in, VSMap *out, void *userData, V
{hf->vectors, rpStrictSpatial}
};

vsapi->createVideoFilter(out, "FlowFPSHelper", hb->vi, mvflowfpshelperGetFrame, mvflowfpshelperFree, fmParallel, hb_deps, 1, hb, core);
vsapi->createVideoFilter(out, "FlowFPSHelper", hb->vi, mvflowfpshelperGetFrame, mvflowfpshelperFree, fmParallel, hb_deps, ARRAY_SIZE(hb_deps), hb, core);
d.mvbw = vsapi->mapGetNode(out, "clip", 0, NULL);
vsapi->clearMap(out);

vsapi->createVideoFilter(out, "FlowFPSHelper", hf->vi, mvflowfpshelperGetFrame, mvflowfpshelperFree, fmParallel, hf_deps, 1, hf, core);
vsapi->createVideoFilter(out, "FlowFPSHelper", hf->vi, mvflowfpshelperGetFrame, mvflowfpshelperFree, fmParallel, hf_deps, ARRAY_SIZE(hf_deps), hf, core);
d.mvfw = vsapi->mapGetNode(out, "clip", 0, NULL);
vsapi->clearMap(out);

Expand All @@ -876,7 +878,7 @@ static void VS_CC mvflowfpsCreate(const VSMap *in, VSMap *out, void *userData, V
{data->mvbw, rpGeneral},
{data->mvfw, rpGeneral},
};
vsapi->createVideoFilter(out, "FlowFPS", &data->vi, mvflowfpsGetFrame, mvflowfpsFree, fmParallel, deps, 4, data, core);
vsapi->createVideoFilter(out, "FlowFPS", &data->vi, mvflowfpsGetFrame, mvflowfpsFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);

VSPlugin *std_plugin = vsapi->getPluginByID("com.vapoursynth.std", core);

Expand Down
4 changes: 3 additions & 1 deletion src/MVFlowInter.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "MaskFun.h"
#include "MVAnalysisData.h"
#include "SimpleResize.h"
#include "CommonMacros.h"



typedef struct MVFlowInterData {
Expand Down Expand Up @@ -690,7 +692,7 @@ static void VS_CC mvflowinterCreate(const VSMap *in, VSMap *out, void *userData,
{data->mvfw, rpGeneral},
};

vsapi->createVideoFilter(out, "FlowInter", data->vi, mvflowinterGetFrame, mvflowinterFree, fmParallel, deps, 4, data, core);
vsapi->createVideoFilter(out, "FlowInter", data->vi, mvflowinterGetFrame, mvflowinterFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVMask.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "MaskFun.h"
#include "MVAnalysisData.h"
#include "SimpleResize.h"
#include "CommonMacros.h"



typedef struct MVMaskData {
Expand Down Expand Up @@ -340,7 +342,7 @@ static void VS_CC mvmaskCreate(const VSMap *in, VSMap *out, void *userData, VSCo
{data->vectors, rpStrictSpatial},
};

vsapi->createVideoFilter(out, "Mask", &data->vi, mvmaskGetFrame, mvmaskFree, fmParallel, deps, 2, data, core);
vsapi->createVideoFilter(out, "Mask", &data->vi, mvmaskGetFrame, mvmaskFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVRecalculate.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "Fakery.h"
#include "GroupOfPlanes.h"
#include "MVAnalysisData.h"
#include "CommonMacros.h"



typedef struct MVRecalculateData {
Expand Down Expand Up @@ -547,7 +549,7 @@ static void VS_CC mvrecalculateCreate(const VSMap *in, VSMap *out, void *userDat
{data->vectors, rpStrictSpatial},
};

vsapi->createVideoFilter(out, "Recalculate", data->vi, mvrecalculateGetFrame, mvrecalculateFree, fmParallel, deps, 2, data, core);
vsapi->createVideoFilter(out, "Recalculate", data->vi, mvrecalculateGetFrame, mvrecalculateFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVSCDetection.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "Fakery.h"
#include "MVAnalysisData.h"
#include "CommonMacros.h"




Expand Down Expand Up @@ -130,7 +132,7 @@ static void VS_CC mvscdetectionCreate(const VSMap *in, VSMap *out, void *userDat
{data->node, rpStrictSpatial},
{data->vectors, rpStrictSpatial},
};
vsapi->createVideoFilter(out, "SCDetection", data->vi, mvscdetectionGetFrame, mvscdetectionFree, fmParallel, deps, 2, data, core);
vsapi->createVideoFilter(out, "SCDetection", data->vi, mvscdetectionGetFrame, mvscdetectionFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down
4 changes: 3 additions & 1 deletion src/MVSuper.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include <VSHelper4.h>

#include "MVFrame.h"
#include "CommonMacros.h"



typedef struct MVSuperData {
Expand Down Expand Up @@ -269,7 +271,7 @@ static void VS_CC mvsuperCreate(const VSMap *in, VSMap *out, void *userData, VSC
{data->node, rpStrictSpatial}
};

vsapi->createVideoFilter(out, "Super", &data->vi, mvsuperGetFrame, mvsuperFree, fmParallel, deps, 1, data, core);
vsapi->createVideoFilter(out, "Super", &data->vi, mvsuperGetFrame, mvsuperFree, fmParallel, deps, ARRAY_SIZE(deps), data, core);
}


Expand Down

0 comments on commit 02d06a5

Please sign in to comment.