Skip to content

Commit

Permalink
Add GNU General Public License
Browse files Browse the repository at this point in the history
  • Loading branch information
mawen1250 committed Oct 19, 2014
1 parent e7dffbf commit a43429f
Show file tree
Hide file tree
Showing 10 changed files with 857 additions and 14 deletions.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions include/Gaussian.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef GAUSSIAN_H_
#define GAUSSIAN_H_

Expand Down
39 changes: 28 additions & 11 deletions include/Helper.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef HELPER_H_
#define HELPER_H_

Expand Down Expand Up @@ -63,17 +82,6 @@ int stride_cal(int width)
}


template < typename T >
T * newbuff(const T * src, int xoffset, int yoffset,
int bufheight, int bufwidth, int bufstride, int height, int width, int stride)
{
T * dst = vs_aligned_malloc<T>(sizeof(T)*bufheight*bufstride, Alignment);

data2buff(dst, src, xoffset, yoffset, bufheight, bufwidth, bufstride, height, width, stride);

return dst;
}

template < typename T >
void data2buff(T * dst, const T * src, int xoffset, int yoffset,
int bufheight, int bufwidth, int bufstride, int height, int width, int stride)
Expand Down Expand Up @@ -108,6 +116,15 @@ void data2buff(T * dst, const T * src, int xoffset, int yoffset,
}
}

template < typename T >
T * newbuff(const T * src, int xoffset, int yoffset,
int bufheight, int bufwidth, int bufstride, int height, int width, int stride)
{
T * dst = vs_aligned_malloc<T>(sizeof(T)*bufheight*bufstride, Alignment);
data2buff(dst, src, xoffset, yoffset, bufheight, bufwidth, bufstride, height, width, stride);
return dst;
}

template < typename T >
void freebuff(T * buff)
{
Expand Down
19 changes: 19 additions & 0 deletions include/MSR.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef MSR_H_
#define MSR_H_

Expand Down
19 changes: 19 additions & 0 deletions include/MSRCP.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef MSRCP_H_
#define MSRCP_H_

Expand Down
19 changes: 19 additions & 0 deletions include/Specification.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef SPECIFICATION_H_
#define SPECIFICATION_H_

Expand Down
19 changes: 19 additions & 0 deletions source/Gaussian.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#include "Gaussian.h"


Expand Down
19 changes: 19 additions & 0 deletions source/MSR.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#include <cmath>
#include "Helper.h"
#include "Gaussian.h"
Expand Down
25 changes: 22 additions & 3 deletions source/MSRCP.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#include "MSRCP.h"


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


static void VS_CC MSRCPInit(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi)
void VS_CC MSRCPInit(VSMap *in, VSMap *out, void **instanceData, VSNode *node, VSCore *core, const VSAPI *vsapi)
{
MSRCPData *d = reinterpret_cast<MSRCPData *>(*instanceData);

vsapi->setVideoInfo(d->vi, 1, node);
}

static const VSFrameRef *VS_CC MSRCPGetFrame(int n, int activationReason, void **instanceData, void **frameData, VSFrameContext *frameCtx, VSCore *core, const VSAPI *vsapi)
const VSFrameRef *VS_CC MSRCPGetFrame(int n, int activationReason, void **instanceData, void **frameData, VSFrameContext *frameCtx, VSCore *core, const VSAPI *vsapi)
{
const MSRCPData *d = reinterpret_cast<MSRCPData *>(*instanceData);

Expand Down Expand Up @@ -47,7 +66,7 @@ static const VSFrameRef *VS_CC MSRCPGetFrame(int n, int activationReason, void *
return nullptr;
}

static void VS_CC MSRCPFree(void *instanceData, VSCore *core, const VSAPI *vsapi)
void VS_CC MSRCPFree(void *instanceData, VSCore *core, const VSAPI *vsapi)
{
MSRCPData *d = reinterpret_cast<MSRCPData *>(instanceData);

Expand Down
19 changes: 19 additions & 0 deletions source/VSPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/*
* Retinex filter - VapourSynth plugin
* Copyright (C) 2014 mawen1250
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#include "MSRCP.h"


Expand Down

0 comments on commit a43429f

Please sign in to comment.