* Fixed inline asm routines to remove all read/write operands.
* Added <string.h> to most files to prevent warnings under FreeBSD.
* Added "break;" after "default:" in case switches to prevent
warnings when compiling with GCC 3.0pre.
--- /dev/null
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+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 this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. 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 not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the 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
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "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
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY 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
+LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey 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 library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library 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 2 of the License, or (at your option) any later version.
+
+ This library 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 this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
--- /dev/null
+APPLE PUBLIC SOURCE LICENSE
+Version 1.1 - April 19,1999
+
+Please read this License carefully before downloading this software.
+By downloading and using this software, you are agreeing to be bound
+by the terms of this License. If you do not or cannot agree to the
+terms of this License, please do not download or use the software.
+
+1. General; Definitions. This License applies to any program or other
+work which Apple Computer, Inc. ("Apple") publicly announces as
+subject to this Apple Public Source License and which contains a
+notice placed by Apple identifying such program or work as "Original
+Code" and stating that it is subject to the terms of this Apple Public
+Source License version 1.1 (or subsequent version thereof), as it may
+be revised from time to time by Apple ("License"). As used in this
+License:
+
+1.1 "Affected Original Code" means only those specific portions of
+Original Code that allegedly infringe upon any party's intellectual
+property rights or are otherwise the subject of a claim of
+infringement.
+
+1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is
+the grantor of rights, (i) claims of patents that are now or hereafter
+acquired, owned by or assigned to Apple and (ii) that cover subject
+matter contained in the Original Code, but only to the extent
+necessary to use, reproduce and/or distribute the Original Code
+without infringement; and (b) in the case where You are the grantor of
+rights, (i) claims of patents that are now or hereafter acquired,
+owned by or assigned to You and (ii) that cover subject matter in Your
+Modifications, taken alone or in combination with Original Code.
+
+1.3 "Covered Code" means the Original Code, Modifications, the
+combination of Original Code and any Modifications, and/or any
+respective portions thereof.
+
+1.4 "Deploy" means to use, sublicense or distribute Covered Code other
+than for Your internal research and development (R&D), and includes
+without limitation, any and all internal use or distribution of
+Covered Code within Your business or organization except for R&D use,
+as well as direct or indirect sublicensing or distribution of Covered
+Code by You to any third party in any form or manner.
+
+1.5 "Larger Work" means a work which combines Covered Code or portions
+thereof with code not governed by the terms of this License.
+
+1.6 "Modifications" mean any addition to, deletion from, and/or change
+to, the substance and/or structure of Covered Code. When code is
+released as a series of files, a Modification is: (a) any addition to
+or deletion from the contents of a file containing Covered Code;
+and/or (b) any new file or other representation of computer program
+statements that contains any part of Covered Code.
+
+1.7 "Original Code" means (a) the Source Code of a program or other
+work as originally made available by Apple under this License,
+including the Source Code of any updates or upgrades to such programs
+or works made available by Apple under this License, and that has been
+expressly identified by Apple as such in the header file(s) of such
+work; and (b) the object code compiled from such Source Code and
+originally made available by Apple under this License.
+
+1.8 "Source Code" means the human readable form of a program or other
+work that is suitable for making modifications to it, including all
+modules it contains, plus any associated interface definition files,
+scripts used to control compilation and installation of an executable
+(object code).
+
+1.9 "You" or "Your" means an individual or a legal entity exercising
+rights under this License. For legal entities, "You" or "Your"
+includes any entity which controls, is controlled by, or is under
+common control with, You, where "control" means (a) the power, direct
+or indirect, to cause the direction or management of such entity,
+whether by contract or otherwise, or (b) ownership of fifty percent
+(50%) or more of the outstanding shares or beneficial ownership of
+such entity.
+
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms
+and conditions of this License, Apple hereby grants You, effective on
+the date You accept this License and download the Original Code, a
+world-wide, royalty-free, non- exclusive license, to the extent of
+Apple's Applicable Patent Rights and copyrights covering the Original
+Code, to do the following:
+
+2.1 You may use, copy, modify and distribute Original Code, with or
+without Modifications, solely for Your internal research and
+development, provided that You must in each instance:
+
+(a) retain and reproduce in all copies of Original Code the copyright
+and other proprietary notices and disclaimers of Apple as they appear
+in the Original Code, and keep intact all notices in the Original Code
+that refer to this License;
+
+(b) include a copy of this License with every copy of Source Code of
+Covered Code and documentation You distribute, and You may not offer
+or impose any terms on such Source Code that alter or restrict this
+License or the recipients' rights hereunder, except as permitted under
+Section 6; and
+
+(c) completely and accurately document all Modifications that you have
+made and the date of each such Modification, designate the version of
+the Original Code you used, prominently include a file carrying such
+information with the Modifications, and duplicate the notice in
+Exhibit A in each file of the Source Code of all such Modifications.
+
+2.2 You may Deploy Covered Code, provided that You must in each
+ instance:
+
+(a) satisfy all the conditions of Section 2.1 with respect to the
+Source Code of the Covered Code;
+
+(b) make all Your Deployed Modifications publicly available in Source
+Code form via electronic distribution (e.g. download from a web site)
+under the terms of this License and subject to the license grants set
+forth in Section 3 below, and any additional terms You may choose to
+offer under Section 6. You must continue to make the Source Code of
+Your Deployed Modifications available for as long as you Deploy the
+Covered Code or twelve (12) months from the date of initial
+Deployment, whichever is longer;
+
+(c) if You Deploy Covered Code containing Modifications made by You,
+inform others of how to obtain those Modifications by filling out and
+submitting the information found at
+http://www.apple.com/publicsource/modifications.html, if available;
+and
+
+(d) if You Deploy Covered Code in object code, executable form only,
+include a prominent notice, in the code itself as well as in related
+documentation, stating that Source Code of the Covered Code is
+available under the terms of this License with information on how and
+where to obtain such Source Code.
+
+3. Your Grants. In consideration of, and as a condition to, the
+licenses granted to You under this License:
+
+(a) You hereby grant to Apple and all third parties a non-exclusive,
+royalty-free license, under Your Applicable Patent Rights and other
+intellectual property rights owned or controlled by You, to use,
+reproduce, modify, distribute and Deploy Your Modifications of the
+same scope and extent as Apple's licenses under Sections 2.1 and 2.2;
+and
+
+(b) You hereby grant to Apple and its subsidiaries a non-exclusive,
+worldwide, royalty-free, perpetual and irrevocable license, under Your
+Applicable Patent Rights and other intellectual property rights owned
+or controlled by You, to use, reproduce, execute, compile, display,
+perform, modify or have modified (for Apple and/or its subsidiaries),
+sublicense and distribute Your Modifications, in any form, through
+multiple tiers of distribution.
+
+4. Larger Works. You may create a Larger Work by combining Covered
+Code with other code not governed by the terms of this License and
+distribute the Larger Work as a single product. In each such
+instance, You must make sure the requirements of this License are
+fulfilled for the Covered Code or any portion thereof.
+
+5. Limitations on Patent License. Except as expressly stated in
+Section 2, no other patent rights, express or implied, are granted by
+Apple herein. Modifications and/or Larger Works may require
+additional patent licenses from Apple which Apple may grant in its
+sole discretion.
+
+6. Additional Terms. You may choose to offer, and to charge a fee
+for, warranty, support, indemnity or liability obligations and/or
+other rights consistent with the scope of the license granted herein
+("Additional Terms") to one or more recipients of Covered
+Code. However, You may do so only on Your own behalf and as Your sole
+responsibility, and not on behalf of Apple. You must obtain the
+recipient's agreement that any such Additional Terms are offered by
+You alone, and You hereby agree to indemnify, defend and hold Apple
+harmless for any liability incurred by or claims asserted against
+Apple by reason of any such Additional Terms.
+
+7. Versions of the License. Apple may publish revised and/or new
+versions of this License from time to time. Each version will be
+given a distinguishing version number. Once Original Code has been
+published under a particular version of this License, You may continue
+to use it under the terms of that version. You may also choose to use
+such Original Code under the terms of any subsequent version of this
+License published by Apple. No one other than Apple has the right to
+modify the terms applicable to Covered Code created under this
+License.
+
+8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or
+in part pre-release, untested, or not fully tested works. The
+Original Code may contain errors that could cause failures or loss of
+data, and may be incomplete or contain inaccuracies. You expressly
+acknowledge and agree that use of the Original Code, or any portion
+thereof, is at Your sole and entire risk. THE ORIGINAL CODE IS
+PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND
+AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND
+9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS
+"APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE
+ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF
+THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT
+DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN
+INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED
+REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE
+SCOPE OF THIS WARRANTY. You acknowledge that the Original Code is not
+intended for use in the operation of nuclear facilities, aircraft
+navigation, communication systems, or air traffic control machines in
+which case the failure of the Original Code could lead to death,
+personal injury, or severe physical or environmental damage.
+
+9. Liability.
+
+9.1 Infringement. If any portion of, or functionality implemented by,
+the Original Code becomes the subject of a claim of infringement,
+Apple may, at its option: (a) attempt to procure the rights necessary
+for Apple and You to continue using the Affected Original Code; (b)
+modify the Affected Original Code so that it is no longer infringing;
+or (c) suspend Your rights to use, reproduce, modify, sublicense and
+distribute the Affected Original Code until a final determination of
+the claim is made by a court or governmental administrative agency of
+competent jurisdiction and Apple lifts the suspension as set forth
+below. Such suspension of rights will be effective immediately upon
+Apple's posting of a notice to such effect on the Apple web site that
+is used for implementation of this License. Upon such final
+determination being made, if Apple is legally able, without the
+payment of a fee or royalty, to resume use, reproduction,
+modification, sublicensing and distribution of the Affected Original
+Code, Apple will lift the suspension of rights to the Affected
+Original Code by posting a notice to such effect on the Apple web site
+that is used for implementation of this License. If Apple suspends
+Your rights to Affected Original Code, nothing in this License shall
+be construed to restrict You, at Your option and subject to applicable
+law, from replacing the Affected Original Code with non-infringing
+code or independently negotiating for necessary rights from such third
+party.
+
+9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE
+LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO
+USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY
+OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY
+OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF
+ANY REMEDY. In no event shall Apple's total liability to You for all
+damages under this License exceed the amount of fifty dollars
+($50.00).
+
+10. Trademarks. This License does not grant any rights to use the
+trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac
+OS X Server" or any other trademarks or trade names belonging to Apple
+(collectively "Apple Marks") and no Apple Marks may be used to endorse
+or promote products derived from the Original Code other than as
+permitted by and in strict compliance at all times with Apple's third
+party trademark usage guidelines which are posted at
+http://www.apple.com/legal/guidelinesfor3rdparties.html.
+
+11. Ownership. Apple retains all rights, title and interest in and to
+the Original Code and any Modifications made by or on behalf of Apple
+("Apple Modifications"), and such Apple Modifications will not be
+automatically subject to this License. Apple may, at its sole
+discretion, choose to license such Apple Modifications under this
+License, or on different terms from those contained in this License or
+may choose not to license them at all. Apple's development, use,
+reproduction, modification, sublicensing and distribution of Covered
+Code will not be subject to this License.
+
+12. Termination.
+
+12.1 Termination. This License and the rights granted hereunder will
+ terminate:
+
+(a) automatically without notice from Apple if You fail to comply with
+any term(s) of this License and fail to cure such breach within 30
+days of becoming aware of such breach; (b) immediately in the event of
+the circumstances described in Section 13.5(b); or (c) automatically
+without notice from Apple if You, at any time during the term of this
+License, commence an action for patent infringement against Apple.
+
+12.2 Effect of Termination. Upon termination, You agree to
+immediately stop any further use, reproduction, modification,
+sublicensing and distribution of the Covered Code and to destroy all
+copies of the Covered Code that are in your possession or control.
+All sublicenses to the Covered Code which have been properly granted
+prior to termination shall survive any termination of this License.
+Provisions which, by their nature, should remain in effect beyond the
+termination of this License shall survive, including but not limited
+to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. Neither party will be
+liable to the other for compensation, indemnity or damages of any sort
+solely as a result of terminating this License in accordance with its
+terms, and termination of this License will be without prejudice to
+any other right or remedy of either party.
+
+13. Miscellaneous.
+
+13.1 Government End Users. The Covered Code is a "commercial item" as
+defined in FAR 2.101. Government software and technical data rights
+in the Covered Code include only those rights customarily provided to
+the public as defined in this License. This customary commercial
+license in technical data and software is provided in accordance with
+FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer
+Software or Computer Software Documentation). Accordingly, all U.S.
+Government End Users acquire Covered Code with only those rights set
+forth herein.
+
+13.2 Relationship of Parties. This License will not be construed as
+creating an agency, partnership, joint venture or any other form of
+legal association between You and Apple, and You will not represent to
+the contrary, whether expressly, by implication, appearance or
+otherwise.
+
+13.3 Independent Development. Nothing in this License will impair
+Apple's right to acquire, license, develop, have others develop for
+it, market and/or distribute technology or products that perform the
+same or similar functions as, or otherwise compete with,
+Modifications, Larger Works, technology or products that You may
+develop, produce, market or distribute.
+
+13.4 Waiver; Construction. Failure by Apple to enforce any provision
+of this License will not be deemed a waiver of future enforcement of
+that or any other provision. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+will not apply to this License.
+
+13.5 Severability. (a) If for any reason a court of competent
+jurisdiction finds any provision of this License, or portion thereof,
+to be unenforceable, that provision of the License will be enforced to
+the maximum extent permissible so as to effect the economic benefits
+and intent of the parties, and the remainder of this License will
+continue in full force and effect. (b) Notwithstanding the foregoing,
+if applicable law prohibits or restricts You from fully and/or
+specifically complying with Sections 2 and/or 3 or prevents the
+enforceability of either of those Sections, this License will
+immediately terminate and You must immediately discontinue any use of
+the Covered Code and destroy all copies of it that are in your
+possession or control.
+
+13.6 Dispute Resolution. Any litigation or other dispute resolution
+between You and Apple relating to this License shall take place in the
+Northern District of California, and You and Apple hereby consent to
+the personal jurisdiction of, and venue in, the state and federal
+courts within that District with respect to this License. The
+application of the United Nations Convention on Contracts for the
+International Sale of Goods is expressly excluded.
+
+13.7 Entire Agreement; Governing Law. This License constitutes the
+entire agreement between the parties with respect to the subject
+matter hereof. This License shall be governed by the laws of the
+United States and the State of California, except that body of
+California law concerning conflicts of law.
+
+Where You are located in the province of Quebec, Canada, the following
+clause applies: The parties hereby confirm that they have requested
+that this License and all related documents be drafted in English. Les
+parties ont exige que le present contrat et tous les documents
+connexes soient rediges en anglais.
+
+EXHIBIT A.
+
+"Portions Copyright (c) 1999-2000 Apple Computer, Inc. All Rights
+Reserved. This file contains Original Code and/or Modifications of
+Original Code as defined in and that are subject to the Apple Public
+Source License Version 1.1 (the "License"). You may not use this file
+except in compliance with the License. Please obtain a copy of the
+License at http://www.apple.com/publicsource and read it before using
+this file.
+
+The Original Code and all software distributed under the License are
+distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
+License for the specific language governing rights and limitations
+under the License."
*****************************************************************************
* Copyright (C) 1998-2000 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2001 VideoLAN
- * $Id: DVDioctl.cpp,v 1.3 2001/04/04 16:33:07 sam Exp $
+ * $Id: DVDioctl.cpp,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
log( LOG_INFO, "DVD ioctl: IODVD_READ_STRUCTURE\n" );
+ /* We don't do anything, since I don't know what to do */
+
return 0;
case IODVD_SEND_KEY:
--- /dev/null
+
+DVD driver for Darwin and Mac OS X
+==================================
+
+This experimental kernel extension (KEXT) for Darwin is a wrapper for
+the DVD-related kernel IOKit functions. It was written for two main reasons:
+
+ - the lack of userland support for DVD key negociation functions
+ - the fact that the kernel locks mounted device, preventing raw device
+ reads if the DVD is mounted
+
+Building the driver
+===================
+
+You can either load the project in Project Builder and press the "build"
+icon, or open a terminal window and type "pbxbuild".
+
+Installing the driver
+=====================
+
+Open a terminal window, and type "kextload build/DVDioctl.kext", or whatever
+the path to the build tree is. You need to be root in order to do this.
+
+Using the driver
+================
+
+The driver creates a special /dev/dvd block device upon loading. When a
+process tries to open this device, it looks for an IODVDMedia object and
+opens it. All further operation done to the /dev/dvd device are then
+forwarded to the IODVDMedia device.
+
* aout_alsa.c : Alsa functions library
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: aout_alsa.c,v 1.12 2001/03/21 13:42:33 sam Exp $
+ * $Id: aout_alsa.c,v 1.13 2001/04/06 09:15:47 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
snd_pcm_playback_go( p_aout->p_sys->p_alsa_handle );
if( i_playback_go_returns )
{
- intf_ErrMsg( "ALSA_PLUGIN : Unable to prepare channel (bis) :
- exit = %i", i_playback_go_returns );
+ intf_ErrMsg( "ALSA_PLUGIN : Unable to prepare channel (bis) : "
+ "exit = %i", i_playback_go_returns );
intf_ErrMsg( "This means : %s",
snd_strerror( i_set_param_returns ) );
return( -1 );
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_css.c,v 1.20 2001/04/04 02:49:18 sam Exp $
+ * $Id: dvd_css.c,v 1.21 2001/04/06 09:15:47 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
i_t3 = (i_t3 << 8 ) | i_t6;
i_t6 = pi_css_tab4[i_t6];
i_t5 += i_t6 + i_t4;
- *pi_sec++ = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
+ *pi_sec = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
+ pi_sec++;
i_t5 >>= 8;
}
}
* dvd_ioctl.c: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ioctl.c,v 1.6 2001/04/04 16:33:07 sam Exp $
+ * $Id: dvd_ioctl.c,v 1.7 2001/04/06 09:15:47 sam Exp $
*
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org>
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
#include <netinet/in.h>
* will only be given back to netlist when refcount is zero.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
- * $Id: dvd_netlist.c,v 1.4 2001/04/01 07:31:38 stef Exp $
+ * $Id: dvd_netlist.c,v 1.5 2001/04/06 09:15:47 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
* Stéphane Borel <stef@videolan.org>
#include "defs.h"
#include <stdlib.h>
+#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
#include <sys/uio.h> /* struct iovec */
#include <unistd.h>
* vout_ggi.c: GGI video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
- * $Id: vout_ggi.c,v 1.8 2001/03/21 13:42:34 sam Exp $
+ * $Id: vout_ggi.c,v 1.9 2001/04/06 09:15:47 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
default:
break;
}
-
break;
case evPtrButtonRelease:
p_main->p_intf->b_menu_change = 1;
break;
}
+ break;
default:
+ break;
}
}
* idct_common.c : common IDCT functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct_common.c,v 1.3 2001/01/17 18:17:30 massiot Exp $
+ * $Id: idct_common.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* vout_sdl.c: SDL video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_sdl.c,v 1.45 2001/03/21 13:42:34 sam Exp $
+ * $Id: vout_sdl.c,v 1.46 2001/04/06 09:15:47 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
p_vout->p_sys->b_cursor_autohidden = 0;
SDL_ShowCursor( 1 );
}
- else
+ else
{
p_vout->p_sys->i_lastmoved = mdate();
}
* ac3_bit_allocate.c: ac3 allocation tables
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: ac3_bit_allocate.c,v 1.16 2001/03/21 13:42:34 sam Exp $
+ * $Id: ac3_bit_allocate.c,v 1.17 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "int_types.h"
#include "ac3_decoder.h"
#include "ac3_internal.h"
* ac3_decoder_thread.c: ac3 decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_decoder_thread.c,v 1.26 2001/02/22 05:31:55 reno Exp $
+ * $Id: ac3_decoder_thread.c,v 1.27 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
#include <unistd.h> /* getpid() */
#include <stdio.h> /* "intf_msg.h" */
+#include <string.h> /* memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
vlc_mutex_unlock (&p_ac3dec->p_aout_fifo->data_lock);
bad_frame:
+ continue;
}
/* If b_error is set, the ac3 decoder thread enters the error loop */
* ac3_downmix.c: ac3 downmix functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_downmix.c,v 1.18 2001/03/21 13:42:34 sam Exp $
+ * $Id: ac3_downmix.c,v 1.19 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
switch(p_ac3dec->bsi.acmod)
{
- case 7: // 3/2
- downmix_3f_2r_to_2ch_c (channel, &dm_par);
- break;
- case 6: // 2/2
- downmix_2f_2r_to_2ch_c (channel, &dm_par);
- break;
- case 5: // 3/1
- downmix_3f_1r_to_2ch_c (channel, &dm_par);
- break;
- case 4: // 2/1
- downmix_2f_1r_to_2ch_c (channel, &dm_par);
- break;
- case 3: // 3/0
- downmix_3f_0r_to_2ch_c (channel, &dm_par);
- break;
- case 2:
- break;
- default: // 1/0
+ case 7: // 3/2
+ downmix_3f_2r_to_2ch_c (channel, &dm_par);
+ break;
+ case 6: // 2/2
+ downmix_2f_2r_to_2ch_c (channel, &dm_par);
+ break;
+ case 5: // 3/1
+ downmix_3f_1r_to_2ch_c (channel, &dm_par);
+ break;
+ case 4: // 2/1
+ downmix_2f_1r_to_2ch_c (channel, &dm_par);
+ break;
+ case 3: // 3/0
+ downmix_3f_0r_to_2ch_c (channel, &dm_par);
+ break;
+ case 2:
+ break;
+ default: // 1/0
/* FIXME
- if (p_ac3dec->bsi.acmod == 1)
- center = p_ac3dec->samples.channel[0];
- else if (p_ac3dec->bsi.acmod == 0)
- center = p_ac3dec->samples.channel[0]; */
+ if (p_ac3dec->bsi.acmod == 1)
+ center = p_ac3dec->samples.channel[0];
+ else if (p_ac3dec->bsi.acmod == 0)
+ center = p_ac3dec->samples.channel[0]; */
return 1;
- }
+ }
return 0;
}
* ac3_downmix_c.c: ac3 downmix functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: ac3_downmix_c.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: ac3_downmix_c.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Renaud Dartus <reno@videolan.org>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
#include "ac3_downmix.h"
void __inline__ downmix_3f_2r_to_2ch_c (float *samples, dm_par_t *dm_par)
{
- int i;
- float *left, *right, *center, *left_sur, *right_sur;
- float left_tmp, right_tmp;
+ int i;
+ float *left, *right, *center, *left_sur, *right_sur;
+ float left_tmp, right_tmp;
left = samples;
center = samples + 256;
left_sur = samples + 256*3;
right_sur = samples + 256*4;
- for (i=0; i < 256; i++) {
+ for (i=0; i < 256; i++) {
left_tmp = dm_par->unit * *left + dm_par->clev * *center + dm_par->slev * *left_sur++;
right_tmp = dm_par->unit * *right++ + dm_par->clev * *center + dm_par->slev * *right_sur++;
- *left++ = left_tmp;
- *center++ = right_tmp;
- }
+ *left++ = left_tmp;
+ *center++ = right_tmp;
+ }
}
void __inline__ downmix_2f_2r_to_2ch_c (float *samples, dm_par_t *dm_par)
{
- int i;
- float *left, *right, *left_sur, *right_sur;
- float left_tmp, right_tmp;
+ int i;
+ float *left, *right, *left_sur, *right_sur;
+ float left_tmp, right_tmp;
- left = &samples[0];
- right = &samples[256];
- left_sur = &samples[512];
- right_sur = &samples[768];
-
- for (i = 0; i < 256; i++) {
- left_tmp = dm_par->unit * *left + dm_par->slev * *left_sur++;
- right_tmp= dm_par->unit * *right + dm_par->slev * *right_sur++;
- *left++ = left_tmp;
- *right++ = right_tmp;
- }
+ left = &samples[0];
+ right = &samples[256];
+ left_sur = &samples[512];
+ right_sur = &samples[768];
+
+ for (i = 0; i < 256; i++) {
+ left_tmp = dm_par->unit * *left + dm_par->slev * *left_sur++;
+ right_tmp= dm_par->unit * *right + dm_par->slev * *right_sur++;
+ *left++ = left_tmp;
+ *right++ = right_tmp;
+ }
}
void __inline__ downmix_3f_1r_to_2ch_c (float *samples, dm_par_t *dm_par)
{
- int i;
- float *left, *right, *center, *right_sur;
- float left_tmp, right_tmp;
-
- left = &samples[0];
- right = &samples[512];
- center = &samples[256];
- right_sur = &samples[768];
-
- for (i = 0; i < 256; i++) {
- left_tmp = dm_par->unit * *left + dm_par->clev * *center - dm_par->slev * *right_sur;
- right_tmp= dm_par->unit * *right++ + dm_par->clev * *center + dm_par->slev * *right_sur++;
- *left++ = left_tmp;
- *center++ = right_tmp;
- }
+ int i;
+ float *left, *right, *center, *right_sur;
+ float left_tmp, right_tmp;
+
+ left = &samples[0];
+ right = &samples[512];
+ center = &samples[256];
+ right_sur = &samples[768];
+
+ for (i = 0; i < 256; i++) {
+ left_tmp = dm_par->unit * *left + dm_par->clev * *center - dm_par->slev * *right_sur;
+ right_tmp= dm_par->unit * *right++ + dm_par->clev * *center + dm_par->slev * *right_sur++;
+ *left++ = left_tmp;
+ *center++ = right_tmp;
+ }
}
void __inline__ downmix_2f_1r_to_2ch_c (float *samples, dm_par_t *dm_par)
{
- int i;
- float *left, *right, *right_sur;
- float left_tmp, right_tmp;
-
- left = &samples[0];
- right = &samples[256];
- right_sur = &samples[512];
-
- for (i = 0; i < 256; i++) {
- left_tmp = dm_par->unit * *left - dm_par->slev * *right_sur;
- right_tmp= dm_par->unit * *right + dm_par->slev * *right_sur++;
- *left++ = left_tmp;
- *right++ = right_tmp;
- }
+ int i;
+ float *left, *right, *right_sur;
+ float left_tmp, right_tmp;
+
+ left = &samples[0];
+ right = &samples[256];
+ right_sur = &samples[512];
+
+ for (i = 0; i < 256; i++) {
+ left_tmp = dm_par->unit * *left - dm_par->slev * *right_sur;
+ right_tmp= dm_par->unit * *right + dm_par->slev * *right_sur++;
+ *left++ = left_tmp;
+ *right++ = right_tmp;
+ }
}
void __inline__ downmix_3f_0r_to_2ch_c (float *samples, dm_par_t *dm_par)
{
- int i;
- float *left, *right, *center;
- float left_tmp, right_tmp;
-
- left = &samples[0];
- center = &samples[256];
- right = &samples[512];
-
- for (i = 0; i < 256; i++) {
- left_tmp = dm_par->unit * *left + dm_par->clev * *center;
- right_tmp= dm_par->unit * *right++ + dm_par->clev * *center;
- *left++ = left_tmp;
- *center++ = right_tmp;
- }
+ int i;
+ float *left, *right, *center;
+ float left_tmp, right_tmp;
+
+ left = &samples[0];
+ center = &samples[256];
+ right = &samples[512];
+
+ for (i = 0; i < 256; i++) {
+ left_tmp = dm_par->unit * *left + dm_par->clev * *center;
+ right_tmp= dm_par->unit * *right++ + dm_par->clev * *center;
+ *left++ = left_tmp;
+ *center++ = right_tmp;
+ }
}
void __inline__ stream_sample_2ch_to_s16_c (s16 *out_buf, float *left, float *right)
{
- int i;
- for (i=0; i < 256; i++) {
- *out_buf++ = (s16) (*left++ * NORM);
- *out_buf++ = (s16) (*right++ * NORM);
- }
+ int i;
+ for (i=0; i < 256; i++) {
+ *out_buf++ = (s16) (*left++ * NORM);
+ *out_buf++ = (s16) (*right++ * NORM);
+ }
}
void __inline__ stream_sample_1ch_to_s16_c (s16 *out_buf, float *center)
{
- int i;
- float tmp;
+ int i;
+ float tmp;
- for (i=0; i < 256; i++) {
- *out_buf++ = tmp = (s16) (0.7071f * *center++ * NORM);
- *out_buf++ = tmp;
- }
+ for (i=0; i < 256; i++) {
+ *out_buf++ = tmp = (s16) (0.7071f * *center++ * NORM);
+ *out_buf++ = tmp;
+ }
}
* ac3_exponent.c: ac3 exponent calculations
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_exponent.c,v 1.21 2001/03/21 13:42:34 sam Exp $
+ * $Id: ac3_exponent.c,v 1.22 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@zoy.org>
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* ac3_mantissa.c: ac3 mantissa computation
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: ac3_mantissa.c,v 1.21 2001/03/21 13:42:34 sam Exp $
+ * $Id: ac3_mantissa.c,v 1.22 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* ac3_parse.c: ac3 parsing procedures
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: ac3_parse.c,v 1.16 2001/03/21 13:42:34 sam Exp $
+ * $Id: ac3_parse.c,v 1.17 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Aaron Holtzman <aholtzma@engr.uvic.ca>
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
-
#include "threads.h"
#include "mtime.h"
{
struct mixlev_s
{
- float clev;
+ float clev;
char *desc;
};
static const char *service_ids[8] =
if ( !i )
{
-/* if ((p_ac3dec->bsi.acmod & 0x1) && (p_ac3dec->bsi.acmod != 0x1))
- printf("CentreMixLevel %s ",cmixlev_tbl[p_ac3dec->bsi.cmixlev].desc);
- if (p_ac3dec->bsi.acmod & 0x4)
- printf("SurMixLevel %s",smixlev_tbl[p_ac3dec->bsi.cmixlev].desc);
+/* if ((p_ac3dec->bsi.acmod & 0x1) && (p_ac3dec->bsi.acmod != 0x1))
+ printf("CentreMixLevel %s ",cmixlev_tbl[p_ac3dec->bsi.cmixlev].desc);
+ if (p_ac3dec->bsi.acmod & 0x4)
+ printf("SurMixLevel %s",smixlev_tbl[p_ac3dec->bsi.cmixlev].desc);
*/
intf_Msg ( "(ac3dec_parsebsi) %s %d.%d Mode",
service_ids[p_ac3dec->bsi.bsmod],
char *exp_strat_tbl[4] = {"R ","D15 ","D25 ","D45 "};
u32 i;
- intf_ErrMsg ("(ac3dec_parseaudblk) ");
- intf_ErrMsg ("%s ",p_ac3dec->audblk.cplinu ? "cpl on" : "cpl off");
- intf_ErrMsg ("%s ",p_ac3dec->audblk.baie? "bai" : " ");
- intf_ErrMsg ("%s ",p_ac3dec->audblk.snroffste? "snroffst" : " ");
- intf_ErrMsg ("%s ",p_ac3dec->audblk.deltbaie? "deltba" : " ");
- intf_ErrMsg ("%s ",p_ac3dec->audblk.phsflginu? "phsflg" : " ");
- intf_ErrMsg ("(%s %s %s %s %s) ",exp_strat_tbl[p_ac3dec->audblk.chexpstr[0]],
- exp_strat_tbl[p_ac3dec->audblk.chexpstr[1]],exp_strat_tbl[p_ac3dec->audblk.chexpstr[2]],
- exp_strat_tbl[p_ac3dec->audblk.chexpstr[3]],exp_strat_tbl[p_ac3dec->audblk.chexpstr[4]]);
- intf_ErrMsg ("[");
- for(i=0;i<p_ac3dec->bsi.nfchans;i++)
- intf_ErrMsg ("%1d",p_ac3dec->audblk.blksw[i]);
- intf_ErrMsg ("]");
-
- intf_ErrMsg ("\n");
+ intf_ErrMsg ("(ac3dec_parseaudblk) ");
+ intf_ErrMsg ("%s ",p_ac3dec->audblk.cplinu ? "cpl on" : "cpl off");
+ intf_ErrMsg ("%s ",p_ac3dec->audblk.baie? "bai" : " ");
+ intf_ErrMsg ("%s ",p_ac3dec->audblk.snroffste? "snroffst" : " ");
+ intf_ErrMsg ("%s ",p_ac3dec->audblk.deltbaie? "deltba" : " ");
+ intf_ErrMsg ("%s ",p_ac3dec->audblk.phsflginu? "phsflg" : " ");
+ intf_ErrMsg ("(%s %s %s %s %s) ",exp_strat_tbl[p_ac3dec->audblk.chexpstr[0]],
+ exp_strat_tbl[p_ac3dec->audblk.chexpstr[1]],exp_strat_tbl[p_ac3dec->audblk.chexpstr[2]],
+ exp_strat_tbl[p_ac3dec->audblk.chexpstr[3]],exp_strat_tbl[p_ac3dec->audblk.chexpstr[4]]);
+ intf_ErrMsg ("[");
+ for(i=0;i<p_ac3dec->bsi.nfchans;i++)
+ intf_ErrMsg ("%1d",p_ac3dec->audblk.blksw[i]);
+ intf_ErrMsg ("]");
+
+ intf_ErrMsg ("\n");
}
* adec_generic.c: MPEG audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: adec_generic.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: adec_generic.c,v 1.5 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* adec_layer1.c: MPEG Layer I audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: adec_layer1.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: adec_layer1.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
#include "defs.h"
+#include <stdlib.h> /* NULL */
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* adec_layer2.c: MPEG Layer II audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: adec_layer2.c,v 1.3 2001/03/21 13:42:34 sam Exp $
+ * $Id: adec_layer2.c,v 1.4 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
#include "defs.h"
+#include <stdlib.h> /* NULL */
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* audio_decoder.c: MPEG audio decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: audio_decoder.c,v 1.47 2001/02/11 01:15:10 sam Exp $
+ * $Id: audio_decoder.c,v 1.48 2001/04/06 09:15:47 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
#include <unistd.h> /* getpid() */
#include <stdio.h> /* "intf_msg.h" */
+#include <string.h> /* memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_clock.c,v 1.8 2001/03/14 00:40:24 massiot Exp $
+ * $Id: input_clock.c,v 1.9 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_dec.c,v 1.9 2001/04/03 03:39:41 stef Exp $
+ * $Id: input_dec.c,v 1.10 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "defs.h"
#include <stdlib.h>
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* input_ext-dec.c: services to the decoders
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ext-dec.c,v 1.11 2001/03/21 13:42:34 sam Exp $
+ * $Id: input_ext-dec.c,v 1.12 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_ext-intf.c,v 1.18 2001/04/01 07:31:38 stef Exp $
+ * $Id: input_ext-intf.c,v 1.19 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
break;
default:
+ break;
}
vlc_cond_signal( &p_input->stream.stream_wait );
* input_netlist.c: netlist management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: input_netlist.c,v 1.32 2001/03/10 11:23:10 henri Exp $
+ * $Id: input_netlist.c,v 1.33 2001/04/06 09:15:47 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org>
*
#include "defs.h"
#include <stdlib.h>
+#include <string.h> /* memcpy(), memset() */
#include <sys/types.h>
#include <sys/uio.h> /* struct iovec */
#include <unistd.h>
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_programs.c,v 1.43 2001/04/03 03:39:41 stef Exp $
+ * $Id: input_programs.c,v 1.44 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include "defs.h"
#include <stdlib.h>
+#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: mpeg_system.c,v 1.46 2001/04/05 14:00:28 asmax Exp $
+ * $Id: mpeg_system.c,v 1.47 2001/04/06 09:15:47 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
#include "defs.h"
#include <stdlib.h>
+#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
* More informations about parameters stand in `list of commands' section.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_ctrl.c,v 1.34 2001/03/21 13:42:34 sam Exp $
+ * $Id: intf_ctrl.c,v 1.35 2001/04/06 09:15:47 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
#include <sys/stat.h> /* on BSD, fstat() needs stat.h */
#include <stdio.h> /* fprintf() */
+#include <string.h> /* strcmp() */
#include <stdlib.h> /* malloc(), free() */
#include <unistd.h> /* close(), read() */
#include <fcntl.h> /* open() */
/* URL-decode a file: URL path, return NULL if it's not what we expect */
void urldecode_path(char *encoded_path)
{
- char *tmp = NULL, *cur = NULL, *ext = NULL;
- int realchar;
+ char *tmp = NULL, *cur = NULL, *ext = NULL;
+ int realchar;
- if (!encoded_path || *encoded_path == '\0' )
+ if (!encoded_path || *encoded_path == '\0' )
return;
cur = encoded_path ;
- tmp = calloc(strlen(encoded_path) + 1, sizeof(char) );
+ tmp = calloc(strlen(encoded_path) + 1, sizeof(char) );
- while ( ( ext = strchr(cur, '%') ) != NULL)
- {
- strncat(tmp, cur, (ext - cur) / sizeof(char));
- ext++;
-
+ while ( ( ext = strchr(cur, '%') ) != NULL)
+ {
+ strncat(tmp, cur, (ext - cur) / sizeof(char));
+ ext++;
+
if (!sscanf(ext, "%2x", &realchar))
- {
- free(tmp);
- return;
- }
-
+ {
+ free(tmp);
+ return;
+ }
+
tmp[strlen(tmp)] = (char)realchar;
- cur = ext + 2;
- }
- strcat(tmp, cur);
+ cur = ext + 2;
+ }
+ strcat(tmp, cur);
strcpy(encoded_path,tmp);
}
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: main.c,v 1.81 2001/04/05 03:50:38 sam Exp $
+ * $Id: main.c,v 1.82 2001/04/06 09:15:47 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
Version();
return( -1 );
break;
- case 'v': /* -v, --verbose */
+ case 'v': /* -v, --verbose */
p_main->i_warning_level--;
- break;
+ break;
/* Interface warning messages level */
- case 'I': /* -I, --intf */
+ case 'I': /* -I, --intf */
main_PutPszVariable( INTF_METHOD_VAR, optarg );
break;
case OPT_WARNING: /* --warning */
: "cc" ); \
/* test for a 486 CPU */
- asm volatile ( "pushfl
- popl %%eax
- movl %%eax, %%ebx
- xorl $0x200000, %%eax
- pushl %%eax
- popfl
- pushfl
- popl %%eax"
+ asm volatile ( "pushfl\n\t"
+ "popl %%eax\n\t"
+ "movl %%eax, %%ebx\n\t"
+ "xorl $0x200000, %%eax\n\t"
+ "pushl %%eax\n\t"
+ "popfl\n\t"
+ "pushfl\n\t"
+ "popl %%eax"
: "=a" ( i_eax ),
"=b" ( i_ebx )
:
* lpcm_decoder.c: core lpcm decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: lpcm_decoder.c,v 1.6 2001/03/21 13:42:34 sam Exp $
+ * $Id: lpcm_decoder.c,v 1.7 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-#include <stdio.h>
#include "defs.h"
+#include <stdio.h>
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* lpcm_decoder_thread.c: lpcm decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: lpcm_decoder_thread.c,v 1.12 2001/04/02 23:30:41 sam Exp $
+ * $Id: lpcm_decoder_thread.c,v 1.13 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include <unistd.h> /* getpid() */
#include <stdio.h> /* "intf_msg.h" */
+#include <string.h> /* memcpy(), memset() */
#include <stdlib.h> /* malloc(), free() */
#include "config.h"
vlc_mutex_unlock (&p_lpcmdec->p_aout_fifo->data_lock);
intf_DbgMsg( "LPCM Debug: %x", *buffer );
- bad_frame:
+
+ bad_frame:
+ continue;
}
/* If b_error is set, the lpcm decoder thread enters the error loop */
* Functions are prototyped in tests.h.
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: tests.c,v 1.5 2001/03/21 13:42:34 sam Exp $
+ * $Id: tests.c,v 1.6 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: spu_decoder.c,v 1.34 2001/03/21 13:42:34 sam Exp $
+ * $Id: spu_decoder.c,v 1.35 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
*****************************************************************************/
#include "defs.h"
-#include <stdlib.h> /* malloc(), free() */
#include <unistd.h> /* getpid() */
+#include <stdlib.h> /* malloc(), free() */
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* video_decoder.c : video decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_decoder.c,v 1.47 2001/02/19 19:08:59 massiot Exp $
+ * $Id: video_decoder.c,v 1.48 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Gaël Hendryckx <jimmy@via.ecp.fr>
*****************************************************************************/
#include "defs.h"
-#include <stdlib.h> /* free() */
#include <unistd.h> /* getpid() */
+
+#include <stdlib.h> /* free() */
+#include <string.h> /* memcpy(), memset() */
#include <errno.h> /* errno */
#include "config.h"
}
#else
static __inline__ void AddBlock( vdec_thread_t * p_vdec, dctelem_t * p_block,
- yuv_data_t * p_data, int i_incr )
+ yuv_data_t * p_data, int i_incr )
{
- asm __volatile__ (
+ asm __volatile__ (
"pxor %%mm7,%%mm7\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw (%1),%%mm2\n\t"
- "paddw 8(%1),%%mm1\n\t"
+ "paddw (%2),%%mm2\n\t"
+ "paddw 8(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 16(%1),%%mm2\n\t"
- "paddw 24(%1),%%mm1\n\t"
+ "paddw 16(%2),%%mm2\n\t"
+ "paddw 24(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 32(%1),%%mm2\n\t"
- "paddw 40(%1),%%mm1\n\t"
+ "paddw 32(%2),%%mm2\n\t"
+ "paddw 40(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 48(%1),%%mm2\n\t"
- "paddw 56(%1),%%mm1\n\t"
+ "paddw 48(%2),%%mm2\n\t"
+ "paddw 56(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 64(%1),%%mm2\n\t"
- "paddw 72(%1),%%mm1\n\t"
+ "paddw 64(%2),%%mm2\n\t"
+ "paddw 72(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 80(%1),%%mm2\n\t"
- "paddw 88(%1),%%mm1\n\t"
+ "paddw 80(%2),%%mm2\n\t"
+ "paddw 88(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 96(%1),%%mm2\n\t"
- "paddw 104(%1),%%mm1\n\t"
+ "paddw 96(%2),%%mm2\n\t"
+ "paddw 104(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
"movq (%0),%%mm1\n\t"
"movq %%mm1,%%mm2\n\t"
"punpckhbw %%mm7,%%mm1\n\t"
"punpcklbw %%mm7,%%mm2\n\t"
- "paddw 112(%1),%%mm2\n\t"
- "paddw 120(%1),%%mm1\n\t"
+ "paddw 112(%2),%%mm2\n\t"
+ "paddw 120(%2),%%mm1\n\t"
"packuswb %%mm1,%%mm2\n\t"
"movq %%mm2,(%0)\n\t"
//"emms"
- :"+r" (p_data): "r" (p_block),"r" (i_incr+8));
+ : "=r" (p_data)
+ : "0" (p_data), "r" (p_block), "r" (i_incr + 8) );
}
#endif
}
#else
static __inline__ void CopyBlock( vdec_thread_t * p_vdec, dctelem_t * p_block,
- yuv_data_t * p_data, int i_incr )
+ yuv_data_t * p_data, int i_incr )
{
asm __volatile__ (
- "movq (%1),%%mm0\n\t"
- "packuswb 8(%1),%%mm0\n\t"
+ "movq (%2),%%mm0\n\t"
+ "packuswb 8(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 16(%1),%%mm0\n\t"
- "packuswb 24(%1),%%mm0\n\t"
+ "movq 16(%2),%%mm0\n\t"
+ "packuswb 24(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 32(%1),%%mm0\n\t"
- "packuswb 40(%1),%%mm0\n\t"
+ "movq 32(%2),%%mm0\n\t"
+ "packuswb 40(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 48(%1),%%mm0\n\t"
- "packuswb 56(%1),%%mm0\n\t"
+ "movq 48(%2),%%mm0\n\t"
+ "packuswb 56(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 64(%1),%%mm0\n\t"
- "packuswb 72(%1),%%mm0\n\t"
+ "movq 64(%2),%%mm0\n\t"
+ "packuswb 72(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 80(%1),%%mm0\n\t"
- "packuswb 88(%1),%%mm0\n\t"
+ "movq 80(%2),%%mm0\n\t"
+ "packuswb 88(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 96(%1),%%mm0\n\t"
- "packuswb 104(%1),%%mm0\n\t"
+ "movq 96(%2),%%mm0\n\t"
+ "packuswb 104(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
- "addl %2,%0\n\t"
+ "addl %3,%0\n\t"
- "movq 112(%1),%%mm0\n\t"
- "packuswb 120(%1),%%mm0\n\t"
+ "movq 112(%2),%%mm0\n\t"
+ "packuswb 120(%2),%%mm0\n\t"
"movq %%mm0,(%0)\n\t"
+
//"emms"
- :"+r" (p_data): "r" (p_block),"r" (i_incr+8));
+ : "=r" (p_data)
+ : "0" (p_data), "r" (p_block), "r" (i_incr + 8) );
}
#endif
* video_spu.c : DVD subpicture units functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_spu.c,v 1.19 2001/03/21 13:42:35 sam Exp $
+ * $Id: video_spu.c,v 1.20 2001/04/06 09:15:48 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#include "defs.h"
#include <stdio.h>
+#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
}
}
}
- else
+ else
{
i_yreal = i_bytes_per_line * i_ytmp;
i_ynext = i_bytes_per_line * i_y >> 6;
* video_fifo.c : video FIFO management
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_fifo.c,v 1.29 2001/02/11 01:15:12 sam Exp $
+ * $Id: video_fifo.c,v 1.30 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"
* vpar_headers.c : headers parsing
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_headers.c,v 1.80 2001/03/02 13:20:29 massiot Exp $
+ * $Id: vpar_headers.c,v 1.81 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
#include "defs.h"
#include <stdlib.h> /* free() */
+#include <string.h> /* memcpy(), memset() */
#include "config.h"
#include "common.h"
break;
default:
+ break;
}
}
CopyrightExtension( p_vpar );
break;
default:
+ break;
}
break;
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_synchro.c,v 1.86 2001/02/23 13:22:58 massiot Exp $
+ * $Id: vpar_synchro.c,v 1.87 2001/04/06 09:15:48 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
*****************************************************************************/
#include "defs.h"
+#include <string.h> /* memcpy(), memset() */
+
#include "config.h"
#include "common.h"
#include "threads.h"