| Commit message (Collapse) | Author | Age |
... | |
| |
|
|
|
|
| |
Done this way, it is easily extendable to also handle LUTs.
|
| |
|
|
|
|
|
| |
This is neccesary to be able to access state of source/destination from within
registered conversions.
|
|
|
|
| |
Trailing whitespaces, tabs, etc.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
spotted by massimo, before this fix BABL_TOLERANCE < 0.1 and != 0 was not
possible.
|
|
|
|
|
| |
atof is locale dependent; it was being used two places parsing floating point
values from environment variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In babl-internal.h there are two different ways of calling real_babl_log.
One matches the macro definitions of babl_log which expects an arbitrary
number of parameters, and the other is to pass a va_list used to access
those parameters. The latter case can be found in the function definition
of babl_log when an appropriate macro definition is not selected.
It may be that some platforms implement varargs in such a way that
passing a va_list pointing to the params of another call stack is the
same as passing those parameters directly, but that definitely isn't
the case on mac OS X, where this results in corrupted strings when
calling babl_log or babl_fatal.
The solution here is to create a varargs-enabled version of real_babl_log
that accepts a va_list, and have all calls eventually call into that.
(This may not be seen under normal configurations. This was discovered
while trying to build with a hand-crafted config.h in Xcode.)
|
|
|
|
|
| |
The ref pixels are stored in babl/babl-ref-pixels.inc which
is generated by tools/babl-gen-test-pixels.
|
|
|
|
|
| |
There is no valid way to trigger these paths, and the BABL_IS_BABL
call on image data produces false positives (see bug 698913).
|
| |
|
|
|
|
|
|
| |
The user data is available in the callback functions, no ABI change only
processing functions interested in this data needs to define the arguments,..
keeping ABI compatibility.
|
| |
|
| |
|
|
|
|
|
| |
This option provides a hit in multithreaded use, and should only be enabled
when debugging babl memory allocation internals.
|
|
|
|
|
|
| |
Making all babl objects be free-able with babl_free means that overall
management code can be directly shared between the different
babl-classes.
|
|
|
|
|
|
| |
Re-arranged code making babl_process and babl_fish_process reside
in babl-path-fish.c, where babl_fish_process and babl_fish_path_process
can be inlined with babl_process().
|
|
|
|
|
|
| |
Refactored static variables away and added a lock to protect state
keeping inside the individual BablFormat when permutating possible
conversion paths.
|
|
|
|
|
|
| |
Also added a BABL_DEBUG_MEM define which is set to 1 in babl-internal.h
that can be used to disable these locks which only are nedded when
debugging.
|
|
|
|
|
| |
Mutex abstraction for internal use pthreads by default and critical
sections on win32.
|
|
|
|
|
| |
Make (minimal) use of system's return value to avoid gcc complaining, as
it's declared using the warn_unused_result attribute.
|
|
|
|
|
|
| |
Patch from Gary V. Vaughan
svn path=/trunk/; revision=408
|
|
|
|
|
|
|
|
| |
Apply patch from Gary V. Vaughan that adds configure time checks for
variadic macros and adapts the definitions of such macros in-code
accordingly so that babl can be compiled on more platforms.
svn path=/trunk/; revision=400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-02-24 Sven Neumann <sven@gimp.org>
* */*.c: based on a patch from Gary V. Vaughan, include
"config.h"
before any other header file from all .c files.
* babl/babl-internal.h
* extensions/util.h: instead of including config.h from here,
bail
out if it wasn't included beforehand.
svn path=/trunk/; revision=394
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* babl/babl.h: Instead of including subsystem headers, declare the
functions part of the API directly in the header. The public
types, macros and the version header is still pulled in as
includes but with inclusion guards that prevent them from being
included separately by clients. Notable things removed from the
API is internal class functions and the class instance structs.
(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): New getters to allow the Babl union to
become opaque for clients.
* babl/babl-types.h: New file with public types. Currently only
the opaque Babl union and the linear and planar conversion
function prototypes (which are not used in the API due to the use
of varags but still part of the API for reference) are there. Make
sure it's only included indirectly through babl.h.
* babl/babl-macros.h
* babl/babl-version.h.in: Make sure these are not included
directly, only indirectly through babl.h.
* babl/babl-main.h: Removed, function declarations are in babl.h
now.
* babl/babl-internal.h: Include the headers we now consider
internal, mostly the different class headers.
* babl/babl-class.h: The "named class" function declarations are
now in the public header so move them away from this internal
header.
* babl/babl-image.h
* babl/babl-format.h
* babl/babl-fish.h
* babl/babl-extension.h
* babl/babl-conversion.h
* babl/babl-component.h
* babl/babl-classes.h
* babl/babl-introspect.h
* babl/babl-sampling.h
* babl/babl-model.h
* babl/babl-type.h: Adapt to above changes, move relevant things to babl.h
* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c
* babl/base/model-ycbcr.c
* babl/base/type-float.c: Explicitly #include "babl-classes.h".
* babl/babl-internal.c: s/babl_name/babl_get_name/
* babl/babl-format.c
(babl_format_has_alpha)
(babl_format_get_bytes_per_pixel)
(babl_format_get_num_of_components)
(babl_format_get_type): Implement these.
* babl/Makefile.am: Don't install the now internal headers and
add, remove and install the other headers according to above
changes.
svn path=/trunk/; revision=390
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
revert to having the short variant babl_foo() instead of
babl_foo_from_name().
* babl/babl-class.h
* babl/babl-component.h
* babl/babl-conversion.c
* babl/babl-conversion.h
* babl/babl-extension.h
* babl/babl-fish-path.c
* babl/babl-fish.c
* babl/babl-format.c
* babl/babl-format.h
* babl/babl-image.c
* babl/babl-internal.h
* babl/babl-model.c
* babl/babl-model.h
* babl/babl-type.c
* babl/babl-type.h
* extensions/CIE-Lab.c
* extensions/frequency.c
* extensions/gegl-fixups.c
* extensions/gggl-lies.c
* extensions/gggl.c
* extensions/gimp-8bit.c
* extensions/naive-CMYK.c
* extensions/sse-fixups.c
* tests/grayscale_to_rgb.c
* tests/rgb_to_bgr.c
* tests/rgb_to_ycbcr.c
svn path=/trunk/; revision=389
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
s/babl_foo_destroy/babl_foo_class_destroy/
s/babl_foo_each/babl_foo_class_for_each/
s/babl_foo/babl_foo_from_name/
s/babl_foo_id/babl_foo_from_id/
* babl/babl-class.h
* babl/babl-conversion.c
* babl/babl-core.c
* babl/babl-fish-path.c
* babl/babl-fish-reference.c
* babl/babl-fish-stats.c
* babl/babl-fish.c
* babl/babl-format.c
* babl/babl-image.c
* babl/babl-internal.h
* babl/babl-introspect.c
* babl/babl-model.c
* babl/babl-sampling.c
* babl/babl-sanity.c
* babl/babl-type.c
* babl/babl.c
* babl/base/formats.c
* babl/base/model-gray.c
* babl/base/model-rgb.c
* babl/base/model-ycbcr.c
* babl/base/type-float.c
* babl/base/type-u16.c
* babl/base/type-u32.c
* babl/base/type-u8.c
* extensions/CIE-Lab.c
* extensions/frequency.c
* extensions/gegl-fixups.c
* extensions/gggl-lies.c
* extensions/gggl.c
* extensions/gimp-8bit.c
* extensions/naive-CMYK.c
* extensions/sse-fixups.c
* tests/babl-html-dump.c
* tests/babl_fish_path_fitness.c
* tests/conversions.c
* tests/formats.c
* tests/grayscale_to_rgb.c
* tests/models.c
* tests/rgb_to_bgr.c
* tests/rgb_to_ycbcr.c
* tests/types.c
svn path=/trunk/; revision=381
|
|
|
|
|
|
| |
* babl/babl-internal.h: Formating.
svn path=/trunk/; revision=375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expand to different things depending on if they are used in a
header or a .c file, have two versions: BABL_CLASS_DECLARE() and
BABL_CLASS_IMPLEMENT(). This enables further refactorisations of
the babl.h header.
* babl.h: Do the name changes and remove the unpleasant #undefs at
the bottom.
* babl-internal.h: Do the name changes.
* babl-component.[ch]
* babl-conversion.[ch]
* babl-extension.[ch]
* babl-fish.[ch]
* babl-format.[ch]
* babl-image.h
* babl-model.[ch]
* babl-sampling.h
* babl-type.[ch]: Adjust to changes.
svn path=/trunk/; revision=370
|
|
|
|
|
|
|
|
|
|
|
| |
* babl/babl.h:
* babl/babl-internal.h: Remove BABL_HARD_MAX_PATH_LENGTH from
here, it's only for internal use.
* babl/babl-fish-path.c: #define BABL_HARD_MAX_PATH_LENGTH locally
here.
svn path=/trunk/; revision=361
|
|
|
|
|
|
|
| |
* babl/babl-internal.h (babl_assert): Don't just eek when an
assertion fails, also say exactly what failed.
svn path=/trunk/; revision=359
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-23 Jan Heller <jheller@svn.gnome.org>
Added support for CPU acceleration, RGBA float -> RGB u8 and
RGBA float -> RGBA u8 SSE accelerated conversions.
* babl/Makefile.am: Added babl-cpuaccel.[ch].
* babl/babl-cpuaccel.h:
* babl/babl-cpuaccel.c (babl_cpu_accel_get_support),
(babl_cpu_accel_set_use), (arch_get_vendor), (arch_accel_intel),
(arch_accel_amd), (arch_accel_centaur), (arch_accel_cyrix),
(sigill_handler), (arch_accel_sse_os_support), (arch_accel),
(cpu_accel): Runtime CPU detection code. Ported from GIMP.
* babl/babl-internal.h: Include babl-cpuaccel.h.
* babl/babl-memory.c (babl_malloc): Make babl_malloc align memory to
BABL_ALIGN==16 boundaries.
* babl/babl.c (babl_init): Enabled CPU acceleration.
* configure.ac: Added compile time MMX/SSE/AltiVec detection. Ported
from GIMP.
* extensions/Makefile.am: Added SSE_EXTRA_CFLAGS for sse-fixups.c
compilation.
* extensions/sse-fixups.c (conv_rgbaF_linear_rgb8_linear),
(conv_rgbaF_linear_rgba8_linear), (init): Added RGBA float -> RGB u8
and RGBA float -> RGBA u8 SSE accelerated conversions.
svn path=/trunk/; revision=316
|
|
|
|
|
|
|
|
|
| |
2008-05-21 Sven Neumann <sven@gimp.org>
* babl/babl-internal.h (rint): changed fallback macro to have the
same return type as rint().
svn path=/trunk/; revision=314
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-21 Jan Heller <jheller@svn.gnome.org>
* babl/babl-internal.h:
* babl/base/type-u16.c:
* babl/base/type-u32.c:
* babl/base/type-u8.c:
* extensions/CIE-Lab.c:
* extensions/gegl-fixups.c:
* extensions/gggl-lies.c:
* extensions/gggl.c:
* extensions/gimp-8bit.c:
* extensions/util.h: fallback to floor function when rint function
is not available.
* configure.ac: added check for rint function.
svn path=/trunk/; revision=313
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* babl/Makefile.am: removed babl-classes.h
* babl/babl-classes.h: removed and mostly folded into ...
* babl/babl.h: .. this file, which has been reorganized to contain
each separate class by itself.
* babl/babl-internal.h: simplified code renamed BABL_CLASS_TEMPLATE to
be just BABL_CLASS or BABL_CLASS_MINIMAL.
* babl/babl-fish.c: (babl_fish): do not accept varargs, use use
BABL_CLASS_MINIMAL.
* babl/babl-component.c:
* babl/babl-conversion.c:
* babl/babl-extension.c:
* babl/babl-format.c:
* babl/babl-model.c:
* babl/babl-type.c: use BABL_CLASS instead of BABL_CLASS_TEMPLATE
* babl/babl-hash-table.h:
* babl/babl-list.h:
* babl/babl-db.h: changed include warning since babl-classes doesn't
exist anymore.
svn path=/trunk/; revision=308
|
|
|
|
|
|
|
|
|
| |
2008-04-15 Sven Neumann <sven@gimp.org>
* extensions/util.h
* babl/*.[ch]: removed trailing whitespace.
svn path=/trunk/; revision=307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in babl-fish.c. The current code searches list of all fishes while
looking for suitable preexistent BABL_FISH_PATH instance. The new code
only searches relevant part of database's hash table. Further, the
current code searches for fish path every time such a babl fish is
requested, even though the same fish path has been requested before
and not found. The new code creates dummy BABL_FISH instance with
appropriate source/destination formats and inserts it into the fish
database to indicate that fish path has been searched for and not
found.
* babl/babl-fish.c: (find_fish_path), (find_memcpy_fish),
(babl_fish_get_id), (babl_fish):
* babl/babl-fish-path.c: (babl_fish_path):
* babl/babl-fish-reference.c: (babl_fish_reference):
* babl/babl-fish-simple.c: (babl_fish_simple):
* babl/babl-internal.h:
svn path=/trunk/; revision=304
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-04-02 Mukund Sivaraman <muks@mukund.org>
Sparse fixes.
* babl/babl-internal.h: fflush() takes pointer.
* babl/babl-conversion.c: Don't mix code and declarations.
* babl/babl-fish-reference.c: Fixed array assignment.
svn path=/trunk/; revision=302
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* babl/babl-classes.h:
* babl/babl-conversion.c:
* babl/babl-db.c:
* babl/babl-fish-path.c:
* babl/babl-fish.c:
* babl/babl-format.c:
* babl/babl-internal.h:
* babl/babl-introspect.c:
* babl/babl-list.c:
* babl/babl-list.h:
* babl/babl-model.c:
* babl/babl-sampling.c:
* babl/babl-sanity.c:
* babl/babl-type.c:
* babl/babl-util.[ch]: applied patch from Jan Heller that improves
readability by using the newly introduced BablList structure.
svn path=/trunk/; revision=300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-03-22 Sven Neumann <sven@gimp.org>
Applied patch from Jan Heller that introduces list and hash
table
functionality and changes the babl database to use coalesced
hashing (bug #523507):
* babl/Makefile.am
* babl/babl-list.[ch]
* babl/babl-hash-table.[ch]: new files providing list and hash
table functionality.
* babl/babl-internal.h: include the new header files.
* babl/babl-db.[ch]: use the new code.
* babl/babl-fish.c: changed accordingly.
svn path=/trunk/; revision=294
|
|
|
|
|
|
|
|
|
|
|
|
| |
* babl/babl.h:
* babl/babl-classes.h:
* babl/babl-fish-path.c:
* babl/babl-fish-reference.c:
* babl/babl-fish.c:
* babl/babl-internal.[ch]: Const'ified code with Babl*'s refering to
formats.
svn path=/trunk/; revision=260
|
|
|
|
|
|
|
| |
* Modified copyright statement to refer to an URL instead of a civic
address for the Free Software Foundation and the text of the license.
svn path=/trunk/; revision=249
|
|
|
|
|
|
|
|
|
|
| |
have been updated to reflect this change, the permission to use leter
versions of the GNU licenses have been retained in all instances.)
* COPYING: changed to GPLv3
* COPYING.LESSER: added (LGPLv3's overlay over GPLv3)
svn path=/trunk/; revision=243
|
|
|
|
|
|
|
|
| |
* babl/babl-internal.h: applied patch from Tim Mooney fixing bug
#392843, replacing _FUNCTION_ with _func_ which is the C99 equivalent
of the gcc extension.
svn path=/trunk/; revision=197
|