Commit Graph

146 Commits

Author SHA1 Message Date
Sven Neumann 0e5030ba5f use gulong instead of u_long. Should fix bug #352221.
2006-08-22  Sven Neumann  <sven@gimp.org>

        * app/composite/gimp-composite-regression.[ch]: use gulong instead
        of u_long. Should fix bug #352221.
2006-08-22 15:55:40 +00:00
Sven Neumann fd972c23dc need to test for GIMP_COMPOSITE_OPTION_NOEXTENSIONS.
2006-06-02  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite.c (gimp_composite_use_cpu_accel):
	need to test for GIMP_COMPOSITE_OPTION_NOEXTENSIONS.

	* libgimp/gimp.c (gimp_config): call gimp_set_use_cpu_accel() from
	here, not in gimp_main().

	* plug-ins/common/sel_gauss.c: applied patch from Loren Merritt
	that adds MMX code to boost the plug-in speed (bug #342860).
2006-06-02 11:36:16 +00:00
Sven Neumann db75625d27 Moved the CPU detection code to libgimpbase (see bug #342860):
2006-06-02  Sven Neumann  <sven@gimp.org>

	Moved the CPU detection code to libgimpbase (see bug #342860):

	* app/base/Makefile.am
	* app/base/cpu-accel.[ch]
	* app/base/test-cpu-accel.c: removed here...

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpcpuaccel.[ch]

	* libgimpbase/test-cpu-accel.c: ... and added here again with
	some API changes.

	* app/composite/Makefile.am
	* app/composite/make-installer.py: changed accordingly.

	* app/composite/gimp-composite-*-installer.c: regenerated.

	* libgimp/gimp.c (gimp_main): call gimp_set_use_cpu_accel().
2006-06-02 09:58:03 +00:00
Sven Neumann 6c25ae9374 Added basic framework for plug-ins to access the use_cpu_accel
2006-06-01  Sven Neumann  <sven@gimp.org>

	Added basic framework for plug-ins to access the use_cpu_accel
	configuration (bug #342860):

	* app/composite/gimp-composite.[ch]: added new function
	gimp_composite_use_cpu_accel().

	* libgimpbase/gimpprotocol.[ch]: added use_cpu_accel to the config
	message.

	* app/plug-in/gimppluginmanager-call.c: pass the return value of
	gimp_composite_use_cpu_accel() for config.use_cpu_accel.

	* libgimp/gimp.[ch]: make the config value accessible by means of
	a new function gimp_use_cpu_accel().

	* libgimp/gimp.def: updated.
2006-06-01 15:34:58 +00:00
Sven Neumann 905e61a230 applied patch from Mukund that replaces remaining movntq instructions in
2006-05-10  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-mmx.c
	(gimp_composite_swap_rgba8_rgba8_rgba8_mmx): applied patch from
	Mukund that replaces remaining movntq instructions in MMX assembly
	(bug #162778).
2006-05-10 09:35:33 +00:00
Sven Neumann b60b1372ab generate const arrays.
2006-04-19  Sven Neumann  <sven@gimp.org>

	* app/composite/make-installer.py: generate const arrays.

	* app/composite/gimp-composite-altivec-installer.c
	* app/composite/gimp-composite-generic-installer.c
	* app/composite/gimp-composite-mmx-installer.c
	* app/composite/gimp-composite-sse-installer.c
	* app/composite/gimp-composite-sse2-installer.c: regenerated.
2006-04-19 14:46:51 +00:00
Sven Neumann 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Sven Neumann 9b33aa2a09 removed unused global arrays.
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite.c: removed unused global arrays.
2006-04-06 14:10:48 +00:00
Manish Singh 85b38140d9 app/base/cpu-accel.c app/composite/gimp-composite-3dnow.h
2006-02-27  Manish Singh  <yosh@gimp.org>

        * app/base/cpu-accel.c
        * app/composite/gimp-composite-3dnow.h
        * app/composite/gimp-composite-mmx.h
        * app/composite/gimp-composite-sse.h
        * app/composite/gimp-composite-sse2.h: check for __PIC__ in addition
        to PIC.
2006-02-28 06:34:16 +00:00
Raphael Quinet 2219548fe9 updated so that the code does not add trailing whitespace in generated
2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* app/composite/make-installer.py (print_function_table): updated
	so that the code does not add trailing whitespace in generated
	function tables.
2006-01-17 13:15:15 +00:00
Raphael Quinet 7d8998a99c automatically removed trailing whitespace from 3460 lines.
2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* (about 130 *.[ch] files): automatically removed trailing
	whitespace from 3460 lines.
2006-01-17 12:43:50 +00:00
Sven Neumann f478549bf1 replaced binary operations with a naive but faster implementation using a
2005-09-28  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs-generic.h (swap_pixels): replaced
	binary operations with a naive but faster implementation using a
	local variable.

	* app/composite/gimp-composite-generic.c
	(gimp_composite_swap_any_any_any_generic): same change here.
2005-09-27 23:10:26 +00:00
Manish Singh e5fe84afb0 ypto 2005-08-01 05:19:45 +00:00
Manish Singh f7b14365aa app/composite/Makefile.am fix code generation filenames.
2005-07-31  Manish Singh  <yosh@gimp.org>

        * app/composite/Makefile.am
        * app/composite/make-installer.py: fix code generation filenames.
2005-08-01 05:16:44 +00:00
Manish Singh c286b386fd Oops 2005-08-01 04:55:11 +00:00
Manish Singh b55753bb21 acinclude.m4 m4macros/Makefile.am new macro: GIMP_DETECT_CFLAGS; used to
2005-07-31  Manish Singh  <yosh@gimp.org>

        * acinclude.m4
        * m4macros/Makefile.am
        * m4macros/detectcflags.m4: new macro: GIMP_DETECT_CFLAGS; used
        to detect which of a set of compiler options a compiler supports.

        * configure.in: use the above for the altivec and -fno-strict-aliasing
        flags. Also, use it to detect the presence of -mmmx and -msse, since
        those are needed to compile even MMX/SSE assembly with gcc 4.0. Define
        MMX/SSE_EXTRA_CFLAGS.

        * app/composite/Makefile.am: compile each of the composite flavors
        into their own library, so we can use automake's per-target CFLAGS.
        Use MMX/SSE/ALTIVEC_EXTRA_CFLAGS in the appropriate places. Build
        libappcomposite.a out of the resulting objects.

        * app/composite/gimp-composite-3dnow.c
        * app/composite/gimp-composite-altivec.c
        * app/composite/gimp-composite-mmx.c
        * app/composite/gimp-composite-sse.c
        * app/composite/gimp-composite-sse2.c
        * app/composite/gimp-composite-vis.c
        * app/composite/make-installer.py: move the _init functions into
        the installers, so only actually mmx/sse/etc. code gets compiled
        under the appropriate CFLAGS.

        * app/composite/gimp-composite-3dnow-installer.c
        * app/composite/gimp-composite-altivec-installer.c
        * app/composite/gimp-composite-mmx-installer.c
        * app/composite/gimp-composite-sse-installer.c
        * app/composite/gimp-composite-sse2-installer.c
        * app/composite/gimp-composite-vis-installer.c: regenerated.

        * app/composite/gimp-composite.c: remove useless cpu-accel.h include.
2005-08-01 04:45:34 +00:00
Helvetix Victorinox f41b1f24f6 Trying to be more flexible in register use so the compiler can do reloads
* app/composite/gimp-composite-sse2.c:
Trying to be more flexible in register use so the compiler can do
reloads without running out of registers when using optimisation
modes other than 2.

Avoid the message "error: can't find a register in class
`GENERAL_REGS' while reloading `asm'"

* app/composite/gimp-composite-x86.h
Use more newlines in asm() macros to ensure that gcc gets the
instruction count correct.  This is partially complete as of this
commit.
2005-05-17 17:24:26 +00:00
Helvetix Victorinox 386afe43f9 app/composite/gimp-composite-altivec-installer.c reverted to working
* app/composite/gimp-composite-altivec-installer.c
* app/composite/gimp-composite-altivec-test.c: reverted to working
versions.  Currently, if you regenerate the installers and
testers, only those that work on your current machine will be
generated properly.
2005-05-15 01:08:31 +00:00
Helvetix Victorinox ddc5175908 Fixed signedness problems is calls to gimp_rgb_to_hsv_int() and the like.
* app/composite/gimp-composite-generic.c:
Fixed signedness problems is calls to gimp_rgb_to_hsv_int() and the like.

* app/composite/gimp-composite-mmx.[ch]:
Small fixes to register clobber lists.
Added gimp_composite_subtract_va8_va8_va8_mmx.

Regenerated
2005-05-14 23:17:56 +00:00
Manish Singh 2789014d06 Revert so that altivec code is used again. 2005-05-14 06:36:49 +00:00
Helvetix Victorinox 8bdac41d56 Updated with proper register clobber lists. Some code clean-up
(removing dead code, commented out code).  Renegerated installers
and testers.
2005-05-14 03:10:13 +00:00
Helvetix Victorinox 32ca225aa0 Repaired a latent bug in gimp_composite_lighten_rgba8_rgba8_rgba8_sse2
* app/composite/gimp-composite-sse2.c: Repaired a latent bug in
gimp_composite_lighten_rgba8_rgba8_rgba8_sse2 where setting up
the alpha masks were not done correctly.  A redundant (better?)
fix to bug #164061

Use movntq instructions to avoid processor cache pollution.

Some adjustments to register allocation specifications.
2005-05-10 05:26:11 +00:00
Sven Neumann 260bf6e8ba applied a patch from Joao S. O. Bueno Calligaris that changes the SSE2
2005-05-06  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-sse2.c
	(gimp_composite_lighten_rgba8_rgba8_rgba8_sse2): applied a patch
	from Joao S. O. Bueno Calligaris that changes the SSE2 code to
	load the proper register. Fixes bug #164061.
2005-05-06 12:30:51 +00:00
Hans Breuer 28a2b13581 build menus with nmake, too menus/Makefile.am : added to EXTRA_DIST
2005-04-24  Hans Breuer  <hans@breuer.org>

	* menus/makefile.msc : build menus with nmake, too
	  menus/Makefile.am : added to EXTRA_DIST

	* **/makefile.msc app/gimpcore.def : updated

	* app/base/tmp-buf.c : there is no pid_t with msvc so typedef one
2005-04-24 15:39:15 +00:00
Manish Singh f34d1972cd More accelerated functions (screen, grain_merge, grain_extract, divide,
2005-03-19  Manish Singh  <yosh@gimp.org>

        * app/composite/gimp-composite-altivec.[ch]: More accelerated functions
        (screen, grain_merge, grain_extract, divide, dodge) from Frederic
        Leroy.

        * app/composite/gimp-composite-altivec-installer.c
        * app/composite/gimp-composite-altivec-test.c: regenerated.
2005-03-19 20:25:36 +00:00
Manish Singh fe77740159 More accelerated functions (multiply, blend) from Frederic Leroy.
2005-03-19  Manish Singh  <yosh@gimp.org>

        * app/composite/gimp-composite-altivec.[ch]: More accelerated functions
        (multiply, blend) from Frederic Leroy.

        * app/composite/gimp-composite-altivec-installer.c
        * app/composite/gimp-composite-altivec-test.c: regenerated.
2005-03-19 08:35:15 +00:00
Manish Singh b023ed0797 More accelerated functions from Frederic Leroy.
2005-03-13  Manish Singh  <yosh@gimp.org>

        * app/composite/gimp-composite-altivec.[ch]: More accelerated functions
        from Frederic Leroy.

        * app/composite/gimp-composite-altivec-installer.c
        * app/composite/gimp-composite-altivec-test.c: regenerated.
2005-03-13 21:44:32 +00:00
Sven Neumann f05ebb54b6 delete trailing whitespace.
2005-03-10  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-altivec.c: delete trailing whitespace.
2005-03-10 18:52:46 +00:00
Manish Singh c47f05563e Oops 2005-03-06 11:17:17 +00:00
Manish Singh ec558dfac2 contort it to compile with Apple's weirdo gcc.
2003-03-06  Manish Singh  <yosh@gimp.org>

        * app/composite/gimp-composite-altivec.c: contort it to compile with
        Apple's weirdo gcc.

        * app/composite/gimp-composite-altivec.h: honor USE_ALTIVEC.
2005-03-06 11:16:22 +00:00
Manish Singh 7846ed68db app/composite/gimp-composite-altivec-installer.c regenerated so the new
2003-03-06  Manish Singh  <yosh@gimp.org>

        * app/composite/gimp-composite-altivec-installer.c
        * app/composite/gimp-composite-altivec-test.c: regenerated so the new
        implementation is actually used.
2005-03-06 09:11:46 +00:00
Manish Singh 9a263bb917 revised tests for AltiVec. Define ALTIVEC_EXTRA_CFLAGS for the extra
2003-03-06  Manish Singh  <yosh@gimp.org>

        * configure.in: revised tests for AltiVec. Define ALTIVEC_EXTRA_CFLAGS
        for the extra compiler options needed. Also, support runtime checking
        for AltiVec through the sysctl on Mac OS X, instead of SIGILL assembly
        instruction checking, which needs GNU as.

        * app/base/cpu_accel.c: use the sysctl if available.

        * app/composite/Makefile.am: use ALTIVEC_EXTRA_CFLAGS.

        * app/composite/gimp-composite-altivec.c: conditionally #include
        altivec.h
2005-03-06 08:43:25 +00:00
Helvetix Victorinox ef6c61fb5e app/composite/gimp-composite-altivec.[ch]
* app/composite/gimp-composite-altivec.[ch]
* app/composite/gimp-composite-altivec-installer.c
* app/composite/gimp-composite-altivec-test.c:
Added updates from starox-gimp@starox.org
(Frederic Leroy) to implement Altivec instruction optimisations.

Regenerated sources.

* app/composite/gimp-composite-mmx.c: Replaced a pesky movntq
instruction with a movq.  Movntq is an SSE instruction, not an MMX
instruction.
2005-03-06 05:57:10 +00:00
Helvetix Victorinox 35d83c2758 app/composite/gimp-composite-generic.c app/composite/gimp-composite-mmx.c
* app/composite/gimp-composite-generic.c
* app/composite/gimp-composite-mmx.c
* app/composite/gimp-composite-sse.c
Incorporated a very clean patch from starox-gimp@starox.org
(Frederic Leroy) which improves the generic performance of the
burn compositing function.  Speed is improved at a cost of a 64k
look-up table which is probably manageable for 8bpp images, but at
larger bpp images (which currently are not supported by the GIMP)
this is unlikely to be tolerable.

The generic C implementation of the burn function uses this
look-up table, the mmx/sse implementations have been commented out.
2005-03-05 17:29:21 +00:00
Helvetix Victorinox e6d4e36906 Applied patch from starox-gimp@starox.org (Frederic Leroy) which fixed the
* app/composite/make-installer.py:Applied patch from
starox-gimp@starox.org (Frederic Leroy) which fixed the parser of
the nm programme output to understand the output on 64bit
machines.  Fixes bug #168529

* app/composite/ns.py:
Applied patch from starox-gimp@starox.org (Frederic Leroy) which
fixed a bug that would appear when only one compositing function
was implemented.  Fixes bug #168529

										Regenerated app/composite function tables.
2005-03-04 07:39:47 +00:00
Daniel Egger 0add60298a app/base/Makefile.am app/composite/*akefile.am app/config/*akefile.am
2005-02-27  Daniel Egger  <de@axiros.com>

	* app/base/Makefile.am
	* app/composite/*akefile.am
	* app/config/*akefile.am
	* app/core/*akefile.am
	* app/display/*akefile.am
	* app/file/*akefile.am
	* app/paint-funcs/*akefile.am
	* app/pdb/*akefile.am
	* app/plug-in/*akefile.am
	* app/text/*akefile.am
	* app/tools/*akefile.am
	* app/vectors/*akefile.am
	* app/xcf/*akefile.am: Commonized include paths to always look
	in the builddir also to cater for srcdir != builddir builds.
2005-02-27 13:22:01 +00:00
Sven Neumann 9511753a02 check for gthread-2.0 unless the --disable-mp option is given.
2005-02-13  Sven Neumann  <sven@gimp.org>

	* configure.in: check for gthread-2.0 unless the --disable-mp
	option is given.

	* app/app_procs.c (app_libs_init): call g_thread_init().

	* app/base/pixel-processor.c: ported to GThread.

	* app/Makefile.am
	* app/*/Makefile.am: use @GTHREAD_CFLAGS@.
2005-02-13 15:08:08 +00:00
Raphael Quinet 7ce0dfc741 minor doc fix for formula used by
2005-01-26  Raphael Quinet  <raphael@gimp.org>

	* app/composite/gimp-composite-generic.c: minor doc fix for
	formula used by gimp_composite_multiply_any_any_any_generic().
2005-01-26 06:22:06 +00:00
Sven Neumann 829fc5a061 app/composite/gimp-composite-x86.h applied patch from Andreas Jochens that
2005-01-07  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite-x86.h
	* app/composite/gimp-composite-sse.c: applied patch from Andreas
	Jochens that fixes the build on amd64 with gcc-4.0 (bug #163041).
2005-01-07 12:23:44 +00:00
Sven Neumann 4f06153115 do nothing if the color has no saturation. Patch by Joao S. Bueno. Fixes
2004-10-30  Sven Neumann  <sven@gimp.org>

        * app/composite/gimp-composite-generic.c
        (gimp_composite_hue_any_any_any_generic): do nothing if the color
        has no saturation. Patch by Joao S. Bueno. Fixes bug #123296.
2004-10-30 18:42:09 +00:00
Helvetix Victorinox bac9cfa083 a regression test now iterates over 8388625 pixels per pass.
* app/composite/gimp-composite-*test.c: a regression test now
	iterates over 8388625 pixels per pass.

* app/composite/gimp-composite-mmx.c
* app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-sse2.c:
	Ensured that a clobbered condition code register is reflected in
	the clobbered register list for each asm() statement.
	This should FIX bug #147013.
2004-09-03 02:53:19 +00:00
Helvetix Victorinox 072bd88d4f Regression tests now include printing the image type for each test.
* Added gimp_composite_addition_va8_va8_va8_mmx():
* Regression tests now include printing the image type for each test.
* Regenerated
2004-09-02 02:46:31 +00:00
Helvetix Victorinox ed055fa66f app/composite/gimp-composite-x86.h app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-x86.h
* app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-sse2.c: Fixed a bunch of
  warnings due to bad type casting.
2004-08-29 21:06:31 +00:00
Helvetix Victorinox cbdcd0ee54 app/composite/gimp-composite-mmx.c app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-mmx.c
* app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-x86.h
* app/composite/gimp-composite-sse2.c:
  The last changes to fix the the clobber registers bug #147013.
  Commented out some dead code to be reviewed later.
2004-08-29 20:07:06 +00:00
Helvetix Victorinox 8a3bdf5297 app/composite/gimp-composite-sse.c More updates to accomodate the clobber
* app/composite/gimp-composite-sse.c
* app/composite/gimp-composite-sse2.c: More updates to accomodate
  the clobber registers. Additional progress against bug #147013.

* app/composite/gimp-composite-sse.h: Fixed a bug where the wrong
  manifest constant definition caused sse2 instructions to never be
  compiled.
2004-08-28 21:21:07 +00:00
Sven Neumann aab25cdc36 now that the output depends on --verbose, enable it for stable releases
2004-07-20  Sven Neumann  <sven@gimp.org>

	* app/composite/gimp-composite.c (gimp_composite_init): now that
	the output depends on --verbose, enable it for stable releases also.
2004-07-20 16:55:39 +00:00
Helvetix Victorinox c7c91f333a Updated make-installer.py command line to take advantage of the new
* app/composite/Makefile.am (regenerate): Updated make-installer.py
command line to take advantage of the new compile time method of
determining which instruction set to compile.
2004-07-20 16:33:58 +00:00
Helvetix Victorinox 54630be219 Print the list of active instruction sets if the --verbose command line
* app/composite/gimp-composite.c (gimp_composite_init): Print the
list of active instruction sets if the --verbose command line
switch is ON (via be_verbose)

* app/composite/gimp-composite-x86.h: Factored code from the mmx,
and sse implementations.

* app/composite/make-installer.py: Raised the number of test
iterations from 1 to 10.

* app/composite/gimp-composite-3dnow.[ch]
* app/composite/gimp-composite-3dnow-test.c
* app/composite/gimp-composite-3dnow-installer.c
* app/composite/gimp-composite-altivec.[ch]
* app/composite/gimp-composite-altivec-test.c
* app/composite/gimp-composite-altivec-installer.c
* app/composite/gimp-composite-mmx.[ch]
* app/composite/gimp-composite-altivec-test.c
* app/composite/gimp-composite-altivec-installer.c
* app/composite/gimp-composite-sse.[ch]
* app/composite/gimp-composite-sse-test.c
* app/composite/gimp-composite-sse-installer.c
* app/composite/gimp-composite-sse2.[ch]
* app/composite/gimp-composite-sse2-test.c
* app/composite/gimp-composite-sse2-installer.c
* app/composite/gimp-composite-vis.[ch]
* app/composite/gimp-composite-vis-test.c:
Regenerated sources via make-installer.py
2004-07-20 15:59:12 +00:00
Sven Neumann 03b3f8c90f app/app_procs.c app/base/base.[ch] pass "be_verbose" to the base and
2004-07-20  Sven Neumann  <sven@gimp.org>

	* app/app_procs.c
	* app/base/base.[ch]
	* app/composite/gimp-composite.[ch]: pass "be_verbose" to the base
	and composite subsystems.
2004-07-20 14:33:22 +00:00
Helvetix Victorinox d02bc5453b More clobber register corrections. 2004-07-20 06:33:03 +00:00