vo_opengl: require --enable-gpl3 for nnedi

There are claims that nnedi3.c doesn't constitute its own new
implementation, but is derived from existing HLSL or OpenCL shaders
distributed under the LGPLv3 license.

Until these are resolved, do the "correct" thing and require
--enable-gpl3 to build nnedi.
This commit is contained in:
wm4 2015-12-03 09:32:40 +01:00
parent 57e691b901
commit 17507b5935
6 changed files with 40 additions and 2 deletions

View File

@ -12,6 +12,9 @@ the code to LGPLv2.1+ at a later point without asking the contributor. (This
is a safeguard for making potential relicensing of the project to LGPLv2.1+
easier.) Using a more liberal license compatible to LGPLv2.1+ is also ok.
Some GPLv3 or LGPLv3 code in mpv can be enabled by building with --enable-gpl3,
and in this case, the resulting binaries must be distributed under GPLv3.
For information about authors and contributors, consult the git log, which
contains the complete SVN and CVS history as well.

View File

@ -976,6 +976,7 @@ cat > $TMPC << EOF
#define HAVE_SSE4_INTRINSICS 1
#define HAVE_C11_TLS 1
#define HAVE_EGL_ANGLE 0
#define HAVE_GPL3 1
#ifdef __OpenBSD__
#define DEFAULT_CDROM_DEVICE "/dev/rcd0c"

View File

@ -18,10 +18,15 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* The shader portions may have been derived from existing LGPLv3 shaders
* (see below), possibly making this file effectively LGPLv3.
*/
#include "nnedi3.h"
#if HAVE_NNEDI
#include <assert.h>
#include <stdint.h>
#include <float.h>
@ -233,3 +238,21 @@ void pass_nnedi3(GL *gl, struct gl_shader_cache *sc, int planes, int tex_num,
i, tex_num, tex_num, tex_num, i, tex_mul);
}
}
#else
const struct m_sub_options nnedi3_conf = {0};
const float* get_nnedi3_weights(const struct nnedi3_opts *conf, int *size)
{
return NULL;
}
void pass_nnedi3(GL *gl, struct gl_shader_cache *sc, int planes, int tex_num,
int step, float tex_mul, const struct nnedi3_opts *conf,
struct gl_transform *transform)
{
}
#endif

View File

@ -23,9 +23,12 @@
#ifndef MP_GL_NNEDI3_H
#define MP_GL_NNEDI3_H
#include "config.h"
#include "common.h"
#include "utils.h"
#define HAVE_NNEDI HAVE_GPL3
#define NNEDI3_UPLOAD_UBO 0
#define NNEDI3_UPLOAD_SHADER 1

View File

@ -459,8 +459,11 @@ const struct m_sub_options gl_video_conf = {
OPT_FLOAT("sharpen", unsharp, 0),
OPT_CHOICE("prescale", prescale, 0,
({"none", 0},
{"superxbr", 1},
{"nnedi3", 2})),
{"superxbr", 1}
#if HAVE_NNEDI
, {"nnedi3", 2}
#endif
)),
OPT_INTRANGE("prescale-passes",
prescale_passes, 0, 1, MAX_PRESCALE_PASSES),
OPT_FLOATRANGE("prescale-downscaling-threshold",

View File

@ -10,6 +10,11 @@ from waftools.checks.custom import *
build_options = [
{
'name': '--gpl3',
'desc': 'GPL3 license',
'default': 'disable',
'func': check_true
}, {
'name': '--cplayer',
'desc': 'mpv CLI player',
'default': 'enable',