Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-bad
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Justin Kim
gst-plugins-bad
Commits
07d6b7f5
Commit
07d6b7f5
authored
Oct 19, 2017
by
Andreas Frisch
Committed by
Sebastian Dröge
Oct 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lcms: Add LCMS ICC color correction element
https://bugzilla.gnome.org/show_bug.cgi?id=765927
parent
519ead24
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1058 additions
and
0 deletions
+1058
-0
configure.ac
configure.ac
+11
-0
ext/Makefile.am
ext/Makefile.am
+8
-0
ext/colormanagement/Makefile.am
ext/colormanagement/Makefile.am
+11
-0
ext/colormanagement/gstcolormanagement.c
ext/colormanagement/gstcolormanagement.c
+37
-0
ext/colormanagement/gstlcms.c
ext/colormanagement/gstlcms.c
+889
-0
ext/colormanagement/gstlcms.h
ext/colormanagement/gstlcms.h
+102
-0
No files found.
configure.ac
View file @
07d6b7f5
...
...
@@ -2480,6 +2480,15 @@ AG_GST_CHECK_FEATURE(LADSPA, [ladspa], ladspa, [
AC_SUBST(LRDF_CFLAGS)
])
dnl *** LCM2 ***
#translit(dnm, m, l) AM_CONDITIONAL(USE_LCMS2, true)
AG_GST_CHECK_FEATURE(LCMS2, [LCMS colormanagement plugin], lcms2, [
PKG_CHECK_MODULES(LCMS2, lcms2 >= 2.7, HAVE_LCMS2="yes", [
HAVE_LCMS2="no"
])
AC_SUBST(LCMS2_LIBS)
])
dnl *** LV2 ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LV2, true)
AG_GST_CHECK_FEATURE(LV2, [lv2], lv2, [
...
...
@@ -3454,6 +3463,7 @@ AM_CONDITIONAL(USE_KATE, false)
AM_CONDITIONAL(USE_KMS, false)
AM_CONDITIONAL(USE_TIGER, false)
AM_CONDITIONAL(USE_LADSPA, false)
AM_CONDITIONAL(USE_LCMS2, false)
AM_CONDITIONAL(USE_LV2, false)
AM_CONDITIONAL(USE_LIBDE265, false)
AM_CONDITIONAL(USE_LIBMMS, false)
...
...
@@ -3739,6 +3749,7 @@ ext/assrender/Makefile
ext/bs2b/Makefile
ext/bz2/Makefile
ext/chromaprint/Makefile
ext/colormanagement/Makefile
ext/curl/Makefile
ext/dash/Makefile
ext/dc1394/Makefile
...
...
ext/Makefile.am
View file @
07d6b7f5
...
...
@@ -22,6 +22,12 @@ else
BZ2_DIR
=
endif
if
USE_LCMS2
COLORMANAGEMENT_DIR
=
colormanagement
else
COLORMANAGEMENT_DIR
=
endif
if
USE_CHROMAPRINT
CHROMAPRINT_DIR
=
chromaprint
else
...
...
@@ -401,6 +407,7 @@ SUBDIRS=\
$(AUDIOFILE_DIR)
\
$(BS2B_DIR)
\
$(BZ2_DIR)
\
$(COLORMANAGEMENT_DIR)
\
$(CHROMAPRINT_DIR)
\
$(CURL_DIR)
\
$(DASH_DIR)
\
...
...
@@ -467,6 +474,7 @@ DIST_SUBDIRS = \
assrender
\
bs2b
\
bz2
\
colormanagement
\
chromaprint
\
curl
\
dash
\
...
...
ext/colormanagement/Makefile.am
0 → 100644
View file @
07d6b7f5
plugin_LTLIBRARIES
=
libgstcolormanagement.la
libgstcolormanagement_la_SOURCES
=
gstcolormanagement.c
\
gstlcms.c
libgstcolormanagement_la_CFLAGS
=
$(GST_PLUGINS_BASE_CFLAGS)
$(GST_CFLAGS)
$(LCMS2_CFLAGS)
libgstcolormanagement_la_LIBADD
=
$(GST_PLUGINS_BASE_LIBS)
-lgstvideo-1
.0
$(GST_LIBS)
$(LCMS2_LIBS)
libgstcolormanagement_la_LDFLAGS
=
$(GST_PLUGIN_LDFLAGS)
libgstcolormanagement_la_LIBTOOLFLAGS
=
$(GST_PLUGIN_LIBTOOLFLAGS)
noinst_HEADERS
=
gstlcms.h
ext/colormanagement/gstcolormanagement.c
0 → 100644
View file @
07d6b7f5
/*
* GStreamer gstreamer-colormanagement
* Copyright (C) 2016 Andreas Frisch <fraxinas@dreambox.guru>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstlcms.h"
static
gboolean
plugin_init
(
GstPlugin
*
plugin
)
{
return
gst_element_register
(
plugin
,
"lcms"
,
GST_RANK_NONE
,
GST_TYPE_LCMS
);
}
GST_PLUGIN_DEFINE
(
GST_VERSION_MAJOR
,
GST_VERSION_MINOR
,
colormanagement
,
"Color management correction plugins"
,
plugin_init
,
VERSION
,
GST_LICENSE
,
GST_PACKAGE_NAME
,
GST_PACKAGE_ORIGIN
);
ext/colormanagement/gstlcms.c
0 → 100644
View file @
07d6b7f5
This diff is collapsed.
Click to expand it.
ext/colormanagement/gstlcms.h
0 → 100644
View file @
07d6b7f5
/*
* GStreamer gstreamer-lcms
* Copyright (C) 2016 Andreas Frisch <fraxinas@dreambox.guru>
*
* gstlcms.h
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_LCMS_H__
#define __GST_LCMS_H__
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/video/gstvideofilter.h>
#include <lcms2.h>
G_BEGIN_DECLS
typedef
enum
{
GST_LCMS_INTENT_PERCEPTUAL
=
0
,
GST_LCMS_INTENT_RELATIVE_COLORIMETRIC
,
GST_LCMS_INTENT_SATURATION
,
GST_LCMS_INTENT_ABSOLUTE_COLORIMETRIC
,
}
GstLcmsIntent
;
#define GST_TYPE_LCMS_INTENT (gst_lcms_intent_get_type ())
typedef
enum
{
GST_LCMS_LOOKUP_METHOD_UNCACHED
=
0
,
GST_LCMS_LOOKUP_METHOD_PRECALCULATED
,
GST_LCMS_LOOKUP_METHOD_CACHED
,
GST_LCMS_LOOKUP_METHOD_FILE
,
}
GstLcmsLookupMethod
;
#define GST_TYPE_LCMS_LOOKUP_METHOD (gst_lcms_lookup_method_get_type ())
#define GST_TYPE_LCMS (gst_lcms_get_type())
#define GST_LCMS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_LCMS,GstLcms))
#define GST_LCMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_LCMS,GstLcmsClass))
#define GST_LCMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_LCMS,GstLcmsClass))
#define GST_IS_LCMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_LCMS))
#define GST_IS_LCMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_LCMS))
typedef
struct
_GstLcms
GstLcms
;
typedef
struct
_GstLcmsClass
GstLcmsClass
;
/**
* GstLcms:
*
* Opaque data structure.
*/
struct
_GstLcms
{
GstVideoFilter
videofilter
;
/* < private > */
gboolean
embeddedprofiles
;
GstLcmsIntent
intent
;
GstLcmsLookupMethod
lookup_method
;
cmsHPROFILE
cms_inp_profile
,
cms_dst_profile
;
cmsHTRANSFORM
cms_transform
;
cmsUInt32Number
cms_inp_format
,
cms_dst_format
;
gchar
*
inp_profile_filename
;
gchar
*
dst_profile_filename
;
guint32
*
color_lut
;
gboolean
preserve_black
;
void
(
*
process
)
(
GstLcms
*
lcms
,
GstVideoFrame
*
inframe
,
GstVideoFrame
*
outframe
);
};
struct
_GstLcmsClass
{
GstVideoFilterClass
parent_class
;
};
G_GNUC_INTERNAL
GType
gst_lcms_get_type
(
void
);
G_GNUC_INTERNAL
GType
gst_lcms_intent_get_type
(
void
);
G_END_DECLS
#endif
/* __GST_LCMS_H__ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment