Import Upstream version 0.9.2+dfsg
This commit is contained in:
commit
6281e5f44b
|
@ -0,0 +1,8 @@
|
|||
* Alessandro Furieri <a.furieri@lqt.it>
|
||||
- a lot of improvements to code portability
|
||||
- porting to Windows (MSVC, MinGW)
|
||||
- bug fixes: name clash with zlib & libpng
|
||||
- fluff removal from the code
|
||||
* Francesco P. Lovergine <frankie at debian dot org> from DebianGis project
|
||||
- Maintaining epsilon, libepsilon and GDAL epsilon driver for Debian
|
||||
- Adding versioning support to libepsilon
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,165 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
|
@ -0,0 +1,62 @@
|
|||
[2011-05-27] EPSILON 0.9.2 released
|
||||
|
||||
* Versioning support to libepsilon is added (Francesco P. Lovergine)
|
||||
|
||||
[2011-04-30] EPSILON 0.9.1 released
|
||||
|
||||
* Switch to dual license: GPL-3 and LGPL-3
|
||||
* Automatic verification tests added + HOW-TO on this matter
|
||||
* Bug fixes: remove name clash with zlib & libpng (Alessandro Furieri)
|
||||
* Porting to Windows: MSVC, MinGW (Alessandro Furieri)
|
||||
* Improvements to code portability and fluff removal (Alessandro Furieri)
|
||||
* HOW-TOs on running EPSILON/Cluster and EPSILON/MPI
|
||||
|
||||
[2008-04-06] EPSILON 0.8.1 released
|
||||
|
||||
* Set validation is now disabled by default
|
||||
* The most busiest functions are inlined
|
||||
* RGB->YCbCr conversion now uses look-up tables
|
||||
* number_of_bits() now uses look-up table
|
||||
* Core wavelet filtering routines are optimized
|
||||
* Daubechies 9/7 lifting wavelet transform added
|
||||
* Code clean-up
|
||||
|
||||
[2007-08-31] EPSILON 0.7.1 released
|
||||
|
||||
* MPI support added
|
||||
* Code clean-up
|
||||
|
||||
[2007-07-22] EPSILON 0.6.1 released
|
||||
|
||||
* Clustering support added.
|
||||
* Several bugs are fixed.
|
||||
|
||||
[2007-06-22] EPSILON 0.5.1 released
|
||||
|
||||
* Multi-threading support added.
|
||||
* Decoder robustness improved.
|
||||
* Several bugs are fixed.
|
||||
|
||||
[2007-06-09] EPSILON 0.4.1 released
|
||||
|
||||
* Two-pass variable bit-rate encoding mode added.
|
||||
* Graceful file truncation added.
|
||||
* Manual page added.
|
||||
|
||||
[2007-05-30] EPSILON 0.3.1 released
|
||||
|
||||
* Large file support added.
|
||||
* Substantial code refactoring and clean-up:
|
||||
- No more RAW and COMMENT blocks.
|
||||
- Encryption support is discounted. It is OpenSSL`s job.
|
||||
* Progress indicator and timer are added.
|
||||
|
||||
[2006-11-01] EPSILON 0.2.1 released
|
||||
|
||||
* SPECK encoding now runs several times faster.
|
||||
* A lot of useless code is removed.
|
||||
* All library sources now well-commented.
|
||||
|
||||
[2006-09-13] EPSILON 0.1.1 released
|
||||
|
||||
* This is a first working version!
|
|
@ -0,0 +1,277 @@
|
|||
# Doxyfile 1.4.1-KDevelop
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = EPSILON
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
BRIEF_MEMBER_DESC = NO
|
||||
REPEAT_BRIEF = NO
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = NO
|
||||
#STRIP_FROM_PATH = /home/xander/Projects
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = NO
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
SHOW_DIRECTORIES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
#INPUT = /home/xander/Projects/epsilon
|
||||
INPUT = .
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.idl \
|
||||
*.odl \
|
||||
*.cs \
|
||||
*.php \
|
||||
*.php3 \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.mm \
|
||||
*.dox \
|
||||
*.C \
|
||||
*.CC \
|
||||
*.C++ \
|
||||
*.II \
|
||||
*.I++ \
|
||||
*.H \
|
||||
*.HH \
|
||||
*.H++ \
|
||||
*.CS \
|
||||
*.PHP \
|
||||
*.PHP3 \
|
||||
*.M \
|
||||
*.MM \
|
||||
*.C \
|
||||
*.H \
|
||||
*.tlh \
|
||||
*.diff \
|
||||
*.patch \
|
||||
*.moc \
|
||||
*.xpm \
|
||||
*.dox
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = YES
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = YES
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = ENABLE_ENCRYPTION:=1 \
|
||||
ENABLE_COMMENTS:=1
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = epsilon.tag
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
|
@ -0,0 +1,97 @@
|
|||
[Building EPSILON]
|
||||
|
||||
First of all, if you are not familiar with Autoconf/Automake building
|
||||
system please read INSTALL.generic first. This file contains generic
|
||||
instructions on building software packages.
|
||||
|
||||
In most cases building EPSILON is trivial:
|
||||
|
||||
$ tar -xzvf epsilon-X.Y.Z.tar.gz
|
||||
$ cd epsilon-X.Y.Z
|
||||
$ ./configure
|
||||
$ make
|
||||
# make install
|
||||
# ldconfig
|
||||
|
||||
The only one external dependency required is libpopt. The POPT library
|
||||
is a very handy tool for parsing command-line options. This library is
|
||||
commonly used as a replacement for standard getopt facility.
|
||||
|
||||
If configure script fails to find libpopt you should download and
|
||||
install it before building EPSILON. If you have libpopt installed
|
||||
but configure complains about missing libpopt dependency, check for
|
||||
the `popt.h' header in standard include directories: it is a common
|
||||
practice to separate development packages from commonly-used user
|
||||
packages. For example, if you have RPM-based Linux system try
|
||||
to install `libpopt-devel' package, on Debian - libpopt-dev.
|
||||
|
||||
After installing EPSILON don`t forget to edit your /etc/ld.so.conf
|
||||
and run ldconfig to update system cache of shared libraries.
|
||||
|
||||
[Multi-threading support]
|
||||
|
||||
As of release 0.5.1 EPSILON comes with multi-threading support.
|
||||
That`s really cool if you have SMP machine or at least a computer
|
||||
with multicore CPU! The actual threading backend is POSIX threads
|
||||
or Pthreads for short. So, in order to build multi-threaded
|
||||
EPSILON version you have to have Pthreads on you system. I think
|
||||
it`s not a big problem today: the vast majority of morden Unix-like
|
||||
OS-es already have Pthread support.
|
||||
|
||||
Assuming you have Pthreads on you system pass the `--enable-pthreads'
|
||||
option to configure script. Also, you can specify default and maximal
|
||||
number of threads used by EPSILON:
|
||||
|
||||
$ ./configure --enable-pthreads \
|
||||
--with-def-threads=4 \
|
||||
--with-max-threads=32
|
||||
|
||||
[Clustering support]
|
||||
|
||||
As of release 0.6.1 EPSILON supports clustering mode. This is a
|
||||
very powerful feature if you have several machines linked with a
|
||||
high-capacity network, say gigabit ethernet or even faster.
|
||||
|
||||
To build cluster-aware EPSILON version you should pass special
|
||||
option to configure script. Namely `--enable-cluster':
|
||||
|
||||
$ ./configure --enable-pthreads --enable-cluster
|
||||
|
||||
Note that cluster-aware EPSILON version also relies on threads,
|
||||
so POSIX threads support is required. Nevertheless `--with-def-threads'
|
||||
and `--with-max-threads' options are not applicable here.
|
||||
|
||||
[MPI support]
|
||||
|
||||
As of release 0.7.1 EPSILON supports MPI - Message Passing Interface.
|
||||
MPI is the well-known industry standard for effective and portable
|
||||
parallel programming.
|
||||
|
||||
To build MPI version of EPSILON you should pass `--enable-mpi' option
|
||||
to the configure script and specify MPI compiler wrapper. On most
|
||||
systems this wrapper is called `mpicc':
|
||||
|
||||
$ ./configure --enable-mpi CC=mpicc
|
||||
|
||||
Note that EPSILON/MPI requires a working and configured MPI
|
||||
installation, MPI development libraries and headers.
|
||||
|
||||
[Set validation]
|
||||
|
||||
For debug and development purposes one can enable a feature
|
||||
called "set validation". With this option turned on the program
|
||||
will strictly validate SPECK coding correctness. By default this
|
||||
feature is disabled. Use `--enable-set-validation' to enable it.
|
||||
|
||||
[Building from CVS]
|
||||
|
||||
Checkout latest version from CVS repository:
|
||||
|
||||
$ cvs -z3 -d:pserver:anonymous@epsilon-project.cvs.sourceforge.net:/cvsroot/epsilon-project checkout -P epsilon
|
||||
|
||||
Generate ./configure script
|
||||
|
||||
$ cd epsilon
|
||||
$ make -f Makefile.cvs
|
||||
|
||||
The rest is identical to what is said in "Building EPSILON" section
|
|
@ -0,0 +1,167 @@
|
|||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# not a GNU package. You can remove this line, if
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = foreign 1.4 dist-zip
|
||||
|
||||
SUBDIRS = lib src filters tools man tests
|
||||
|
||||
dist_noinst_DATA = Doxyfile INSTALL.generic
|
||||
|
||||
EXTRA_DIST = makefile.vc nmake.opt libepsilon.def CONTRIBUTORS README.cluster README.mpich README.testing
|
|
@ -0,0 +1,645 @@
|
|||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(dist_noinst_DATA) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||
COPYING.LESSER ChangeLog INSTALL NEWS TODO config.guess \
|
||||
config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
DATA = $(dist_noinst_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# not a GNU package. You can remove this line, if
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = foreign 1.4 dist-zip
|
||||
SUBDIRS = lib src filters tools man tests
|
||||
dist_noinst_DATA = Doxyfile INSTALL.generic
|
||||
EXTRA_DIST = makefile.vc nmake.opt libepsilon.def CONTRIBUTORS README.cluster README.mpich README.testing
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
|
||||
distclean distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,96 @@
|
|||
[2011-05-27] EPSILON 0.9.2 released
|
||||
|
||||
This release adds versioning support to libepsilon and
|
||||
contains updated version of autotools-related files.
|
||||
Source code is not changed.
|
||||
|
||||
[2011-04-30] EPSILON 0.9.1 released
|
||||
|
||||
EPSILON 0.9.1 is available for download!
|
||||
|
||||
This version includes automatic verification test suite,
|
||||
portability improvements, bug fixes, HOW-TOs on running
|
||||
EPSILON/Cluster and EPSILON/MPI.
|
||||
|
||||
Also EPSILON has been switched to dual license: GPL-3 and LGPL-3
|
||||
|
||||
[2008-04-06] EPSILON 0.8.1 released
|
||||
|
||||
EPSILON 0.8.1 is available for download!
|
||||
|
||||
The main feature of this release is speed improvement.
|
||||
Several performance-critical parts of the library were
|
||||
optimized and now EPSILON runs about 30% faster than
|
||||
previous version.
|
||||
|
||||
Check it out!
|
||||
|
||||
[2007-08-31] EPSILON 0.7.1 released
|
||||
|
||||
EPSILON 0.7.1 is available for download!
|
||||
|
||||
The main feature of this release is MPI support. Message
|
||||
Passing Interface is the well-known industry standard for
|
||||
effective and portable parallel programming. Now EPSILON
|
||||
runs full-speed on powerful clusters!
|
||||
|
||||
Enjoy the EPSILON!
|
||||
|
||||
[2007-07-22] EPSILON 0.6.1 released
|
||||
|
||||
EPSILON 0.6.1 is available for download!
|
||||
|
||||
The main feature of this release is clustering mode support.
|
||||
Now you can distribute image processing on several machines.
|
||||
With a high-capacity network you will get substantial speed-up!
|
||||
|
||||
As of release 0.5.1, EPSILON offers multi-threading mode.
|
||||
This mode is perfect for multi-core CPUs and SMP machines.
|
||||
|
||||
For a maximum portability you can also build thread- and
|
||||
cluster-unaware EPSILON version.
|
||||
|
||||
Among new features, this release also includes some bug fixes.
|
||||
|
||||
Enjoy the EPSILON, feel the power!
|
||||
|
||||
[2007-06-22] EPSILON 0.5.1 released
|
||||
|
||||
Cheers! EPSILON 0.5.1 is available for download!
|
||||
The main feature of this release is multi-threading
|
||||
support. Now EPSILON runs full speed on SMP machines!
|
||||
EPSILON decoder is also improved in terms of fault-tolerance:
|
||||
even heavily-corrupted and malformed images can be
|
||||
synchronized and decoded. This release also includes
|
||||
some bug fixes. So, at every turn EPSILON becomes better,
|
||||
faster and robust!
|
||||
|
||||
[2007-06-09] EPSILON 0.4.1 released
|
||||
|
||||
EPSILON 0.4.1 is available for download!
|
||||
The main feature in new release is two-pass variable
|
||||
bit-rate (VBR) encoding mode. VBR mode gives essential
|
||||
image quality boost. Another feature is a command for
|
||||
graceful file truncation. And the last but not the
|
||||
least, we added handy user manual. Enjoy!
|
||||
|
||||
[2007-05-30] EPSILON 0.3.1 released
|
||||
|
||||
Cheers! EPSILON 0.3.1 is available for download!
|
||||
There is a number of changes in this release. First of all,
|
||||
a lot of useless code is removed. The program was substantively
|
||||
refactored and now looks much more pretty. New feature in this
|
||||
release is a large file support: now EPSILON can process
|
||||
HUGE images!
|
||||
|
||||
[2006-11-01] EPSILON 0.2.1 released
|
||||
|
||||
EPSILON is an OpenSource wavelet compressor. This development
|
||||
release is several times faster than previous one. A lot of
|
||||
complicated code in SPECK encoder is rewritten in much more
|
||||
simple and clean fashion. All library sources now carefully
|
||||
commented.
|
||||
|
||||
[2006-09-13] EPSILON 0.1.1 released
|
||||
|
||||
This is a first working version!
|
|
@ -0,0 +1,16 @@
|
|||
[About EPSILON]
|
||||
|
||||
EPSILON is a powerful OpenSource wavelet image compressor.
|
||||
Wavelet-driven compressors are know to be much more effective
|
||||
than traditional DCT-based ones (like JPEG). At the moment,
|
||||
the program supports 30+ different wavelet filters, runs
|
||||
in parallel in multi-threaded and MPI environments, can
|
||||
process HUGE images and much more!
|
||||
|
||||
EPSILON web site: http://epsilon-project.sourceforge.net/
|
||||
|
||||
[Feedback]
|
||||
|
||||
Your feedback is welcome. Feel free to contact me if you
|
||||
need assistance in building, porting or maintaining EPSILON
|
||||
on your platform.
|
|
@ -0,0 +1,26 @@
|
|||
[Running EPSILON cluster]
|
||||
|
||||
1. Build EPSILON with cluster support (see INSTALL for details)
|
||||
|
||||
2. Run `epsilon --start-node' on each SLAVE node. Default port 2718
|
||||
can be changed using `--port' option. EPSILON node daemon logs
|
||||
messages to syslog using `daemon' facility.
|
||||
|
||||
3. Create file with list of cluster nodes on MASTER server.
|
||||
File format: user@host:port^number_of_CPUs
|
||||
|
||||
host - EPSILON node's hostname or IP
|
||||
port - EPSILON node's port
|
||||
number_of_CPUs - number of simultaneous connections to that SLAVE node
|
||||
user - SSH login (used by start_epsilon_nodes.pl and stop_epsilon_nodes.pl)
|
||||
|
||||
4. Run epsilon from MASTER server as usual but pass `--node-list' option.
|
||||
Check logs on SLAVE nodes.
|
||||
|
||||
5. There are several default places for epsilon.nodes file.
|
||||
Please consult manual on this matter
|
||||
|
||||
6. There are two helper script start_epsilon_nodes.pl and stop_epsilon_nodes.pl
|
||||
that can be used to simplify starting/stopping EPSILON nodes.
|
||||
These script run `epsilon --start-node' on hosts, listed in
|
||||
epsilon.nodes file using DSH - Distributed SHell.
|
|
@ -0,0 +1,40 @@
|
|||
[Running MPI-enabled EPSILON version]
|
||||
|
||||
This example describes configuration of MPICH on Debian Lenny.
|
||||
If you have another MPI implementation or different system,
|
||||
please adjust instructions below to fit your needs. In the latter
|
||||
cases your short HOW-TOs are welcome!
|
||||
|
||||
1. Install MPICH
|
||||
|
||||
apt-get install mpich-bin libmpich1.0-dev mpi-doc
|
||||
|
||||
2. Build EPSILON with MPI support (see INSTALL for details)
|
||||
|
||||
3. Configure MPI environment (simplest case follows):
|
||||
|
||||
3.1 Edit machines file: /etc/mpich/machines.LINUX:
|
||||
==8<==
|
||||
# <cluster node's hostname or IP>:<number of CPUs (not required)>
|
||||
localhost
|
||||
==8<==
|
||||
|
||||
3.2 Generate SSH keys and put MASTER's public key into the ~/.ssh/authorized_keys
|
||||
file on each SLAVE cluster node: mpirun script will run epsilon's binary
|
||||
using SSH on each of them multiple times - one process for each
|
||||
processor you requested. Leave pass-phrase empty:
|
||||
|
||||
Example: ssh-keygen -b 1024 -t rsa
|
||||
|
||||
3.3 Check connectivity to all SLAVE cluster nodes:
|
||||
tstmachines -v
|
||||
Trying true on localhost ...
|
||||
Trying ls on localhost ...
|
||||
Trying user program on localhost ...
|
||||
|
||||
4. Install EPSILON on each SLAVE cluster node (into the same location
|
||||
or accessible via $PATH) or configure NFS or alike for that purpose.
|
||||
|
||||
5. Run EPSILON from MASTER node (using 32 processors):
|
||||
|
||||
mpirun -v -np 32 /path/to/epsilon /path/to/image_on_master_node.pgm
|
|
@ -0,0 +1,25 @@
|
|||
[Running EPSILON tests]
|
||||
|
||||
As of release 0.9.1 EPSILON has a test suite written in Perl.
|
||||
|
||||
1. Install required Perl modules
|
||||
|
||||
- Readonly
|
||||
- Params::Validate
|
||||
- Test::Exception
|
||||
|
||||
2. Install required external packages
|
||||
|
||||
- netpbm
|
||||
|
||||
3. Prepare at least one EPSILON build (generic, pthreads, cluster, mpi)
|
||||
using scripts from the tests/build directory of source tree.
|
||||
|
||||
4. Run tests
|
||||
|
||||
prove -v tests/t/*.t
|
||||
|
||||
Some tests (e.g. verification.t) are very long and can take several hours to complete.
|
||||
Each test (*.t) has a description in the begining of a file. You can check it out.
|
||||
|
||||
Your test reports either successful or unsuccessful are welcome.
|
|
@ -0,0 +1,17 @@
|
|||
[TODO list]
|
||||
|
||||
Nearest plans include:
|
||||
|
||||
- More extensive testing of platforms other than Linux: *BSD,
|
||||
Solaris, OSX, Windows etc. If you succeed in building EPSILON
|
||||
on these systems please drop me an email.
|
||||
|
||||
- Extending test suite. As of release 0.9.1 EPSILON has a flexible
|
||||
testing framework written in Perl. At the moment of writing test
|
||||
suite consists of two tests: complete verification test (all build
|
||||
types, all filters, all block sizes all applicable modes etc.) and
|
||||
quick check.
|
||||
|
||||
- Try using CUDA in computation extensive parts.
|
||||
|
||||
- Extend documentation, write tutorials.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,124 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 to enable cluster mode */
|
||||
#undef ENABLE_CLUSTER
|
||||
|
||||
/* Define to 1 to enable MPI support */
|
||||
#undef ENABLE_MPI
|
||||
|
||||
/* Define to 1 to enable POSIX threads support */
|
||||
#undef ENABLE_PTHREADS
|
||||
|
||||
/* Define to 1 to enable set validation */
|
||||
#undef ENABLE_SET_VALIDATION
|
||||
|
||||
/* Define to 1 if you have the `accept' function. */
|
||||
#undef HAVE_ACCEPT
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the `bind' function. */
|
||||
#undef HAVE_BIND
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#undef HAVE_FLOCK
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
#undef HAVE_FORK
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `listen' function. */
|
||||
#undef HAVE_LISTEN
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
#undef HAVE_SETSID
|
||||
|
||||
/* Define to 1 if you have the `setsockopt' function. */
|
||||
#undef HAVE_SETSOCKOPT
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#undef HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `waitpid' function. */
|
||||
#undef HAVE_WAITPID
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,204 @@
|
|||
dnl
|
||||
dnl $Id: configure.in,v 1.32 2011/05/27 10:47:34 simakov Exp $
|
||||
dnl
|
||||
|
||||
AC_INIT(configure.in)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(epsilon, 0.9.2)
|
||||
|
||||
AC_LANG_C
|
||||
AC_PROG_CC
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl Library code modified: REVISION++
|
||||
dnl Interfaces changed/added/removed: CURRENT++ REVISION=0
|
||||
dnl Interfaces added: AGE++
|
||||
dnl Interfaces removed: AGE=0
|
||||
LT_CURRENT=1
|
||||
LT_REVISION=0
|
||||
LT_AGE=0
|
||||
AC_SUBST(LT_CURRENT)
|
||||
AC_SUBST(LT_REVISION)
|
||||
AC_SUBST(LT_AGE)
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl
|
||||
dnl Check for POPT library
|
||||
dnl
|
||||
|
||||
AC_CHECK_HEADER([popt.h], [have_popt_h=yes],)
|
||||
AC_CHECK_LIB([popt], [poptGetContext], [have_popt_lib=yes], ,)
|
||||
|
||||
if test x$have_popt_h = xyes -a x$have_popt_lib = xyes ; then
|
||||
LIBS="$LIBS -lpopt"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
=================================================
|
||||
Configure script failed to find popt library!
|
||||
You can download it from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/
|
||||
=================================================])
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl POSIX threads support
|
||||
dnl
|
||||
|
||||
AH_TEMPLATE([ENABLE_PTHREADS], [Define to 1 to enable POSIX threads support])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
pthreads,
|
||||
AC_HELP_STRING([--enable-pthreads], [Enable POSIX threads support [[default=no]]]),
|
||||
[
|
||||
if test x$enableval = xyes ; then
|
||||
AC_CHECK_HEADER([pthread.h], [have_pthread_h=yes],)
|
||||
AC_CHECK_LIB([pthread], [pthread_create], [have_pthread_lib=yes], ,)
|
||||
|
||||
if test x$have_pthread_h = xyes -a x$have_pthread_lib = xyes ; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
AC_DEFINE([ENABLE_PTHREADS], [1],)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
=================================================
|
||||
Configure script failed to find pthread library!
|
||||
Try `--disable-pthreads' option.
|
||||
=================================================])
|
||||
fi
|
||||
fi
|
||||
],
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Default number of threads
|
||||
dnl
|
||||
|
||||
AC_ARG_WITH(def-threads,
|
||||
AC_HELP_STRING([--with-def-threads=N], [Default number of threads]),
|
||||
[
|
||||
CFLAGS="$CFLAGS -DDEF_N_THREADS=$withval"
|
||||
AC_MSG_CHECKING(default number of threads)
|
||||
AC_MSG_RESULT($withval)
|
||||
]
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Maximal number of threads
|
||||
dnl
|
||||
|
||||
AC_ARG_WITH(max-threads,
|
||||
AC_HELP_STRING([--with-max-threads=N], [Maximal number of threads]),
|
||||
[
|
||||
CFLAGS="$CFLAGS -DMAX_N_THREADS=$withval"
|
||||
AC_MSG_CHECKING(maximal number of threads)
|
||||
AC_MSG_RESULT($withval)
|
||||
]
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Cluster mode
|
||||
dnl
|
||||
|
||||
AH_TEMPLATE([ENABLE_CLUSTER], [Define to 1 to enable cluster mode])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
cluster,
|
||||
AC_HELP_STRING([--enable-cluster], [Enable cluster mode [[default=no]]]),
|
||||
[
|
||||
if test x$enableval = xyes ; then
|
||||
AC_CHECK_HEADERS([sys/types.h sys/socket.h sys/wait.h netinet/in.h arpa/inet.h syslog.h signal.h fcntl.h unistd.h], [],
|
||||
AC_MSG_ERROR([
|
||||
=================================================
|
||||
Configure script failed to enable cluster mode!
|
||||
Try `--disable-cluster' option.
|
||||
=================================================]))
|
||||
AC_CHECK_FUNCS([socket setsockopt bind listen accept fork setsid waitpid sigaction flock], [],
|
||||
AC_MSG_ERROR([
|
||||
=================================================
|
||||
Configure script failed to enable cluster mode!
|
||||
Try `--disable-cluster' option.
|
||||
=================================================]))
|
||||
AC_CHECK_HEADER([pthread.h], [have_pthread_h=yes],)
|
||||
AC_CHECK_LIB([pthread], [pthread_create], [have_pthread_lib=yes], ,)
|
||||
|
||||
if test x$have_pthread_h = xyes -a x$have_pthread_lib = xyes ; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
AC_DEFINE([ENABLE_PTHREADS], [1],)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
=================================================
|
||||
Configure script failed to enable cluster mode!
|
||||
Try `--disable-cluster' option.
|
||||
=================================================])
|
||||
fi
|
||||
|
||||
AC_DEFINE([ENABLE_CLUSTER], [1],)
|
||||
fi
|
||||
],
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl MPI support
|
||||
dnl
|
||||
|
||||
AH_TEMPLATE([ENABLE_MPI], [Define to 1 to enable MPI support])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
mpi,
|
||||
AC_HELP_STRING([--enable-mpi], [Enable MPI support [[default=no]]]),
|
||||
[
|
||||
if test x$enableval = xyes ; then
|
||||
AC_CHECK_HEADER([mpi.h], [have_mpi_h=yes],)
|
||||
|
||||
if test x$have_mpi_h = xyes ; then
|
||||
AC_DEFINE([ENABLE_MPI], [1],)
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
=================================================
|
||||
Configure script failed to find MPI library!
|
||||
Try `--disable-mpi' option.
|
||||
=================================================])
|
||||
fi
|
||||
fi
|
||||
],
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Enable set validation
|
||||
dnl
|
||||
|
||||
AH_TEMPLATE([ENABLE_SET_VALIDATION], [Define to 1 to enable set validation])
|
||||
|
||||
AC_ARG_ENABLE(
|
||||
set-validation,
|
||||
AC_HELP_STRING([--enable-set-validation], [Enable set validation [[default=no]]]),
|
||||
[
|
||||
if test x$enableval = xyes ; then
|
||||
AC_DEFINE([ENABLE_SET_VALIDATION], [1],)
|
||||
fi
|
||||
],
|
||||
)
|
||||
|
||||
AC_OUTPUT(
|
||||
Makefile
|
||||
src/Makefile
|
||||
filters/Makefile
|
||||
tools/Makefile
|
||||
lib/Makefile
|
||||
man/Makefile
|
||||
tests/lib/EPSILON/Makefile
|
||||
tests/lib/Test/PBM/Makefile
|
||||
tests/lib/Test/Makefile
|
||||
tests/lib/Makefile
|
||||
tests/t/Makefile
|
||||
tests/Makefile
|
||||
tests/build/Makefile
|
||||
tests/images/Makefile
|
||||
)
|
||||
|
||||
dnl
|
||||
dnl Output current VERSION into separate header file.
|
||||
dnl This is a workaround for platforms that have no
|
||||
dnl autotools support.
|
||||
dnl
|
||||
|
||||
echo "#define VERSION \"$VERSION\"" > src/epsilon_version.h
|
|
@ -0,0 +1,589 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2007-03-29.01
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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 General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -0,0 +1,13 @@
|
|||
INCLUDES =
|
||||
METASOURCES = AUTO
|
||||
dist_noinst_DATA = haar.filter \
|
||||
daub4.filter daub6.filter daub8.filter daub10.filter daub12.filter \
|
||||
daub14.filter daub16.filter daub18.filter daub20.filter \
|
||||
beylkin.filter vaidyanathan.filter \
|
||||
coiflet6.filter coiflet12.filter coiflet18.filter \
|
||||
coiflet24.filter coiflet30.filter symmlet8.filter \
|
||||
symmlet10.filter symmlet12.filter symmlet14.filter \
|
||||
symmlet16.filter symmlet18.filter symmlet20.filter \
|
||||
odegard97.filter daub97.filter \
|
||||
cdf53.filter cdf93.filter cdf133.filter cdf173.filter \
|
||||
villa1311.filter
|
|
@ -0,0 +1,342 @@
|
|||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = filters
|
||||
DIST_COMMON = $(dist_noinst_DATA) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DATA = $(dist_noinst_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES =
|
||||
METASOURCES = AUTO
|
||||
dist_noinst_DATA = haar.filter \
|
||||
daub4.filter daub6.filter daub8.filter daub10.filter daub12.filter \
|
||||
daub14.filter daub16.filter daub18.filter daub20.filter \
|
||||
beylkin.filter vaidyanathan.filter \
|
||||
coiflet6.filter coiflet12.filter coiflet18.filter \
|
||||
coiflet24.filter coiflet30.filter symmlet8.filter \
|
||||
symmlet10.filter symmlet12.filter symmlet14.filter \
|
||||
symmlet16.filter symmlet18.filter symmlet20.filter \
|
||||
odegard97.filter daub97.filter \
|
||||
cdf53.filter cdf93.filter cdf133.filter cdf173.filter \
|
||||
villa1311.filter
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu filters/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu filters/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: beylkin.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="beylkin" name="Beylkin" type="orthogonal">
|
||||
<info>
|
||||
The Beylkin filter places roots for the frequency response function
|
||||
close to the Nyquist frequency on the real axis.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.099305765374
|
||||
0.424215360813
|
||||
0.699825214057
|
||||
0.449718251149
|
||||
-0.110927598348
|
||||
-0.264497231446
|
||||
0.026900308804
|
||||
0.155538731877
|
||||
-0.017520746267
|
||||
-0.088543630623
|
||||
0.019679866044
|
||||
0.042916387274
|
||||
-0.017460408696
|
||||
-0.014365807969
|
||||
0.010040411845
|
||||
0.001484234782
|
||||
-0.002736031626
|
||||
0.000640485329
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: cdf133.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="cdf133" name="Cohen Daubechies Feauveau 13/3" type="biorthogonal">
|
||||
<info>
|
||||
A. Cohen, I. Daubechies, J. C. Feauveau, "Biorthogonal Bases of
|
||||
Compactly Supported Wavelets," Communications on Pure and
|
||||
Applied Mathematics, vol. 45, no. 5, pp. 485-560, May 1992.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
0.96674755240348
|
||||
0.44746600996961
|
||||
-0.16987135563661
|
||||
-0.10772329869638
|
||||
0.04695630968816
|
||||
0.01381067932004
|
||||
-0.00690533966002
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.70710678118655
|
||||
0.35355339059327
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: cdf173.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="cdf173" name="Cohen Daubechies Feauveau 17/3" type="biorthogonal">
|
||||
<info>
|
||||
A. Cohen, I. Daubechies, J. C. Feauveau, "Biorthogonal Bases of
|
||||
Compactly Supported Wavelets," Communications on Pure and
|
||||
Applied Mathematics, vol. 45, no. 5, pp. 485-560, May 1992.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
0.95164212189717
|
||||
0.46257144047591
|
||||
-0.16382918343409
|
||||
-0.13491307360773
|
||||
0.05299848189069
|
||||
0.02891610982635
|
||||
-0.01294751186254
|
||||
-0.00302108610126
|
||||
0.00151054305063
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.70710678118655
|
||||
0.35355339059327
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: cdf53.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="cdf53" name="Cohen Daubechies Feauveau 5/3" type="biorthogonal">
|
||||
<info>
|
||||
A. Cohen, I. Daubechies, J. C. Feauveau, "Biorthogonal Bases of
|
||||
Compactly Supported Wavelets," Communications on Pure and
|
||||
Applied Mathematics, vol. 45, no. 5, pp. 485-560, May 1992.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
1.06066017177982
|
||||
0.35355339059327
|
||||
-0.17677669529664
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.70710678118655
|
||||
0.35355339059327
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: cdf93.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="cdf93" name="Cohen Daubechies Feauveau 9/3" type="biorthogonal">
|
||||
<info>
|
||||
A. Cohen, I. Daubechies, J. C. Feauveau, "Biorthogonal Bases of
|
||||
Compactly Supported Wavelets," Communications on Pure and
|
||||
Applied Mathematics, vol. 45, no. 5, pp. 485-560, May 1992.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
0.99436891104360
|
||||
0.41984465132952
|
||||
-0.17677669529665
|
||||
-0.06629126073624
|
||||
0.03314563036812
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.70710678118655
|
||||
0.35355339059327
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: coiflet12.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="coiflet12" name="Coiflet C12" type="orthogonal">
|
||||
<info>
|
||||
Coiflet C12 filter.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.016387336463
|
||||
-0.041464936782
|
||||
-0.067372554722
|
||||
0.386110066823
|
||||
0.812723635450
|
||||
0.417005184424
|
||||
-0.076488599078
|
||||
-0.059434418646
|
||||
0.023680171947
|
||||
0.005611434819
|
||||
-0.001823208871
|
||||
-0.000720549445
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: coiflet18.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="coiflet18" name="Coiflet C18" type="orthogonal">
|
||||
<info>
|
||||
Coiflet C18 filter.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
-0.003793512864
|
||||
0.007782596426
|
||||
0.023452696142
|
||||
-0.065771911281
|
||||
-0.061123390003
|
||||
0.405176902410
|
||||
0.793777222626
|
||||
0.428483476378
|
||||
-0.071799821619
|
||||
-0.082301927106
|
||||
0.034555027573
|
||||
0.015880544864
|
||||
-0.009007976137
|
||||
-0.002574517688
|
||||
0.001117518771
|
||||
0.000466216960
|
||||
-0.000070983303
|
||||
-0.000034599773
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: coiflet24.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="coiflet24" name="Coiflet C24" type="orthogonal">
|
||||
<info>
|
||||
Coiflet C24 filter.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.000892313668
|
||||
-0.001629492013
|
||||
-0.007346166328
|
||||
0.016068943964
|
||||
0.026682300156
|
||||
-0.081266699680
|
||||
-0.056077313316
|
||||
0.415308407030
|
||||
0.782238930920
|
||||
0.434386056491
|
||||
-0.066627474263
|
||||
-0.096220442034
|
||||
0.039334427123
|
||||
0.025082261845
|
||||
-0.015211731527
|
||||
-0.005658286686
|
||||
0.003751436157
|
||||
0.001266561929
|
||||
-0.000589020757
|
||||
-0.000259974552
|
||||
0.000062339034
|
||||
0.000031229876
|
||||
-0.000003259680
|
||||
-0.000001784985
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: coiflet30.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="coiflet30" name="Coiflet C30" type="orthogonal">
|
||||
<info>
|
||||
Coiflet C30 filter.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
-0.000212080863
|
||||
0.000358589677
|
||||
0.002178236305
|
||||
-0.004159358782
|
||||
-0.010131117538
|
||||
0.023408156762
|
||||
0.028168029062
|
||||
-0.091920010549
|
||||
-0.052043163216
|
||||
0.421566206729
|
||||
0.774289603740
|
||||
0.437991626228
|
||||
-0.062035963906
|
||||
-0.105574208706
|
||||
0.041289208741
|
||||
0.032683574283
|
||||
-0.019761779012
|
||||
-0.009164231153
|
||||
0.006764185419
|
||||
0.002433373209
|
||||
-0.001662863769
|
||||
-0.000638131296
|
||||
0.000302259520
|
||||
0.000140541149
|
||||
-0.000041340484
|
||||
-0.000021315014
|
||||
0.000003734597
|
||||
0.000002063806
|
||||
-0.000000167408
|
||||
-0.000000095158
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: coiflet6.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="coiflet6" name="Coiflet C6" type="orthogonal">
|
||||
<info>
|
||||
Coiflet C6 filter.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.038580777748
|
||||
-0.126969125396
|
||||
-0.077161555496
|
||||
0.607491641386
|
||||
0.745687558934
|
||||
0.226584265197
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub10.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub10" name="Daubechies D10" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.16010239797419
|
||||
0.60382926979719
|
||||
0.72430852843777
|
||||
0.13842814590132
|
||||
-0.24229488706638
|
||||
-0.03224486958464
|
||||
0.07757149384005
|
||||
-0.00624149021280
|
||||
-0.01258075199908
|
||||
0.00333572528547
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub12.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub12" name="Daubechies D12" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.111540743350
|
||||
0.494623890398
|
||||
0.751133908021
|
||||
0.315250351709
|
||||
-0.226264693965
|
||||
-0.129766867567
|
||||
0.097501605587
|
||||
0.027522865530
|
||||
-0.031582039317
|
||||
0.000553842201
|
||||
0.004777257511
|
||||
-0.001077301085
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub14.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub14" name="Daubechies D14" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.077852054085
|
||||
0.396539319482
|
||||
0.729132090846
|
||||
0.469782287405
|
||||
-0.143906003929
|
||||
-0.224036184994
|
||||
0.071309219267
|
||||
0.080612609151
|
||||
-0.038029936935
|
||||
-0.016574541631
|
||||
0.012550998556
|
||||
0.000429577973
|
||||
-0.001801640704
|
||||
0.000353713800
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub16.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub16" name="Daubechies D16" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.054415842243
|
||||
0.312871590914
|
||||
0.675630736297
|
||||
0.585354683654
|
||||
-0.015829105256
|
||||
-0.284015542962
|
||||
0.000472484574
|
||||
0.128747426620
|
||||
-0.017369301002
|
||||
-0.044088253931
|
||||
0.013981027917
|
||||
0.008746094047
|
||||
-0.004870352993
|
||||
-0.000391740373
|
||||
0.000675449406
|
||||
-0.000117476784
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub18.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub18" name="Daubechies D18" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.038077947364
|
||||
0.243834674613
|
||||
0.604823123690
|
||||
0.657288078051
|
||||
0.133197385825
|
||||
-0.293273783279
|
||||
-0.096840783223
|
||||
0.148540749338
|
||||
0.030725681479
|
||||
-0.067632829061
|
||||
0.000250947115
|
||||
0.022361662124
|
||||
-0.004723204758
|
||||
-0.004281503682
|
||||
0.001847646883
|
||||
0.000230385764
|
||||
-0.000251963189
|
||||
0.000039347320
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub20.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub20" name="Daubechies D20" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.026670057901
|
||||
0.188176800078
|
||||
0.527201188932
|
||||
0.688459039454
|
||||
0.281172343661
|
||||
-0.249846424327
|
||||
-0.195946274377
|
||||
0.127369340336
|
||||
0.093057364604
|
||||
-0.071394147166
|
||||
-0.029457536822
|
||||
0.033212674059
|
||||
0.003606553567
|
||||
-0.010733175483
|
||||
0.001395351747
|
||||
0.001992405295
|
||||
-0.000685856695
|
||||
-0.000116466855
|
||||
0.000093588670
|
||||
-0.000013264203
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub4.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub4" name="Daubechies D4" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.4829629131445341
|
||||
0.8365163037378077
|
||||
0.2241438680420134
|
||||
-0.1294095225512603
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub6.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub6" name="Daubechies D6" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.3326705529500825
|
||||
0.8068915093110924
|
||||
0.4598775021184914
|
||||
-0.1350110200102546
|
||||
-0.0854412738820267
|
||||
0.0352262918857095
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub8.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub8" name="Daubechies D8" type="orthogonal">
|
||||
<info>
|
||||
I. Daubechies, "Orthonormal Bases of Compactly Supported Wavelets,"
|
||||
Communications on Pure and Applied Mathematics, vol. 41,
|
||||
pp. 909-996, 1988.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.2303778133088964
|
||||
0.7148465705529154
|
||||
0.6308807679398587
|
||||
-0.0279837694168599
|
||||
-0.1870348117190931
|
||||
0.0308413818355607
|
||||
0.0328830116668852
|
||||
-0.0105974017850690
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: daub97.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="daub97" name="Daubechies 9/7" type="biorthogonal">
|
||||
<info>
|
||||
9/7 filter from M. Antonini, M. Barlaud, P. Mathieu, and
|
||||
I. Daubechies, "Image coding using wavelet transform", IEEE
|
||||
Transactions on Image Processing, Vol. pp. 205-220, 1992.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
0.8526986790088938
|
||||
0.3774028556128306
|
||||
-0.1106244044184372
|
||||
-0.0238494650195568
|
||||
0.0378284555072640
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.7884856164063712
|
||||
0.4180922732220353
|
||||
-0.0406894176092047
|
||||
-0.0645388826287616
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: haar.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="haar" name="Haar" type="orthogonal">
|
||||
<info>
|
||||
Haar filter.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.7071067811865475
|
||||
0.7071067811865475
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: odegard97.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="odegard97" name="Odegard 9/7" type="biorthogonal">
|
||||
<info>
|
||||
Odegard's 9/7 filter.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
0.7875137715277921
|
||||
0.3869718638726204
|
||||
-0.0930692637035827
|
||||
-0.0334184732793468
|
||||
0.0528657685329605
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.8167806349921064
|
||||
0.4403017067249854
|
||||
-0.0548369269027794
|
||||
-0.0867483161317116
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet10.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet10" name="Symmlet S10" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.027333068345163
|
||||
0.029519490926072
|
||||
-0.039134249302581
|
||||
0.199397533976983
|
||||
0.723407690403764
|
||||
0.633978963456911
|
||||
0.016602105764423
|
||||
-0.175328089908097
|
||||
-0.021101834024929
|
||||
0.019538882735386
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet12.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet12" name="Symmlet S12" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.015404109327339
|
||||
0.003490712084331
|
||||
-0.117990111148417
|
||||
-0.048311742586001
|
||||
0.491055941927666
|
||||
0.787641141028836
|
||||
0.337929421728258
|
||||
-0.072637522786604
|
||||
-0.021060292512697
|
||||
0.044724901770751
|
||||
0.001767711864398
|
||||
-0.007800708324765
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet14.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet14" name="Symmlet S14" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.002681814568116
|
||||
-0.001047384888965
|
||||
-0.012636303403152
|
||||
0.030515513165906
|
||||
0.067892693501598
|
||||
-0.049552834937041
|
||||
0.017441255087110
|
||||
0.536101917090782
|
||||
0.767764317004585
|
||||
0.288629631750988
|
||||
-0.140047240442706
|
||||
-0.107808237703619
|
||||
0.004010244871703
|
||||
0.010268176708497
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet16.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet16" name="Symmlet S16" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.00188995033291
|
||||
-0.00030292051455
|
||||
-0.01495225833679
|
||||
0.00380875201406
|
||||
0.04913717967348
|
||||
-0.02721902991682
|
||||
-0.05194583810788
|
||||
0.36444189483599
|
||||
0.77718575169981
|
||||
0.48135965125924
|
||||
-0.06127335906791
|
||||
-0.14329423835107
|
||||
0.00760748732529
|
||||
0.03169508781035
|
||||
-0.00054213233164
|
||||
-0.00338241595136
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet18.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet18" name="Symmlet S18" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.001069490032652
|
||||
-0.000473154498587
|
||||
-0.010264064027672
|
||||
0.008859267493501
|
||||
0.062077789302687
|
||||
-0.018233770779803
|
||||
-0.191550831296252
|
||||
0.035272488035891
|
||||
0.617338449140593
|
||||
0.717897082763343
|
||||
0.238760914607125
|
||||
-0.054568958430509
|
||||
0.000583462746330
|
||||
0.030224878857952
|
||||
-0.011528210207971
|
||||
-0.013271967781517
|
||||
0.000619780889054
|
||||
0.001400915525570
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet20.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet20" name="Symmlet S20" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
0.0007701598089417
|
||||
9.56326707637102e-05
|
||||
-0.0086412992741304
|
||||
-0.0014653825830397
|
||||
0.0459272392141469
|
||||
0.0116098939105411
|
||||
-0.1594942788241300
|
||||
-0.0708805357960178
|
||||
0.4716906667438780
|
||||
0.7695100368531890
|
||||
0.3838267611450020
|
||||
-0.0355367402980268
|
||||
-0.0319900568214638
|
||||
0.0499949720686861
|
||||
0.0057649120443445
|
||||
-0.0203549397996833
|
||||
-0.0008043589343686
|
||||
0.0045931735827084
|
||||
5.70360843270715e-05
|
||||
-0.0004593294204519
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: symmlet8.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="symmlet8" name="Symmlet S8" type="orthogonal">
|
||||
<info>
|
||||
Symmlets are wavelets within a minimum size support for a given
|
||||
number of vanishing moments, but they are as symmetrical as possible,
|
||||
as opposed to the Daubechies filters which are highly asymmetrical.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
-0.075765714789357
|
||||
-0.029635527645960
|
||||
0.497618667632563
|
||||
0.803738751805386
|
||||
0.297857795605605
|
||||
-0.099219543576956
|
||||
-0.012603967262264
|
||||
0.032223100604078
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: vaidyanathan.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="vaidyanathan" name="Vaidyanathan" type="orthogonal">
|
||||
<info>
|
||||
The Vaidyanathan filter gives an exact reconstruction, but does not
|
||||
satisfy any moment condition. The filter has been optimized for
|
||||
speech coding.
|
||||
</info>
|
||||
<primary causality="anticausal">
|
||||
-0.000062906118
|
||||
0.000343631905
|
||||
-0.000453956620
|
||||
-0.000944897136
|
||||
0.002843834547
|
||||
0.000708137504
|
||||
-0.008839103409
|
||||
0.003153847056
|
||||
0.019687215010
|
||||
-0.014853448005
|
||||
-0.035470398607
|
||||
0.038742619293
|
||||
0.055892523691
|
||||
-0.077709750902
|
||||
-0.083928884366
|
||||
0.131971661417
|
||||
0.135084227129
|
||||
-0.194450471766
|
||||
-0.263494802488
|
||||
0.201612161775
|
||||
0.635601059872
|
||||
0.572797793211
|
||||
0.250184129505
|
||||
0.045799334111
|
||||
</primary>
|
||||
</filter>
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
$Id: villa1311.filter,v 1.1 2006/02/22 12:49:35 xander Exp $
|
||||
-->
|
||||
<filter id="villa1311" name="Villasenor 13/11" type="biorthogonal">
|
||||
<info>
|
||||
Filter from J. Villasenor, B. Belzer, J. Liao, "Wavelet Filter
|
||||
Evaluation for Image Compression." IEEE Transactions on Image
|
||||
Processing, Vol. 2, pp. 1053-1060, August 1995.
|
||||
</info>
|
||||
<primary causality="symmetric_whole">
|
||||
0.7672451593927493
|
||||
0.3832692613243884
|
||||
-0.0688781141906103
|
||||
-0.0334750810478015
|
||||
0.0472817528288275
|
||||
0.0037592103166868
|
||||
-0.0084728277413181
|
||||
</primary>
|
||||
<dual causality="symmetric_whole">
|
||||
0.8328475700934288
|
||||
0.4481085999263908
|
||||
-0.0691627101203004
|
||||
-0.1087373652243805
|
||||
0.0062923156668598
|
||||
0.0141821558912635
|
||||
</dual>
|
||||
</filter>
|
|
@ -0,0 +1,519 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2006-12-25.00
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dst_arg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
-*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test -z "$d" && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
|
@ -0,0 +1,11 @@
|
|||
INCLUDES = -I$(top_srcdir)/lib
|
||||
METASOURCES = AUTO
|
||||
libepsilon_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
lib_LTLIBRARIES = libepsilon.la
|
||||
libepsilon_la_SOURCES = bit_io.c checksum.c cobs.c color.c common.c dc_level.c \
|
||||
filter.c filterbank.c libmain.c list.c mem_alloc.c merge_split.c pad.c \
|
||||
resample.c speck.c
|
||||
noinst_HEADERS = bit_io.h checksum.h cobs.h color.h common.h daub97lift.h \
|
||||
dc_level.h filter.h filterbank.h libmain.h list.h mem_alloc.h merge_split.h pad.h \
|
||||
resample.h speck.h msvc/inttypes.h msvc/stdint.h
|
||||
include_HEADERS = epsilon.h
|
|
@ -0,0 +1,518 @@
|
|||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = lib
|
||||
DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \
|
||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libepsilon_la_LIBADD =
|
||||
am_libepsilon_la_OBJECTS = bit_io.lo checksum.lo cobs.lo color.lo \
|
||||
common.lo dc_level.lo filter.lo filterbank.lo libmain.lo \
|
||||
list.lo mem_alloc.lo merge_split.lo pad.lo resample.lo \
|
||||
speck.lo
|
||||
libepsilon_la_OBJECTS = $(am_libepsilon_la_OBJECTS)
|
||||
libepsilon_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libepsilon_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||
$(LDFLAGS) -o $@
|
||||
SOURCES = $(libepsilon_la_SOURCES)
|
||||
DIST_SOURCES = $(libepsilon_la_SOURCES)
|
||||
includeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I$(top_srcdir)/lib
|
||||
METASOURCES = AUTO
|
||||
libepsilon_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
lib_LTLIBRARIES = libepsilon.la
|
||||
libepsilon_la_SOURCES = bit_io.c checksum.c cobs.c color.c common.c dc_level.c \
|
||||
filter.c filterbank.c libmain.c list.c mem_alloc.c merge_split.c pad.c \
|
||||
resample.c speck.c
|
||||
|
||||
noinst_HEADERS = bit_io.h checksum.h cobs.h color.h common.h daub97lift.h \
|
||||
dc_level.h filter.h filterbank.h libmain.h list.h mem_alloc.h merge_split.h pad.h \
|
||||
resample.h speck.h msvc/inttypes.h msvc/stdint.h
|
||||
|
||||
include_HEADERS = epsilon.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu lib/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libepsilon.la: $(libepsilon_la_OBJECTS) $(libepsilon_la_DEPENDENCIES)
|
||||
$(libepsilon_la_LINK) -rpath $(libdir) $(libepsilon_la_OBJECTS) $(libepsilon_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bit_io.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checksum.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cobs.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/color.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dc_level.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterbank.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmain.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem_alloc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge_split.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pad.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speck.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-includeHEADERS: $(include_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
$(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-includeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(include_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(includedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-includeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-includeHEADERS install-info \
|
||||
install-info-am install-libLTLIBRARIES install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-includeHEADERS \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* $Id: bit_io.c,v 1.14 2010/02/05 23:50:21 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <bit_io.h>
|
||||
|
||||
void init_bits(bit_buffer *bb, unsigned char *buf, int size)
|
||||
{
|
||||
assert(size > 0);
|
||||
|
||||
bb->start = bb->next = buf;
|
||||
bb->end = bb->start + size;
|
||||
bb->bits = bb->pending = 0;
|
||||
}
|
||||
|
||||
int write_bits(bit_buffer *bb, int value, int size)
|
||||
{
|
||||
assert(size <= 24);
|
||||
|
||||
/* No more space available */
|
||||
if (bb->next >= bb->end) {
|
||||
return BIT_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
/* Save requested number of bits */
|
||||
bb->bits |= (value << bb->pending);
|
||||
bb->pending += size;
|
||||
|
||||
/* Write complete octets */
|
||||
while (bb->pending >= 8) {
|
||||
if (bb->next >= bb->end) {
|
||||
return BIT_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
*bb->next++ = (unsigned char) (bb->bits & 0xff);
|
||||
|
||||
bb->bits >>= 8;
|
||||
bb->pending -= 8;
|
||||
}
|
||||
|
||||
return BIT_BUFFER_OK;
|
||||
}
|
||||
|
||||
int read_bits(bit_buffer *bb, int *value, int size)
|
||||
{
|
||||
assert(size <= 24);
|
||||
|
||||
/* Read missing bytes */
|
||||
while (bb->pending < size) {
|
||||
if (bb->next >= bb->end) {
|
||||
return BIT_BUFFER_UNDERFLOW;
|
||||
}
|
||||
|
||||
bb->bits |= (*bb->next++ << bb->pending);
|
||||
bb->pending += 8;
|
||||
}
|
||||
|
||||
*value = bb->bits & (~(~0 << size));
|
||||
|
||||
bb->bits >>= size;
|
||||
bb->pending -= size;
|
||||
|
||||
return BIT_BUFFER_OK;
|
||||
}
|
||||
|
||||
int flush_bits(bit_buffer *bb)
|
||||
{
|
||||
if (bb->pending) {
|
||||
return write_bits(bb, 0UL, 8);
|
||||
} else {
|
||||
return BIT_BUFFER_OK;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* $Id: bit_io.h,v 1.17 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Bit I/O
|
||||
*
|
||||
* This file contains bit I/O routines. */
|
||||
|
||||
#ifndef __BIT_IO_H__
|
||||
#define __BIT_IO_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup bit_io Bit I/O */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** All bits are successfuly processed */
|
||||
#define BIT_BUFFER_OK 0
|
||||
/** Cannot write bits, output buffer is full */
|
||||
#define BIT_BUFFER_OVERFLOW 1
|
||||
/** Cannot read bits, input buffer is empty */
|
||||
#define BIT_BUFFER_UNDERFLOW 2
|
||||
|
||||
/** Bit-buffer structure
|
||||
*
|
||||
* This structure represents bit-buffer. */
|
||||
typedef struct bit_buffer_tag {
|
||||
/** Start of buffer */
|
||||
unsigned char *start;
|
||||
/** End of buffer */
|
||||
unsigned char *end;
|
||||
/** Next input/output byte */
|
||||
unsigned char *next;
|
||||
/** Bit buffer */
|
||||
unsigned long bits;
|
||||
/** Pending bits */
|
||||
int pending;
|
||||
} bit_buffer;
|
||||
|
||||
/** Write one zero bit */
|
||||
#define write_0(_bb) write_bits(_bb, 0UL, 1)
|
||||
/** Write one unity bit */
|
||||
#define write_1(_bb) write_bits(_bb, 1UL, 1)
|
||||
/** Read one bit */
|
||||
#define read_bit(_bb, _bit) read_bits(_bb, _bit, 1)
|
||||
|
||||
/** Initialize bit-buffer for reading or writting
|
||||
*
|
||||
* This function initializes bit-buffer \a bb for reading or
|
||||
* writting bits.
|
||||
*
|
||||
* \param bb Bit-buffer to initialize
|
||||
* \param buf Actual input/output buffer
|
||||
* \param size Actual buffer size
|
||||
*
|
||||
* \return \c VOID */
|
||||
void init_bits(bit_buffer *bb, unsigned char *buf, int size);
|
||||
|
||||
/** Write bits
|
||||
*
|
||||
* This function writes \a size least significant bits of
|
||||
* the \a value to the bit-buffer \a bb.
|
||||
*
|
||||
* \note The function expects that \a size <= 24.
|
||||
*
|
||||
* \param bb Bit-buffer
|
||||
* \param value Bits to write
|
||||
* \param size Number of bits to write
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
int write_bits(bit_buffer *bb, int value, int size);
|
||||
|
||||
/** Read bits
|
||||
*
|
||||
* This function reads \a size least significant bits
|
||||
* from the bit-buffer \a bb into the \a value argument.
|
||||
*
|
||||
* \note Function expects that \a size <= 24.
|
||||
*
|
||||
* \param bb Bit-buffer
|
||||
* \param value Location to store the bits
|
||||
* \param size Number of bits to read
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
int read_bits(bit_buffer *bb, int *value, int size);
|
||||
|
||||
/** Flush bits
|
||||
*
|
||||
* This function flushes all pending bits if there are any.
|
||||
*
|
||||
* \param bb Bit-buffer
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
int flush_bits(bit_buffer *bb);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BIT_IO_H__ */
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* $Id: checksum.c,v 1.15 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006-2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <checksum.h>
|
||||
|
||||
/* largest prime smaller than 65536 */
|
||||
#define BASE 65521
|
||||
|
||||
/* NMAX is the largest n such that 255 * n (n + 1) / 2 + (n + 1) * (BASE - 1) <= 2^32 - 1 */
|
||||
#define NMAX 5552
|
||||
|
||||
/* Loop unrolling hack */
|
||||
#define SUM1(data, i) { s1 += data[i]; s2 += s1; }
|
||||
#define SUM2(data, i) SUM1(data, i); SUM1(data, i + 1);
|
||||
#define SUM4(data, i) SUM2(data, i); SUM2(data, i + 2);
|
||||
#define SUM8(data, i) SUM4(data, i); SUM4(data, i + 4);
|
||||
#define SUM16(data) SUM8(data, 0); SUM8(data, 8)
|
||||
|
||||
/* CRC32 polynomial */
|
||||
#define CRC32_POLY 0xedb88320L
|
||||
|
||||
/* CRC32 precalculated table */
|
||||
local crc32_t crc32_table[256] = {
|
||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
|
||||
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
|
||||
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
|
||||
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
|
||||
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
|
||||
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
|
||||
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
|
||||
0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
|
||||
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
|
||||
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
||||
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
|
||||
0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
|
||||
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
|
||||
0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
|
||||
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
||||
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
|
||||
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
|
||||
0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
|
||||
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
|
||||
0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
||||
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
|
||||
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
|
||||
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
|
||||
0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
|
||||
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
|
||||
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
|
||||
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
|
||||
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
|
||||
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
|
||||
0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
|
||||
0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
|
||||
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
|
||||
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
|
||||
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
|
||||
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
|
||||
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
|
||||
0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
|
||||
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
|
||||
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
||||
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
|
||||
0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
|
||||
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
|
||||
0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
|
||||
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
||||
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
|
||||
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
|
||||
0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
|
||||
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
|
||||
0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
||||
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
|
||||
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
|
||||
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
|
||||
0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
|
||||
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
|
||||
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
|
||||
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
|
||||
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
|
||||
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
|
||||
0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
|
||||
0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
|
||||
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
|
||||
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
|
||||
};
|
||||
|
||||
crc32_t epsilon_adler32(unsigned char *data, int length)
|
||||
{
|
||||
crc32_t s1 = 1;
|
||||
crc32_t s2 = 0;
|
||||
int k;
|
||||
|
||||
assert(length >= 0);
|
||||
|
||||
if (length == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (length > 0) {
|
||||
k = length < NMAX ? length : NMAX;
|
||||
length -= k;
|
||||
|
||||
while (k >= 16) {
|
||||
SUM16(data);
|
||||
data += 16;
|
||||
k -= 16;
|
||||
}
|
||||
|
||||
if (k != 0) do {
|
||||
s1 += *data++;
|
||||
s2 += s1;
|
||||
} while (--k);
|
||||
|
||||
s1 %= BASE;
|
||||
s2 %= BASE;
|
||||
}
|
||||
|
||||
return (s2 << 16) | s1;
|
||||
}
|
||||
|
||||
crc32_t epsilon_crc32(unsigned char *data, int length)
|
||||
{
|
||||
crc32_t crc = 0xffffffff;
|
||||
int i;
|
||||
|
||||
assert(length >= 0);
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
crc = crc32_table[(crc ^ data[i]) & 0xff] ^ (crc >> 8);
|
||||
}
|
||||
|
||||
return crc ^ 0xffffffff;
|
||||
}
|
||||
|
||||
/* This auxilliary function is used for CRC-32 table
|
||||
* generation. It is not exported or used by the program. */
|
||||
local void make_crc32_table(void)
|
||||
{
|
||||
crc32_t crc;
|
||||
int n, k;
|
||||
|
||||
printf("local crc32_t crc32_table[256] = {\n");
|
||||
|
||||
for (n = 0; n < 256; n++) {
|
||||
crc = (crc32_t) n;
|
||||
|
||||
for (k = 0; k < 8; k++) {
|
||||
if (crc & 1) {
|
||||
crc = CRC32_POLY ^ (crc >> 1);
|
||||
} else {
|
||||
crc >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((n & 0x03) == 0) {
|
||||
printf(" ");
|
||||
}
|
||||
|
||||
printf("0x%08x,%s", crc, (n & 0x03) == 0x03 ? "" : " ");
|
||||
|
||||
if ((n & 0x03) == 0x03) {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
printf("};\n");
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* $Id: checksum.h,v 1.15 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006-2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Checksum calculation
|
||||
*
|
||||
* This file contains routines for CRC-32 and ADLER-32 checksum
|
||||
* calculation. At the moment program uses only CRC-32 algorithm.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* <a href="http://www.ross.net/crc/">A Painless Guide to CRC Error Detection Algorithms</a><br>
|
||||
* <a href="http://en.wikipedia.org/wiki/CRC32">Wikipedia: CRC-32</a><br>
|
||||
* <a href="http://en.wikipedia.org/wiki/Adler-32">Wikipedia: ADLER-32</a> */
|
||||
|
||||
#ifndef __CHECKSUM_H__
|
||||
#define __CHECKSUM_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup checksum Checksum calculation */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
#include <epsilon.h>
|
||||
|
||||
/** Compute ADLER-32 checksum
|
||||
*
|
||||
* This function computes ADLER-32 checksum.
|
||||
*
|
||||
* \param data Data to sum
|
||||
* \param length Data length
|
||||
*
|
||||
* \return Checksum */
|
||||
crc32_t epsilon_adler32(unsigned char *data, int length);
|
||||
|
||||
/** Compute CRC-32 checksum
|
||||
*
|
||||
* This function computes CRC-32 checksum.
|
||||
*
|
||||
* \param data Data to sum
|
||||
* \param length Data length
|
||||
*
|
||||
* \return Checksum */
|
||||
crc32_t epsilon_crc32(unsigned char *data, int length);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CHECKSUM_H__ */
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* $Id: cobs.c,v 1.14 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <cobs.h>
|
||||
|
||||
#define FINISH_BLOCK(_x) (*code_ptr = (_x), \
|
||||
code_ptr = output_data++, \
|
||||
code = 0x01)
|
||||
|
||||
int stuff_data(unsigned char *input_data, unsigned char *output_data,
|
||||
int input_length, int output_length)
|
||||
{
|
||||
unsigned char *input_end = input_data + input_length;
|
||||
unsigned char *output_start = output_data;
|
||||
|
||||
unsigned char *code_ptr = output_data++;
|
||||
unsigned char code = 0x01;
|
||||
|
||||
/* Sanity checks */
|
||||
assert(input_length > 0);
|
||||
assert(output_length >= input_length + input_length / 254 + 1);
|
||||
|
||||
while (input_data < input_end) {
|
||||
if (*input_data == 0) {
|
||||
FINISH_BLOCK(code);
|
||||
} else {
|
||||
*output_data++ = *input_data;
|
||||
code++;
|
||||
|
||||
if (code == 0xff) {
|
||||
FINISH_BLOCK(code);
|
||||
}
|
||||
}
|
||||
|
||||
input_data++;
|
||||
}
|
||||
|
||||
FINISH_BLOCK(code);
|
||||
|
||||
return output_data - output_start - 1;
|
||||
}
|
||||
|
||||
int unstuff_data(unsigned char *input_data, unsigned char *output_data,
|
||||
int input_length, int output_length)
|
||||
{
|
||||
unsigned char *input_end = input_data + input_length;
|
||||
unsigned char *output_end = output_data + output_length;
|
||||
unsigned char *output_start = output_data;
|
||||
|
||||
/* Sanity checks */
|
||||
assert(input_length > 0);
|
||||
assert(output_length >= input_length);
|
||||
|
||||
while (input_data < input_end) {
|
||||
int code = *input_data++;
|
||||
int i;
|
||||
|
||||
for (i = 1; (i < code) && (input_data < input_end) && (output_data < output_end); i++) {
|
||||
*output_data++ = *input_data++;
|
||||
}
|
||||
|
||||
if ((code > 0x00) && (code < 0xff) &&
|
||||
(input_data < input_end) && (output_data < output_end)) {
|
||||
*output_data++ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return output_data - output_start;
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* $Id: cobs.h,v 1.16 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Byte stuffing
|
||||
*
|
||||
* This file contains routines for efficient byte stuffing.
|
||||
* The algorithm used here called COBS, which is stands for Consistent
|
||||
* Overhead Byte Stuffing. Byte stuffing is very useful for parallel
|
||||
* image processing and improves overall system robustness.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* Stuart Cheshire and Mary Baker, "Consistent Overhead Byte Stuffing".
|
||||
* IEEE/ACM Transactions on Networking. vol. 7 pp. 159-172 April 1999. */
|
||||
|
||||
#ifndef __COBS_H__
|
||||
#define __COBS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup stuffing Byte stuffing */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Byte stuffing
|
||||
*
|
||||
* This function performes byte stuffing. All zero-valued
|
||||
* bytes in the \a input_data will be eliminated. The result
|
||||
* will be stored in the \a output_data. This operation involves
|
||||
* some marginal data expansion, no more than 0.4% at worst case.
|
||||
*
|
||||
* \param input_data Input data
|
||||
* \param output_data Output data
|
||||
* \param input_length Input data length
|
||||
* \param output_length Output data length
|
||||
*
|
||||
* \return Number of bytes actually used in the \a output_data
|
||||
*
|
||||
* \note Caller must allocate enough space for the \a output_data
|
||||
* beforehand. This value can be calculated by the following
|
||||
* formula: \a input_length + (\a input_length / 254) + 1. */
|
||||
int stuff_data(unsigned char *input_data, unsigned char *output_data,
|
||||
int input_length, int output_length);
|
||||
|
||||
/** Byte unstuffing
|
||||
*
|
||||
* This function is inverse to the previous one. It recovers original data.
|
||||
* The result will be stored in the \a output_data.
|
||||
*
|
||||
* \param input_data Input data
|
||||
* \param output_data Output data
|
||||
* \param input_length Input data length
|
||||
* \param output_length Output data length
|
||||
*
|
||||
* \return Number of bytes actually used in the \a output_data
|
||||
*
|
||||
* \note Caller must allocate enough space for the \a output_data
|
||||
* beforehand. Safe value is \a input_length. */
|
||||
int unstuff_data(unsigned char *input_data, unsigned char *output_data,
|
||||
int input_length, int output_length);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __COBS_H__ */
|
|
@ -0,0 +1,370 @@
|
|||
/*
|
||||
* $Id: color.c,v 1.15 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <color.h>
|
||||
|
||||
/* Look-up tables for increase RGB to YCbCr conversion speed */
|
||||
|
||||
local double O_299000[256] = {
|
||||
0, 0.299, 0.598, 0.897, 1.196, 1.495, 1.794, 2.093,
|
||||
2.392, 2.691, 2.99, 3.289, 3.588, 3.887, 4.186, 4.485,
|
||||
4.784, 5.083, 5.382, 5.681, 5.98, 6.279, 6.578, 6.877,
|
||||
7.176, 7.475, 7.774, 8.073, 8.372, 8.671, 8.97, 9.269,
|
||||
9.568, 9.867, 10.166, 10.465, 10.764, 11.063, 11.362, 11.661,
|
||||
11.96, 12.259, 12.558, 12.857, 13.156, 13.455, 13.754, 14.053,
|
||||
14.352, 14.651, 14.95, 15.249, 15.548, 15.847, 16.146, 16.445,
|
||||
16.744, 17.043, 17.342, 17.641, 17.94, 18.239, 18.538, 18.837,
|
||||
19.136, 19.435, 19.734, 20.033, 20.332, 20.631, 20.93, 21.229,
|
||||
21.528, 21.827, 22.126, 22.425, 22.724, 23.023, 23.322, 23.621,
|
||||
23.92, 24.219, 24.518, 24.817, 25.116, 25.415, 25.714, 26.013,
|
||||
26.312, 26.611, 26.91, 27.209, 27.508, 27.807, 28.106, 28.405,
|
||||
28.704, 29.003, 29.302, 29.601, 29.9, 30.199, 30.498, 30.797,
|
||||
31.096, 31.395, 31.694, 31.993, 32.292, 32.591, 32.89, 33.189,
|
||||
33.488, 33.787, 34.086, 34.385, 34.684, 34.983, 35.282, 35.581,
|
||||
35.88, 36.179, 36.478, 36.777, 37.076, 37.375, 37.674, 37.973,
|
||||
38.272, 38.571, 38.87, 39.169, 39.468, 39.767, 40.066, 40.365,
|
||||
40.664, 40.963, 41.262, 41.561, 41.86, 42.159, 42.458, 42.757,
|
||||
43.056, 43.355, 43.654, 43.953, 44.252, 44.551, 44.85, 45.149,
|
||||
45.448, 45.747, 46.046, 46.345, 46.644, 46.943, 47.242, 47.541,
|
||||
47.84, 48.139, 48.438, 48.737, 49.036, 49.335, 49.634, 49.933,
|
||||
50.232, 50.531, 50.83, 51.129, 51.428, 51.727, 52.026, 52.325,
|
||||
52.624, 52.923, 53.222, 53.521, 53.82, 54.119, 54.418, 54.717,
|
||||
55.016, 55.315, 55.614, 55.913, 56.212, 56.511, 56.81, 57.109,
|
||||
57.408, 57.707, 58.006, 58.305, 58.604, 58.903, 59.202, 59.501,
|
||||
59.8, 60.099, 60.398, 60.697, 60.996, 61.295, 61.594, 61.893,
|
||||
62.192, 62.491, 62.79, 63.089, 63.388, 63.687, 63.986, 64.285,
|
||||
64.584, 64.883, 65.182, 65.481, 65.78, 66.079, 66.378, 66.677,
|
||||
66.976, 67.275, 67.574, 67.873, 68.172, 68.471, 68.77, 69.069,
|
||||
69.368, 69.667, 69.966, 70.265, 70.564, 70.863, 71.162, 71.461,
|
||||
71.76, 72.059, 72.358, 72.657, 72.956, 73.255, 73.554, 73.853,
|
||||
74.152, 74.451, 74.75, 75.049, 75.348, 75.647, 75.946, 76.245,
|
||||
};
|
||||
|
||||
local double O_587000[256] = {
|
||||
0, 0.587, 1.174, 1.761, 2.348, 2.935, 3.522, 4.109,
|
||||
4.696, 5.283, 5.87, 6.457, 7.044, 7.631, 8.218, 8.805,
|
||||
9.392, 9.979, 10.566, 11.153, 11.74, 12.327, 12.914, 13.501,
|
||||
14.088, 14.675, 15.262, 15.849, 16.436, 17.023, 17.61, 18.197,
|
||||
18.784, 19.371, 19.958, 20.545, 21.132, 21.719, 22.306, 22.893,
|
||||
23.48, 24.067, 24.654, 25.241, 25.828, 26.415, 27.002, 27.589,
|
||||
28.176, 28.763, 29.35, 29.937, 30.524, 31.111, 31.698, 32.285,
|
||||
32.872, 33.459, 34.046, 34.633, 35.22, 35.807, 36.394, 36.981,
|
||||
37.568, 38.155, 38.742, 39.329, 39.916, 40.503, 41.09, 41.677,
|
||||
42.264, 42.851, 43.438, 44.025, 44.612, 45.199, 45.786, 46.373,
|
||||
46.96, 47.547, 48.134, 48.721, 49.308, 49.895, 50.482, 51.069,
|
||||
51.656, 52.243, 52.83, 53.417, 54.004, 54.591, 55.178, 55.765,
|
||||
56.352, 56.939, 57.526, 58.113, 58.7, 59.287, 59.874, 60.461,
|
||||
61.048, 61.635, 62.222, 62.809, 63.396, 63.983, 64.57, 65.157,
|
||||
65.744, 66.331, 66.918, 67.505, 68.092, 68.679, 69.266, 69.853,
|
||||
70.44, 71.027, 71.614, 72.201, 72.788, 73.375, 73.962, 74.549,
|
||||
75.136, 75.723, 76.31, 76.897, 77.484, 78.071, 78.658, 79.245,
|
||||
79.832, 80.419, 81.006, 81.593, 82.18, 82.767, 83.354, 83.941,
|
||||
84.528, 85.115, 85.702, 86.289, 86.876, 87.463, 88.05, 88.637,
|
||||
89.224, 89.811, 90.398, 90.985, 91.572, 92.159, 92.746, 93.333,
|
||||
93.92, 94.507, 95.094, 95.681, 96.268, 96.855, 97.442, 98.029,
|
||||
98.616, 99.203, 99.79, 100.377, 100.964, 101.551, 102.138, 102.725,
|
||||
103.312, 103.899, 104.486, 105.073, 105.66, 106.247, 106.834, 107.421,
|
||||
108.008, 108.595, 109.182, 109.769, 110.356, 110.943, 111.53, 112.117,
|
||||
112.704, 113.291, 113.878, 114.465, 115.052, 115.639, 116.226, 116.813,
|
||||
117.4, 117.987, 118.574, 119.161, 119.748, 120.335, 120.922, 121.509,
|
||||
122.096, 122.683, 123.27, 123.857, 124.444, 125.031, 125.618, 126.205,
|
||||
126.792, 127.379, 127.966, 128.553, 129.14, 129.727, 130.314, 130.901,
|
||||
131.488, 132.075, 132.662, 133.249, 133.836, 134.423, 135.01, 135.597,
|
||||
136.184, 136.771, 137.358, 137.945, 138.532, 139.119, 139.706, 140.293,
|
||||
140.88, 141.467, 142.054, 142.641, 143.228, 143.815, 144.402, 144.989,
|
||||
145.576, 146.163, 146.75, 147.337, 147.924, 148.511, 149.098, 149.685,
|
||||
};
|
||||
|
||||
local double O_114000[256] = {
|
||||
0, 0.114, 0.228, 0.342, 0.456, 0.57, 0.684, 0.798,
|
||||
0.912, 1.026, 1.14, 1.254, 1.368, 1.482, 1.596, 1.71,
|
||||
1.824, 1.938, 2.052, 2.166, 2.28, 2.394, 2.508, 2.622,
|
||||
2.736, 2.85, 2.964, 3.078, 3.192, 3.306, 3.42, 3.534,
|
||||
3.648, 3.762, 3.876, 3.99, 4.104, 4.218, 4.332, 4.446,
|
||||
4.56, 4.674, 4.788, 4.902, 5.016, 5.13, 5.244, 5.358,
|
||||
5.472, 5.586, 5.7, 5.814, 5.928, 6.042, 6.156, 6.27,
|
||||
6.384, 6.498, 6.612, 6.726, 6.84, 6.954, 7.068, 7.182,
|
||||
7.296, 7.41, 7.524, 7.638, 7.752, 7.866, 7.98, 8.094,
|
||||
8.208, 8.322, 8.436, 8.55, 8.664, 8.778, 8.892, 9.006,
|
||||
9.12, 9.234, 9.348, 9.462, 9.576, 9.69, 9.804, 9.918,
|
||||
10.032, 10.146, 10.26, 10.374, 10.488, 10.602, 10.716, 10.83,
|
||||
10.944, 11.058, 11.172, 11.286, 11.4, 11.514, 11.628, 11.742,
|
||||
11.856, 11.97, 12.084, 12.198, 12.312, 12.426, 12.54, 12.654,
|
||||
12.768, 12.882, 12.996, 13.11, 13.224, 13.338, 13.452, 13.566,
|
||||
13.68, 13.794, 13.908, 14.022, 14.136, 14.25, 14.364, 14.478,
|
||||
14.592, 14.706, 14.82, 14.934, 15.048, 15.162, 15.276, 15.39,
|
||||
15.504, 15.618, 15.732, 15.846, 15.96, 16.074, 16.188, 16.302,
|
||||
16.416, 16.53, 16.644, 16.758, 16.872, 16.986, 17.1, 17.214,
|
||||
17.328, 17.442, 17.556, 17.67, 17.784, 17.898, 18.012, 18.126,
|
||||
18.24, 18.354, 18.468, 18.582, 18.696, 18.81, 18.924, 19.038,
|
||||
19.152, 19.266, 19.38, 19.494, 19.608, 19.722, 19.836, 19.95,
|
||||
20.064, 20.178, 20.292, 20.406, 20.52, 20.634, 20.748, 20.862,
|
||||
20.976, 21.09, 21.204, 21.318, 21.432, 21.546, 21.66, 21.774,
|
||||
21.888, 22.002, 22.116, 22.23, 22.344, 22.458, 22.572, 22.686,
|
||||
22.8, 22.914, 23.028, 23.142, 23.256, 23.37, 23.484, 23.598,
|
||||
23.712, 23.826, 23.94, 24.054, 24.168, 24.282, 24.396, 24.51,
|
||||
24.624, 24.738, 24.852, 24.966, 25.08, 25.194, 25.308, 25.422,
|
||||
25.536, 25.65, 25.764, 25.878, 25.992, 26.106, 26.22, 26.334,
|
||||
26.448, 26.562, 26.676, 26.79, 26.904, 27.018, 27.132, 27.246,
|
||||
27.36, 27.474, 27.588, 27.702, 27.816, 27.93, 28.044, 28.158,
|
||||
28.272, 28.386, 28.5, 28.614, 28.728, 28.842, 28.956, 29.07,
|
||||
};
|
||||
|
||||
local double O_168736[256] = {
|
||||
0, 0.168736, 0.337472, 0.506208, 0.674944, 0.84368, 1.01242, 1.18115,
|
||||
1.34989, 1.51862, 1.68736, 1.8561, 2.02483, 2.19357, 2.3623, 2.53104,
|
||||
2.69978, 2.86851, 3.03725, 3.20598, 3.37472, 3.54346, 3.71219, 3.88093,
|
||||
4.04966, 4.2184, 4.38714, 4.55587, 4.72461, 4.89334, 5.06208, 5.23082,
|
||||
5.39955, 5.56829, 5.73702, 5.90576, 6.0745, 6.24323, 6.41197, 6.5807,
|
||||
6.74944, 6.91818, 7.08691, 7.25565, 7.42438, 7.59312, 7.76186, 7.93059,
|
||||
8.09933, 8.26806, 8.4368, 8.60554, 8.77427, 8.94301, 9.11174, 9.28048,
|
||||
9.44922, 9.61795, 9.78669, 9.95542, 10.1242, 10.2929, 10.4616, 10.6304,
|
||||
10.7991, 10.9678, 11.1366, 11.3053, 11.474, 11.6428, 11.8115, 11.9803,
|
||||
12.149, 12.3177, 12.4865, 12.6552, 12.8239, 12.9927, 13.1614, 13.3301,
|
||||
13.4989, 13.6676, 13.8364, 14.0051, 14.1738, 14.3426, 14.5113, 14.68,
|
||||
14.8488, 15.0175, 15.1862, 15.355, 15.5237, 15.6924, 15.8612, 16.0299,
|
||||
16.1987, 16.3674, 16.5361, 16.7049, 16.8736, 17.0423, 17.2111, 17.3798,
|
||||
17.5485, 17.7173, 17.886, 18.0548, 18.2235, 18.3922, 18.561, 18.7297,
|
||||
18.8984, 19.0672, 19.2359, 19.4046, 19.5734, 19.7421, 19.9108, 20.0796,
|
||||
20.2483, 20.4171, 20.5858, 20.7545, 20.9233, 21.092, 21.2607, 21.4295,
|
||||
21.5982, 21.7669, 21.9357, 22.1044, 22.2732, 22.4419, 22.6106, 22.7794,
|
||||
22.9481, 23.1168, 23.2856, 23.4543, 23.623, 23.7918, 23.9605, 24.1292,
|
||||
24.298, 24.4667, 24.6355, 24.8042, 24.9729, 25.1417, 25.3104, 25.4791,
|
||||
25.6479, 25.8166, 25.9853, 26.1541, 26.3228, 26.4916, 26.6603, 26.829,
|
||||
26.9978, 27.1665, 27.3352, 27.504, 27.6727, 27.8414, 28.0102, 28.1789,
|
||||
28.3476, 28.5164, 28.6851, 28.8539, 29.0226, 29.1913, 29.3601, 29.5288,
|
||||
29.6975, 29.8663, 30.035, 30.2037, 30.3725, 30.5412, 30.71, 30.8787,
|
||||
31.0474, 31.2162, 31.3849, 31.5536, 31.7224, 31.8911, 32.0598, 32.2286,
|
||||
32.3973, 32.566, 32.7348, 32.9035, 33.0723, 33.241, 33.4097, 33.5785,
|
||||
33.7472, 33.9159, 34.0847, 34.2534, 34.4221, 34.5909, 34.7596, 34.9284,
|
||||
35.0971, 35.2658, 35.4346, 35.6033, 35.772, 35.9408, 36.1095, 36.2782,
|
||||
36.447, 36.6157, 36.7844, 36.9532, 37.1219, 37.2907, 37.4594, 37.6281,
|
||||
37.7969, 37.9656, 38.1343, 38.3031, 38.4718, 38.6405, 38.8093, 38.978,
|
||||
39.1468, 39.3155, 39.4842, 39.653, 39.8217, 39.9904, 40.1592, 40.3279,
|
||||
40.4966, 40.6654, 40.8341, 41.0028, 41.1716, 41.3403, 41.5091, 41.6778,
|
||||
41.8465, 42.0153, 42.184, 42.3527, 42.5215, 42.6902, 42.8589, 43.0277,
|
||||
};
|
||||
|
||||
local double O_331264[256] = {
|
||||
0, 0.331264, 0.662528, 0.993792, 1.32506, 1.65632, 1.98758, 2.31885,
|
||||
2.65011, 2.98138, 3.31264, 3.6439, 3.97517, 4.30643, 4.6377, 4.96896,
|
||||
5.30022, 5.63149, 5.96275, 6.29402, 6.62528, 6.95654, 7.28781, 7.61907,
|
||||
7.95034, 8.2816, 8.61286, 8.94413, 9.27539, 9.60666, 9.93792, 10.2692,
|
||||
10.6004, 10.9317, 11.263, 11.5942, 11.9255, 12.2568, 12.588, 12.9193,
|
||||
13.2506, 13.5818, 13.9131, 14.2444, 14.5756, 14.9069, 15.2381, 15.5694,
|
||||
15.9007, 16.2319, 16.5632, 16.8945, 17.2257, 17.557, 17.8883, 18.2195,
|
||||
18.5508, 18.882, 19.2133, 19.5446, 19.8758, 20.2071, 20.5384, 20.8696,
|
||||
21.2009, 21.5322, 21.8634, 22.1947, 22.526, 22.8572, 23.1885, 23.5197,
|
||||
23.851, 24.1823, 24.5135, 24.8448, 25.1761, 25.5073, 25.8386, 26.1699,
|
||||
26.5011, 26.8324, 27.1636, 27.4949, 27.8262, 28.1574, 28.4887, 28.82,
|
||||
29.1512, 29.4825, 29.8138, 30.145, 30.4763, 30.8076, 31.1388, 31.4701,
|
||||
31.8013, 32.1326, 32.4639, 32.7951, 33.1264, 33.4577, 33.7889, 34.1202,
|
||||
34.4515, 34.7827, 35.114, 35.4452, 35.7765, 36.1078, 36.439, 36.7703,
|
||||
37.1016, 37.4328, 37.7641, 38.0954, 38.4266, 38.7579, 39.0892, 39.4204,
|
||||
39.7517, 40.0829, 40.4142, 40.7455, 41.0767, 41.408, 41.7393, 42.0705,
|
||||
42.4018, 42.7331, 43.0643, 43.3956, 43.7268, 44.0581, 44.3894, 44.7206,
|
||||
45.0519, 45.3832, 45.7144, 46.0457, 46.377, 46.7082, 47.0395, 47.3708,
|
||||
47.702, 48.0333, 48.3645, 48.6958, 49.0271, 49.3583, 49.6896, 50.0209,
|
||||
50.3521, 50.6834, 51.0147, 51.3459, 51.6772, 52.0084, 52.3397, 52.671,
|
||||
53.0022, 53.3335, 53.6648, 53.996, 54.3273, 54.6586, 54.9898, 55.3211,
|
||||
55.6524, 55.9836, 56.3149, 56.6461, 56.9774, 57.3087, 57.6399, 57.9712,
|
||||
58.3025, 58.6337, 58.965, 59.2963, 59.6275, 59.9588, 60.29, 60.6213,
|
||||
60.9526, 61.2838, 61.6151, 61.9464, 62.2776, 62.6089, 62.9402, 63.2714,
|
||||
63.6027, 63.934, 64.2652, 64.5965, 64.9277, 65.259, 65.5903, 65.9215,
|
||||
66.2528, 66.5841, 66.9153, 67.2466, 67.5779, 67.9091, 68.2404, 68.5716,
|
||||
68.9029, 69.2342, 69.5654, 69.8967, 70.228, 70.5592, 70.8905, 71.2218,
|
||||
71.553, 71.8843, 72.2156, 72.5468, 72.8781, 73.2093, 73.5406, 73.8719,
|
||||
74.2031, 74.5344, 74.8657, 75.1969, 75.5282, 75.8595, 76.1907, 76.522,
|
||||
76.8532, 77.1845, 77.5158, 77.847, 78.1783, 78.5096, 78.8408, 79.1721,
|
||||
79.5034, 79.8346, 80.1659, 80.4972, 80.8284, 81.1597, 81.4909, 81.8222,
|
||||
82.1535, 82.4847, 82.816, 83.1473, 83.4785, 83.8098, 84.1411, 84.4723,
|
||||
};
|
||||
|
||||
local double O_500000[256] = {
|
||||
0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5,
|
||||
4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5,
|
||||
8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5,
|
||||
12, 12.5, 13, 13.5, 14, 14.5, 15, 15.5,
|
||||
16, 16.5, 17, 17.5, 18, 18.5, 19, 19.5,
|
||||
20, 20.5, 21, 21.5, 22, 22.5, 23, 23.5,
|
||||
24, 24.5, 25, 25.5, 26, 26.5, 27, 27.5,
|
||||
28, 28.5, 29, 29.5, 30, 30.5, 31, 31.5,
|
||||
32, 32.5, 33, 33.5, 34, 34.5, 35, 35.5,
|
||||
36, 36.5, 37, 37.5, 38, 38.5, 39, 39.5,
|
||||
40, 40.5, 41, 41.5, 42, 42.5, 43, 43.5,
|
||||
44, 44.5, 45, 45.5, 46, 46.5, 47, 47.5,
|
||||
48, 48.5, 49, 49.5, 50, 50.5, 51, 51.5,
|
||||
52, 52.5, 53, 53.5, 54, 54.5, 55, 55.5,
|
||||
56, 56.5, 57, 57.5, 58, 58.5, 59, 59.5,
|
||||
60, 60.5, 61, 61.5, 62, 62.5, 63, 63.5,
|
||||
64, 64.5, 65, 65.5, 66, 66.5, 67, 67.5,
|
||||
68, 68.5, 69, 69.5, 70, 70.5, 71, 71.5,
|
||||
72, 72.5, 73, 73.5, 74, 74.5, 75, 75.5,
|
||||
76, 76.5, 77, 77.5, 78, 78.5, 79, 79.5,
|
||||
80, 80.5, 81, 81.5, 82, 82.5, 83, 83.5,
|
||||
84, 84.5, 85, 85.5, 86, 86.5, 87, 87.5,
|
||||
88, 88.5, 89, 89.5, 90, 90.5, 91, 91.5,
|
||||
92, 92.5, 93, 93.5, 94, 94.5, 95, 95.5,
|
||||
96, 96.5, 97, 97.5, 98, 98.5, 99, 99.5,
|
||||
100, 100.5, 101, 101.5, 102, 102.5, 103, 103.5,
|
||||
104, 104.5, 105, 105.5, 106, 106.5, 107, 107.5,
|
||||
108, 108.5, 109, 109.5, 110, 110.5, 111, 111.5,
|
||||
112, 112.5, 113, 113.5, 114, 114.5, 115, 115.5,
|
||||
116, 116.5, 117, 117.5, 118, 118.5, 119, 119.5,
|
||||
120, 120.5, 121, 121.5, 122, 122.5, 123, 123.5,
|
||||
124, 124.5, 125, 125.5, 126, 126.5, 127, 127.5,
|
||||
};
|
||||
|
||||
local double O_418688[256] = {
|
||||
0, 0.418688, 0.837376, 1.25606, 1.67475, 2.09344, 2.51213, 2.93082,
|
||||
3.3495, 3.76819, 4.18688, 4.60557, 5.02426, 5.44294, 5.86163, 6.28032,
|
||||
6.69901, 7.1177, 7.53638, 7.95507, 8.37376, 8.79245, 9.21114, 9.62982,
|
||||
10.0485, 10.4672, 10.8859, 11.3046, 11.7233, 12.142, 12.5606, 12.9793,
|
||||
13.398, 13.8167, 14.2354, 14.6541, 15.0728, 15.4915, 15.9101, 16.3288,
|
||||
16.7475, 17.1662, 17.5849, 18.0036, 18.4223, 18.841, 19.2596, 19.6783,
|
||||
20.097, 20.5157, 20.9344, 21.3531, 21.7718, 22.1905, 22.6092, 23.0278,
|
||||
23.4465, 23.8652, 24.2839, 24.7026, 25.1213, 25.54, 25.9587, 26.3773,
|
||||
26.796, 27.2147, 27.6334, 28.0521, 28.4708, 28.8895, 29.3082, 29.7268,
|
||||
30.1455, 30.5642, 30.9829, 31.4016, 31.8203, 32.239, 32.6577, 33.0764,
|
||||
33.495, 33.9137, 34.3324, 34.7511, 35.1698, 35.5885, 36.0072, 36.4259,
|
||||
36.8445, 37.2632, 37.6819, 38.1006, 38.5193, 38.938, 39.3567, 39.7754,
|
||||
40.194, 40.6127, 41.0314, 41.4501, 41.8688, 42.2875, 42.7062, 43.1249,
|
||||
43.5436, 43.9622, 44.3809, 44.7996, 45.2183, 45.637, 46.0557, 46.4744,
|
||||
46.8931, 47.3117, 47.7304, 48.1491, 48.5678, 48.9865, 49.4052, 49.8239,
|
||||
50.2426, 50.6612, 51.0799, 51.4986, 51.9173, 52.336, 52.7547, 53.1734,
|
||||
53.5921, 54.0108, 54.4294, 54.8481, 55.2668, 55.6855, 56.1042, 56.5229,
|
||||
56.9416, 57.3603, 57.7789, 58.1976, 58.6163, 59.035, 59.4537, 59.8724,
|
||||
60.2911, 60.7098, 61.1284, 61.5471, 61.9658, 62.3845, 62.8032, 63.2219,
|
||||
63.6406, 64.0593, 64.478, 64.8966, 65.3153, 65.734, 66.1527, 66.5714,
|
||||
66.9901, 67.4088, 67.8275, 68.2461, 68.6648, 69.0835, 69.5022, 69.9209,
|
||||
70.3396, 70.7583, 71.177, 71.5956, 72.0143, 72.433, 72.8517, 73.2704,
|
||||
73.6891, 74.1078, 74.5265, 74.9452, 75.3638, 75.7825, 76.2012, 76.6199,
|
||||
77.0386, 77.4573, 77.876, 78.2947, 78.7133, 79.132, 79.5507, 79.9694,
|
||||
80.3881, 80.8068, 81.2255, 81.6442, 82.0628, 82.4815, 82.9002, 83.3189,
|
||||
83.7376, 84.1563, 84.575, 84.9937, 85.4124, 85.831, 86.2497, 86.6684,
|
||||
87.0871, 87.5058, 87.9245, 88.3432, 88.7619, 89.1805, 89.5992, 90.0179,
|
||||
90.4366, 90.8553, 91.274, 91.6927, 92.1114, 92.53, 92.9487, 93.3674,
|
||||
93.7861, 94.2048, 94.6235, 95.0422, 95.4609, 95.8796, 96.2982, 96.7169,
|
||||
97.1356, 97.5543, 97.973, 98.3917, 98.8104, 99.2291, 99.6477, 100.066,
|
||||
100.485, 100.904, 101.322, 101.741, 102.16, 102.579, 102.997, 103.416,
|
||||
103.835, 104.253, 104.672, 105.091, 105.509, 105.928, 106.347, 106.765,
|
||||
};
|
||||
|
||||
local double O_081312[256] = {
|
||||
0, 0.081312, 0.162624, 0.243936, 0.325248, 0.40656, 0.487872, 0.569184,
|
||||
0.650496, 0.731808, 0.81312, 0.894432, 0.975744, 1.05706, 1.13837, 1.21968,
|
||||
1.30099, 1.3823, 1.46362, 1.54493, 1.62624, 1.70755, 1.78886, 1.87018,
|
||||
1.95149, 2.0328, 2.11411, 2.19542, 2.27674, 2.35805, 2.43936, 2.52067,
|
||||
2.60198, 2.6833, 2.76461, 2.84592, 2.92723, 3.00854, 3.08986, 3.17117,
|
||||
3.25248, 3.33379, 3.4151, 3.49642, 3.57773, 3.65904, 3.74035, 3.82166,
|
||||
3.90298, 3.98429, 4.0656, 4.14691, 4.22822, 4.30954, 4.39085, 4.47216,
|
||||
4.55347, 4.63478, 4.7161, 4.79741, 4.87872, 4.96003, 5.04134, 5.12266,
|
||||
5.20397, 5.28528, 5.36659, 5.4479, 5.52922, 5.61053, 5.69184, 5.77315,
|
||||
5.85446, 5.93578, 6.01709, 6.0984, 6.17971, 6.26102, 6.34234, 6.42365,
|
||||
6.50496, 6.58627, 6.66758, 6.7489, 6.83021, 6.91152, 6.99283, 7.07414,
|
||||
7.15546, 7.23677, 7.31808, 7.39939, 7.4807, 7.56202, 7.64333, 7.72464,
|
||||
7.80595, 7.88726, 7.96858, 8.04989, 8.1312, 8.21251, 8.29382, 8.37514,
|
||||
8.45645, 8.53776, 8.61907, 8.70038, 8.7817, 8.86301, 8.94432, 9.02563,
|
||||
9.10694, 9.18826, 9.26957, 9.35088, 9.43219, 9.5135, 9.59482, 9.67613,
|
||||
9.75744, 9.83875, 9.92006, 10.0014, 10.0827, 10.164, 10.2453, 10.3266,
|
||||
10.4079, 10.4892, 10.5706, 10.6519, 10.7332, 10.8145, 10.8958, 10.9771,
|
||||
11.0584, 11.1397, 11.2211, 11.3024, 11.3837, 11.465, 11.5463, 11.6276,
|
||||
11.7089, 11.7902, 11.8716, 11.9529, 12.0342, 12.1155, 12.1968, 12.2781,
|
||||
12.3594, 12.4407, 12.522, 12.6034, 12.6847, 12.766, 12.8473, 12.9286,
|
||||
13.0099, 13.0912, 13.1725, 13.2539, 13.3352, 13.4165, 13.4978, 13.5791,
|
||||
13.6604, 13.7417, 13.823, 13.9044, 13.9857, 14.067, 14.1483, 14.2296,
|
||||
14.3109, 14.3922, 14.4735, 14.5548, 14.6362, 14.7175, 14.7988, 14.8801,
|
||||
14.9614, 15.0427, 15.124, 15.2053, 15.2867, 15.368, 15.4493, 15.5306,
|
||||
15.6119, 15.6932, 15.7745, 15.8558, 15.9372, 16.0185, 16.0998, 16.1811,
|
||||
16.2624, 16.3437, 16.425, 16.5063, 16.5876, 16.669, 16.7503, 16.8316,
|
||||
16.9129, 16.9942, 17.0755, 17.1568, 17.2381, 17.3195, 17.4008, 17.4821,
|
||||
17.5634, 17.6447, 17.726, 17.8073, 17.8886, 17.97, 18.0513, 18.1326,
|
||||
18.2139, 18.2952, 18.3765, 18.4578, 18.5391, 18.6204, 18.7018, 18.7831,
|
||||
18.8644, 18.9457, 19.027, 19.1083, 19.1896, 19.2709, 19.3523, 19.4336,
|
||||
19.5149, 19.5962, 19.6775, 19.7588, 19.8401, 19.9214, 20.0028, 20.0841,
|
||||
20.1654, 20.2467, 20.328, 20.4093, 20.4906, 20.5719, 20.6532, 20.7346,
|
||||
};
|
||||
|
||||
void convert_RGB_to_YCbCr(coeff_t **R, coeff_t **G, coeff_t **B,
|
||||
coeff_t **Y, coeff_t **Cb, coeff_t **Cr,
|
||||
int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
assert(width > 0);
|
||||
assert(height > 0);
|
||||
|
||||
/* Perhaps one should optimize this code with integer-valued
|
||||
* look-up tables. On the other hand, the rest of the program
|
||||
* (e.g. wavelet transform, resampling etc.) still using FPU.
|
||||
* Moreover, additional rounding operation (even with proper
|
||||
* rescaling) will involve some marginal image distortion. */
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
int r = (int) R[i][j];
|
||||
int g = (int) G[i][j];
|
||||
int b = (int) B[i][j];
|
||||
|
||||
Y[i][j] = O_299000[r] + O_587000[g] + O_114000[b];
|
||||
Cb[i][j] = -O_168736[r] - O_331264[g] + O_500000[b] + 128.0;
|
||||
Cr[i][j] = O_500000[r] - O_418688[g] - O_081312[b] + 128.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void convert_YCbCr_to_RGB(coeff_t **Y, coeff_t **Cb, coeff_t **Cr,
|
||||
coeff_t **R, coeff_t **G, coeff_t **B,
|
||||
int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
assert(width > 0);
|
||||
assert(height > 0);
|
||||
|
||||
/* Due to rounding and quantization errors output RGB values
|
||||
* may not be enclosed within [0..255] interval. To solve
|
||||
* this problem the values are clipped after transformation. */
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
R[i][j] = CLIP(Y[i][j] + (Cr[i][j] - 128.0) * 1.402);
|
||||
G[i][j] = CLIP(Y[i][j] - (Cb[i][j] - 128.0) * 0.34413 - (Cr[i][j] - 128.0) * 0.71414);
|
||||
B[i][j] = CLIP(Y[i][j] + (Cb[i][j] - 128.0) * 1.772);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void clip_channel(coeff_t **channel, int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
assert(width > 0);
|
||||
assert(height > 0);
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
channel[i][j] = CLIP(channel[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* $Id: color.h,v 1.18 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Color space convertion
|
||||
*
|
||||
* This file contains routines for color space conversion.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* International Telecommunications Union, ITU-R BT.601 */
|
||||
|
||||
#ifndef __COLOR_H__
|
||||
#define __COLOR_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup color Color space conversion */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Round value to the nearest integer */
|
||||
#define ROUND(_x) ((_x) < 0 ? (int) ((_x) - 0.5) : (int) ((_x) + 0.5))
|
||||
/** Enclose value in the [0..255] interval */
|
||||
#define CLIP(_x) ((_x) < 0 ? 0 : ((_x) > 255 ? 255 : ROUND((_x))))
|
||||
|
||||
/** RGB to YCbCr conversion
|
||||
*
|
||||
* This function converts image from RGB to YCbCr color space.
|
||||
*
|
||||
* \param R Red channel
|
||||
* \param G Green channel
|
||||
* \param B Blue channel
|
||||
* \param Y Luma channel
|
||||
* \param Cb Chroma-blue channel
|
||||
* \param Cr Chroma-red channel
|
||||
* \param width Image width
|
||||
* \param height Image height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void convert_RGB_to_YCbCr(coeff_t **R, coeff_t **G, coeff_t **B,
|
||||
coeff_t **Y, coeff_t **Cb, coeff_t **Cr,
|
||||
int width, int height);
|
||||
|
||||
/** YCbCr to RGB conversion
|
||||
*
|
||||
* This function converts image from YCbCr to RGB color space.
|
||||
*
|
||||
* \param Y Luma channel
|
||||
* \param Cb Chroma-blue channel
|
||||
* \param Cr Chroma-red channel
|
||||
* \param R Red channel
|
||||
* \param G Green channel
|
||||
* \param B Blue channel
|
||||
* \param width Image width
|
||||
* \param height Image height
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note On return, all values are enclosed within [0..255] interval. */
|
||||
void convert_YCbCr_to_RGB(coeff_t **Y, coeff_t **Cb, coeff_t **Cr,
|
||||
coeff_t **R, coeff_t **G, coeff_t **B,
|
||||
int width, int height);
|
||||
|
||||
/** Channel clipping
|
||||
*
|
||||
* This function encloses (clips) each \a channel value within [0..255] interval
|
||||
* with appropriative rounding.
|
||||
*
|
||||
* \param channel Channel to clip
|
||||
* \param width Image width
|
||||
* \param height Image height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void clip_channel(coeff_t **channel, int width, int height);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __COLOR_H__ */
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* $Id: common.c,v 1.15 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
int number_of_bits(int value)
|
||||
{
|
||||
int bits;
|
||||
|
||||
bits = NUMBER_OF_BITS(GET_BYTE(value, 3));
|
||||
if (bits) return bits + 24;
|
||||
|
||||
bits = NUMBER_OF_BITS(GET_BYTE(value, 2));
|
||||
if (bits) return bits + 16;
|
||||
|
||||
bits = NUMBER_OF_BITS(GET_BYTE(value, 1));
|
||||
if (bits) return bits + 8;
|
||||
|
||||
bits = NUMBER_OF_BITS(GET_BYTE(value, 0));
|
||||
if (bits) return bits;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int is_power_of_two(int value)
|
||||
{
|
||||
return (value == (1 << (number_of_bits(value) - 1)));
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/*
|
||||
* $Id: common.h,v 1.30 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Useful macro and defines
|
||||
*
|
||||
* This file contains useful macro and defines which are
|
||||
* common to all library parts. */
|
||||
|
||||
#ifndef __COMMON_H__
|
||||
#define __COMMON_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup misc Miscellanea */
|
||||
/*@{*/
|
||||
|
||||
/* Use _snprintf instead of snprintf under MSVC compiler */
|
||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/** Maximum value */
|
||||
#define MAX(_x, _y) ((_x) > (_y) ? (_x) : (_y))
|
||||
/** Minimum value */
|
||||
#define MIN(_x, _y) ((_x) < (_y) ? (_x) : (_y))
|
||||
/** Absolute value */
|
||||
#define ABS(_x) ((_x) >= 0 ? (_x) : -(_x))
|
||||
/** Square root */
|
||||
#define SQRT2 1.414213562373095
|
||||
/** Very helpful definition */
|
||||
#define local static
|
||||
|
||||
/** Table to speed-up number_of_bits() calculation */
|
||||
local int number_of_bits_table[256] = {
|
||||
0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
};
|
||||
|
||||
/** Number of bits in a byte value */
|
||||
#define NUMBER_OF_BITS(_x) (number_of_bits_table[(_x)])
|
||||
/** Extract one byte from integer */
|
||||
#define GET_BYTE(_x, _i) (((unsigned char *) &(_x))[(_i)])
|
||||
|
||||
/** Type definition for filter coefficients */
|
||||
typedef double coeff_t;
|
||||
|
||||
/** Number of bits in the value
|
||||
*
|
||||
* This function computes the number of bits in the \a value
|
||||
* (e.g. number_of_bits(13) = 4).
|
||||
*
|
||||
* \param value Target value
|
||||
*
|
||||
* \return Number of bits */
|
||||
int number_of_bits(int value);
|
||||
|
||||
/** Check whether the \a value is a power of two or not
|
||||
*
|
||||
* This function checks whether the \a value is a
|
||||
* power of two or not.
|
||||
*
|
||||
* \param value Target value
|
||||
*
|
||||
* \return \c 1 if \a value is a power of two and \c 0 otherwise */
|
||||
int is_power_of_two(int value);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __COMMON_H__ */
|
|
@ -0,0 +1,336 @@
|
|||
/*
|
||||
* $Id: daub97lift.h,v 1.4 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Daubechies 9/7 wavelet transform (Lifting)
|
||||
*
|
||||
* This file contains lifting implementation of a famous Daubechies 9/7
|
||||
* wavelet transform. Lifting transforms are faster than generic
|
||||
* filter-based counterparts, but they lack uniformity.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* <a href="http://qccpack.sourceforge.net/">QccPack, James E. Fowler</a> */
|
||||
|
||||
#ifndef __DAUB97LIFT_H__
|
||||
#define __DAUB97LIFT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup daub97lift Daubechies 9/7 wavelet transform (Lifting) */
|
||||
/*@{*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** ALPHA coefficient */
|
||||
#define ALPHA -1.58615986717275
|
||||
/** BETA coefficient */
|
||||
#define BETA -0.05297864003258
|
||||
/** GAMMA coefficient */
|
||||
#define GAMMA 0.88293362717904
|
||||
/** DELTA coefficient */
|
||||
#define DELTA 0.44350482244527
|
||||
/** EPSILON coefficient */
|
||||
#define EPSILON 1.14960430535816
|
||||
|
||||
/** One dimensional Daubechies 9/7 wavelet decomposition
|
||||
*
|
||||
* This function performes one stage of 1D wavelet decomposition
|
||||
* of \a signal_in using Daubechies 9/7 lifting transform. The result is
|
||||
* stored in \a signal_out. On return, the first half of \a signal_out
|
||||
* will be occupied with lowpass coefficients, the second half - with highpass
|
||||
* coefficients.
|
||||
*
|
||||
* \param signal_in Input signal
|
||||
* \param signal_out Output signal
|
||||
* \param signal_length Signal length
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note \a signal_length should be even. */
|
||||
inline local void daub97lift_analysis_1D_even(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length);
|
||||
|
||||
/** One dimensional wavelet reconstruction
|
||||
*
|
||||
* This function performes one stage of 1D wavelet reconstruction
|
||||
* of \a signal_in using Daubechies 9/7 lifting transform. The result is
|
||||
* stored in \a signal_out.
|
||||
*
|
||||
* \param signal_in Input signal
|
||||
* \param signal_out Output signal
|
||||
* \param signal_length Signal length
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note \a signal_length should be even. */
|
||||
inline local void daub97lift_synthesis_1D_even(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length);
|
||||
|
||||
/** One dimensional Daubechies 9/7 wavelet decomposition
|
||||
*
|
||||
* This function performes one stage of 1D wavelet decomposition
|
||||
* of \a signal_in using Daubechies 9/7 lifting transform. The result is
|
||||
* stored in \a signal_out. On return, the first half of \a signal_out
|
||||
* will be occupied with lowpass coefficients, the second half - with highpass
|
||||
* coefficients.
|
||||
*
|
||||
* \param signal_in Input signal
|
||||
* \param signal_out Output signal
|
||||
* \param signal_length Signal length
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note \a signal_length should be odd, as a consequence
|
||||
* there will be one extra lowpass coefficient. */
|
||||
inline local void daub97lift_analysis_1D_odd(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length);
|
||||
|
||||
/** One dimensional wavelet reconstruction
|
||||
*
|
||||
* This function performes one stage of 1D wavelet reconstruction
|
||||
* of \a signal_in using Daubechies 9/7 lifting transform. The result is
|
||||
* stored in \a signal_out.
|
||||
*
|
||||
* \param signal_in Input signal
|
||||
* \param signal_out Output signal
|
||||
* \param signal_length Signal length
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note \a signal_length should be odd. */
|
||||
inline local void daub97lift_synthesis_1D_odd(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length);
|
||||
|
||||
/* Those functions are placed here in order to be inline-ed */
|
||||
|
||||
inline local void daub97lift_analysis_1D_even(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < signal_length - 2; i += 2) {
|
||||
signal_in[i] += ALPHA * (signal_in[i - 1] + signal_in[i + 1]);
|
||||
}
|
||||
|
||||
signal_in[signal_length - 1] += 2 * ALPHA * signal_in[signal_length - 2];
|
||||
signal_in[0] += 2 * BETA * signal_in[1];
|
||||
|
||||
for (i = 2; i < signal_length; i += 2) {
|
||||
signal_in[i] += BETA * (signal_in[i + 1] + signal_in[i - 1]);
|
||||
}
|
||||
|
||||
for (i = 1; i < signal_length - 2; i += 2) {
|
||||
signal_in[i] += GAMMA * (signal_in[i - 1] + signal_in[i + 1]);
|
||||
}
|
||||
|
||||
signal_in[signal_length - 1] += 2 * GAMMA * signal_in[signal_length - 2];
|
||||
signal_in[0] = EPSILON * (signal_in[0] + 2 * DELTA * signal_in[1]);
|
||||
|
||||
for (i = 2; i < signal_length; i += 2) {
|
||||
signal_in[i] = EPSILON * (signal_in[i] + DELTA * (signal_in[i + 1] +
|
||||
signal_in[i - 1]));
|
||||
}
|
||||
|
||||
for (i = 1; i < signal_length; i += 2) {
|
||||
signal_in[i] /= (-EPSILON);
|
||||
}
|
||||
|
||||
{
|
||||
int half = signal_length / 2;
|
||||
coeff_t *even = signal_out;
|
||||
coeff_t *odd = signal_out + half;
|
||||
|
||||
for (i = 0; i < half; i++) {
|
||||
even[i] = signal_in[i * 2];
|
||||
odd[i] = signal_in[i * 2 + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline local void daub97lift_synthesis_1D_even(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length)
|
||||
{
|
||||
int i;
|
||||
|
||||
{
|
||||
int half = signal_length / 2;
|
||||
coeff_t *even = signal_in;
|
||||
coeff_t *odd = signal_in + half;
|
||||
|
||||
for (i = 0; i < half; i++) {
|
||||
signal_out[i * 2] = even[i];
|
||||
signal_out[i * 2 + 1] = odd[i];
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i < signal_length; i += 2) {
|
||||
signal_out[i] *= (-EPSILON);
|
||||
}
|
||||
|
||||
signal_out[0] = signal_out[0] / EPSILON - 2 * DELTA * signal_out[1];
|
||||
|
||||
for (i = 2; i < signal_length; i += 2) {
|
||||
signal_out[i] = signal_out[i] / EPSILON - DELTA * (signal_out[i + 1] +
|
||||
signal_out[i - 1]);
|
||||
}
|
||||
|
||||
for (i = 1; i < signal_length - 2; i += 2) {
|
||||
signal_out[i] -= GAMMA * (signal_out[i - 1] + signal_out[i + 1]);
|
||||
}
|
||||
|
||||
signal_out[signal_length - 1] -= 2 * GAMMA * signal_out[signal_length - 2];
|
||||
signal_out[0] -= 2 * BETA * signal_out[1];
|
||||
|
||||
for (i = 2; i < signal_length; i += 2) {
|
||||
signal_out[i] -= BETA * (signal_out[i + 1] + signal_out[i - 1]);
|
||||
}
|
||||
|
||||
for (i = 1; i < signal_length - 2; i += 2) {
|
||||
signal_out[i] -= ALPHA * (signal_out[i - 1] + signal_out[i + 1]);
|
||||
}
|
||||
|
||||
signal_out[signal_length - 1] -= 2 * ALPHA * signal_out[signal_length - 2];
|
||||
}
|
||||
|
||||
inline local void daub97lift_analysis_1D_odd(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < signal_length - 1; i += 2) {
|
||||
signal_in[i] += ALPHA * (signal_in[i - 1] + signal_in[i + 1]);
|
||||
}
|
||||
|
||||
signal_in[0] += 2 * BETA * signal_in[1];
|
||||
|
||||
for (i = 2; i < signal_length - 2; i += 2) {
|
||||
signal_in[i] += BETA * (signal_in[i + 1] + signal_in[i - 1]);
|
||||
}
|
||||
|
||||
signal_in[signal_length - 1] += 2 * BETA * signal_in[signal_length - 2];
|
||||
|
||||
for (i = 1; i < signal_length - 1; i += 2) {
|
||||
signal_in[i] += GAMMA * (signal_in[i - 1] + signal_in[i + 1]);
|
||||
}
|
||||
|
||||
signal_in[0] = EPSILON * (signal_in[0] + 2 * DELTA * signal_in[1]);
|
||||
|
||||
for (i = 2; i < signal_length - 2; i += 2) {
|
||||
signal_in[i] = EPSILON * (signal_in[i] + DELTA * (signal_in[i + 1] +
|
||||
signal_in[i - 1]));
|
||||
}
|
||||
|
||||
signal_in[signal_length - 1] = EPSILON * (signal_in[signal_length - 1] +
|
||||
2 * DELTA * signal_in[signal_length - 2]);
|
||||
|
||||
for (i = 1; i < signal_length - 1; i += 2) {
|
||||
signal_in[i] /= (-EPSILON);
|
||||
}
|
||||
|
||||
{
|
||||
int half = signal_length / 2 + 1;
|
||||
coeff_t *even = signal_out;
|
||||
coeff_t *odd = signal_out + half;
|
||||
|
||||
for (i = 0; i < half - 1; i++) {
|
||||
even[i] = signal_in[i * 2];
|
||||
odd[i] = signal_in[i * 2 + 1];
|
||||
}
|
||||
|
||||
even[half - 1] = signal_in[signal_length - 1];
|
||||
}
|
||||
}
|
||||
|
||||
inline local void daub97lift_synthesis_1D_odd(coeff_t *signal_in,
|
||||
coeff_t *signal_out,
|
||||
int signal_length)
|
||||
{
|
||||
int i;
|
||||
|
||||
{
|
||||
int half = signal_length / 2 + 1;
|
||||
coeff_t *even = signal_in;
|
||||
coeff_t *odd = signal_in + half;
|
||||
|
||||
for (i = 0; i < half - 1; i++) {
|
||||
signal_out[i * 2] = even[i];
|
||||
signal_out[i * 2 + 1] = odd[i];
|
||||
}
|
||||
|
||||
signal_out[signal_length - 1] = even[half - 1];
|
||||
}
|
||||
|
||||
for (i = 1; i < signal_length - 1; i += 2) {
|
||||
signal_out[i] *= (-EPSILON);
|
||||
}
|
||||
|
||||
signal_out[0] = signal_out[0] / EPSILON - 2 * DELTA * signal_out[1];
|
||||
|
||||
for (i = 2; i < signal_length - 2; i += 2) {
|
||||
signal_out[i] = signal_out[i] / EPSILON - DELTA * (signal_out[i + 1] +
|
||||
signal_out[i - 1]);
|
||||
}
|
||||
|
||||
signal_out[signal_length - 1] = signal_out[signal_length - 1] / EPSILON -
|
||||
2 * DELTA * signal_out[signal_length - 2];
|
||||
|
||||
for (i = 1; i < signal_length - 1; i += 2) {
|
||||
signal_out[i] -= GAMMA * (signal_out[i - 1] + signal_out[i + 1]);
|
||||
}
|
||||
|
||||
signal_out[0] -= 2 * BETA * signal_out[1];
|
||||
|
||||
for (i = 2; i < signal_length - 2; i += 2) {
|
||||
signal_out[i] -= BETA * (signal_out[i + 1] + signal_out[i - 1]);
|
||||
}
|
||||
|
||||
signal_out[signal_length - 1] -= 2 * BETA * signal_out[signal_length - 2];
|
||||
|
||||
for (i = 1; i < signal_length - 1; i += 2) {
|
||||
signal_out[i] -= ALPHA * (signal_out[i - 1] + signal_out[i + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DAUB97LIFT_H__ */
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* $Id: dc_level.c,v 1.11 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <dc_level.h>
|
||||
|
||||
coeff_t dc_level_shift(coeff_t **channel, int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
coeff_t average = 0.0;
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
average += channel[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
average = average / (width * height);
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
channel[i][j] -= average;
|
||||
}
|
||||
}
|
||||
|
||||
return average;
|
||||
}
|
||||
|
||||
void dc_level_unshift(coeff_t **channel, coeff_t average, int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
channel[i][j] += average;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* $Id: dc_level.h,v 1.13 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief DC level shift
|
||||
*
|
||||
* In order to further improve codec perfomance, input signal must be
|
||||
* centered around zero before applying wavelet transform. One can
|
||||
* accomplish this by subtracting mean value from each image sample.
|
||||
* This preprocessing step results in wavelet coefficient magnitude
|
||||
* decrease, which in turn, reduces number of bits required for
|
||||
* image encoding. After decoding, one have to perform the inverse
|
||||
* operation, i.e. add stored mean value to each reconstructed image sample. */
|
||||
|
||||
#ifndef __DC_LEVEL_H__
|
||||
#define __DC_LEVEL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup dc_level DC level shift */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** DC level shift
|
||||
*
|
||||
* This function subtracts mean value from each image sample.
|
||||
*
|
||||
* \param channel Image channel
|
||||
* \param width Image width
|
||||
* \param height Image height
|
||||
*
|
||||
* \return Mean value */
|
||||
coeff_t dc_level_shift(coeff_t **channel, int width, int height);
|
||||
|
||||
/** DC level unshift
|
||||
*
|
||||
* This function adds stored mean value to each
|
||||
* reconstructed image sample.
|
||||
*
|
||||
* \param channel Image channel
|
||||
* \param average Average (mean) value
|
||||
* \param width Image width
|
||||
* \param height Image height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void dc_level_unshift(coeff_t **channel, coeff_t average, int width, int height);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DC_LEVEL_H__ */
|
|
@ -0,0 +1,572 @@
|
|||
/*
|
||||
* $Id: epsilon.h,v 1.61 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Top-level library interface
|
||||
*
|
||||
* This file contains top-level library interface. This is the
|
||||
* only header that user program needs to include. */
|
||||
|
||||
/** \mainpage EPSILON - wavelet image compression library
|
||||
*
|
||||
* \section about_sec About
|
||||
*
|
||||
* EPSILON is an OpenSource wavelet image compression library.
|
||||
* The library consists of several independed modules and have
|
||||
* very simple and clear layout. Each module is intensively
|
||||
* tested and carefully documented. This manual can be thought
|
||||
* as an exhaustive library API reference. It covers top-level
|
||||
* library interface as well as library internals. Being included
|
||||
* into the source code the information presented here is
|
||||
* always up to date.
|
||||
*
|
||||
* \section contact_sec Contact
|
||||
*
|
||||
* Feedback, bug-reports and patches are welcome.
|
||||
* Feel free to write: Alexander Simakov,
|
||||
* <<a href="mailto:xander@entropyware.info">xander@entropyware.info</a>>
|
||||
*
|
||||
* <a href="http://epsilon-project.sourceforge.net">http://epsilon-project.sourceforge.net</a><br> */
|
||||
|
||||
#ifndef __EPSILON_H__
|
||||
#define __EPSILON_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/** \addtogroup toplevel Top-level library interface */
|
||||
/*@{*/
|
||||
|
||||
/** Block marker
|
||||
*
|
||||
* Each block in the stream should be terminated
|
||||
* with one or more \ref EPS_MARKER values. This
|
||||
* technique greatly improves overall system
|
||||
* robustness and leads to quick stream
|
||||
* resynchronization. */
|
||||
#define EPS_MARKER 0x00
|
||||
|
||||
/** GRAYSCALE block
|
||||
*
|
||||
* This type of blocks is intended for storing grayscale
|
||||
* image data. */
|
||||
#define EPS_GRAYSCALE_BLOCK 1
|
||||
|
||||
/** TRUECOLOR block
|
||||
*
|
||||
* This type of blocks is intended for storing truecolor
|
||||
* image data. */
|
||||
#define EPS_TRUECOLOR_BLOCK 2
|
||||
|
||||
/** Maximal (recomended) block width and height */
|
||||
#define EPS_MAX_BLOCK_SIZE 1024
|
||||
/** Minimal (recomended) block width and height */
|
||||
#define EPS_MIN_BLOCK_SIZE 32
|
||||
|
||||
/** Minimal (mandatory) buffer size for GRAYSCALE block */
|
||||
#define EPS_MIN_GRAYSCALE_BUF 256
|
||||
/** Maximal (recomended) buffer size for GRAYSCALE block */
|
||||
#define EPS_MAX_GRAYSCALE_BUF 2 * EPS_MAX_BLOCK_SIZE * EPS_MAX_BLOCK_SIZE
|
||||
/** Minimal (mandatory) buffer size for TRUECOLOR block */
|
||||
#define EPS_MIN_TRUECOLOR_BUF 256
|
||||
/** Maximal (recomended) buffer size for TRUECOLOR block */
|
||||
#define EPS_MAX_TRUECOLOR_BUF 6 * EPS_MAX_BLOCK_SIZE * EPS_MAX_BLOCK_SIZE
|
||||
|
||||
/** Normal mode
|
||||
*
|
||||
* This mode assumes that image is square and height = width = 2 ^ N. */
|
||||
#define EPS_MODE_NORMAL 0
|
||||
|
||||
/** OTLPF mode
|
||||
*
|
||||
* This mode also assumes that image is square, but height = width = (2 ^ N) + 1.
|
||||
* In a few words, OTLPF is some kind of hack to reduce boundary artefacts
|
||||
* when image is broken into several tiles. Due to mathematical constrains
|
||||
* this method can be applied to biorthogonal filters only. */
|
||||
#define EPS_MODE_OTLPF 1
|
||||
|
||||
/** Data or header CRC is correct */
|
||||
#define EPS_GOOD_CRC 0
|
||||
/** Data or header CRC is incorrect */
|
||||
#define EPS_BAD_CRC 1
|
||||
|
||||
/** Extract all filterbank IDs */
|
||||
#define EPS_FB_ID 0
|
||||
/** Extract all filterbank names */
|
||||
#define EPS_FB_NAME 1
|
||||
/** Extract all filterbank orthogonality types */
|
||||
#define EPS_FB_TYPE 2
|
||||
|
||||
/** Default bit-budget percent for the Y channel */
|
||||
#define EPS_Y_RT 90
|
||||
/** Default bit-budget percent for the Cb channel */
|
||||
#define EPS_Cb_RT 5
|
||||
/** Default bit-budget percent for the Cr channel */
|
||||
#define EPS_Cr_RT 5
|
||||
|
||||
/** Minimal value for bit-budget percent value */
|
||||
#define EPS_MIN_RT 1
|
||||
/** Maximal value for bit-budget percent value */
|
||||
#define EPS_MAX_RT 98
|
||||
|
||||
/** Perform no image resampling */
|
||||
#define EPS_RESAMPLE_444 0
|
||||
/** Resample image according to the 4:2:0 scheme */
|
||||
#define EPS_RESAMPLE_420 1
|
||||
|
||||
/** Successful operation */
|
||||
#define EPS_OK 0
|
||||
/** Incorrect function parameter */
|
||||
#define EPS_PARAM_ERROR 1
|
||||
/** Incorrect data format */
|
||||
#define EPS_FORMAT_ERROR 2
|
||||
/** Specified filterbank is not supported */
|
||||
#define EPS_UNSUPPORTED_FB 3
|
||||
|
||||
/** Type definition for CRC32 value */
|
||||
typedef uint32_t crc32_t;
|
||||
|
||||
/** GRAYSCALE block header */
|
||||
typedef struct gs_hdr_tag {
|
||||
/** Image width */
|
||||
int W;
|
||||
/** Image height */
|
||||
int H;
|
||||
/** Block width */
|
||||
int w;
|
||||
/** Block height */
|
||||
int h;
|
||||
/** Block X coordinate */
|
||||
int x;
|
||||
/** Block Y coordinate */
|
||||
int y;
|
||||
/** Either \ref EPS_MODE_NORMAL or \ref EPS_MODE_OTLPF */
|
||||
int mode;
|
||||
/** DC value */
|
||||
int dc;
|
||||
/** Filterbank ID (should not be modified or released) */
|
||||
char *fb_id;
|
||||
} gs_hdr;
|
||||
|
||||
/** TRUECOLOR block header */
|
||||
typedef struct tc_hdr_tag {
|
||||
/** Image width */
|
||||
int W;
|
||||
/** Image height */
|
||||
int H;
|
||||
/** Block width */
|
||||
int w;
|
||||
/** Block height */
|
||||
int h;
|
||||
/** Block X coordinate */
|
||||
int x;
|
||||
/** Block Y coordinate */
|
||||
int y;
|
||||
/** Either \ref EPS_MODE_NORMAL or \ref EPS_MODE_OTLPF */
|
||||
int mode;
|
||||
/** Either \ref EPS_RESAMPLE_444 or \ref EPS_RESAMPLE_420 */
|
||||
int resample;
|
||||
/** DC value of the Y channel */
|
||||
int dc_Y;
|
||||
/** DC value of the Cb channel */
|
||||
int dc_Cb;
|
||||
/** DC value of the Cr channel */
|
||||
int dc_Cr;
|
||||
/** Initial ratio of the Y channel */
|
||||
int Y_rt;
|
||||
/** Initial ratio of the Cb channel */
|
||||
int Cb_rt;
|
||||
/** Initial ratio of the Cr channel */
|
||||
int Cr_rt;
|
||||
/** Filterbank ID (should not be modified or released) */
|
||||
char *fb_id;
|
||||
} tc_hdr;
|
||||
|
||||
/** Generic block header */
|
||||
typedef struct eps_block_header_tag {
|
||||
/** Block type
|
||||
*
|
||||
* Either \ref EPS_GRAYSCALE_BLOCK or \ref EPS_TRUECOLOR_BLOCK. */
|
||||
int block_type;
|
||||
|
||||
/** Header size in bytes */
|
||||
int hdr_size;
|
||||
/** Data size in bytes */
|
||||
int data_size;
|
||||
|
||||
/** Header CRC */
|
||||
crc32_t chk;
|
||||
/** Data CRC */
|
||||
crc32_t crc;
|
||||
|
||||
/** Header CRC flag
|
||||
*
|
||||
* Either \ref EPS_GOOD_CRC or \ref EPS_BAD_CRC */
|
||||
int chk_flag;
|
||||
/** Data CRC flag
|
||||
*
|
||||
* Either \ref EPS_GOOD_CRC or \ref EPS_BAD_CRC */
|
||||
int crc_flag;
|
||||
|
||||
union {
|
||||
/** Special information for GRAYSCALE blocks */
|
||||
gs_hdr gs;
|
||||
/** Special information for TRUECOLOR blocks */
|
||||
tc_hdr tc;
|
||||
} hdr_data;
|
||||
} eps_block_header;
|
||||
|
||||
/** Query available filterbanks
|
||||
*
|
||||
* Depending on the \a type parameter this function
|
||||
* composes a \c NULL terminated list of all available
|
||||
* filterbank IDs, names or orthogonality types.
|
||||
*
|
||||
* \note The caller should subsequently release allocated list
|
||||
* (using \ref eps_free_fb_info function) when it is no longer
|
||||
* required.
|
||||
*
|
||||
* \note The caller should not modify allocated structure.
|
||||
|
||||
* \param type Type of information: either \ref EPS_FB_ID or
|
||||
* \ref EPS_FB_NAME or \ref EPS_FB_TYPE
|
||||
*
|
||||
* \return List of strings */
|
||||
char **eps_get_fb_info(int type);
|
||||
|
||||
/** Release filterbank information
|
||||
*
|
||||
* This function releases filterbank infomation,
|
||||
* allocated by the \ref eps_get_fb_info function.
|
||||
*
|
||||
* \param info List of strings
|
||||
*
|
||||
* \return \c VOID */
|
||||
void eps_free_fb_info(char **info);
|
||||
|
||||
/** Memory allocation
|
||||
*
|
||||
* This function allocates one-dimensional array of desired size.
|
||||
*
|
||||
* \param size Size in bytes
|
||||
*
|
||||
* \return Array pointer
|
||||
*
|
||||
* \warning This function halts the program if all virtual memory
|
||||
* is exhausted. */
|
||||
void **eps_xmalloc(int size);
|
||||
|
||||
/** 2D-malloc
|
||||
*
|
||||
* This function allocates two-dimensional array of desired size.
|
||||
*
|
||||
* \param width Array width
|
||||
* \param height Array height
|
||||
* \param size Element size
|
||||
*
|
||||
* \return Array pointer
|
||||
*
|
||||
* \warning This function halts the program if all virtual memory
|
||||
* is exhausted. */
|
||||
void **eps_malloc_2D(int width, int height, int size);
|
||||
|
||||
/** 2D-free
|
||||
*
|
||||
* This function releases two-dimensional array allocated by \ref eps_malloc_2D.
|
||||
*
|
||||
* \param ptr Array pointer
|
||||
* \param width Array width
|
||||
* \param height Array height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void eps_free_2D(void **ptr, int width, int height);
|
||||
|
||||
/** Read block header
|
||||
*
|
||||
* This function performes a broad range of tasks:
|
||||
*
|
||||
* <ul>
|
||||
* <li>Read and parse block header</li>
|
||||
* <li>Check header consistency</li>
|
||||
* <li>Check header and data CRC</li>
|
||||
* <li>Fill special \ref eps_block_header structure with
|
||||
* gathered information (it is worthwhile to mention that
|
||||
* all decoding functions in the library rely on this
|
||||
* structure)</li>
|
||||
* </ul>
|
||||
*
|
||||
* The \ref eps_block_header structure consists of two parts:
|
||||
* general part and special part. The first one holds information
|
||||
* that is common for all block types. The second one holds
|
||||
* information that is specific for a particular block type.
|
||||
*
|
||||
* \note The data buffer \a buf should hold \b whole block
|
||||
* without markers.
|
||||
*
|
||||
* \param buf Data buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param hdr Block header
|
||||
*
|
||||
* \return The function returns either \ref EPS_OK (the header
|
||||
* is well-formed, the \a hdr structure is filled appropriately)
|
||||
* or \ref EPS_PARAM_ERROR (your should not get this error
|
||||
* unless you pass a \c NULL pointer, negative buffer size or
|
||||
* something like that) or \ref EPS_FORMAT_ERROR (the header is
|
||||
* malformed, block should be ignored). */
|
||||
int eps_read_block_header(unsigned char *buf, int buf_size,
|
||||
eps_block_header *hdr);
|
||||
|
||||
/** Encode a GRAYSCALE block
|
||||
*
|
||||
* This function encodes a signle grayscale image \a block of
|
||||
* size \a w by \a h pixels as block of type \ref EPS_GRAYSCALE_BLOCK.
|
||||
* It is assumed that the \a block is taken from the image of size
|
||||
* \a W by \a H pixels at position (\a x, \a y). All these parameters
|
||||
* should be consistent. The encoded data is stored in the \a buf
|
||||
* of size \a buf_size.
|
||||
*
|
||||
* \note The most surprising thing here is that you can choose almost
|
||||
* any (see note below) \a buf_size you wish! Thus you can precisely
|
||||
* control encoding bit-rate. This technique is called embedded coding.
|
||||
* In a few words, any encoded prefix can be used to decode a whole
|
||||
* image. So, you can safely truncate stream at any point.
|
||||
*
|
||||
* \note The caller should allocate at least \ref EPS_MIN_GRAYSCALE_BUF
|
||||
* bytes for the \a buf.
|
||||
*
|
||||
* \note On successful return, the value pointed by the \a buf_size
|
||||
* will be overwritten with a real amount of bytes used in the
|
||||
* \a buf (it will be less then or equal to the original \a buf_size
|
||||
* value).
|
||||
*
|
||||
* \note Depending on the \a mode parameter maximal \a block
|
||||
* width or height is either \ref EPS_MAX_BLOCK_SIZE (if \a mode =
|
||||
* \ref EPS_MODE_NORMAL) or \ref EPS_MAX_BLOCK_SIZE + 1
|
||||
* (if \a mode = \ref EPS_MODE_OTLPF).
|
||||
*
|
||||
* \note There is no restrictions on the image size itself.
|
||||
*
|
||||
* \note The caller should select a value for the \a fb_id
|
||||
* parameter from the list generated by the \ref eps_get_fb_info
|
||||
* function.
|
||||
*
|
||||
* \note The caller should not use orthogonal filterbanks
|
||||
* with \a mode = \ref EPS_MODE_OTLPF. Orthogonality type
|
||||
* can be queried with the \ref eps_get_fb_info function.
|
||||
*
|
||||
* \param block Image block
|
||||
* \param W Image width
|
||||
* \param H Image height
|
||||
* \param w Block width
|
||||
* \param h Block height
|
||||
* \param x Block X coordinate
|
||||
* \param y Block Y coordinate
|
||||
* \param buf Buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param fb_id Filterbank ID
|
||||
* \param mode Either \ref EPS_MODE_NORMAL or \ref EPS_MODE_OTLPF
|
||||
*
|
||||
* \return The function returns either \ref EPS_OK (the block is
|
||||
* successfully encoded), or \ref EPS_PARAM_ERROR (one or more
|
||||
* parameters are incorrect) or \ref EPS_UNSUPPORTED_FB (filterbank with
|
||||
* specified \a fb_id not found). */
|
||||
int eps_encode_grayscale_block(unsigned char **block, int W, int H, int w, int h,
|
||||
int x, int y, unsigned char *buf, int *buf_size,
|
||||
char *fb_id, int mode);
|
||||
|
||||
/** Decode a GRAYSCALE block
|
||||
*
|
||||
* This function decodes a GRAYSCALE image \a block from
|
||||
* the \a buf. Block and image dimensions as well as other
|
||||
* necessary information is taken from the \a hdr structure
|
||||
* filled by the \ref eps_read_block_header function
|
||||
* beforehand.
|
||||
*
|
||||
* \note The caller should not invoke this function if the \a buf
|
||||
* contains no data, i.e. \ref eps_block_header::data_size = 0.
|
||||
*
|
||||
* \note The caller should allocate an image \a block
|
||||
* beforehand. Block dimensions as well as other information
|
||||
* is available in the \a hdr structure.
|
||||
*
|
||||
* \param block Image block
|
||||
* \param buf Buffer
|
||||
* \param hdr Block header
|
||||
*
|
||||
* \return The function returns either \ref EPS_OK (the block is
|
||||
* successfully decoded), or \ref EPS_PARAM_ERROR (one or more
|
||||
* parameters are incorrect) or \ref EPS_UNSUPPORTED_FB (filterbank
|
||||
* used by encoder not found). */
|
||||
int eps_decode_grayscale_block(unsigned char **block, unsigned char *buf,
|
||||
eps_block_header *hdr);
|
||||
|
||||
/** Encode a TRUECOLOR block
|
||||
*
|
||||
* This function encodes a generic RGB truecolor image block.
|
||||
* The original RGB data is arranged in three arrays: \a block_R,
|
||||
* \a block_G and \a block_B respectively. All components should
|
||||
* have equal dimensions: \a w by \a h pixels. It is assumed that
|
||||
* the block is taken from the image of size \a W by \a H pixels
|
||||
* at position (\a x, \a y). All these parameters should be
|
||||
* consistent. The encoded data is stored in the \a buf of size
|
||||
* \a buf_size.
|
||||
*
|
||||
* \note The most surprising thing here is that you can choose almost
|
||||
* any (see note below) \a buf_size you wish! Thus you can precisely
|
||||
* control encoding bit-rate. This technique is called embedded coding.
|
||||
* In a few words, any encoded prefix can be used to decode a whole
|
||||
* image. So, you can safely truncate stream at any point.
|
||||
*
|
||||
* \note The caller should allocate at least \ref EPS_MIN_TRUECOLOR_BUF
|
||||
* bytes for the \a buf.
|
||||
*
|
||||
* \note The overall bit-budget available for the encoder is
|
||||
* \a buf_size bytes. The caller should divide it between
|
||||
* three channels (Y, Cb, Cr) using the following parameters:
|
||||
* \a Y_rt, \a Cb_rt and \a Cr_rt. The function will report an
|
||||
* error unless \a Y_rt + \a Cb_rt + \a Cr_rt equals to 100%.
|
||||
* If no matter you can use default values: \ref EPS_Y_RT,
|
||||
* \ref EPS_Cb_RT and \ref EPS_Cr_RT.
|
||||
*
|
||||
* \note On successful return, the value pointed by the \a buf_size
|
||||
* will be overwritten with a real amount of bytes used in the
|
||||
* \a buf (it will be less then or equal to the original \a buf_size
|
||||
* value).
|
||||
*
|
||||
* \note Depending on the \a mode parameter maximal block
|
||||
* width or height is either \ref EPS_MAX_BLOCK_SIZE (if \a mode =
|
||||
* \ref EPS_MODE_NORMAL) or \ref EPS_MAX_BLOCK_SIZE + 1
|
||||
* (if \a mode = \ref EPS_MODE_OTLPF).
|
||||
*
|
||||
* \note There is no restrictions on the image size itself.
|
||||
*
|
||||
* \note The caller should select a value for the \a fb_id
|
||||
* parameter from the list generated by the \ref eps_get_fb_info
|
||||
* function.
|
||||
*
|
||||
* \note The caller should not use orthogonal filterbanks
|
||||
* with \a mode = \ref EPS_MODE_OTLPF. Orthogonality type
|
||||
* can be queried with the \ref eps_get_fb_info function.
|
||||
*
|
||||
* \param block_R Red component
|
||||
* \param block_G Green component
|
||||
* \param block_B Blue component
|
||||
* \param W Image width
|
||||
* \param H Image height
|
||||
* \param w Block width
|
||||
* \param h Block height
|
||||
* \param x Block X coordinate
|
||||
* \param y Block Y coordinate
|
||||
* \param resample Resampling scheme: either \ref EPS_RESAMPLE_444 or \ref EPS_RESAMPLE_420
|
||||
* \param buf Buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param Y_rt Bit-budget percent for the Y channel
|
||||
* \param Cb_rt Bit-budget percent for the Cb channel
|
||||
* \param Cr_rt Bit-budget percent for the Cr channel
|
||||
* \param fb_id Filterbank ID
|
||||
* \param mode Either \ref EPS_MODE_NORMAL or \ref EPS_MODE_OTLPF
|
||||
*
|
||||
* \return The function returns either \ref EPS_OK (the block is
|
||||
* successfully encoded), or \ref EPS_PARAM_ERROR (one or more
|
||||
* parameters are incorrect) or \ref EPS_UNSUPPORTED_FB (filterbank
|
||||
* with specified \a fb_id not found). */
|
||||
int eps_encode_truecolor_block(unsigned char **block_R,
|
||||
unsigned char **block_G,
|
||||
unsigned char **block_B,
|
||||
int W, int H, int w, int h,
|
||||
int x, int y, int resample,
|
||||
unsigned char *buf, int *buf_size,
|
||||
int Y_rt, int Cb_rt, int Cr_rt,
|
||||
char *fb_id, int mode);
|
||||
|
||||
/** Decode a TRUECOLOR block
|
||||
*
|
||||
* This function decodes a TRUECOLOR image block from
|
||||
* the \a buf. The resulted RGB data will be stored in the
|
||||
* \a block_R, \a block_G, and \a block_B arrays
|
||||
* respectively. Block and image dimensions as well as
|
||||
* other necessary information is taken from the \a hdr
|
||||
* structure filled by the \ref eps_read_block_header
|
||||
* function beforehand.
|
||||
*
|
||||
* \note The caller should not invoke this function if the \a buf
|
||||
* contains no data, i.e. \ref eps_block_header::data_size = 0.
|
||||
*
|
||||
* \note The caller should allocate \a block_R, \a block_G,
|
||||
* and \a block_B arrays beforehand. Block dimensions as well
|
||||
* as other information is available in the \a hdr structure.
|
||||
*
|
||||
* \param block_R Red component
|
||||
* \param block_G Green component
|
||||
* \param block_B Blue component
|
||||
* \param buf Buffer
|
||||
* \param hdr Block header
|
||||
*
|
||||
* \return The function returns either \ref EPS_OK (the block is
|
||||
* successfully decoded), or \ref EPS_PARAM_ERROR (one or more
|
||||
* parameters are incorrect) or \ref EPS_UNSUPPORTED_FB (filterbank
|
||||
* used by encoder not found) or \ref EPS_FORMAT_ERROR
|
||||
* (unsupported data format). */
|
||||
int eps_decode_truecolor_block(unsigned char **block_R,
|
||||
unsigned char **block_G,
|
||||
unsigned char **block_B,
|
||||
unsigned char *buf,
|
||||
eps_block_header *hdr);
|
||||
|
||||
/** Truncate block
|
||||
*
|
||||
* This function truncates already encoded GRAYSCALE
|
||||
* or TRUECOLOR block. Due to embedded encoding
|
||||
* truncation is equivalent to block re-compression.
|
||||
*
|
||||
* \param buf_in Input buffer
|
||||
* \param buf_out Output buffer
|
||||
* \param hdr Block header
|
||||
* \param truncate_size Desired truncated block size
|
||||
*
|
||||
* \note On successful return, the value pointed by the
|
||||
* \a truncate_size parameter will be overwritten with a
|
||||
* real amount of bytes used in the \a buf_out (it will
|
||||
* be less then or equal to the original \a truncate_size value).
|
||||
*
|
||||
* \note Minimal value for the \a truncate_size parameter can be
|
||||
* calculated as MAX(\ref EPS_MIN_GRAYSCALE_BUF, \ref EPS_MIN_TRUECOLOR_BUF).
|
||||
*
|
||||
* \return The function returns either \ref EPS_OK (the block is
|
||||
* successfully truncated), or \ref EPS_PARAM_ERROR (one or more
|
||||
* parameters are incorrect). */
|
||||
int eps_truncate_block(unsigned char *buf_in, unsigned char *buf_out,
|
||||
eps_block_header *hdr, int *truncate_size);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __EPSILON_H__ */
|
|
@ -0,0 +1,460 @@
|
|||
/*
|
||||
* $Id: filter.c,v 1.21 2010/04/05 06:11:55 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <filter.h>
|
||||
#include <filterbank.h>
|
||||
#include <daub97lift.h>
|
||||
#include <mem_alloc.h>
|
||||
#include <string.h>
|
||||
|
||||
inline local int periodic_extension(int index, int length)
|
||||
{
|
||||
if (index >= 0) {
|
||||
if (index < length) {
|
||||
return index;
|
||||
} else {
|
||||
return (index % length);
|
||||
}
|
||||
} else {
|
||||
return (length - 1 - (ABS(index) - 1) % length);
|
||||
}
|
||||
}
|
||||
|
||||
inline local int symmetric_W_extension(int index, int length)
|
||||
{
|
||||
if ((index >= 0) && (index < length)) {
|
||||
return index;
|
||||
}
|
||||
|
||||
if (length == 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
index = ABS(index) % (2 * length - 2);
|
||||
|
||||
if (index >= length) {
|
||||
index = 2 * length - 2 - index;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
inline local int symmetric_H_extension(int index, int length)
|
||||
{
|
||||
if ((index >= 0) && (index < length)) {
|
||||
return index;
|
||||
}
|
||||
|
||||
if (length == 1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
index = (ABS(index) - (index < 0)) % (2 * length);
|
||||
|
||||
if (index >= length) {
|
||||
index = 2 * length - index - 1;
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
/* Note: output_length parameter is not actually used but it's preserved
|
||||
* in order to make downsample_signal() symmetric to and upsample_signal(). */
|
||||
inline local void downsample_signal(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int input_length, int output_length, int phase)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = phase, j = 0; i < input_length; i += 2, j++) {
|
||||
output_signal[j] = input_signal[i];
|
||||
}
|
||||
}
|
||||
|
||||
inline local void upsample_signal(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int input_length, int output_length, int phase)
|
||||
{
|
||||
int i, j, k;
|
||||
|
||||
for (i = 0, j = phase; i < input_length; i++, j += 2) {
|
||||
output_signal[j] = input_signal[i];
|
||||
}
|
||||
|
||||
for (k = phase ^ 1; k < output_length; k += 2) {
|
||||
output_signal[k] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
inline local void filter_periodic(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int signal_length, filter_t *filter)
|
||||
{
|
||||
int i, j, k;
|
||||
|
||||
switch (filter->causality) {
|
||||
case CAUSAL:
|
||||
{
|
||||
for (i = 0; i < signal_length; i += 1) {
|
||||
output_signal[i] = 0;
|
||||
for (j = 0; j < filter->length; j++) {
|
||||
k = periodic_extension(i - j, signal_length);
|
||||
output_signal[i] += input_signal[k] * filter->coeffs[j];
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case ANTICAUSAL:
|
||||
{
|
||||
for (i = 0; i < signal_length; i += 2) {
|
||||
output_signal[i] = 0;
|
||||
for (j = 0; j < filter->length; j++) {
|
||||
k = periodic_extension(i + j, signal_length);
|
||||
output_signal[i] +=
|
||||
input_signal[k] * filter->coeffs[filter->length - j - 1];
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline local void filter_symmetric(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int signal_length, filter_t *filter)
|
||||
{
|
||||
int i, j, k1, k2;
|
||||
|
||||
switch (filter->causality) {
|
||||
case SYMMETRIC_WHOLE:
|
||||
{
|
||||
if (filter->type == LOWPASS_ANALYSIS) {
|
||||
for (i = 0; i < signal_length; i += 2) {
|
||||
output_signal[i] = input_signal[i] * filter->coeffs[0];
|
||||
for (j = 1; j < filter->length; j++) {
|
||||
k1 = symmetric_W_extension(i + j, signal_length);
|
||||
k2 = symmetric_W_extension(i - j, signal_length);
|
||||
output_signal[i] +=
|
||||
(input_signal[k1] + input_signal[k2]) * filter->coeffs[j];
|
||||
}
|
||||
}
|
||||
} else if (filter->type == HIGHPASS_ANALYSIS) {
|
||||
for (i = 1; i < signal_length; i += 2) {
|
||||
output_signal[i] = input_signal[i] * filter->coeffs[0];
|
||||
for (j = 1; j < filter->length; j++) {
|
||||
k1 = symmetric_W_extension(i + j, signal_length);
|
||||
k2 = symmetric_W_extension(i - j, signal_length);
|
||||
output_signal[i] +=
|
||||
(input_signal[k1] + input_signal[k2]) * filter->coeffs[j];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < signal_length; i++) {
|
||||
output_signal[i] = input_signal[i] * filter->coeffs[0];
|
||||
for (j = 1; j < filter->length; j++) {
|
||||
k1 = symmetric_W_extension(i + j, signal_length);
|
||||
k2 = symmetric_W_extension(i - j, signal_length);
|
||||
output_signal[i] +=
|
||||
(input_signal[k1] + input_signal[k2]) * filter->coeffs[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
/* Some day I hope to add 'case SYMMETRIC_HALF' here */
|
||||
default:
|
||||
{
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local void analysis_1D(coeff_t *input_signal, coeff_t *output_signal,
|
||||
coeff_t *temp, int signal_length, filterbank_t *fb)
|
||||
{
|
||||
coeff_t *lowpass;
|
||||
coeff_t *highpass;
|
||||
|
||||
/* Sanity checks */
|
||||
assert(signal_length > 0);
|
||||
assert((fb->type == BIORTHOGONAL) || ((fb->type == ORTHOGONAL)
|
||||
&& !(signal_length & 1)));
|
||||
|
||||
/* Trivial case */
|
||||
if (signal_length == 1) {
|
||||
output_signal[0] = input_signal[0] * SQRT2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fb->type == ORTHOGONAL) {
|
||||
lowpass = output_signal;
|
||||
highpass = output_signal + signal_length / 2;
|
||||
|
||||
/* Lowpass analysis */
|
||||
filter_periodic(input_signal, temp, signal_length, fb->lowpass_analysis);
|
||||
downsample_signal(temp, lowpass, signal_length, signal_length / 2, PHASE_EVEN);
|
||||
|
||||
/* Highpass analysis */
|
||||
filter_periodic(input_signal, temp, signal_length, fb->highpass_analysis);
|
||||
downsample_signal(temp, highpass, signal_length, signal_length / 2, PHASE_EVEN);
|
||||
} else {
|
||||
lowpass = output_signal;
|
||||
highpass = output_signal + signal_length / 2 + (signal_length & 1);
|
||||
|
||||
/* Lowpass analysis */
|
||||
filter_symmetric(input_signal, temp, signal_length, fb->lowpass_analysis);
|
||||
downsample_signal(temp, lowpass, signal_length, (signal_length + 1) / 2, PHASE_EVEN);
|
||||
|
||||
/* Highpass analysis */
|
||||
filter_symmetric(input_signal, temp, signal_length, fb->highpass_analysis);
|
||||
downsample_signal(temp, highpass, signal_length, signal_length / 2, PHASE_ODD);
|
||||
}
|
||||
}
|
||||
|
||||
local void synthesis_1D(coeff_t *input_signal, coeff_t *output_signal,
|
||||
coeff_t *temp1, coeff_t *temp2, coeff_t *temp3,
|
||||
int signal_length, filterbank_t *fb)
|
||||
{
|
||||
coeff_t *lowpass;
|
||||
coeff_t *highpass;
|
||||
int i;
|
||||
|
||||
/* Sanity checks */
|
||||
assert(signal_length > 0);
|
||||
assert((fb->type == BIORTHOGONAL) || ((fb->type == ORTHOGONAL)
|
||||
&& !(signal_length & 1)));
|
||||
|
||||
/* Trivial case */
|
||||
if (signal_length == 1) {
|
||||
output_signal[0] = input_signal[0] / SQRT2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (fb->type == ORTHOGONAL) {
|
||||
lowpass = input_signal;
|
||||
highpass = input_signal + signal_length / 2;
|
||||
|
||||
/* Lowpass synthesis */
|
||||
upsample_signal(lowpass, temp1, signal_length / 2, signal_length, PHASE_EVEN);
|
||||
filter_periodic(temp1, temp2, signal_length, fb->lowpass_synthesis);
|
||||
|
||||
/* Highpass synthesis */
|
||||
upsample_signal(highpass, temp1, signal_length / 2, signal_length, PHASE_EVEN);
|
||||
filter_periodic(temp1, temp3, signal_length, fb->highpass_synthesis);
|
||||
} else {
|
||||
lowpass = input_signal;
|
||||
highpass = input_signal + signal_length / 2 + (signal_length & 1);
|
||||
|
||||
/* Lowpass synthesis */
|
||||
upsample_signal(lowpass, temp1, (signal_length + 1) / 2, signal_length, PHASE_EVEN);
|
||||
filter_symmetric(temp1, temp2, signal_length, fb->lowpass_synthesis);
|
||||
|
||||
/* Highpass synthesis */
|
||||
upsample_signal(highpass, temp1, signal_length / 2, signal_length, PHASE_ODD);
|
||||
filter_symmetric(temp1, temp3, signal_length, fb->highpass_synthesis);
|
||||
}
|
||||
|
||||
/* Combine arrays */
|
||||
for (i = 0; i < signal_length; i++) {
|
||||
output_signal[i] = temp2[i] + temp3[i];
|
||||
}
|
||||
}
|
||||
|
||||
void analysis_2D(coeff_t **input_signal, coeff_t **output_signal,
|
||||
int signal_length, int mode, filterbank_t *fb)
|
||||
{
|
||||
coeff_t *input;
|
||||
coeff_t *output;
|
||||
coeff_t *temp;
|
||||
|
||||
int scale, length;
|
||||
int scales;
|
||||
int i, j;
|
||||
|
||||
assert(signal_length > 1);
|
||||
|
||||
/* Transform as many times as possible */
|
||||
scales = number_of_bits(signal_length) - 1;
|
||||
|
||||
/* Sanity checks */
|
||||
assert(((mode == MODE_NORMAL) && (signal_length == 1 << scales)) ||
|
||||
((mode == MODE_OTLPF) && (signal_length == (1 << scales) + 1)));
|
||||
|
||||
input = xmalloc(signal_length * sizeof(coeff_t));
|
||||
output = xmalloc(signal_length * sizeof(coeff_t));
|
||||
temp = xmalloc(signal_length * sizeof(coeff_t));
|
||||
|
||||
for (i = 0; i < signal_length; i++) {
|
||||
for (j = 0; j < signal_length; j++) {
|
||||
output_signal[i][j] = input_signal[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
/* Transform image */
|
||||
for (scale = 0; scale < scales; scale++) {
|
||||
length = mode + (1 << (scales - scale));
|
||||
|
||||
/* Transform rows */
|
||||
for (i = 0; i < length; i++) {
|
||||
for (j = 0; j < length; j++) {
|
||||
input[j] = output_signal[i][j];
|
||||
}
|
||||
|
||||
if (!strcmp(fb->id, "daub97lift")) {
|
||||
if (length % 2) {
|
||||
daub97lift_analysis_1D_odd(input, output, length);
|
||||
} else {
|
||||
daub97lift_analysis_1D_even(input, output, length);
|
||||
}
|
||||
} else {
|
||||
analysis_1D(input, output, temp, length, fb);
|
||||
}
|
||||
|
||||
for (j = 0; j < length; j++) {
|
||||
output_signal[i][j] = output[j];
|
||||
}
|
||||
}
|
||||
|
||||
/* Transform columns */
|
||||
for (i = 0; i < length; i++) {
|
||||
for (j = 0; j < length; j++) {
|
||||
input[j] = output_signal[j][i];
|
||||
}
|
||||
|
||||
if (!strcmp(fb->id, "daub97lift")) {
|
||||
if (length % 2) {
|
||||
daub97lift_analysis_1D_odd(input, output, length);
|
||||
} else {
|
||||
daub97lift_analysis_1D_even(input, output, length);
|
||||
}
|
||||
} else {
|
||||
analysis_1D(input, output, temp, length, fb);
|
||||
}
|
||||
|
||||
for (j = 0; j < length; j++) {
|
||||
output_signal[j][i] = output[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free(input);
|
||||
free(output);
|
||||
free(temp);
|
||||
}
|
||||
|
||||
void synthesis_2D(coeff_t **input_signal, coeff_t **output_signal,
|
||||
int signal_length, int mode, filterbank_t *fb)
|
||||
{
|
||||
coeff_t *input;
|
||||
coeff_t *output;
|
||||
coeff_t *temp1;
|
||||
coeff_t *temp2;
|
||||
coeff_t *temp3;
|
||||
|
||||
int scale, length;
|
||||
int scales;
|
||||
int i, j;
|
||||
|
||||
assert(signal_length > 1);
|
||||
|
||||
/* Transform as many times as possible */
|
||||
scales = number_of_bits(signal_length) - 1;
|
||||
|
||||
/* Sanity checks */
|
||||
assert(((mode == MODE_NORMAL) && (signal_length == 1 << scales)) ||
|
||||
((mode == MODE_OTLPF) && (signal_length == (1 << scales) + 1)));
|
||||
|
||||
/* Temporary arrays */
|
||||
input = xmalloc(signal_length * sizeof(coeff_t));
|
||||
output = xmalloc(signal_length * sizeof(coeff_t));
|
||||
temp1 = xmalloc(signal_length * sizeof(coeff_t));
|
||||
temp2 = xmalloc(signal_length * sizeof(coeff_t));
|
||||
temp3 = xmalloc(signal_length * sizeof(coeff_t));
|
||||
|
||||
for (i = 0; i < signal_length; i++) {
|
||||
for (j = 0; j < signal_length; j++) {
|
||||
output_signal[i][j] = input_signal[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
/* Transform image */
|
||||
for (scale = 0; scale < scales; scale++) {
|
||||
length = mode + (1 << (scale + 1));
|
||||
|
||||
/* Transform rows */
|
||||
for (i = 0; i < length; i++) {
|
||||
for (j = 0; j < length; j++) {
|
||||
input[j] = output_signal[i][j];
|
||||
}
|
||||
|
||||
if (!strcmp(fb->id, "daub97lift")) {
|
||||
if (length % 2) {
|
||||
daub97lift_synthesis_1D_odd(input, output, length);
|
||||
} else {
|
||||
daub97lift_synthesis_1D_even(input, output, length);
|
||||
}
|
||||
} else {
|
||||
synthesis_1D(input, output, temp1, temp2, temp3, length, fb);
|
||||
}
|
||||
|
||||
for (j = 0; j < length; j++) {
|
||||
output_signal[i][j] = output[j];
|
||||
}
|
||||
}
|
||||
|
||||
/* Transform columns */
|
||||
for (i = 0; i < length; i++) {
|
||||
for (j = 0; j < length; j++) {
|
||||
input[j] = output_signal[j][i];
|
||||
}
|
||||
|
||||
if (!strcmp(fb->id, "daub97lift")) {
|
||||
if (length % 2) {
|
||||
daub97lift_synthesis_1D_odd(input, output, length);
|
||||
} else {
|
||||
daub97lift_synthesis_1D_even(input, output, length);
|
||||
}
|
||||
} else {
|
||||
synthesis_1D(input, output, temp1, temp2, temp3, length, fb);
|
||||
}
|
||||
|
||||
for (j = 0; j < length; j++) {
|
||||
output_signal[j][i] = output[j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Release temporary arrays */
|
||||
free(input);
|
||||
free(output);
|
||||
free(temp1);
|
||||
free(temp2);
|
||||
free(temp3);
|
||||
}
|
|
@ -0,0 +1,273 @@
|
|||
/*
|
||||
* $Id: filter.h,v 1.22 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Signal filtering
|
||||
*
|
||||
* Wavelet transform implementation based on filter banks.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* Gilbert Strang, Truong Nguyen "Wavelets and Filter Banks".
|
||||
*
|
||||
* Jianxin Wei, Mark Pickering, Michael Frater, John Arnold,
|
||||
* John Boman, Wenjun Zeng "Boundary Artefact Reduction Using
|
||||
* Odd Tile Length and the Low Pass First Convention (OTLPF)". */
|
||||
|
||||
#ifndef __FILTER_H__
|
||||
#define __FILTER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Use __inline instead of inline under MSVC compiler */
|
||||
#if defined(_MSC_VER) && !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
/** \addtogroup wavelet Wavelet transform */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
#include <filterbank.h>
|
||||
|
||||
/** Normal mode
|
||||
*
|
||||
* This mode assumes that image is square and height = width = 2 ^ N. */
|
||||
#define MODE_NORMAL 0
|
||||
/** OTLPF mode
|
||||
*
|
||||
* This mode also assumes that image is square, but height = width = (2 ^ N) + 1.
|
||||
* In a few words, OTLPF is some kind of hack to reduce boundary artefacts
|
||||
* when image is broken into several tiles. Due to mathematical constrains
|
||||
* this method can be applied to biorthogonal filters only. For more
|
||||
* information see references. */
|
||||
#define MODE_OTLPF 1
|
||||
|
||||
/** Periodic signal extension
|
||||
*
|
||||
* This function extends signal in a periodic fashion.
|
||||
* For example: ... 2 3 4 | 1 2 3 4 | 1 2 3 ...
|
||||
* This kind of extension is used with orthogonal filters.
|
||||
*
|
||||
* \param index Sample index
|
||||
* \param length Signal length
|
||||
*
|
||||
* \return Real sample index within array bounds
|
||||
*
|
||||
* \note Actually, signal is not extended as the function name states.
|
||||
* This function just computes real sample index within array bounds. */
|
||||
inline local int periodic_extension(int index, int length);
|
||||
|
||||
/** Symmetric-whole signal extension
|
||||
*
|
||||
* This function extends signal in symmetric-whole fasion.
|
||||
* For example: ... 4 3 2 | 1 2 3 4 | 3 2 1 ... This kind
|
||||
* of extension is used with biorthogonal filters of odd length.
|
||||
*
|
||||
* \param index Sample index
|
||||
* \param length Signal length
|
||||
*
|
||||
* \return Real sample index within array bounds
|
||||
*
|
||||
* \note Actually, signal is not extended as the function name states.
|
||||
* This function just computes real sample index within array bounds. */
|
||||
inline local int symmetric_W_extension(int index, int length);
|
||||
|
||||
/** Symmetric-half signal extension
|
||||
*
|
||||
* This function extends signal in symmetric-half fasion.
|
||||
* For example: ... 3 2 1 | 1 2 3 4 | 4 3 2 ... (i.e. boundary
|
||||
* samples are duplicated). This kind of extension is used with
|
||||
* biorthogonal filters of even length.
|
||||
*
|
||||
* \param index Sample index
|
||||
* \param length Signal length
|
||||
*
|
||||
* \return Real sample index within array bounds
|
||||
*
|
||||
* \note Actually, signal is not extended as the function name states.
|
||||
* This function just computes real sample index within array bounds. */
|
||||
inline local int symmetric_H_extension(int index, int length);
|
||||
|
||||
/** Signal downsampling
|
||||
*
|
||||
* This function downsamples signal by the factor of two. Depending
|
||||
* on \a phase, #PHASE_EVEN or #PHASE_ODD, odd-numbered (1, 3, 5, ...)
|
||||
* or even-numbered (0, 2, 4, ...) samples are rejected respectively.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param input_length Input signal length
|
||||
* \param output_length Output signal length
|
||||
* \param phase Downsampling phase
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note Caller must allocate enough space for \a output_signal beforehand. */
|
||||
inline local void downsample_signal(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int input_length, int output_length, int phase);
|
||||
|
||||
/** Signal upsampling
|
||||
*
|
||||
* This function is inverse to the previous one. It inserts zeros between
|
||||
* \a input_signal samples. Depending on \a phase, #PHASE_EVEN or #PHASE_ODD,
|
||||
* zeros are insered into the odd-numbered (1, 3, 5, ...) or
|
||||
* even-numbered (0, 2, 4, ...) positions respectively.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param input_length Input signal length
|
||||
* \param output_length Output signal length
|
||||
* \param phase Upsampling phase
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note Caller must allocate enough space for \a output_signal beforehand. */
|
||||
inline local void upsample_signal(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int input_length, int output_length, int phase);
|
||||
|
||||
/** Periodic signal filtering
|
||||
*
|
||||
* This function filters \a input_signal of length \a signal_length
|
||||
* into the \a output_signal using specified \a filter. Boundary
|
||||
* samples are evaluated using peridic extension.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param signal_length Signal length
|
||||
* \param filter Filter
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note \a filter must be orthogonal.
|
||||
* \note \a signal_length must be even. */
|
||||
inline local void filter_periodic(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int signal_length, filter_t *filter);
|
||||
|
||||
/** Symmetric signal filtering
|
||||
*
|
||||
* This function filters \a input_signal of length \a signal_length
|
||||
* into the \a output_signal using specified \a filter. Boundary
|
||||
* samples are evaluated using symmetric extension.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param signal_length Signal length
|
||||
* \param filter Filter
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note \a filter must be biorthogonal.
|
||||
* \note \a signal_length can be either even or odd.
|
||||
*
|
||||
* \todo Add support for even-length biorthogonal filters. */
|
||||
inline local void filter_symmetric(coeff_t *input_signal, coeff_t *output_signal,
|
||||
int signal_length, filter_t *filter);
|
||||
|
||||
/** One dimensional wavelet decomposition
|
||||
*
|
||||
* This function performes one stage of 1D wavelet decomposition
|
||||
* of \a input_signal using filter bank \a fb. The result is
|
||||
* stored in \a output_signal. This operation requires one temporary
|
||||
* array of length \a signal_length. On return, the first half of \a output_signal
|
||||
* will be occupied with lowpass coefficients, the second half - with highpass
|
||||
* coefficients.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param temp Temporary array
|
||||
* \param signal_length Signal length
|
||||
* \param fb Filter bank
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note If \a signal_length is odd and \a fb is biorthogonal, then
|
||||
* there will be one extra lowpass coefficient. */
|
||||
local void analysis_1D(coeff_t *input_signal, coeff_t *output_signal,
|
||||
coeff_t *temp, int signal_length, filterbank_t *fb);
|
||||
|
||||
/** One dimensional wavelet reconstruction
|
||||
*
|
||||
* This function performes one stage of 1D wavelet reconstruction
|
||||
* of \a input_signal using filter bank \a fb. The result is
|
||||
* stored in \a output_signal. This operation requires tree temporary
|
||||
* arrays of length \a signal_length.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param temp1 Temporary array 1
|
||||
* \param temp2 Temporary array 2
|
||||
* \param temp3 Temporary array 3
|
||||
* \param signal_length Signal length
|
||||
* \param fb Filter bank
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void synthesis_1D(coeff_t *input_signal, coeff_t *output_signal,
|
||||
coeff_t *temp1, coeff_t *temp2, coeff_t *temp3,
|
||||
int signal_length, filterbank_t *fb);
|
||||
|
||||
/** Two dimensional wavelet decomposition
|
||||
*
|
||||
* This function performes N stages of 2D wavelet decomposition of
|
||||
* \a input_signal using filter bank \a fb. Image is assumed to be square:
|
||||
* if \a mode = #MODE_NORMAL, then width = height = signal_length = 2 ^ N;
|
||||
* if \a mode = #MODE_OTLPF, then width = height = signal_length = (2 ^ N) + 1.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param signal_length Signal length (width = height)
|
||||
* \param mode Either #MODE_NORMAL or #MODE_OTLPF
|
||||
* \param fb Filter bank
|
||||
*
|
||||
* \return \c VOID */
|
||||
void analysis_2D(coeff_t **input_signal, coeff_t **output_signal,
|
||||
int signal_length, int mode, filterbank_t *fb);
|
||||
|
||||
/** Two dimensional wavelet reconstruction
|
||||
*
|
||||
* This function performes N stages of 2D wavelet reconstruction of
|
||||
* \a input_signal using filter bank \a fb. Image is assumed to be square:
|
||||
* if \a mode = #MODE_NORMAL, then width = height = signal_length = 2 ^ N;
|
||||
* if \a mode = #MODE_OTLPF, then width = height = signal_length = (2 ^ N) + 1.
|
||||
*
|
||||
* \param input_signal Input signal
|
||||
* \param output_signal Output signal
|
||||
* \param signal_length Signal length (width = height)
|
||||
* \param mode Either #MODE_NORMAL or #MODE_OTLPF
|
||||
* \param fb Filter bank
|
||||
*
|
||||
* \return \c VOID */
|
||||
void synthesis_2D(coeff_t **input_signal, coeff_t **output_signal,
|
||||
int signal_length, int mode, filterbank_t *fb);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FILTER_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* $Id: filterbank.h,v 1.17 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Filter banks
|
||||
*
|
||||
* This file holds defines for filter and filterbank
|
||||
* data structures.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* Gilbert Strang, Truong Nguyen "Wavelets and Filter Banks". */
|
||||
|
||||
#ifndef __FILTERBANK_H__
|
||||
#define __FILTERBANK_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup wavelet Wavelet transform */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Causal filter: h[i] = 0, i < 0 */
|
||||
#define CAUSAL 0
|
||||
/** Anticausal filter: h[i] = 0, i > 0 */
|
||||
#define ANTICAUSAL 1
|
||||
/** Symmetric-whole filter: h[-i] = h[i] */
|
||||
#define SYMMETRIC_WHOLE 2
|
||||
/** Symmetric-half filter: h[-i] = h[i - 1] */
|
||||
#define SYMMETRIC_HALF 3
|
||||
|
||||
/** Lowpass analysis filter */
|
||||
#define LOWPASS_ANALYSIS 0
|
||||
/** Highpass analysis filter */
|
||||
#define HIGHPASS_ANALYSIS 1
|
||||
/** Lowpass synthesis filter */
|
||||
#define LOWPASS_SYNTHESIS 2
|
||||
/** Highpass synthesis filter */
|
||||
#define HIGHPASS_SYNTHESIS 3
|
||||
|
||||
/** Orthogonal filterbank */
|
||||
#define ORTHOGONAL 0
|
||||
/** Biothogonal filterbank */
|
||||
#define BIORTHOGONAL 1
|
||||
|
||||
/** Even subsampling phase */
|
||||
#define PHASE_EVEN 0
|
||||
/** Odd subsampling phase */
|
||||
#define PHASE_ODD 1
|
||||
|
||||
/** Filter structure
|
||||
*
|
||||
* This structure represents a standalone filter.
|
||||
*
|
||||
* \note There is no need to keep all coefficients for symmetric
|
||||
* filters. Only half (h[i], i >= 0) of them is kept. */
|
||||
typedef struct filter_t_tag {
|
||||
/** Filter length */
|
||||
int length;
|
||||
/** Filter causality */
|
||||
int causality;
|
||||
/** Filter type */
|
||||
int type;
|
||||
/** Filter coefficients */
|
||||
coeff_t *coeffs;
|
||||
} filter_t;
|
||||
|
||||
/** Filterbank structure
|
||||
*
|
||||
* Filter bank consists of two filter pairs. */
|
||||
typedef struct filterbank_t_tag {
|
||||
/** Short filter name (for a program) */
|
||||
char *id;
|
||||
/** Long filter name (for a user) */
|
||||
char *name;
|
||||
/** Filterbank type */
|
||||
int type;
|
||||
/** Lowpass analysis filter */
|
||||
filter_t *lowpass_analysis;
|
||||
/** Highpass analysis filter */
|
||||
filter_t *highpass_analysis;
|
||||
/** Lowpass synthesis filter */
|
||||
filter_t *lowpass_synthesis;
|
||||
/** Highpass synthesis filter */
|
||||
filter_t *highpass_synthesis;
|
||||
} filterbank_t;
|
||||
|
||||
/** External array of all available filter banks
|
||||
*
|
||||
* This array hold pointers to all available filter banks.
|
||||
* Last element is always \c NULL. */
|
||||
extern filterbank_t *filterbanks[];
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FILTERBANK_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,197 @@
|
|||
/*
|
||||
* $Id: libmain.h,v 1.19 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Auxiliary support routines
|
||||
*
|
||||
* This file contains auxiliary support routines for
|
||||
* the library. While being top-level they are not
|
||||
* intended for direct user access. */
|
||||
|
||||
#ifndef __LIBMAIN_H__
|
||||
#define __LIBMAIN_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup misc Miscellanea */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
#include <filterbank.h>
|
||||
#include <filter.h>
|
||||
|
||||
/** Round a channel
|
||||
*
|
||||
* This function rounds each \a in_channel element to the
|
||||
* nearest integer and stores it in the \a out_channel.
|
||||
*
|
||||
* \param in_channel Input channel
|
||||
* \param out_channel Output channel
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void round_channel(coeff_t **in_channel, int **out_channel,
|
||||
int channel_size);
|
||||
|
||||
/** Copy a channel
|
||||
*
|
||||
* This function copies \a in_channel into the \a out_channel.
|
||||
*
|
||||
* \param in_channel Input channel
|
||||
* \param out_channel Output channel
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void copy_channel(int **in_channel, coeff_t **out_channel,
|
||||
int channel_size);
|
||||
|
||||
/** Reset RGB channels
|
||||
*
|
||||
* This function initializes arrays \a block_R, \a block_G
|
||||
* and \a block_B with zero.
|
||||
*
|
||||
* \param block_R Red channel
|
||||
* \param block_G Green channel
|
||||
* \param block_B Blue channel
|
||||
* \param width Block width
|
||||
* \param height Block height
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void reset_RGB(unsigned char **block_R, unsigned char **block_G,
|
||||
unsigned char **block_B, int width, int height);
|
||||
|
||||
/** Reset Y channel
|
||||
*
|
||||
* This function initializes array \a block_Y with zero.
|
||||
*
|
||||
* \param block_Y Luma channel
|
||||
* \param width Block width
|
||||
* \param height Block height
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void reset_Y(unsigned char **block_Y, int width, int height);
|
||||
|
||||
/** Get filterbank pointer from id
|
||||
*
|
||||
* This function gets filterbank pointer from \a id.
|
||||
*
|
||||
* \param id Filterbank id
|
||||
*
|
||||
* \return Filterbank pointer or \c NULL if not found */
|
||||
local filterbank_t *get_fb(char *id);
|
||||
|
||||
/** Compute required block size
|
||||
*
|
||||
* This function computes block size (width=height) required
|
||||
* for encoding and decoding process. Depending on \a mode
|
||||
* parameter, function returns nearest power of two or
|
||||
* power of two plus one.
|
||||
*
|
||||
* \param w Source width
|
||||
* \param h Source height
|
||||
* \param mode Either \ref EPS_MODE_NORMAL or \ref EPS_MODE_OTLPF
|
||||
* \param min Minimal block size
|
||||
*
|
||||
* \return Block size (width = height) */
|
||||
local int get_block_size(int w, int h, int mode, int min);
|
||||
|
||||
/** Terminate block header
|
||||
*
|
||||
* This function replaces \a n_fields -th occurence of \c ;
|
||||
* symbol with \c 0. In other words, this function zero-terminates
|
||||
* header.
|
||||
*
|
||||
* \param buf Data buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param n_fields Number of header fields
|
||||
*
|
||||
* \return Either \ref EPS_OK or \ref EPS_FORMAT_ERROR */
|
||||
local int terminate_header(unsigned char *buf, int buf_size, int n_fields);
|
||||
|
||||
/** Unterminate header
|
||||
*
|
||||
* This function is inverse to the previous one. It
|
||||
* replaces first occurence of \c 0 with \c ; symbol.
|
||||
*
|
||||
* \param buf Data buffer
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void unterminate_header(unsigned char *buf);
|
||||
|
||||
/** Header sanity check
|
||||
*
|
||||
* This function ensures that header contains only
|
||||
* legal symbols.
|
||||
*
|
||||
* \param buf Data buffer
|
||||
*
|
||||
* \return Either \ref EPS_OK or \ref EPS_FORMAT_ERROR */
|
||||
local int header_sanity_check(unsigned char *buf);
|
||||
|
||||
/** Read GRAYSCALE header
|
||||
*
|
||||
* This function reads and checks block header of type
|
||||
* \ref EPS_GRAYSCALE_BLOCK. Result is stored in the \a hdr
|
||||
* structure.
|
||||
*
|
||||
* \note Structure \a hdr is undefined unless function
|
||||
* returns \ref EPS_OK.
|
||||
*
|
||||
* \param buf Data buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param hdr Block header
|
||||
*
|
||||
* \return Either \ref EPS_OK or \ref EPS_PARAM_ERROR
|
||||
* or \ref EPS_FORMAT_ERROR */
|
||||
local int read_gs_header(unsigned char *buf, int buf_size,
|
||||
eps_block_header *hdr);
|
||||
|
||||
/** Read TRUECOLOR header
|
||||
*
|
||||
* This function reads and checks block header of type
|
||||
* \ref EPS_TRUECOLOR_BLOCK. Result is stored in the \a hdr
|
||||
* structure.
|
||||
*
|
||||
* \note Structure \a hdr is undefined unless function
|
||||
* returns \ref EPS_OK.
|
||||
*
|
||||
* \param buf Data buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param hdr Block header
|
||||
*
|
||||
* \return Either \ref EPS_OK or \ref EPS_PARAM_ERROR
|
||||
* or \ref EPS_FORMAT_ERROR */
|
||||
local int read_tc_header(unsigned char *buf, int buf_size,
|
||||
eps_block_header *hdr);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LIBMAIN_H__ */
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
* $Id: list.c,v 1.18 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <list.h>
|
||||
#include <mem_alloc.h>
|
||||
|
||||
linked_list *alloc_linked_list(void)
|
||||
{
|
||||
linked_list *list;
|
||||
|
||||
list = (linked_list *) xmalloc(sizeof(linked_list));
|
||||
list->first = list->last = NULL;
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
void free_linked_list(linked_list *list)
|
||||
{
|
||||
list_node *cur_node;
|
||||
list_node *next_node;
|
||||
|
||||
cur_node = list->first;
|
||||
|
||||
while (cur_node) {
|
||||
next_node = cur_node->next;
|
||||
free_list_node(cur_node);
|
||||
cur_node = next_node;
|
||||
}
|
||||
|
||||
free(list);
|
||||
}
|
||||
|
||||
list_node *alloc_list_node(int data_size)
|
||||
{
|
||||
list_node *node;
|
||||
|
||||
node = (list_node *) xmalloc(sizeof(list_node));
|
||||
node->data = xmalloc(data_size);
|
||||
node->next = node->prev = NULL;
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
void free_list_node(list_node *node)
|
||||
{
|
||||
free(node->data);
|
||||
free(node);
|
||||
}
|
||||
|
||||
void append_list_node(linked_list *list, list_node *node)
|
||||
{
|
||||
if ((list->first == NULL) && (list->last == NULL)) {
|
||||
node->next = node->prev = NULL;
|
||||
list->first = list->last = node;
|
||||
return;
|
||||
}
|
||||
|
||||
node->next = NULL;
|
||||
node->prev = list->last;
|
||||
|
||||
list->last->next = node;
|
||||
list->last = node;
|
||||
}
|
||||
|
||||
void prepend_list_node(linked_list *list, list_node *node)
|
||||
{
|
||||
if ((list->first == NULL) && (list->last == NULL)) {
|
||||
node->next = node->prev = NULL;
|
||||
list->first = list->last = node;
|
||||
return;
|
||||
}
|
||||
|
||||
node->prev = NULL;
|
||||
node->next = list->first;
|
||||
|
||||
list->first->prev = node;
|
||||
list->first = node;
|
||||
}
|
||||
|
||||
void remove_list_node_link(linked_list *list, list_node *node)
|
||||
{
|
||||
if (node->prev) {
|
||||
node->prev->next = node->next;
|
||||
} else {
|
||||
list->first = node->next;
|
||||
}
|
||||
|
||||
if (node->next) {
|
||||
node->next->prev = node->prev;
|
||||
} else {
|
||||
list->last = node->prev;
|
||||
}
|
||||
}
|
||||
|
||||
void remove_list_node(linked_list *list, list_node *node)
|
||||
{
|
||||
remove_list_node_link(list, node);
|
||||
free_list_node(node);
|
||||
}
|
||||
|
||||
void move_list_node(linked_list *src_list, linked_list *dst_list, list_node *node)
|
||||
{
|
||||
remove_list_node_link(src_list, node);
|
||||
append_list_node(dst_list, node);
|
||||
}
|
||||
|
||||
void insert_before_list_node(linked_list *list, list_node *node, list_node *new_node)
|
||||
{
|
||||
if (!node) {
|
||||
prepend_list_node(list, new_node);
|
||||
return;
|
||||
}
|
||||
|
||||
if (node->prev) {
|
||||
new_node->next = node;
|
||||
new_node->prev = node->prev;
|
||||
node->prev = node->prev->next = new_node;
|
||||
} else {
|
||||
new_node->prev = NULL;
|
||||
new_node->next = node;
|
||||
node->prev = list->first = new_node;
|
||||
}
|
||||
}
|
||||
|
||||
void insert_after_list_node(linked_list *list, list_node *node, list_node *new_node)
|
||||
{
|
||||
if (!node) {
|
||||
append_list_node(list, new_node);
|
||||
return;
|
||||
}
|
||||
|
||||
if (node->next) {
|
||||
new_node->prev = node;
|
||||
new_node->next = node->next;
|
||||
node->next = node->next->prev = new_node;
|
||||
} else {
|
||||
new_node->next = NULL;
|
||||
new_node->prev = node;
|
||||
node->next = list->last = new_node;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* $Id: list.h,v 1.19 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Doubly-linked lists
|
||||
*
|
||||
* This file contains routines to deal with doubly-linked lists. */
|
||||
|
||||
#ifndef __LIST_H__
|
||||
#define __LIST_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup list Doubly-linked lists */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** This macro evaluates to 1 if list \a _x is empty */
|
||||
#define LIST_IS_EMPTY(_x) (_x->first == NULL)
|
||||
|
||||
/** List node structure */
|
||||
typedef struct list_node_tag list_node;
|
||||
|
||||
/** List node structure
|
||||
*
|
||||
* This structure represents a doubly-linked list node. */
|
||||
struct list_node_tag {
|
||||
/** Data block pointer */
|
||||
void *data;
|
||||
/** Next list node */
|
||||
list_node *next;
|
||||
/** Previous list node */
|
||||
list_node *prev;
|
||||
};
|
||||
|
||||
/** Doubly-linked list structure
|
||||
*
|
||||
* This structure represents a doubly-linked list. */
|
||||
typedef struct linked_list_tag {
|
||||
/** First node */
|
||||
list_node *first;
|
||||
/** Last node */
|
||||
list_node *last;
|
||||
} linked_list;
|
||||
|
||||
/** Allocate new doubly-linked list
|
||||
*
|
||||
* This function allocates new doubly-linked list.
|
||||
*
|
||||
* \return New list pointer */
|
||||
linked_list *alloc_linked_list(void);
|
||||
|
||||
/** Release doubly-linked list
|
||||
*
|
||||
* This function releases doubly-linked \a list with all
|
||||
* its internal nodes. Data blocks associated with nodes
|
||||
* are also released.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void free_linked_list(linked_list *list);
|
||||
|
||||
/** Allocate new list node
|
||||
*
|
||||
* This function allocates new list node with associated
|
||||
* data block of size \a data_size.
|
||||
*
|
||||
* \return New node pointer */
|
||||
list_node *alloc_list_node(int data_size);
|
||||
|
||||
/** Release list node
|
||||
*
|
||||
* This function releases list \a node and data block
|
||||
* associated with it.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void free_list_node(list_node *node);
|
||||
|
||||
/** Append list node
|
||||
*
|
||||
* This function appends new \a node to the \a list tail.
|
||||
*
|
||||
* \note Node must be properly allocated beforehand.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void append_list_node(linked_list *list, list_node *node);
|
||||
|
||||
/** Prepend list node
|
||||
*
|
||||
* This function prepends new \a node to the \a list head.
|
||||
*
|
||||
* \note Node must be properly allocated beforehand.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void prepend_list_node(linked_list *list, list_node *node);
|
||||
|
||||
/** Remove list node
|
||||
*
|
||||
* This function removes \a node links from the \a list.
|
||||
*
|
||||
* \note The \a node itself is not released and can be added
|
||||
* to another list.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void remove_list_node_link(linked_list *list, list_node *node);
|
||||
|
||||
/** Remove list node
|
||||
*
|
||||
* This function removes \a node from the \a list.
|
||||
*
|
||||
* \note The \a node itself is released and cannot be added
|
||||
* to another list.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void remove_list_node(linked_list *list, list_node *node);
|
||||
|
||||
/** Move node
|
||||
*
|
||||
* This function moves \a node from \a src_list to \a dst_list.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void move_list_node(linked_list *src_list, linked_list *dst_list, list_node *node);
|
||||
|
||||
/** Insert node
|
||||
*
|
||||
* This function inserts \a new_node to the \a list just before \a node.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void insert_before_list_node(linked_list *list, list_node *node, list_node *new_node);
|
||||
|
||||
/** Insert node
|
||||
*
|
||||
* This function inserts \a new_node to the \a list just after \a node.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void insert_after_list_node(linked_list *list, list_node *node, list_node *new_node);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LIST_H__ */
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* $Id: mem_alloc.c,v 1.17 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <mem_alloc.h>
|
||||
|
||||
void *xmalloc(size_t size)
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
ptr = malloc(size);
|
||||
assert(ptr);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void **malloc_2D(int width, int height, int size)
|
||||
{
|
||||
void **ptr;
|
||||
int i;
|
||||
|
||||
assert((width > 0) && (height > 0) && (size > 0));
|
||||
ptr = (void **) xmalloc(height * sizeof(void *));
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
ptr[i] = (void *) xmalloc(width * size);
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void free_2D(void **ptr, int width, int height)
|
||||
{
|
||||
int i;
|
||||
|
||||
assert((width > 0) && (height > 0));
|
||||
|
||||
for (i = 0; i < height; i++) {
|
||||
free(ptr[i]);
|
||||
}
|
||||
|
||||
free(ptr);
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* $Id: mem_alloc.h,v 1.16 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Two-dimensional memory management
|
||||
*
|
||||
* This file contains two-dimensional memory management routines. */
|
||||
|
||||
#ifndef __MEM_ALLOC_H__
|
||||
#define __MEM_ALLOC_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup mem_alloc Two-dimensional memory management */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Memory allocation
|
||||
*
|
||||
* This function allocates one-dimensional array of desired size.
|
||||
*
|
||||
* \param size Size in bytes
|
||||
*
|
||||
* \return Array pointer
|
||||
*
|
||||
* \warning This function halts program if all virtual memory
|
||||
* is exhausted. */
|
||||
void *xmalloc(size_t size);
|
||||
|
||||
/** Two-dimensional memory allocation
|
||||
*
|
||||
* This function allocates two-dimensional array of desired size.
|
||||
*
|
||||
* \param width Array width
|
||||
* \param height Array height
|
||||
* \param size Element size
|
||||
*
|
||||
* \return Array pointer
|
||||
*
|
||||
* \warning This function halts program if all virtual memory
|
||||
* is exhausted. */
|
||||
void **malloc_2D(int width, int height, int size);
|
||||
|
||||
/** Two-dimensional memory releasing
|
||||
*
|
||||
* This function releases two-dimensional array allocated by #malloc_2D.
|
||||
*
|
||||
* \param ptr Array pointer
|
||||
* \param width Array width
|
||||
* \param height Array height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void free_2D(void **ptr, int width, int height);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MEM_ALLOC_H__ */
|
|
@ -0,0 +1,197 @@
|
|||
/*
|
||||
* $Id: merge_split.c,v 1.15 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <merge_split.h>
|
||||
|
||||
void merge_channels(unsigned char *channel_A, unsigned char *channel_B,
|
||||
unsigned char *channel_AB, int len_A, int len_B)
|
||||
{
|
||||
int pkg_A, pkg_B; /* Real number of bytes in the package */
|
||||
int div_A, div_B; /* Base number of bytes in the package */
|
||||
int rem_A, rem_B; /* Instant reminder */
|
||||
int cur_A, cur_B; /* Current savings */
|
||||
int tr0_A, tr0_B; /* Lower threshold */
|
||||
int tr1_A, tr1_B; /* Upper threshold */
|
||||
int i, pkg, min;
|
||||
|
||||
/* Sanity checks. I love them! */
|
||||
assert((len_A > 0) && (len_B > 0));
|
||||
|
||||
/* Total number of packages */
|
||||
min = MIN(len_A, len_B);
|
||||
|
||||
/* 1-st channel setup */
|
||||
div_A = len_A / min;
|
||||
cur_A = len_A;
|
||||
rem_A = 0;
|
||||
tr0_A = div_A * min;
|
||||
tr1_A = tr0_A + min;
|
||||
|
||||
/* 2-nd channel setup */
|
||||
div_B = len_B / min;
|
||||
cur_B = len_B;
|
||||
rem_B = 0;
|
||||
tr0_B = div_B * min;
|
||||
tr1_B = tr0_B + min;
|
||||
|
||||
/* Loop for all packages */
|
||||
for (pkg = 0; pkg < min; pkg++) {
|
||||
/* Update current savings */
|
||||
cur_A = len_A + rem_A;
|
||||
|
||||
if (cur_A >= tr1_A) {
|
||||
/* Choose maximal package & update reminder */
|
||||
pkg_A = div_A + 1;
|
||||
rem_A = cur_A - tr1_A;
|
||||
} else {
|
||||
/* Choose minimal package & update reminder */
|
||||
pkg_A = div_A;
|
||||
rem_A = cur_A - tr0_A;
|
||||
}
|
||||
|
||||
/* Update current savings */
|
||||
cur_B = len_B + rem_B;
|
||||
|
||||
if (cur_B >= tr1_B) {
|
||||
/* Choose maximal package & update reminder */
|
||||
pkg_B = div_B + 1;
|
||||
rem_B = cur_B - tr1_B;
|
||||
} else {
|
||||
/* Choose minimal package & update reminder */
|
||||
pkg_B = div_B;
|
||||
rem_B = cur_B - tr0_B;
|
||||
}
|
||||
|
||||
/* Put bytes from the 1-st channel */
|
||||
for (i = 0; i < pkg_A; i++) {
|
||||
*channel_AB++ = *channel_A++;
|
||||
}
|
||||
|
||||
/* Put bytes from the 2-nd channel */
|
||||
for (i = 0; i < pkg_B; i++) {
|
||||
*channel_AB++ = *channel_B++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void split_channels(unsigned char *channel_AB,
|
||||
unsigned char *channel_A, unsigned char *channel_B,
|
||||
int len_AB, int len_A, int len_B,
|
||||
int *real_len_A, int *real_len_B)
|
||||
{
|
||||
int pkg_A, pkg_B; /* Real number of bytes in the package */
|
||||
int div_A, div_B; /* Base number of bytes in the package */
|
||||
int rem_A, rem_B; /* Instant reminder */
|
||||
int cur_A, cur_B; /* Current savings */
|
||||
int tr0_A, tr0_B; /* Lower threshold */
|
||||
int tr1_A, tr1_B; /* Upper threshold */
|
||||
int i, pkg, min;
|
||||
|
||||
unsigned char *end_AB;
|
||||
unsigned char *end_A;
|
||||
unsigned char *end_B;
|
||||
|
||||
/* Sanity checks */
|
||||
assert((len_A > 0) && (len_B > 0) && (len_AB > 0));
|
||||
assert(real_len_A && real_len_B);
|
||||
assert(len_A + len_B >= len_AB);
|
||||
|
||||
/* Set end-of-buffer pointers */
|
||||
end_AB = channel_AB + len_AB;
|
||||
end_A = channel_A + len_A;
|
||||
end_B = channel_B + len_B;
|
||||
|
||||
/* Real amount of saved bytes */
|
||||
*real_len_A = *real_len_B = 0;
|
||||
|
||||
/* Original number of packages (real stream may be truncated) */
|
||||
min = MIN(len_A, len_B);
|
||||
|
||||
/* 1-st channel setup */
|
||||
div_A = len_A / min;
|
||||
cur_A = len_A;
|
||||
rem_A = 0;
|
||||
tr0_A = div_A * min;
|
||||
tr1_A = tr0_A + min;
|
||||
|
||||
/* 2-nd channel setup */
|
||||
div_B = len_B / min;
|
||||
cur_B = len_B;
|
||||
rem_B = 0;
|
||||
tr0_B = div_B * min;
|
||||
tr1_B = tr0_B + min;
|
||||
|
||||
/* Loop for all packages */
|
||||
for (pkg = 0; pkg < min; pkg++) {
|
||||
/* Update current savings */
|
||||
cur_A = len_A + rem_A;
|
||||
|
||||
if (cur_A >= tr1_A) {
|
||||
/* Choose maximal package & update reminder */
|
||||
pkg_A = div_A + 1;
|
||||
rem_A = cur_A - tr1_A;
|
||||
} else {
|
||||
/* Choose minimal package & update reminder */
|
||||
pkg_A = div_A;
|
||||
rem_A = cur_A - tr0_A;
|
||||
}
|
||||
|
||||
/* Update current savings */
|
||||
cur_B = len_B + rem_B;
|
||||
|
||||
if (cur_B >= tr1_B) {
|
||||
/* Choose maximal package & update reminder */
|
||||
pkg_B = div_B + 1;
|
||||
rem_B = cur_B - tr1_B;
|
||||
} else {
|
||||
/* Choose minimal package & update reminder */
|
||||
pkg_B = div_B;
|
||||
rem_B = cur_B - tr0_B;
|
||||
}
|
||||
|
||||
/* Extract pkg_A bytes from the stream into the channel_A */
|
||||
for (i = 0; (i < pkg_A) && (channel_A < end_A) && (channel_AB < end_AB); i++) {
|
||||
*channel_A++ = *channel_AB++;
|
||||
(*real_len_A)++;
|
||||
}
|
||||
|
||||
/* Extract pkg_B bytes from the stream into the channel_B */
|
||||
for (i = 0; (i < pkg_B) && (channel_B < end_B) && (channel_AB < end_AB); i++) {
|
||||
*channel_B++ = *channel_AB++;
|
||||
(*real_len_B)++;
|
||||
}
|
||||
|
||||
/* All avaiable bytes are processed */
|
||||
if (channel_AB >= end_AB) {
|
||||
assert(*real_len_A + *real_len_B == len_AB);
|
||||
|
||||
if ((pkg == min - 1) && (channel_A == end_A) && (channel_B == end_B)) {
|
||||
assert((*real_len_A == len_A) && (*real_len_B == len_B));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* $Id: merge_split.h,v 1.17 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Merge and split
|
||||
*
|
||||
* The library expects that color image consists of 3 independent
|
||||
* channels: Y, Cb and Cr. In order to provide smooth image scaling
|
||||
* corresponding bitstreams should be merged into a singe bitstream.
|
||||
* On decoding, the inverse operation should be taken. */
|
||||
|
||||
#ifndef __MERGE_SPLIT_H__
|
||||
#define __MERGE_SPLIT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup merge_split Merge and split */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Merge two channels
|
||||
*
|
||||
* This function merges \a channel_A with \a channel_B. Result is stored
|
||||
* in the \a channel_AB. Note that on return, combined \a channel_AB can
|
||||
* be further merged with another channel.
|
||||
*
|
||||
* \param channel_A Channel A
|
||||
* \param channel_B Channel B
|
||||
* \param channel_AB Combined channel AB
|
||||
* \param len_A Length of the \a channel_A
|
||||
* \param len_B Length of the \a channel_B
|
||||
*
|
||||
* \note The caller should allocate at least \a len_A + \a len_B
|
||||
* bytes for the \a channel_AB array.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void merge_channels(unsigned char *channel_A, unsigned char *channel_B,
|
||||
unsigned char *channel_AB, int len_A, int len_B);
|
||||
|
||||
/** Split combined channel
|
||||
*
|
||||
* This function splits combined \a channel_AB into
|
||||
* the \a channel_A and \a channel_B. It is important to note
|
||||
* that \a channel_AB can be truncated at any position beforehand.
|
||||
* In this case \a channel_A and \a channel_B will contain only
|
||||
* part of original data. Real amount of saved bytes will be stored
|
||||
* in the \a real_len_A and \a real_len_B respectively.
|
||||
*
|
||||
* \param channel_AB Combined channel AB
|
||||
* \param channel_A Channel A
|
||||
* \param channel_B Channel B
|
||||
* \param len_AB Current length of the \a channel_AB
|
||||
* \param len_A Original length of the \a channel_A
|
||||
* \param len_B Original length of the \a channel_B
|
||||
* \param real_len_A Number of bytes actually used in the \a channel_A
|
||||
* \param real_len_B Number of bytes actually used in the \a channel_B
|
||||
*
|
||||
* \note The caller should allocate at least \a len_AB bytes for
|
||||
* \a channel_A and \a channel_B arrays.
|
||||
*
|
||||
* \return \c VOID */
|
||||
void split_channels(unsigned char *channel_AB,
|
||||
unsigned char *channel_A, unsigned char *channel_B,
|
||||
int len_AB, int len_A, int len_B,
|
||||
int *real_len_A, int *real_len_B);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MERGE_SPLIT_H__ */
|
|
@ -0,0 +1,302 @@
|
|||
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006 Alexander Chemeris
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_INTTYPES_H_ // [
|
||||
#define _MSC_INTTYPES_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// 7.8 Format conversion of integer types
|
||||
|
||||
typedef struct {
|
||||
intmax_t quot;
|
||||
intmax_t rem;
|
||||
} imaxdiv_t;
|
||||
|
||||
// 7.8.1 Macros for format specifiers
|
||||
|
||||
// The fprintf macros for signed integers are:
|
||||
#define PRId8 "d"
|
||||
#define PRIi8 "i"
|
||||
#define PRIdLEAST8 "d"
|
||||
#define PRIiLEAST8 "i"
|
||||
#define PRIdFAST8 "d"
|
||||
#define PRIiFAST8 "i"
|
||||
|
||||
#define PRId16 "hd"
|
||||
#define PRIi16 "hi"
|
||||
#define PRIdLEAST16 "hd"
|
||||
#define PRIiLEAST16 "hi"
|
||||
#define PRIdFAST16 "hd"
|
||||
#define PRIiFAST16 "hi"
|
||||
|
||||
#define PRId32 "I32d"
|
||||
#define PRIi32 "I32i"
|
||||
#define PRIdLEAST32 "I32d"
|
||||
#define PRIiLEAST32 "I32i"
|
||||
#define PRIdFAST32 "I32d"
|
||||
#define PRIiFAST32 "I32i"
|
||||
|
||||
#define PRId64 "I64d"
|
||||
#define PRIi64 "I64i"
|
||||
#define PRIdLEAST64 "I64d"
|
||||
#define PRIiLEAST64 "I64i"
|
||||
#define PRIdFAST64 "I64d"
|
||||
#define PRIiFAST64 "I64i"
|
||||
|
||||
#define PRIdMAX "I64d"
|
||||
#define PRIiMAX "I64i"
|
||||
|
||||
#define PRIdPTR "Id"
|
||||
#define PRIiPTR "Ii"
|
||||
|
||||
// The fprintf macros for unsigned integers are:
|
||||
#define PRIo8 "o"
|
||||
#define PRIu8 "u"
|
||||
#define PRIx8 "x"
|
||||
#define PRIX8 "X"
|
||||
#define PRIoLEAST8 "o"
|
||||
#define PRIuLEAST8 "u"
|
||||
#define PRIxLEAST8 "x"
|
||||
#define PRIXLEAST8 "X"
|
||||
#define PRIoFAST8 "o"
|
||||
#define PRIuFAST8 "u"
|
||||
#define PRIxFAST8 "x"
|
||||
#define PRIXFAST8 "X"
|
||||
|
||||
#define PRIo16 "ho"
|
||||
#define PRIu16 "hu"
|
||||
#define PRIx16 "hx"
|
||||
#define PRIX16 "hX"
|
||||
#define PRIoLEAST16 "ho"
|
||||
#define PRIuLEAST16 "hu"
|
||||
#define PRIxLEAST16 "hx"
|
||||
#define PRIXLEAST16 "hX"
|
||||
#define PRIoFAST16 "ho"
|
||||
#define PRIuFAST16 "hu"
|
||||
#define PRIxFAST16 "hx"
|
||||
#define PRIXFAST16 "hX"
|
||||
|
||||
#define PRIo32 "I32o"
|
||||
#define PRIu32 "I32u"
|
||||
#define PRIx32 "I32x"
|
||||
#define PRIX32 "I32X"
|
||||
#define PRIoLEAST32 "I32o"
|
||||
#define PRIuLEAST32 "I32u"
|
||||
#define PRIxLEAST32 "I32x"
|
||||
#define PRIXLEAST32 "I32X"
|
||||
#define PRIoFAST32 "I32o"
|
||||
#define PRIuFAST32 "I32u"
|
||||
#define PRIxFAST32 "I32x"
|
||||
#define PRIXFAST32 "I32X"
|
||||
|
||||
#define PRIo64 "I64o"
|
||||
#define PRIu64 "I64u"
|
||||
#define PRIx64 "I64x"
|
||||
#define PRIX64 "I64X"
|
||||
#define PRIoLEAST64 "I64o"
|
||||
#define PRIuLEAST64 "I64u"
|
||||
#define PRIxLEAST64 "I64x"
|
||||
#define PRIXLEAST64 "I64X"
|
||||
#define PRIoFAST64 "I64o"
|
||||
#define PRIuFAST64 "I64u"
|
||||
#define PRIxFAST64 "I64x"
|
||||
#define PRIXFAST64 "I64X"
|
||||
|
||||
#define PRIoMAX "I64o"
|
||||
#define PRIuMAX "I64u"
|
||||
#define PRIxMAX "I64x"
|
||||
#define PRIXMAX "I64X"
|
||||
|
||||
#define PRIoPTR "Io"
|
||||
#define PRIuPTR "Iu"
|
||||
#define PRIxPTR "Ix"
|
||||
#define PRIXPTR "IX"
|
||||
|
||||
// The fscanf macros for signed integers are:
|
||||
#define SCNd8 "d"
|
||||
#define SCNi8 "i"
|
||||
#define SCNdLEAST8 "d"
|
||||
#define SCNiLEAST8 "i"
|
||||
#define SCNdFAST8 "d"
|
||||
#define SCNiFAST8 "i"
|
||||
|
||||
#define SCNd16 "hd"
|
||||
#define SCNi16 "hi"
|
||||
#define SCNdLEAST16 "hd"
|
||||
#define SCNiLEAST16 "hi"
|
||||
#define SCNdFAST16 "hd"
|
||||
#define SCNiFAST16 "hi"
|
||||
|
||||
#define SCNd32 "ld"
|
||||
#define SCNi32 "li"
|
||||
#define SCNdLEAST32 "ld"
|
||||
#define SCNiLEAST32 "li"
|
||||
#define SCNdFAST32 "ld"
|
||||
#define SCNiFAST32 "li"
|
||||
|
||||
#define SCNd64 "I64d"
|
||||
#define SCNi64 "I64i"
|
||||
#define SCNdLEAST64 "I64d"
|
||||
#define SCNiLEAST64 "I64i"
|
||||
#define SCNdFAST64 "I64d"
|
||||
#define SCNiFAST64 "I64i"
|
||||
|
||||
#define SCNdMAX "I64d"
|
||||
#define SCNiMAX "I64i"
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define SCNdPTR "I64d"
|
||||
# define SCNiPTR "I64i"
|
||||
#else // _WIN64 ][
|
||||
# define SCNdPTR "ld"
|
||||
# define SCNiPTR "li"
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// The fscanf macros for unsigned integers are:
|
||||
#define SCNo8 "o"
|
||||
#define SCNu8 "u"
|
||||
#define SCNx8 "x"
|
||||
#define SCNX8 "X"
|
||||
#define SCNoLEAST8 "o"
|
||||
#define SCNuLEAST8 "u"
|
||||
#define SCNxLEAST8 "x"
|
||||
#define SCNXLEAST8 "X"
|
||||
#define SCNoFAST8 "o"
|
||||
#define SCNuFAST8 "u"
|
||||
#define SCNxFAST8 "x"
|
||||
#define SCNXFAST8 "X"
|
||||
|
||||
|
||||
#define SCNo16 "ho"
|
||||
#define SCNu16 "hu"
|
||||
#define SCNx16 "hx"
|
||||
#define SCNX16 "hX"
|
||||
#define SCNoLEAST16 "ho"
|
||||
#define SCNuLEAST16 "hu"
|
||||
#define SCNxLEAST16 "hx"
|
||||
#define SCNXLEAST16 "hX"
|
||||
#define SCNoFAST16 "ho"
|
||||
#define SCNuFAST16 "hu"
|
||||
#define SCNxFAST16 "hx"
|
||||
#define SCNXFAST16 "hX"
|
||||
|
||||
#define SCNo32 "lo"
|
||||
#define SCNu32 "lu"
|
||||
#define SCNx32 "lx"
|
||||
#define SCNX32 "lX"
|
||||
#define SCNoLEAST32 "lo"
|
||||
#define SCNuLEAST32 "lu"
|
||||
#define SCNxLEAST32 "lx"
|
||||
#define SCNXLEAST32 "lX"
|
||||
#define SCNoFAST32 "lo"
|
||||
#define SCNuFAST32 "lu"
|
||||
#define SCNxFAST32 "lx"
|
||||
#define SCNXFAST32 "lX"
|
||||
|
||||
#define SCNo64 "I64o"
|
||||
#define SCNu64 "I64u"
|
||||
#define SCNx64 "I64x"
|
||||
#define SCNX64 "I64X"
|
||||
#define SCNoLEAST64 "I64o"
|
||||
#define SCNuLEAST64 "I64u"
|
||||
#define SCNxLEAST64 "I64x"
|
||||
#define SCNXLEAST64 "I64X"
|
||||
#define SCNoFAST64 "I64o"
|
||||
#define SCNuFAST64 "I64u"
|
||||
#define SCNxFAST64 "I64x"
|
||||
#define SCNXFAST64 "I64X"
|
||||
|
||||
#define SCNoMAX "I64o"
|
||||
#define SCNuMAX "I64u"
|
||||
#define SCNxMAX "I64x"
|
||||
#define SCNXMAX "I64X"
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define SCNoPTR "I64o"
|
||||
# define SCNuPTR "I64u"
|
||||
# define SCNxPTR "I64x"
|
||||
# define SCNXPTR "I64X"
|
||||
#else // _WIN64 ][
|
||||
# define SCNoPTR "lo"
|
||||
# define SCNuPTR "lu"
|
||||
# define SCNxPTR "lx"
|
||||
# define SCNXPTR "lX"
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.8.2 Functions for greatest-width integer types
|
||||
|
||||
// 7.8.2.1 The imaxabs function
|
||||
#define imaxabs _abs64
|
||||
|
||||
// 7.8.2.2 The imaxdiv function
|
||||
|
||||
// This is modified version of div() function from Microsoft's div.c found
|
||||
// in %MSVC.NET%\crt\src\div.c
|
||||
#ifdef STATIC_IMAXDIV // [
|
||||
static
|
||||
#else // STATIC_IMAXDIV ][
|
||||
_inline
|
||||
#endif // STATIC_IMAXDIV ]
|
||||
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
|
||||
{
|
||||
imaxdiv_t result;
|
||||
|
||||
result.quot = numer / denom;
|
||||
result.rem = numer % denom;
|
||||
|
||||
if (numer < 0 && result.rem > 0) {
|
||||
// did division wrong; must fix up
|
||||
++result.quot;
|
||||
result.rem -= denom;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 7.8.2.3 The strtoimax and strtoumax functions
|
||||
#define strtoimax _strtoi64
|
||||
#define strtoumax _strtoui64
|
||||
|
||||
// 7.8.2.4 The wcstoimax and wcstoumax functions
|
||||
#define wcstoimax _wcstoi64
|
||||
#define wcstoumax _wcstoui64
|
||||
|
||||
|
||||
#endif // _MSC_INTTYPES_H_ ]
|
|
@ -0,0 +1,247 @@
|
|||
// ISO C9x compliant stdint.h for Microsoft Visual Studio
|
||||
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
|
||||
//
|
||||
// Copyright (c) 2006-2008 Alexander Chemeris
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// 1. Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// 2. Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// 3. The name of the author may be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _MSC_VER // [
|
||||
#error "Use this header only with Microsoft Visual C++ compilers!"
|
||||
#endif // _MSC_VER ]
|
||||
|
||||
#ifndef _MSC_STDINT_H_ // [
|
||||
#define _MSC_STDINT_H_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
|
||||
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
|
||||
// or compiler give many errors like this:
|
||||
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
# include <wchar.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// Define _W64 macros to mark types changing their size, like intptr_t.
|
||||
#ifndef _W64
|
||||
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
|
||||
# define _W64 __w64
|
||||
# else
|
||||
# define _W64
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
// 7.18.1 Integer types
|
||||
|
||||
// 7.18.1.1 Exact-width integer types
|
||||
|
||||
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
|
||||
// realize that, e.g. char has the same size as __int8
|
||||
// so we give up on __intX for them.
|
||||
#if (_MSC_VER < 1300)
|
||||
typedef signed char int8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
typedef signed __int8 int8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
#endif
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
|
||||
|
||||
// 7.18.1.2 Minimum-width integer types
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int64_t int_least64_t;
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
|
||||
// 7.18.1.3 Fastest minimum-width integer types
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
// 7.18.1.4 Integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
typedef signed __int64 intptr_t;
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else // _WIN64 ][
|
||||
typedef _W64 signed int intptr_t;
|
||||
typedef _W64 unsigned int uintptr_t;
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.1.5 Greatest-width integer types
|
||||
typedef int64_t intmax_t;
|
||||
typedef uint64_t uintmax_t;
|
||||
|
||||
|
||||
// 7.18.2 Limits of specified-width integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
|
||||
|
||||
// 7.18.2.1 Limits of exact-width integer types
|
||||
#define INT8_MIN ((int8_t)_I8_MIN)
|
||||
#define INT8_MAX _I8_MAX
|
||||
#define INT16_MIN ((int16_t)_I16_MIN)
|
||||
#define INT16_MAX _I16_MAX
|
||||
#define INT32_MIN ((int32_t)_I32_MIN)
|
||||
#define INT32_MAX _I32_MAX
|
||||
#define INT64_MIN ((int64_t)_I64_MIN)
|
||||
#define INT64_MAX _I64_MAX
|
||||
#define UINT8_MAX _UI8_MAX
|
||||
#define UINT16_MAX _UI16_MAX
|
||||
#define UINT32_MAX _UI32_MAX
|
||||
#define UINT64_MAX _UI64_MAX
|
||||
|
||||
// 7.18.2.2 Limits of minimum-width integer types
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.3 Limits of fastest minimum-width integer types
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
// 7.18.2.4 Limits of integer types capable of holding object pointers
|
||||
#ifdef _WIN64 // [
|
||||
# define INTPTR_MIN INT64_MIN
|
||||
# define INTPTR_MAX INT64_MAX
|
||||
# define UINTPTR_MAX UINT64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define INTPTR_MIN INT32_MIN
|
||||
# define INTPTR_MAX INT32_MAX
|
||||
# define UINTPTR_MAX UINT32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
// 7.18.2.5 Limits of greatest-width integer types
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
// 7.18.3 Limits of other integer types
|
||||
|
||||
#ifdef _WIN64 // [
|
||||
# define PTRDIFF_MIN _I64_MIN
|
||||
# define PTRDIFF_MAX _I64_MAX
|
||||
#else // _WIN64 ][
|
||||
# define PTRDIFF_MIN _I32_MIN
|
||||
# define PTRDIFF_MAX _I32_MAX
|
||||
#endif // _WIN64 ]
|
||||
|
||||
#define SIG_ATOMIC_MIN INT_MIN
|
||||
#define SIG_ATOMIC_MAX INT_MAX
|
||||
|
||||
#ifndef SIZE_MAX // [
|
||||
# ifdef _WIN64 // [
|
||||
# define SIZE_MAX _UI64_MAX
|
||||
# else // _WIN64 ][
|
||||
# define SIZE_MAX _UI32_MAX
|
||||
# endif // _WIN64 ]
|
||||
#endif // SIZE_MAX ]
|
||||
|
||||
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
|
||||
#ifndef WCHAR_MIN // [
|
||||
# define WCHAR_MIN 0
|
||||
#endif // WCHAR_MIN ]
|
||||
#ifndef WCHAR_MAX // [
|
||||
# define WCHAR_MAX _UI16_MAX
|
||||
#endif // WCHAR_MAX ]
|
||||
|
||||
#define WINT_MIN 0
|
||||
#define WINT_MAX _UI16_MAX
|
||||
|
||||
#endif // __STDC_LIMIT_MACROS ]
|
||||
|
||||
|
||||
// 7.18.4 Limits of other integer types
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
|
||||
|
||||
// 7.18.4.1 Macros for minimum-width integer constants
|
||||
|
||||
#define INT8_C(val) val##i8
|
||||
#define INT16_C(val) val##i16
|
||||
#define INT32_C(val) val##i32
|
||||
#define INT64_C(val) val##i64
|
||||
|
||||
#define UINT8_C(val) val##ui8
|
||||
#define UINT16_C(val) val##ui16
|
||||
#define UINT32_C(val) val##ui32
|
||||
#define UINT64_C(val) val##ui64
|
||||
|
||||
// 7.18.4.2 Macros for greatest-width integer constants
|
||||
#define INTMAX_C INT64_C
|
||||
#define UINTMAX_C UINT64_C
|
||||
|
||||
#endif // __STDC_CONSTANT_MACROS ]
|
||||
|
||||
|
||||
#endif // _MSC_STDINT_H_ ]
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* $Id: pad.c,v 1.15 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <pad.h>
|
||||
#include <color.h>
|
||||
|
||||
void extend_channel(unsigned char **input_channel,
|
||||
coeff_t **output_channel,
|
||||
int input_width, int input_height,
|
||||
int output_width, int output_height)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
/* Sanity checks */
|
||||
assert((input_width > 0) && (input_height > 0));
|
||||
assert((output_width > 0) && (output_height > 0));
|
||||
assert(output_width >= input_width);
|
||||
assert(output_height >= input_height);
|
||||
|
||||
/* Copy original */
|
||||
for (i = 0; i < input_height; i++) {
|
||||
for (j = 0; j < input_width; j++) {
|
||||
output_channel[i][j] = input_channel[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
/* Fill horizontally */
|
||||
for (i = 0; i < input_height; i++) {
|
||||
for (j = 0; j < output_width - input_width; j++) {
|
||||
output_channel[i][input_width + j] =
|
||||
output_channel[i][ABS(input_width - j - 1)];
|
||||
}
|
||||
}
|
||||
|
||||
/* Fill vertically */
|
||||
for (j = 0; j < output_width; j++) {
|
||||
for (i = 0; i < output_height - input_height; i++) {
|
||||
output_channel[i + input_height][j] =
|
||||
output_channel[ABS(input_height - i - 1)][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void extract_channel(coeff_t **input_channel,
|
||||
unsigned char **output_channel,
|
||||
int input_width, int input_height,
|
||||
int output_width, int output_height)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
/* Sanity checks */
|
||||
assert((input_width > 0) && (input_height > 0));
|
||||
assert((output_width > 0) && (output_height > 0));
|
||||
assert(output_width <= input_width);
|
||||
assert(output_height <= output_height);
|
||||
|
||||
/* Extract & clip original data */
|
||||
for (i = 0; i < output_height; i++) {
|
||||
for (j = 0; j < output_width; j++) {
|
||||
output_channel[i][j] = CLIP(input_channel[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* $Id: pad.h,v 1.17 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Padding
|
||||
*
|
||||
* The library expects that the image consists of square blocks
|
||||
* of certain size. Namely, 2^N or 2^N + 1 depending on selected
|
||||
* wavelet transform mode. Nevertheless, most real-life images
|
||||
* do not meet this strict requirement. That`s why we need to pad
|
||||
* boundary image blocks to the full size. Missing data is obtained
|
||||
* using pixel mirroring. */
|
||||
|
||||
#ifndef __PAD_H__
|
||||
#define __PAD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup pad Padding */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Channel extension
|
||||
*
|
||||
* This function extends \a input_channel using mirroring
|
||||
* operation. The result is stored in the \a output_channel.
|
||||
* Note that the \a output_channel must be greater than or
|
||||
* equal to the \a input_channel in both width and height.
|
||||
* Minimal channel size allowed is 1x1 pixels. Boundary
|
||||
* pixels are duplicated.
|
||||
*
|
||||
* \param input_channel Input channel
|
||||
* \param output_channel Output channel
|
||||
* \param input_width Input channel width
|
||||
* \param input_height Input channel height
|
||||
* \param output_width Output channel width
|
||||
* \param output_height Output channel height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void extend_channel(unsigned char **input_channel,
|
||||
coeff_t **output_channel,
|
||||
int input_width, int input_height,
|
||||
int output_width, int output_height);
|
||||
|
||||
/** Channel extraction
|
||||
*
|
||||
* This function extracts a block of pixels from the
|
||||
* \a input_channel and stores it in the \a output_channel.
|
||||
* Note that the \a output_channel size must be less than
|
||||
* or equal to the \a input_channel in both width and height.
|
||||
* Minimal channel size allowed is 1x1 pixels.
|
||||
*
|
||||
* \param input_channel Input channel
|
||||
* \param output_channel Output channel
|
||||
* \param input_width Input channel width
|
||||
* \param input_height Input channel height
|
||||
* \param output_width Output channel width
|
||||
* \param output_height Output channel height
|
||||
*
|
||||
* \return \c VOID */
|
||||
void extract_channel(coeff_t **input_channel,
|
||||
unsigned char **output_channel,
|
||||
int input_width, int input_height,
|
||||
int output_width, int output_height);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PAD_H__ */
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* $Id: resample.c,v 1.11 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <resample.h>
|
||||
|
||||
void bilinear_resample_channel(coeff_t **input_channel, coeff_t **output_channel,
|
||||
int input_width, int input_height,
|
||||
int output_width, int output_height)
|
||||
{
|
||||
coeff_t t, u;
|
||||
coeff_t tmp;
|
||||
|
||||
int i, j;
|
||||
int l, c;
|
||||
|
||||
/* Sanity checks */
|
||||
assert((input_width > 1) && (input_height > 1));
|
||||
assert((output_width > 1) && (output_height > 1));
|
||||
|
||||
for (i = 0; i < output_height; i++) {
|
||||
for (j = 0; j < output_width; j++) {
|
||||
tmp = (double) (input_height - 1) *
|
||||
((double) i / (double) (output_height - 1));
|
||||
|
||||
l = (int) tmp;
|
||||
|
||||
if (l < 0) {
|
||||
l = 0;
|
||||
} else if (l >= input_height - 1) {
|
||||
l = input_height - 2;
|
||||
}
|
||||
|
||||
u = tmp - (double) l;
|
||||
|
||||
tmp = (double) (input_width - 1) *
|
||||
((double) j / (double) (output_width - 1));
|
||||
|
||||
c = (int) tmp;
|
||||
|
||||
if (c < 0) {
|
||||
c = 0;
|
||||
} else if (c >= input_width - 1) {
|
||||
c = input_width - 2;
|
||||
}
|
||||
|
||||
t = tmp - (double) c;
|
||||
|
||||
output_channel[i][j] =
|
||||
input_channel[l][c] * (1 - t) * (1 - u) +
|
||||
input_channel[l + 1][c] * (1 - t) * u +
|
||||
input_channel[l][c + 1] * t * (1 - u) +
|
||||
input_channel[l + 1][c + 1] * t * u;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* $Id: resample.h,v 1.14 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief Resampling
|
||||
*
|
||||
* It is well known that human eye is less sensitive to color
|
||||
* than intensity. It is worthwhile to utilize this fact. We can
|
||||
* store chroma channels with lower resolution than luma. One
|
||||
* can achieve this through channel resampling procedure.
|
||||
* At the moment EPSILON library uses bilinear resampling
|
||||
* algorithm.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* <a href="http://en.wikipedia.org/wiki/Bilinear_interpolation">
|
||||
* Bilinear interpolation (Wikipedia) </a>
|
||||
*
|
||||
* <a href="http://alglib.sources.ru/interpolation/bilinearresample.php">
|
||||
* Bilinear resampling (in Russian)</a> */
|
||||
|
||||
#ifndef __RESAMPLE_H__
|
||||
#define __RESAMPLE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup resampling Resampling */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
|
||||
/** Bilinear channel resampling
|
||||
*
|
||||
* This function performes bilinear channel resampling.
|
||||
*
|
||||
* \param input_channel Input channel
|
||||
* \param output_channel Output channel
|
||||
* \param input_width Input channel width
|
||||
* \param input_height Input channel height
|
||||
* \param output_width Output channel width
|
||||
* \param output_height Output channel height
|
||||
*
|
||||
* \return \c VOID
|
||||
*
|
||||
* \note Input and output dimensions must be greater than 1. */
|
||||
void bilinear_resample_channel(coeff_t **input_channel, coeff_t **output_channel,
|
||||
int input_width, int input_height,
|
||||
int output_width, int output_height);
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __RESAMPLE_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,493 @@
|
|||
/*
|
||||
* $Id: speck.h,v 1.50 2010/02/05 23:50:22 simakov Exp $
|
||||
*
|
||||
* EPSILON - wavelet image compression library.
|
||||
* Copyright (C) 2006,2007,2010 Alexander Simakov, <xander@entropyware.info>
|
||||
*
|
||||
* This file is part of EPSILON
|
||||
*
|
||||
* EPSILON is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EPSILON 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 Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with EPSILON. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* http://epsilon-project.sourceforge.net
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* \brief SPECK wavelet codec
|
||||
*
|
||||
* This file represents SPECK - The Set-Partitioning Embedded Block
|
||||
* wavelet codec. To understand the algorithm you have to read
|
||||
* original article from William Pearlman and Asad Islam. Also it
|
||||
* is highly recommended to get familar with coding example.
|
||||
*
|
||||
* \warning The Set-Partitioning Embedded Block (SPECK) algorithm is
|
||||
* protected by US Patent #6,671,413 and also may be patented in your
|
||||
* country.
|
||||
*
|
||||
* \section References
|
||||
*
|
||||
* <a href="http://www.cipr.rpi.edu/~pearlman/">William A. Pearlman home page</a>
|
||||
*
|
||||
* <a href="http://www.cipr.rpi.edu/~pearlman/papers/vcip99_ip.pdf">
|
||||
* A. Islam and W. A. Pearlman, An Embedded and Efficient Low-Complexity
|
||||
* Hierarchical Image Coder, Visual Communications and Image Processing 99,
|
||||
* Proceedings of SPIE Vol. 3653, pp. 294-305, Jan. 1999.</a>
|
||||
*
|
||||
* <a href="http://www.cipr.rpi.edu/~pearlman/papers/speck_example.pdf">
|
||||
* SPECK coding example</a> */
|
||||
|
||||
#ifndef __SPECK_H__
|
||||
#define __SPECK_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \addtogroup speck SPECK wavelet codec */
|
||||
/*@{*/
|
||||
|
||||
#include <common.h>
|
||||
#include <list.h>
|
||||
#include <bit_io.h>
|
||||
|
||||
/** Pixel set of type 'point' */
|
||||
#define TYPE_POINT 0
|
||||
/** Pixel set of type 'S' */
|
||||
#define TYPE_S 1
|
||||
/** Pixel set of type 'I' */
|
||||
#define TYPE_I 2
|
||||
/** Empty pixel set */
|
||||
#define TYPE_EMPTY 3
|
||||
|
||||
/** Processing sets of type 'S' */
|
||||
#define STAGE_S 0
|
||||
/** Processing sets of type 'I' */
|
||||
#define STAGE_I 1
|
||||
|
||||
/** Minimal SPECK buffer size */
|
||||
#define MIN_SPECK_BUF_SIZE 1
|
||||
/** Reserve 6 bits for \a theshold_bits parameter */
|
||||
#define THRESHOLD_BITS 6
|
||||
|
||||
/** Cast data pointer as \ref pixel_set structure */
|
||||
#define PIXEL_SET(_set) ((pixel_set *) (_set->data))
|
||||
/** Select inserting index for array of LIS slots */
|
||||
#define SLOT_INDEX(_set) (number_of_bits(MIN(_set->width, _set->height)) - 1)
|
||||
|
||||
/** Break if buffer is full */
|
||||
#define BREAK_IF_OVERFLOW(_x) if (_x == BIT_BUFFER_OVERFLOW) break
|
||||
/** Return if buffer is full */
|
||||
#define RETURN_IF_OVERFLOW(_x) if (_x == BIT_BUFFER_OVERFLOW) return _x
|
||||
/** Break if buffer is empty */
|
||||
#define BREAK_IF_UNDERFLOW(_x) if (_x == BIT_BUFFER_UNDERFLOW) break
|
||||
/** Return if buffer is empty */
|
||||
#define RETURN_IF_UNDERFLOW(_x) if (_x == BIT_BUFFER_UNDERFLOW) return _x
|
||||
/** Contunue if list is empty */
|
||||
#define CONTINUE_IF_EMPTY(_x) if (LIST_IS_EMPTY(_x)) continue
|
||||
|
||||
/** This structure represents pixel_set */
|
||||
typedef struct pixel_set_tag {
|
||||
/** Set type */
|
||||
short type;
|
||||
/** X coordinate */
|
||||
short x;
|
||||
/** Y coordinate */
|
||||
short y;
|
||||
/** Set width */
|
||||
short width;
|
||||
/** Set height */
|
||||
short height;
|
||||
} pixel_set;
|
||||
|
||||
/** Find maximal coefficient
|
||||
*
|
||||
* This function returns absolute value of maximal
|
||||
* wavelet coefficient.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return Maximal coefficient value */
|
||||
local int max_coeff(int **channel, int channel_size);
|
||||
|
||||
/** Validate set
|
||||
*
|
||||
* The process of splitting, moving and testing sets in the SPECK
|
||||
* algorithm is a bit tricky. This function can be thought as a very
|
||||
* strict validation tool.
|
||||
*
|
||||
* \param set Set to validate
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c 1 for valid sets and \c 0 for invalid ones */
|
||||
local int validate_set(pixel_set *set, int channel_size);
|
||||
|
||||
/** Significance test
|
||||
*
|
||||
* The purpose of this function is to compare \a set against \a threshold.
|
||||
* If the \a set have a coefficient greater than or equal to \a threshold,
|
||||
* then it is said that the \a set is significant. If all coefficients
|
||||
* of the \a set are below \a threshold, then it is said that the \a set
|
||||
* is insignificant.
|
||||
*
|
||||
* \param set Set to test
|
||||
* \param threshold Threshold to compare against
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c 1 for significant sets and \c 0 for insignificant ones */
|
||||
local int significance_test(pixel_set *set, int threshold,
|
||||
int **channel, int channel_size);
|
||||
|
||||
/** Select partition type
|
||||
*
|
||||
* This function selects type of the \a set.
|
||||
*
|
||||
* \param set Set
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void select_part_type(pixel_set *set);
|
||||
|
||||
/** Split set
|
||||
*
|
||||
* This function splits the \a set into pieces. Actual
|
||||
* splitting rule is defined within SPECK algorithm.
|
||||
*
|
||||
* \param set Set to split
|
||||
* \param part1 First part
|
||||
* \param part2 Second part
|
||||
* \param part3 Third part
|
||||
* \param part4 Fourth part
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void split_set(pixel_set *set, pixel_set *part1, pixel_set *part2,
|
||||
pixel_set *part3, pixel_set *part4, int channel_size);
|
||||
|
||||
/** Allocate array of LIS slots
|
||||
*
|
||||
* This function allocates array of LIS slots.
|
||||
*
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return Pointer to newly allocated structure */
|
||||
local linked_list **alloc_LIS_slots(int channel_size);
|
||||
|
||||
/** Release array of LIS slots
|
||||
*
|
||||
* This function releases array of LIS slots.
|
||||
*
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void free_LIS_slots(linked_list **LIS_slots, int channel_size);
|
||||
|
||||
/** Assign set attributes
|
||||
*
|
||||
* This function assigns \a set attributes to the \a node.
|
||||
*
|
||||
* \param node Destination node
|
||||
* \param set Source set
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void assign_set(list_node *node, pixel_set *set);
|
||||
|
||||
/** Reset channel
|
||||
*
|
||||
* This function resets all \a channel components to zero.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void zero_channel(int **channel, int channel_size);
|
||||
|
||||
/** Encode set of type 'S'
|
||||
*
|
||||
* This function encodes \a set of type 'S'.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param set Set to encode
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
local int speck_encode_S(int **channel, int channel_size,
|
||||
pixel_set *set, linked_list **LIS_slots,
|
||||
linked_list *LSP, bit_buffer *bb,
|
||||
int threshold);
|
||||
|
||||
/** Process set of type 'S'
|
||||
*
|
||||
* This function extracts \ref pixel_set structure from the \a node,
|
||||
* and encodes it using \ref speck_encode_S function.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param node Current node
|
||||
* \param slot Current LIS slot
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
* \param coding_stage Either \ref STAGE_S or \ref STAGE_I
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
local int speck_process_S(int **channel, int channel_size, list_node *node,
|
||||
linked_list *slot, linked_list **LIS_slots,
|
||||
linked_list *LSP, bit_buffer *bb,
|
||||
int threshold, int coding_stage);
|
||||
|
||||
/** Encode set of type 'I'
|
||||
*
|
||||
* This function encodes set of type 'I'.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param I Set of type I
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
local int speck_encode_I(int **channel, int channel_size, pixel_set *I,
|
||||
linked_list **LIS_slots, linked_list *LSP,
|
||||
bit_buffer *bb, int threshold);
|
||||
|
||||
/** Process set of type 'I'
|
||||
*
|
||||
* This function encodes set \a I using \ref speck_encode_I function.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param I Set of type I
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
local int speck_process_I(int **channel, int channel_size, pixel_set *I,
|
||||
linked_list **LIS_slots, linked_list *LSP,
|
||||
bit_buffer *bb, int threshold);
|
||||
|
||||
/** Encode sorting pass
|
||||
*
|
||||
* The SPECK encoding algorithm alternates two types of passes
|
||||
* through the data: sorting pass and refinement pass. This
|
||||
* function implements the first one.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param I Set of type I
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
local int encode_sorting_pass(int **channel, int channel_size,
|
||||
linked_list **LIS_slots, linked_list *LSP,
|
||||
pixel_set *I, bit_buffer *bb, int threshold);
|
||||
|
||||
/** Encode refinement pass
|
||||
*
|
||||
* The SPECK encoding algorithm alternates two types of passes
|
||||
* through the data: sorting pass and refinement pass. This
|
||||
* function implements the second one.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_OVERFLOW */
|
||||
local int encode_refinement_pass(int **channel, linked_list *LSP,
|
||||
bit_buffer *bb, int threshold);
|
||||
|
||||
/** Decode set of type 'S'
|
||||
*
|
||||
* This function is inverse to \ref speck_encode_S.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param set Set to decode
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
local int speck_decode_S(int **channel, int channel_size,
|
||||
pixel_set *set, linked_list **LIS_slots,
|
||||
linked_list *LSP, bit_buffer *bb,
|
||||
int threshold);
|
||||
|
||||
/** Unprocess set of type 'S'
|
||||
*
|
||||
* This function is inverse to \ref speck_process_S.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param node Current node
|
||||
* \param slot Current LIS slot
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
* \param coding_stage Either \ref STAGE_S or \ref STAGE_I
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
local int speck_unprocess_S(int **channel, int channel_size,
|
||||
list_node *node, linked_list *slot,
|
||||
linked_list **LIS_slots,
|
||||
linked_list *LSP, bit_buffer *bb,
|
||||
int threshold, int coding_stage);
|
||||
|
||||
/** Decode set of type 'I'
|
||||
*
|
||||
* This function is inverse to \ref speck_encode_I.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param I Set of type I
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
local int speck_decode_I(int **channel, int channel_size,
|
||||
pixel_set *I, linked_list **LIS_slots,
|
||||
linked_list *LSP, bit_buffer *bb,
|
||||
int threshold);
|
||||
|
||||
/** Unprocess set of type 'I'
|
||||
*
|
||||
* This function is inverse to \ref speck_process_I.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param I Set of type I
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
local int speck_unprocess_I(int **channel, int channel_size,
|
||||
pixel_set *I, linked_list **LIS_slots,
|
||||
linked_list *LSP, bit_buffer *bb,
|
||||
int threshold);
|
||||
|
||||
/** Decode sorting pass
|
||||
*
|
||||
* The SPECK decoding algorithm alternates two types of passes
|
||||
* through the data: sorting pass and refinement pass. This
|
||||
* function implements the first one.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param I Set of type I
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
local int decode_sorting_pass(int **channel, int channel_size,
|
||||
linked_list **LIS_slots,
|
||||
linked_list *LSP, pixel_set *I,
|
||||
bit_buffer *bb, int threshold);
|
||||
|
||||
/** Decode refinement pass
|
||||
*
|
||||
* The SPECK decoding algorithm alternates two types of passes
|
||||
* through the data: sorting pass and refinement pass. This
|
||||
* function implements the second one.
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param LSP List of Significant Pixels
|
||||
* \param bb Bit-buffer
|
||||
* \param threshold Threshold
|
||||
*
|
||||
* \return Either \ref BIT_BUFFER_OK or \ref BIT_BUFFER_UNDERFLOW */
|
||||
local int decode_refinement_pass(int **channel, linked_list *LSP,
|
||||
bit_buffer *bb, int threshold);
|
||||
|
||||
/** Initialize SPECK encoder or decoder
|
||||
*
|
||||
* This function initializes SPECK encoder or decoder.
|
||||
*
|
||||
* \param LIS_slots Array of LIS slots
|
||||
* \param I Set of type I
|
||||
* \param channel_size Channel size
|
||||
* \param mode Either \ref MODE_NORMAL or \ref MODE_OTLPF
|
||||
*
|
||||
* \return \c VOID */
|
||||
local void speck_init(linked_list **LIS_slots, pixel_set *I,
|
||||
int channel_size, int mode);
|
||||
|
||||
/** Encode channel using SPECK algorithm
|
||||
*
|
||||
* This function encodes \a channel of size \a channel_size
|
||||
* into the buffer \a buf of size \a buf_size.
|
||||
*
|
||||
* \note Depending on encoding mode, minimal channel
|
||||
* size is \c 2 (for \ref MODE_NORMAL) or \c 3
|
||||
* (for \ref MODE_OTLPF).
|
||||
*
|
||||
* \note Minimal buffer size is \ref MIN_SPECK_BUF_SIZE
|
||||
*
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
* \param buf Buffer
|
||||
* \param buf_size Buffer size
|
||||
*
|
||||
* \return Number of bytes in \a buf actualy used by encoder */
|
||||
int speck_encode(int **channel, int channel_size,
|
||||
unsigned char *buf, int buf_size);
|
||||
|
||||
/** Decode channel using SPECK algorithm
|
||||
*
|
||||
* This function decodes \a channel of size \a channel_size
|
||||
* from the buffer \a buf of size \a buf_size.
|
||||
*
|
||||
* \note Depending on encoding mode, minimal channel
|
||||
* size is \c 2 (for \ref MODE_NORMAL) or \c 3
|
||||
* (for \ref MODE_OTLPF).
|
||||
*
|
||||
* \note Minimal buffer size is \ref MIN_SPECK_BUF_SIZE
|
||||
*
|
||||
* \param buf Buffer
|
||||
* \param buf_size Buffer size
|
||||
* \param channel Channel
|
||||
* \param channel_size Channel size
|
||||
*
|
||||
* \return \c VOID */
|
||||
void speck_decode(unsigned char *buf, int buf_size,
|
||||
int **channel, int channel_size);
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SPECK_H__ */
|
|
@ -0,0 +1,51 @@
|
|||
LIBRARY epsilon.dll
|
||||
EXPORTS
|
||||
alloc_linked_list
|
||||
alloc_list_node
|
||||
analysis_2D
|
||||
append_list_node
|
||||
bilinear_resample_channel
|
||||
clip_channel
|
||||
convert_RGB_to_YCbCr
|
||||
convert_YCbCr_to_RGB
|
||||
dc_level_shift
|
||||
dc_level_unshift
|
||||
eps_decode_grayscale_block
|
||||
eps_decode_truecolor_block
|
||||
eps_encode_grayscale_block
|
||||
eps_encode_truecolor_block
|
||||
eps_free_2D
|
||||
eps_free_fb_info
|
||||
eps_get_fb_info
|
||||
eps_malloc_2D
|
||||
eps_read_block_header
|
||||
eps_truncate_block
|
||||
eps_xmalloc
|
||||
epsilon_adler32
|
||||
epsilon_crc32
|
||||
extend_channel
|
||||
extract_channel
|
||||
flush_bits
|
||||
free_2D
|
||||
free_linked_list
|
||||
free_list_node
|
||||
init_bits
|
||||
insert_after_list_node
|
||||
insert_before_list_node
|
||||
is_power_of_two
|
||||
malloc_2D
|
||||
merge_channels
|
||||
move_list_node
|
||||
number_of_bits
|
||||
prepend_list_node
|
||||
read_bits
|
||||
remove_list_node
|
||||
remove_list_node_link
|
||||
speck_decode
|
||||
speck_encode
|
||||
split_channels
|
||||
stuff_data
|
||||
synthesis_2D
|
||||
unstuff_data
|
||||
write_bits
|
||||
xmalloc
|
|
@ -0,0 +1,78 @@
|
|||
# $Id: makefile.vc,v 1.1 2010/03/19 22:57:28 simakov Exp $
|
||||
#
|
||||
# NMAKE Makefile to build EPSILON on Windows
|
||||
# Written by Sandro Furieri
|
||||
#
|
||||
!INCLUDE nmake.opt
|
||||
|
||||
OBJ_EXT = obj
|
||||
EXT = $(OBJ_EXT)
|
||||
|
||||
LIBOBJ = lib\bit_io.$(EXT) lib\checksum.$(EXT) \
|
||||
lib\cobs.$(EXT) lib\color.$(EXT) lib\common.$(EXT) \
|
||||
lib\dc_level.$(EXT) lib\filter.$(EXT) \
|
||||
lib\filterbank.$(EXT) lib\libmain.$(EXT) \
|
||||
lib\list.$(EXT) lib\mem_alloc.$(EXT) \
|
||||
lib\merge_split.$(EXT) lib\pad.$(EXT) \
|
||||
lib\resample.$(EXT) lib\speck.$(EXT)
|
||||
EPSILON_DLL = epsilon$(VERSION).dll
|
||||
EPSILON_EXE = epsilon.exe
|
||||
|
||||
CFLAGS = /nologo -IC:\OSGeo4W\include -I.\lib -I.\lib\msvc \
|
||||
-I.\src -I..\popt\include \
|
||||
$(OPTFLAGS)
|
||||
|
||||
default: all
|
||||
|
||||
all: epsilon.lib epsilon_i.lib $(EPSILON_EXE)
|
||||
|
||||
epsilon.lib: $(LIBOBJ)
|
||||
if exist epsilon.lib del epsilon.lib
|
||||
lib /out:epsilon.lib $(LIBOBJ)
|
||||
|
||||
$(EPSILON_DLL): epsilon_i.lib
|
||||
|
||||
epsilon_i.lib: $(LIBOBJ)
|
||||
link /debug /dll /def:libepsilon.def /out:$(EPSILON_DLL) \
|
||||
/implib:epsilon_i.lib $(LIBOBJ)
|
||||
if exist $(EPSILON_DLL).manifest mt -manifest \
|
||||
$(EPSILON_DLL).manifest -outputresource:$(EPSILON_DLL);2
|
||||
|
||||
$(EPSILON_EXE): $(EPSILON_DLL) src\epsilon.obj \
|
||||
src\cmd_version.obj src\cmd_list_all_fb.obj \
|
||||
src\cmd_truncate_file.obj src\cmd_decode_file.obj \
|
||||
src\cmd_encode_file.obj src\misc.obj \
|
||||
src\psi.obj src\pbm.obj
|
||||
cl src\epsilon.obj $(LIBOBJ) \
|
||||
src\cmd_version.obj src\cmd_list_all_fb.obj \
|
||||
src\cmd_truncate_file.obj src\cmd_decode_file.obj \
|
||||
src\cmd_encode_file.obj src\misc.obj \
|
||||
src\psi.obj src\pbm.obj \
|
||||
..\popt\lib\libpopt.lib
|
||||
/Fe$(EPSILON_EXE)
|
||||
if exist $(EPSILON_EXE).manifest mt -manifest \
|
||||
$(EPSILON_EXE).manifest -outputresource:$(EPSILON_EXE);1
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) /c $*.c /Fo$@
|
||||
|
||||
clean:
|
||||
del *.dll
|
||||
del *.exp
|
||||
del *.manifest
|
||||
del *.lib
|
||||
del lib\*.obj
|
||||
del src\*.obj
|
||||
del *.exe
|
||||
del *.pdb
|
||||
|
||||
install: all
|
||||
-mkdir $(INSTDIR)
|
||||
-mkdir $(INSTDIR)\bin
|
||||
-mkdir $(INSTDIR)\lib
|
||||
-mkdir $(INSTDIR)\include
|
||||
copy *.dll $(INSTDIR)\bin
|
||||
copy *.lib $(INSTDIR)\lib
|
||||
copy *.exe $(INSTDIR)\bin
|
||||
copy lib\epsilon.h $(INSTDIR)\include
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
METASOURCES = AUTO
|
||||
|
||||
dist_man_MANS = epsilon.1
|
|
@ -0,0 +1,383 @@
|
|||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = man
|
||||
DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)"
|
||||
NROFF = nroff
|
||||
MANS = $(dist_man_MANS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
METASOURCES = AUTO
|
||||
dist_man_MANS = epsilon.1
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu man/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
distclean distclean-generic distclean-libtool distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-man1 \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
uninstall uninstall-am uninstall-man uninstall-man1
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,317 @@
|
|||
.\"
|
||||
.\" $Id: epsilon.1,v 1.10 2011/04/25 14:43:19 simakov Exp $
|
||||
.\"
|
||||
.TH EPSILON "1" "April 2008" "epsilon" "User Commands"
|
||||
.SH NAME
|
||||
EPSILON \- powerful Open Source wavelet image compressor
|
||||
.SH SYNOPSIS
|
||||
.B epsilon
|
||||
\fICOMMAND \fR[\fIOPTIONS\fR] \fIFILES\fR...
|
||||
.SH DESCRIPTION
|
||||
EPSILON is a powerful Open Source wavelet image compressor.
|
||||
The project is aimed on parallel and robust image processing.
|
||||
EPSILON source package consists of two core parts: portable,
|
||||
well-designed, thread-safe library and codec, build on the
|
||||
top of the library. The library API is very clean, simple and
|
||||
carefully documented.
|
||||
|
||||
EPSILON's compression algorithm is based on wavelet transform and
|
||||
so called embedded coding. The former is a well-known mathematical
|
||||
theory and the latter is a very effective, yet simple method of
|
||||
progressive image coding. The actual algorithm employed in EPSILON
|
||||
is called SPECK \- Set Partitioned Embedded bloCK coder introduced
|
||||
by Asad Islam and William Pearlman.
|
||||
|
||||
At the moment, EPSILON supports more than 30 wavelet filters and
|
||||
have automated interface for adding new ones. The script called
|
||||
.B make_filterbank.pl
|
||||
translates XML-files with filter descriptions to the C source
|
||||
code suitable for EPSILON. So, the only manual operation is to
|
||||
copy-and-paste program's output into the EPSILON's source code.
|
||||
After recompilation new filters will be ready to use.
|
||||
.B Special note:
|
||||
if you succeed in adding new filters, please send them to me.
|
||||
They will be included into the main source tree.
|
||||
|
||||
EPSILON project follows an old and fruitful UNIX tradition to
|
||||
Keep It Simple. For example, EPSILON works with
|
||||
.B PPM
|
||||
(Portable PixelMap) and
|
||||
.B PGM
|
||||
(Portable GrayMap) images only. They provide basic functionality
|
||||
and serve as a least\-common\-denominator for interchanging truecolor
|
||||
and grayscale images between different platforms and operating
|
||||
systems. Looking for a converter? Try
|
||||
.B Netpbm
|
||||
.I (http://netpbm.sourceforge.net/)
|
||||
\- perfect Open Source tool-kit with more than 220 handy utilities!
|
||||
|
||||
For storing and interchanging compressed images EPSILON defines
|
||||
it's own
|
||||
.B PSI
|
||||
(ePSIlon) file format. The PSI format is designed with simplicity and
|
||||
fault-tolerance in mind. A typical PSI file consists of several
|
||||
independent blocks. Each block represents a tile from the original
|
||||
image and have completely self-contained header. Each block is
|
||||
protected with CRC and (actually with two CRCs: one for the header
|
||||
and another for the data) separated from other blocks with a special
|
||||
unique marker. This simple yet effective technique makes stream
|
||||
synchronization and error localization almost trivial. Moreover,
|
||||
block headers are saved as a plain text: you can edit them by-hand
|
||||
with your favorite text editor. Check it out!
|
||||
|
||||
EPSILON have a lot of interesting features. For example, you
|
||||
can finely control compression ratio (thank`s to embedded coding),
|
||||
manually distribute bit-budget among image channels, switch to
|
||||
different encoding and filtering modes and so on. EPSILON also
|
||||
supports HUGE files with constant memory and linear time
|
||||
complexity.
|
||||
|
||||
Another nice feature is multi-threading support. Try to (re)compile
|
||||
EPSILON with Pthreads enabled (see INSTALL for more info) and you will
|
||||
surely notice significant coding speed-up (assuming you have multicore
|
||||
CPU or several CPUs on you computer).
|
||||
|
||||
As of release 0.6.1 EPSILON also supports clustering mode. This is
|
||||
a very powerful feature if you have several machines linked with a
|
||||
high-capacity network, say gigabit ethernet or even faster. To
|
||||
build cluster-aware EPSILON version please read INSTALL file.
|
||||
|
||||
Although EPSILON have a rich set of special ad-hoc options you
|
||||
are not obliged to use them. Defaults are usually just fine.
|
||||
EPSILON's command line interface is very friendly and designed
|
||||
to be similar to
|
||||
.B GZIP
|
||||
or
|
||||
.B BZIP.
|
||||
So,
|
||||
.B `epsilon foo.ppm'
|
||||
and
|
||||
.B `epsilon -d bar.psi'
|
||||
is usually enough.
|
||||
.SH OPTIONS
|
||||
.SS "Commands:"
|
||||
.TP
|
||||
\fB\-e\fR, \fB\-\-encode\-file\fR
|
||||
Encode specified file(s). This is a default action if no command is given.
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-decode\-file\fR
|
||||
Decode specified file(s).
|
||||
.TP
|
||||
\fB\-t\fR, \fB\-\-truncate\-file\fR
|
||||
Truncate specified file(s). Due to embedded coding, block truncation
|
||||
is equivalent to block re-compression. In other words, truncation
|
||||
further compresses PSI-files.
|
||||
.TP
|
||||
\fB\-s\fR, \fB\-\-start\-node\fR
|
||||
Start cluster node. Note: this option is available in cluster-aware
|
||||
EPSILON version only and is intended for SLAVE nodes. In other words,
|
||||
you should invoke \fIepsilon \-s\fR on each SLAVE node in your cluster.
|
||||
Stopping cluster node is even simpler: \fIkillall epsilon\fR.
|
||||
|
||||
This command runs a daemon program that accepts TCP connections at
|
||||
certain port (2718 by default). For each connection a new child process
|
||||
is forked and the main program waits for a next connecton. Encoding
|
||||
and decoding statistics is SYSLOG-ed using LOG_DAEMON facility.
|
||||
|
||||
If you have DSH (Distributed SHell) installed on MASTER node, you can
|
||||
also use two handy scripts, namely \fBstart\_epsilon\_nodes.pl\fR
|
||||
and \fBstop\_epsilon\_nodes.pl\fR, for starting and stopping all
|
||||
cluster nodes respectively.
|
||||
|
||||
Host configuration is taken from so called \fI.epsilon.nodes\fR file.
|
||||
By default, program checks \fI.epsilon.nodes\fR in the current directory.
|
||||
If there is no such file, program tries \fI.epsilon.nodes\fR in user`s
|
||||
home directory. You can also explicitly specify file location as an
|
||||
argument to the script. File format is described below.
|
||||
.TP
|
||||
\fB\-a\fR, \fB\-\-list\-all\-fb\fR
|
||||
List all available filterbanks. This command shows ID, NAME and
|
||||
orthogonality TYPE for each available filterbank. As of release
|
||||
0.8.1 EPSILON also supports lifting implementation of a famous
|
||||
Daubechies 9/7 biorthogonal wavelet transform. It works faster
|
||||
than generic filter-based counterpart. Default ID is
|
||||
.B daub97lift
|
||||
.TP
|
||||
\fB\-V\fR, \fB\-\-version\fR
|
||||
Print program version.
|
||||
.SS "Options to use with `--encode-file' command:"
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-filter\-id\fR=\fIID\fR
|
||||
Wavelet filterbank ID. See also \fB\-\-list\-all\-fb\fR command.
|
||||
.TP
|
||||
\fB\-b\fR, \fB\-\-block\-size\fR=\fIVALUE\fR
|
||||
Block size to use: 32, 64, 128, 256, 512 or 1024. The default value
|
||||
is 256. Using very small blocks as well as using very large blocks is
|
||||
not recommended: the former adds substantial header overhead and
|
||||
the latter slows down encoding/decoding without any profit in
|
||||
image quality. Nevertheless, in some rare circumstances this rule
|
||||
is quite opposite.
|
||||
.TP
|
||||
\fB\-n\fR, \fB\-\-mode\-normal\fR
|
||||
Use so called normal processing mode. This mode can be used with the
|
||||
both orthogonal and biorthogonal filters. In practice you should
|
||||
avoid this parameter unless you are making some research in wavelets.
|
||||
.TP
|
||||
\fB\-o\fR, \fB\-\-mode\-otlpf\fR
|
||||
Use so called OTLPF processing mode. In a few words, OTLPF is some
|
||||
kind of hack to reduce boundary artefacts when image is broken into
|
||||
several tiles (as usually happens). Due to mathematical constrains
|
||||
this method can be applied to biorthogonal filters only. This option
|
||||
is turned on by default.
|
||||
.TP
|
||||
\fB\-r\fR, \fB\-\-ratio\fR=\fIVALUE\fR
|
||||
With this parameter you can finely control desired compression
|
||||
ratio. This value is not obliged to be integral: for example, the
|
||||
value of 34.102 is just fine. For obvious reasons compression
|
||||
ratio should be grater than 1. Although EPSILON's bit-allocation
|
||||
algorithm is pretty precise, too high compression ratios will
|
||||
be clipped due to block headers overhead. On the other hand,
|
||||
blank image (e.g. entirely black) surely will be encoded just
|
||||
in a couple of hundreds of bytes regardless of compression ratio
|
||||
you desire. Nevertheless, for a most real-life images and
|
||||
compression ratios (let us say 10..200) actual compression
|
||||
ratio will be very close to the value you desire. Default
|
||||
compression ratio is 10.
|
||||
.TP
|
||||
\fB\-2\fR, \fB\-\-two\-pass\fR
|
||||
By default EPSILON uses constant bit-rate (CBR) bit-allocation
|
||||
algorithm. CBR is pretty fast and usually gives acceptable image
|
||||
quality. If image quality is a concern, try two-pass
|
||||
variable bit-rate (VBR) bit-allocation algorithm instead.
|
||||
VBR gives better results than CBR, but runs about twice slower.
|
||||
.TP
|
||||
\fB\-N\fR, \fB\-\-node\-list\fR
|
||||
File with cluster configuration. Note: this option is available
|
||||
in cluster-aware EPSILON version only and is intended for MASTER
|
||||
node. Each line in this file should comply with the following
|
||||
format:
|
||||
|
||||
\fIuser@host:port^number_of_CPUs\fR
|
||||
|
||||
All fields are mandatory. No comments, spaces or blank lines are
|
||||
allowed here. The second field can be either IP address or host
|
||||
name. The last field is actually the number of simultaneous TCP
|
||||
connections with a corresponding SLAVE node. Usually it is set to
|
||||
the number of CPUs or somewhat larger.
|
||||
|
||||
If you omit this option, EPSILON will try \fI.epsilon.nodes\fR
|
||||
in the current and home directory (in that order).
|
||||
|
||||
Note 1: \'user\' field is used by \fBstart\_epsilon\_nodes.pl\fR
|
||||
and \fBstop\_epsilon\_nodes.pl\fR to SSH into the target box.
|
||||
|
||||
Note 2: \'port\' is EPSILON node's port not SSH's.
|
||||
|
||||
.TP
|
||||
\fB\-T\fR, \fB\-\-threads\fR
|
||||
Number of encoding threads. Note: this option is available
|
||||
in thread-aware EPSILON version only.
|
||||
.TP
|
||||
\fB\-\-Y\-ratio\fR=\fIVALUE\fR, \fB\-\-Cb\-ratio\fR=\fIVALUE\fR, \fB\-\-Cr\-ratio\fR=\fIVALUE\fR
|
||||
Bit\-budget percent for the Y, Cb and Cr channels respectively.
|
||||
The values should give 100% altogether. Note that these options
|
||||
have sense for truecolor (i.e. PPM) images only. The default
|
||||
values are 90-5-5.
|
||||
.TP
|
||||
\fB\-\-no\-resampling\fR
|
||||
By default EPSILON resamples truecolor images using so called 4:2:0
|
||||
resampling scheme. This trick essentially speed-ups encoding/decoding
|
||||
without sacrificing image quality. Usually there is no reason to
|
||||
disable resampling.
|
||||
.SS "Options to use with `--decode-file' command:"
|
||||
.TP
|
||||
\fB\-T\fR, \fB\-\-threads\fR
|
||||
Number of decoding threads. Note: this option is available
|
||||
in thread-aware EPSILON version only.
|
||||
.TP
|
||||
\fB\-N\fR, \fB\-\-node\-list\fR
|
||||
File with cluster configuration. Note: this option is available
|
||||
in cluster-aware EPSILON version only and is intended for MASTER
|
||||
node. Each line in this file should comply with the following
|
||||
format:
|
||||
|
||||
\fIuser@host:port^number_of_CPUs\fR
|
||||
|
||||
All fields are mandatory. No comments, spaces or blank lines are
|
||||
allowed here. The second field can be either IP address or host
|
||||
name. The last field is actually the number of simultaneous TCP
|
||||
connections with a corresponding SLAVE node. Usually it is set to
|
||||
the number of CPUs or somewhat larger.
|
||||
|
||||
If you omit this option, EPSILON will try \fI.epsilon.nodes\fR
|
||||
in the current and home directory (in that order).
|
||||
.TP
|
||||
\fB\-\-ignore\-hdr\-crc\fR
|
||||
Ignore header CRC errors.
|
||||
.TP
|
||||
\fB\-\-ignore\-data\-crc\fR
|
||||
Ignore data CRC errors.
|
||||
.TP
|
||||
\fB\-\-ignore\-format\-err\fR
|
||||
Skip over malformed blocks.
|
||||
.SS "Options to use with `--truncate-file' command:"
|
||||
.TP
|
||||
\fB\-r\fR, \fB\-\-ratio\fR=\fIVALUE\fR
|
||||
Desired truncation ratio. See also \fB\-\-truncate\-file\fR command.
|
||||
.SS "Options to use with `--start-node' command:"
|
||||
.TP
|
||||
\fB\-P\fR, \fB\-\-port\fR=\fIVALUE\fR
|
||||
By default cluster node listens port number 2718.
|
||||
With this option you can set another port number.
|
||||
.SS "Common options:"
|
||||
.TP
|
||||
\fB\-H\fR, \fB\-\-halt\-on\-errors\fR
|
||||
By default if something fails EPSILON proceeds to the next input
|
||||
file. With this option you can change default behaviour: EPSILON
|
||||
will halt on first error. Note that in MPI mode this option
|
||||
is not available and EPSILON always halts on errors.
|
||||
.TP
|
||||
\fB\-q\fR, \fB\-\-quiet\fR
|
||||
By default EPSILON shows pretty statistics during its operation.
|
||||
With this option you can ask EPSILON to be quiet.
|
||||
.TP
|
||||
\fB\-O\fR, \fB\-\-output\-dir\fR=\fIDIR\fR
|
||||
Output directory for encoded, decoded and truncated files.
|
||||
If not set, output files will be saved in the same directory
|
||||
as input ones.
|
||||
.SS "Help options:"
|
||||
.TP
|
||||
\-?, \fB\-\-help\fR
|
||||
Show help message.
|
||||
.TP
|
||||
\fB\-\-usage\fR
|
||||
Display brief usage message.
|
||||
.SH EXAMPLES
|
||||
Encode all PPM files in current directory with two-pass VBR algorithm:
|
||||
|
||||
.I epsilon *.ppm -2
|
||||
|
||||
Encode PGM file with 1:100 compression ratio using 4 threads:
|
||||
|
||||
.I epsilon -e big.pgm -r 100 -T 4
|
||||
|
||||
Decode all files to the /tmp directory, operate quietly:
|
||||
|
||||
.I epsilon -dq *.psi -O /tmp
|
||||
|
||||
Decode a list of heavily corrupted files:
|
||||
|
||||
.I epsilon -d *.psi --ignore-hdr-crc --ignore-data-crc --ignore-format-err
|
||||
|
||||
Start cluster node with non-standard port number:
|
||||
|
||||
.I epsilon -s -P 1234
|
||||
|
||||
Encode files using custom cluster configuration:
|
||||
|
||||
.I epsilon *.ppm *.pgm -N /path/to/.epsilon.nodes
|
||||
|
||||
Encode file with MPI engine using all available processors:
|
||||
|
||||
.I mpirun C epsilon test.ppm
|
||||
|
||||
.SH AUTHOR
|
||||
Alexander Simakov, \fI<xander@entropyware.info>\fR
|
||||
.TP
|
||||
Feedback, bug-reports and patches are welcome. Feel free to write!
|
|
@ -0,0 +1,367 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2006-05-10.23
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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 General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
tar try tar, gnutar, gtar, then tar without non-portable flags
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case $1 in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $1 in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG="\${$#}"
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# We have already tried tar in the generic part.
|
||||
# Look for gnutar/gtar before invocation to avoid ugly error
|
||||
# messages.
|
||||
if (gnutar --version > /dev/null 2>&1); then
|
||||
gnutar "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case $firstarg in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case $firstarg in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo 1>&2 "\
|
||||
WARNING: I can't seem to be able to run \`tar' with the given arguments.
|
||||
You may want to install GNU tar or Free paxutils, or check the
|
||||
command line arguments."
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue