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().
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.
* 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
* 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.
* 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.
* 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
* app/composite/gimp-composite-regression.c: Added functions to
print the pixels in their various formats.
* app/composite/gimp-composite-{mmx,sse,sse2}.c: Removed the dodge
optimisation because it has the same problem that the divide
optimisation has.
* app/composite/make-install.py: When generating tests, use a
pixel field of random values.
* app/composite/gimp-composite-3dnow.c:
Incorrectly reported the inverse of whether not the 3dNow instruction set is
supported by the current CPU.
* app/composite/gimp-composite-{mmx,sse}.c:
Removed linkage of gimp_composite_divide_*. Something is
inexplicably broken, and this will get people working again
while I debug. This should close bug #125101.
* app/composite/make-install.py: migrated to new (trimmer) code and
removed dead code. Some beautification for generated code.
* app/composite/gimp-composite-{mmx,sse,sse2,3dnow,altivec,vis,generic}.{c,h}:
All init() functions are also a run-time check and now expected to
return TRUE/FALSE if the particular set of compositing functions can
be used.
* app/composite/gimp-composite.c: No longer has to determine if
the particular set of compositing functions can be used.
* app/composite/gimp-composite-{mmx,sse,sse2,3dnow,altivec,vis}-{install,test}.c:
Regenerated
* app/composite/test-composite.c: Deprecated, removed. All tests are automatically
generated and the code is in app/composite/gimp-composite-{mmx,sse,sse2,3dnow,altivec,vis}-test.c:
* app/composite/Makefile.am: removed unused references to test-composite.c
* app/composite/: Regenerated installers and testers.
* app/composite/make-install.py: increased tests of pixels to 1024*1024+1
* app/composite/gimp-composite-mmx.c (gimp_composite_overlay_rgba8_rgba8_rgba_mmx):
Backed out of the current build. Although the unit tests all
pass, the emperical evidence is that something is wrong with it.
* app/composite/gimp-composite-{mmx,sse,altivec,vis}-{installer,test}.c:
regnerated
* app/composite/gimp-composite-sse.c
(gimp_composite_overlay_rgba8_rgba8_rgba8_sse): fixed (rewrote)
* app/composite/make-installer.py:
command line option --iterations to set the number of iterations for a test.
command line option --n_ixels to set the number of pixels for a test.
* app/composite/gimp-composite-mmx.c
(gimp_composite_grain_merge_rgba8_rgba8_rgba8_mmx): fixed (rewrote)
(gimp_composite_overlay_rgba8_rgba8_rgba8_mmx): fixed (rewrote)
(gimp_composite_value_rgba8_rgba8_rgba8_mmx):
new testing shows it to be broken (temporarily removed from use)
* app/composite/make-installer.py: generate smaller tables and
less code. Now takes real command line options:
options:
--version show program's version number and exit
-h, --help show this help message and exit
-f FILE, --file=FILE the input object file
-t, --test generate regression testing code
-r REQUIRES, --requires=REQUIRES cpp #if conditionals
See Makefile.am for how I use these options to generate the code.
* app/composite/gimp-composite-altivec-{installer,test}.c:
* app/composite/gimp-composite-generic-{installer,test}.c:
* app/composite/gimp-composite-mmx-{installer,test}.c
* app/composite/gimp-composite-sse-{installer,test}.c:
* app/composite/gimp-composite-vis-{installer,test}.c: regenerated
with smaller tables and less ode.
* composite/ modularisation of the automatic compositing function
"wiring" to construct the table of compositing functions at
run-time instead of compile time.
The environment variable GIMP_COMPOSITE is a hexadecimal number
representing a bit-field used to set/reset options in the
gimp-composite code.
* gimp-composite-altivec.[ch]: added
* gimp-composite-altivec-installer.[ch]: added
* gimp-composite-vis.[ch]: added
* gimp-composite-vis-installer.[ch]: added
* gimp-composite-mmx-installer.[ch]: added
* gimp-composite-sse-installer.[ch]: added
* gimp-composite-altivec-test.[ch]: added
* gimp-composite-vis-test.[ch]: added
* gimp-composite-mmx-test.[ch]: added
* gimp-composite-sse-test.[ch]: added
* make-installer.py: Added meta programme for generating code to
1) construct a table of compositing functions indexed by
operation, and the pixel formats of the sources and destination,
and 2) generating code for regression testing of these compositing
functions against the same functions in gimp-composite-generic.c
* gimp-composite-mmx.c (xxxgimp_composite_overlay_rgba8_rgba8_rgba8_mmx):
removing from the current set of optimisations because it appears
to be broken.
* Makefile.am: modified regression testing targets to now build
gimp-composite-*-test where * is any of generic, mmx, sse,
altivec, and vis.
* gimp-composite.c: moved in initialisation code
gimp_composite_init() from gimp-composite-dispatch.c
* gimp-composite.c: removed gimp_composite_unsupported().
* gimp-composite.c: use cpu_accel() to determine at run-time which
set of optimisations are to be used.
* gimp-composite.c: conditionally compile code for ARCH_X86.
* make-gimp-composite-dispatch.c: retired. See make-installer.py
* gimp-composite-mmx.c (op_overlay): namespace cleanup, op_overlay()
and all of the constant values are now static
* gimp-composite-mmx.c, gimp-composite-sse.c: fixed bug with the
alpha mask being the address of the alpha mask, not the mask
itself.
* app/paint-funcs/paint-funcs.c: Check gimp_composite_options.use
to see if we should use the new code or the old code.