IMPORTANT NOTE: This is not the latest version of render.library. The
latest version is v40.8 and it is available from dev/misc/renderlib.lha.
The reason why this version is still here is that v31 is the last version
of render.library implemented in assembler. It is much faster than v40
which is implemented in C and doesn't have any major new features over
v31. That's why you might want to use v31 instead if you care about
performance. Source code included.
render.library is an amiga shared library that serves an image
processing kernel. it is an interface between truecolor and
chunky graphics, and it supports all amiga-specific pixel and
color schemes. render.library provides palette-management,
histograms, alpha-channel processing, color reduction, scaling,
rendering, dithering, texture-mapping, and many conversion and
this archive provides the original version, which was
implemented in 68k assembler. source code is included. it is
written in fairly optimized mc680x0 assembler code. due to
non-portability of assembler code, the render.library project
is now feature-freezed, and the source codes have been made
available to the public.
feel free to improve the code, add features, and eliminate
bugs. i would like to integrate your contributions to the
project, but I strongly appeal you to not release API
modifications that breach downwards-compatibility under the
same name, since render.library is used by a couple of
concurrent software projects.
render.library is released under the terms of a BSD-style
license. see COPYING for details. don't take it too serious,
there is no need to change texts in existing software.
> technical issues
render.library is entirely written in 68020-68060 assembler,
and mostly optimized for performance. optimization is not
kept at a constant high level, though. general applicability
was preferred over speed, and some parts of the code are
pretty much outdated (namely the chunky-2-planar conversion).
the library evolved very slowly. some early parts have been
written back in 1992, the latest bugfixes (prior to this
release) have been applied in 1999. several quirks and bugs
remain, though. shortcomings:
- palette-sorting crashed when a digital-tree histogram was
passed to SortPalette() for sort-modes requiring the
RND_Histogram argument. i 'bugfixed' the function (v29.1) by
returning SORTP_NOT_IMPLEMENTED in this case, thus bypassing
the buggy code.
- render.library still uses old custom memcopy and memset
routines limited to blocks of 16 megabytes. strange enough
i've never encountered problems with it, but this is to be
interpreted as a bug, since the limit does not comply to any
definitions and is never caught. if you want to replace the
memcopy function, please keep in mind that it must support
- most loops are unrolled, but not all unrolled loops have
been made superscalar.
- texture-mapping is implemented in a sloppy way, i expect
many latent problems with undefined number ranges,
inaccuracies, etc. in addition to that, it is only weakly
optimized. note: the texture-mapping code looks awful, and i
would rather rewrite the whole thing than ever touch a line
of it again.
- some objects are internally protected with semaphores for
safe use in a multitasking environment. that was a bad
design choice. protection should have taken place in the
application space. it cannot be removed anymore, as some
software built on top depends on it.
- labels and comments are in a strange mixture between
english and german.
> build instructions
0. cd to the src directory
1. adjust cpu type in Render_lib.asm
2. genam incdir include: -vp=68020/68881 bdw inconce Render_lib.asm
3. copy Render_lib to LIBS:render.library