diff --git a/bundle/Makefile.am b/bundle/Makefile.am deleted file mode 100644 index bab2301c8a..0000000000 --- a/bundle/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -if !WITHOUT_FFMPEG -if !SYSTEM_FFMPEG -all-local: - cd ffmpeg && $(MAKE) -if WINDOWS - cp ffmpeg/*/*.dll .. -endif -endif - -del-dlls: -if WINDOWS - rm -f ../*.dll -endif - -install: - cd ffmpeg && $(MAKE) install-libs - -uninstall: - cd ffmpeg && $(MAKE) uninstall-libs - -clean-local: del-dlls - cd ffmpeg && $(MAKE) clean - -distclean-local: del-dlls - cd ffmpeg && $(MAKE) distclean -endif - diff --git a/bundle/ffmpeg/COPYING.GPLv2 b/bundle/ffmpeg/COPYING.GPLv2 deleted file mode 100644 index d159169d10..0000000000 --- a/bundle/ffmpeg/COPYING.GPLv2 +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -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. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -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 Program, 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 Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) 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; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, 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 executable. However, as a -special exception, the source code 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. - -If distribution of executable or 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 counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program 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. - - 5. 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 Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program 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 to -this License. - - 7. 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 Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program 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 Program. - -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. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program 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. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 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 Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, 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 - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. 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 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. - - 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 -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. - - - Copyright (C) - - 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 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, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This 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. diff --git a/bundle/ffmpeg/COPYING.GPLv3 b/bundle/ffmpeg/COPYING.GPLv3 deleted file mode 100644 index 94a9ed024d..0000000000 --- a/bundle/ffmpeg/COPYING.GPLv3 +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - 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. - - - Copyright (C) - - 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 . - -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: - - Copyright (C) - 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 -. - - 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 -. diff --git a/bundle/ffmpeg/COPYING.LGPLv2.1 b/bundle/ffmpeg/COPYING.LGPLv2.1 deleted file mode 100644 index 58af0d3787..0000000000 --- a/bundle/ffmpeg/COPYING.LGPLv2.1 +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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. - - 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 - - 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. - - - Copyright (C) - - 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.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/bundle/ffmpeg/COPYING.LGPLv3 b/bundle/ffmpeg/COPYING.LGPLv3 deleted file mode 100644 index 65c5ca88a6..0000000000 --- a/bundle/ffmpeg/COPYING.LGPLv3 +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - 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. diff --git a/bundle/ffmpeg/CREDITS b/bundle/ffmpeg/CREDITS deleted file mode 100644 index e29f0b853c..0000000000 --- a/bundle/ffmpeg/CREDITS +++ /dev/null @@ -1,6 +0,0 @@ -See the Git history of the project (git://source.ffmpeg.org/ffmpeg) to -get the names of people who have contributed to FFmpeg. - -To check the log, you can type the command "git log" in the FFmpeg -source directory, or browse the online repository at -http://source.ffmpeg.org. diff --git a/bundle/ffmpeg/Changelog b/bundle/ffmpeg/Changelog deleted file mode 100644 index 72f79d33f9..0000000000 --- a/bundle/ffmpeg/Changelog +++ /dev/null @@ -1,1198 +0,0 @@ -Entries are sorted chronologically from oldest to youngest within each release, -releases are sorted from youngest to oldest. - -version - - -version 2.1: - -- aecho filter -- perspective filter ported from libmpcodecs -- ffprobe -show_programs option -- compand filter -- RTMP seek support -- when transcoding with ffmpeg (i.e. not streamcopying), -ss is now accurate - even when used as an input option. Previous behavior can be restored with - the -noaccurate_seek option. -- ffmpeg -t option can now be used for inputs, to limit the duration of - data read from an input file -- incomplete Voxware MetaSound decoder -- read EXIF metadata from JPEG -- DVB teletext decoder -- phase filter ported from libmpcodecs -- w3fdif filter -- Opus support in Matroska -- FFV1 version 1.3 is stable and no longer experimental -- FFV1: YUVA(444,422,420) 9, 10 and 16 bit support -- changed DTS stream id in lavf mpeg ps muxer from 0x8a to 0x88, to be - more consistent with other muxers. -- adelay filter -- pullup filter ported from libmpcodecs -- ffprobe -read_intervals option -- Lossless and alpha support for WebP decoder -- Error Resilient AAC syntax (ER AAC LC) decoding -- Low Delay AAC (ER AAC LD) decoding -- mux chapters in ASF files -- SFTP protocol (via libssh) -- libx264: add ability to encode in YUVJ422P and YUVJ444P -- Fraps: use BT.709 colorspace by default for yuv, as reference fraps decoder does -- make decoding alpha optional for prores, ffv1 and vp6 by setting - the skip_alpha flag. -- ladspa wrapper filter -- native VP9 decoder -- dpx parser -- max_error_rate parameter in ffmpeg -- PulseAudio output device -- ReplayGain scanner -- Enhanced Low Delay AAC (ER AAC ELD) decoding (no LD SBR support) -- Linux framebuffer output device -- HEVC decoder, raw HEVC demuxer, HEVC demuxing in TS, Matroska and MP4 -- mergeplanes filter - - -version 2.0: - -- curves filter -- reference-counting for AVFrame and AVPacket data -- ffmpeg now fails when input options are used for output file - or vice versa -- support for Monkey's Audio versions from 3.93 -- perms and aperms filters -- audio filtering support in ffplay -- 10% faster aac encoding on x86 and MIPS -- sine audio filter source -- WebP demuxing and decoding support -- new ffmpeg options -filter_script and -filter_complex_script, which allow a - filtergraph description to be read from a file -- OpenCL support -- audio phaser filter -- separatefields filter -- libquvi demuxer -- uniform options syntax across all filters -- telecine filter -- new interlace filter -- smptehdbars source -- inverse telecine filters (fieldmatch and decimate) -- colorbalance filter -- colorchannelmixer filter -- The matroska demuxer can now output proper verbatim ASS packets. It will - become the default at the next libavformat major bump. -- decent native animated GIF encoding -- asetrate filter -- interleave filter -- timeline editing with filters -- vidstabdetect and vidstabtransform filters for video stabilization using - the vid.stab library -- astats filter -- trim and atrim filters -- ffmpeg -t and -ss (output-only) options are now sample-accurate when - transcoding audio -- Matroska muxer can now put the index at the beginning of the file. -- extractplanes filter -- avectorscope filter -- ADPCM DTK decoder -- ADP demuxer -- RSD demuxer -- RedSpark demuxer -- ADPCM IMA Radical decoder -- zmq filters -- DCT denoiser filter (dctdnoiz) -- Wavelet denoiser filter ported from libmpcodecs as owdenoise (formerly "ow") -- Apple Intermediate Codec decoder -- Escape 130 video decoder -- FTP protocol support -- V4L2 output device -- 3D LUT filter (lut3d) -- SMPTE 302M audio encoder -- support for slice multithreading in libavfilter -- Hald CLUT support (generation and filtering) -- VC-1 interlaced B-frame support -- support for WavPack muxing (raw and in Matroska) -- XVideo output device -- vignette filter -- True Audio (TTA) encoder -- Go2Webinar decoder -- mcdeint filter ported from libmpcodecs -- sab filter ported from libmpcodecs -- ffprobe -show_chapters option -- WavPack encoding through libwavpack -- rotate filter -- spp filter ported from libmpcodecs -- libgme support -- psnr filter - - -version 1.2: - -- VDPAU hardware acceleration through normal hwaccel -- SRTP support -- Error diffusion dither in Swscale -- Chained Ogg support -- Theora Midstream reconfiguration support -- EVRC decoder -- audio fade filter -- filtering audio with unknown channel layout -- allpass, bass, bandpass, bandreject, biquad, equalizer, highpass, lowpass - and treble audio filter -- improved showspectrum filter, with multichannel support and sox-like colors -- histogram filter -- tee muxer -- il filter ported from libmpcodecs -- support ID3v2 tags in ASF files -- encrypted TTA stream decoding support -- RF64 support in WAV muxer -- noise filter ported from libmpcodecs -- Subtitles character encoding conversion -- blend filter -- stereo3d filter ported from libmpcodecs - - -version 1.1: - -- stream disposition information printing in ffprobe -- filter for loudness analysis following EBU R128 -- Opus encoder using libopus -- ffprobe -select_streams option -- Pinnacle TARGA CineWave YUV16 decoder -- TAK demuxer, decoder and parser -- DTS-HD demuxer -- remove -same_quant, it hasn't worked for years -- FFM2 support -- X-Face image encoder and decoder -- 24-bit FLAC encoding -- multi-channel ALAC encoding up to 7.1 -- metadata (INFO tag) support in WAV muxer -- subtitles raw text decoder -- support for building DLLs using MSVC -- LVF demuxer -- ffescape tool -- metadata (info chunk) support in CAF muxer -- field filter ported from libmpcodecs -- AVR demuxer -- geq filter ported from libmpcodecs -- remove ffserver daemon mode -- AST muxer/demuxer -- new expansion syntax for drawtext -- BRender PIX image decoder -- ffprobe -show_entries option -- ffprobe -sections option -- ADPCM IMA Dialogic decoder -- BRSTM demuxer -- animated GIF decoder and demuxer -- PVF demuxer -- subtitles filter -- IRCAM muxer/demuxer -- Paris Audio File demuxer -- Virtual concatenation demuxer -- VobSub demuxer -- JSON captions for TED talks decoding support -- SOX Resampler support in libswresample -- aselect filter -- SGI RLE 8-bit decoder -- Silicon Graphics Motion Video Compressor 1 & 2 decoder -- Silicon Graphics Movie demuxer -- apad filter -- Resolution & pixel format change support with multithreading for H.264 -- documentation split into per-component manuals -- pp (postproc) filter ported from MPlayer -- NIST Sphere demuxer -- MPL2, VPlayer, MPlayer, AQTitle, PJS and SubViewer v1 subtitles demuxers and decoders -- Sony Wave64 muxer -- adobe and limelight publisher authentication in RTMP -- data: URI scheme -- support building on the Plan 9 operating system -- kerndeint filter ported from MPlayer -- histeq filter ported from VirtualDub -- Megalux Frame demuxer -- 012v decoder -- Improved AVC Intra decoding support - - -version 1.0: - -- INI and flat output in ffprobe -- Scene detection in libavfilter -- Indeo Audio decoder -- channelsplit audio filter -- setnsamples audio filter -- atempo filter -- ffprobe -show_data option -- RTMPT protocol support -- iLBC encoding/decoding via libilbc -- Microsoft Screen 1 decoder -- join audio filter -- audio channel mapping filter -- Microsoft ATC Screen decoder -- RTSP listen mode -- TechSmith Screen Codec 2 decoder -- AAC encoding via libfdk-aac -- Microsoft Expression Encoder Screen decoder -- RTMPS protocol support -- RTMPTS protocol support -- RTMPE protocol support -- RTMPTE protocol support -- showwaves and showspectrum filter -- LucasArts SMUSH playback support -- SAMI, RealText and SubViewer demuxers and decoders -- Heart Of Darkness PAF playback support -- iec61883 device -- asettb filter -- new option: -progress -- 3GPP Timed Text encoder/decoder -- GeoTIFF decoder support -- ffmpeg -(no)stdin option -- Opus decoder using libopus -- caca output device using libcaca -- alphaextract and alphamerge filters -- concat filter -- flite filter -- Canopus Lossless Codec decoder -- bitmap subtitles in filters (experimental and temporary) -- MP2 encoding via TwoLAME -- bmp parser -- smptebars source -- asetpts filter -- hue filter -- ICO muxer -- SubRip encoder and decoder without embedded timing -- edge detection filter -- framestep filter -- ffmpeg -shortest option is now per-output file - -pass and -passlogfile are now per-output stream -- volume measurement filter -- Ut Video encoder -- Microsoft Screen 2 decoder -- smartblur filter ported from MPlayer -- CPiA decoder -- decimate filter ported from MPlayer -- RTP depacketization of JPEG -- Smooth Streaming live segmenter muxer -- F4V muxer -- sendcmd and asendcmd filters -- WebVTT demuxer and decoder (simple tags supported) -- RTP packetization of JPEG -- faststart option in the MOV/MP4 muxer -- support for building with MSVC - - -version 0.11: - -- Fixes: CVE-2012-2772, CVE-2012-2774, CVE-2012-2775, CVE-2012-2776, CVE-2012-2777, - CVE-2012-2779, CVE-2012-2782, CVE-2012-2783, CVE-2012-2784, CVE-2012-2785, - CVE-2012-2786, CVE-2012-2787, CVE-2012-2788, CVE-2012-2789, CVE-2012-2790, - CVE-2012-2791, CVE-2012-2792, CVE-2012-2793, CVE-2012-2794, CVE-2012-2795, - CVE-2012-2796, CVE-2012-2797, CVE-2012-2798, CVE-2012-2799, CVE-2012-2800, - CVE-2012-2801, CVE-2012-2802, CVE-2012-2803, CVE-2012-2804, -- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder -- setfield filter -- CDXL demuxer and decoder -- Apple ProRes encoder -- ffprobe -count_packets and -count_frames options -- Sun Rasterfile Encoder -- ID3v2 attached pictures reading and writing -- WMA Lossless decoder -- bluray protocol -- blackdetect filter -- libutvideo encoder wrapper (--enable-libutvideo) -- swapuv filter -- bbox filter -- XBM encoder and decoder -- RealAudio Lossless decoder -- ZeroCodec decoder -- tile video filter -- Metal Gear Solid: The Twin Snakes demuxer -- OpenEXR image decoder -- removelogo filter -- drop support for ffmpeg without libavfilter -- drawtext video filter: fontconfig support -- ffmpeg -benchmark_all option -- super2xsai filter ported from libmpcodecs -- add libavresample audio conversion library for compatibility -- MicroDVD decoder -- Avid Meridien (AVUI) encoder and decoder -- accept + prefix to -pix_fmt option to disable automatic conversions. -- complete audio filtering in libavfilter and ffmpeg -- add fps filter -- vorbis parser -- png parser -- audio mix filter -- ffv1: support (draft) version 1.3 - - -version 0.10: - -- Fixes: CVE-2011-3929, CVE-2011-3934, CVE-2011-3935, CVE-2011-3936, - CVE-2011-3937, CVE-2011-3940, CVE-2011-3941, CVE-2011-3944, - CVE-2011-3945, CVE-2011-3946, CVE-2011-3947, CVE-2011-3949, - CVE-2011-3950, CVE-2011-3951, CVE-2011-3952 -- v410 Quicktime Uncompressed 4:4:4 10-bit encoder and decoder -- SBaGen (SBG) binaural beats script demuxer -- OpenMG Audio muxer -- Timecode extraction in DV and MOV -- thumbnail video filter -- XML output in ffprobe -- asplit audio filter -- tinterlace video filter -- astreamsync audio filter -- amerge audio filter -- ISMV (Smooth Streaming) muxer -- GSM audio parser -- SMJPEG muxer -- XWD encoder and decoder -- Automatic thread count based on detection number of (available) CPU cores -- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder -- ffprobe -show_error option -- Avid 1:1 10-bit RGB Packer codec -- v308 Quicktime Uncompressed 4:4:4 encoder and decoder -- yuv4 libquicktime packed 4:2:0 encoder and decoder -- ffprobe -show_frames option -- silencedetect audio filter -- ffprobe -show_program_version, -show_library_versions, -show_versions options -- rv34: frame-level multi-threading -- optimized iMDCT transform on x86 using SSE for for mpegaudiodec -- Improved PGS subtitle decoder -- dumpgraph option to lavfi device -- r210 and r10k encoders -- ffwavesynth decoder -- aviocat tool -- ffeval tool - - -version 0.9: - -- openal input device added -- boxblur filter added -- BWF muxer -- Flash Screen Video 2 decoder -- lavfi input device added -- added avconv, which is almost the same for now, except -for a few incompatible changes in the options, which will hopefully make them -easier to use. The changes are: - * The options placement is now strictly enforced! While in theory the - options for ffmpeg should be given in [input options] -i INPUT [output - options] OUTPUT order, in practice it was possible to give output options - before the -i and it mostly worked. Except when it didn't - the behavior was - a bit inconsistent. In avconv, it is not possible to mix input and output - options. All non-global options are reset after an input or output filename. - * All per-file options are now truly per-file - they apply only to the next - input or output file and specifying different values for different files - will now work properly (notably -ss and -t options). - * All per-stream options are now truly per-stream - it is possible to - specify which stream(s) should a given option apply to. See the Stream - specifiers section in the avconv manual for details. - * In ffmpeg some options (like -newvideo/-newaudio/...) are irregular in the - sense that they're specified after the output filename instead of before, - like all other options. In avconv this irregularity is removed, all options - apply to the next input or output file. - * -newvideo/-newaudio/-newsubtitle options were removed. Not only were they - irregular and highly confusing, they were also redundant. In avconv the -map - option will create new streams in the output file and map input streams to - them. E.g. avconv -i INPUT -map 0 OUTPUT will create an output stream for - each stream in the first input file. - * The -map option now has slightly different and more powerful syntax: - + Colons (':') are used to separate file index/stream type/stream index - instead of dots. Comma (',') is used to separate the sync stream instead - of colon.. This is done for consistency with other options. - + It's possible to specify stream type. E.g. -map 0:a:2 creates an - output stream from the third input audio stream. - + Omitting the stream index now maps all the streams of the given type, - not just the first. E.g. -map 0:s creates output streams for all the - subtitle streams in the first input file. - + Since -map can now match multiple streams, negative mappings were - introduced. Negative mappings disable some streams from an already - defined map. E.g. '-map 0 -map -0:a:1' means 'create output streams for - all the stream in the first input file, except for the second audio - stream'. - * There is a new option -c (or -codec) for choosing the decoder/encoder to - use, which allows to precisely specify target stream(s) consistently with - other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0 - libvorbis sets the codec for the first audio stream and -c copy copies all - the streams without reencoding. Old -vcodec/-acodec/-scodec options are now - aliases to -c:v/a/s - * It is now possible to precisely specify which stream should an AVOption - apply to. E.g. -b:v:0 2M sets the bitrate for the first video stream, while - -b:a 128k sets the bitrate for all audio streams. Note that the old -ab 128k - syntax is deprecated and will stop working soon. - * -map_chapters now takes only an input file index and applies to the next - output file. This is consistent with how all the other options work. - * -map_metadata now takes only an input metadata specifier and applies to - the next output file. Output metadata specifier is now part of the option - name, similarly to the AVOptions/map/codec feature above. - * -metadata can now be used to set metadata on streams and chapters, e.g. - -metadata:s:1 language=eng sets the language of the first stream to 'eng'. - This made -vlang/-alang/-slang options redundant, so they were removed. - * -qscale option now uses stream specifiers and applies to all streams, not - just video. I.e. plain -qscale number would now apply to all streams. To get - the old behavior, use -qscale:v. Also there is now a shortcut -q for -qscale - and -aq is now an alias for -q:a. - * -vbsf/-absf/-sbsf options were removed and replaced by a -bsf option which - uses stream specifiers. Use -bsf:v/a/s instead of the old options. - * -itsscale option now uses stream specifiers, so its argument is only the - scale parameter. - * -intra option was removed, use -g 0 for the same effect. - * -psnr option was removed, use -flags +psnr for the same effect. - * -vf option is now an alias to the new -filter option, which uses stream specifiers. - * -vframes/-aframes/-dframes options are now aliases to the new -frames option. - * -vtag/-atag/-stag options are now aliases to the new -tag option. -- XMV demuxer -- LOAS demuxer -- ashowinfo filter added -- Windows Media Image decoder -- amovie source added -- LATM muxer/demuxer -- Speex encoder via libspeex -- JSON output in ffprobe -- WTV muxer -- Optional C++ Support (needed for libstagefright) -- H.264 Decoding on Android via Stagefright -- Prores decoder -- BIN/XBIN/ADF/IDF text file decoder -- aconvert audio filter added -- audio support to lavfi input device added -- libcdio-paranoia input device for audio CD grabbing -- Apple ProRes decoder -- CELT in Ogg demuxing -- G.723.1 demuxer and decoder -- libmodplug support (--enable-libmodplug) -- VC-1 interlaced decoding -- libutvideo wrapper (--enable-libutvideo) -- aevalsrc audio source added -- Ut Video decoder -- Speex encoding via libspeex -- 4:2:2 H.264 decoding support -- 4:2:2 and 4:4:4 H.264 encoding with libx264 -- Pulseaudio input device -- Prores encoder -- Video Decoder Acceleration (VDA) HWAccel module. -- replacement Indeo 3 decoder -- new ffmpeg option: -map_channel -- volume audio filter added -- earwax audio filter added -- libv4l2 support (--enable-libv4l2) -- TLS/SSL and HTTPS protocol support -- AVOptions API rewritten and documented -- most of CODEC_FLAG2_*, some CODEC_FLAG_* and many codec-specific fields in - AVCodecContext deprecated. Codec private options should be used instead. -- Properly working defaults in libx264 wrapper, support for native presets. -- Encrypted OMA files support -- Discworld II BMV decoding support -- VBLE Decoder -- OS X Video Decoder Acceleration (VDA) support -- compact and csv output in ffprobe -- pan audio filter -- IFF Amiga Continuous Bitmap (ACBM) decoder -- ass filter -- CRI ADX audio format muxer and demuxer -- Playstation Portable PMP format demuxer -- Microsoft Windows ICO demuxer -- life source -- PCM format support in OMA demuxer -- CLJR encoder -- new option: -report -- Dxtory capture format decoder -- cellauto source -- Simple segmenting muxer -- Indeo 4 decoder -- SMJPEG demuxer - - -version 0.8: - -- many many things we forgot because we rather write code than changelogs -- WebM support in Matroska de/muxer -- low overhead Ogg muxing -- MMS-TCP support -- VP8 de/encoding via libvpx -- Demuxer for On2's IVF format -- Pictor/PC Paint decoder -- HE-AAC v2 decoder -- HE-AAC v2 encoding with libaacplus -- libfaad2 wrapper removed -- DTS-ES extension (XCh) decoding support -- native VP8 decoder -- RTSP tunneling over HTTP -- RTP depacketization of SVQ3 -- -strict inofficial replaced by -strict unofficial -- ffplay -exitonkeydown and -exitonmousedown options added -- native GSM / GSM MS decoder -- RTP depacketization of QDM2 -- ANSI/ASCII art playback system -- Lego Mindstorms RSO de/muxer -- libavcore added (and subsequently removed) -- SubRip subtitle file muxer and demuxer -- Chinese AVS encoding via libxavs -- ffprobe -show_packets option added -- RTP packetization of Theora and Vorbis -- RTP depacketization of MP4A-LATM -- RTP packetization and depacketization of VP8 -- hflip filter -- Apple HTTP Live Streaming demuxer -- a64 codec -- MMS-HTTP support -- G.722 ADPCM audio encoder/decoder -- R10k video decoder -- ocv_smooth filter -- frei0r wrapper filter -- change crop filter syntax to width:height:x:y -- make the crop filter accept parametric expressions -- make ffprobe accept AVFormatContext options -- yadif filter -- blackframe filter -- Demuxer for Leitch/Harris' VR native stream format (LXF) -- RTP depacketization of the X-QT QuickTime format -- SAP (Session Announcement Protocol, RFC 2974) muxer and demuxer -- cropdetect filter -- ffmpeg -crop* options removed -- transpose filter added -- ffmpeg -force_key_frames option added -- demuxer for receiving raw rtp:// URLs without an SDP description -- single stream LATM/LOAS decoder -- setpts filter added -- Win64 support for optimized x86 assembly functions -- MJPEG/AVI1 to JPEG/JFIF bitstream filter -- ASS subtitle encoder and decoder -- IEC 61937 encapsulation for E-AC-3, TrueHD, DTS-HD (for HDMI passthrough) -- overlay filter added -- rename aspect filter to setdar, and pixelaspect to setsar -- IEC 61937 demuxer -- Mobotix .mxg demuxer -- frei0r source added -- hqdn3d filter added -- RTP depacketization of QCELP -- FLAC parser added -- gradfun filter added -- AMR-WB decoder -- replace the ocv_smooth filter with a more generic ocv filter -- Windows Televison (WTV) demuxer -- FFmpeg metadata format muxer and demuxer -- SubRip (srt) subtitle encoder and decoder -- floating-point AC-3 encoder added -- Lagarith decoder -- ffmpeg -copytb option added -- IVF muxer added -- Wing Commander IV movies decoder added -- movie source added -- Bink version 'b' audio and video decoder -- Bitmap Brothers JV playback system -- Apple HTTP Live Streaming protocol handler -- sndio support for playback and record -- Linux framebuffer input device added -- Chronomaster DFA decoder -- DPX image encoder -- MicroDVD subtitle file muxer and demuxer -- Playstation Portable PMP format demuxer -- fieldorder video filter added -- AAC encoding via libvo-aacenc -- AMR-WB encoding via libvo-amrwbenc -- xWMA demuxer -- Mobotix MxPEG decoder -- VP8 frame-multithreading -- NEON optimizations for VP8 -- Lots of deprecated API cruft removed -- fft and imdct optimizations for AVX (Sandy Bridge) processors -- showinfo filter added -- SMPTE 302M AES3 audio decoder -- Apple Core Audio Format muxer -- 9bit and 10bit per sample support in the H.264 decoder -- 9bit and 10bit FFV1 encoding / decoding -- split filter added -- select filter added -- sdl output device added -- libmpcodecs video filter support (3 times as many filters than before) -- mpeg2 aspect ratio dection fixed -- libxvid aspect pickiness fixed -- Frame multithreaded decoding -- E-AC-3 audio encoder -- ac3enc: add channel coupling support -- floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders. -- H264/MPEG frame-level multi-threading -- All av_metadata_* functions renamed to av_dict_* and moved to libavutil -- 4:4:4 H.264 decoding support -- 10-bit H.264 optimizations for x86 -- lut, lutrgb, and lutyuv filters added -- buffersink libavfilter sink added -- Bump libswscale for recently reported ABI break -- New J2K encoder (via OpenJPEG) - - -version 0.7: - -- all the changes for 0.8, but keeping API/ABI compatibility with the 0.6 release - - -version 0.6: - -- PB-frame decoding for H.263 -- deprecated vhook subsystem removed -- deprecated old scaler removed -- VQF demuxer -- Alpha channel scaler -- PCX encoder -- RTP packetization of H.263 -- RTP packetization of AMR -- RTP depacketization of Vorbis -- CorePNG decoding support -- Cook multichannel decoding support -- introduced avlanguage helpers in libavformat -- 8088flex TMV demuxer and decoder -- per-stream language-tags extraction in asfdec -- V210 decoder and encoder -- remaining GPL parts in AC-3 decoder converted to LGPL -- QCP demuxer -- SoX native format muxer and demuxer -- AMR-NB decoding/encoding, AMR-WB decoding via OpenCORE libraries -- DPX image decoder -- Electronic Arts Madcow decoder -- DivX (XSUB) subtitle encoder -- nonfree libamr support for AMR-NB/WB decoding/encoding removed -- experimental AAC encoder -- RTP depacketization of ASF and RTSP from WMS servers -- RTMP support in libavformat -- noX handling for OPT_BOOL X options -- Wave64 demuxer -- IEC-61937 compatible Muxer -- TwinVQ decoder -- Bluray (PGS) subtitle decoder -- LPCM support in MPEG-TS (HDMV RID as found on Blu-ray disks) -- WMA Pro decoder -- Core Audio Format demuxer -- ATRAC1 decoder -- MD STUDIO audio demuxer -- RF64 support in WAV demuxer -- MPEG-4 Audio Lossless Coding (ALS) decoder -- -formats option split into -formats, -codecs, -bsfs, and -protocols -- IV8 demuxer -- CDG demuxer and decoder -- R210 decoder -- Auravision Aura 1 and 2 decoders -- Deluxe Paint Animation playback system -- SIPR decoder -- Adobe Filmstrip muxer and demuxer -- RTP depacketization of H.263 -- Bink demuxer and audio/video decoders -- enable symbol versioning by default for linkers that support it -- IFF PBM/ILBM bitmap decoder -- concat protocol -- Indeo 5 decoder -- RTP depacketization of AMR -- WMA Voice decoder -- ffprobe tool -- AMR-NB decoder -- RTSP muxer -- HE-AAC v1 decoder -- Kega Game Video (KGV1) decoder -- VorbisComment writing for FLAC, Ogg FLAC and Ogg Speex files -- RTP depacketization of Theora -- HTTP Digest authentication -- RTMP/RTMPT/RTMPS/RTMPE/RTMPTE protocol support via librtmp -- Psygnosis YOP demuxer and video decoder -- spectral extension support in the E-AC-3 decoder -- unsharp video filter -- RTP hinting in the mov/3gp/mp4 muxer -- Dirac in Ogg demuxing -- seek to keyframes in Ogg -- 4:2:2 and 4:4:4 Theora decoding -- 35% faster VP3/Theora decoding -- faster AAC decoding -- faster H.264 decoding -- RealAudio 1.0 (14.4K) encoder - - -version 0.5: - -- DV50 AKA DVCPRO50 encoder, decoder, muxer and demuxer -- TechSmith Camtasia (TSCC) video decoder -- IBM Ultimotion (ULTI) video decoder -- Sierra Online audio file demuxer and decoder -- Apple QuickDraw (qdrw) video decoder -- Creative ADPCM audio decoder (16 bits as well as 8 bits schemes) -- Electronic Arts Multimedia (WVE/UV2/etc.) file demuxer -- Miro VideoXL (VIXL) video decoder -- H.261 video encoder -- QPEG video decoder -- Nullsoft Video (NSV) file demuxer -- Shorten audio decoder -- LOCO video decoder -- Apple Lossless Audio Codec (ALAC) decoder -- Winnov WNV1 video decoder -- Autodesk Animator Studio Codec (AASC) decoder -- Indeo 2 video decoder -- Fraps FPS1 video decoder -- Snow video encoder/decoder -- Sonic audio encoder/decoder -- Vorbis audio decoder -- Macromedia ADPCM decoder -- Duck TrueMotion 2 video decoder -- support for decoding FLX and DTA extensions in FLIC files -- H.264 custom quantization matrices support -- ffserver fixed, it should now be usable again -- QDM2 audio decoder -- Real Cooker audio decoder -- TrueSpeech audio decoder -- WMA2 audio decoder fixed, now all files should play correctly -- RealAudio 14.4 and 28.8 decoders fixed -- JPEG-LS decoder -- build system improvements -- tabs and trailing whitespace removed from the codebase -- CamStudio video decoder -- AIFF/AIFF-C audio format, encoding and decoding -- ADTS AAC file reading and writing -- Creative VOC file reading and writing -- American Laser Games multimedia (*.mm) playback system -- Zip Motion Blocks Video decoder -- improved Theora/VP3 decoder -- True Audio (TTA) decoder -- AVS demuxer and video decoder -- JPEG-LS encoder -- Smacker demuxer and decoder -- NuppelVideo/MythTV demuxer and RTjpeg decoder -- KMVC decoder -- MPEG-2 intra VLC support -- MPEG-2 4:2:2 encoder -- Flash Screen Video decoder -- GXF demuxer -- Chinese AVS decoder -- GXF muxer -- MXF demuxer -- VC-1/WMV3/WMV9 video decoder -- MacIntel support -- AviSynth support -- VMware video decoder -- VP5 video decoder -- VP6 video decoder -- WavPack lossless audio decoder -- Targa (.TGA) picture decoder -- Vorbis audio encoder -- Delphine Software .cin demuxer/audio and video decoder -- Tiertex .seq demuxer/video decoder -- MTV demuxer -- TIFF picture encoder and decoder -- GIF picture decoder -- Intel Music Coder decoder -- Zip Motion Blocks Video encoder -- Musepack decoder -- Flash Screen Video encoder -- Theora encoding via libtheora -- BMP encoder -- WMA encoder -- GSM-MS encoder and decoder -- DCA decoder -- DXA demuxer and decoder -- DNxHD decoder -- Gamecube movie (.THP) playback system -- Blackfin optimizations -- Interplay C93 demuxer and video decoder -- Bethsoft VID demuxer and video decoder -- CRYO APC demuxer -- ATRAC3 decoder -- V.Flash PTX decoder -- RoQ muxer, RoQ audio encoder -- Renderware TXD demuxer and decoder -- extern C declarations for C++ removed from headers -- sws_flags command line option -- codebook generator -- RoQ video encoder -- QTRLE encoder -- OS/2 support removed and restored again -- AC-3 decoder -- NUT muxer -- additional SPARC (VIS) optimizations -- Matroska muxer -- slice-based parallel H.264 decoding -- Monkey's Audio demuxer and decoder -- AMV audio and video decoder -- DNxHD encoder -- H.264 PAFF decoding -- Nellymoser ASAO decoder -- Beam Software SIFF demuxer and decoder -- libvorbis Vorbis decoding removed in favor of native decoder -- IntraX8 (J-Frame) subdecoder for WMV2 and VC-1 -- Ogg (Theora, Vorbis and FLAC) muxer -- The "device" muxers and demuxers are now in a new libavdevice library -- PC Paintbrush PCX decoder -- Sun Rasterfile decoder -- TechnoTrend PVA demuxer -- Linux Media Labs MPEG-4 (LMLM4) demuxer -- AVM2 (Flash 9) SWF muxer -- QT variant of IMA ADPCM encoder -- VFW grabber -- iPod/iPhone compatible mp4 muxer -- Mimic decoder -- MSN TCP Webcam stream demuxer -- RL2 demuxer / decoder -- IFF demuxer -- 8SVX audio decoder -- non-recursive Makefiles -- BFI demuxer -- MAXIS EA XA (.xa) demuxer / decoder -- BFI video decoder -- OMA demuxer -- MLP/TrueHD decoder -- Electronic Arts CMV decoder -- Motion Pixels Video decoder -- Motion Pixels MVI demuxer -- removed animated GIF decoder/demuxer -- D-Cinema audio muxer -- Electronic Arts TGV decoder -- Apple Lossless Audio Codec (ALAC) encoder -- AAC decoder -- floating point PCM encoder/decoder -- MXF muxer -- DV100 AKA DVCPRO HD decoder and demuxer -- E-AC-3 support added to AC-3 decoder -- Nellymoser ASAO encoder -- ASS and SSA demuxer and muxer -- liba52 wrapper removed -- SVQ3 watermark decoding support -- Speex decoding via libspeex -- Electronic Arts TGQ decoder -- RV40 decoder -- QCELP / PureVoice decoder -- RV30 decoder -- hybrid WavPack support -- R3D REDCODE demuxer -- ALSA support for playback and record -- Electronic Arts TQI decoder -- OpenJPEG based JPEG 2000 decoder -- NC (NC4600) camera file demuxer -- Gopher client support -- MXF D-10 muxer -- generic metadata API -- flash ScreenVideo2 encoder - - -version 0.4.9-pre1: - -- DV encoder, DV muxer -- Microsoft RLE video decoder -- Microsoft Video-1 decoder -- Apple Animation (RLE) decoder -- Apple Graphics (SMC) decoder -- Apple Video (RPZA) decoder -- Cinepak decoder -- Sega FILM (CPK) file demuxer -- Westwood multimedia support (VQA & AUD files) -- Id Quake II CIN playback support -- 8BPS video decoder -- FLIC playback support -- RealVideo 2.0 (RV20) decoder -- Duck TrueMotion v1 (DUCK) video decoder -- Sierra VMD demuxer and video decoder -- MSZH and ZLIB decoder support -- SVQ1 video encoder -- AMR-WB support -- PPC optimizations -- rate distortion optimal cbp support -- rate distorted optimal ac prediction for MPEG-4 -- rate distorted optimal lambda->qp support -- AAC encoding with libfaac -- Sunplus JPEG codec (SP5X) support -- use Lagrange multipler instead of QP for ratecontrol -- Theora/VP3 decoding support -- XA and ADX ADPCM codecs -- export MPEG-2 active display area / pan scan -- Add support for configuring with IBM XLC -- floating point AAN DCT -- initial support for zygo video (not complete) -- RGB ffv1 support -- new audio/video parser API -- av_log() system -- av_read_frame() and av_seek_frame() support -- missing last frame fixes -- seek by mouse in ffplay -- noise reduction of DCT coefficients -- H.263 OBMC & 4MV support -- H.263 alternative inter vlc support -- H.263 loop filter -- H.263 slice structured mode -- interlaced DCT support for MPEG-2 encoding -- stuffing to stay above min_bitrate -- MB type & QP visualization -- frame stepping for ffplay -- interlaced motion estimation -- alternate scantable support -- SVCD scan offset support -- closed GOP support -- SSE2 FDCT -- quantizer noise shaping -- G.726 ADPCM audio codec -- MS ADPCM encoding -- multithreaded/SMP motion estimation -- multithreaded/SMP encoding for MPEG-1/MPEG-2/MPEG-4/H.263 -- multithreaded/SMP decoding for MPEG-2 -- FLAC decoder -- Metrowerks CodeWarrior suppport -- H.263+ custom pcf support -- nicer output for 'ffmpeg -formats' -- Matroska demuxer -- SGI image format, encoding and decoding -- H.264 loop filter support -- H.264 CABAC support -- nicer looking arrows for the motion vector visualization -- improved VCD support -- audio timestamp drift compensation -- MPEG-2 YUV 422/444 support -- polyphase kaiser windowed sinc and blackman nuttall windowed sinc audio resample -- better image scaling -- H.261 support -- correctly interleave packets during encoding -- VIS optimized motion compensation -- intra_dc_precision>0 encoding support -- support reuse of motion vectors/MB types/field select values of the source video -- more accurate deblock filter -- padding support -- many optimizations and bugfixes -- FunCom ISS audio file demuxer and according ADPCM decoding - - -version 0.4.8: - -- MPEG-2 video encoding (Michael) -- Id RoQ playback subsystem (Mike Melanson and Tim Ferguson) -- Wing Commander III Movie (.mve) file playback subsystem (Mike Melanson - and Mario Brito) -- Xan DPCM audio decoder (Mario Brito) -- Interplay MVE playback subsystem (Mike Melanson) -- Duck DK3 and DK4 ADPCM audio decoders (Mike Melanson) - - -version 0.4.7: - -- RealAudio 1.0 (14_4) and 2.0 (28_8) native decoders. Author unknown, code from mplayerhq - (originally from public domain player for Amiga at http://www.honeypot.net/audio) -- current version now also compiles with older GCC (Fabrice) -- 4X multimedia playback system including 4xm file demuxer (Mike - Melanson), and 4X video and audio codecs (Michael) -- Creative YUV (CYUV) decoder (Mike Melanson) -- FFV1 codec (our very simple lossless intra only codec, compresses much better - than HuffYUV) (Michael) -- ASV1 (Asus), H.264, Intel indeo3 codecs have been added (various) -- tiny PNG encoder and decoder, tiny GIF decoder, PAM decoder (PPM with - alpha support), JPEG YUV colorspace support. (Fabrice Bellard) -- ffplay has been replaced with a newer version which uses SDL (optionally) - for multiplatform support (Fabrice) -- Sorenson Version 3 codec (SVQ3) support has been added (decoding only) - donated - by anonymous -- AMR format has been added (Johannes Carlsson) -- 3GP support has been added (Johannes Carlsson) -- VP3 codec has been added (Mike Melanson) -- more MPEG-1/2 fixes -- better multiplatform support, MS Visual Studio fixes (various) -- AltiVec optimizations (Magnus Damn and others) -- SH4 processor support has been added (BERO) -- new public interfaces (avcodec_get_pix_fmt) (Roman Shaposhnick) -- VOB streaming support (Brian Foley) -- better MP3 autodetection (Andriy Rysin) -- qpel encoding (Michael) -- 4mv+b frames encoding finally fixed (Michael) -- chroma ME (Michael) -- 5 comparison functions for ME (Michael) -- B-frame encoding speedup (Michael) -- WMV2 codec (unfinished - Michael) -- user specified diamond size for EPZS (Michael) -- Playstation STR playback subsystem, still experimental (Mike and Michael) -- ASV2 codec (Michael) -- CLJR decoder (Alex) - -.. And lots more new enhancements and fixes. - - -version 0.4.6: - -- completely new integer only MPEG audio layer 1/2/3 decoder rewritten - from scratch -- Recoded DCT and motion vector search with gcc (no longer depends on nasm) -- fix quantization bug in AC3 encoder -- added PCM codecs and format. Corrected WAV/AVI/ASF PCM issues -- added prototype ffplay program -- added GOB header parsing on H.263/H.263+ decoder (Juanjo) -- bug fix on MCBPC tables of H.263 (Juanjo) -- bug fix on DC coefficients of H.263 (Juanjo) -- added Advanced Prediction Mode on H.263/H.263+ decoder (Juanjo) -- now we can decode H.263 streams found in QuickTime files (Juanjo) -- now we can decode H.263 streams found in VIVO v1 files(Juanjo) -- preliminary RTP "friendly" mode for H.263/H.263+ coding. (Juanjo) -- added GOB header for H.263/H.263+ coding on RTP mode (Juanjo) -- now H.263 picture size is returned on the first decoded frame (Juanjo) -- added first regression tests -- added MPEG-2 TS demuxer -- new demux API for libav -- more accurate and faster IDCT (Michael) -- faster and entropy-controlled motion search (Michael) -- two pass video encoding (Michael) -- new video rate control (Michael) -- added MSMPEG4V1, MSMPEGV2 and WMV1 support (Michael) -- great performance improvement of video encoders and decoders (Michael) -- new and faster bit readers and vlc parsers (Michael) -- high quality encoding mode: tries all macroblock/VLC types (Michael) -- added DV video decoder -- preliminary RTP/RTSP support in ffserver and libavformat -- H.263+ AIC decoding/encoding support (Juanjo) -- VCD MPEG-PS mode (Juanjo) -- PSNR stuff (Juanjo) -- simple stats output (Juanjo) -- 16-bit and 15-bit RGB/BGR/GBR support (Bisqwit) - - -version 0.4.5: - -- some header fixes (Zdenek Kabelac ) -- many MMX optimizations (Nick Kurshev ) -- added configure system (actually a small shell script) -- added MPEG audio layer 1/2/3 decoding using LGPL'ed mpglib by - Michael Hipp (temporary solution - waiting for integer only - decoder) -- fixed VIDIOCSYNC interrupt -- added Intel H.263 decoding support ('I263' AVI fourCC) -- added Real Video 1.0 decoding (needs further testing) -- simplified image formats again. Added PGM format (=grey - pgm). Renamed old PGM to PGMYUV. -- fixed msmpeg4 slice issues (tell me if you still find problems) -- fixed OpenDivX bugs with newer versions (added VOL header decoding) -- added support for MPlayer interface -- added macroblock skip optimization -- added MJPEG decoder -- added mmx/mmxext IDCT from libmpeg2 -- added pgmyuvpipe, ppm, and ppm_pipe formats (original patch by Celer - ) -- added pixel format conversion layer (e.g. for MJPEG or PPM) -- added deinterlacing option -- MPEG-1/2 fixes -- MPEG-4 vol header fixes (Jonathan Marsden ) -- ARM optimizations (Lionel Ulmer ). -- Windows porting of file converter -- added MJPEG raw format (input/output) -- added JPEG image format support (input/output) - - -version 0.4.4: - -- fixed some std header definitions (Bjorn Lindgren - ). -- added MPEG demuxer (MPEG-1 and 2 compatible). -- added ASF demuxer -- added prototype RM demuxer -- added AC3 decoding (done with libac3 by Aaron Holtzman) -- added decoding codec parameter guessing (.e.g. for MPEG, because the - header does not include them) -- fixed header generation in MPEG-1, AVI and ASF muxer: wmplayer can now - play them (only tested video) -- fixed H.263 white bug -- fixed phase rounding in img resample filter -- add MMX code for polyphase img resample filter -- added CPU autodetection -- added generic title/author/copyright/comment string handling (ASF and RM - use them) -- added SWF demux to extract MP3 track (not usable yet because no MP3 - decoder) -- added fractional frame rate support -- codecs are no longer searched by read_header() (should fix ffserver - segfault) - - -version 0.4.3: - -- BGR24 patch (initial patch by Jeroen Vreeken ) -- fixed raw yuv output -- added motion rounding support in MPEG-4 -- fixed motion bug rounding in MSMPEG4 -- added B-frame handling in video core -- added full MPEG-1 decoding support -- added partial (frame only) MPEG-2 support -- changed the FOURCC code for H.263 to "U263" to be able to see the - +AVI/H.263 file with the UB Video H.263+ decoder. MPlayer works with - this +codec ;) (JuanJo). -- Halfpel motion estimation after MB type selection (JuanJo) -- added pgm and .Y.U.V output format -- suppressed 'img:' protocol. Simply use: /tmp/test%d.[pgm|Y] as input or - output. -- added pgmpipe I/O format (original patch from Martin Aumueller - , but changed completely since we use a format - instead of a protocol) - - -version 0.4.2: - -- added H.263/MPEG-4/MSMPEG4 decoding support. MPEG-4 decoding support - (for OpenDivX) is almost complete: 8x8 MVs and rounding are - missing. MSMPEG4 support is complete. -- added prototype MPEG-1 decoder. Only I- and P-frames handled yet (it - can decode ffmpeg MPEGs :-)). -- added libavcodec API documentation (see apiexample.c). -- fixed image polyphase bug (the bottom of some images could be - greenish) -- added support for non clipped motion vectors (decoding only) - and image sizes non-multiple of 16 -- added support for AC prediction (decoding only) -- added file overwrite confirmation (can be disabled with -y) -- added custom size picture to H.263 using H.263+ (Juanjo) - - -version 0.4.1: - -- added MSMPEG4 (aka DivX) compatible encoder. Changed default codec - of AVI and ASF to DIV3. -- added -me option to set motion estimation method - (default=log). suppressed redundant -hq option. -- added options -acodec and -vcodec to force a given codec (useful for - AVI for example) -- fixed -an option -- improved dct_quantize speed -- factorized some motion estimation code - - -version 0.4.0: - -- removing grab code from ffserver and moved it to ffmpeg. Added - multistream support to ffmpeg. -- added timeshifting support for live feeds (option ?date=xxx in the - URL) -- added high quality image resize code with polyphase filter (need - mmx/see optimization). Enable multiple image size support in ffserver. -- added multi live feed support in ffserver -- suppressed master feature from ffserver (it should be done with an - external program which opens the .ffm url and writes it to another - ffserver) -- added preliminary support for video stream parsing (WAV and AVI half - done). Added proper support for audio/video file conversion in - ffmpeg. -- added preliminary support for video file sending from ffserver -- redesigning I/O subsystem: now using URL based input and output - (see avio.h) -- added WAV format support -- added "tty user interface" to ffmpeg to stop grabbing gracefully -- added MMX/SSE optimizations to SAD (Sums of Absolutes Differences) - (Juan J. Sierralta P. a.k.a. "Juanjo" ) -- added MMX DCT from mpeg2_movie 1.5 (Juanjo) -- added new motion estimation algorithms, log and phods (Juanjo) -- changed directories: libav for format handling, libavcodec for - codecs - - -version 0.3.4: - -- added stereo in MPEG audio encoder - - -version 0.3.3: - -- added 'high quality' mode which use motion vectors. It can be used in - real time at low resolution. -- fixed rounding problems which caused quality problems at high - bitrates and large GOP size - - -version 0.3.2: small fixes - -- ASF fixes -- put_seek bug fix - - -version 0.3.1: added avi/divx support - -- added AVI support -- added MPEG-4 codec compatible with OpenDivX. It is based on the H.263 codec -- added sound for flash format (not tested) - - -version 0.3: initial public release diff --git a/bundle/ffmpeg/INSTALL b/bundle/ffmpeg/INSTALL deleted file mode 100644 index 9549346302..0000000000 --- a/bundle/ffmpeg/INSTALL +++ /dev/null @@ -1,15 +0,0 @@ - -1) Type './configure' to create the configuration. A list of configure -options is printed by running 'configure --help'. - -'configure' can be launched from a directory different from the FFmpeg -sources to build the objects out of tree. To do this, use an absolute -path when launching 'configure', e.g. '/ffmpegdir/ffmpeg/configure'. - -2) Then type 'make' to build FFmpeg. GNU Make 3.81 or later is required. - -3) Type 'make install' to install all binaries and libraries you built. - -NOTICE - - - Non system dependencies (e.g. libx264, libvpx) are disabled by default. diff --git a/bundle/ffmpeg/LICENSE b/bundle/ffmpeg/LICENSE deleted file mode 100644 index 1840d69179..0000000000 --- a/bundle/ffmpeg/LICENSE +++ /dev/null @@ -1,103 +0,0 @@ -FFmpeg: - -Most files in FFmpeg are under the GNU Lesser General Public License version 2.1 -or later (LGPL v2.1+). Read the file COPYING.LGPLv2.1 for details. Some other -files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to -FFmpeg. - -Some optional parts of FFmpeg are licensed under the GNU General Public License -version 2 or later (GPL v2+). See the file COPYING.GPLv2 for details. None of -these parts are used by default, you have to explicitly pass --enable-gpl to -configure to activate them. In this case, FFmpeg's license changes to GPL v2+. - -Specifically, the GPL parts of FFmpeg are - -- libpostproc -- libmpcodecs -- optional x86 optimizations in the files - libavcodec/x86/idct_mmx.c -- libutvideo encoding/decoding wrappers in - libavcodec/libutvideo*.cpp -- the X11 grabber in libavdevice/x11grab.c -- the swresample test app in - libswresample/swresample-test.c -- the texi2pod.pl tool -- the following filters in libavfilter: - - f_ebur128.c - - vf_blackframe.c - - vf_boxblur.c - - vf_colormatrix.c - - vf_cropdetect.c - - vf_decimate.c - - vf_delogo.c - - vf_geq.c - - vf_histeq.c - - vf_hqdn3d.c - - vf_kerndeint.c - - vf_mcdeint.c - - vf_mp.c - - vf_owdenoise.c - - vf_perspective.c - - vf_phase.c - - vf_pp.c - - vf_pullup.c - - vf_sab.c - - vf_smartblur.c - - vf_spp.c - - vf_stereo3d.c - - vf_super2xsai.c - - vf_tinterlace.c - - vf_yadif.c - - vsrc_mptestsrc.c - -Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then -the configure parameter --enable-version3 will activate this licensing option -for you. Read the file COPYING.LGPLv3 or, if you have enabled GPL parts, -COPYING.GPLv3 to learn the exact legal terms that apply in this case. - -There are a handful of files under other licensing terms, namely: - -* The files libavcodec/jfdctfst.c, libavcodec/jfdctint_template.c and - libavcodec/jrevdct.c are taken from libjpeg, see the top of the files for - licensing details. Specifically note that you must credit the IJG in the - documentation accompanying your program if you only distribute executables. - You must also indicate any changes including additions and deletions to - those three files in the documentation. - - -external libraries -================== - -FFmpeg can be combined with a number of external libraries, which sometimes -affect the licensing of binaries resulting from the combination. - -compatible libraries --------------------- - -The following libraries are under GPL: - - frei0r - - libcdio - - libutvideo - - libvidstab - - libx264 - - libxavs - - libxvid -When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by -passing --enable-gpl to configure. - -The OpenCORE and VisualOn libraries are under the Apache License 2.0. That -license is incompatible with the LGPL v2.1 and the GPL v2, but not with -version 3 of those licenses. So to combine these libraries with FFmpeg, the -license version needs to be upgraded by passing --enable-version3 to configure. - -incompatible libraries ----------------------- - -The Fraunhofer AAC library, FAAC and aacplus are under licenses which -are incompatible with the GPLv2 and v3. We do not know for certain if their -licenses are compatible with the LGPL. -If you wish to enable these libraries, pass --enable-nonfree to configure. -But note that if you enable any of these libraries the resulting binary will -be under a complex license mix that is more restrictive than the LGPL and that -may result in additional obligations. It is possible that these -restrictions cause the resulting binary to be unredistributeable. diff --git a/bundle/ffmpeg/MAINTAINERS b/bundle/ffmpeg/MAINTAINERS deleted file mode 100644 index a9a55dfe4a..0000000000 --- a/bundle/ffmpeg/MAINTAINERS +++ /dev/null @@ -1,544 +0,0 @@ -FFmpeg maintainers -================== - -Below is a list of the people maintaining different parts of the -FFmpeg code. - -Please try to keep entries where you are the maintainer up to date! - -Names in () mean that the maintainer currently has no time to maintain the code. -A (CC
) after the name means that the maintainer prefers to be CC-ed on -patches and related discussions. - - -Project Leader -============== - -Michael Niedermayer - final design decisions - - -Applications -============ - -ffmpeg: - ffmpeg.c Michael Niedermayer - -ffplay: - ffplay.c Marton Balint - -ffprobe: - ffprobe.c Stefano Sabatini - -ffserver: - ffserver.c, ffserver.h Baptiste Coudurier - -Commandline utility code: - cmdutils.c, cmdutils.h Michael Niedermayer - -QuickTime faststart: - tools/qt-faststart.c Baptiste Coudurier - - -Miscellaneous Areas -=================== - -documentation Stefano Sabatini, Mike Melanson, Timothy Gu -build system (configure,Makefiles) Diego Biurrun, Mans Rullgard -project server ĂrpĂ¡d Gereöffy, Michael Niedermayer, Reimar Döffinger, Alexander Strasser -presets Robert Swain -metadata subsystem Aurelien Jacobs -release management Michael Niedermayer - - -Communication -============= - -website Robert Swain, Lou Logan -mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan -Google+ Paul B Mahol, Michael Niedermayer, Alexander Strasser -Twitter Lou Logan -Launchpad Timothy Gu - - -libavutil -========= - -External Interfaces: - libavutil/avutil.h Michael Niedermayer -Internal Interfaces: - libavutil/common.h Michael Niedermayer - -Other: - bprint Nicolas George - bswap.h - des Reimar Doeffinger - eval.c, eval.h Michael Niedermayer - float_dsp Loren Merritt - hash Reimar Doeffinger - intfloat* Michael Niedermayer - integer.c, integer.h Michael Niedermayer - lzo Reimar Doeffinger - mathematics.c, mathematics.h Michael Niedermayer - mem.c, mem.h Michael Niedermayer - opencl.c, opencl.h Wei Gao - opt.c, opt.h Michael Niedermayer - rational.c, rational.h Michael Niedermayer - rc4 Reimar Doeffinger - ripemd.c, ripemd.h James Almer - timecode ClĂ©ment BÅ“sch - - -libavcodec -========== - -Generic Parts: - External Interfaces: - avcodec.h Michael Niedermayer - utility code: - utils.c Michael Niedermayer - audio and video frame extraction: - parser.c Michael Niedermayer - bitstream reading: - bitstream.c, bitstream.h Michael Niedermayer - CABAC: - cabac.h, cabac.c Michael Niedermayer - codec names: - codec_names.sh Nicolas George - DSP utilities: - dsputils.c, dsputils.h Michael Niedermayer - entropy coding: - rangecoder.c, rangecoder.h Michael Niedermayer - lzw.* Michael Niedermayer - floating point AAN DCT: - faandct.c, faandct.h Michael Niedermayer - Golomb coding: - golomb.c, golomb.h Michael Niedermayer - LPC: - lpc.c, lpc.h Justin Ruggles - motion estimation: - motion* Michael Niedermayer - rate control: - ratecontrol.c Michael Niedermayer - libxvid_rc.c Michael Niedermayer - simple IDCT: - simple_idct.c, simple_idct.h Michael Niedermayer - postprocessing: - libpostproc/* Michael Niedermayer - table generation: - tableprint.c, tableprint.h Reimar Doeffinger - fixed point FFT: - fft* Zeljko Lukac - -Codecs: - 4xm.c Michael Niedermayer - 8bps.c Roberto Togni - 8svx.c Jaikrishnan Menon - aasc.c Kostya Shishkov - ac3* Justin Ruggles - alacenc.c Jaikrishnan Menon - alsdec.c Thilo Borgmann - apedec.c Kostya Shishkov - ass* Aurelien Jacobs - asv* Michael Niedermayer - atrac3* Benjamin Larsson - bgmc.c, bgmc.h Thilo Borgmann - bink.c Kostya Shishkov - binkaudio.c Peter Ross - bmp.c Mans Rullgard, Kostya Shishkov - cavs* Stefan Gehrer - cdxl.c Paul B Mahol - celp_filters.* Vitor Sessak - cinepak.c Roberto Togni - cljr Alex Beregszaszi - cllc.c Derek Buitenhuis - cook.c, cookdata.h Benjamin Larsson - cpia.c Stephan Hilb - crystalhd.c Philip Langdale - cscd.c Reimar Doeffinger - dca.c Kostya Shishkov, Benjamin Larsson - dnxhd* Baptiste Coudurier - dpcm.c Mike Melanson - dv.c Roman Shaposhnik - dxa.c Kostya Shishkov - eacmv*, eaidct*, eat* Peter Ross - exif.c, exif.h Thilo Borgmann - ffv1.c Michael Niedermayer - ffwavesynth.c Nicolas George - flac* Justin Ruggles - flashsv* Benjamin Larsson - flicvideo.c Mike Melanson - g722.c Martin Storsjo - g726.c Roman Shaposhnik - gifdec.c Baptiste Coudurier - h261* Michael Niedermayer - h263* Michael Niedermayer - h264* Loren Merritt, Michael Niedermayer - huffyuv.c Michael Niedermayer - idcinvideo.c Mike Melanson - imc* Benjamin Larsson - indeo2* Kostya Shishkov - indeo5* Kostya Shishkov - interplayvideo.c Mike Melanson - ivi* Kostya Shishkov - jacosub* ClĂ©ment BÅ“sch - jpeg2000* Nicolas Bertrand - jpeg_ls.c Kostya Shishkov - jvdec.c Peter Ross - kmvc.c Kostya Shishkov - lcl*.c Roberto Togni, Reimar Doeffinger - libcelt_dec.c Nicolas George - libdirac* David Conrad - libgsm.c Michel Bardiaux - libopenjpeg.c Jaikrishnan Menon - libopenjpegenc.c Michael Bradshaw - libschroedinger* David Conrad - libspeexdec.c Justin Ruggles - libtheoraenc.c David Conrad - libutvideo* Derek Buitenhuis - libvorbis.c David Conrad - libx264.c Mans Rullgard, Jason Garrett-Glaser - libxavs.c Stefan Gehrer - loco.c Kostya Shishkov - lzo.h, lzo.c Reimar Doeffinger - mdec.c Michael Niedermayer - mimic.c Ramiro Polla - mjpeg*.c Michael Niedermayer - mlp* Ramiro Polla - mmvideo.c Peter Ross - mpc* Kostya Shishkov - mpeg12.c, mpeg12data.h Michael Niedermayer - mpegvideo.c, mpegvideo.h Michael Niedermayer - mqc* Nicolas Bertrand - msmpeg4.c, msmpeg4data.h Michael Niedermayer - msrle.c Mike Melanson - msvideo1.c Mike Melanson - nellymoserdec.c Benjamin Larsson - nuv.c Reimar Doeffinger - paf.* Paul B Mahol - pcx.c Ivo van Poorten - pgssubdec.c Reimar Doeffinger - ptx.c Ivo van Poorten - qcelp* Reynaldo H. Verdejo Pinochet - qdm2.c, qdm2data.h Roberto Togni, Benjamin Larsson - qdrw.c Kostya Shishkov - qpeg.c Kostya Shishkov - qtrle.c Mike Melanson - ra144.c, ra144.h, ra288.c, ra288.h Roberto Togni - resample2.c Michael Niedermayer - rl2.c Sascha Sommer - rpza.c Roberto Togni - rtjpeg.c, rtjpeg.h Reimar Doeffinger - rv10.c Michael Niedermayer - rv3* Kostya Shishkov - rv4* Kostya Shishkov - s3tc* Ivo van Poorten - smacker.c Kostya Shishkov - smc.c Mike Melanson - smvjpegdec.c Ash Hughes - snow.c Michael Niedermayer, Loren Merritt - sonic.c Alex Beregszaszi - srt* Aurelien Jacobs - sunrast.c Ivo van Poorten - svq3.c Michael Niedermayer - tak* Paul B Mahol - targa.c Kostya Shishkov - tiff.c Kostya Shishkov - truemotion1* Mike Melanson - truemotion2* Kostya Shishkov - truespeech.c Kostya Shishkov - tscc.c Kostya Shishkov - tta.c Alex Beregszaszi, Jaikrishnan Menon - ttaenc.c Paul B Mahol - txd.c Ivo van Poorten - ulti* Kostya Shishkov - v410*.c Derek Buitenhuis - vb.c Kostya Shishkov - vble.c Derek Buitenhuis - vc1* Kostya Shishkov - vcr1.c Michael Niedermayer - vda_h264_dec.c Xidorn Quan - vima.c Paul B Mahol - vmnc.c Kostya Shishkov - vorbis_dec.c Denes Balatoni, David Conrad - vorbis_enc.c Oded Shimon - vp3* Mike Melanson - vp5 Aurelien Jacobs - vp6 Aurelien Jacobs - vp8 David Conrad, Jason Garrett-Glaser, Ronald Bultje - vqavideo.c Mike Melanson - wavpack.c Kostya Shishkov - wmaprodec.c Sascha Sommer - wmavoice.c Ronald S. Bultje - wmv2.c Michael Niedermayer - wnv1.c Kostya Shishkov - xan.c Mike Melanson - xbm* Paul B Mahol - xface Stefano Sabatini - xl.c Kostya Shishkov - xvmc.c Ivan Kalvachev - xwd* Paul B Mahol - zerocodec.c Derek Buitenhuis - zmbv* Kostya Shishkov - -Hardware acceleration: - crystalhd.c Philip Langdale - dxva2* Laurent Aimar - libstagefright.cpp Mohamed Naufal - vaapi* Gwenole Beauchesne - vda* Sebastien Zwickert - vdpau* Carl Eugen Hoyos - - -libavdevice -=========== - External Interface: - libavdevice/avdevice.h - - - dshow.c Roger Pack - fbdev_enc.c Lukasz Marek - iec61883.c Georg Lippitsch - lavfi Stefano Sabatini - libdc1394.c Roman Shaposhnik - pulse_audio_enc.c Lukasz Marek - sdl Stefano Sabatini - v4l2.c Luca Abeni - vfwcap.c Ramiro Polla - -libavfilter -=========== - -Generic parts: - graphdump.c Nicolas George - -Filters: - af_adelay.c Paul B Mahol - af_aecho.c Paul B Mahol - af_afade.c Paul B Mahol - af_amerge.c Nicolas George - af_aphaser.c Paul B Mahol - af_aresample.c Michael Niedermayer - af_astats.c Paul B Mahol - af_astreamsync.c Nicolas George - af_atempo.c Pavel Koshevoy - af_biquads.c Paul B Mahol - af_compand.c Paul B Mahol - af_ladspa.c Paul B Mahol - af_pan.c Nicolas George - avf_avectorscope.c Paul B Mahol - vf_blend.c Paul B Mahol - vf_colorbalance.c Paul B Mahol - vf_delogo.c Jean Delvare (CC ) - vf_drawbox.c/drawgrid Andrey Utkin - vf_extractplanes.c Paul B Mahol - vf_histogram.c Paul B Mahol - vf_il.c Paul B Mahol - vf_mergeplanes.c Paul B Mahol - vf_psnr.c Paul B Mahol - vf_scale.c Michael Niedermayer - vf_separatefields.c Paul B Mahol - vf_stereo3d.c Paul B Mahol - vf_telecine.c Paul B Mahol - vf_yadif.c Michael Niedermayer - -Sources: - vsrc_mandelbrot.c Michael Niedermayer - -libavformat -=========== - -Generic parts: - External Interface: - libavformat/avformat.h Michael Niedermayer - Utility Code: - libavformat/utils.c Michael Niedermayer - - -Muxers/Demuxers: - 4xm.c Mike Melanson - adtsenc.c Robert Swain - afc.c Paul B Mahol - aiffdec.c Baptiste Coudurier, Matthieu Bouron - aiffenc.c Baptiste Coudurier, Matthieu Bouron - ape.c Kostya Shishkov - ass* Aurelien Jacobs - astdec.c Paul B Mahol - astenc.c James Almer - avi* Michael Niedermayer - avisynth.c AvxSynth Team (avxsynth.testing at gmail dot com) - avr.c Paul B Mahol - bink.c Peter Ross - brstm.c Paul B Mahol - caf* Peter Ross - cdxl.c Paul B Mahol - crc.c Michael Niedermayer - daud.c Reimar Doeffinger - dtshddec.c Paul B Mahol - dv.c Roman Shaposhnik - dxa.c Kostya Shishkov - electronicarts.c Peter Ross - epafdec.c Paul B Mahol - ffm* Baptiste Coudurier - flac* Justin Ruggles - flic.c Mike Melanson - flvdec.c, flvenc.c Michael Niedermayer - gxf.c Reimar Doeffinger - gxfenc.c Baptiste Coudurier - idcin.c Mike Melanson - idroqdec.c Mike Melanson - iff.c Jaikrishnan Menon - img2*.c Michael Niedermayer - ipmovie.c Mike Melanson - ircam* Paul B Mahol - iss.c Stefan Gehrer - jacosub* ClĂ©ment BÅ“sch - jvdec.c Peter Ross - libmodplug.c ClĂ©ment BÅ“sch - libnut.c Oded Shimon - lmlm4.c Ivo van Poorten - lvfdec.c Paul B Mahol - lxfdec.c Tomas Härdin - matroska.c Aurelien Jacobs - matroskadec.c Aurelien Jacobs - matroskaenc.c David Conrad - metadata* Aurelien Jacobs - mgsts.c Paul B Mahol - microdvd* Aurelien Jacobs - mm.c Peter Ross - mov.c Michael Niedermayer, Baptiste Coudurier - movenc.c Baptiste Coudurier, Matthieu Bouron - mpc.c Kostya Shishkov - mpeg.c Michael Niedermayer - mpegenc.c Michael Niedermayer - mpegts* Baptiste Coudurier - msnwc_tcp.c Ramiro Polla - mtv.c Reynaldo H. Verdejo Pinochet - mxf* Baptiste Coudurier - mxfdec.c Tomas Härdin - nistspheredec.c Paul B Mahol - nsvdec.c Francois Revol - nut.c Michael Niedermayer - nuv.c Reimar Doeffinger - oggdec.c, oggdec.h David Conrad - oggenc.c Baptiste Coudurier - oggparse*.c David Conrad - oma.c Maxim Poliakovski - paf.c Paul B Mahol - psxstr.c Mike Melanson - pva.c Ivo van Poorten - pvfdec.c Paul B Mahol - r3d.c Baptiste Coudurier - raw.c Michael Niedermayer - rdt.c Ronald S. Bultje - rl2.c Sascha Sommer - rmdec.c, rmenc.c Ronald S. Bultje, Kostya Shishkov - rtmp* Kostya Shishkov - rtp.c, rtpenc.c Martin Storsjo - rtpdec_asf.* Ronald S. Bultje - rtpenc_mpv.*, rtpenc_aac.* Martin Storsjo - rtsp.c Luca Barbato - sbgdec.c Nicolas George - sdp.c Martin Storsjo - segafilm.c Mike Melanson - siff.c Kostya Shishkov - smacker.c Kostya Shishkov - smjpeg* Paul B Mahol - srtdec.c Aurelien Jacobs - swf.c Baptiste Coudurier - takdec.c Paul B Mahol - tta.c Alex Beregszaszi - txd.c Ivo van Poorten - voc.c Aurelien Jacobs - wav.c Michael Niedermayer - wc3movie.c Mike Melanson - webvtt* Matthew J Heaney - westwood.c Mike Melanson - wtv.c Peter Ross - wv.c Kostya Shishkov - wvenc.c Paul B Mahol - -Protocols: - bluray.c Petri Hintukainen - ftp.c Lukasz Marek - http.c Ronald S. Bultje - libssh.c Lukasz Marek - mms*.c Ronald S. Bultje - udp.c Luca Abeni - - -libswresample -============= - -Generic parts: - audioconvert.c Michael Niedermayer - dither.c Michael Niedermayer - rematrix*.c Michael Niedermayer - swresample*.c Michael Niedermayer - -Resamplers: - resample*.c Michael Niedermayer - soxr_resample.c Rob Sykes - - -Operating systems / CPU architectures -===================================== - -Alpha Mans Rullgard, Falk Hueffner -ARM Mans Rullgard -AVR32 Mans Rullgard -MIPS Mans Rullgard, Nedeljko Babic -Mac OS X / PowerPC Romain Dolbeau, Guillaume Poirier -Amiga / PowerPC Colin Ward -Linux / PowerPC Luca Barbato -Windows MinGW Alex Beregszaszi, Ramiro Polla -Windows Cygwin Victor Paesa -ADI/Blackfin DSP Marc Hoffman -Sparc Roman Shaposhnik -x86 Michael Niedermayer - - -Releases -======== - -2.1 Michael Niedermayer -2.0 Michael Niedermayer - -If you want to maintain an older release, please contact us - - -GnuPG Fingerprints of maintainers and contributors -================================================== - -Alexander Strasser 1C96 78B7 83CB 8AA7 9AF5 D1EB A7D8 A57B A876 E58F -Anssi Hannula 1A92 FF42 2DD9 8D2E 8AF7 65A9 4278 C520 513D F3CB -Anton Khirnov 6D0C 6625 56F8 65D1 E5F5 814B B50A 1241 C067 07AB -Ash Hughes 694D 43D2 D180 C7C7 6421 ABD3 A641 D0B7 623D 6029 -Attila Kinali 11F0 F9A6 A1D2 11F6 C745 D10C 6520 BCDD F2DF E765 -Baptiste Coudurier 8D77 134D 20CC 9220 201F C5DB 0AC9 325C 5C1A BAAA -Ben Littler 3EE3 3723 E560 3214 A8CD 4DEB 2CDB FCE7 768C 8D2C -Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8 -BÅ“sch ClĂ©ment 52D0 3A82 D445 F194 DB8B 2B16 87EE 2CB8 F4B8 FCF9 -Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7 -Diego Biurrun 8227 1E31 B6D9 4994 7427 E220 9CAE D6CC 4757 FCC5 -FFmpeg release signing key FCF9 86EA 15E6 E293 A564 4F10 B432 2F04 D676 58D8 -Gwenole Beauchesne 2E63 B3A6 3E44 37E2 017D 2704 53C7 6266 B153 99C4 -Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368 -Jean Delvare 7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A -Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF -Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE -Lou Logan 7D68 DC73 CBEF EABB 671A B6CF 621C 2E28 82F8 DC3A -Luca Barbato 6677 4209 213C 8843 5B67 29E7 E84C 78C2 84E9 0E34 -Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB -Nicolas George 24CE 01CE 9ACC 5CEB 74D8 8D9D B063 D997 36E5 4C93 -Panagiotis Issaris 6571 13A3 33D9 3726 F728 AA98 F643 B12E ECF3 E029 -Peter Ross A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B -Reimar Döffinger C61D 16E5 9E2C D10C 8958 38A4 0899 A2B9 06D4 D9C7 -Reinhard Tartler 9300 5DC2 7E87 6C37 ED7B CA9A 9808 3544 9453 48A4 -Reynaldo H. Verdejo Pinochet 6E27 CD34 170C C78E 4D4F 5F40 C18E 077F 3114 452A -Robert Swain EE7A 56EA 4A81 A7B5 2001 A521 67FA 362D A2FC 3E71 -Sascha Sommer 38A0 F88B 868E 9D3A 97D4 D6A0 E823 706F 1E07 0D3C -Stefano Sabatini 0D0B AD6B 5330 BBAD D3D6 6A0C 719C 2839 FC43 2D5F -Stephan Hilb 4F38 0B3A 5F39 B99B F505 E562 8D5C 5554 4E17 8863 -Tomas Härdin A79D 4E3D F38F 763F 91F5 8B33 A01E 8AE0 41BB 2551 -Wei Gao 4269 7741 857A 0E60 9EC5 08D2 4744 4EFA 62C1 87B9 diff --git a/bundle/ffmpeg/Makefile b/bundle/ffmpeg/Makefile deleted file mode 100644 index 46d4d526fe..0000000000 --- a/bundle/ffmpeg/Makefile +++ /dev/null @@ -1,183 +0,0 @@ -MAIN_MAKEFILE=1 -include config.mak - -vpath %.c $(SRC_PATH) -vpath %.cpp $(SRC_PATH) -vpath %.h $(SRC_PATH) -vpath %.S $(SRC_PATH) -vpath %.asm $(SRC_PATH) -vpath %.v $(SRC_PATH) -vpath %.texi $(SRC_PATH) -vpath %/fate_config.sh.template $(SRC_PATH) - -PROGS-$(CONFIG_FFMPEG) += ffmpeg -PROGS-$(CONFIG_FFPLAY) += ffplay -PROGS-$(CONFIG_FFPROBE) += ffprobe -PROGS-$(CONFIG_FFSERVER) += ffserver - -PROGS := $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF)) -INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF)) - -OBJS = cmdutils.o $(EXEOBJS) -OBJS-ffmpeg = ffmpeg_opt.o ffmpeg_filter.o -TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 -HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options -TOOLS = qt-faststart trasher -TOOLS-$(CONFIG_ZLIB) += cws2fws - -BASENAMES = ffmpeg ffplay ffprobe ffserver -ALLPROGS = $(BASENAMES:%=%$(PROGSSUF)$(EXESUF)) -ALLPROGS_G = $(BASENAMES:%=%$(PROGSSUF)_g$(EXESUF)) - -FFLIBS-$(CONFIG_AVDEVICE) += avdevice -FFLIBS-$(CONFIG_AVFILTER) += avfilter -FFLIBS-$(CONFIG_AVFORMAT) += avformat -FFLIBS-$(CONFIG_AVRESAMPLE) += avresample -FFLIBS-$(CONFIG_AVCODEC) += avcodec -FFLIBS-$(CONFIG_POSTPROC) += postproc -FFLIBS-$(CONFIG_SWRESAMPLE)+= swresample -FFLIBS-$(CONFIG_SWSCALE) += swscale - -FFLIBS := avutil - -DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd -EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile $(SRC_PATH)/doc/examples/README - -SKIPHEADERS = cmdutils_common_opts.h compat/w32pthreads.h - -include $(SRC_PATH)/common.mak - -FF_EXTRALIBS := $(FFEXTRALIBS) -FF_DEP_LIBS := $(DEP_LIBS) - -all: $(PROGS) - -$(PROGS): %$(EXESUF): %_g$(EXESUF) - $(CP) $< $@ - $(STRIP) $@ - -$(TOOLS): %$(EXESUF): %.o $(EXEOBJS) - $(LD) $(LDFLAGS) $(LD_O) $^ $(ELIBS) - -tools/cws2fws$(EXESUF): ELIBS = $(ZLIB) - -config.h: .config -.config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) - @-tput bold 2>/dev/null - @-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n' - @-tput sgr0 2>/dev/null - -SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS \ - HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \ - ARMV5TE-OBJS ARMV6-OBJS VFP-OBJS NEON-OBJS \ - ALTIVEC-OBJS VIS-OBJS \ - MMX-OBJS YASM-OBJS \ - MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSPR1-OBJS MIPS32R2-OBJS \ - OBJS HOSTOBJS TESTOBJS - -define RESET -$(1) := -$(1)-yes := -endef - -define DOSUBDIR -$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V)))) -SUBDIR := $(1)/ -include $(SRC_PATH)/$(1)/Makefile --include $(SRC_PATH)/$(1)/$(ARCH)/Makefile -include $(SRC_PATH)/library.mak -endef - -$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D)))) - -define DOPROG -OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS) -$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1)) -$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1)) -$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1)) -$(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1)) --include $$(OBJS-$(1):.o=.d) -endef - -$(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P)))) - -%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS) - $(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS) - -OBJDIRS += tools - --include $(wildcard tools/*.d) - -VERSION_SH = $(SRC_PATH)/version.sh -GIT_LOG = $(SRC_PATH)/.git/logs/HEAD - -.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak -.version: M=@ - -version.h .version: - $(M)$(VERSION_SH) $(SRC_PATH) version.h $(EXTRA_VERSION) - $(Q)touch .version - -# force version.sh to run whenever version might have changed --include .version - -ifdef PROGS -install: install-progs install-data -endif - -install: install-libs install-headers - -install-libs: install-libs-yes - -install-progs-yes: -install-progs-$(CONFIG_SHARED): install-libs - -install-progs: install-progs-yes $(PROGS) - $(Q)mkdir -p "$(BINDIR)" - $(INSTALL) -c -m 755 $(INSTPROGS) "$(BINDIR)" - -install-data: $(DATA_FILES) $(EXAMPLES_FILES) - $(Q)mkdir -p "$(DATADIR)/examples" - $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)" - $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples" - -uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data - -uninstall-progs: - $(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS)) - -uninstall-data: - $(RM) -r "$(DATADIR)" - -clean:: - $(RM) $(ALLPROGS) $(ALLPROGS_G) - $(RM) $(CLEANSUFFIXES) - $(RM) $(CLEANSUFFIXES:%=tools/%) - $(RM) -r coverage-html - $(RM) -rf coverage.info lcov - -distclean:: - $(RM) $(DISTCLEANSUFFIXES) - $(RM) config.* .config libavutil/avconfig.h .version version.h libavcodec/codec_names.h - -config: - $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION) - -check: all alltools examples testprogs fate - -include $(SRC_PATH)/doc/Makefile -include $(SRC_PATH)/tests/Makefile - -$(sort $(OBJDIRS)): - $(Q)mkdir -p $@ - -# Dummy rule to stop make trying to rebuild removed or renamed headers -%.h: - @: - -# Disable suffix rules. Most of the builtin rules are suffix rules, -# so this saves some time on slow systems. -.SUFFIXES: - -.PHONY: all all-yes alltools check *clean config install* -.PHONY: testprogs uninstall* diff --git a/bundle/ffmpeg/README b/bundle/ffmpeg/README deleted file mode 100644 index ae007bcccf..0000000000 --- a/bundle/ffmpeg/README +++ /dev/null @@ -1,18 +0,0 @@ -FFmpeg README -------------- - -1) Documentation ----------------- - -* Read the documentation in the doc/ directory in git. - You can also view it online at http://ffmpeg.org/documentation.html - -2) Licensing ------------- - -* See the LICENSE file. - -3) Build and Install --------------------- - -* See the INSTALL file. diff --git a/bundle/ffmpeg/RELEASE b/bundle/ffmpeg/RELEASE deleted file mode 100644 index ac2cdeba01..0000000000 --- a/bundle/ffmpeg/RELEASE +++ /dev/null @@ -1 +0,0 @@ -2.1.3 diff --git a/bundle/ffmpeg/VERSION b/bundle/ffmpeg/VERSION deleted file mode 100644 index ac2cdeba01..0000000000 --- a/bundle/ffmpeg/VERSION +++ /dev/null @@ -1 +0,0 @@ -2.1.3 diff --git a/bundle/ffmpeg/arch.mak b/bundle/ffmpeg/arch.mak deleted file mode 100644 index b71c8e51f3..0000000000 --- a/bundle/ffmpeg/arch.mak +++ /dev/null @@ -1,16 +0,0 @@ -OBJS-$(HAVE_ARMV5TE) += $(ARMV5TE-OBJS) $(ARMV5TE-OBJS-yes) -OBJS-$(HAVE_ARMV6) += $(ARMV6-OBJS) $(ARMV6-OBJS-yes) -OBJS-$(HAVE_VFP) += $(VFP-OBJS) $(VFP-OBJS-yes) -OBJS-$(HAVE_NEON) += $(NEON-OBJS) $(NEON-OBJS-yes) - -OBJS-$(HAVE_MIPSFPU) += $(MIPSFPU-OBJS) $(MIPSFPU-OBJS-yes) -OBJS-$(HAVE_MIPS32R2) += $(MIPS32R2-OBJS) $(MIPS32R2-OBJS-yes) -OBJS-$(HAVE_MIPSDSPR1) += $(MIPSDSPR1-OBJS) $(MIPSDSPR1-OBJS-yes) -OBJS-$(HAVE_MIPSDSPR2) += $(MIPSDSPR2-OBJS) $(MIPSDSPR2-OBJS-yes) - -OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS) $(ALTIVEC-OBJS-yes) - -OBJS-$(HAVE_VIS) += $(VIS-OBJS) $(VIS-OBJS-yes) - -OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes) -OBJS-$(HAVE_YASM) += $(YASM-OBJS) $(YASM-OBJS-yes) diff --git a/bundle/ffmpeg/cmdutils.c b/bundle/ffmpeg/cmdutils.c deleted file mode 100644 index 1fbd73cf84..0000000000 --- a/bundle/ffmpeg/cmdutils.c +++ /dev/null @@ -1,1982 +0,0 @@ -/* - * Various utilities for command line tools - * Copyright (c) 2000-2003 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -/* Include only the enabled headers since some compilers (namely, Sun - Studio) will not omit unused inline functions and create undefined - references to libraries that are not being built. */ - -#include "config.h" -#include "compat/va_copy.h" -#include "libavformat/avformat.h" -#include "libavfilter/avfilter.h" -#include "libavdevice/avdevice.h" -#include "libavresample/avresample.h" -#include "libswscale/swscale.h" -#include "libswresample/swresample.h" -#include "libpostproc/postprocess.h" -#include "libavutil/avassert.h" -#include "libavutil/avstring.h" -#include "libavutil/bprint.h" -#include "libavutil/mathematics.h" -#include "libavutil/imgutils.h" -#include "libavutil/parseutils.h" -#include "libavutil/pixdesc.h" -#include "libavutil/eval.h" -#include "libavutil/dict.h" -#include "libavutil/opt.h" -#include "libavutil/cpu.h" -#include "cmdutils.h" -#include "version.h" -#if CONFIG_NETWORK -#include "libavformat/network.h" -#endif -#if HAVE_SYS_RESOURCE_H -#include -#include -#endif -#if CONFIG_OPENCL -#include "libavutil/opencl.h" -#endif - - -static int init_report(const char *env); - -struct SwsContext *sws_opts; -AVDictionary *swr_opts; -AVDictionary *format_opts, *codec_opts, *resample_opts; - -const int this_year = 2013; - -static FILE *report_file; - -void init_opts(void) -{ - - if(CONFIG_SWSCALE) - sws_opts = sws_getContext(16, 16, 0, 16, 16, 0, SWS_BICUBIC, - NULL, NULL, NULL); -} - -void uninit_opts(void) -{ -#if CONFIG_SWSCALE - sws_freeContext(sws_opts); - sws_opts = NULL; -#endif - - av_dict_free(&swr_opts); - av_dict_free(&format_opts); - av_dict_free(&codec_opts); - av_dict_free(&resample_opts); -} - -void log_callback_help(void *ptr, int level, const char *fmt, va_list vl) -{ - vfprintf(stdout, fmt, vl); -} - -static void log_callback_report(void *ptr, int level, const char *fmt, va_list vl) -{ - va_list vl2; - char line[1024]; - static int print_prefix = 1; - - va_copy(vl2, vl); - av_log_default_callback(ptr, level, fmt, vl); - av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix); - va_end(vl2); - fputs(line, report_file); - fflush(report_file); -} - -static void (*program_exit)(int ret); - -void register_exit(void (*cb)(int ret)) -{ - program_exit = cb; -} - -void exit_program(int ret) -{ - if (program_exit) - program_exit(ret); - - exit(ret); -} - -double parse_number_or_die(const char *context, const char *numstr, int type, - double min, double max) -{ - char *tail; - const char *error; - double d = av_strtod(numstr, &tail); - if (*tail) - error = "Expected number for %s but found: %s\n"; - else if (d < min || d > max) - error = "The value for %s was %s which is not within %f - %f\n"; - else if (type == OPT_INT64 && (int64_t)d != d) - error = "Expected int64 for %s but found %s\n"; - else if (type == OPT_INT && (int)d != d) - error = "Expected int for %s but found %s\n"; - else - return d; - av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max); - exit_program(1); - return 0; -} - -int64_t parse_time_or_die(const char *context, const char *timestr, - int is_duration) -{ - int64_t us; - if (av_parse_time(&us, timestr, is_duration) < 0) { - av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n", - is_duration ? "duration" : "date", context, timestr); - exit_program(1); - } - return us; -} - -void show_help_options(const OptionDef *options, const char *msg, int req_flags, - int rej_flags, int alt_flags) -{ - const OptionDef *po; - int first; - - first = 1; - for (po = options; po->name != NULL; po++) { - char buf[64]; - - if (((po->flags & req_flags) != req_flags) || - (alt_flags && !(po->flags & alt_flags)) || - (po->flags & rej_flags)) - continue; - - if (first) { - printf("%s\n", msg); - first = 0; - } - av_strlcpy(buf, po->name, sizeof(buf)); - if (po->argname) { - av_strlcat(buf, " ", sizeof(buf)); - av_strlcat(buf, po->argname, sizeof(buf)); - } - printf("-%-17s %s\n", buf, po->help); - } - printf("\n"); -} - -void show_help_children(const AVClass *class, int flags) -{ - const AVClass *child = NULL; - if (class->option) { - av_opt_show2(&class, NULL, flags, 0); - printf("\n"); - } - - while (child = av_opt_child_class_next(class, child)) - show_help_children(child, flags); -} - -static const OptionDef *find_option(const OptionDef *po, const char *name) -{ - const char *p = strchr(name, ':'); - int len = p ? p - name : strlen(name); - - while (po->name != NULL) { - if (!strncmp(name, po->name, len) && strlen(po->name) == len) - break; - po++; - } - return po; -} - -/* _WIN32 means using the windows libc - cygwin doesn't define that - * by default. HAVE_COMMANDLINETOARGVW is true on cygwin, while - * it doesn't provide the actual command line via GetCommandLineW(). */ -#if HAVE_COMMANDLINETOARGVW && defined(_WIN32) -#include -#include -/* Will be leaked on exit */ -static char** win32_argv_utf8 = NULL; -static int win32_argc = 0; - -/** - * Prepare command line arguments for executable. - * For Windows - perform wide-char to UTF-8 conversion. - * Input arguments should be main() function arguments. - * @param argc_ptr Arguments number (including executable) - * @param argv_ptr Arguments list. - */ -static void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) -{ - char *argstr_flat; - wchar_t **argv_w; - int i, buffsize = 0, offset = 0; - - if (win32_argv_utf8) { - *argc_ptr = win32_argc; - *argv_ptr = win32_argv_utf8; - return; - } - - win32_argc = 0; - argv_w = CommandLineToArgvW(GetCommandLineW(), &win32_argc); - if (win32_argc <= 0 || !argv_w) - return; - - /* determine the UTF-8 buffer size (including NULL-termination symbols) */ - for (i = 0; i < win32_argc; i++) - buffsize += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, - NULL, 0, NULL, NULL); - - win32_argv_utf8 = av_mallocz(sizeof(char *) * (win32_argc + 1) + buffsize); - argstr_flat = (char *)win32_argv_utf8 + sizeof(char *) * (win32_argc + 1); - if (win32_argv_utf8 == NULL) { - LocalFree(argv_w); - return; - } - - for (i = 0; i < win32_argc; i++) { - win32_argv_utf8[i] = &argstr_flat[offset]; - offset += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1, - &argstr_flat[offset], - buffsize - offset, NULL, NULL); - } - win32_argv_utf8[i] = NULL; - LocalFree(argv_w); - - *argc_ptr = win32_argc; - *argv_ptr = win32_argv_utf8; -} -#else -static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) -{ - /* nothing to do */ -} -#endif /* HAVE_COMMANDLINETOARGVW */ - -static int write_option(void *optctx, const OptionDef *po, const char *opt, - const char *arg) -{ - /* new-style options contain an offset into optctx, old-style address of - * a global var*/ - void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? - (uint8_t *)optctx + po->u.off : po->u.dst_ptr; - int *dstcount; - - if (po->flags & OPT_SPEC) { - SpecifierOpt **so = dst; - char *p = strchr(opt, ':'); - - dstcount = (int *)(so + 1); - *so = grow_array(*so, sizeof(**so), dstcount, *dstcount + 1); - (*so)[*dstcount - 1].specifier = av_strdup(p ? p + 1 : ""); - dst = &(*so)[*dstcount - 1].u; - } - - if (po->flags & OPT_STRING) { - char *str; - str = av_strdup(arg); - av_freep(dst); - *(char **)dst = str; - } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) { - *(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); - } else if (po->flags & OPT_INT64) { - *(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX); - } else if (po->flags & OPT_TIME) { - *(int64_t *)dst = parse_time_or_die(opt, arg, 1); - } else if (po->flags & OPT_FLOAT) { - *(float *)dst = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); - } else if (po->flags & OPT_DOUBLE) { - *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, INFINITY); - } else if (po->u.func_arg) { - int ret = po->u.func_arg(optctx, opt, arg); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, - "Failed to set value '%s' for option '%s': %s\n", - arg, opt, av_err2str(ret)); - return ret; - } - } - if (po->flags & OPT_EXIT) - exit_program(0); - - return 0; -} - -int parse_option(void *optctx, const char *opt, const char *arg, - const OptionDef *options) -{ - const OptionDef *po; - int ret; - - po = find_option(options, opt); - if (!po->name && opt[0] == 'n' && opt[1] == 'o') { - /* handle 'no' bool option */ - po = find_option(options, opt + 2); - if ((po->name && (po->flags & OPT_BOOL))) - arg = "0"; - } else if (po->flags & OPT_BOOL) - arg = "1"; - - if (!po->name) - po = find_option(options, "default"); - if (!po->name) { - av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); - return AVERROR(EINVAL); - } - if (po->flags & HAS_ARG && !arg) { - av_log(NULL, AV_LOG_ERROR, "Missing argument for option '%s'\n", opt); - return AVERROR(EINVAL); - } - - ret = write_option(optctx, po, opt, arg); - if (ret < 0) - return ret; - - return !!(po->flags & HAS_ARG); -} - -void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, - void (*parse_arg_function)(void *, const char*)) -{ - const char *opt; - int optindex, handleoptions = 1, ret; - - /* perform system-dependent conversions for arguments list */ - prepare_app_arguments(&argc, &argv); - - /* parse options */ - optindex = 1; - while (optindex < argc) { - opt = argv[optindex++]; - - if (handleoptions && opt[0] == '-' && opt[1] != '\0') { - if (opt[1] == '-' && opt[2] == '\0') { - handleoptions = 0; - continue; - } - opt++; - - if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0) - exit_program(1); - optindex += ret; - } else { - if (parse_arg_function) - parse_arg_function(optctx, opt); - } - } -} - -int parse_optgroup(void *optctx, OptionGroup *g) -{ - int i, ret; - - av_log(NULL, AV_LOG_DEBUG, "Parsing a group of options: %s %s.\n", - g->group_def->name, g->arg); - - for (i = 0; i < g->nb_opts; i++) { - Option *o = &g->opts[i]; - - if (g->group_def->flags && - !(g->group_def->flags & o->opt->flags)) { - av_log(NULL, AV_LOG_ERROR, "Option %s (%s) cannot be applied to " - "%s %s -- you are trying to apply an input option to an " - "output file or vice versa. Move this option before the " - "file it belongs to.\n", o->key, o->opt->help, - g->group_def->name, g->arg); - return AVERROR(EINVAL); - } - - av_log(NULL, AV_LOG_DEBUG, "Applying option %s (%s) with argument %s.\n", - o->key, o->opt->help, o->val); - - ret = write_option(optctx, o->opt, o->key, o->val); - if (ret < 0) - return ret; - } - - av_log(NULL, AV_LOG_DEBUG, "Successfully parsed a group of options.\n"); - - return 0; -} - -int locate_option(int argc, char **argv, const OptionDef *options, - const char *optname) -{ - const OptionDef *po; - int i; - - for (i = 1; i < argc; i++) { - const char *cur_opt = argv[i]; - - if (*cur_opt++ != '-') - continue; - - po = find_option(options, cur_opt); - if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o') - po = find_option(options, cur_opt + 2); - - if ((!po->name && !strcmp(cur_opt, optname)) || - (po->name && !strcmp(optname, po->name))) - return i; - - if (po->flags & HAS_ARG) - i++; - } - return 0; -} - -static void dump_argument(const char *a) -{ - const unsigned char *p; - - for (p = a; *p; p++) - if (!((*p >= '+' && *p <= ':') || (*p >= '@' && *p <= 'Z') || - *p == '_' || (*p >= 'a' && *p <= 'z'))) - break; - if (!*p) { - fputs(a, report_file); - return; - } - fputc('"', report_file); - for (p = a; *p; p++) { - if (*p == '\\' || *p == '"' || *p == '$' || *p == '`') - fprintf(report_file, "\\%c", *p); - else if (*p < ' ' || *p > '~') - fprintf(report_file, "\\x%02x", *p); - else - fputc(*p, report_file); - } - fputc('"', report_file); -} - -void parse_loglevel(int argc, char **argv, const OptionDef *options) -{ - int idx = locate_option(argc, argv, options, "loglevel"); - const char *env; - if (!idx) - idx = locate_option(argc, argv, options, "v"); - if (idx && argv[idx + 1]) - opt_loglevel(NULL, "loglevel", argv[idx + 1]); - idx = locate_option(argc, argv, options, "report"); - if ((env = getenv("FFREPORT")) || idx) { - init_report(env); - if (report_file) { - int i; - fprintf(report_file, "Command line:\n"); - for (i = 0; i < argc; i++) { - dump_argument(argv[i]); - fputc(i < argc - 1 ? ' ' : '\n', report_file); - } - fflush(report_file); - } - } -} - -static const AVOption *opt_find(void *obj, const char *name, const char *unit, - int opt_flags, int search_flags) -{ - const AVOption *o = av_opt_find(obj, name, unit, opt_flags, search_flags); - if(o && !o->flags) - return NULL; - return o; -} - -#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0 -int opt_default(void *optctx, const char *opt, const char *arg) -{ - const AVOption *o; - int consumed = 0; - char opt_stripped[128]; - const char *p; - const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); -#if CONFIG_AVRESAMPLE - const AVClass *rc = avresample_get_class(); -#endif - const AVClass *sc, *swr_class; - - if (!strcmp(opt, "debug") || !strcmp(opt, "fdebug")) - av_log_set_level(AV_LOG_DEBUG); - - if (!(p = strchr(opt, ':'))) - p = opt + strlen(opt); - av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1)); - - if ((o = opt_find(&cc, opt_stripped, NULL, 0, - AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) || - ((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') && - (o = opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) { - av_dict_set(&codec_opts, opt, arg, FLAGS); - consumed = 1; - } - if ((o = opt_find(&fc, opt, NULL, 0, - AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { - av_dict_set(&format_opts, opt, arg, FLAGS); - if (consumed) - av_log(NULL, AV_LOG_VERBOSE, "Routing option %s to both codec and muxer layer\n", opt); - consumed = 1; - } -#if CONFIG_SWSCALE - sc = sws_get_class(); - if (!consumed && opt_find(&sc, opt, NULL, 0, - AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) { - // XXX we only support sws_flags, not arbitrary sws options - int ret = av_opt_set(sws_opts, opt, arg, 0); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt); - return ret; - } - consumed = 1; - } -#endif -#if CONFIG_SWRESAMPLE - swr_class = swr_get_class(); - if (!consumed && (o=opt_find(&swr_class, opt, NULL, 0, - AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { - struct SwrContext *swr = swr_alloc(); - int ret = av_opt_set(swr, opt, arg, 0); - swr_free(&swr); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error setting option %s.\n", opt); - return ret; - } - av_dict_set(&swr_opts, opt, arg, FLAGS); - consumed = 1; - } -#endif -#if CONFIG_AVRESAMPLE - if ((o=opt_find(&rc, opt, NULL, 0, - AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { - av_dict_set(&resample_opts, opt, arg, FLAGS); - consumed = 1; - } -#endif - - if (consumed) - return 0; - return AVERROR_OPTION_NOT_FOUND; -} - -/* - * Check whether given option is a group separator. - * - * @return index of the group definition that matched or -1 if none - */ -static int match_group_separator(const OptionGroupDef *groups, int nb_groups, - const char *opt) -{ - int i; - - for (i = 0; i < nb_groups; i++) { - const OptionGroupDef *p = &groups[i]; - if (p->sep && !strcmp(p->sep, opt)) - return i; - } - - return -1; -} - -/* - * Finish parsing an option group. - * - * @param group_idx which group definition should this group belong to - * @param arg argument of the group delimiting option - */ -static void finish_group(OptionParseContext *octx, int group_idx, - const char *arg) -{ - OptionGroupList *l = &octx->groups[group_idx]; - OptionGroup *g; - - GROW_ARRAY(l->groups, l->nb_groups); - g = &l->groups[l->nb_groups - 1]; - - *g = octx->cur_group; - g->arg = arg; - g->group_def = l->group_def; -#if CONFIG_SWSCALE - g->sws_opts = sws_opts; -#endif - g->swr_opts = swr_opts; - g->codec_opts = codec_opts; - g->format_opts = format_opts; - g->resample_opts = resample_opts; - - codec_opts = NULL; - format_opts = NULL; - resample_opts = NULL; -#if CONFIG_SWSCALE - sws_opts = NULL; -#endif - swr_opts = NULL; - init_opts(); - - memset(&octx->cur_group, 0, sizeof(octx->cur_group)); -} - -/* - * Add an option instance to currently parsed group. - */ -static void add_opt(OptionParseContext *octx, const OptionDef *opt, - const char *key, const char *val) -{ - int global = !(opt->flags & (OPT_PERFILE | OPT_SPEC | OPT_OFFSET)); - OptionGroup *g = global ? &octx->global_opts : &octx->cur_group; - - GROW_ARRAY(g->opts, g->nb_opts); - g->opts[g->nb_opts - 1].opt = opt; - g->opts[g->nb_opts - 1].key = key; - g->opts[g->nb_opts - 1].val = val; -} - -static void init_parse_context(OptionParseContext *octx, - const OptionGroupDef *groups, int nb_groups) -{ - static const OptionGroupDef global_group = { "global" }; - int i; - - memset(octx, 0, sizeof(*octx)); - - octx->nb_groups = nb_groups; - octx->groups = av_mallocz(sizeof(*octx->groups) * octx->nb_groups); - if (!octx->groups) - exit_program(1); - - for (i = 0; i < octx->nb_groups; i++) - octx->groups[i].group_def = &groups[i]; - - octx->global_opts.group_def = &global_group; - octx->global_opts.arg = ""; - - init_opts(); -} - -void uninit_parse_context(OptionParseContext *octx) -{ - int i, j; - - for (i = 0; i < octx->nb_groups; i++) { - OptionGroupList *l = &octx->groups[i]; - - for (j = 0; j < l->nb_groups; j++) { - av_freep(&l->groups[j].opts); - av_dict_free(&l->groups[j].codec_opts); - av_dict_free(&l->groups[j].format_opts); - av_dict_free(&l->groups[j].resample_opts); -#if CONFIG_SWSCALE - sws_freeContext(l->groups[j].sws_opts); -#endif - av_dict_free(&l->groups[j].swr_opts); - } - av_freep(&l->groups); - } - av_freep(&octx->groups); - - av_freep(&octx->cur_group.opts); - av_freep(&octx->global_opts.opts); - - uninit_opts(); -} - -int split_commandline(OptionParseContext *octx, int argc, char *argv[], - const OptionDef *options, - const OptionGroupDef *groups, int nb_groups) -{ - int optindex = 1; - int dashdash = -2; - - /* perform system-dependent conversions for arguments list */ - prepare_app_arguments(&argc, &argv); - - init_parse_context(octx, groups, nb_groups); - av_log(NULL, AV_LOG_DEBUG, "Splitting the commandline.\n"); - - while (optindex < argc) { - const char *opt = argv[optindex++], *arg; - const OptionDef *po; - int ret; - - av_log(NULL, AV_LOG_DEBUG, "Reading option '%s' ...", opt); - - if (opt[0] == '-' && opt[1] == '-' && !opt[2]) { - dashdash = optindex; - continue; - } - /* unnamed group separators, e.g. output filename */ - if (opt[0] != '-' || !opt[1] || dashdash+1 == optindex) { - finish_group(octx, 0, opt); - av_log(NULL, AV_LOG_DEBUG, " matched as %s.\n", groups[0].name); - continue; - } - opt++; - -#define GET_ARG(arg) \ -do { \ - arg = argv[optindex++]; \ - if (!arg) { \ - av_log(NULL, AV_LOG_ERROR, "Missing argument for option '%s'.\n", opt);\ - return AVERROR(EINVAL); \ - } \ -} while (0) - - /* named group separators, e.g. -i */ - if ((ret = match_group_separator(groups, nb_groups, opt)) >= 0) { - GET_ARG(arg); - finish_group(octx, ret, arg); - av_log(NULL, AV_LOG_DEBUG, " matched as %s with argument '%s'.\n", - groups[ret].name, arg); - continue; - } - - /* normal options */ - po = find_option(options, opt); - if (po->name) { - if (po->flags & OPT_EXIT) { - /* optional argument, e.g. -h */ - arg = argv[optindex++]; - } else if (po->flags & HAS_ARG) { - GET_ARG(arg); - } else { - arg = "1"; - } - - add_opt(octx, po, opt, arg); - av_log(NULL, AV_LOG_DEBUG, " matched as option '%s' (%s) with " - "argument '%s'.\n", po->name, po->help, arg); - continue; - } - - /* AVOptions */ - if (argv[optindex]) { - ret = opt_default(NULL, opt, argv[optindex]); - if (ret >= 0) { - av_log(NULL, AV_LOG_DEBUG, " matched as AVOption '%s' with " - "argument '%s'.\n", opt, argv[optindex]); - optindex++; - continue; - } else if (ret != AVERROR_OPTION_NOT_FOUND) { - av_log(NULL, AV_LOG_ERROR, "Error parsing option '%s' " - "with argument '%s'.\n", opt, argv[optindex]); - return ret; - } - } - - /* boolean -nofoo options */ - if (opt[0] == 'n' && opt[1] == 'o' && - (po = find_option(options, opt + 2)) && - po->name && po->flags & OPT_BOOL) { - add_opt(octx, po, opt, "0"); - av_log(NULL, AV_LOG_DEBUG, " matched as option '%s' (%s) with " - "argument 0.\n", po->name, po->help); - continue; - } - - av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'.\n", opt); - return AVERROR_OPTION_NOT_FOUND; - } - - if (octx->cur_group.nb_opts || codec_opts || format_opts || resample_opts) - av_log(NULL, AV_LOG_WARNING, "Trailing options were found on the " - "commandline.\n"); - - av_log(NULL, AV_LOG_DEBUG, "Finished splitting the commandline.\n"); - - return 0; -} - -int opt_cpuflags(void *optctx, const char *opt, const char *arg) -{ - int ret; - unsigned flags = av_get_cpu_flags(); - - if ((ret = av_parse_cpu_caps(&flags, arg)) < 0) - return ret; - - av_force_cpu_flags(flags); - return 0; -} - -int opt_loglevel(void *optctx, const char *opt, const char *arg) -{ - const struct { const char *name; int level; } log_levels[] = { - { "quiet" , AV_LOG_QUIET }, - { "panic" , AV_LOG_PANIC }, - { "fatal" , AV_LOG_FATAL }, - { "error" , AV_LOG_ERROR }, - { "warning", AV_LOG_WARNING }, - { "info" , AV_LOG_INFO }, - { "verbose", AV_LOG_VERBOSE }, - { "debug" , AV_LOG_DEBUG }, - }; - char *tail; - int level; - int i; - - tail = strstr(arg, "repeat"); - av_log_set_flags(tail ? 0 : AV_LOG_SKIP_REPEATED); - if (tail == arg) - arg += 6 + (arg[6]=='+'); - if(tail && !*arg) - return 0; - - for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) { - if (!strcmp(log_levels[i].name, arg)) { - av_log_set_level(log_levels[i].level); - return 0; - } - } - - level = strtol(arg, &tail, 10); - if (*tail) { - av_log(NULL, AV_LOG_FATAL, "Invalid loglevel \"%s\". " - "Possible levels are numbers or:\n", arg); - for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) - av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name); - exit_program(1); - } - av_log_set_level(level); - return 0; -} - -static void expand_filename_template(AVBPrint *bp, const char *template, - struct tm *tm) -{ - int c; - - while ((c = *(template++))) { - if (c == '%') { - if (!(c = *(template++))) - break; - switch (c) { - case 'p': - av_bprintf(bp, "%s", program_name); - break; - case 't': - av_bprintf(bp, "%04d%02d%02d-%02d%02d%02d", - tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); - break; - case '%': - av_bprint_chars(bp, c, 1); - break; - } - } else { - av_bprint_chars(bp, c, 1); - } - } -} - -static int init_report(const char *env) -{ - char *filename_template = NULL; - char *key, *val; - int ret, count = 0; - time_t now; - struct tm *tm; - AVBPrint filename; - - if (report_file) /* already opened */ - return 0; - time(&now); - tm = localtime(&now); - - while (env && *env) { - if ((ret = av_opt_get_key_value(&env, "=", ":", 0, &key, &val)) < 0) { - if (count) - av_log(NULL, AV_LOG_ERROR, - "Failed to parse FFREPORT environment variable: %s\n", - av_err2str(ret)); - break; - } - if (*env) - env++; - count++; - if (!strcmp(key, "file")) { - av_free(filename_template); - filename_template = val; - val = NULL; - } else { - av_log(NULL, AV_LOG_ERROR, "Unknown key '%s' in FFREPORT\n", key); - } - av_free(val); - av_free(key); - } - - av_bprint_init(&filename, 0, 1); - expand_filename_template(&filename, - av_x_if_null(filename_template, "%p-%t.log"), tm); - av_free(filename_template); - if (!av_bprint_is_complete(&filename)) { - av_log(NULL, AV_LOG_ERROR, "Out of memory building report file name\n"); - return AVERROR(ENOMEM); - } - - report_file = fopen(filename.str, "w"); - if (!report_file) { - av_log(NULL, AV_LOG_ERROR, "Failed to open report \"%s\": %s\n", - filename.str, strerror(errno)); - return AVERROR(errno); - } - av_log_set_callback(log_callback_report); - av_log(NULL, AV_LOG_INFO, - "%s started on %04d-%02d-%02d at %02d:%02d:%02d\n" - "Report written to \"%s\"\n", - program_name, - tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec, - filename.str); - av_bprint_finalize(&filename, NULL); - return 0; -} - -int opt_report(const char *opt) -{ - return init_report(NULL); -} - -int opt_max_alloc(void *optctx, const char *opt, const char *arg) -{ - char *tail; - size_t max; - - max = strtol(arg, &tail, 10); - if (*tail) { - av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg); - exit_program(1); - } - av_max_alloc(max); - return 0; -} - -int opt_timelimit(void *optctx, const char *opt, const char *arg) -{ -#if HAVE_SETRLIMIT - int lim = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX); - struct rlimit rl = { lim, lim + 1 }; - if (setrlimit(RLIMIT_CPU, &rl)) - perror("setrlimit"); -#else - av_log(NULL, AV_LOG_WARNING, "-%s not implemented on this OS\n", opt); -#endif - return 0; -} - -#if CONFIG_OPENCL -int opt_opencl(void *optctx, const char *opt, const char *arg) -{ - char *key, *value; - const char *opts = arg; - int ret = 0; - while (*opts) { - ret = av_opt_get_key_value(&opts, "=", ":", 0, &key, &value); - if (ret < 0) - return ret; - ret = av_opencl_set_option(key, value); - if (ret < 0) - return ret; - if (*opts) - opts++; - } - return ret; -} -#endif - -void print_error(const char *filename, int err) -{ - char errbuf[128]; - const char *errbuf_ptr = errbuf; - - if (av_strerror(err, errbuf, sizeof(errbuf)) < 0) - errbuf_ptr = strerror(AVUNERROR(err)); - av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr); -} - -static int warned_cfg = 0; - -#define INDENT 1 -#define SHOW_VERSION 2 -#define SHOW_CONFIG 4 -#define SHOW_COPYRIGHT 8 - -#define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \ - if (CONFIG_##LIBNAME) { \ - const char *indent = flags & INDENT? " " : ""; \ - if (flags & SHOW_VERSION) { \ - unsigned int version = libname##_version(); \ - av_log(NULL, level, \ - "%slib%-11s %2d.%3d.%3d / %2d.%3d.%3d\n", \ - indent, #libname, \ - LIB##LIBNAME##_VERSION_MAJOR, \ - LIB##LIBNAME##_VERSION_MINOR, \ - LIB##LIBNAME##_VERSION_MICRO, \ - version >> 16, version >> 8 & 0xff, version & 0xff); \ - } \ - if (flags & SHOW_CONFIG) { \ - const char *cfg = libname##_configuration(); \ - if (strcmp(FFMPEG_CONFIGURATION, cfg)) { \ - if (!warned_cfg) { \ - av_log(NULL, level, \ - "%sWARNING: library configuration mismatch\n", \ - indent); \ - warned_cfg = 1; \ - } \ - av_log(NULL, level, "%s%-11s configuration: %s\n", \ - indent, #libname, cfg); \ - } \ - } \ - } \ - -static void print_all_libs_info(int flags, int level) -{ - PRINT_LIB_INFO(avutil, AVUTIL, flags, level); - PRINT_LIB_INFO(avcodec, AVCODEC, flags, level); - PRINT_LIB_INFO(avformat, AVFORMAT, flags, level); - PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level); - PRINT_LIB_INFO(avfilter, AVFILTER, flags, level); - PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level); - PRINT_LIB_INFO(swscale, SWSCALE, flags, level); - PRINT_LIB_INFO(swresample,SWRESAMPLE, flags, level); - PRINT_LIB_INFO(postproc, POSTPROC, flags, level); -} - -static void print_program_info(int flags, int level) -{ - const char *indent = flags & INDENT? " " : ""; - - av_log(NULL, level, "%s version " FFMPEG_VERSION, program_name); - if (flags & SHOW_COPYRIGHT) - av_log(NULL, level, " Copyright (c) %d-%d the FFmpeg developers", - program_birth_year, this_year); - av_log(NULL, level, "\n"); - av_log(NULL, level, "%sbuilt on %s %s with %s\n", - indent, __DATE__, __TIME__, CC_IDENT); - - av_log(NULL, level, "%sconfiguration: " FFMPEG_CONFIGURATION "\n", indent); -} - -void show_banner(int argc, char **argv, const OptionDef *options) -{ - int idx = locate_option(argc, argv, options, "version"); - if (idx) - return; - - print_program_info (INDENT|SHOW_COPYRIGHT, AV_LOG_INFO); - print_all_libs_info(INDENT|SHOW_CONFIG, AV_LOG_INFO); - print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_INFO); -} - -int show_version(void *optctx, const char *opt, const char *arg) -{ - av_log_set_callback(log_callback_help); - print_program_info (0 , AV_LOG_INFO); - print_all_libs_info(SHOW_VERSION, AV_LOG_INFO); - - return 0; -} - -int show_license(void *optctx, const char *opt, const char *arg) -{ -#if CONFIG_NONFREE - printf( - "This version of %s has nonfree parts compiled in.\n" - "Therefore it is not legally redistributable.\n", - program_name ); -#elif CONFIG_GPLV3 - printf( - "%s is free software; you can redistribute it and/or modify\n" - "it under the terms of the GNU General Public License as published by\n" - "the Free Software Foundation; either version 3 of the License, or\n" - "(at your option) any later version.\n" - "\n" - "%s is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU General Public License\n" - "along with %s. If not, see .\n", - program_name, program_name, program_name ); -#elif CONFIG_GPL - printf( - "%s is free software; you can redistribute it and/or modify\n" - "it under the terms of the GNU General Public License as published by\n" - "the Free Software Foundation; either version 2 of the License, or\n" - "(at your option) any later version.\n" - "\n" - "%s is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU General Public License\n" - "along with %s; if not, write to the Free Software\n" - "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n", - program_name, program_name, program_name ); -#elif CONFIG_LGPLV3 - printf( - "%s is free software; you can redistribute it and/or modify\n" - "it under the terms of the GNU Lesser General Public License as published by\n" - "the Free Software Foundation; either version 3 of the License, or\n" - "(at your option) any later version.\n" - "\n" - "%s is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU Lesser General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU Lesser General Public License\n" - "along with %s. If not, see .\n", - program_name, program_name, program_name ); -#else - printf( - "%s is free software; you can redistribute it and/or\n" - "modify it under the terms of the GNU Lesser General Public\n" - "License as published by the Free Software Foundation; either\n" - "version 2.1 of the License, or (at your option) any later version.\n" - "\n" - "%s is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" - "Lesser General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU Lesser General Public\n" - "License along with %s; if not, write to the Free Software\n" - "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n", - program_name, program_name, program_name ); -#endif - - return 0; -} - -int show_formats(void *optctx, const char *opt, const char *arg) -{ - AVInputFormat *ifmt = NULL; - AVOutputFormat *ofmt = NULL; - const char *last_name; - - printf("File formats:\n" - " D. = Demuxing supported\n" - " .E = Muxing supported\n" - " --\n"); - last_name = "000"; - for (;;) { - int decode = 0; - int encode = 0; - const char *name = NULL; - const char *long_name = NULL; - - while ((ofmt = av_oformat_next(ofmt))) { - if ((name == NULL || strcmp(ofmt->name, name) < 0) && - strcmp(ofmt->name, last_name) > 0) { - name = ofmt->name; - long_name = ofmt->long_name; - encode = 1; - } - } - while ((ifmt = av_iformat_next(ifmt))) { - if ((name == NULL || strcmp(ifmt->name, name) < 0) && - strcmp(ifmt->name, last_name) > 0) { - name = ifmt->name; - long_name = ifmt->long_name; - encode = 0; - } - if (name && strcmp(ifmt->name, name) == 0) - decode = 1; - } - if (name == NULL) - break; - last_name = name; - - printf(" %s%s %-15s %s\n", - decode ? "D" : " ", - encode ? "E" : " ", - name, - long_name ? long_name:" "); - } - return 0; -} - -#define PRINT_CODEC_SUPPORTED(codec, field, type, list_name, term, get_name) \ - if (codec->field) { \ - const type *p = codec->field; \ - \ - printf(" Supported " list_name ":"); \ - while (*p != term) { \ - get_name(*p); \ - printf(" %s", name); \ - p++; \ - } \ - printf("\n"); \ - } \ - -static void print_codec(const AVCodec *c) -{ - int encoder = av_codec_is_encoder(c); - - printf("%s %s [%s]:\n", encoder ? "Encoder" : "Decoder", c->name, - c->long_name ? c->long_name : ""); - - if (c->type == AVMEDIA_TYPE_VIDEO || - c->type == AVMEDIA_TYPE_AUDIO) { - printf(" Threading capabilities: "); - switch (c->capabilities & (CODEC_CAP_FRAME_THREADS | - CODEC_CAP_SLICE_THREADS)) { - case CODEC_CAP_FRAME_THREADS | - CODEC_CAP_SLICE_THREADS: printf("frame and slice"); break; - case CODEC_CAP_FRAME_THREADS: printf("frame"); break; - case CODEC_CAP_SLICE_THREADS: printf("slice"); break; - default: printf("no"); break; - } - printf("\n"); - } - - if (c->supported_framerates) { - const AVRational *fps = c->supported_framerates; - - printf(" Supported framerates:"); - while (fps->num) { - printf(" %d/%d", fps->num, fps->den); - fps++; - } - printf("\n"); - } - PRINT_CODEC_SUPPORTED(c, pix_fmts, enum AVPixelFormat, "pixel formats", - AV_PIX_FMT_NONE, GET_PIX_FMT_NAME); - PRINT_CODEC_SUPPORTED(c, supported_samplerates, int, "sample rates", 0, - GET_SAMPLE_RATE_NAME); - PRINT_CODEC_SUPPORTED(c, sample_fmts, enum AVSampleFormat, "sample formats", - AV_SAMPLE_FMT_NONE, GET_SAMPLE_FMT_NAME); - PRINT_CODEC_SUPPORTED(c, channel_layouts, uint64_t, "channel layouts", - 0, GET_CH_LAYOUT_DESC); - - if (c->priv_class) { - show_help_children(c->priv_class, - AV_OPT_FLAG_ENCODING_PARAM | - AV_OPT_FLAG_DECODING_PARAM); - } -} - -static char get_media_type_char(enum AVMediaType type) -{ - switch (type) { - case AVMEDIA_TYPE_VIDEO: return 'V'; - case AVMEDIA_TYPE_AUDIO: return 'A'; - case AVMEDIA_TYPE_DATA: return 'D'; - case AVMEDIA_TYPE_SUBTITLE: return 'S'; - case AVMEDIA_TYPE_ATTACHMENT:return 'T'; - default: return '?'; - } -} - -static const AVCodec *next_codec_for_id(enum AVCodecID id, const AVCodec *prev, - int encoder) -{ - while ((prev = av_codec_next(prev))) { - if (prev->id == id && - (encoder ? av_codec_is_encoder(prev) : av_codec_is_decoder(prev))) - return prev; - } - return NULL; -} - -static int compare_codec_desc(const void *a, const void *b) -{ - const AVCodecDescriptor * const *da = a; - const AVCodecDescriptor * const *db = b; - - return (*da)->type != (*db)->type ? (*da)->type - (*db)->type : - strcmp((*da)->name, (*db)->name); -} - -static unsigned get_codecs_sorted(const AVCodecDescriptor ***rcodecs) -{ - const AVCodecDescriptor *desc = NULL; - const AVCodecDescriptor **codecs; - unsigned nb_codecs = 0, i = 0; - - while ((desc = avcodec_descriptor_next(desc))) - nb_codecs++; - if (!(codecs = av_calloc(nb_codecs, sizeof(*codecs)))) { - av_log(NULL, AV_LOG_ERROR, "Out of memory\n"); - exit_program(1); - } - desc = NULL; - while ((desc = avcodec_descriptor_next(desc))) - codecs[i++] = desc; - av_assert0(i == nb_codecs); - qsort(codecs, nb_codecs, sizeof(*codecs), compare_codec_desc); - *rcodecs = codecs; - return nb_codecs; -} - -static void print_codecs_for_id(enum AVCodecID id, int encoder) -{ - const AVCodec *codec = NULL; - - printf(" (%s: ", encoder ? "encoders" : "decoders"); - - while ((codec = next_codec_for_id(id, codec, encoder))) - printf("%s ", codec->name); - - printf(")"); -} - -int show_codecs(void *optctx, const char *opt, const char *arg) -{ - const AVCodecDescriptor **codecs; - unsigned i, nb_codecs = get_codecs_sorted(&codecs); - - printf("Codecs:\n" - " D..... = Decoding supported\n" - " .E.... = Encoding supported\n" - " ..V... = Video codec\n" - " ..A... = Audio codec\n" - " ..S... = Subtitle codec\n" - " ...I.. = Intra frame-only codec\n" - " ....L. = Lossy compression\n" - " .....S = Lossless compression\n" - " -------\n"); - for (i = 0; i < nb_codecs; i++) { - const AVCodecDescriptor *desc = codecs[i]; - const AVCodec *codec = NULL; - - printf(" "); - printf(avcodec_find_decoder(desc->id) ? "D" : "."); - printf(avcodec_find_encoder(desc->id) ? "E" : "."); - - printf("%c", get_media_type_char(desc->type)); - printf((desc->props & AV_CODEC_PROP_INTRA_ONLY) ? "I" : "."); - printf((desc->props & AV_CODEC_PROP_LOSSY) ? "L" : "."); - printf((desc->props & AV_CODEC_PROP_LOSSLESS) ? "S" : "."); - - printf(" %-20s %s", desc->name, desc->long_name ? desc->long_name : ""); - - /* print decoders/encoders when there's more than one or their - * names are different from codec name */ - while ((codec = next_codec_for_id(desc->id, codec, 0))) { - if (strcmp(codec->name, desc->name)) { - print_codecs_for_id(desc->id, 0); - break; - } - } - codec = NULL; - while ((codec = next_codec_for_id(desc->id, codec, 1))) { - if (strcmp(codec->name, desc->name)) { - print_codecs_for_id(desc->id, 1); - break; - } - } - - printf("\n"); - } - av_free(codecs); - return 0; -} - -static void print_codecs(int encoder) -{ - const AVCodecDescriptor **codecs; - unsigned i, nb_codecs = get_codecs_sorted(&codecs); - - printf("%s:\n" - " V..... = Video\n" - " A..... = Audio\n" - " S..... = Subtitle\n" - " .F.... = Frame-level multithreading\n" - " ..S... = Slice-level multithreading\n" - " ...X.. = Codec is experimental\n" - " ....B. = Supports draw_horiz_band\n" - " .....D = Supports direct rendering method 1\n" - " ------\n", - encoder ? "Encoders" : "Decoders"); - for (i = 0; i < nb_codecs; i++) { - const AVCodecDescriptor *desc = codecs[i]; - const AVCodec *codec = NULL; - - while ((codec = next_codec_for_id(desc->id, codec, encoder))) { - printf(" %c", get_media_type_char(desc->type)); - printf((codec->capabilities & CODEC_CAP_FRAME_THREADS) ? "F" : "."); - printf((codec->capabilities & CODEC_CAP_SLICE_THREADS) ? "S" : "."); - printf((codec->capabilities & CODEC_CAP_EXPERIMENTAL) ? "X" : "."); - printf((codec->capabilities & CODEC_CAP_DRAW_HORIZ_BAND)?"B" : "."); - printf((codec->capabilities & CODEC_CAP_DR1) ? "D" : "."); - - printf(" %-20s %s", codec->name, codec->long_name ? codec->long_name : ""); - if (strcmp(codec->name, desc->name)) - printf(" (codec %s)", desc->name); - - printf("\n"); - } - } - av_free(codecs); -} - -int show_decoders(void *optctx, const char *opt, const char *arg) -{ - print_codecs(0); - return 0; -} - -int show_encoders(void *optctx, const char *opt, const char *arg) -{ - print_codecs(1); - return 0; -} - -int show_bsfs(void *optctx, const char *opt, const char *arg) -{ - AVBitStreamFilter *bsf = NULL; - - printf("Bitstream filters:\n"); - while ((bsf = av_bitstream_filter_next(bsf))) - printf("%s\n", bsf->name); - printf("\n"); - return 0; -} - -int show_protocols(void *optctx, const char *opt, const char *arg) -{ - void *opaque = NULL; - const char *name; - - printf("Supported file protocols:\n" - "Input:\n"); - while ((name = avio_enum_protocols(&opaque, 0))) - printf("%s\n", name); - printf("Output:\n"); - while ((name = avio_enum_protocols(&opaque, 1))) - printf("%s\n", name); - return 0; -} - -int show_filters(void *optctx, const char *opt, const char *arg) -{ - const AVFilter av_unused(*filter) = NULL; - char descr[64], *descr_cur; - int i, j; - const AVFilterPad *pad; - - printf("Filters:\n" - " T.. = Timeline support\n" - " .S. = Slice threading\n" - " ..C = Commmand support\n" - " A = Audio input/output\n" - " V = Video input/output\n" - " N = Dynamic number and/or type of input/output\n" - " | = Source or sink filter\n"); -#if CONFIG_AVFILTER - while ((filter = avfilter_next(filter))) { - descr_cur = descr; - for (i = 0; i < 2; i++) { - if (i) { - *(descr_cur++) = '-'; - *(descr_cur++) = '>'; - } - pad = i ? filter->outputs : filter->inputs; - for (j = 0; pad && pad[j].name; j++) { - if (descr_cur >= descr + sizeof(descr) - 4) - break; - *(descr_cur++) = get_media_type_char(pad[j].type); - } - if (!j) - *(descr_cur++) = ((!i && (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) || - ( i && (filter->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS))) ? 'N' : '|'; - } - *descr_cur = 0; - printf(" %c%c%c %-16s %-10s %s\n", - filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE ? 'T' : '.', - filter->flags & AVFILTER_FLAG_SLICE_THREADS ? 'S' : '.', - filter->process_command ? 'C' : '.', - filter->name, descr, filter->description); - } -#endif - return 0; -} - -void show_colors(void *optctx, const char *opt, const char *arg) -{ - const char *name; - const uint8_t *rgb; - int i; - - printf("%-32s #RRGGBB\n", "name"); - - for (i = 0; name = av_get_known_color_name(i, &rgb); i++) - printf("%-32s #%02x%02x%02x\n", name, rgb[0], rgb[1], rgb[2]); -} - -int show_pix_fmts(void *optctx, const char *opt, const char *arg) -{ - const AVPixFmtDescriptor *pix_desc = NULL; - - printf("Pixel formats:\n" - "I.... = Supported Input format for conversion\n" - ".O... = Supported Output format for conversion\n" - "..H.. = Hardware accelerated format\n" - "...P. = Paletted format\n" - "....B = Bitstream format\n" - "FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n" - "-----\n"); - -#if !CONFIG_SWSCALE -# define sws_isSupportedInput(x) 0 -# define sws_isSupportedOutput(x) 0 -#endif - - while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) { - enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc); - printf("%c%c%c%c%c %-16s %d %2d\n", - sws_isSupportedInput (pix_fmt) ? 'I' : '.', - sws_isSupportedOutput(pix_fmt) ? 'O' : '.', - pix_desc->flags & AV_PIX_FMT_FLAG_HWACCEL ? 'H' : '.', - pix_desc->flags & AV_PIX_FMT_FLAG_PAL ? 'P' : '.', - pix_desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ? 'B' : '.', - pix_desc->name, - pix_desc->nb_components, - av_get_bits_per_pixel(pix_desc)); - } - return 0; -} - -int show_layouts(void *optctx, const char *opt, const char *arg) -{ - int i = 0; - uint64_t layout, j; - const char *name, *descr; - - printf("Individual channels:\n" - "NAME DESCRIPTION\n"); - for (i = 0; i < 63; i++) { - name = av_get_channel_name((uint64_t)1 << i); - if (!name) - continue; - descr = av_get_channel_description((uint64_t)1 << i); - printf("%-12s%s\n", name, descr); - } - printf("\nStandard channel layouts:\n" - "NAME DECOMPOSITION\n"); - for (i = 0; !av_get_standard_channel_layout(i, &layout, &name); i++) { - if (name) { - printf("%-12s", name); - for (j = 1; j; j <<= 1) - if ((layout & j)) - printf("%s%s", (layout & (j - 1)) ? "+" : "", av_get_channel_name(j)); - printf("\n"); - } - } - return 0; -} - -int show_sample_fmts(void *optctx, const char *opt, const char *arg) -{ - int i; - char fmt_str[128]; - for (i = -1; i < AV_SAMPLE_FMT_NB; i++) - printf("%s\n", av_get_sample_fmt_string(fmt_str, sizeof(fmt_str), i)); - return 0; -} - -static void show_help_codec(const char *name, int encoder) -{ - const AVCodecDescriptor *desc; - const AVCodec *codec; - - if (!name) { - av_log(NULL, AV_LOG_ERROR, "No codec name specified.\n"); - return; - } - - codec = encoder ? avcodec_find_encoder_by_name(name) : - avcodec_find_decoder_by_name(name); - - if (codec) - print_codec(codec); - else if ((desc = avcodec_descriptor_get_by_name(name))) { - int printed = 0; - - while ((codec = next_codec_for_id(desc->id, codec, encoder))) { - printed = 1; - print_codec(codec); - } - - if (!printed) { - av_log(NULL, AV_LOG_ERROR, "Codec '%s' is known to FFmpeg, " - "but no %s for it are available. FFmpeg might need to be " - "recompiled with additional external libraries.\n", - name, encoder ? "encoders" : "decoders"); - } - } else { - av_log(NULL, AV_LOG_ERROR, "Codec '%s' is not recognized by FFmpeg.\n", - name); - } -} - -static void show_help_demuxer(const char *name) -{ - const AVInputFormat *fmt = av_find_input_format(name); - - if (!fmt) { - av_log(NULL, AV_LOG_ERROR, "Unknown format '%s'.\n", name); - return; - } - - printf("Demuxer %s [%s]:\n", fmt->name, fmt->long_name); - - if (fmt->extensions) - printf(" Common extensions: %s.\n", fmt->extensions); - - if (fmt->priv_class) - show_help_children(fmt->priv_class, AV_OPT_FLAG_DECODING_PARAM); -} - -static void show_help_muxer(const char *name) -{ - const AVCodecDescriptor *desc; - const AVOutputFormat *fmt = av_guess_format(name, NULL, NULL); - - if (!fmt) { - av_log(NULL, AV_LOG_ERROR, "Unknown format '%s'.\n", name); - return; - } - - printf("Muxer %s [%s]:\n", fmt->name, fmt->long_name); - - if (fmt->extensions) - printf(" Common extensions: %s.\n", fmt->extensions); - if (fmt->mime_type) - printf(" Mime type: %s.\n", fmt->mime_type); - if (fmt->video_codec != AV_CODEC_ID_NONE && - (desc = avcodec_descriptor_get(fmt->video_codec))) { - printf(" Default video codec: %s.\n", desc->name); - } - if (fmt->audio_codec != AV_CODEC_ID_NONE && - (desc = avcodec_descriptor_get(fmt->audio_codec))) { - printf(" Default audio codec: %s.\n", desc->name); - } - if (fmt->subtitle_codec != AV_CODEC_ID_NONE && - (desc = avcodec_descriptor_get(fmt->subtitle_codec))) { - printf(" Default subtitle codec: %s.\n", desc->name); - } - - if (fmt->priv_class) - show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM); -} - -#if CONFIG_AVFILTER -static void show_help_filter(const char *name) -{ -#if CONFIG_AVFILTER - const AVFilter *f = avfilter_get_by_name(name); - int i, count; - - if (!name) { - av_log(NULL, AV_LOG_ERROR, "No filter name specified.\n"); - return; - } else if (!f) { - av_log(NULL, AV_LOG_ERROR, "Unknown filter '%s'.\n", name); - return; - } - - printf("Filter %s\n", f->name); - if (f->description) - printf(" %s\n", f->description); - - if (f->flags & AVFILTER_FLAG_SLICE_THREADS) - printf(" slice threading supported\n"); - - printf(" Inputs:\n"); - count = avfilter_pad_count(f->inputs); - for (i = 0; i < count; i++) { - printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i), - media_type_string(avfilter_pad_get_type(f->inputs, i))); - } - if (f->flags & AVFILTER_FLAG_DYNAMIC_INPUTS) - printf(" dynamic (depending on the options)\n"); - else if (!count) - printf(" none (source filter)\n"); - - printf(" Outputs:\n"); - count = avfilter_pad_count(f->outputs); - for (i = 0; i < count; i++) { - printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i), - media_type_string(avfilter_pad_get_type(f->outputs, i))); - } - if (f->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS) - printf(" dynamic (depending on the options)\n"); - else if (!count) - printf(" none (sink filter)\n"); - - if (f->priv_class) - show_help_children(f->priv_class, AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | - AV_OPT_FLAG_AUDIO_PARAM); - if (f->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) - printf("This filter has support for timeline through the 'enable' option.\n"); -#else - av_log(NULL, AV_LOG_ERROR, "Build without libavfilter; " - "can not to satisfy request\n"); -#endif -} -#endif - -int show_help(void *optctx, const char *opt, const char *arg) -{ - char *topic, *par; - av_log_set_callback(log_callback_help); - - topic = av_strdup(arg ? arg : ""); - par = strchr(topic, '='); - if (par) - *par++ = 0; - - if (!*topic) { - show_help_default(topic, par); - } else if (!strcmp(topic, "decoder")) { - show_help_codec(par, 0); - } else if (!strcmp(topic, "encoder")) { - show_help_codec(par, 1); - } else if (!strcmp(topic, "demuxer")) { - show_help_demuxer(par); - } else if (!strcmp(topic, "muxer")) { - show_help_muxer(par); -#if CONFIG_AVFILTER - } else if (!strcmp(topic, "filter")) { - show_help_filter(par); -#endif - } else { - show_help_default(topic, par); - } - - av_freep(&topic); - return 0; -} - -int read_yesno(void) -{ - int c = getchar(); - int yesno = (av_toupper(c) == 'Y'); - - while (c != '\n' && c != EOF) - c = getchar(); - - return yesno; -} - -int cmdutils_read_file(const char *filename, char **bufptr, size_t *size) -{ - int ret; - FILE *f = fopen(filename, "rb"); - - if (!f) { - av_log(NULL, AV_LOG_ERROR, "Cannot read file '%s': %s\n", filename, - strerror(errno)); - return AVERROR(errno); - } - fseek(f, 0, SEEK_END); - *size = ftell(f); - fseek(f, 0, SEEK_SET); - if (*size == (size_t)-1) { - av_log(NULL, AV_LOG_ERROR, "IO error: %s\n", strerror(errno)); - fclose(f); - return AVERROR(errno); - } - *bufptr = av_malloc(*size + 1); - if (!*bufptr) { - av_log(NULL, AV_LOG_ERROR, "Could not allocate file buffer\n"); - fclose(f); - return AVERROR(ENOMEM); - } - ret = fread(*bufptr, 1, *size, f); - if (ret < *size) { - av_free(*bufptr); - if (ferror(f)) { - av_log(NULL, AV_LOG_ERROR, "Error while reading file '%s': %s\n", - filename, strerror(errno)); - ret = AVERROR(errno); - } else - ret = AVERROR_EOF; - } else { - ret = 0; - (*bufptr)[(*size)++] = '\0'; - } - - fclose(f); - return ret; -} - -FILE *get_preset_file(char *filename, size_t filename_size, - const char *preset_name, int is_path, - const char *codec_name) -{ - FILE *f = NULL; - int i; - const char *base[3] = { getenv("FFMPEG_DATADIR"), - getenv("HOME"), - FFMPEG_DATADIR, }; - - if (is_path) { - av_strlcpy(filename, preset_name, filename_size); - f = fopen(filename, "r"); - } else { -#ifdef _WIN32 - char datadir[MAX_PATH], *ls; - base[2] = NULL; - - if (GetModuleFileNameA(GetModuleHandleA(NULL), datadir, sizeof(datadir) - 1)) - { - for (ls = datadir; ls < datadir + strlen(datadir); ls++) - if (*ls == '\\') *ls = '/'; - - if (ls = strrchr(datadir, '/')) - { - *ls = 0; - strncat(datadir, "/ffpresets", sizeof(datadir) - 1 - strlen(datadir)); - base[2] = datadir; - } - } -#endif - for (i = 0; i < 3 && !f; i++) { - if (!base[i]) - continue; - snprintf(filename, filename_size, "%s%s/%s.ffpreset", base[i], - i != 1 ? "" : "/.ffmpeg", preset_name); - f = fopen(filename, "r"); - if (!f && codec_name) { - snprintf(filename, filename_size, - "%s%s/%s-%s.ffpreset", - base[i], i != 1 ? "" : "/.ffmpeg", codec_name, - preset_name); - f = fopen(filename, "r"); - } - } - } - - return f; -} - -int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) -{ - int ret = avformat_match_stream_specifier(s, st, spec); - if (ret < 0) - av_log(s, AV_LOG_ERROR, "Invalid stream specifier: %s.\n", spec); - return ret; -} - -AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, - AVFormatContext *s, AVStream *st, AVCodec *codec) -{ - AVDictionary *ret = NULL; - AVDictionaryEntry *t = NULL; - int flags = s->oformat ? AV_OPT_FLAG_ENCODING_PARAM - : AV_OPT_FLAG_DECODING_PARAM; - char prefix = 0; - const AVClass *cc = avcodec_get_class(); - - if (!codec) - codec = s->oformat ? avcodec_find_encoder(codec_id) - : avcodec_find_decoder(codec_id); - - switch (st->codec->codec_type) { - case AVMEDIA_TYPE_VIDEO: - prefix = 'v'; - flags |= AV_OPT_FLAG_VIDEO_PARAM; - break; - case AVMEDIA_TYPE_AUDIO: - prefix = 'a'; - flags |= AV_OPT_FLAG_AUDIO_PARAM; - break; - case AVMEDIA_TYPE_SUBTITLE: - prefix = 's'; - flags |= AV_OPT_FLAG_SUBTITLE_PARAM; - break; - } - - while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) { - char *p = strchr(t->key, ':'); - - /* check stream specification in opt name */ - if (p) - switch (check_stream_specifier(s, st, p + 1)) { - case 1: *p = 0; break; - case 0: continue; - default: return NULL; - } - - if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) || - (codec && codec->priv_class && - av_opt_find(&codec->priv_class, t->key, NULL, flags, - AV_OPT_SEARCH_FAKE_OBJ))) - av_dict_set(&ret, t->key, t->value, 0); - else if (t->key[0] == prefix && - av_opt_find(&cc, t->key + 1, NULL, flags, - AV_OPT_SEARCH_FAKE_OBJ)) - av_dict_set(&ret, t->key + 1, t->value, 0); - - if (p) - *p = ':'; - } - return ret; -} - -AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, - AVDictionary *codec_opts) -{ - int i; - AVDictionary **opts; - - if (!s->nb_streams) - return NULL; - opts = av_mallocz(s->nb_streams * sizeof(*opts)); - if (!opts) { - av_log(NULL, AV_LOG_ERROR, - "Could not alloc memory for stream options.\n"); - return NULL; - } - for (i = 0; i < s->nb_streams; i++) - opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codec->codec_id, - s, s->streams[i], NULL); - return opts; -} - -void *grow_array(void *array, int elem_size, int *size, int new_size) -{ - if (new_size >= INT_MAX / elem_size) { - av_log(NULL, AV_LOG_ERROR, "Array too big.\n"); - exit_program(1); - } - if (*size < new_size) { - uint8_t *tmp = av_realloc(array, new_size*elem_size); - if (!tmp) { - av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n"); - exit_program(1); - } - memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size); - *size = new_size; - return tmp; - } - return array; -} diff --git a/bundle/ffmpeg/cmdutils.h b/bundle/ffmpeg/cmdutils.h deleted file mode 100644 index 2538f05d98..0000000000 --- a/bundle/ffmpeg/cmdutils.h +++ /dev/null @@ -1,571 +0,0 @@ -/* - * Various utilities for command line tools - * copyright (c) 2003 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FFMPEG_CMDUTILS_H -#define FFMPEG_CMDUTILS_H - -#include - -#include "libavcodec/avcodec.h" -#include "libavfilter/avfilter.h" -#include "libavformat/avformat.h" -#include "libswscale/swscale.h" - -#ifdef __MINGW32__ -#undef main /* We don't want SDL to override our main() */ -#endif - -/** - * program name, defined by the program for show_version(). - */ -extern const char program_name[]; - -/** - * program birth year, defined by the program for show_banner() - */ -extern const int program_birth_year; - -/** - * this year, defined by the program for show_banner() - */ -extern const int this_year; - -extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB]; -extern AVFormatContext *avformat_opts; -extern struct SwsContext *sws_opts; -extern AVDictionary *swr_opts; -extern AVDictionary *format_opts, *codec_opts, *resample_opts; - -/** - * Register a program-specific cleanup routine. - */ -void register_exit(void (*cb)(int ret)); - -/** - * Wraps exit with a program-specific cleanup routine. - */ -void exit_program(int ret); - -/** - * Initialize the cmdutils option system, in particular - * allocate the *_opts contexts. - */ -void init_opts(void); -/** - * Uninitialize the cmdutils option system, in particular - * free the *_opts contexts and their contents. - */ -void uninit_opts(void); - -/** - * Trivial log callback. - * Only suitable for opt_help and similar since it lacks prefix handling. - */ -void log_callback_help(void* ptr, int level, const char* fmt, va_list vl); - -/** - * Override the cpuflags. - */ -int opt_cpuflags(void *optctx, const char *opt, const char *arg); - -/** - * Fallback for options that are not explicitly handled, these will be - * parsed through AVOptions. - */ -int opt_default(void *optctx, const char *opt, const char *arg); - -/** - * Set the libav* libraries log level. - */ -int opt_loglevel(void *optctx, const char *opt, const char *arg); - -int opt_report(const char *opt); - -int opt_max_alloc(void *optctx, const char *opt, const char *arg); - -int opt_codec_debug(void *optctx, const char *opt, const char *arg); - -int opt_opencl(void *optctx, const char *opt, const char *arg); - -/** - * Limit the execution time. - */ -int opt_timelimit(void *optctx, const char *opt, const char *arg); - -/** - * Parse a string and return its corresponding value as a double. - * Exit from the application if the string cannot be correctly - * parsed or the corresponding value is invalid. - * - * @param context the context of the value to be set (e.g. the - * corresponding command line option name) - * @param numstr the string to be parsed - * @param type the type (OPT_INT64 or OPT_FLOAT) as which the - * string should be parsed - * @param min the minimum valid accepted value - * @param max the maximum valid accepted value - */ -double parse_number_or_die(const char *context, const char *numstr, int type, - double min, double max); - -/** - * Parse a string specifying a time and return its corresponding - * value as a number of microseconds. Exit from the application if - * the string cannot be correctly parsed. - * - * @param context the context of the value to be set (e.g. the - * corresponding command line option name) - * @param timestr the string to be parsed - * @param is_duration a flag which tells how to interpret timestr, if - * not zero timestr is interpreted as a duration, otherwise as a - * date - * - * @see av_parse_time() - */ -int64_t parse_time_or_die(const char *context, const char *timestr, - int is_duration); - -typedef struct SpecifierOpt { - char *specifier; /**< stream/chapter/program/... specifier */ - union { - uint8_t *str; - int i; - int64_t i64; - float f; - double dbl; - } u; -} SpecifierOpt; - -typedef struct OptionDef { - const char *name; - int flags; -#define HAS_ARG 0x0001 -#define OPT_BOOL 0x0002 -#define OPT_EXPERT 0x0004 -#define OPT_STRING 0x0008 -#define OPT_VIDEO 0x0010 -#define OPT_AUDIO 0x0020 -#define OPT_INT 0x0080 -#define OPT_FLOAT 0x0100 -#define OPT_SUBTITLE 0x0200 -#define OPT_INT64 0x0400 -#define OPT_EXIT 0x0800 -#define OPT_DATA 0x1000 -#define OPT_PERFILE 0x2000 /* the option is per-file (currently ffmpeg-only). - implied by OPT_OFFSET or OPT_SPEC */ -#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */ -#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt. - Implies OPT_OFFSET. Next element after the offset is - an int containing element count in the array. */ -#define OPT_TIME 0x10000 -#define OPT_DOUBLE 0x20000 -#define OPT_INPUT 0x40000 -#define OPT_OUTPUT 0x80000 - union { - void *dst_ptr; - int (*func_arg)(void *, const char *, const char *); - size_t off; - } u; - const char *help; - const char *argname; -} OptionDef; - -/** - * Print help for all options matching specified flags. - * - * @param options a list of options - * @param msg title of this group. Only printed if at least one option matches. - * @param req_flags print only options which have all those flags set. - * @param rej_flags don't print options which have any of those flags set. - * @param alt_flags print only options that have at least one of those flags set - */ -void show_help_options(const OptionDef *options, const char *msg, int req_flags, - int rej_flags, int alt_flags); - -/** - * Show help for all options with given flags in class and all its - * children. - */ -void show_help_children(const AVClass *class, int flags); - -/** - * Per-fftool specific help handler. Implemented in each - * fftool, called by show_help(). - */ -void show_help_default(const char *opt, const char *arg); - -/** - * Generic -h handler common to all fftools. - */ -int show_help(void *optctx, const char *opt, const char *arg); - -/** - * Parse the command line arguments. - * - * @param optctx an opaque options context - * @param argc number of command line arguments - * @param argv values of command line arguments - * @param options Array with the definitions required to interpret every - * option of the form: -option_name [argument] - * @param parse_arg_function Name of the function called to process every - * argument without a leading option name flag. NULL if such arguments do - * not have to be processed. - */ -void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, - void (* parse_arg_function)(void *optctx, const char*)); - -/** - * Parse one given option. - * - * @return on success 1 if arg was consumed, 0 otherwise; negative number on error - */ -int parse_option(void *optctx, const char *opt, const char *arg, - const OptionDef *options); - -/** - * An option extracted from the commandline. - * Cannot use AVDictionary because of options like -map which can be - * used multiple times. - */ -typedef struct Option { - const OptionDef *opt; - const char *key; - const char *val; -} Option; - -typedef struct OptionGroupDef { - /**< group name */ - const char *name; - /** - * Option to be used as group separator. Can be NULL for groups which - * are terminated by a non-option argument (e.g. ffmpeg output files) - */ - const char *sep; - /** - * Option flags that must be set on each option that is - * applied to this group - */ - int flags; -} OptionGroupDef; - -typedef struct OptionGroup { - const OptionGroupDef *group_def; - const char *arg; - - Option *opts; - int nb_opts; - - AVDictionary *codec_opts; - AVDictionary *format_opts; - AVDictionary *resample_opts; - struct SwsContext *sws_opts; - AVDictionary *swr_opts; -} OptionGroup; - -/** - * A list of option groups that all have the same group type - * (e.g. input files or output files) - */ -typedef struct OptionGroupList { - const OptionGroupDef *group_def; - - OptionGroup *groups; - int nb_groups; -} OptionGroupList; - -typedef struct OptionParseContext { - OptionGroup global_opts; - - OptionGroupList *groups; - int nb_groups; - - /* parsing state */ - OptionGroup cur_group; -} OptionParseContext; - -/** - * Parse an options group and write results into optctx. - * - * @param optctx an app-specific options context. NULL for global options group - */ -int parse_optgroup(void *optctx, OptionGroup *g); - -/** - * Split the commandline into an intermediate form convenient for further - * processing. - * - * The commandline is assumed to be composed of options which either belong to a - * group (those with OPT_SPEC, OPT_OFFSET or OPT_PERFILE) or are global - * (everything else). - * - * A group (defined by an OptionGroupDef struct) is a sequence of options - * terminated by either a group separator option (e.g. -i) or a parameter that - * is not an option (doesn't start with -). A group without a separator option - * must always be first in the supplied groups list. - * - * All options within the same group are stored in one OptionGroup struct in an - * OptionGroupList, all groups with the same group definition are stored in one - * OptionGroupList in OptionParseContext.groups. The order of group lists is the - * same as the order of group definitions. - */ -int split_commandline(OptionParseContext *octx, int argc, char *argv[], - const OptionDef *options, - const OptionGroupDef *groups, int nb_groups); - -/** - * Free all allocated memory in an OptionParseContext. - */ -void uninit_parse_context(OptionParseContext *octx); - -/** - * Find the '-loglevel' option in the command line args and apply it. - */ -void parse_loglevel(int argc, char **argv, const OptionDef *options); - -/** - * Return index of option opt in argv or 0 if not found. - */ -int locate_option(int argc, char **argv, const OptionDef *options, - const char *optname); - -/** - * Check if the given stream matches a stream specifier. - * - * @param s Corresponding format context. - * @param st Stream from s to be checked. - * @param spec A stream specifier of the [v|a|s|d]:[\] form. - * - * @return 1 if the stream matches, 0 if it doesn't, <0 on error - */ -int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); - -/** - * Filter out options for given codec. - * - * Create a new options dictionary containing only the options from - * opts which apply to the codec with ID codec_id. - * - * @param opts dictionary to place options in - * @param codec_id ID of the codec that should be filtered for - * @param s Corresponding format context. - * @param st A stream from s for which the options should be filtered. - * @param codec The particular codec for which the options should be filtered. - * If null, the default one is looked up according to the codec id. - * @return a pointer to the created dictionary - */ -AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, - AVFormatContext *s, AVStream *st, AVCodec *codec); - -/** - * Setup AVCodecContext options for avformat_find_stream_info(). - * - * Create an array of dictionaries, one dictionary for each stream - * contained in s. - * Each dictionary will contain the options from codec_opts which can - * be applied to the corresponding stream codec context. - * - * @return pointer to the created array of dictionaries, NULL if it - * cannot be created - */ -AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, - AVDictionary *codec_opts); - -/** - * Print an error message to stderr, indicating filename and a human - * readable description of the error code err. - * - * If strerror_r() is not available the use of this function in a - * multithreaded application may be unsafe. - * - * @see av_strerror() - */ -void print_error(const char *filename, int err); - -/** - * Print the program banner to stderr. The banner contents depend on the - * current version of the repository and of the libav* libraries used by - * the program. - */ -void show_banner(int argc, char **argv, const OptionDef *options); - -/** - * Print the version of the program to stdout. The version message - * depends on the current versions of the repository and of the libav* - * libraries. - * This option processing function does not utilize the arguments. - */ -int show_version(void *optctx, const char *opt, const char *arg); - -/** - * Print the license of the program to stdout. The license depends on - * the license of the libraries compiled into the program. - * This option processing function does not utilize the arguments. - */ -int show_license(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the formats supported by the - * program. - * This option processing function does not utilize the arguments. - */ -int show_formats(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the codecs supported by the - * program. - * This option processing function does not utilize the arguments. - */ -int show_codecs(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the decoders supported by the - * program. - */ -int show_decoders(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the encoders supported by the - * program. - */ -int show_encoders(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the filters supported by the - * program. - * This option processing function does not utilize the arguments. - */ -int show_filters(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the bit stream filters supported by the - * program. - * This option processing function does not utilize the arguments. - */ -int show_bsfs(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the protocols supported by the - * program. - * This option processing function does not utilize the arguments. - */ -int show_protocols(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the pixel formats supported by the - * program. - * This option processing function does not utilize the arguments. - */ -int show_pix_fmts(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the standard channel layouts supported by - * the program. - * This option processing function does not utilize the arguments. - */ -int show_layouts(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the sample formats supported by the - * program. - */ -int show_sample_fmts(void *optctx, const char *opt, const char *arg); - -/** - * Print a listing containing all the color names and values recognized - * by the program. - */ -void show_colors(void *optctx, const char *opt, const char *arg); - -/** - * Return a positive value if a line read from standard input - * starts with [yY], otherwise return 0. - */ -int read_yesno(void); - -/** - * Read the file with name filename, and put its content in a newly - * allocated 0-terminated buffer. - * - * @param filename file to read from - * @param bufptr location where pointer to buffer is returned - * @param size location where size of buffer is returned - * @return >= 0 in case of success, a negative value corresponding to an - * AVERROR error code in case of failure. - */ -int cmdutils_read_file(const char *filename, char **bufptr, size_t *size); - -/** - * Get a file corresponding to a preset file. - * - * If is_path is non-zero, look for the file in the path preset_name. - * Otherwise search for a file named arg.ffpreset in the directories - * $FFMPEG_DATADIR (if set), $HOME/.ffmpeg, and in the datadir defined - * at configuration time or in a "ffpresets" folder along the executable - * on win32, in that order. If no such file is found and - * codec_name is defined, then search for a file named - * codec_name-preset_name.avpreset in the above-mentioned directories. - * - * @param filename buffer where the name of the found filename is written - * @param filename_size size in bytes of the filename buffer - * @param preset_name name of the preset to search - * @param is_path tell if preset_name is a filename path - * @param codec_name name of the codec for which to look for the - * preset, may be NULL - */ -FILE *get_preset_file(char *filename, size_t filename_size, - const char *preset_name, int is_path, const char *codec_name); - -/** - * Realloc array to hold new_size elements of elem_size. - * Calls exit() on failure. - * - * @param array array to reallocate - * @param elem_size size in bytes of each element - * @param size new element count will be written here - * @param new_size number of elements to place in reallocated array - * @return reallocated array - */ -void *grow_array(void *array, int elem_size, int *size, int new_size); - -#define media_type_string av_get_media_type_string - -#define GROW_ARRAY(array, nb_elems)\ - array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) - -#define GET_PIX_FMT_NAME(pix_fmt)\ - const char *name = av_get_pix_fmt_name(pix_fmt); - -#define GET_SAMPLE_FMT_NAME(sample_fmt)\ - const char *name = av_get_sample_fmt_name(sample_fmt) - -#define GET_SAMPLE_RATE_NAME(rate)\ - char name[16];\ - snprintf(name, sizeof(name), "%d", rate); - -#define GET_CH_LAYOUT_NAME(ch_layout)\ - char name[16];\ - snprintf(name, sizeof(name), "0x%"PRIx64, ch_layout); - -#define GET_CH_LAYOUT_DESC(ch_layout)\ - char name[128];\ - av_get_channel_layout_string(name, sizeof(name), 0, ch_layout); - -#endif /* CMDUTILS_H */ diff --git a/bundle/ffmpeg/cmdutils_common_opts.h b/bundle/ffmpeg/cmdutils_common_opts.h deleted file mode 100644 index 69663039e0..0000000000 --- a/bundle/ffmpeg/cmdutils_common_opts.h +++ /dev/null @@ -1,25 +0,0 @@ - { "L" , OPT_EXIT, {.func_arg = show_license}, "show license" }, - { "h" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" }, - { "?" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" }, - { "help" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" }, - { "-help" , OPT_EXIT, {.func_arg = show_help}, "show help", "topic" }, - { "version" , OPT_EXIT, {.func_arg = show_version}, "show version" }, - { "formats" , OPT_EXIT, {.func_arg = show_formats }, "show available formats" }, - { "codecs" , OPT_EXIT, {.func_arg = show_codecs }, "show available codecs" }, - { "decoders" , OPT_EXIT, {.func_arg = show_decoders }, "show available decoders" }, - { "encoders" , OPT_EXIT, {.func_arg = show_encoders }, "show available encoders" }, - { "bsfs" , OPT_EXIT, {.func_arg = show_bsfs }, "show available bit stream filters" }, - { "protocols" , OPT_EXIT, {.func_arg = show_protocols}, "show available protocols" }, - { "filters" , OPT_EXIT, {.func_arg = show_filters }, "show available filters" }, - { "pix_fmts" , OPT_EXIT, {.func_arg = show_pix_fmts }, "show available pixel formats" }, - { "layouts" , OPT_EXIT, {.func_arg = show_layouts }, "show standard channel layouts" }, - { "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" }, - { "colors" , OPT_EXIT, {.func_arg = show_colors }, "show available color names" }, - { "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" }, - { "v", HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" }, - { "report" , 0, {(void*)opt_report}, "generate a report" }, - { "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" }, - { "cpuflags" , HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" }, -#if CONFIG_OPENCL - { "opencl_options", HAS_ARG, {.func_arg = opt_opencl}, "set OpenCL environment options" }, -#endif diff --git a/bundle/ffmpeg/common.mak b/bundle/ffmpeg/common.mak deleted file mode 100644 index 6479b08e3c..0000000000 --- a/bundle/ffmpeg/common.mak +++ /dev/null @@ -1,142 +0,0 @@ -# -# common bits used by all libraries -# - -# first so "all" becomes default target -all: all-yes - -ifndef SUBDIR - -ifndef V -Q = @ -ECHO = printf "$(1)\t%s\n" $(2) -BRIEF = CC CXX HOSTCC HOSTLD AS YASM AR LD STRIP CP -SILENT = DEPCC DEPHOSTCC DEPAS DEPYASM RANLIB RM - -MSG = $@ -M = @$(call ECHO,$(TAG),$@); -$(foreach VAR,$(BRIEF), \ - $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) -$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR)))) -$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) -endif - -ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample - -# NASM requires -I path terminated with / -IFLAGS := -I. -I$(SRC_PATH)/ -CPPFLAGS := $(IFLAGS) $(CPPFLAGS) -CFLAGS += $(ECFLAGS) -CCFLAGS = $(CPPFLAGS) $(CFLAGS) -ASFLAGS := $(CPPFLAGS) $(ASFLAGS) -CXXFLAGS += $(CPPFLAGS) $(CFLAGS) -YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm - -HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS) -LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS) - -define COMPILE - $(call $(1)DEP,$(1)) - $($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $< -endef - -COMPILE_C = $(call COMPILE,CC) -COMPILE_CXX = $(call COMPILE,CXX) -COMPILE_S = $(call COMPILE,AS) - -%.o: %.c - $(COMPILE_C) - -%.o: %.cpp - $(COMPILE_CXX) - -%.s: %.c - $(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $< - -%.o: %.S - $(COMPILE_S) - -%.i: %.c - $(CC) $(CCFLAGS) $(CC_E) $< - -%.h.c: - $(Q)echo '#include "$*.h"' >$@ - -%.ver: %.v - $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ - -%.c %.h: TAG = GEN - -# Dummy rule to stop make trying to rebuild removed or renamed headers -%.h: - @: - -# Disable suffix rules. Most of the builtin rules are suffix rules, -# so this saves some time on slow systems. -.SUFFIXES: - -# Do not delete intermediate files from chains of implicit rules -$(OBJS): -endif - -include $(SRC_PATH)/arch.mak - -OBJS += $(OBJS-yes) -FFLIBS := $(FFLIBS-yes) $(FFLIBS) -TESTPROGS += $(TESTPROGS-yes) - -LDLIBS = $(FFLIBS:%=%$(BUILDSUF)) -FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS) - -EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF)) -OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) -TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o) -TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF)) -HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o) -HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF)) -TOOLS += $(TOOLS-yes) -TOOLOBJS := $(TOOLS:%=tools/%.o) -TOOLS := $(TOOLS:%=tools/%$(EXESUF)) -HEADERS += $(HEADERS-yes) - -PATH_LIBNAME = $(foreach NAME,$(1),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME)) -DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib))) - -SRC_DIR := $(SRC_PATH)/lib$(NAME) -ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h)) -SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) -SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) -HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o)) -checkheaders: $(HOBJS) -.SECONDARY: $(HOBJS:.o=.c) - -alltools: $(TOOLS) - -$(HOSTOBJS): %.o: %.c - $(call COMPILE,HOSTCC) - -$(HOSTPROGS): %$(HOSTEXESUF): %.o - $(HOSTLD) $(HOSTLDFLAGS) $(HOSTLD_O) $< $(HOSTLIBS) - -$(OBJS): | $(sort $(dir $(OBJS))) -$(HOBJS): | $(sort $(dir $(HOBJS))) -$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS))) -$(TESTOBJS): | $(sort $(dir $(TESTOBJS))) -$(TOOLOBJS): | tools - -OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOBJS) $(HOSTOBJS) $(TESTOBJS)) - -CLEANSUFFIXES = *.d *.o *~ *.h.c *.map *.ver *.ho *.gcno *.gcda -DISTCLEANSUFFIXES = *.pc -LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a - -define RULES -clean:: - $(RM) $(OBJS) $(OBJS:.o=.d) - $(RM) $(HOSTPROGS) - $(RM) $(TOOLS) -endef - -$(eval $(RULES)) - --include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d)) diff --git a/bundle/ffmpeg/compat/aix/math.h b/bundle/ffmpeg/compat/aix/math.h deleted file mode 100644 index 65a89c4565..0000000000 --- a/bundle/ffmpeg/compat/aix/math.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Work around the class() function in AIX math.h clashing with - * identifiers named "class". - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FFMPEG_COMPAT_AIX_MATH_H -#define FFMPEG_COMPAT_AIX_MATH_H - -#define class class_in_math_h_causes_problems - -#include_next - -#undef class - -#endif /* FFMPEG_COMPAT_AIX_MATH_H */ diff --git a/bundle/ffmpeg/compat/avisynth/avisynth_c.h b/bundle/ffmpeg/compat/avisynth/avisynth_c.h deleted file mode 100644 index 84b6e13684..0000000000 --- a/bundle/ffmpeg/compat/avisynth/avisynth_c.h +++ /dev/null @@ -1,879 +0,0 @@ -// Avisynth C Interface Version 0.20 -// Copyright 2003 Kevin Atkinson - -// 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 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, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit -// http://www.gnu.org/copyleft/gpl.html . -// -// As a special exception, I give you permission to link to the -// Avisynth C interface with independent modules that communicate with -// the Avisynth C interface solely through the interfaces defined in -// avisynth_c.h, regardless of the license terms of these independent -// modules, and to copy and distribute the resulting combined work -// under terms of your choice, provided that every copy of the -// combined work is accompanied by a complete copy of the source code -// of the Avisynth C interface and Avisynth itself (with the version -// used to produce the combined work), being distributed under the -// terms of the GNU General Public License plus this exception. An -// independent module is a module which is not derived from or based -// on Avisynth C Interface, such as 3rd-party filters, import and -// export plugins, or graphical user interfaces. - -// NOTE: this is a partial update of the Avisynth C interface to recognize -// new color spaces added in Avisynth 2.60. By no means is this document -// completely Avisynth 2.60 compliant. - -#ifndef __AVISYNTH_C__ -#define __AVISYNTH_C__ - -#ifdef __cplusplus -# define EXTERN_C extern "C" -#else -# define EXTERN_C -#endif - -#define AVSC_USE_STDCALL 1 - -#ifndef AVSC_USE_STDCALL -# define AVSC_CC __cdecl -#else -# define AVSC_CC __stdcall -#endif - -#define AVSC_INLINE static __inline - -#ifdef AVISYNTH_C_EXPORTS -# define AVSC_EXPORT EXTERN_C -# define AVSC_API(ret, name) EXTERN_C __declspec(dllexport) ret AVSC_CC name -#else -# define AVSC_EXPORT EXTERN_C __declspec(dllexport) -# ifndef AVSC_NO_DECLSPEC -# define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name -# else -# define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func) -# endif -#endif - -typedef unsigned char BYTE; -#ifdef __GNUC__ -typedef long long int INT64; -#else -typedef __int64 INT64; -#endif - - -///////////////////////////////////////////////////////////////////// -// -// Constants -// - -#ifndef __AVISYNTH_H__ -enum { AVISYNTH_INTERFACE_VERSION = 4 }; -#endif - -enum {AVS_SAMPLE_INT8 = 1<<0, - AVS_SAMPLE_INT16 = 1<<1, - AVS_SAMPLE_INT24 = 1<<2, - AVS_SAMPLE_INT32 = 1<<3, - AVS_SAMPLE_FLOAT = 1<<4}; - -enum {AVS_PLANAR_Y=1<<0, - AVS_PLANAR_U=1<<1, - AVS_PLANAR_V=1<<2, - AVS_PLANAR_ALIGNED=1<<3, - AVS_PLANAR_Y_ALIGNED=AVS_PLANAR_Y|AVS_PLANAR_ALIGNED, - AVS_PLANAR_U_ALIGNED=AVS_PLANAR_U|AVS_PLANAR_ALIGNED, - AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED, - AVS_PLANAR_A=1<<4, - AVS_PLANAR_R=1<<5, - AVS_PLANAR_G=1<<6, - AVS_PLANAR_B=1<<7, - AVS_PLANAR_A_ALIGNED=AVS_PLANAR_A|AVS_PLANAR_ALIGNED, - AVS_PLANAR_R_ALIGNED=AVS_PLANAR_R|AVS_PLANAR_ALIGNED, - AVS_PLANAR_G_ALIGNED=AVS_PLANAR_G|AVS_PLANAR_ALIGNED, - AVS_PLANAR_B_ALIGNED=AVS_PLANAR_B|AVS_PLANAR_ALIGNED}; - - // Colorspace properties. -enum {AVS_CS_BGR = 1<<28, - AVS_CS_YUV = 1<<29, - AVS_CS_INTERLEAVED = 1<<30, - AVS_CS_PLANAR = 1<<31, - - AVS_CS_SHIFT_SUB_WIDTH = 0, - AVS_CS_SHIFT_SUB_HEIGHT = 1 << 3, - AVS_CS_SHIFT_SAMPLE_BITS = 1 << 4, - - AVS_CS_SUB_WIDTH_MASK = 7 << AVS_CS_SHIFT_SUB_WIDTH, - AVS_CS_SUB_WIDTH_1 = 3 << AVS_CS_SHIFT_SUB_WIDTH, // YV24 - AVS_CS_SUB_WIDTH_2 = 0 << AVS_CS_SHIFT_SUB_WIDTH, // YV12, I420, YV16 - AVS_CS_SUB_WIDTH_4 = 1 << AVS_CS_SHIFT_SUB_WIDTH, // YUV9, YV411 - - AVS_CS_VPLANEFIRST = 1 << 3, // YV12, YV16, YV24, YV411, YUV9 - AVS_CS_UPLANEFIRST = 1 << 4, // I420 - - AVS_CS_SUB_HEIGHT_MASK = 7 << AVS_CS_SHIFT_SUB_HEIGHT, - AVS_CS_SUB_HEIGHT_1 = 3 << AVS_CS_SHIFT_SUB_HEIGHT, // YV16, YV24, YV411 - AVS_CS_SUB_HEIGHT_2 = 0 << AVS_CS_SHIFT_SUB_HEIGHT, // YV12, I420 - AVS_CS_SUB_HEIGHT_4 = 1 << AVS_CS_SHIFT_SUB_HEIGHT, // YUV9 - - AVS_CS_SAMPLE_BITS_MASK = 7 << AVS_CS_SHIFT_SAMPLE_BITS, - AVS_CS_SAMPLE_BITS_8 = 0 << AVS_CS_SHIFT_SAMPLE_BITS, - AVS_CS_SAMPLE_BITS_16 = 1 << AVS_CS_SHIFT_SAMPLE_BITS, - AVS_CS_SAMPLE_BITS_32 = 2 << AVS_CS_SHIFT_SAMPLE_BITS, - - AVS_CS_PLANAR_MASK = AVS_CS_PLANAR | AVS_CS_INTERLEAVED | AVS_CS_YUV | AVS_CS_BGR | AVS_CS_SAMPLE_BITS_MASK | AVS_CS_SUB_HEIGHT_MASK | AVS_CS_SUB_WIDTH_MASK, - AVS_CS_PLANAR_FILTER = ~( AVS_CS_VPLANEFIRST | AVS_CS_UPLANEFIRST )}; - - // Specific colorformats -enum { - AVS_CS_UNKNOWN = 0, - AVS_CS_BGR24 = 1<<0 | AVS_CS_BGR | AVS_CS_INTERLEAVED, - AVS_CS_BGR32 = 1<<1 | AVS_CS_BGR | AVS_CS_INTERLEAVED, - AVS_CS_YUY2 = 1<<2 | AVS_CS_YUV | AVS_CS_INTERLEAVED, - // AVS_CS_YV12 = 1<<3 Reserved - // AVS_CS_I420 = 1<<4 Reserved - AVS_CS_RAW32 = 1<<5 | AVS_CS_INTERLEAVED, - - AVS_CS_YV24 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_1, // YVU 4:4:4 planar - AVS_CS_YV16 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_2, // YVU 4:2:2 planar - AVS_CS_YV12 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2, // YVU 4:2:0 planar - AVS_CS_I420 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_UPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2, // YUV 4:2:0 planar - AVS_CS_IYUV = AVS_CS_I420, - AVS_CS_YV411 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_4, // YVU 4:1:1 planar - AVS_CS_YUV9 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_4 | AVS_CS_SUB_WIDTH_4, // YVU 4:1:0 planar - AVS_CS_Y8 = AVS_CS_PLANAR | AVS_CS_INTERLEAVED | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 // Y 4:0:0 planar -}; - -enum { - AVS_IT_BFF = 1<<0, - AVS_IT_TFF = 1<<1, - AVS_IT_FIELDBASED = 1<<2}; - -enum { - AVS_FILTER_TYPE=1, - AVS_FILTER_INPUT_COLORSPACE=2, - AVS_FILTER_OUTPUT_TYPE=9, - AVS_FILTER_NAME=4, - AVS_FILTER_AUTHOR=5, - AVS_FILTER_VERSION=6, - AVS_FILTER_ARGS=7, - AVS_FILTER_ARGS_INFO=8, - AVS_FILTER_ARGS_DESCRIPTION=10, - AVS_FILTER_DESCRIPTION=11}; - -enum { //SUBTYPES - AVS_FILTER_TYPE_AUDIO=1, - AVS_FILTER_TYPE_VIDEO=2, - AVS_FILTER_OUTPUT_TYPE_SAME=3, - AVS_FILTER_OUTPUT_TYPE_DIFFERENT=4}; - -enum { - AVS_CACHE_NOTHING=0, - AVS_CACHE_RANGE=1, - AVS_CACHE_ALL=2, - AVS_CACHE_AUDIO=3, - AVS_CACHE_AUDIO_NONE=4, - AVS_CACHE_AUDIO_AUTO=5 - }; - -#define AVS_FRAME_ALIGN 16 - -typedef struct AVS_Clip AVS_Clip; -typedef struct AVS_ScriptEnvironment AVS_ScriptEnvironment; - -///////////////////////////////////////////////////////////////////// -// -// AVS_VideoInfo -// - -// AVS_VideoInfo is layed out identicly to VideoInfo -typedef struct AVS_VideoInfo { - int width, height; // width=0 means no video - unsigned fps_numerator, fps_denominator; - int num_frames; - - int pixel_type; - - int audio_samples_per_second; // 0 means no audio - int sample_type; - INT64 num_audio_samples; - int nchannels; - - // Imagetype properties - - int image_type; -} AVS_VideoInfo; - -// useful functions of the above -AVSC_INLINE int avs_has_video(const AVS_VideoInfo * p) - { return (p->width!=0); } - -AVSC_INLINE int avs_has_audio(const AVS_VideoInfo * p) - { return (p->audio_samples_per_second!=0); } - -AVSC_INLINE int avs_is_rgb(const AVS_VideoInfo * p) - { return !!(p->pixel_type&AVS_CS_BGR); } - -AVSC_INLINE int avs_is_rgb24(const AVS_VideoInfo * p) - { return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties - -AVSC_INLINE int avs_is_rgb32(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; } - -AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo * p) - { return !!(p->pixel_type&AVS_CS_YUV ); } - -AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; } - -AVSC_INLINE int avs_is_yv24(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV24 & AVS_CS_PLANAR_FILTER); } - -AVSC_INLINE int avs_is_yv16(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV16 & AVS_CS_PLANAR_FILTER); } - -AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV12 & AVS_CS_PLANAR_FILTER); } - -AVSC_INLINE int avs_is_yv411(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV411 & AVS_CS_PLANAR_FILTER); } - -AVSC_INLINE int avs_is_y8(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y8 & AVS_CS_PLANAR_FILTER); } - -AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property) - { return ((p->pixel_type & property)==property ); } - -AVSC_INLINE int avs_is_planar(const AVS_VideoInfo * p) - { return !!(p->pixel_type & AVS_CS_PLANAR); } - -AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo * p, int c_space) - { return avs_is_planar(p) ? ((p->pixel_type & AVS_CS_PLANAR_MASK) == (c_space & AVS_CS_PLANAR_FILTER)) : ((p->pixel_type & c_space) == c_space); } - -AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo * p) - { return !!(p->image_type & AVS_IT_FIELDBASED); } - -AVSC_INLINE int avs_is_parity_known(const AVS_VideoInfo * p) - { return ((p->image_type & AVS_IT_FIELDBASED)&&(p->image_type & (AVS_IT_BFF | AVS_IT_TFF))); } - -AVSC_INLINE int avs_is_bff(const AVS_VideoInfo * p) - { return !!(p->image_type & AVS_IT_BFF); } - -AVSC_INLINE int avs_is_tff(const AVS_VideoInfo * p) - { return !!(p->image_type & AVS_IT_TFF); } - -AVSC_INLINE int avs_bits_per_pixel(const AVS_VideoInfo * p) -{ - switch (p->pixel_type) { - case AVS_CS_BGR24: return 24; - case AVS_CS_BGR32: return 32; - case AVS_CS_YUY2: return 16; - case AVS_CS_YV12: - case AVS_CS_I420: return 12; - default: return 0; - } -} -AVSC_INLINE int avs_bytes_from_pixels(const AVS_VideoInfo * p, int pixels) - { return pixels * (avs_bits_per_pixel(p)>>3); } // Will work on planar images, but will return only luma planes - -AVSC_INLINE int avs_row_size(const AVS_VideoInfo * p) - { return avs_bytes_from_pixels(p,p->width); } // Also only returns first plane on planar images - -AVSC_INLINE int avs_bmp_size(const AVS_VideoInfo * vi) - { if (avs_is_planar(vi)) {int p = vi->height * ((avs_row_size(vi)+3) & ~3); p+=p>>1; return p; } return vi->height * ((avs_row_size(vi)+3) & ~3); } - -AVSC_INLINE int avs_samples_per_second(const AVS_VideoInfo * p) - { return p->audio_samples_per_second; } - - -AVSC_INLINE int avs_bytes_per_channel_sample(const AVS_VideoInfo * p) -{ - switch (p->sample_type) { - case AVS_SAMPLE_INT8: return sizeof(signed char); - case AVS_SAMPLE_INT16: return sizeof(signed short); - case AVS_SAMPLE_INT24: return 3; - case AVS_SAMPLE_INT32: return sizeof(signed int); - case AVS_SAMPLE_FLOAT: return sizeof(float); - default: return 0; - } -} -AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p) - { return p->nchannels*avs_bytes_per_channel_sample(p);} - -AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 frames) - { return ((INT64)(frames) * p->audio_samples_per_second * p->fps_denominator / p->fps_numerator); } - -AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 samples) - { return (int)(samples * (INT64)p->fps_numerator / (INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); } - -AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 bytes) - { return bytes / avs_bytes_per_audio_sample(p); } - -AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 samples) - { return samples * avs_bytes_per_audio_sample(p); } - -AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p) - { return p->nchannels; } - -AVSC_INLINE int avs_sample_type(const AVS_VideoInfo * p) - { return p->sample_type;} - -// useful mutator -AVSC_INLINE void avs_set_property(AVS_VideoInfo * p, int property) - { p->image_type|=property; } - -AVSC_INLINE void avs_clear_property(AVS_VideoInfo * p, int property) - { p->image_type&=~property; } - -AVSC_INLINE void avs_set_field_based(AVS_VideoInfo * p, int isfieldbased) - { if (isfieldbased) p->image_type|=AVS_IT_FIELDBASED; else p->image_type&=~AVS_IT_FIELDBASED; } - -AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned numerator, unsigned denominator) -{ - unsigned x=numerator, y=denominator; - while (y) { // find gcd - unsigned t = x%y; x = y; y = t; - } - p->fps_numerator = numerator/x; - p->fps_denominator = denominator/x; -} - -AVSC_INLINE int avs_is_same_colorspace(AVS_VideoInfo * x, AVS_VideoInfo * y) -{ - return (x->pixel_type == y->pixel_type) - || (avs_is_yv12(x) && avs_is_yv12(y)); -} - -///////////////////////////////////////////////////////////////////// -// -// AVS_VideoFrame -// - -// VideoFrameBuffer holds information about a memory block which is used -// for video data. For efficiency, instances of this class are not deleted -// when the refcount reaches zero; instead they're stored in a linked list -// to be reused. The instances are deleted when the corresponding AVS -// file is closed. - -// AVS_VideoFrameBuffer is layed out identicly to VideoFrameBuffer -// DO NOT USE THIS STRUCTURE DIRECTLY -typedef struct AVS_VideoFrameBuffer { - BYTE * data; - int data_size; - // sequence_number is incremented every time the buffer is changed, so - // that stale views can tell they're no longer valid. - volatile long sequence_number; - - volatile long refcount; -} AVS_VideoFrameBuffer; - -// VideoFrame holds a "window" into a VideoFrameBuffer. - -// AVS_VideoFrame is layed out identicly to IVideoFrame -// DO NOT USE THIS STRUCTURE DIRECTLY -typedef struct AVS_VideoFrame { - volatile long refcount; - AVS_VideoFrameBuffer * vfb; - int offset, pitch, row_size, height, offsetU, offsetV, pitchUV; // U&V offsets are from top of picture. - int row_sizeUV, heightUV; -} AVS_VideoFrame; - -// Access functions for AVS_VideoFrame -AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame * p) { - return p->pitch;} - -AVSC_INLINE int avs_get_pitch_p(const AVS_VideoFrame * p, int plane) { - switch (plane) { - case AVS_PLANAR_U: case AVS_PLANAR_V: return p->pitchUV;} - return p->pitch;} - -AVSC_INLINE int avs_get_row_size(const AVS_VideoFrame * p) { - return p->row_size; } - -AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame * p, int plane) { - int r; - switch (plane) { - case AVS_PLANAR_U: case AVS_PLANAR_V: - if (p->pitchUV) return p->row_sizeUV; - else return 0; - case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED: - if (p->pitchUV) { - r = (p->row_sizeUV+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize - if (r < p->pitchUV) - return r; - return p->row_sizeUV; - } else return 0; - case AVS_PLANAR_Y_ALIGNED: - r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize - if (r <= p->pitch) - return r; - return p->row_size; - } - return p->row_size; -} - -AVSC_INLINE int avs_get_height(const AVS_VideoFrame * p) { - return p->height;} - -AVSC_INLINE int avs_get_height_p(const AVS_VideoFrame * p, int plane) { - switch (plane) { - case AVS_PLANAR_U: case AVS_PLANAR_V: - if (p->pitchUV) return p->heightUV; - return 0; - } - return p->height;} - -AVSC_INLINE const BYTE* avs_get_read_ptr(const AVS_VideoFrame * p) { - return p->vfb->data + p->offset;} - -AVSC_INLINE const BYTE* avs_get_read_ptr_p(const AVS_VideoFrame * p, int plane) -{ - switch (plane) { - case AVS_PLANAR_U: return p->vfb->data + p->offsetU; - case AVS_PLANAR_V: return p->vfb->data + p->offsetV; - default: return p->vfb->data + p->offset;} -} - -AVSC_INLINE int avs_is_writable(const AVS_VideoFrame * p) { - return (p->refcount == 1 && p->vfb->refcount == 1);} - -AVSC_INLINE BYTE* avs_get_write_ptr(const AVS_VideoFrame * p) -{ - if (avs_is_writable(p)) { - ++p->vfb->sequence_number; - return p->vfb->data + p->offset; - } else - return 0; -} - -AVSC_INLINE BYTE* avs_get_write_ptr_p(const AVS_VideoFrame * p, int plane) -{ - if (plane==AVS_PLANAR_Y && avs_is_writable(p)) { - ++p->vfb->sequence_number; - return p->vfb->data + p->offset; - } else if (plane==AVS_PLANAR_Y) { - return 0; - } else { - switch (plane) { - case AVS_PLANAR_U: return p->vfb->data + p->offsetU; - case AVS_PLANAR_V: return p->vfb->data + p->offsetV; - default: return p->vfb->data + p->offset; - } - } -} - - -AVSC_API(void, avs_release_video_frame)(AVS_VideoFrame *); -// makes a shallow copy of a video frame -AVSC_API(AVS_VideoFrame *, avs_copy_video_frame)(AVS_VideoFrame *); - -#ifndef AVSC_NO_DECLSPEC -AVSC_INLINE void avs_release_frame(AVS_VideoFrame * f) - {avs_release_video_frame(f);} -AVSC_INLINE AVS_VideoFrame * avs_copy_frame(AVS_VideoFrame * f) - {return avs_copy_video_frame(f);} -#endif - -///////////////////////////////////////////////////////////////////// -// -// AVS_Value -// - -// Treat AVS_Value as a fat pointer. That is use avs_copy_value -// and avs_release_value appropiaty as you would if AVS_Value was -// a pointer. - -// To maintain source code compatibility with future versions of the -// avisynth_c API don't use the AVS_Value directly. Use the helper -// functions below. - -// AVS_Value is layed out identicly to AVSValue -typedef struct AVS_Value AVS_Value; -struct AVS_Value { - short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong - // for some function e'rror - short array_size; - union { - void * clip; // do not use directly, use avs_take_clip - char boolean; - int integer; - float floating_pt; - const char * string; - const AVS_Value * array; - } d; -}; - -// AVS_Value should be initilized with avs_void. -// Should also set to avs_void after the value is released -// with avs_copy_value. Consider it the equalvent of setting -// a pointer to NULL -static const AVS_Value avs_void = {'v'}; - -AVSC_API(void, avs_copy_value)(AVS_Value * dest, AVS_Value src); -AVSC_API(void, avs_release_value)(AVS_Value); - -AVSC_INLINE int avs_defined(AVS_Value v) { return v.type != 'v'; } -AVSC_INLINE int avs_is_clip(AVS_Value v) { return v.type == 'c'; } -AVSC_INLINE int avs_is_bool(AVS_Value v) { return v.type == 'b'; } -AVSC_INLINE int avs_is_int(AVS_Value v) { return v.type == 'i'; } -AVSC_INLINE int avs_is_float(AVS_Value v) { return v.type == 'f' || v.type == 'i'; } -AVSC_INLINE int avs_is_string(AVS_Value v) { return v.type == 's'; } -AVSC_INLINE int avs_is_array(AVS_Value v) { return v.type == 'a'; } -AVSC_INLINE int avs_is_error(AVS_Value v) { return v.type == 'e'; } - -AVSC_API(AVS_Clip *, avs_take_clip)(AVS_Value, AVS_ScriptEnvironment *); -AVSC_API(void, avs_set_to_clip)(AVS_Value *, AVS_Clip *); - -AVSC_INLINE int avs_as_bool(AVS_Value v) - { return v.d.boolean; } -AVSC_INLINE int avs_as_int(AVS_Value v) - { return v.d.integer; } -AVSC_INLINE const char * avs_as_string(AVS_Value v) - { return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; } -AVSC_INLINE double avs_as_float(AVS_Value v) - { return avs_is_int(v) ? v.d.integer : v.d.floating_pt; } -AVSC_INLINE const char * avs_as_error(AVS_Value v) - { return avs_is_error(v) ? v.d.string : 0; } -AVSC_INLINE const AVS_Value * avs_as_array(AVS_Value v) - { return v.d.array; } -AVSC_INLINE int avs_array_size(AVS_Value v) - { return avs_is_array(v) ? v.array_size : 1; } -AVSC_INLINE AVS_Value avs_array_elt(AVS_Value v, int index) - { return avs_is_array(v) ? v.d.array[index] : v; } - -// only use these functions on an AVS_Value that does not already have -// an active value. Remember, treat AVS_Value as a fat pointer. -AVSC_INLINE AVS_Value avs_new_value_bool(int v0) - { AVS_Value v; v.type = 'b'; v.d.boolean = v0 == 0 ? 0 : 1; return v; } -AVSC_INLINE AVS_Value avs_new_value_int(int v0) - { AVS_Value v; v.type = 'i'; v.d.integer = v0; return v; } -AVSC_INLINE AVS_Value avs_new_value_string(const char * v0) - { AVS_Value v; v.type = 's'; v.d.string = v0; return v; } -AVSC_INLINE AVS_Value avs_new_value_float(float v0) - { AVS_Value v; v.type = 'f'; v.d.floating_pt = v0; return v;} -AVSC_INLINE AVS_Value avs_new_value_error(const char * v0) - { AVS_Value v; v.type = 'e'; v.d.string = v0; return v; } -#ifndef AVSC_NO_DECLSPEC -AVSC_INLINE AVS_Value avs_new_value_clip(AVS_Clip * v0) - { AVS_Value v; avs_set_to_clip(&v, v0); return v; } -#endif -AVSC_INLINE AVS_Value avs_new_value_array(AVS_Value * v0, int size) - { AVS_Value v; v.type = 'a'; v.d.array = v0; v.array_size = size; return v; } - -///////////////////////////////////////////////////////////////////// -// -// AVS_Clip -// - -AVSC_API(void, avs_release_clip)(AVS_Clip *); -AVSC_API(AVS_Clip *, avs_copy_clip)(AVS_Clip *); - -AVSC_API(const char *, avs_clip_get_error)(AVS_Clip *); // return 0 if no error - -AVSC_API(const AVS_VideoInfo *, avs_get_video_info)(AVS_Clip *); - -AVSC_API(int, avs_get_version)(AVS_Clip *); - -AVSC_API(AVS_VideoFrame *, avs_get_frame)(AVS_Clip *, int n); -// The returned video frame must be released with avs_release_video_frame - -AVSC_API(int, avs_get_parity)(AVS_Clip *, int n); -// return field parity if field_based, else parity of first field in frame - -AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf, - INT64 start, INT64 count); -// start and count are in samples - -AVSC_API(int, avs_set_cache_hints)(AVS_Clip *, - int cachehints, int frame_range); - -// This is the callback type used by avs_add_function -typedef AVS_Value (AVSC_CC * AVS_ApplyFunc) - (AVS_ScriptEnvironment *, AVS_Value args, void * user_data); - -typedef struct AVS_FilterInfo AVS_FilterInfo; -struct AVS_FilterInfo -{ - // these members should not be modified outside of the AVS_ApplyFunc callback - AVS_Clip * child; - AVS_VideoInfo vi; - AVS_ScriptEnvironment * env; - AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n); - int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n); - int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf, - INT64 start, INT64 count); - int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints, - int frame_range); - void (AVSC_CC * free_filter)(AVS_FilterInfo *); - - // Should be set when ever there is an error to report. - // It is cleared before any of the above methods are called - const char * error; - // this is to store whatever and may be modified at will - void * user_data; -}; - -// Create a new filter -// fi is set to point to the AVS_FilterInfo so that you can -// modify it once it is initilized. -// store_child should generally be set to true. If it is not -// set than ALL methods (the function pointers) must be defined -// If it is set than you do not need to worry about freeing the child -// clip. -AVSC_API(AVS_Clip *, avs_new_c_filter)(AVS_ScriptEnvironment * e, - AVS_FilterInfo * * fi, - AVS_Value child, int store_child); - -///////////////////////////////////////////////////////////////////// -// -// AVS_ScriptEnvironment -// - -// For GetCPUFlags. These are backwards-compatible with those in VirtualDub. -enum { - /* slowest CPU to support extension */ - AVS_CPU_FORCE = 0x01, // N/A - AVS_CPU_FPU = 0x02, // 386/486DX - AVS_CPU_MMX = 0x04, // P55C, K6, PII - AVS_CPU_INTEGER_SSE = 0x08, // PIII, Athlon - AVS_CPU_SSE = 0x10, // PIII, Athlon XP/MP - AVS_CPU_SSE2 = 0x20, // PIV, Hammer - AVS_CPU_3DNOW = 0x40, // K6-2 - AVS_CPU_3DNOW_EXT = 0x80, // Athlon - AVS_CPU_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2, - // which only Hammer will have anyway) - AVS_CPUF_SSE3 = 0x100, // PIV+, K8 Venice - AVS_CPUF_SSSE3 = 0x200, // Core 2 - AVS_CPUF_SSE4 = 0x400, // Penryn, Wolfdale, Yorkfield - AVS_CPUF_SSE4_1 = 0x400, - AVS_CPUF_SSE4_2 = 0x800, // Nehalem -}; - -AVSC_API(const char *, avs_get_error)(AVS_ScriptEnvironment *); // return 0 if no error - -AVSC_API(long, avs_get_cpu_flags)(AVS_ScriptEnvironment *); -AVSC_API(int, avs_check_version)(AVS_ScriptEnvironment *, int version); - -AVSC_API(char *, avs_save_string)(AVS_ScriptEnvironment *, const char* s, int length); -AVSC_API(char *, avs_sprintf)(AVS_ScriptEnvironment *, const char * fmt, ...); - -AVSC_API(char *, avs_vsprintf)(AVS_ScriptEnvironment *, const char * fmt, void* val); - // note: val is really a va_list; I hope everyone typedefs va_list to a pointer - -AVSC_API(int, avs_add_function)(AVS_ScriptEnvironment *, - const char * name, const char * params, - AVS_ApplyFunc apply, void * user_data); - -AVSC_API(int, avs_function_exists)(AVS_ScriptEnvironment *, const char * name); - -AVSC_API(AVS_Value, avs_invoke)(AVS_ScriptEnvironment *, const char * name, - AVS_Value args, const char** arg_names); -// The returned value must be be released with avs_release_value - -AVSC_API(AVS_Value, avs_get_var)(AVS_ScriptEnvironment *, const char* name); -// The returned value must be be released with avs_release_value - -AVSC_API(int, avs_set_var)(AVS_ScriptEnvironment *, const char* name, AVS_Value val); - -AVSC_API(int, avs_set_global_var)(AVS_ScriptEnvironment *, const char* name, const AVS_Value val); - -//void avs_push_context(AVS_ScriptEnvironment *, int level=0); -//void avs_pop_context(AVS_ScriptEnvironment *); - -AVSC_API(AVS_VideoFrame *, avs_new_video_frame_a)(AVS_ScriptEnvironment *, - const AVS_VideoInfo * vi, int align); -// align should be at least 16 - -#ifndef AVSC_NO_DECLSPEC -AVSC_INLINE -AVS_VideoFrame * avs_new_video_frame(AVS_ScriptEnvironment * env, - const AVS_VideoInfo * vi) - {return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);} - -AVSC_INLINE -AVS_VideoFrame * avs_new_frame(AVS_ScriptEnvironment * env, - const AVS_VideoInfo * vi) - {return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);} -#endif - - -AVSC_API(int, avs_make_writable)(AVS_ScriptEnvironment *, AVS_VideoFrame * * pvf); - -AVSC_API(void, avs_bit_blt)(AVS_ScriptEnvironment *, BYTE* dstp, int dst_pitch, const BYTE* srcp, int src_pitch, int row_size, int height); - -typedef void (AVSC_CC *AVS_ShutdownFunc)(void* user_data, AVS_ScriptEnvironment * env); -AVSC_API(void, avs_at_exit)(AVS_ScriptEnvironment *, AVS_ShutdownFunc function, void * user_data); - -AVSC_API(AVS_VideoFrame *, avs_subframe)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height); -// The returned video frame must be be released - -AVSC_API(int, avs_set_memory_max)(AVS_ScriptEnvironment *, int mem); - -AVSC_API(int, avs_set_working_dir)(AVS_ScriptEnvironment *, const char * newdir); - -// avisynth.dll exports this; it's a way to use it as a library, without -// writing an AVS script or without going through AVIFile. -AVSC_API(AVS_ScriptEnvironment *, avs_create_script_environment)(int version); - -// this symbol is the entry point for the plugin and must -// be defined -AVSC_EXPORT -const char * AVSC_CC avisynth_c_plugin_init(AVS_ScriptEnvironment* env); - - -AVSC_API(void, avs_delete_script_environment)(AVS_ScriptEnvironment *); - - -AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV); -// The returned video frame must be be released - -#ifdef AVSC_NO_DECLSPEC -// use LoadLibrary and related functions to dynamically load Avisynth instead of declspec(dllimport) -/* - The following functions needs to have been declared, probably from windows.h - - void* malloc(size_t) - void free(void*); - - HMODULE LoadLibrary(const char*); - void* GetProcAddress(HMODULE, const char*); - FreeLibrary(HMODULE); -*/ - - -typedef struct AVS_Library AVS_Library; - -#define AVSC_DECLARE_FUNC(name) name##_func name - -struct AVS_Library { - HMODULE handle; - - AVSC_DECLARE_FUNC(avs_add_function); - AVSC_DECLARE_FUNC(avs_at_exit); - AVSC_DECLARE_FUNC(avs_bit_blt); - AVSC_DECLARE_FUNC(avs_check_version); - AVSC_DECLARE_FUNC(avs_clip_get_error); - AVSC_DECLARE_FUNC(avs_copy_clip); - AVSC_DECLARE_FUNC(avs_copy_value); - AVSC_DECLARE_FUNC(avs_copy_video_frame); - AVSC_DECLARE_FUNC(avs_create_script_environment); - AVSC_DECLARE_FUNC(avs_delete_script_environment); - AVSC_DECLARE_FUNC(avs_function_exists); - AVSC_DECLARE_FUNC(avs_get_audio); - AVSC_DECLARE_FUNC(avs_get_cpu_flags); - AVSC_DECLARE_FUNC(avs_get_error); - AVSC_DECLARE_FUNC(avs_get_frame); - AVSC_DECLARE_FUNC(avs_get_parity); - AVSC_DECLARE_FUNC(avs_get_var); - AVSC_DECLARE_FUNC(avs_get_version); - AVSC_DECLARE_FUNC(avs_get_video_info); - AVSC_DECLARE_FUNC(avs_invoke); - AVSC_DECLARE_FUNC(avs_make_writable); - AVSC_DECLARE_FUNC(avs_new_c_filter); - AVSC_DECLARE_FUNC(avs_new_video_frame_a); - AVSC_DECLARE_FUNC(avs_release_clip); - AVSC_DECLARE_FUNC(avs_release_value); - AVSC_DECLARE_FUNC(avs_release_video_frame); - AVSC_DECLARE_FUNC(avs_save_string); - AVSC_DECLARE_FUNC(avs_set_cache_hints); - AVSC_DECLARE_FUNC(avs_set_global_var); - AVSC_DECLARE_FUNC(avs_set_memory_max); - AVSC_DECLARE_FUNC(avs_set_to_clip); - AVSC_DECLARE_FUNC(avs_set_var); - AVSC_DECLARE_FUNC(avs_set_working_dir); - AVSC_DECLARE_FUNC(avs_sprintf); - AVSC_DECLARE_FUNC(avs_subframe); - AVSC_DECLARE_FUNC(avs_subframe_planar); - AVSC_DECLARE_FUNC(avs_take_clip); - AVSC_DECLARE_FUNC(avs_vsprintf); -}; - -#undef AVSC_DECLARE_FUNC - - -AVSC_INLINE AVS_Library * avs_load_library() { - AVS_Library *library = (AVS_Library *)malloc(sizeof(AVS_Library)); - if (library == NULL) - return NULL; - library->handle = LoadLibrary("avisynth"); - if (library->handle == NULL) - goto fail; - -#define __AVSC_STRINGIFY(x) #x -#define AVSC_STRINGIFY(x) __AVSC_STRINGIFY(x) -#define AVSC_LOAD_FUNC(name) {\ - library->name = (name##_func) GetProcAddress(library->handle, AVSC_STRINGIFY(name));\ - if (library->name == NULL)\ - goto fail;\ -} - - AVSC_LOAD_FUNC(avs_add_function); - AVSC_LOAD_FUNC(avs_at_exit); - AVSC_LOAD_FUNC(avs_bit_blt); - AVSC_LOAD_FUNC(avs_check_version); - AVSC_LOAD_FUNC(avs_clip_get_error); - AVSC_LOAD_FUNC(avs_copy_clip); - AVSC_LOAD_FUNC(avs_copy_value); - AVSC_LOAD_FUNC(avs_copy_video_frame); - AVSC_LOAD_FUNC(avs_create_script_environment); - AVSC_LOAD_FUNC(avs_delete_script_environment); - AVSC_LOAD_FUNC(avs_function_exists); - AVSC_LOAD_FUNC(avs_get_audio); - AVSC_LOAD_FUNC(avs_get_cpu_flags); - AVSC_LOAD_FUNC(avs_get_error); - AVSC_LOAD_FUNC(avs_get_frame); - AVSC_LOAD_FUNC(avs_get_parity); - AVSC_LOAD_FUNC(avs_get_var); - AVSC_LOAD_FUNC(avs_get_version); - AVSC_LOAD_FUNC(avs_get_video_info); - AVSC_LOAD_FUNC(avs_invoke); - AVSC_LOAD_FUNC(avs_make_writable); - AVSC_LOAD_FUNC(avs_new_c_filter); - AVSC_LOAD_FUNC(avs_new_video_frame_a); - AVSC_LOAD_FUNC(avs_release_clip); - AVSC_LOAD_FUNC(avs_release_value); - AVSC_LOAD_FUNC(avs_release_video_frame); - AVSC_LOAD_FUNC(avs_save_string); - AVSC_LOAD_FUNC(avs_set_cache_hints); - AVSC_LOAD_FUNC(avs_set_global_var); - AVSC_LOAD_FUNC(avs_set_memory_max); - AVSC_LOAD_FUNC(avs_set_to_clip); - AVSC_LOAD_FUNC(avs_set_var); - AVSC_LOAD_FUNC(avs_set_working_dir); - AVSC_LOAD_FUNC(avs_sprintf); - AVSC_LOAD_FUNC(avs_subframe); - AVSC_LOAD_FUNC(avs_subframe_planar); - AVSC_LOAD_FUNC(avs_take_clip); - AVSC_LOAD_FUNC(avs_vsprintf); - -#undef __AVSC_STRINGIFY -#undef AVSC_STRINGIFY -#undef AVSC_LOAD_FUNC - - return library; - -fail: - free(library); - return NULL; -} - -AVSC_INLINE void avs_free_library(AVS_Library *library) { - if (library == NULL) - return; - FreeLibrary(library->handle); - free(library); -} -#endif - -#endif diff --git a/bundle/ffmpeg/compat/avisynth/avisynth_c_25.h b/bundle/ffmpeg/compat/avisynth/avisynth_c_25.h deleted file mode 100644 index 9288761331..0000000000 --- a/bundle/ffmpeg/compat/avisynth/avisynth_c_25.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2011 FFmpegSource Project -// -// 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 -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -/* these are defines/functions that are used and were changed in the switch to 2.6 - * and are needed to maintain full compatility with 2.5 */ - -enum { - AVS_CS_YV12_25 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR, // y-v-u, planar - AVS_CS_I420_25 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR, // y-u-v, planar -}; - -AVSC_INLINE int avs_get_height_p_25(const AVS_VideoFrame * p, int plane) { - switch (plane) - { - case AVS_PLANAR_U: case AVS_PLANAR_V: - if (p->pitchUV) - return p->height>>1; - return 0; - } - return p->height;} - -AVSC_INLINE int avs_get_row_size_p_25(const AVS_VideoFrame * p, int plane) { - int r; - switch (plane) - { - case AVS_PLANAR_U: case AVS_PLANAR_V: - if (p->pitchUV) - return p->row_size>>1; - else - return 0; - case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED: - if (p->pitchUV) - { - r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize - if (r < p->pitchUV) - return r; - return p->row_size>>1; - } - else - return 0; - case AVS_PLANAR_Y_ALIGNED: - r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize - if (r <= p->pitch) - return r; - return p->row_size; - } - return p->row_size; -} - -AVSC_INLINE int avs_is_yv12_25(const AVS_VideoInfo * p) - { return ((p->pixel_type & AVS_CS_YV12_25) == AVS_CS_YV12_25)||((p->pixel_type & AVS_CS_I420_25) == AVS_CS_I420_25); } diff --git a/bundle/ffmpeg/compat/avisynth/avxsynth_c.h b/bundle/ffmpeg/compat/avisynth/avxsynth_c.h deleted file mode 100644 index 7a81e2195a..0000000000 --- a/bundle/ffmpeg/compat/avisynth/avxsynth_c.h +++ /dev/null @@ -1,727 +0,0 @@ -// Avisynth C Interface Version 0.20 -// Copyright 2003 Kevin Atkinson - -// 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 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, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit -// http://www.gnu.org/copyleft/gpl.html . -// -// As a special exception, I give you permission to link to the -// Avisynth C interface with independent modules that communicate with -// the Avisynth C interface solely through the interfaces defined in -// avisynth_c.h, regardless of the license terms of these independent -// modules, and to copy and distribute the resulting combined work -// under terms of your choice, provided that every copy of the -// combined work is accompanied by a complete copy of the source code -// of the Avisynth C interface and Avisynth itself (with the version -// used to produce the combined work), being distributed under the -// terms of the GNU General Public License plus this exception. An -// independent module is a module which is not derived from or based -// on Avisynth C Interface, such as 3rd-party filters, import and -// export plugins, or graphical user interfaces. - -#ifndef __AVXSYNTH_C__ -#define __AVXSYNTH_C__ - -#include "windowsPorts/windows2linux.h" -#include - -#ifdef __cplusplus -# define EXTERN_C extern "C" -#else -# define EXTERN_C -#endif - -#define AVSC_USE_STDCALL 1 - -#ifndef AVSC_USE_STDCALL -# define AVSC_CC __cdecl -#else -# define AVSC_CC __stdcall -#endif - -#define AVSC_INLINE static __inline - -#ifdef AVISYNTH_C_EXPORTS -# define AVSC_EXPORT EXTERN_C -# define AVSC_API(ret, name) EXTERN_C __declspec(dllexport) ret AVSC_CC name -#else -# define AVSC_EXPORT EXTERN_C __declspec(dllexport) -# ifndef AVSC_NO_DECLSPEC -# define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name -# else -# define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func) -# endif -#endif - -#ifdef __GNUC__ -typedef long long int INT64; -#else -typedef __int64 INT64; -#endif - - -///////////////////////////////////////////////////////////////////// -// -// Constants -// - -#ifndef __AVXSYNTH_H__ -enum { AVISYNTH_INTERFACE_VERSION = 3 }; -#endif - -enum {AVS_SAMPLE_INT8 = 1<<0, - AVS_SAMPLE_INT16 = 1<<1, - AVS_SAMPLE_INT24 = 1<<2, - AVS_SAMPLE_INT32 = 1<<3, - AVS_SAMPLE_FLOAT = 1<<4}; - -enum {AVS_PLANAR_Y=1<<0, - AVS_PLANAR_U=1<<1, - AVS_PLANAR_V=1<<2, - AVS_PLANAR_ALIGNED=1<<3, - AVS_PLANAR_Y_ALIGNED=AVS_PLANAR_Y|AVS_PLANAR_ALIGNED, - AVS_PLANAR_U_ALIGNED=AVS_PLANAR_U|AVS_PLANAR_ALIGNED, - AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED}; - - // Colorspace properties. -enum {AVS_CS_BGR = 1<<28, - AVS_CS_YUV = 1<<29, - AVS_CS_INTERLEAVED = 1<<30, - AVS_CS_PLANAR = 1<<31}; - - // Specific colorformats -enum { - AVS_CS_UNKNOWN = 0, - AVS_CS_BGR24 = 1<<0 | AVS_CS_BGR | AVS_CS_INTERLEAVED, - AVS_CS_BGR32 = 1<<1 | AVS_CS_BGR | AVS_CS_INTERLEAVED, - AVS_CS_YUY2 = 1<<2 | AVS_CS_YUV | AVS_CS_INTERLEAVED, - AVS_CS_YV12 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR, // y-v-u, planar - AVS_CS_I420 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR, // y-u-v, planar - AVS_CS_IYUV = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR // same as above -}; - -enum { - AVS_IT_BFF = 1<<0, - AVS_IT_TFF = 1<<1, - AVS_IT_FIELDBASED = 1<<2}; - -enum { - AVS_FILTER_TYPE=1, - AVS_FILTER_INPUT_COLORSPACE=2, - AVS_FILTER_OUTPUT_TYPE=9, - AVS_FILTER_NAME=4, - AVS_FILTER_AUTHOR=5, - AVS_FILTER_VERSION=6, - AVS_FILTER_ARGS=7, - AVS_FILTER_ARGS_INFO=8, - AVS_FILTER_ARGS_DESCRIPTION=10, - AVS_FILTER_DESCRIPTION=11}; - -enum { //SUBTYPES - AVS_FILTER_TYPE_AUDIO=1, - AVS_FILTER_TYPE_VIDEO=2, - AVS_FILTER_OUTPUT_TYPE_SAME=3, - AVS_FILTER_OUTPUT_TYPE_DIFFERENT=4}; - -enum { - AVS_CACHE_NOTHING=0, - AVS_CACHE_RANGE=1, - AVS_CACHE_ALL=2, - AVS_CACHE_AUDIO=3, - AVS_CACHE_AUDIO_NONE=4, - AVS_CACHE_AUDIO_AUTO=5 -}; - -#define AVS_FRAME_ALIGN 16 - -typedef struct AVS_Clip AVS_Clip; -typedef struct AVS_ScriptEnvironment AVS_ScriptEnvironment; - -///////////////////////////////////////////////////////////////////// -// -// AVS_VideoInfo -// - -// AVS_VideoInfo is layed out identicly to VideoInfo -typedef struct AVS_VideoInfo { - int width, height; // width=0 means no video - unsigned fps_numerator, fps_denominator; - int num_frames; - - int pixel_type; - - int audio_samples_per_second; // 0 means no audio - int sample_type; - INT64 num_audio_samples; - int nchannels; - - // Imagetype properties - - int image_type; -} AVS_VideoInfo; - -// useful functions of the above -AVSC_INLINE int avs_has_video(const AVS_VideoInfo * p) - { return (p->width!=0); } - -AVSC_INLINE int avs_has_audio(const AVS_VideoInfo * p) - { return (p->audio_samples_per_second!=0); } - -AVSC_INLINE int avs_is_rgb(const AVS_VideoInfo * p) - { return !!(p->pixel_type&AVS_CS_BGR); } - -AVSC_INLINE int avs_is_rgb24(const AVS_VideoInfo * p) - { return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties - -AVSC_INLINE int avs_is_rgb32(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; } - -AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo * p) - { return !!(p->pixel_type&AVS_CS_YUV ); } - -AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo * p) - { return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; } - -AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo * p) - { return ((p->pixel_type & AVS_CS_YV12) == AVS_CS_YV12)||((p->pixel_type & AVS_CS_I420) == AVS_CS_I420); } - -AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo * p, int c_space) - { return ((p->pixel_type & c_space) == c_space); } - -AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property) - { return ((p->pixel_type & property)==property ); } - -AVSC_INLINE int avs_is_planar(const AVS_VideoInfo * p) - { return !!(p->pixel_type & AVS_CS_PLANAR); } - -AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo * p) - { return !!(p->image_type & AVS_IT_FIELDBASED); } - -AVSC_INLINE int avs_is_parity_known(const AVS_VideoInfo * p) - { return ((p->image_type & AVS_IT_FIELDBASED)&&(p->image_type & (AVS_IT_BFF | AVS_IT_TFF))); } - -AVSC_INLINE int avs_is_bff(const AVS_VideoInfo * p) - { return !!(p->image_type & AVS_IT_BFF); } - -AVSC_INLINE int avs_is_tff(const AVS_VideoInfo * p) - { return !!(p->image_type & AVS_IT_TFF); } - -AVSC_INLINE int avs_bits_per_pixel(const AVS_VideoInfo * p) -{ - switch (p->pixel_type) { - case AVS_CS_BGR24: return 24; - case AVS_CS_BGR32: return 32; - case AVS_CS_YUY2: return 16; - case AVS_CS_YV12: - case AVS_CS_I420: return 12; - default: return 0; - } -} -AVSC_INLINE int avs_bytes_from_pixels(const AVS_VideoInfo * p, int pixels) - { return pixels * (avs_bits_per_pixel(p)>>3); } // Will work on planar images, but will return only luma planes - -AVSC_INLINE int avs_row_size(const AVS_VideoInfo * p) - { return avs_bytes_from_pixels(p,p->width); } // Also only returns first plane on planar images - -AVSC_INLINE int avs_bmp_size(const AVS_VideoInfo * vi) - { if (avs_is_planar(vi)) {int p = vi->height * ((avs_row_size(vi)+3) & ~3); p+=p>>1; return p; } return vi->height * ((avs_row_size(vi)+3) & ~3); } - -AVSC_INLINE int avs_samples_per_second(const AVS_VideoInfo * p) - { return p->audio_samples_per_second; } - - -AVSC_INLINE int avs_bytes_per_channel_sample(const AVS_VideoInfo * p) -{ - switch (p->sample_type) { - case AVS_SAMPLE_INT8: return sizeof(signed char); - case AVS_SAMPLE_INT16: return sizeof(signed short); - case AVS_SAMPLE_INT24: return 3; - case AVS_SAMPLE_INT32: return sizeof(signed int); - case AVS_SAMPLE_FLOAT: return sizeof(float); - default: return 0; - } -} -AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p) - { return p->nchannels*avs_bytes_per_channel_sample(p);} - -AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 frames) - { return ((INT64)(frames) * p->audio_samples_per_second * p->fps_denominator / p->fps_numerator); } - -AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 samples) - { return (int)(samples * (INT64)p->fps_numerator / (INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); } - -AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 bytes) - { return bytes / avs_bytes_per_audio_sample(p); } - -AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 samples) - { return samples * avs_bytes_per_audio_sample(p); } - -AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p) - { return p->nchannels; } - -AVSC_INLINE int avs_sample_type(const AVS_VideoInfo * p) - { return p->sample_type;} - -// useful mutator -AVSC_INLINE void avs_set_property(AVS_VideoInfo * p, int property) - { p->image_type|=property; } - -AVSC_INLINE void avs_clear_property(AVS_VideoInfo * p, int property) - { p->image_type&=~property; } - -AVSC_INLINE void avs_set_field_based(AVS_VideoInfo * p, int isfieldbased) - { if (isfieldbased) p->image_type|=AVS_IT_FIELDBASED; else p->image_type&=~AVS_IT_FIELDBASED; } - -AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned numerator, unsigned denominator) -{ - unsigned x=numerator, y=denominator; - while (y) { // find gcd - unsigned t = x%y; x = y; y = t; - } - p->fps_numerator = numerator/x; - p->fps_denominator = denominator/x; -} - -AVSC_INLINE int avs_is_same_colorspace(AVS_VideoInfo * x, AVS_VideoInfo * y) -{ - return (x->pixel_type == y->pixel_type) - || (avs_is_yv12(x) && avs_is_yv12(y)); -} - -///////////////////////////////////////////////////////////////////// -// -// AVS_VideoFrame -// - -// VideoFrameBuffer holds information about a memory block which is used -// for video data. For efficiency, instances of this class are not deleted -// when the refcount reaches zero; instead they're stored in a linked list -// to be reused. The instances are deleted when the corresponding AVS -// file is closed. - -// AVS_VideoFrameBuffer is layed out identicly to VideoFrameBuffer -// DO NOT USE THIS STRUCTURE DIRECTLY -typedef struct AVS_VideoFrameBuffer { - unsigned char * data; - int data_size; - // sequence_number is incremented every time the buffer is changed, so - // that stale views can tell they're no longer valid. - long sequence_number; - - long refcount; -} AVS_VideoFrameBuffer; - -// VideoFrame holds a "window" into a VideoFrameBuffer. - -// AVS_VideoFrame is layed out identicly to IVideoFrame -// DO NOT USE THIS STRUCTURE DIRECTLY -typedef struct AVS_VideoFrame { - int refcount; - AVS_VideoFrameBuffer * vfb; - int offset, pitch, row_size, height, offsetU, offsetV, pitchUV; // U&V offsets are from top of picture. -} AVS_VideoFrame; - -// Access functions for AVS_VideoFrame -AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame * p) { - return p->pitch;} - -AVSC_INLINE int avs_get_pitch_p(const AVS_VideoFrame * p, int plane) { - switch (plane) { - case AVS_PLANAR_U: case AVS_PLANAR_V: return p->pitchUV;} - return p->pitch;} - -AVSC_INLINE int avs_get_row_size(const AVS_VideoFrame * p) { - return p->row_size; } - -AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame * p, int plane) { - int r; - switch (plane) { - case AVS_PLANAR_U: case AVS_PLANAR_V: - if (p->pitchUV) return p->row_size>>1; - else return 0; - case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED: - if (p->pitchUV) { - r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize - if (r < p->pitchUV) - return r; - return p->row_size>>1; - } else return 0; - case AVS_PLANAR_Y_ALIGNED: - r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize - if (r <= p->pitch) - return r; - return p->row_size; - } - return p->row_size; -} - -AVSC_INLINE int avs_get_height(const AVS_VideoFrame * p) { - return p->height;} - -AVSC_INLINE int avs_get_height_p(const AVS_VideoFrame * p, int plane) { - switch (plane) { - case AVS_PLANAR_U: case AVS_PLANAR_V: - if (p->pitchUV) return p->height>>1; - return 0; - } - return p->height;} - -AVSC_INLINE const unsigned char* avs_get_read_ptr(const AVS_VideoFrame * p) { - return p->vfb->data + p->offset;} - -AVSC_INLINE const unsigned char* avs_get_read_ptr_p(const AVS_VideoFrame * p, int plane) -{ - switch (plane) { - case AVS_PLANAR_U: return p->vfb->data + p->offsetU; - case AVS_PLANAR_V: return p->vfb->data + p->offsetV; - default: return p->vfb->data + p->offset;} -} - -AVSC_INLINE int avs_is_writable(const AVS_VideoFrame * p) { - return (p->refcount == 1 && p->vfb->refcount == 1);} - -AVSC_INLINE unsigned char* avs_get_write_ptr(const AVS_VideoFrame * p) -{ - if (avs_is_writable(p)) { - ++p->vfb->sequence_number; - return p->vfb->data + p->offset; - } else - return 0; -} - -AVSC_INLINE unsigned char* avs_get_write_ptr_p(const AVS_VideoFrame * p, int plane) -{ - if (plane==AVS_PLANAR_Y && avs_is_writable(p)) { - ++p->vfb->sequence_number; - return p->vfb->data + p->offset; - } else if (plane==AVS_PLANAR_Y) { - return 0; - } else { - switch (plane) { - case AVS_PLANAR_U: return p->vfb->data + p->offsetU; - case AVS_PLANAR_V: return p->vfb->data + p->offsetV; - default: return p->vfb->data + p->offset; - } - } -} - -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(void, avs_release_video_frame)(AVS_VideoFrame *); -// makes a shallow copy of a video frame -AVSC_API(AVS_VideoFrame *, avs_copy_video_frame)(AVS_VideoFrame *); -#if defined __cplusplus -} -#endif // __cplusplus - -#ifndef AVSC_NO_DECLSPEC -AVSC_INLINE void avs_release_frame(AVS_VideoFrame * f) - {avs_release_video_frame(f);} -AVSC_INLINE AVS_VideoFrame * avs_copy_frame(AVS_VideoFrame * f) - {return avs_copy_video_frame(f);} -#endif - -///////////////////////////////////////////////////////////////////// -// -// AVS_Value -// - -// Treat AVS_Value as a fat pointer. That is use avs_copy_value -// and avs_release_value appropiaty as you would if AVS_Value was -// a pointer. - -// To maintain source code compatibility with future versions of the -// avisynth_c API don't use the AVS_Value directly. Use the helper -// functions below. - -// AVS_Value is layed out identicly to AVSValue -typedef struct AVS_Value AVS_Value; -struct AVS_Value { - short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong - // for some function e'rror - short array_size; - union { - void * clip; // do not use directly, use avs_take_clip - char boolean; - int integer; - INT64 integer64; // match addition of __int64 to avxplugin.h - float floating_pt; - const char * string; - const AVS_Value * array; - } d; -}; - -// AVS_Value should be initilized with avs_void. -// Should also set to avs_void after the value is released -// with avs_copy_value. Consider it the equalvent of setting -// a pointer to NULL -static const AVS_Value avs_void = {'v'}; - -AVSC_API(void, avs_copy_value)(AVS_Value * dest, AVS_Value src); -AVSC_API(void, avs_release_value)(AVS_Value); - -AVSC_INLINE int avs_defined(AVS_Value v) { return v.type != 'v'; } -AVSC_INLINE int avs_is_clip(AVS_Value v) { return v.type == 'c'; } -AVSC_INLINE int avs_is_bool(AVS_Value v) { return v.type == 'b'; } -AVSC_INLINE int avs_is_int(AVS_Value v) { return v.type == 'i'; } -AVSC_INLINE int avs_is_float(AVS_Value v) { return v.type == 'f' || v.type == 'i'; } -AVSC_INLINE int avs_is_string(AVS_Value v) { return v.type == 's'; } -AVSC_INLINE int avs_is_array(AVS_Value v) { return v.type == 'a'; } -AVSC_INLINE int avs_is_error(AVS_Value v) { return v.type == 'e'; } - -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(AVS_Clip *, avs_take_clip)(AVS_Value, AVS_ScriptEnvironment *); -AVSC_API(void, avs_set_to_clip)(AVS_Value *, AVS_Clip *); -#if defined __cplusplus -} -#endif // __cplusplus - -AVSC_INLINE int avs_as_bool(AVS_Value v) - { return v.d.boolean; } -AVSC_INLINE int avs_as_int(AVS_Value v) - { return v.d.integer; } -AVSC_INLINE const char * avs_as_string(AVS_Value v) - { return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; } -AVSC_INLINE double avs_as_float(AVS_Value v) - { return avs_is_int(v) ? v.d.integer : v.d.floating_pt; } -AVSC_INLINE const char * avs_as_error(AVS_Value v) - { return avs_is_error(v) ? v.d.string : 0; } -AVSC_INLINE const AVS_Value * avs_as_array(AVS_Value v) - { return v.d.array; } -AVSC_INLINE int avs_array_size(AVS_Value v) - { return avs_is_array(v) ? v.array_size : 1; } -AVSC_INLINE AVS_Value avs_array_elt(AVS_Value v, int index) - { return avs_is_array(v) ? v.d.array[index] : v; } - -// only use these functions on am AVS_Value that does not already have -// an active value. Remember, treat AVS_Value as a fat pointer. -AVSC_INLINE AVS_Value avs_new_value_bool(int v0) - { AVS_Value v; v.type = 'b'; v.d.boolean = v0 == 0 ? 0 : 1; return v; } -AVSC_INLINE AVS_Value avs_new_value_int(int v0) - { AVS_Value v; v.type = 'i'; v.d.integer = v0; return v; } -AVSC_INLINE AVS_Value avs_new_value_string(const char * v0) - { AVS_Value v; v.type = 's'; v.d.string = v0; return v; } -AVSC_INLINE AVS_Value avs_new_value_float(float v0) - { AVS_Value v; v.type = 'f'; v.d.floating_pt = v0; return v;} -AVSC_INLINE AVS_Value avs_new_value_error(const char * v0) - { AVS_Value v; v.type = 'e'; v.d.string = v0; return v; } -#ifndef AVSC_NO_DECLSPEC -AVSC_INLINE AVS_Value avs_new_value_clip(AVS_Clip * v0) - { AVS_Value v; avs_set_to_clip(&v, v0); return v; } -#endif -AVSC_INLINE AVS_Value avs_new_value_array(AVS_Value * v0, int size) - { AVS_Value v; v.type = 'a'; v.d.array = v0; v.array_size = size; return v; } - -///////////////////////////////////////////////////////////////////// -// -// AVS_Clip -// -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(void, avs_release_clip)(AVS_Clip *); -AVSC_API(AVS_Clip *, avs_copy_clip)(AVS_Clip *); - -AVSC_API(const char *, avs_clip_get_error)(AVS_Clip *); // return 0 if no error - -AVSC_API(const AVS_VideoInfo *, avs_get_video_info)(AVS_Clip *); - -AVSC_API(int, avs_get_version)(AVS_Clip *); - -AVSC_API(AVS_VideoFrame *, avs_get_frame)(AVS_Clip *, int n); -// The returned video frame must be released with avs_release_video_frame - -AVSC_API(int, avs_get_parity)(AVS_Clip *, int n); -// return field parity if field_based, else parity of first field in frame - -AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf, - INT64 start, INT64 count); -// start and count are in samples - -AVSC_API(int, avs_set_cache_hints)(AVS_Clip *, - int cachehints, size_t frame_range); -#if defined __cplusplus -} -#endif // __cplusplus - -// This is the callback type used by avs_add_function -typedef AVS_Value (AVSC_CC * AVS_ApplyFunc) - (AVS_ScriptEnvironment *, AVS_Value args, void * user_data); - -typedef struct AVS_FilterInfo AVS_FilterInfo; -struct AVS_FilterInfo -{ - // these members should not be modified outside of the AVS_ApplyFunc callback - AVS_Clip * child; - AVS_VideoInfo vi; - AVS_ScriptEnvironment * env; - AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n); - int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n); - int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf, - INT64 start, INT64 count); - int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints, - int frame_range); - void (AVSC_CC * free_filter)(AVS_FilterInfo *); - - // Should be set when ever there is an error to report. - // It is cleared before any of the above methods are called - const char * error; - // this is to store whatever and may be modified at will - void * user_data; -}; - -// Create a new filter -// fi is set to point to the AVS_FilterInfo so that you can -// modify it once it is initilized. -// store_child should generally be set to true. If it is not -// set than ALL methods (the function pointers) must be defined -// If it is set than you do not need to worry about freeing the child -// clip. -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(AVS_Clip *, avs_new_c_filter)(AVS_ScriptEnvironment * e, - AVS_FilterInfo * * fi, - AVS_Value child, int store_child); -#if defined __cplusplus -} -#endif // __cplusplus - - -///////////////////////////////////////////////////////////////////// -// -// AVS_ScriptEnvironment -// - -// For GetCPUFlags. These are backwards-compatible with those in VirtualDub. -enum { - /* slowest CPU to support extension */ - AVS_CPU_FORCE = 0x01, // N/A - AVS_CPU_FPU = 0x02, // 386/486DX - AVS_CPU_MMX = 0x04, // P55C, K6, PII - AVS_CPU_INTEGER_SSE = 0x08, // PIII, Athlon - AVS_CPU_SSE = 0x10, // PIII, Athlon XP/MP - AVS_CPU_SSE2 = 0x20, // PIV, Hammer - AVS_CPU_3DNOW = 0x40, // K6-2 - AVS_CPU_3DNOW_EXT = 0x80, // Athlon - AVS_CPU_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2, - // which only Hammer will have anyway) -}; - -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(const char *, avs_get_error)(AVS_ScriptEnvironment *); // return 0 if no error - -AVSC_API(long, avs_get_cpu_flags)(AVS_ScriptEnvironment *); -AVSC_API(int, avs_check_version)(AVS_ScriptEnvironment *, int version); - -AVSC_API(char *, avs_save_string)(AVS_ScriptEnvironment *, const char* s, int length); -AVSC_API(char *, avs_sprintf)(AVS_ScriptEnvironment *, const char * fmt, ...); - -AVSC_API(char *, avs_vsprintf)(AVS_ScriptEnvironment *, const char * fmt, va_list val); - // note: val is really a va_list; I hope everyone typedefs va_list to a pointer - -AVSC_API(int, avs_add_function)(AVS_ScriptEnvironment *, - const char * name, const char * params, - AVS_ApplyFunc apply, void * user_data); - -AVSC_API(int, avs_function_exists)(AVS_ScriptEnvironment *, const char * name); - -AVSC_API(AVS_Value, avs_invoke)(AVS_ScriptEnvironment *, const char * name, - AVS_Value args, const char** arg_names); -// The returned value must be be released with avs_release_value - -AVSC_API(AVS_Value, avs_get_var)(AVS_ScriptEnvironment *, const char* name); -// The returned value must be be released with avs_release_value - -AVSC_API(int, avs_set_var)(AVS_ScriptEnvironment *, const char* name, AVS_Value val); - -AVSC_API(int, avs_set_global_var)(AVS_ScriptEnvironment *, const char* name, const AVS_Value val); - -//void avs_push_context(AVS_ScriptEnvironment *, int level=0); -//void avs_pop_context(AVS_ScriptEnvironment *); - -AVSC_API(AVS_VideoFrame *, avs_new_video_frame_a)(AVS_ScriptEnvironment *, - const AVS_VideoInfo * vi, int align); -// align should be at least 16 -#if defined __cplusplus -} -#endif // __cplusplus - -#ifndef AVSC_NO_DECLSPEC -AVSC_INLINE -AVS_VideoFrame * avs_new_video_frame(AVS_ScriptEnvironment * env, - const AVS_VideoInfo * vi) - {return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);} - -AVSC_INLINE -AVS_VideoFrame * avs_new_frame(AVS_ScriptEnvironment * env, - const AVS_VideoInfo * vi) - {return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);} -#endif - -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(int, avs_make_writable)(AVS_ScriptEnvironment *, AVS_VideoFrame * * pvf); - -AVSC_API(void, avs_bit_blt)(AVS_ScriptEnvironment *, unsigned char* dstp, int dst_pitch, const unsigned char* srcp, int src_pitch, int row_size, int height); - -typedef void (AVSC_CC *AVS_ShutdownFunc)(void* user_data, AVS_ScriptEnvironment * env); -AVSC_API(void, avs_at_exit)(AVS_ScriptEnvironment *, AVS_ShutdownFunc function, void * user_data); - -AVSC_API(AVS_VideoFrame *, avs_subframe)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height); -// The returned video frame must be be released - -AVSC_API(int, avs_set_memory_max)(AVS_ScriptEnvironment *, int mem); - -AVSC_API(int, avs_set_working_dir)(AVS_ScriptEnvironment *, const char * newdir); - -// avisynth.dll exports this; it's a way to use it as a library, without -// writing an AVS script or without going through AVIFile. -AVSC_API(AVS_ScriptEnvironment *, avs_create_script_environment)(int version); -#if defined __cplusplus -} -#endif // __cplusplus - -// this symbol is the entry point for the plugin and must -// be defined -AVSC_EXPORT -const char * AVSC_CC avisynth_c_plugin_init(AVS_ScriptEnvironment* env); - - -#if defined __cplusplus -extern "C" -{ -#endif // __cplusplus -AVSC_API(void, avs_delete_script_environment)(AVS_ScriptEnvironment *); - - -AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV); -// The returned video frame must be be released -#if defined __cplusplus -} -#endif // __cplusplus - -#endif //__AVXSYNTH_C__ diff --git a/bundle/ffmpeg/compat/avisynth/windowsPorts/basicDataTypeConversions.h b/bundle/ffmpeg/compat/avisynth/windowsPorts/basicDataTypeConversions.h deleted file mode 100644 index ff367d5a2a..0000000000 --- a/bundle/ffmpeg/compat/avisynth/windowsPorts/basicDataTypeConversions.h +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef __DATA_TYPE_CONVERSIONS_H__ -#define __DATA_TYPE_CONVERSIONS_H__ - -#include -#include - -#ifdef __cplusplus -namespace avxsynth { -#endif // __cplusplus - -typedef int64_t __int64; -typedef int32_t __int32; -#ifdef __cplusplus -typedef bool BOOL; -#else -typedef uint32_t BOOL; -#endif // __cplusplus -typedef void* HMODULE; -typedef void* LPVOID; -typedef void* PVOID; -typedef PVOID HANDLE; -typedef HANDLE HWND; -typedef HANDLE HINSTANCE; -typedef void* HDC; -typedef void* HBITMAP; -typedef void* HICON; -typedef void* HFONT; -typedef void* HGDIOBJ; -typedef void* HBRUSH; -typedef void* HMMIO; -typedef void* HACMSTREAM; -typedef void* HACMDRIVER; -typedef void* HIC; -typedef void* HACMOBJ; -typedef HACMSTREAM* LPHACMSTREAM; -typedef void* HACMDRIVERID; -typedef void* LPHACMDRIVER; -typedef unsigned char BYTE; -typedef BYTE* LPBYTE; -typedef char TCHAR; -typedef TCHAR* LPTSTR; -typedef const TCHAR* LPCTSTR; -typedef char* LPSTR; -typedef LPSTR LPOLESTR; -typedef const char* LPCSTR; -typedef LPCSTR LPCOLESTR; -typedef wchar_t WCHAR; -typedef unsigned short WORD; -typedef unsigned int UINT; -typedef UINT MMRESULT; -typedef uint32_t DWORD; -typedef DWORD COLORREF; -typedef DWORD FOURCC; -typedef DWORD HRESULT; -typedef DWORD* LPDWORD; -typedef DWORD* DWORD_PTR; -typedef int32_t LONG; -typedef int32_t* LONG_PTR; -typedef LONG_PTR LRESULT; -typedef uint32_t ULONG; -typedef uint32_t* ULONG_PTR; -//typedef __int64_t intptr_t; -typedef uint64_t _fsize_t; - - -// -// Structures -// - -typedef struct _GUID { - DWORD Data1; - WORD Data2; - WORD Data3; - BYTE Data4[8]; -} GUID; - -typedef GUID REFIID; -typedef GUID CLSID; -typedef CLSID* LPCLSID; -typedef GUID IID; - -#ifdef __cplusplus -}; // namespace avxsynth -#endif // __cplusplus -#endif // __DATA_TYPE_CONVERSIONS_H__ diff --git a/bundle/ffmpeg/compat/avisynth/windowsPorts/windows2linux.h b/bundle/ffmpeg/compat/avisynth/windowsPorts/windows2linux.h deleted file mode 100644 index 5476afe847..0000000000 --- a/bundle/ffmpeg/compat/avisynth/windowsPorts/windows2linux.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef __WINDOWS2LINUX_H__ -#define __WINDOWS2LINUX_H__ - -/* - * LINUX SPECIFIC DEFINITIONS -*/ -// -// Data types conversions -// -#include -#include -#include "basicDataTypeConversions.h" - -#ifdef __cplusplus -namespace avxsynth { -#endif // __cplusplus -// -// purposefully define the following MSFT definitions -// to mean nothing (as they do not mean anything on Linux) -// -#define __stdcall -#define __cdecl -#define noreturn -#define __declspec(x) -#define STDAPI extern "C" HRESULT -#define STDMETHODIMP HRESULT __stdcall -#define STDMETHODIMP_(x) x __stdcall - -#define STDMETHOD(x) virtual HRESULT x -#define STDMETHOD_(a, x) virtual a x - -#ifndef TRUE -#define TRUE true -#endif - -#ifndef FALSE -#define FALSE false -#endif - -#define S_OK (0x00000000) -#define S_FALSE (0x00000001) -#define E_NOINTERFACE (0X80004002) -#define E_POINTER (0x80004003) -#define E_FAIL (0x80004005) -#define E_OUTOFMEMORY (0x8007000E) - -#define INVALID_HANDLE_VALUE ((HANDLE)((LONG_PTR)-1)) -#define FAILED(hr) ((hr) & 0x80000000) -#define SUCCEEDED(hr) (!FAILED(hr)) - - -// -// Functions -// -#define MAKEDWORD(a,b,c,d) ((a << 24) | (b << 16) | (c << 8) | (d)) -#define MAKEWORD(a,b) ((a << 8) | (b)) - -#define lstrlen strlen -#define lstrcpy strcpy -#define lstrcmpi strcasecmp -#define _stricmp strcasecmp -#define InterlockedIncrement(x) __sync_fetch_and_add((x), 1) -#define InterlockedDecrement(x) __sync_fetch_and_sub((x), 1) -// Windows uses (new, old) ordering but GCC has (old, new) -#define InterlockedCompareExchange(x,y,z) __sync_val_compare_and_swap(x,z,y) - -#define UInt32x32To64(a, b) ( (uint64_t) ( ((uint64_t)((uint32_t)(a))) * ((uint32_t)(b)) ) ) -#define Int64ShrlMod32(a, b) ( (uint64_t) ( (uint64_t)(a) >> (b) ) ) -#define Int32x32To64(a, b) ((__int64)(((__int64)((long)(a))) * ((long)(b)))) - -#define MulDiv(nNumber, nNumerator, nDenominator) (int32_t) (((int64_t) (nNumber) * (int64_t) (nNumerator) + (int64_t) ((nDenominator)/2)) / (int64_t) (nDenominator)) - -#ifdef __cplusplus -}; // namespace avxsynth -#endif // __cplusplus - -#endif // __WINDOWS2LINUX_H__ diff --git a/bundle/ffmpeg/compat/getopt.c b/bundle/ffmpeg/compat/getopt.c deleted file mode 100644 index dd082ea2e6..0000000000 --- a/bundle/ffmpeg/compat/getopt.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * This file was copied from the following newsgroup posting: - * - * Newsgroups: mod.std.unix - * Subject: public domain AT&T getopt source - * Date: 3 Nov 85 19:34:15 GMT - * - * Here's something you've all been waiting for: the AT&T public domain - * source for getopt(3). It is the code which was given out at the 1985 - * UNIFORUM conference in Dallas. I obtained it by electronic mail - * directly from AT&T. The people there assure me that it is indeed - * in the public domain. - */ - -#include -#include - -static int opterr = 1; -static int optind = 1; -static int optopt; -static char *optarg; - -#undef fprintf - -static int getopt(int argc, char *argv[], char *opts) -{ - static int sp = 1; - int c; - char *cp; - - if (sp == 1) { - if (optind >= argc || - argv[optind][0] != '-' || argv[optind][1] == '\0') - return EOF; - else if (!strcmp(argv[optind], "--")) { - optind++; - return EOF; - } - } - optopt = c = argv[optind][sp]; - if (c == ':' || (cp = strchr(opts, c)) == NULL) { - fprintf(stderr, ": illegal option -- %c\n", c); - if (argv[optind][++sp] == '\0') { - optind++; - sp = 1; - } - return '?'; - } - if (*++cp == ':') { - if (argv[optind][sp+1] != '\0') - optarg = &argv[optind++][sp+1]; - else if(++optind >= argc) { - fprintf(stderr, ": option requires an argument -- %c\n", c); - sp = 1; - return '?'; - } else - optarg = argv[optind++]; - sp = 1; - } else { - if (argv[optind][++sp] == '\0') { - sp = 1; - optind++; - } - optarg = NULL; - } - - return c; -} diff --git a/bundle/ffmpeg/compat/msvcrt/snprintf.c b/bundle/ffmpeg/compat/msvcrt/snprintf.c deleted file mode 100644 index c64653fe82..0000000000 --- a/bundle/ffmpeg/compat/msvcrt/snprintf.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * C99-compatible snprintf() and vsnprintf() implementations - * Copyright (c) 2012 Ronald S. Bultje - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include - -#include "compat/va_copy.h" -#include "libavutil/error.h" - -#if defined(__MINGW32__) -#define EOVERFLOW EFBIG -#endif - -int avpriv_snprintf(char *s, size_t n, const char *fmt, ...) -{ - va_list ap; - int ret; - - va_start(ap, fmt); - ret = avpriv_vsnprintf(s, n, fmt, ap); - va_end(ap); - - return ret; -} - -int avpriv_vsnprintf(char *s, size_t n, const char *fmt, - va_list ap) -{ - int ret; - va_list ap_copy; - - if (n == 0) - return _vscprintf(fmt, ap); - else if (n > INT_MAX) - return AVERROR(EOVERFLOW); - - /* we use n - 1 here because if the buffer is not big enough, the MS - * runtime libraries don't add a terminating zero at the end. MSDN - * recommends to provide _snprintf/_vsnprintf() a buffer size that - * is one less than the actual buffer, and zero it before calling - * _snprintf/_vsnprintf() to workaround this problem. - * See http://msdn.microsoft.com/en-us/library/1kt27hek(v=vs.80).aspx */ - memset(s, 0, n); - va_copy(ap_copy, ap); - ret = _vsnprintf(s, n - 1, fmt, ap_copy); - va_end(ap_copy); - if (ret == -1) - ret = _vscprintf(fmt, ap); - - return ret; -} diff --git a/bundle/ffmpeg/compat/msvcrt/snprintf.h b/bundle/ffmpeg/compat/msvcrt/snprintf.h deleted file mode 100644 index f02113c5a2..0000000000 --- a/bundle/ffmpeg/compat/msvcrt/snprintf.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * C99-compatible snprintf() and vsnprintf() implementations - * Copyright (c) 2012 Ronald S. Bultje - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef COMPAT_SNPRINTF_H -#define COMPAT_SNPRINTF_H - -#include -#include - -int avpriv_snprintf(char *s, size_t n, const char *fmt, ...); -int avpriv_vsnprintf(char *s, size_t n, const char *fmt, va_list ap); - -#undef snprintf -#undef _snprintf -#undef vsnprintf -#define snprintf avpriv_snprintf -#define _snprintf avpriv_snprintf -#define vsnprintf avpriv_vsnprintf - -#endif /* COMPAT_SNPRINTF_H */ diff --git a/bundle/ffmpeg/compat/os2threads.h b/bundle/ffmpeg/compat/os2threads.h deleted file mode 100644 index b816bff15f..0000000000 --- a/bundle/ffmpeg/compat/os2threads.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2011 KO Myung-Hun - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * os2threads to pthreads wrapper - */ - -#ifndef AVCODEC_OS2PTHREADS_H -#define AVCODEC_OS2PTHREADS_H - -#define INCL_DOS -#include - -#undef __STRICT_ANSI__ /* for _beginthread() */ -#include - -typedef TID pthread_t; -typedef void pthread_attr_t; - -typedef HMTX pthread_mutex_t; -typedef void pthread_mutexattr_t; - -typedef struct { - HEV event_sem; - int wait_count; -} pthread_cond_t; - -typedef void pthread_condattr_t; - -struct thread_arg { - void *(*start_routine)(void *); - void *arg; -}; - -static void thread_entry(void *arg) -{ - struct thread_arg *thread_arg = arg; - - thread_arg->start_routine(thread_arg->arg); - - av_free(thread_arg); -} - -static av_always_inline int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg) -{ - struct thread_arg *thread_arg; - - thread_arg = av_mallocz(sizeof(struct thread_arg)); - - thread_arg->start_routine = start_routine; - thread_arg->arg = arg; - - *thread = _beginthread(thread_entry, NULL, 256 * 1024, thread_arg); - - return 0; -} - -static av_always_inline int pthread_join(pthread_t thread, void **value_ptr) -{ - DosWaitThread((PTID)&thread, DCWW_WAIT); - - return 0; -} - -static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) -{ - DosCreateMutexSem(NULL, (PHMTX)mutex, 0, FALSE); - - return 0; -} - -static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex) -{ - DosCloseMutexSem(*(PHMTX)mutex); - - return 0; -} - -static av_always_inline int pthread_mutex_lock(pthread_mutex_t *mutex) -{ - DosRequestMutexSem(*(PHMTX)mutex, SEM_INDEFINITE_WAIT); - - return 0; -} - -static av_always_inline int pthread_mutex_unlock(pthread_mutex_t *mutex) -{ - DosReleaseMutexSem(*(PHMTX)mutex); - - return 0; -} - -static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) -{ - DosCreateEventSem(NULL, &cond->event_sem, DCE_POSTONE, FALSE); - - cond->wait_count = 0; - - return 0; -} - -static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond) -{ - DosCloseEventSem(cond->event_sem); - - return 0; -} - -static av_always_inline int pthread_cond_signal(pthread_cond_t *cond) -{ - if (cond->wait_count > 0) { - DosPostEventSem(cond->event_sem); - - cond->wait_count--; - } - - return 0; -} - -static av_always_inline int pthread_cond_broadcast(pthread_cond_t *cond) -{ - while (cond->wait_count > 0) { - DosPostEventSem(cond->event_sem); - - cond->wait_count--; - } - - return 0; -} - -static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) -{ - cond->wait_count++; - - pthread_mutex_unlock(mutex); - - DosWaitEventSem(cond->event_sem, SEM_INDEFINITE_WAIT); - - pthread_mutex_lock(mutex); - - return 0; -} - -#endif /* AVCODEC_OS2PTHREADS_H */ diff --git a/bundle/ffmpeg/compat/plan9/head b/bundle/ffmpeg/compat/plan9/head deleted file mode 100755 index 2840b2d50f..0000000000 --- a/bundle/ffmpeg/compat/plan9/head +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -n=10 - -case "$1" in - -n) n=$2; shift 2 ;; - -n*) n=${1#-n}; shift ;; -esac - -exec sed ${n}q "$@" diff --git a/bundle/ffmpeg/compat/plan9/main.c b/bundle/ffmpeg/compat/plan9/main.c deleted file mode 100644 index d46f96d170..0000000000 --- a/bundle/ffmpeg/compat/plan9/main.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -int plan9_main(int argc, char **argv); - -#undef main -int main(int argc, char **argv) -{ - /* The setfcr() function in lib9 is broken, must use asm. */ -#ifdef __i386 - short fcr; - __asm__ volatile ("fstcw %0 \n" - "or $63, %0 \n" - "fldcw %0 \n" - : "=m"(fcr)); -#endif - - return plan9_main(argc, argv); -} diff --git a/bundle/ffmpeg/compat/plan9/printf b/bundle/ffmpeg/compat/plan9/printf deleted file mode 100755 index 1a70a9e91a..0000000000 --- a/bundle/ffmpeg/compat/plan9/printf +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec awk "BEGIN { for (i = 2; i < ARGC; i++) printf \"$1\", ARGV[i] }" "$@" diff --git a/bundle/ffmpeg/compat/strtod.c b/bundle/ffmpeg/compat/strtod.c deleted file mode 100644 index 3a9452eac2..0000000000 --- a/bundle/ffmpeg/compat/strtod.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * C99-compatible strtod() implementation - * Copyright (c) 2012 Ronald S. Bultje - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include - -#include "libavutil/avstring.h" -#include "libavutil/mathematics.h" - -static char *check_nan_suffix(char *s) -{ - char *start = s; - - if (*s++ != '(') - return start; - - while ((*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z') || - (*s >= '0' && *s <= '9') || *s == '_') - s++; - - return *s == ')' ? s + 1 : start; -} - -#undef strtod -double strtod(const char *, char **); - -double avpriv_strtod(const char *nptr, char **endptr) -{ - char *end; - double res; - - /* Skip leading spaces */ - while (av_isspace(*nptr)) - nptr++; - - if (!av_strncasecmp(nptr, "infinity", 8)) { - end = nptr + 8; - res = INFINITY; - } else if (!av_strncasecmp(nptr, "inf", 3)) { - end = nptr + 3; - res = INFINITY; - } else if (!av_strncasecmp(nptr, "+infinity", 9)) { - end = nptr + 9; - res = INFINITY; - } else if (!av_strncasecmp(nptr, "+inf", 4)) { - end = nptr + 4; - res = INFINITY; - } else if (!av_strncasecmp(nptr, "-infinity", 9)) { - end = nptr + 9; - res = -INFINITY; - } else if (!av_strncasecmp(nptr, "-inf", 4)) { - end = nptr + 4; - res = -INFINITY; - } else if (!av_strncasecmp(nptr, "nan", 3)) { - end = check_nan_suffix(nptr + 3); - res = NAN; - } else if (!av_strncasecmp(nptr, "+nan", 4) || - !av_strncasecmp(nptr, "-nan", 4)) { - end = check_nan_suffix(nptr + 4); - res = NAN; - } else if (!av_strncasecmp(nptr, "0x", 2) || - !av_strncasecmp(nptr, "-0x", 3) || - !av_strncasecmp(nptr, "+0x", 3)) { - /* FIXME this doesn't handle exponents, non-integers (float/double) - * and numbers too large for long long */ - res = strtoll(nptr, &end, 16); - } else { - res = strtod(nptr, &end); - } - - if (endptr) - *endptr = end; - - return res; -} diff --git a/bundle/ffmpeg/compat/tms470/math.h b/bundle/ffmpeg/compat/tms470/math.h deleted file mode 100644 index 6234cc597b..0000000000 --- a/bundle/ffmpeg/compat/tms470/math.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef FFMPEG_COMPAT_TMS470_MATH_H -#define FFMPEG_COMPAT_TMS470_MATH_H - -#include_next - -#undef INFINITY -#undef NAN - -#define INFINITY (*(const float*)((const unsigned []){ 0x7f800000 })) -#define NAN (*(const float*)((const unsigned []){ 0x7fc00000 })) - -#endif /* FFMPEG_COMPAT_TMS470_MATH_H */ diff --git a/bundle/ffmpeg/compat/va_copy.h b/bundle/ffmpeg/compat/va_copy.h deleted file mode 100644 index f894771949..0000000000 --- a/bundle/ffmpeg/compat/va_copy.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * MSVC Compatible va_copy macro - * Copyright (c) 2012 Derek Buitenhuis - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#if !defined(va_copy) && defined(_MSC_VER) -#define va_copy(dst, src) ((dst) = (src)) -#endif diff --git a/bundle/ffmpeg/compat/w32pthreads.h b/bundle/ffmpeg/compat/w32pthreads.h deleted file mode 100644 index 7b51c25843..0000000000 --- a/bundle/ffmpeg/compat/w32pthreads.h +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright (C) 2010-2011 x264 project - * - * Authors: Steven Walters - * Pegasys Inc. - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * w32threads to pthreads wrapper - */ - -#ifndef FFMPEG_COMPAT_W32PTHREADS_H -#define FFMPEG_COMPAT_W32PTHREADS_H - -/* Build up a pthread-like API using underlying Windows API. Have only static - * methods so as to not conflict with a potentially linked in pthread-win32 - * library. - * As most functions here are used without checking return values, - * only implement return values as necessary. */ - -#define WIN32_LEAN_AND_MEAN -#include -#include - -#include "libavutil/common.h" -#include "libavutil/internal.h" -#include "libavutil/mem.h" - -typedef struct pthread_t { - void *handle; - void *(*func)(void* arg); - void *arg; - void *ret; -} pthread_t; - -/* the conditional variable api for windows 6.0+ uses critical sections and - * not mutexes */ -typedef CRITICAL_SECTION pthread_mutex_t; - -/* This is the CONDITIONAL_VARIABLE typedef for using Window's native - * conditional variables on kernels 6.0+. - * MinGW does not currently have this typedef. */ -typedef struct pthread_cond_t { - void *ptr; -} pthread_cond_t; - -/* function pointers to conditional variable API on windows 6.0+ kernels */ -#if _WIN32_WINNT < 0x0600 -static void (WINAPI *cond_broadcast)(pthread_cond_t *cond); -static void (WINAPI *cond_init)(pthread_cond_t *cond); -static void (WINAPI *cond_signal)(pthread_cond_t *cond); -static BOOL (WINAPI *cond_wait)(pthread_cond_t *cond, pthread_mutex_t *mutex, - DWORD milliseconds); -#else -#define cond_init InitializeConditionVariable -#define cond_broadcast WakeAllConditionVariable -#define cond_signal WakeConditionVariable -#define cond_wait SleepConditionVariableCS -#endif - -static unsigned __stdcall attribute_align_arg win32thread_worker(void *arg) -{ - pthread_t *h = arg; - h->ret = h->func(h->arg); - return 0; -} - -static int pthread_create(pthread_t *thread, const void *unused_attr, - void *(*start_routine)(void*), void *arg) -{ - thread->func = start_routine; - thread->arg = arg; - thread->handle = (void*)_beginthreadex(NULL, 0, win32thread_worker, thread, - 0, NULL); - return !thread->handle; -} - -static void pthread_join(pthread_t thread, void **value_ptr) -{ - DWORD ret = WaitForSingleObject(thread.handle, INFINITE); - if (ret != WAIT_OBJECT_0) - return; - if (value_ptr) - *value_ptr = thread.ret; - CloseHandle(thread.handle); -} - -static inline int pthread_mutex_init(pthread_mutex_t *m, void* attr) -{ - InitializeCriticalSection(m); - return 0; -} -static inline int pthread_mutex_destroy(pthread_mutex_t *m) -{ - DeleteCriticalSection(m); - return 0; -} -static inline int pthread_mutex_lock(pthread_mutex_t *m) -{ - EnterCriticalSection(m); - return 0; -} -static inline int pthread_mutex_unlock(pthread_mutex_t *m) -{ - LeaveCriticalSection(m); - return 0; -} - -/* for pre-Windows 6.0 platforms we need to define and use our own condition - * variable and api */ -typedef struct win32_cond_t { - pthread_mutex_t mtx_broadcast; - pthread_mutex_t mtx_waiter_count; - volatile int waiter_count; - HANDLE semaphore; - HANDLE waiters_done; - volatile int is_broadcast; -} win32_cond_t; - -static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr) -{ - win32_cond_t *win32_cond = NULL; - if (cond_init) { - cond_init(cond); - return; - } - - /* non native condition variables */ - win32_cond = av_mallocz(sizeof(win32_cond_t)); - if (!win32_cond) - return; - cond->ptr = win32_cond; - win32_cond->semaphore = CreateSemaphore(NULL, 0, 0x7fffffff, NULL); - if (!win32_cond->semaphore) - return; - win32_cond->waiters_done = CreateEvent(NULL, TRUE, FALSE, NULL); - if (!win32_cond->waiters_done) - return; - - pthread_mutex_init(&win32_cond->mtx_waiter_count, NULL); - pthread_mutex_init(&win32_cond->mtx_broadcast, NULL); -} - -static void pthread_cond_destroy(pthread_cond_t *cond) -{ - win32_cond_t *win32_cond = cond->ptr; - /* native condition variables do not destroy */ - if (cond_init) - return; - - /* non native condition variables */ - CloseHandle(win32_cond->semaphore); - CloseHandle(win32_cond->waiters_done); - pthread_mutex_destroy(&win32_cond->mtx_waiter_count); - pthread_mutex_destroy(&win32_cond->mtx_broadcast); - av_freep(&win32_cond); - cond->ptr = NULL; -} - -static void pthread_cond_broadcast(pthread_cond_t *cond) -{ - win32_cond_t *win32_cond = cond->ptr; - int have_waiter; - - if (cond_broadcast) { - cond_broadcast(cond); - return; - } - - /* non native condition variables */ - pthread_mutex_lock(&win32_cond->mtx_broadcast); - pthread_mutex_lock(&win32_cond->mtx_waiter_count); - have_waiter = 0; - - if (win32_cond->waiter_count) { - win32_cond->is_broadcast = 1; - have_waiter = 1; - } - - if (have_waiter) { - ReleaseSemaphore(win32_cond->semaphore, win32_cond->waiter_count, NULL); - pthread_mutex_unlock(&win32_cond->mtx_waiter_count); - WaitForSingleObject(win32_cond->waiters_done, INFINITE); - ResetEvent(win32_cond->waiters_done); - win32_cond->is_broadcast = 0; - } else - pthread_mutex_unlock(&win32_cond->mtx_waiter_count); - pthread_mutex_unlock(&win32_cond->mtx_broadcast); -} - -static int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) -{ - win32_cond_t *win32_cond = cond->ptr; - int last_waiter; - if (cond_wait) { - cond_wait(cond, mutex, INFINITE); - return 0; - } - - /* non native condition variables */ - pthread_mutex_lock(&win32_cond->mtx_broadcast); - pthread_mutex_lock(&win32_cond->mtx_waiter_count); - win32_cond->waiter_count++; - pthread_mutex_unlock(&win32_cond->mtx_waiter_count); - pthread_mutex_unlock(&win32_cond->mtx_broadcast); - - // unlock the external mutex - pthread_mutex_unlock(mutex); - WaitForSingleObject(win32_cond->semaphore, INFINITE); - - pthread_mutex_lock(&win32_cond->mtx_waiter_count); - win32_cond->waiter_count--; - last_waiter = !win32_cond->waiter_count || !win32_cond->is_broadcast; - pthread_mutex_unlock(&win32_cond->mtx_waiter_count); - - if (last_waiter) - SetEvent(win32_cond->waiters_done); - - // lock the external mutex - return pthread_mutex_lock(mutex); -} - -static void pthread_cond_signal(pthread_cond_t *cond) -{ - win32_cond_t *win32_cond = cond->ptr; - int have_waiter; - if (cond_signal) { - cond_signal(cond); - return; - } - - pthread_mutex_lock(&win32_cond->mtx_broadcast); - - /* non-native condition variables */ - pthread_mutex_lock(&win32_cond->mtx_waiter_count); - have_waiter = win32_cond->waiter_count; - pthread_mutex_unlock(&win32_cond->mtx_waiter_count); - - if (have_waiter) { - ReleaseSemaphore(win32_cond->semaphore, 1, NULL); - WaitForSingleObject(win32_cond->waiters_done, INFINITE); - ResetEvent(win32_cond->waiters_done); - } - - pthread_mutex_unlock(&win32_cond->mtx_broadcast); -} - -static void w32thread_init(void) -{ -#if _WIN32_WINNT < 0x0600 - HANDLE kernel_dll = GetModuleHandle(TEXT("kernel32.dll")); - /* if one is available, then they should all be available */ - cond_init = - (void*)GetProcAddress(kernel_dll, "InitializeConditionVariable"); - cond_broadcast = - (void*)GetProcAddress(kernel_dll, "WakeAllConditionVariable"); - cond_signal = - (void*)GetProcAddress(kernel_dll, "WakeConditionVariable"); - cond_wait = - (void*)GetProcAddress(kernel_dll, "SleepConditionVariableCS"); -#endif - -} - -#endif /* FFMPEG_COMPAT_W32PTHREADS_H */ diff --git a/bundle/ffmpeg/configure b/bundle/ffmpeg/configure deleted file mode 100755 index f831999184..0000000000 --- a/bundle/ffmpeg/configure +++ /dev/null @@ -1,5063 +0,0 @@ -#!/bin/sh -# -# FFmpeg configure script -# -# Copyright (c) 2000-2002 Fabrice Bellard -# Copyright (c) 2005-2008 Diego Biurrun -# Copyright (c) 2005-2008 Mans Rullgard -# - -# Prevent locale nonsense from breaking basic text processing. -LC_ALL=C -export LC_ALL - -# make sure we are running under a compatible shell -# try to make this part work with most shells - -try_exec(){ - echo "Trying shell $1" - type "$1" > /dev/null 2>&1 && exec "$@" -} - -unset foo -(: ${foo%%bar}) 2> /dev/null -E1="$?" - -(: ${foo?}) 2> /dev/null -E2="$?" - -if test "$E1" != 0 || test "$E2" = 0; then - echo "Broken shell detected. Trying alternatives." - export FF_CONF_EXEC - if test "0$FF_CONF_EXEC" -lt 1; then - FF_CONF_EXEC=1 - try_exec bash "$0" "$@" - fi - if test "0$FF_CONF_EXEC" -lt 2; then - FF_CONF_EXEC=2 - try_exec ksh "$0" "$@" - fi - if test "0$FF_CONF_EXEC" -lt 3; then - FF_CONF_EXEC=3 - try_exec /usr/xpg4/bin/sh "$0" "$@" - fi - echo "No compatible shell script interpreter found." - echo "This configure script requires a POSIX-compatible shell" - echo "such as bash or ksh." - echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH." - echo "Instead, install a working POSIX-compatible shell." - echo "Disabling this configure test will create a broken FFmpeg." - if test "$BASH_VERSION" = '2.04.0(1)-release'; then - echo "This bash version ($BASH_VERSION) is broken on your platform." - echo "Upgrade to a later version if available." - fi - exit 1 -fi - -test -d /usr/xpg4/bin && PATH=/usr/xpg4/bin:$PATH - -show_help(){ - cat <> $logfile -} - -log_file(){ - log BEGIN $1 - pr -n -t $1 >> $logfile - log END $1 -} - -echolog(){ - log "$@" - echo "$@" -} - -warn(){ - log "WARNING: $*" - WARNINGS="${WARNINGS}WARNING: $*\n" -} - -die(){ - echolog "$@" - cat <>file; - } else if (file ~ /\\.asm\$/) { - printf(\"%%define %s %d\\n\", c, v) >>file; - } else if (file ~ /\\.mak\$/) { - n = -v ? \"\" : \"!\"; - printf(\"%s%s=yes\\n\", n, c) >>file; - } else if (file ~ /\\.texi\$/) { - pre = -v ? \"\" : \"@c \"; - yesno = \$2; - c2 = tolower(c); - gsub(/_/, \"-\", c2); - printf(\"%s@set %s %s\\n\", pre, c2, yesno) >>file; - } - } - }" -} - -print_enabled(){ - suf=$1 - shift - for v; do - enabled $v && printf "%s\n" ${v%$suf}; - done -} - -append(){ - var=$1 - shift - eval "$var=\"\$$var $*\"" -} - -prepend(){ - var=$1 - shift - eval "$var=\"$* \$$var\"" -} - -add_cppflags(){ - append CPPFLAGS "$@" -} - -add_cflags(){ - append CFLAGS $($cflags_filter "$@") -} - -add_cxxflags(){ - append CXXFLAGS $($cflags_filter "$@") -} - -add_asflags(){ - append ASFLAGS $($asflags_filter "$@") -} - -add_ldflags(){ - append LDFLAGS $($ldflags_filter "$@") -} - -add_stripflags(){ - append ASMSTRIPFLAGS "$@" -} - -add_extralibs(){ - prepend extralibs $($ldflags_filter "$@") -} - -add_host_cppflags(){ - append host_cppflags "$@" -} - -add_host_cflags(){ - append host_cflags $($host_cflags_filter "$@") -} - -add_host_ldflags(){ - append host_ldflags $($host_ldflags_filter "$@") -} - -add_compat(){ - append compat_objs $1 - shift - map 'add_cppflags -D$v' "$@" -} - -check_cmd(){ - log "$@" - "$@" >> $logfile 2>&1 -} - -cc_o(){ - eval printf '%s\\n' $CC_O -} - -cc_e(){ - eval printf '%s\\n' $CC_E -} - -check_cc(){ - log check_cc "$@" - cat > $TMPC - log_file $TMPC - check_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_C $(cc_o $TMPO) $TMPC -} - -check_cxx(){ - log check_cxx "$@" - cat > $TMPCPP - log_file $TMPCPP - check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP -} - -check_cpp(){ - log check_cpp "$@" - cat > $TMPC - log_file $TMPC - check_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC -} - -as_o(){ - eval printf '%s\\n' $AS_O -} - -check_as(){ - log check_as "$@" - cat > $TMPS - log_file $TMPS - check_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS -} - -check_inline_asm(){ - log check_inline_asm "$@" - name="$1" - code="$2" - shift 2 - disable $name - check_cc "$@" < $TMPS - log_file $TMPS - shift 1 - check_cmd $yasmexe $YASMFLAGS -Werror "$@" -o $TMPO $TMPS -} - -ld_o(){ - eval printf '%s\\n' $LD_O -} - -check_ld(){ - log check_ld "$@" - type=$1 - shift 1 - flags=$(filter_out '-l*|*.so' $@) - libs=$(filter '-l*|*.so' $@) - check_$type $($cflags_filter $flags) || return - flags=$($ldflags_filter $flags) - libs=$($ldflags_filter $libs) - check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs -} - -check_code(){ - log check_code "$@" - check=$1 - headers=$2 - code=$3 - shift 3 - { - for hdr in $headers; do - echo "#include <$hdr>" - done - echo "int main(void) { $code; return 0; }" - } | check_$check "$@" -} - -check_cppflags(){ - log check_cppflags "$@" - check_cc "$@" < -int x; -EOF -} - -check_func(){ - log check_func "$@" - func=$1 - shift - disable $func - check_ld "cc" "$@" < -float foo(float f, float g) { return $func($args); } -int main(void){ return (int) foo; } -EOF -} - -check_func_headers(){ - log check_func_headers "$@" - headers=$1 - funcs=$2 - shift 2 - { - for hdr in $headers; do - echo "#include <$hdr>" - done - for func in $funcs; do - echo "long check_$func(void) { return (long) $func; }" - done - echo "int main(void) { return 0; }" - } | check_ld "cc" "$@" && enable $funcs && enable_safe $headers -} - -check_class_headers_cpp(){ - log check_class_headers_cpp "$@" - headers=$1 - classes=$2 - shift 2 - { - for hdr in $headers; do - echo "#include <$hdr>" - done - echo "int main(void) { " - i=1 - for class in $classes; do - echo "$class obj$i;" - i=$(expr $i + 1) - done - echo "return 0; }" - } | check_ld "cxx" "$@" && enable $funcs && enable_safe $headers -} - -check_cpp_condition(){ - log check_cpp_condition "$@" - header=$1 - condition=$2 - shift 2 - check_cpp "$@" < -#if !($condition) -#error "unsatisfied condition: $condition" -#endif -EOF -} - -check_lib(){ - log check_lib "$@" - header="$1" - func="$2" - shift 2 - check_header $header && check_func $func "$@" && add_extralibs "$@" -} - -check_lib2(){ - log check_lib2 "$@" - headers="$1" - funcs="$2" - shift 2 - check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@" -} - -check_lib_cpp(){ - log check_lib_cpp "$@" - headers="$1" - classes="$2" - shift 2 - check_class_headers_cpp "$headers" "$classes" "$@" && add_extralibs "$@" -} - -check_pkg_config(){ - log check_pkg_config "$@" - pkg="$1" - headers="$2" - funcs="$3" - shift 3 - check_cmd $pkg_config --exists --print-errors $pkg || return - pkg_cflags=$($pkg_config --cflags $pkg) - pkg_libs=$($pkg_config --libs $pkg) - check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" && - set_safe ${pkg}_cflags $pkg_cflags && - set_safe ${pkg}_libs $pkg_libs -} - -check_exec(){ - check_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } -} - -check_exec_crash(){ - code=$(cat) - - # exit() is not async signal safe. _Exit (C99) and _exit (POSIX) - # are safe but may not be available everywhere. Thus we use - # raise(SIGTERM) instead. The check is run in a subshell so we - # can redirect the "Terminated" message from the shell. SIGBUS - # is not defined by standard C so it is used conditionally. - - (check_exec "$@") >> $logfile 2>&1 < -static void sighandler(int sig){ - raise(SIGTERM); -} -int foo(void){ - $code -} -int (*func_ptr)(void) = foo; -int main(void){ - signal(SIGILL, sighandler); - signal(SIGFPE, sighandler); - signal(SIGSEGV, sighandler); -#ifdef SIGBUS - signal(SIGBUS, sighandler); -#endif - return func_ptr(); -} -EOF -} - -check_type(){ - log check_type "$@" - headers=$1 - type=$2 - shift 2 - disable_safe "$type" - check_code cc "$headers" "$type v" "$@" && enable_safe "$type" -} - -check_struct(){ - log check_struct "$@" - headers=$1 - struct=$2 - member=$3 - shift 3 - disable_safe "${struct}_${member}" - check_code cc "$headers" "const void *p = &(($struct *)0)->$member" "$@" && - enable_safe "${struct}_${member}" -} - -check_builtin(){ - log check_builtin "$@" - name=$1 - headers=$2 - builtin=$3 - shift 3 - disable "$name" - check_code ld "$headers" "$builtin" "cc" "$@" && enable "$name" -} - -require(){ - name="$1" - header="$2" - func="$3" - shift 3 - check_lib $header $func "$@" || die "ERROR: $name not found" -} - -require2(){ - name="$1" - headers="$2" - func="$3" - shift 3 - check_lib2 "$headers" $func "$@" || die "ERROR: $name not found" -} - -require_cpp(){ - name="$1" - headers="$2" - classes="$3" - shift 3 - check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found" -} - -require_pkg_config(){ - pkg="$1" - check_pkg_config "$@" || die "ERROR: $pkg not found" - add_cflags $(get_safe ${pkg}_cflags) - add_extralibs $(get_safe ${pkg}_libs) -} - -require_libfreetype(){ - log require_libfreetype "$@" - pkg="freetype2" - check_cmd $pkg_config --exists --print-errors $pkg \ - || die "ERROR: $pkg not found" - pkg_cflags=$($pkg_config --cflags $pkg) - pkg_libs=$($pkg_config --libs $pkg) - { - echo "#include " - echo "#include FT_FREETYPE_H" - echo "long check_func(void) { return (long) FT_Init_FreeType; }" - echo "int main(void) { return 0; }" - } | check_ld "cc" $pkg_cflags $pkg_libs \ - && set_safe ${pkg}_cflags $pkg_cflags \ - && set_safe ${pkg}_libs $pkg_libs \ - || die "ERROR: $pkg not found" - add_cflags $(get_safe ${pkg}_cflags) - add_extralibs $(get_safe ${pkg}_libs) -} - -hostcc_o(){ - eval printf '%s\\n' $HOSTCC_O -} - -check_host_cc(){ - log check_host_cc "$@" - cat > $TMPC - log_file $TMPC - check_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC -} - -check_host_cppflags(){ - log check_host_cppflags "$@" - check_host_cc "$@" < "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp" -} - -cp_if_changed(){ - cmp -s "$1" "$2" && echo "$2 is unchanged" && return - mkdir -p "$(dirname $2)" - $cp_f "$1" "$2" -} - -# CONFIG_LIST contains configurable options, while HAVE_LIST is for -# system-dependent things. - -COMPONENT_LIST=" - bsfs - decoders - demuxers - encoders - filters - hwaccels - indevs - muxers - outdevs - parsers - protocols -" - -EXTERNAL_LIBRARY_LIST=" - avisynth - bzlib - crystalhd - fontconfig - frei0r - gnutls - iconv - ladspa - libaacplus - libass - libbluray - libcaca - libcdio - libcelt - libdc1394 - libfaac - libfdk_aac - libflite - libfreetype - libgme - libgsm - libiec61883 - libilbc - libmodplug - libmp3lame - libnut - libopencore_amrnb - libopencore_amrwb - libopencv - libopenjpeg - libopus - libpulse - libquvi - librtmp - libschroedinger - libshine - libsoxr - libspeex - libssh - libstagefright_h264 - libtheora - libtwolame - libutvideo - libv4l2 - libvidstab - libvo_aacenc - libvo_amrwbenc - libvorbis - libvpx - libwavpack - libx264 - libxavs - libxvid - libzmq - libzvbi - openal - opencl - openssl - x11grab - zlib -" - -DOCUMENT_LIST=" - doc - htmlpages - manpages - podpages - txtpages -" - -HWACCEL_LIST=" - dxva2 - vaapi - vda - vdpau -" - -LIBRARY_LIST=" - avcodec - avdevice - avfilter - avformat - avresample - avutil - postproc - swresample - swscale -" - -PROGRAM_LIST=" - ffplay - ffprobe - ffserver - ffmpeg -" - -CONFIG_LIST=" - $COMPONENT_LIST - $DOCUMENT_LIST - $EXTERNAL_LIBRARY_LIST - $HWACCEL_LIST - $LIBRARY_LIST - $PROGRAM_LIST - dct - dwt - error_resilience - fast_unaligned - fft - ftrapv - gpl - gray - hardcoded_tables - incompatible_libav_abi - incompatible_fork_abi - lsp - lzo - mdct - memalign_hack - memory_poisoning - network - nonfree - pic - raise_major - rdft - runtime_cpudetect - safe_bitstream_reader - shared - small - sram - static - swscale_alpha - thumb - version3 - xmm_clobber_test -" - -THREADS_LIST=' - pthreads - w32threads - os2threads -' - -ATOMICS_LIST=' - atomics_gcc - atomics_suncc - atomics_win32 -' - -ARCH_LIST=' - aarch64 - alpha - arm - avr32 - avr32_ap - avr32_uc - bfin - ia64 - m68k - mips - mips64 - parisc - ppc - ppc64 - s390 - sh4 - sparc - sparc64 - tilegx - tilepro - tomi - x86 - x86_32 - x86_64 -' - -ARCH_EXT_LIST_ARM=' - armv5te - armv6 - armv6t2 - neon - vfp - vfpv3 -' - -ARCH_EXT_LIST_X86=' - amd3dnow - amd3dnowext - avx - avx2 - fma4 - i686 - mmx - mmxext - sse - sse2 - sse3 - sse4 - sse42 - ssse3 -' - -ARCH_EXT_LIST=" - $ARCH_EXT_LIST_ARM - $ARCH_EXT_LIST_X86 - altivec - ppc4xx - vis - mipsfpu - mips32r2 - mipsdspr1 - mipsdspr2 -" - -HAVE_LIST_CMDLINE=' - inline_asm - symver - yasm -' - -HAVE_LIST_PUB=' - bigendian - fast_unaligned - incompatible_libav_abi - incompatible_fork_abi -' - -MATH_FUNCS=" - atanf - atan2f - cbrt - cbrtf - cosf - exp2 - exp2f - expf - isinf - isnan - ldexpf - llrint - llrintf - log2 - log2f - log10f - lrint - lrintf - powf - rint - round - roundf - sinf - trunc - truncf -" - -HAVE_LIST=" - $ARCH_EXT_LIST - $(add_suffix _external $ARCH_EXT_LIST) - $(add_suffix _inline $ARCH_EXT_LIST) - $HAVE_LIST_CMDLINE - $HAVE_LIST_PUB - $THREADS_LIST - $ATOMICS_LIST - $MATH_FUNCS - access - aligned_malloc - aligned_stack - alsa_asoundlib_h - altivec_h - arpa_inet_h - asm_mod_q - asm_mod_y - asm_types_h - atomic_cas_ptr - atomics_native - attribute_may_alias - attribute_packed - cdio_paranoia_h - cdio_paranoia_paranoia_h - CL_cl_h - clock_gettime - closesocket - CommandLineToArgvW - cpunop - CryptGenRandom - dcbzl - dev_bktr_ioctl_bt848_h - dev_bktr_ioctl_meteor_h - dev_ic_bt8xx_h - dev_video_bktr_ioctl_bt848_h - dev_video_meteor_ioctl_meteor_h - direct_h - dlfcn_h - dlopen - dos_paths - dxva_h - ebp_available - ebx_available - fast_64bit - fast_clz - fast_cmov - fcntl - fork - getaddrinfo - gethrtime - getopt - GetProcessAffinityMask - GetProcessMemoryInfo - GetProcessTimes - GetSystemTimeAsFileTime - getrusage - getservbyport - gettimeofday - glob - gnu_as - gsm_h - ibm_asm - inet_aton - io_h - inline_asm_labels - isatty - jack_port_get_latency_range - kbhit - ldbrx - libdc1394_1 - libdc1394_2 - local_aligned_16 - local_aligned_8 - localtime_r - loongson - lzo1x_999_compress - machine_ioctl_bt848_h - machine_ioctl_meteor_h - machine_rw_barrier - makeinfo - malloc_h - MapViewOfFile - memalign - MemoryBarrier - mkstemp - mm_empty - mmap - mprotect - msvcrt - nanosleep - openjpeg_1_5_openjpeg_h - PeekNamedPipe - perl - pod2man - poll_h - posix_memalign - pragma_deprecated - pthread_cancel - rdtsc - rsync_contimeout - sarestart - sched_getaffinity - sdl - SetConsoleTextAttribute - setmode - setrlimit - Sleep - sndio_h - socklen_t - soundcard_h - strerror_r - struct_addrinfo - struct_group_source_req - struct_ip_mreq_source - struct_ipv6_mreq - struct_pollfd - struct_rusage_ru_maxrss - struct_sctp_event_subscribe - struct_sockaddr_in6 - struct_sockaddr_sa_len - struct_sockaddr_storage - struct_stat_st_mtim_tv_nsec - struct_v4l2_frmivalenum_discrete - symver_asm_label - symver_gnu_asm - sync_val_compare_and_swap - sysconf - sysctl - sys_mman_h - sys_param_h - sys_resource_h - sys_select_h - sys_soundcard_h - sys_time_h - sys_un_h - sys_videoio_h - termios_h - texi2html - threads - unistd_h - usleep - vfp_args - VirtualAlloc - windows_h - winsock2_h - xform_asm - xmm_clobbers -" - -# options emitted with CONFIG_ prefix but not available on the command line -CONFIG_EXTRA=" - aandcttables - ac3dsp - audio_frame_queue - dsputil - exif - frame_thread_encoder - gcrypt - golomb - gplv3 - h264chroma - h264dsp - h264pred - h264qpel - hpeldsp - huffman - lgplv3 - lpc - mpegaudio - mpegaudiodsp - mpegvideo - mpegvideoenc - nettle - rangecoder - riffdec - riffenc - rtpdec - rtpenc_chain - sinewin - videodsp - vp3dsp -" - -CMDLINE_SELECT=" - $ARCH_EXT_LIST - $CONFIG_LIST - $HAVE_LIST_CMDLINE - $THREADS_LIST - asm - cross_compile - debug - extra_warnings - logging - lto - optimizations - stripping -" - -PATHS_LIST=' - bindir - datadir - docdir - incdir - libdir - mandir - prefix - shlibdir -' - -CMDLINE_SET=" - $PATHS_LIST - ar - arch - as - assert_level - build_suffix - cc - cpu - cross_prefix - cxx - dep_cc - extra_version - host_cc - host_cflags - host_ld - host_ldflags - host_libs - host_os - install - ld - logfile - malloc_prefix - nm - optflags - pkg_config - progs_suffix - random_seed - samples - strip - sysinclude - sysroot - target_exec - target_os - target_path - target_samples - tempprefix - toolchain - valgrind - yasmexe -" - -CMDLINE_APPEND=" - extra_cflags - extra_cxxflags - host_cppflags -" - -# code dependency declarations - -# architecture extensions - -armv5te_deps="arm" -armv6_deps="arm" -armv6t2_deps="arm" -neon_deps="arm" -vfp_deps="arm" -vfpv3_deps="vfp" - -map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM - -mipsfpu_deps="mips" -mips32r2_deps="mips" -mipsdspr1_deps="mips" -mipsdspr2_deps="mips" - -altivec_deps="ppc" -ppc4xx_deps="ppc" - -vis_deps="sparc" - -cpunop_deps="i686" -x86_64_select="i686" -x86_64_suggest="fast_cmov" - -amd3dnow_deps="mmx" -amd3dnowext_deps="amd3dnow" -mmx_deps="x86" -mmxext_deps="mmx" -sse_deps="mmxext" -sse2_deps="sse" -sse3_deps="sse2" -ssse3_deps="sse3" -sse4_deps="ssse3" -sse42_deps="sse4" -avx_deps="sse42" -fma4_deps="avx" -avx2_deps="avx" - -mmx_external_deps="yasm" -mmx_inline_deps="inline_asm" -mmx_suggest="mmx_external mmx_inline" - -for ext in $(filter_out mmx $ARCH_EXT_LIST_X86); do - eval dep=\$${ext}_deps - eval ${ext}_external_deps='"${dep}_external"' - eval ${ext}_inline_deps='"${dep}_inline"' - eval ${ext}_suggest='"${ext}_external ${ext}_inline"' -done - -aligned_stack_if_any="ppc x86" -fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64" -fast_clz_if_any="alpha avr32 mips ppc x86" -fast_unaligned_if_any="ppc x86" - -inline_asm_deps="!tms470" -need_memalign="altivec neon sse" - -symver_if_any="symver_asm_label symver_gnu_asm" - -log2_deps="!msvcrt" - -# subsystems -dct_select="rdft" -error_resilience_select="dsputil" -frame_thread_encoder_deps="encoders threads" -lpc_select="dsputil" -mdct_select="fft" -rdft_select="fft" -mpegaudio_select="mpegaudiodsp" -mpegaudiodsp_select="dct" -mpegvideo_select="dsputil h264chroma hpeldsp videodsp" -mpegvideoenc_select="mpegvideo" - -# decoders / encoders -aac_decoder_select="mdct sinewin" -aac_encoder_select="audio_frame_queue mdct sinewin" -aac_latm_decoder_select="aac_decoder aac_latm_parser" -ac3_decoder_select="mdct ac3dsp ac3_parser dsputil" -ac3_encoder_select="mdct ac3dsp dsputil" -ac3_fixed_encoder_select="mdct ac3dsp dsputil" -aic_decoder_select="dsputil golomb" -alac_encoder_select="lpc" -als_decoder_select="dsputil" -amrnb_decoder_select="lsp" -amrwb_decoder_select="lsp" -amv_decoder_select="dsputil hpeldsp exif" -amv_encoder_select="aandcttables" -ape_decoder_select="dsputil" -asv1_decoder_select="dsputil" -asv1_encoder_select="dsputil" -asv2_decoder_select="dsputil" -asv2_encoder_select="dsputil" -atrac1_decoder_select="mdct sinewin" -atrac3_decoder_select="mdct" -avrn_decoder_select="exif" -bink_decoder_select="dsputil hpeldsp" -binkaudio_dct_decoder_select="mdct rdft dct sinewin" -binkaudio_rdft_decoder_select="mdct rdft sinewin" -cavs_decoder_select="dsputil golomb h264chroma videodsp" -cllc_decoder_select="dsputil" -comfortnoise_encoder_select="lpc" -cook_decoder_select="dsputil mdct sinewin" -cscd_decoder_select="lzo" -cscd_decoder_suggest="zlib" -dca_decoder_select="mdct" -dirac_decoder_select="dsputil dwt golomb videodsp" -dnxhd_decoder_select="dsputil" -dnxhd_encoder_select="aandcttables dsputil mpegvideoenc" -dvvideo_decoder_select="dsputil" -dvvideo_encoder_select="dsputil" -dxa_decoder_select="zlib" -eac3_decoder_select="ac3_decoder" -eac3_encoder_select="ac3_encoder" -eamad_decoder_select="aandcttables dsputil mpegvideo" -eatgq_decoder_select="aandcttables" -eatqi_decoder_select="aandcttables error_resilience mpegvideo" -exr_decoder_select="zlib" -ffv1_decoder_select="dsputil golomb rangecoder" -ffv1_encoder_select="dsputil rangecoder" -ffvhuff_decoder_select="dsputil" -ffvhuff_encoder_select="dsputil huffman" -flac_decoder_select="golomb" -flac_encoder_select="dsputil golomb lpc" -flashsv_decoder_select="zlib" -flashsv_encoder_select="zlib" -flashsv2_encoder_select="zlib" -flashsv2_decoder_select="zlib" -flv_decoder_select="h263_decoder" -flv_encoder_select="h263_encoder" -fourxm_decoder_select="dsputil" -fraps_decoder_select="dsputil huffman" -g2m_decoder_select="dsputil zlib" -g729_decoder_select="dsputil" -h261_decoder_select="error_resilience mpegvideo" -h261_encoder_select="aandcttables mpegvideoenc" -h263_decoder_select="error_resilience h263_parser mpegvideo" -h263_encoder_select="aandcttables mpegvideoenc" -h263i_decoder_select="h263_decoder" -h263p_encoder_select="h263_encoder" -h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel videodsp" -h264_decoder_suggest="error_resilience" -hevc_decoder_select="dsputil golomb videodsp" -huffyuv_decoder_select="dsputil" -huffyuv_encoder_select="dsputil huffman" -iac_decoder_select="dsputil fft mdct sinewin" -imc_decoder_select="dsputil fft mdct sinewin" -indeo3_decoder_select="hpeldsp" -interplay_video_decoder_select="hpeldsp" -jpegls_decoder_select="dsputil golomb hpeldsp exif" -jpegls_encoder_select="golomb" -jv_decoder_select="dsputil" -lagarith_decoder_select="dsputil" -ljpeg_encoder_select="aandcttables mpegvideoenc" -loco_decoder_select="golomb" -mdec_decoder_select="dsputil error_resilience mpegvideo" -metasound_decoder_select="lsp mdct sinewin" -mimic_decoder_select="dsputil hpeldsp" -mjpeg_decoder_select="dsputil hpeldsp exif" -mjpegb_decoder_select="dsputil hpeldsp exif" -mjpeg_encoder_select="aandcttables dsputil mpegvideoenc" -mlp_decoder_select="dsputil mlp_parser" -motionpixels_decoder_select="dsputil" -mp1_decoder_select="mpegaudio" -mp1float_decoder_select="mpegaudio" -mp2_decoder_select="mpegaudio" -mp2float_decoder_select="mpegaudio" -mp3_decoder_select="mpegaudio" -mp3adu_decoder_select="mpegaudio" -mp3adufloat_decoder_select="mpegaudio" -mp3float_decoder_select="mpegaudio" -mp3on4_decoder_select="mpegaudio" -mp3on4float_decoder_select="mpegaudio" -mpc7_decoder_select="dsputil mpegaudiodsp" -mpc8_decoder_select="dsputil mpegaudiodsp" -mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" -mpeg_xvmc_decoder_select="mpeg2video_decoder" -mpeg1video_decoder_select="error_resilience mpegvideo" -mpeg1video_encoder_select="aandcttables mpegvideoenc" -mpeg2video_decoder_select="error_resilience mpegvideo" -mpeg2video_encoder_select="aandcttables mpegvideoenc" -mpeg4_decoder_select="h263_decoder mpeg4video_parser" -mpeg4_encoder_select="h263_encoder" -msmpeg4v1_decoder_select="h263_decoder" -msmpeg4v2_decoder_select="h263_decoder" -msmpeg4v2_encoder_select="h263_encoder" -msmpeg4v3_decoder_select="h263_decoder" -msmpeg4v3_encoder_select="h263_encoder" -mss2_decoder_select="error_resilience vc1_decoder" -mxpeg_decoder_select="dsputil hpeldsp exif" -nellymoser_decoder_select="mdct sinewin" -nellymoser_encoder_select="audio_frame_queue mdct sinewin" -nuv_decoder_select="dsputil lzo" -png_decoder_select="zlib" -png_encoder_select="dsputil zlib" -prores_decoder_select="dsputil" -prores_encoder_select="dsputil" -qcelp_decoder_select="lsp" -qdm2_decoder_select="mdct rdft mpegaudiodsp" -ra_144_encoder_select="audio_frame_queue lpc" -ralf_decoder_select="golomb" -rtjpeg_decoder_select="dsputil" -rv10_decoder_select="error_resilience h263_decoder" -rv10_encoder_select="h263_encoder" -rv20_decoder_select="error_resilience h263_decoder" -rv20_encoder_select="h263_encoder" -rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp" -rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp" -shorten_decoder_select="golomb" -sipr_decoder_select="lsp" -snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder" -snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rangecoder" -sonic_decoder_select="golomb" -sonic_encoder_select="golomb" -sonic_ls_encoder_select="golomb" -sp5x_decoder_select="dsputil hpeldsp exif" -svq1_decoder_select="hpeldsp" -svq1_encoder_select="aandcttables dsputil hpeldsp mpegvideoenc" -svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp" -svq3_decoder_suggest="error_resilience zlib" -tak_decoder_select="dsputil" -theora_decoder_select="vp3_decoder" -tiff_decoder_suggest="zlib" -tiff_encoder_suggest="zlib" -thp_decoder_select="dsputil hpeldsp exif" -truehd_decoder_select="mlp_parser" -truemotion2_decoder_select="dsputil" -truespeech_decoder_select="dsputil" -tscc_decoder_select="zlib" -twinvq_decoder_select="mdct lsp sinewin" -utvideo_decoder_select="dsputil" -utvideo_encoder_select="dsputil huffman" -vble_decoder_select="dsputil" -vc1_decoder_select="error_resilience h263_decoder h264chroma h264qpel" -vc1image_decoder_select="vc1_decoder" -vorbis_decoder_select="mdct" -vorbis_encoder_select="mdct" -vp3_decoder_select="hpeldsp vp3dsp videodsp" -vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp" -vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp" -vp6a_decoder_select="vp6_decoder" -vp6f_decoder_select="vp6_decoder" -vp8_decoder_select="h264pred videodsp" -vp9_decoder_select="videodsp" -webp_decoder_select="vp8_decoder" -wmapro_decoder_select="mdct sinewin" -wmav1_decoder_select="mdct sinewin" -wmav1_encoder_select="mdct sinewin" -wmav2_decoder_select="mdct sinewin" -wmav2_encoder_select="mdct sinewin" -wmavoice_decoder_select="lsp rdft dct mdct sinewin" -wmv1_decoder_select="h263_decoder" -wmv1_encoder_select="h263_encoder" -wmv2_decoder_select="h263_decoder videodsp" -wmv2_encoder_select="h263_encoder" -wmv3_decoder_select="vc1_decoder" -wmv3image_decoder_select="wmv3_decoder" -zerocodec_decoder_select="zlib" -zlib_decoder_select="zlib" -zlib_encoder_select="zlib" -zmbv_decoder_select="zlib" -zmbv_encoder_select="zlib" - -# hardware accelerators -crystalhd_deps="libcrystalhd_libcrystalhd_if_h" -dxva2_deps="dxva2api_h" -vaapi_deps="va_va_h" -vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" -vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore" -vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" - -h263_vaapi_hwaccel_deps="vaapi" -h263_vaapi_hwaccel_select="h263_decoder" -h263_vdpau_hwaccel_deps="vdpau" -h263_vdpau_hwaccel_select="h263_decoder" -h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser" -h264_dxva2_hwaccel_deps="dxva2" -h264_dxva2_hwaccel_select="h264_decoder" -h264_vaapi_hwaccel_deps="vaapi" -h264_vaapi_hwaccel_select="h264_decoder" -h264_vda_decoder_deps="vda" -h264_vda_decoder_select="h264_decoder" -h264_vda_hwaccel_deps="vda" -h264_vda_hwaccel_select="h264_decoder" -h264_vdpau_decoder_deps="vdpau" -h264_vdpau_decoder_select="h264_decoder" -h264_vdpau_hwaccel_deps="vdpau" -h264_vdpau_hwaccel_select="h264_decoder" -mpeg_vdpau_decoder_deps="vdpau" -mpeg_vdpau_decoder_select="mpeg2video_decoder" -mpeg1_vdpau_decoder_deps="vdpau" -mpeg1_vdpau_decoder_select="mpeg1video_decoder" -mpeg1_vdpau_hwaccel_deps="vdpau" -mpeg1_vdpau_hwaccel_select="mpeg1video_decoder" -mpeg2_crystalhd_decoder_select="crystalhd" -mpeg2_dxva2_hwaccel_deps="dxva2" -mpeg2_dxva2_hwaccel_select="mpeg2video_decoder" -mpeg2_vaapi_hwaccel_deps="vaapi" -mpeg2_vaapi_hwaccel_select="mpeg2video_decoder" -mpeg2_vdpau_hwaccel_deps="vdpau" -mpeg2_vdpau_hwaccel_select="mpeg2video_decoder" -mpeg4_crystalhd_decoder_select="crystalhd" -mpeg4_vaapi_hwaccel_deps="vaapi" -mpeg4_vaapi_hwaccel_select="mpeg4_decoder" -mpeg4_vdpau_decoder_deps="vdpau" -mpeg4_vdpau_decoder_select="mpeg4_decoder" -mpeg4_vdpau_hwaccel_deps="vdpau" -mpeg4_vdpau_hwaccel_select="mpeg4_decoder" -msmpeg4_crystalhd_decoder_select="crystalhd" -vc1_crystalhd_decoder_select="crystalhd" -vc1_dxva2_hwaccel_deps="dxva2" -vc1_dxva2_hwaccel_select="vc1_decoder" -vc1_vaapi_hwaccel_deps="vaapi" -vc1_vaapi_hwaccel_select="vc1_decoder" -vc1_vdpau_decoder_deps="vdpau" -vc1_vdpau_decoder_select="vc1_decoder" -vc1_vdpau_hwaccel_deps="vdpau" -vc1_vdpau_hwaccel_select="vc1_decoder" -wmv3_crystalhd_decoder_select="crystalhd" -wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" -wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel" -wmv3_vdpau_decoder_select="vc1_vdpau_decoder" -wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel" - -# parsers -h264_parser_select="golomb h264chroma h264dsp h264pred h264qpel videodsp" -mpeg4video_parser_select="error_resilience mpegvideo" -mpegvideo_parser_select="error_resilience mpegvideo" -vc1_parser_select="mpegvideo" - -# external libraries -libaacplus_encoder_deps="libaacplus" -libcelt_decoder_deps="libcelt" -libfaac_encoder_deps="libfaac" -libfaac_encoder_select="audio_frame_queue" -libfdk_aac_decoder_deps="libfdk_aac" -libfdk_aac_encoder_deps="libfdk_aac" -libfdk_aac_encoder_select="audio_frame_queue" -libgme_demuxer_deps="libgme" -libgsm_decoder_deps="libgsm" -libgsm_encoder_deps="libgsm" -libgsm_ms_decoder_deps="libgsm" -libgsm_ms_encoder_deps="libgsm" -libilbc_decoder_deps="libilbc" -libilbc_encoder_deps="libilbc" -libmodplug_demuxer_deps="libmodplug" -libmp3lame_encoder_deps="libmp3lame" -libmp3lame_encoder_select="audio_frame_queue" -libopencore_amrnb_decoder_deps="libopencore_amrnb" -libopencore_amrnb_encoder_deps="libopencore_amrnb" -libopencore_amrnb_encoder_select="audio_frame_queue" -libopencore_amrwb_decoder_deps="libopencore_amrwb" -libopenjpeg_decoder_deps="libopenjpeg" -libopenjpeg_encoder_deps="libopenjpeg" -libopus_decoder_deps="libopus" -libopus_encoder_deps="libopus" -libopus_encoder_select="audio_frame_queue" -libquvi_demuxer_deps="libquvi" -libschroedinger_decoder_deps="libschroedinger" -libschroedinger_encoder_deps="libschroedinger" -libshine_encoder_deps="libshine" -libshine_encoder_select="audio_frame_queue" -libspeex_decoder_deps="libspeex" -libspeex_encoder_deps="libspeex" -libspeex_encoder_select="audio_frame_queue" -libstagefright_h264_decoder_deps="libstagefright_h264" -libtheora_encoder_deps="libtheora" -libtwolame_encoder_deps="libtwolame" -libvo_aacenc_encoder_deps="libvo_aacenc" -libvo_aacenc_encoder_select="audio_frame_queue" -libvo_amrwbenc_encoder_deps="libvo_amrwbenc" -libvorbis_decoder_deps="libvorbis" -libvorbis_encoder_deps="libvorbis" -libvorbis_encoder_select="audio_frame_queue" -libvpx_vp8_decoder_deps="libvpx" -libvpx_vp8_encoder_deps="libvpx" -libvpx_vp9_decoder_deps="libvpx" -libvpx_vp9_encoder_deps="libvpx" -libwavpack_encoder_deps="libwavpack" -libx264_encoder_deps="libx264" -libx264rgb_encoder_deps="libx264" -libxavs_encoder_deps="libxavs" -libxvid_encoder_deps="libxvid" -libutvideo_decoder_deps="libutvideo" -libutvideo_encoder_deps="libutvideo" -libzvbi_teletext_decoder_deps="libzvbi" - -# demuxers / muxers -ac3_demuxer_select="ac3_parser" -asf_demuxer_select="riffdec" -asf_muxer_select="riffenc" -asf_stream_muxer_select="asf_muxer" -avi_demuxer_select="riffdec" -avi_muxer_select="riffenc" -avisynth_demuxer_deps="avisynth" -avisynth_demuxer_select="riffdec" -caf_demuxer_select="riffdec" -dirac_demuxer_select="dirac_parser" -dts_demuxer_select="dca_parser" -dtshd_demuxer_select="dca_parser" -dxa_demuxer_select="riffdec" -eac3_demuxer_select="ac3_parser" -f4v_muxer_select="mov_muxer" -flac_demuxer_select="flac_parser" -hls_muxer_select="mpegts_muxer" -ipod_muxer_select="mov_muxer" -ismv_muxer_select="mov_muxer" -libnut_demuxer_deps="libnut" -libnut_muxer_deps="libnut" -matroska_audio_muxer_select="matroska_muxer" -matroska_demuxer_select="riffdec" -matroska_demuxer_suggest="bzlib lzo zlib" -matroska_muxer_select="riffenc" -mmf_muxer_select="riffenc" -mov_demuxer_select="riffdec" -mov_demuxer_suggest="zlib" -mov_muxer_select="riffenc rtpenc_chain" -mp3_demuxer_select="mpegaudio_parser" -mp4_muxer_select="mov_muxer" -mpegts_muxer_select="adts_muxer latm_muxer" -mpegtsraw_demuxer_select="mpegts_demuxer" -mxf_d10_muxer_select="mxf_muxer" -nut_muxer_select="riffenc" -nuv_demuxer_select="riffdec" -ogg_demuxer_select="golomb" -psp_muxer_select="mov_muxer" -rtp_demuxer_select="sdp_demuxer" -rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer" -rtsp_demuxer_select="http_protocol rtpdec" -rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain" -sap_demuxer_select="sdp_demuxer" -sap_muxer_select="rtp_muxer rtp_protocol rtpenc_chain" -sdp_demuxer_select="rtpdec" -smoothstreaming_muxer_select="ismv_muxer" -spdif_muxer_select="aac_parser" -tak_demuxer_select="tak_parser" -tg2_muxer_select="mov_muxer" -tgp_muxer_select="mov_muxer" -vobsub_demuxer_select="mpegps_demuxer" -w64_demuxer_select="wav_demuxer" -w64_muxer_select="wav_muxer" -wav_demuxer_select="riffdec" -wav_muxer_select="riffenc" -webm_muxer_select="riffenc" -wtv_demuxer_select="riffdec" -xmv_demuxer_select="riffdec" -xwma_demuxer_select="riffdec" - -# indevs / outdevs -alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp" -alsa_outdev_deps="alsa_asoundlib_h" -bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" -caca_outdev_deps="libcaca" -dshow_indev_deps="IBaseFilter" -dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid" -dv1394_indev_deps="dv1394" -dv1394_indev_select="dv_demuxer" -fbdev_indev_deps="linux_fb_h" -fbdev_outdev_deps="linux_fb_h" -iec61883_indev_deps="libiec61883" -jack_indev_deps="jack_jack_h sem_timedwait" -lavfi_indev_deps="avfilter" -libcdio_indev_deps="libcdio" -libdc1394_indev_deps="libdc1394" -libv4l2_indev_deps="libv4l2" -openal_indev_deps="openal" -oss_indev_deps_any="soundcard_h sys_soundcard_h" -oss_outdev_deps_any="soundcard_h sys_soundcard_h" -pulse_indev_deps="libpulse" -pulse_outdev_deps="libpulse" -sdl_outdev_deps="sdl" -sndio_indev_deps="sndio_h" -sndio_outdev_deps="sndio_h" -v4l_indev_deps="linux_videodev_h" -v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h" -v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h" -vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines" -vfwcap_indev_extralibs="-lavicap32" -xv_outdev_deps="X11_extensions_Xvlib_h XvGetPortAttribute" -xv_outdev_extralibs="-lXv -lX11 -lXext" -x11grab_indev_deps="x11grab" - -# protocols -bluray_protocol_deps="libbluray" -ffrtmpcrypt_protocol_deps="!librtmp_protocol" -ffrtmpcrypt_protocol_deps_any="gcrypt nettle openssl" -ffrtmpcrypt_protocol_select="tcp_protocol" -ffrtmphttp_protocol_deps="!librtmp_protocol" -ffrtmphttp_protocol_select="http_protocol" -ftp_protocol_select="tcp_protocol" -gopher_protocol_select="network" -httpproxy_protocol_select="tcp_protocol" -http_protocol_select="tcp_protocol" -https_protocol_select="tls_protocol" -librtmp_protocol_deps="librtmp" -librtmpe_protocol_deps="librtmp" -librtmps_protocol_deps="librtmp" -librtmpt_protocol_deps="librtmp" -librtmpte_protocol_deps="librtmp" -libssh_protocol_deps="libssh" -mmsh_protocol_select="http_protocol" -mmst_protocol_select="network" -rtmp_protocol_deps="!librtmp_protocol" -rtmp_protocol_select="tcp_protocol" -rtmpe_protocol_select="ffrtmpcrypt_protocol" -rtmps_protocol_deps="!librtmp_protocol" -rtmps_protocol_select="tls_protocol" -rtmpt_protocol_select="ffrtmphttp_protocol" -rtmpte_protocol_select="ffrtmpcrypt_protocol ffrtmphttp_protocol" -rtmpts_protocol_select="ffrtmphttp_protocol https_protocol" -rtp_protocol_select="udp_protocol" -sctp_protocol_deps="struct_sctp_event_subscribe" -sctp_protocol_select="network" -srtp_protocol_select="rtp_protocol" -tcp_protocol_select="network" -tls_protocol_deps_any="openssl gnutls" -tls_protocol_select="tcp_protocol" -udp_protocol_select="network" -unix_protocol_deps="sys_un_h" -unix_protocol_select="network" - -# filters -aconvert_filter_deps="swresample" -amovie_filter_deps="avcodec avformat" -aresample_filter_deps="swresample" -ass_filter_deps="libass" -asyncts_filter_deps="avresample" -atempo_filter_deps="avcodec" -atempo_filter_select="rdft" -azmq_filter_deps="libzmq" -blackframe_filter_deps="gpl" -boxblur_filter_deps="gpl" -colormatrix_filter_deps="gpl" -cropdetect_filter_deps="gpl" -dctdnoiz_filter_deps="avcodec" -dctdnoiz_filter_select="fft" -delogo_filter_deps="gpl" -deshake_filter_deps="avcodec" -deshake_filter_select="dsputil" -drawtext_filter_deps="libfreetype" -ebur128_filter_deps="gpl" -flite_filter_deps="libflite" -frei0r_filter_deps="frei0r dlopen" -frei0r_filter_extralibs='$ldl' -frei0r_src_filter_deps="frei0r dlopen" -frei0r_src_filter_extralibs='$ldl' -geq_filter_deps="gpl" -histeq_filter_deps="gpl" -hqdn3d_filter_deps="gpl" -interlace_filter_deps="gpl" -kerndeint_filter_deps="gpl" -ladspa_filter_deps="ladspa dlopen" -mcdeint_filter_deps="avcodec gpl" -movie_filter_deps="avcodec avformat" -mp_filter_deps="gpl avcodec swscale inline_asm" -mpdecimate_filter_deps="gpl avcodec" -mptestsrc_filter_deps="gpl" -negate_filter_deps="lut_filter" -perspective_filter_deps="gpl" -resample_filter_deps="avresample" -ocv_filter_deps="libopencv" -owdenoise_filter_deps="gpl" -pan_filter_deps="swresample" -phase_filter_deps="gpl" -pp_filter_deps="gpl postproc" -pullup_filter_deps="gpl" -removelogo_filter_deps="avcodec avformat swscale" -sab_filter_deps="gpl swscale" -scale_filter_deps="swscale" -smartblur_filter_deps="gpl swscale" -showspectrum_filter_deps="avcodec" -showspectrum_filter_select="rdft" -spp_filter_deps="gpl avcodec" -spp_filter_select="fft" -stereo3d_filter_deps="gpl" -subtitles_filter_deps="avformat avcodec libass" -super2xsai_filter_deps="gpl" -tinterlace_filter_deps="gpl" -vidstabdetect_filter_deps="libvidstab" -vidstabtransform_filter_deps="libvidstab" -yadif_filter_deps="gpl" -pixfmts_super2xsai_test_deps="super2xsai_filter" -tinterlace_merge_test_deps="tinterlace_filter" -tinterlace_pad_test_deps="tinterlace_filter" -zmq_filter_deps="libzmq" - -# libraries -avcodec_deps="avutil" -avdevice_deps="avutil avcodec avformat" -avfilter_deps="avutil" -avformat_deps="avutil avcodec" -avresample_deps="avutil" -postproc_deps="avutil gpl" -swscale_deps="avutil" - -# programs -ffmpeg_deps="avcodec avfilter avformat swresample" -ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter - null_filter - setpts_filter trim_filter" -ffplay_deps="avcodec avformat swscale swresample sdl" -ffplay_select="rdft crop_filter" -ffprobe_deps="avcodec avformat" -ffserver_deps="avformat fork sarestart" -ffserver_select="ffm_muxer rtp_protocol rtsp_demuxer" -ffserver_extralibs='$ldl' - -# documentation -podpages_deps="perl" -manpages_deps="perl pod2man" -htmlpages_deps="texi2html" -txtpages_deps="makeinfo" -doc_deps_any="manpages htmlpages podpages txtpages" - -# default parameters - -logfile="config.log" - -# installation paths -prefix_default="/usr/local" -bindir_default='${prefix}/bin' -datadir_default='${prefix}/share/ffmpeg' -docdir_default='${prefix}/share/doc/ffmpeg' -incdir_default='${prefix}/include' -libdir_default='${prefix}/lib' -mandir_default='${prefix}/share/man' -shlibdir_default="$libdir_default" - -# toolchain -ar_default="ar" -cc_default="gcc" -cxx_default="g++" -host_cc_default="gcc" -cp_f="cp -f" -install="install" -ln_s="ln -s -f" -nm_default="nm -g" -objformat="elf" -pkg_config_default=pkg-config -ranlib="ranlib" -strip_default="strip" -yasmexe_default="yasm" - -nogas=":" - -# machine -arch_default=$(uname -m) -cpu="generic" - -# OS -target_os_default=$(tolower $(uname -s)) -host_os=$target_os_default - -# configurable options -enable $PROGRAM_LIST -enable $DOCUMENT_LIST -enable $(filter_out avresample $LIBRARY_LIST) -enable stripping - -enable asm -enable debug -enable doc -enable optimizations -enable runtime_cpudetect -enable safe_bitstream_reader -enable static -enable swscale_alpha - -# Enable hwaccels by default. -enable dxva2 vaapi vdpau - -# build settings -SHFLAGS='-shared -Wl,-soname,$$(@F)' -LIBPREF="lib" -LIBSUF=".a" -FULLNAME='$(NAME)$(BUILDSUF)' -LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)' -SLIBPREF="lib" -SLIBSUF=".so" -SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)' -SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)' -SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)' -LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"' -SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)' -SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)' - -asflags_filter=echo -cflags_filter=echo -ldflags_filter=echo - -AS_C='-c' -AS_O='-o $@' -CC_C='-c' -CC_E='-E -o $@' -CC_O='-o $@' -CXX_C='-c' -CXX_O='-o $@' -LD_O='-o $@' -LD_LIB='-l%' -LD_PATH='-L' -HOSTCC_C='-c' -HOSTCC_O='-o $@' -HOSTLD_O='-o $@' - -host_cflags='-O3 -g' -host_cppflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600' -host_libs='-lm' -host_cflags_filter=echo -host_ldflags_filter=echo - -target_path='$(CURDIR)' - -# since the object filename is not given with the -MM flag, the compiler -# is only able to print the basename, and we must add the path ourselves -DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)' -DEPFLAGS='-MM' - -# find source path -if test -f configure; then - source_path=. -else - source_path=$(cd $(dirname "$0"); pwd) - echo "$source_path" | grep -q '[[:blank:]]' && - die "Out of tree builds are impossible with whitespace in source path." - test -e "$source_path/config.h" && - die "Out of tree builds are impossible with config.h in source dir." -fi - -for v in "$@"; do - r=${v#*=} - l=${v%"$r"} - r=$(sh_quote "$r") - FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}" -done - -find_things(){ - thing=$1 - pattern=$2 - file=$source_path/$3 - sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file" -} - -ENCODER_LIST=$(find_things encoder ENC libavcodec/allcodecs.c) -DECODER_LIST=$(find_things decoder DEC libavcodec/allcodecs.c) -HWACCEL_LIST=$(find_things hwaccel HWACCEL libavcodec/allcodecs.c) -PARSER_LIST=$(find_things parser PARSER libavcodec/allcodecs.c) -BSF_LIST=$(find_things bsf BSF libavcodec/allcodecs.c) -MUXER_LIST=$(find_things muxer _MUX libavformat/allformats.c) -DEMUXER_LIST=$(find_things demuxer DEMUX libavformat/allformats.c) -OUTDEV_LIST=$(find_things outdev OUTDEV libavdevice/alldevices.c) -INDEV_LIST=$(find_things indev _IN libavdevice/alldevices.c) -PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c) -FILTER_LIST=$(find_things filter FILTER libavfilter/allfilters.c) - -ALL_COMPONENTS=" - $BSF_LIST - $DECODER_LIST - $DEMUXER_LIST - $ENCODER_LIST - $FILTER_LIST - $HWACCEL_LIST - $INDEV_LIST - $MUXER_LIST - $OUTDEV_LIST - $PARSER_LIST - $PROTOCOL_LIST -" - -for n in $COMPONENT_LIST; do - v=$(toupper ${n%s})_LIST - eval enable \$$v - eval ${n}_if_any="\$$v" -done - -enable $ARCH_EXT_LIST - -die_unknown(){ - echo "Unknown option \"$1\"." - echo "See $0 --help for available options." - exit 1 -} - -print_3_columns() { - cat | tr ' ' '\n' | sort | pr -r -3 -t -} - -show_list() { - suffix=_$1 - shift - echo $* | sed s/$suffix//g | print_3_columns - exit 0 -} - -rand_list(){ - IFS=', ' - set -- $* - unset IFS - for thing; do - comp=${thing%:*} - prob=${thing#$comp} - prob=${prob#:} - is_in ${comp} $COMPONENT_LIST && eval comp=\$$(toupper ${comp%s})_LIST - echo "prob ${prob:-0.5}" - printf '%s\n' $comp - done -} - -do_random(){ - action=$1 - shift - random_seed=$(awk "BEGIN { srand($random_seed); print srand() }") - $action $(rand_list "$@" | awk "BEGIN { srand($random_seed) } \$1 == \"prob\" { prob = \$2; next } rand() < prob { print }") -} - -for opt do - optval="${opt#*=}" - case "$opt" in - --extra-ldflags=*) - add_ldflags $optval - ;; - --extra-libs=*) - add_extralibs $optval - ;; - --disable-devices) - disable $INDEV_LIST $OUTDEV_LIST - ;; - --enable-debug=*) - debuglevel="$optval" - ;; - --disable-programs) - disable $PROGRAM_LIST - ;; - --disable-everything) - map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST - ;; - --disable-all) - map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST - disable $LIBRARY_LIST $PROGRAM_LIST doc - ;; - --enable-random|--disable-random) - action=${opt%%-random} - do_random ${action#--} $COMPONENT_LIST - ;; - --enable-random=*|--disable-random=*) - action=${opt%%-random=*} - do_random ${action#--} $optval - ;; - --enable-*=*|--disable-*=*) - eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/') - is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt" - eval list=\$$(toupper $thing)_LIST - name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing} - list=$(filter "$name" $list) - [ "$list" = "" ] && warn "Option $opt did not match anything" - $action $list - ;; - --enable-?*|--disable-?*) - eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g') - if is_in $option $COMPONENT_LIST; then - test $action = disable && action=unset - eval $action \$$(toupper ${option%s})_LIST - elif is_in $option $CMDLINE_SELECT; then - $action $option - else - die_unknown $opt - fi - ;; - --list-*) - NAME="${opt#--list-}" - is_in $NAME $COMPONENT_LIST || die_unknown $opt - NAME=${NAME%s} - eval show_list $NAME \$$(toupper $NAME)_LIST - ;; - --help|-h) show_help - ;; - --fatal-warnings) enable fatal_warnings - ;; - *) - optname="${opt%%=*}" - optname="${optname#--}" - optname=$(echo "$optname" | sed 's/-/_/g') - if is_in $optname $CMDLINE_SET; then - eval $optname='$optval' - elif is_in $optname $CMDLINE_APPEND; then - append $optname "$optval" - else - die_unknown $opt - fi - ;; - esac -done - -disabled logging && logfile=/dev/null - -echo "# $0 $FFMPEG_CONFIGURATION" > $logfile -set >> $logfile - -test -n "$cross_prefix" && enable cross_compile - -if enabled cross_compile; then - test -n "$arch" && test -n "$target_os" || - die "Must specify target arch and OS when cross-compiling" -fi - -ar_default="${cross_prefix}${ar_default}" -cc_default="${cross_prefix}${cc_default}" -cxx_default="${cross_prefix}${cxx_default}" -nm_default="${cross_prefix}${nm_default}" -pkg_config_default="${cross_prefix}${pkg_config_default}" -ranlib="${cross_prefix}${ranlib}" -strip_default="${cross_prefix}${strip_default}" - -sysinclude_default="${sysroot}/usr/include" - -test -n "$valgrind" && toolchain="valgrind-memcheck" - -case "$toolchain" in - clang-asan) - cc_default="clang" - add_cflags -fsanitize=address - add_ldflags -fsanitize=address - ;; - clang-tsan) - cc_default="clang" - add_cflags -fsanitize=thread -pie - add_ldflags -fsanitize=thread -pie - ;; - gcc-asan) - cc_default="gcc" - add_cflags -fsanitize=address - add_ldflags -fsanitize=address - ;; - gcc-tsan) - cc_default="gcc" - add_cflags -fsanitize=thread -pie -fPIC - add_ldflags -fsanitize=thread -pie -fPIC - ;; - valgrind-massif) - target_exec_default=${valgrind:-"valgrind"} - target_exec_args="--tool=massif --alloc-fn=av_malloc --alloc-fn=av_mallocz --alloc-fn=av_calloc --alloc-fn=av_fast_padded_malloc --alloc-fn=av_fast_malloc --alloc-fn=av_realloc_f --alloc-fn=av_fast_realloc --alloc-fn=av_realloc" - ;; - valgrind-memcheck) - target_exec_default=${valgrind:-"valgrind"} - target_exec_args="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp" - ;; - msvc) - cc_default="c99wrap cl" - ld_default="c99wrap link" - nm_default="dumpbin -symbols" - ar_default="lib" - target_os_default="win32" - ;; - icl) - cc_default="c99wrap -noconv icl" - ld_default="c99wrap xilink" - nm_default="dumpbin -symbols" - ar_default="xilib" - target_os_default="win32" - ;; - gcov) - add_cflags -fprofile-arcs -ftest-coverage - add_ldflags -fprofile-arcs -ftest-coverage - ;; - ?*) - die "Unknown toolchain $toolchain" - ;; -esac - -set_default arch cc cxx pkg_config strip sysinclude target_exec target_os yasmexe -enabled cross_compile || host_cc_default=$cc -set_default host_cc - -if ! $pkg_config --version >/dev/null 2>&1; then - warn "$pkg_config not found, library detection may fail." - pkg_config=false -fi - -exesuf() { - case $1 in - mingw32*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;; - esac -} - -EXESUF=$(exesuf $target_os) -HOSTEXESUF=$(exesuf $host_os) - -# set temporary file name -: ${TMPDIR:=$TEMPDIR} -: ${TMPDIR:=$TMP} -: ${TMPDIR:=/tmp} - -if [ -n "$tempprefix" ] ; then - mktemp(){ - echo $tempprefix.${HOSTNAME}.${UID} - } -elif ! check_cmd mktemp -u XXXXXX; then - # simple replacement for missing mktemp - # NOT SAFE FOR GENERAL USE - mktemp(){ - echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$" - } -fi - -tmpfile(){ - tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 && - (set -C; exec > $tmp) 2>/dev/null || - die "Unable to create temporary file in $TMPDIR." - append TMPFILES $tmp - eval $1=$tmp -} - -trap 'rm -f -- $TMPFILES' EXIT - -tmpfile TMPASM .asm -tmpfile TMPC .c -tmpfile TMPCPP .cpp -tmpfile TMPE $EXESUF -tmpfile TMPH .h -tmpfile TMPO .o -tmpfile TMPS .S -tmpfile TMPSH .sh -tmpfile TMPV .ver - -unset -f mktemp - -chmod +x $TMPE - -# make sure we can execute files in $TMPDIR -cat > $TMPSH 2>> $logfile <> $logfile 2>&1 -if ! $TMPSH >> $logfile 2>&1; then - cat <&1 | grep -q '^GNU assembler'; then - true # no-op to avoid reading stdin in following checks - elif $_cc -v 2>&1 | grep -q '^gcc.*LLVM'; then - _type=llvm_gcc - gcc_extra_ver=$(expr "$($_cc --version | head -n1)" : '.*\((.*)\)') - _ident="llvm-gcc $($_cc -dumpversion) $gcc_extra_ver" - _depflags='-MMD -MF $(@:.o=.d) -MT $@' - _cflags_speed='-O3' - _cflags_size='-Os' - elif $_cc -v 2>&1 | grep -qi ^gcc; then - _type=gcc - gcc_version=$($_cc --version | head -n1) - gcc_basever=$($_cc -dumpversion) - gcc_pkg_ver=$(expr "$gcc_version" : '[^ ]* \(([^)]*)\)') - gcc_ext_ver=$(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)") - _ident=$(cleanws "gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver") - if ! $_cc -dumpversion | grep -q '^2\.'; then - _depflags='-MMD -MF $(@:.o=.d) -MT $@' - fi - _cflags_speed='-O3' - _cflags_size='-Os' - elif $_cc --version 2>/dev/null | grep -q ^icc; then - _type=icc - _ident=$($_cc --version | head -n1) - _depflags='-MMD' - _cflags_speed='-O3' - _cflags_size='-Os' - _cflags_noopt='-O1' - elif $_cc -v 2>&1 | grep -q xlc; then - _type=xlc - _ident=$($_cc -qversion 2>/dev/null | head -n1) - _cflags_speed='-O5' - _cflags_size='-O5 -qcompact' - elif $_cc -V 2>/dev/null | grep -q Compaq; then - _type=ccc - _ident=$($_cc -V | head -n1 | cut -d' ' -f1-3) - _DEPFLAGS='-M' - _cflags_speed='-fast' - _cflags_size='-O1' - _flags_filter=ccc_flags - elif $_cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then - test -d "$sysroot" || die "No valid sysroot specified." - _type=armcc - _ident=$($_cc --vsn | head -n1) - armcc_conf="$PWD/armcc.conf" - $_cc --arm_linux_configure \ - --arm_linux_config_file="$armcc_conf" \ - --configure_sysroot="$sysroot" \ - --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 || - die "Error creating armcc configuration file." - $_cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc - _flags="--arm_linux_config_file=$armcc_conf --translate_gcc" - as_default="${cross_prefix}gcc" - _depflags='-MMD' - _cflags_speed='-O3' - _cflags_size='-Os' - elif $_cc -version 2>/dev/null | grep -Eq 'TMS470|TI ARM'; then - _type=tms470 - _ident=$($_cc -version | head -n1 | tr -s ' ') - _flags='--gcc --abi=eabi -me' - _cc_e='-ppl -fe=$@' - _cc_o='-fe=$@' - _depflags='-ppa -ppd=$(@:.o=.d)' - _cflags_speed='-O3 -mf=5' - _cflags_size='-O3 -mf=2' - _flags_filter=tms470_flags - elif $_cc -v 2>&1 | grep -q clang; then - _type=clang - _ident=$($_cc --version | head -n1) - _depflags='-MMD' - _cflags_speed='-O3' - _cflags_size='-Os' - elif $_cc -V 2>&1 | grep -q Sun; then - _type=suncc - _ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-) - _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)' - _DEPFLAGS='-xM1 -xc99' - _ldflags='-std=c99' - _cflags_speed='-O5' - _cflags_size='-O5 -xspace' - _flags_filter=suncc_flags - elif $_cc -v 2>&1 | grep -q 'PathScale\|Path64'; then - _type=pathscale - _ident=$($_cc -v 2>&1 | head -n1 | tr -d :) - _depflags='-MMD -MF $(@:.o=.d) -MT $@' - _cflags_speed='-O2' - _cflags_size='-Os' - _flags_filter='filter_out -Wdisabled-optimization' - elif $_cc -v 2>&1 | grep -q Open64; then - _type=open64 - _ident=$($_cc -v 2>&1 | head -n1 | tr -d :) - _depflags='-MMD -MF $(@:.o=.d) -MT $@' - _cflags_speed='-O2' - _cflags_size='-Os' - _flags_filter='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros' - elif $_cc -V 2>&1 | grep -q Portland; then - _type=pgi - _ident="PGI $($_cc -V 2>&1 | awk '/^pgcc/ { print $2; exit }')" - opt_common='-alias=ansi -Mdse -Mlre -Mpre' - _cflags_speed="-O3 -Mautoinline -Munroll=c:4 $opt_common" - _cflags_size="-O2 -Munroll=c:1 $opt_common" - _cflags_noopt="-O" - _flags_filter=pgi_flags - elif $_cc 2>&1 | grep -q Microsoft; then - _type=msvc - _ident=$($cc 2>&1 | head -n1) - _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)' - _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' - _cflags_speed="-O2" - _cflags_size="-O1" - # Nonstandard output options, to avoid msys path conversion issues. - # Relies on wrapper to remap it. - if $_cc 2>&1 | grep -q Linker; then - _ld_o='-out $@' - else - _ld_o='-Fe$@' - fi - _cc_o='-Fo $@' - _cc_e='-P -Fi $@' - _flags_filter=msvc_flags - _ld_lib='lib%.a' - _ld_path='-libpath:' - _flags='-nologo' - _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64' - if [ $pfx = hostcc ]; then - append _cflags -Dsnprintf=_snprintf - fi - disable stripping - elif $_cc 2>&1 | grep -q Intel; then - _type=icl - _ident=$($cc 2>&1 | head -n1) - _depflags='-QMMD -QMF$(@:.o=.d) -QMT$@' - # Not only is O3 broken on 13.x+ but it is slower on all previous - # versions (tested) as well. - _cflags_speed="-O2" - _cflags_size="-O1 -Oi" # -O1 without -Oi miscompiles stuff - # Nonstandard output options, to avoid msys path conversion issues. - # Relies on wrapper to remap it. - if $_cc 2>&1 | grep -q Linker; then - _ld_o='-out $@' - else - _ld_o='-Fe$@' - fi - _cc_o='-Fo $@' - _cc_e='-P' - _flags_filter=icl_flags - _ld_lib='lib%.a' - _ld_path='-libpath:' - # -Qdiag-error to make icl error when seeing certain unknown arguments - _flags='-nologo -Qdiag-error:4044,10157' - # -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency - # with MSVC which enables it by default. - _cflags='-D_USE_MATH_DEFINES -FIstdlib.h -Dstrtoll=_strtoi64 -Qms0 -Qvec- -Qsimd- -GS' - if [ $pfx = hostcc ]; then - append _cflags -Dsnprintf=_snprintf - fi - elif $_cc --version 2>/dev/null | grep -q ^cparser; then - _type=cparser - _ident=$($_cc --version | head -n1) - _depflags='-MMD' - _cflags_speed='-O4' - _cflags_size='-O2' - _flags_filter=cparser_flags - fi - - eval ${pfx}_type=\$_type - eval ${pfx}_ident=\$_ident -} - -set_ccvars(){ - eval ${1}_C=\${_cc_c-\${${1}_C}} - eval ${1}_E=\${_cc_e-\${${1}_E}} - eval ${1}_O=\${_cc_o-\${${1}_O}} - - if [ -n "$_depflags" ]; then - eval ${1}_DEPFLAGS=\$_depflags - else - eval ${1}DEP=\${_DEPCMD:-\$DEPCMD} - eval ${1}DEP_FLAGS=\${_DEPFLAGS:-\$DEPFLAGS} - eval DEP${1}FLAGS=\$_flags - fi -} - -probe_cc cc "$cc" -cflags_filter=$_flags_filter -cflags_speed=$_cflags_speed -cflags_size=$_cflags_size -cflags_noopt=$_cflags_noopt -add_cflags $_flags $_cflags -cc_ldflags=$_ldflags -set_ccvars CC - -probe_cc hostcc "$host_cc" -host_cflags_filter=$_flags_filter -add_host_cflags $_flags $_cflags -set_ccvars HOSTCC - -test -n "$cc_type" && enable $cc_type || - warn "Unknown C compiler $cc, unable to select optimal CFLAGS" - -: ${as_default:=$cc} -: ${dep_cc_default:=$cc} -: ${ld_default:=$cc} -: ${host_ld_default:=$host_cc} -set_default ar as dep_cc ld host_ld - -probe_cc as "$as" -asflags_filter=$_flags_filter -add_asflags $_flags $_cflags -set_ccvars AS - -probe_cc ld "$ld" -ldflags_filter=$_flags_filter -add_ldflags $_flags $_ldflags -test "$cc_type" != "$ld_type" && add_ldflags $cc_ldflags -LD_O=${_ld_o-$LD_O} -LD_LIB=${_ld_lib-$LD_LIB} -LD_PATH=${_ld_path-$LD_PATH} - -probe_cc hostld "$host_ld" -host_ldflags_filter=$_flags_filter -add_host_ldflags $_flags $_ldflags -HOSTLD_O=${_ld_o-$HOSTLD_O} - -if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then - probe_cc depcc "$dep_cc" - CCDEP=${_DEPCMD:-$DEPCMD} - CCDEP_FLAGS=${_DEPFLAGS:=$DEPFLAGS} - DEPCCFLAGS=$_flags -fi - -if $ar 2>&1 | grep -q Microsoft; then - arflags="-nologo" - ar_o='-out:$@' -elif $ar 2>&1 | grep -q 'Texas Instruments'; then - arflags="rq" - ar_o='$@' -elif $ar 2>&1 | grep -q 'Usage: ar.*-X.*any'; then - arflags='-Xany -r -c' - ar_o='$@' -else - arflags="rc" - ar_o='$@' -fi - -add_cflags $extra_cflags -add_cxxflags $extra_cxxflags -add_asflags $extra_cflags - -if test -n "$sysroot"; then - case "$cc_type" in - gcc|llvm_gcc|clang) - add_cppflags --sysroot="$sysroot" - add_ldflags --sysroot="$sysroot" - ;; - tms470) - add_cppflags -I"$sysinclude" - add_ldflags --sysroot="$sysroot" - ;; - esac -fi - -if test "$cpu" = host; then - enabled cross_compile && - die "--cpu=host makes no sense when cross-compiling." - - case "$cc_type" in - gcc|llvm_gcc) - check_native(){ - $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return - sed -n "/cc1.*$1=/{ - s/.*$1=\\([^ ]*\\).*/\\1/ - p - q - }" $TMPE - } - cpu=$(check_native -march || check_native -mcpu) - ;; - esac - - test "${cpu:-host}" = host && - die "--cpu=host not supported with compiler $cc" -fi - -# Deal with common $arch aliases -case "$arch" in - aarch64|arm64) - arch="aarch64" - ;; - arm*|iPad*|iPhone*) - arch="arm" - ;; - mips*|IP*) - arch="mips" - ;; - parisc*|hppa*) - arch="parisc" - ;; - "Power Macintosh"|ppc*|powerpc*) - arch="ppc" - ;; - s390|s390x) - arch="s390" - ;; - sh4|sh) - arch="sh4" - ;; - sun4u|sparc*) - arch="sparc" - ;; - tilegx|tile-gx) - arch="tilegx" - ;; - i[3-6]86|i86pc|BePC|x86pc|x86_64|x86_32|amd64) - arch="x86" - ;; -esac - -is_in $arch $ARCH_LIST || warn "unknown architecture $arch" -enable $arch - -# Add processor-specific flags -if enabled aarch64; then - - case $cpu in - armv*) - cpuflags="-march=$cpu" - ;; - *) - cpuflags="-mcpu=$cpu" - ;; - esac - -elif enabled alpha; then - - cpuflags="-mcpu=$cpu" - -elif enabled arm; then - - check_arm_arch() { - check_cpp_condition stddef.h \ - "defined __ARM_ARCH_${1}__ || defined __TARGET_ARCH_${2:-$1}" \ - $cpuflags - } - - probe_arm_arch() { - if check_arm_arch 4; then echo armv4; - elif check_arm_arch 4T; then echo armv4t; - elif check_arm_arch 5; then echo armv5; - elif check_arm_arch 5E; then echo armv5e; - elif check_arm_arch 5T; then echo armv5t; - elif check_arm_arch 5TE; then echo armv5te; - elif check_arm_arch 5TEJ; then echo armv5te; - elif check_arm_arch 6; then echo armv6; - elif check_arm_arch 6J; then echo armv6j; - elif check_arm_arch 6K; then echo armv6k; - elif check_arm_arch 6Z; then echo armv6z; - elif check_arm_arch 6ZK; then echo armv6zk; - elif check_arm_arch 6T2; then echo armv6t2; - elif check_arm_arch 7; then echo armv7; - elif check_arm_arch 7A 7_A; then echo armv7-a; - elif check_arm_arch 7R 7_R; then echo armv7-r; - elif check_arm_arch 7M 7_M; then echo armv7-m; - elif check_arm_arch 7EM 7E_M; then echo armv7-m; - elif check_arm_arch 8A 8_A; then echo armv8-a; - fi - } - - [ "$cpu" = generic ] && cpu=$(probe_arm_arch) - - case $cpu in - armv*) - cpuflags="-march=$cpu" - subarch=$(echo $cpu | sed 's/[^a-z0-9]//g') - ;; - *) - cpuflags="-mcpu=$cpu" - case $cpu in - cortex-a*) subarch=armv7a ;; - cortex-r*) subarch=armv7r ;; - cortex-m*) enable thumb; subarch=armv7m ;; - arm11*) subarch=armv6 ;; - arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;; - armv4*|arm7*|arm9[24]*) subarch=armv4 ;; - *) subarch=$(probe_arm_arch) ;; - esac - ;; - esac - - case "$subarch" in - armv5t*) enable fast_clz ;; - armv[6-8]*) enable fast_clz fast_unaligned ;; - esac - -elif enabled avr32; then - - case $cpu in - ap7[02]0[0-2]) - subarch="avr32_ap" - cpuflags="-mpart=$cpu" - ;; - ap) - subarch="avr32_ap" - cpuflags="-march=$cpu" - ;; - uc3[ab]*) - subarch="avr32_uc" - cpuflags="-mcpu=$cpu" - ;; - uc) - subarch="avr32_uc" - cpuflags="-march=$cpu" - ;; - esac - -elif enabled bfin; then - - cpuflags="-mcpu=$cpu" - -elif enabled mips; then - - cpuflags="-march=$cpu" - - case $cpu in - 24kc) - disable mipsfpu - disable mipsdspr1 - disable mipsdspr2 - ;; - 24kf*) - disable mipsdspr1 - disable mipsdspr2 - ;; - 24kec|34kc|1004kc) - disable mipsfpu - disable mipsdspr2 - ;; - 24kef*|34kf*|1004kf*) - disable mipsdspr2 - ;; - 74kc) - disable mipsfpu - ;; - esac - -elif enabled ppc; then - - case $(tolower $cpu) in - 601|ppc601|powerpc601) - cpuflags="-mcpu=601" - disable altivec - ;; - 603*|ppc603*|powerpc603*) - cpuflags="-mcpu=603" - disable altivec - ;; - 604*|ppc604*|powerpc604*) - cpuflags="-mcpu=604" - disable altivec - ;; - g3|75*|ppc75*|powerpc75*) - cpuflags="-mcpu=750" - disable altivec - ;; - g4|745*|ppc745*|powerpc745*) - cpuflags="-mcpu=7450" - ;; - 74*|ppc74*|powerpc74*) - cpuflags="-mcpu=7400" - ;; - g5|970|ppc970|powerpc970) - cpuflags="-mcpu=970" - ;; - power[3-7]*) - cpuflags="-mcpu=$cpu" - ;; - cell) - cpuflags="-mcpu=cell" - enable ldbrx - ;; - e500mc) - cpuflags="-mcpu=e500mc" - disable altivec - ;; - e500v2) - cpuflags="-mcpu=8548 -mhard-float -mfloat-gprs=double" - disable altivec - ;; - e500) - cpuflags="-mcpu=8540 -mhard-float" - disable altivec - ;; - esac - -elif enabled sparc; then - - case $cpu in - cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789]) - cpuflags="-mcpu=$cpu" - disable vis - ;; - ultrasparc*|niagara[234]) - cpuflags="-mcpu=$cpu" - ;; - esac - -elif enabled x86; then - - case $cpu in - i[345]86|pentium) - cpuflags="-march=$cpu" - disable mmx - ;; - # targets that do NOT support nopl and conditional mov (cmov) - pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3) - cpuflags="-march=$cpu" - disable i686 - ;; - # targets that do support nopl and conditional mov (cmov) - i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|corei7*|amdfam10|barcelona|atom|bdver*) - cpuflags="-march=$cpu" - enable i686 - enable fast_cmov - ;; - # targets that do support conditional mov but on which it's slow - pentium4|pentium4m|prescott|nocona) - cpuflags="-march=$cpu" - enable i686 - disable fast_cmov - ;; - esac - -fi - -if [ "$cpu" != generic ]; then - add_cflags $cpuflags - add_asflags $cpuflags -fi - -# compiler sanity check -check_exec < -EOF -check_cc -D_LARGEFILE_SOURCE < -EOF - -check_host_cflags -std=c99 -check_host_cflags -Wall - -check_64bit(){ - arch32=$1 - arch64=$2 - expr=$3 - check_code cc "" "int test[2*($expr) - 1]" && - subarch=$arch64 || subarch=$arch32 -} - -case "$arch" in - aarch64|alpha|ia64) - spic=$shared - ;; - mips) - check_64bit mips mips64 '_MIPS_SIM > 1' - spic=$shared - ;; - parisc) - check_64bit parisc parisc64 'sizeof(void *) > 4' - spic=$shared - ;; - ppc) - check_64bit ppc ppc64 'sizeof(void *) > 4' - spic=$shared - ;; - sparc) - check_64bit sparc sparc64 'sizeof(void *) > 4' - spic=$shared - ;; - x86) - check_64bit x86_32 x86_64 'sizeof(void *) > 4' - if test "$subarch" = "x86_64"; then - spic=$shared - fi - ;; - ppc) - check_cc < mapfile && - add_ldflags -Wl,-M,mapfile - nm_default='nm -P -g' - ;; - netbsd) - disable symver - oss_indev_extralibs="-lossaudio" - oss_outdev_extralibs="-lossaudio" - enabled gcc || check_ldflags -Wl,-zmuldefs - ;; - openbsd|bitrig) - disable symver - SHFLAGS='-shared' - SLIB_INSTALL_NAME='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)' - SLIB_INSTALL_LINKS= - oss_indev_extralibs="-lossaudio" - oss_outdev_extralibs="-lossaudio" - ;; - dragonfly) - disable symver - ;; - freebsd) - ;; - bsd/os) - add_extralibs -lpoll -lgnugetopt - strip="strip -d" - ;; - darwin) - gas="gas-preprocessor.pl $cc" - enabled ppc && add_asflags -force_cpusubtype_ALL - SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)' - enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress - strip="${strip} -x" - add_ldflags -Wl,-dynamic,-search_paths_first - SLIBSUF=".dylib" - SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)' - SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' - objformat="macho" - enabled x86_64 && objformat="macho64" - enabled_any pic shared || - { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } - ;; - mingw32*) - if test $target_os = "mingw32ce"; then - disable network - else - target_os=mingw32 - fi - LIBTARGET=i386 - if enabled x86_64; then - LIBTARGET="i386:x86-64" - elif enabled arm; then - LIBTARGET=arm-wince - fi - check_ldflags -Wl,--nxcompat - check_ldflags -Wl,--dynamicbase - shlibdir_default="$bindir_default" - SLIBPREF="" - SLIBSUF=".dll" - SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' - SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' - dlltool="${cross_prefix}dlltool" - if check_cmd lib.exe -list; then - SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' - if enabled x86_64; then - LIBTARGET=x64 - fi - elif check_cmd $dlltool --version; then - SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' - fi - SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' - SLIB_INSTALL_LINKS= - SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' - SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' - SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.orig.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base' - objformat="win32" - ranlib=: - enable dos_paths - ;; - win32|win64) - if enabled shared; then - # Link to the import library instead of the normal static library - # for shared libs. - LD_LIB='%.lib' - # Cannot build both shared and static libs with MSVC or icl. - disable static - fi - shlibdir_default="$bindir_default" - SLIBPREF="" - SLIBSUF=".dll" - SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' - SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' - SLIB_CREATE_DEF_CMD='makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)' - SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' - SLIB_INSTALL_LINKS= - SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' - SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' - SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' - objformat="win32" - ranlib=: - enable dos_paths - ;; - cygwin*) - target_os=cygwin - shlibdir_default="$bindir_default" - SLIBPREF="cyg" - SLIBSUF=".dll" - SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' - SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)' - SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' - SLIB_INSTALL_LINKS= - SLIB_INSTALL_EXTRA_LIB='lib$(FULLNAME).dll.a' - SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a' - objformat="win32" - enable dos_paths - ;; - *-dos|freedos|opendos) - network_extralibs="-lsocket" - objformat="coff" - enable dos_paths - add_cppflags -U__STRICT_ANSI__ - ;; - linux) - enable dv1394 - ;; - irix*) - target_os=irix - ranlib="echo ignoring ranlib" - ;; - os/2*) - strip="lxlite -CS" - ln_s="cp -f" - objformat="aout" - add_cppflags -D_GNU_SOURCE - add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap - SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf' - LIBSUF="_s.a" - SLIBPREF="" - SLIBSUF=".dll" - SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)' - SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(shell echo $(NAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)' - SLIB_CREATE_DEF_CMD='echo LIBRARY $(SLIBNAME_WITH_MAJOR) INITINSTANCE TERMINSTANCE > $(SUBDIR)$(NAME).def; \ - echo PROTMODE >> $(SUBDIR)$(NAME).def; \ - echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(SUBDIR)$(NAME).def; \ - echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(SUBDIR)$(NAME).def; \ - echo EXPORTS >> $(SUBDIR)$(NAME).def; \ - emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def' - SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \ - emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;' - SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib' - enable dos_paths - enable_weak os2threads - ;; - gnu/kfreebsd) - add_cppflags -D_BSD_SOURCE - ;; - gnu) - ;; - qnx) - add_cppflags -D_QNX_SOURCE - network_extralibs="-lsocket" - ;; - symbian) - SLIBSUF=".dll" - enable dos_paths - add_cflags --include=$sysinclude/gcce/gcce.h -fvisibility=default - add_cppflags -D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS - add_ldflags -Wl,--target1-abs,--no-undefined \ - -Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \ - -Wl,--entry=_E32Startup -Wl,-u,_E32Startup - add_extralibs -l:eexe.lib -l:usrt2_2.lib -l:dfpaeabi.dso \ - -l:drtaeabi.dso -l:scppnwdl.dso -lsupc++ -lgcc \ - -l:libc.dso -l:libm.dso -l:euser.dso -l:libcrt0.lib - ;; - osf1) - add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT - ;; - minix) - ;; - plan9) - add_cppflags -D_C99_SNPRINTF_EXTENSION \ - -D_REENTRANT_SOURCE \ - -D_RESEARCH_SOURCE \ - -DFD_SETSIZE=96 \ - -DHAVE_SOCK_OPTS - add_compat strtod.o strtod=avpriv_strtod - network_extralibs='-lbsd' - exeobjs=compat/plan9/main.o - disable ffserver - cp_f='cp' - ;; - none) - ;; - *) - die "Unknown OS '$target_os'." - ;; -esac - -# determine libc flavour - -# uclibc defines __GLIBC__, so it needs to be checked before glibc. -if check_cpp_condition features.h "defined __UCLIBC__"; then - libc_type=uclibc - add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -elif check_cpp_condition features.h "defined __GLIBC__"; then - libc_type=glibc - add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -# MinGW headers can be installed on Cygwin, so check for newlib first. -elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then - libc_type=newlib - add_cppflags -U__STRICT_ANSI__ -elif check_header _mingw.h; then - libc_type=mingw - check_cpp_condition _mingw.h \ - "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \ - (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || - die "ERROR: MinGW runtime version must be >= 3.15." - add_cppflags -U__STRICT_ANSI__ - if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \ - __MINGW64_VERSION_MAJOR < 3"; then - add_compat msvcrt/snprintf.o - add_cflags "-include $source_path/compat/msvcrt/snprintf.h" - else - add_cppflags -D__USE_MINGW_ANSI_STDIO=1 - fi -elif check_func_headers stdlib.h _get_doserrno; then - libc_type=msvcrt - add_compat strtod.o strtod=avpriv_strtod - add_compat msvcrt/snprintf.o snprintf=avpriv_snprintf \ - _snprintf=avpriv_snprintf \ - vsnprintf=avpriv_vsnprintf - # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to - # 0x601 by default unless something else is set by the user. - # This can easily lead to us detecting functions only present - # in such new versions and producing binaries requiring windows 7.0. - # Therefore explicitly set the default to XP unless the user has - # set something else on the command line. - check_cpp_condition stdlib.h "defined(_WIN32_WINNT)" || add_cppflags -D_WIN32_WINNT=0x0502 -elif check_cpp_condition stddef.h "defined __KLIBC__"; then - libc_type=klibc -elif check_cpp_condition sys/cdefs.h "defined __BIONIC__"; then - libc_type=bionic - add_compat strtod.o strtod=avpriv_strtod -fi - -test -n "$libc_type" && enable $libc_type - -# hacks for compiler/libc/os combinations - -if enabled_all tms470 glibc; then - CPPFLAGS="-I${source_path}/compat/tms470 ${CPPFLAGS}" - add_cppflags -D__USER_LABEL_PREFIX__= - add_cppflags -D__builtin_memset=memset - add_cppflags -D__gnuc_va_list=va_list -D_VA_LIST_DEFINED - add_cflags -pds=48 # incompatible redefinition of macro -fi - -if enabled_all ccc glibc; then - add_ldflags -Wl,-z,now # calls to libots crash without this -fi - -esc(){ - echo "$*" | sed 's/%/%25/g;s/:/%3a/g' -} - -echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" >config.fate - -check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic - -set_default $PATHS_LIST -set_default nm - -# we need to build at least one lib type -if ! enabled_any static shared; then - cat <= 2.0.0" aacplus.h aacplusEncOpen -laacplus -enabled libass && require_pkg_config libass ass/ass.h ass_library_init -enabled libbluray && require libbluray libbluray/bluray.h bd_open -lbluray -enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && - { check_lib celt/celt.h celt_decoder_create_custom -lcelt0 || - die "ERROR: libcelt must be installed and version must be >= 0.11.0."; } -enabled libcaca && require_pkg_config caca caca.h caca_create_canvas -enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac -enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac -flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite" -enabled libflite && require2 libflite "flite/flite.h" flite_init $flite_libs -enabled libfreetype && require_libfreetype -enabled libgme && require libgme gme/gme.h gme_new_emu -lgme -lstdc++ -enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do - check_lib "${gsm_hdr}" gsm_create -lgsm && break; - done || die "ERROR: libgsm not found"; } -enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc -enabled libmodplug && require libmodplug libmodplug/modplug.h ModPlug_Load -lmodplug -enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame -enabled libnut && require libnut libnut.h nut_demuxer_init -lnut -enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb -enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb -enabled libopencv && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader -enabled libopenjpeg && { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg || - check_lib openjpeg.h opj_version -lopenjpeg || - die "ERROR: libopenjpeg not found"; } -enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create -enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new -enabled libquvi && require_pkg_config libquvi quvi/quvi.h quvi_init -enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket -enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init -enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer -enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -enabled libssh && require_pkg_config libssh libssh/sftp.h sftp_init -enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex -enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h - media/stagefright/MediaBufferGroup.h media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h - media/stagefright/OMXClient.h media/stagefright/OMXCodec.h" android::OMXClient -lstagefright -lmedia -lutils -lbinder -lgnustl_static -enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg -enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame && - { check_lib twolame.h twolame_encode_buffer_float32_interleaved -ltwolame || - die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; } -enabled libutvideo && require_cpp utvideo "stdint.h stdlib.h utvideo/utvideo.h utvideo/Codec.h" 'CCodec*' -lutvideo -lstdc++ -enabled libv4l2 && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl -enabled libvidstab && require_pkg_config vidstab vid.stab/libvidstab.h vsMotionDetectInit -enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc -enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc -enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg -enabled libvpx && { - enabled libvpx_vp8_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx || - die "ERROR: libvpx decoder version must be >=0.9.1"; } - enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VP8E_SET_MAX_INTRA_BITRATE_PCT" -lvpx || - die "ERROR: libvpx encoder version must be >=0.9.7"; } - enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; } - enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx" -lvpx || disable libvpx_vp9_encoder; } } -enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack -enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && - { check_cpp_condition x264.h "X264_BUILD >= 118" || - die "ERROR: libx264 must be installed and version must be >= 0.118."; } -enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs -enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore -enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new -enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi -enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do - check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || - die "ERROR: openal not found"; } && - { check_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" || - die "ERROR: openal must be installed and version must be 1.1 or compatible"; } -enabled opencl && { check_lib2 OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || - check_lib2 CL/cl.h clEnqueueNDRangeKernel -lOpenCL || - die "ERROR: opencl not found"; } && - { ! enabled_any w32threads os2threads || - die "opencl currently needs --enable-pthreads or --disable-w32threads"; } && - { check_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || - check_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || - die "ERROR: opencl must be installed and version must be 1.2 or compatible"; } -enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || - check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || - check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || - die "ERROR: openssl not found"; } - -if enabled gnutls; then - { check_lib nettle/bignum.h nettle_mpz_get_str_256 -lnettle -lhogweed -lgmp && enable nettle; } || - { check_lib gcrypt.h gcry_mpi_new -lgcrypt && enable gcrypt; } -fi - -# libdc1394 check -if enabled libdc1394; then - { check_lib dc1394/dc1394.h dc1394_new -ldc1394 -lraw1394 && - enable libdc1394_2; } || - { check_lib libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394 && - enable libdc1394_1; } || - die "ERROR: No version of libdc1394 found " -fi - -SDL_CONFIG="${cross_prefix}sdl-config" -if check_pkg_config sdl SDL_events.h SDL_PollEvent; then - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags && - enable sdl -else - if "${SDL_CONFIG}" --version > /dev/null 2>&1; then - sdl_cflags=$("${SDL_CONFIG}" --cflags) - sdl_libs=$("${SDL_CONFIG}" --libs) - check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs && - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags && - enable sdl - fi -fi -enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs - -texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html -makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo -perl --version > /dev/null 2>&1 && enable perl || disable perl -pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man -rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout - -check_header linux/fb.h -check_header linux/videodev.h -check_header linux/videodev2.h -check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete - -check_header sys/videoio.h - -check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs" -# check that WM_CAP_DRIVER_CONNECT is defined to the proper value -# w32api 3.12 had it defined wrong -check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines - -check_type "dshow.h" IBaseFilter - -# check for ioctl_meteor.h, ioctl_bt848.h and alternatives -{ check_header dev/bktr/ioctl_meteor.h && - check_header dev/bktr/ioctl_bt848.h; } || -{ check_header machine/ioctl_meteor.h && - check_header machine/ioctl_bt848.h; } || -{ check_header dev/video/meteor/ioctl_meteor.h && - check_header dev/video/bktr/ioctl_bt848.h; } || -check_header dev/ic/bt8xx.h - -check_header sndio.h -if check_struct sys/soundcard.h audio_buf_info bytes; then - enable_safe sys/soundcard.h -else - check_cc -D__BSD_VISIBLE -D__XSI_VISIBLE < - audio_buf_info abc; -EOF -fi -check_header soundcard.h - -enabled_any alsa_indev alsa_outdev && - check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound - -enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait && - check_func jack_port_get_latency_range -ljack - -enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio - -if enabled libcdio; then - check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || - check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || - die "ERROR: libcdio-paranoia not found" -fi - -enabled x11grab && -require X11 X11/Xlib.h XOpenDisplay -lX11 && -require Xext X11/extensions/XShm.h XShmCreateImage -lXext && -require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes - -enabled vaapi && - check_lib va/va.h vaInitialize -lva || - disable vaapi - -enabled vdpau && - check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" || - disable vdpau - -# Funny iconv installations are not unusual, so check it after all flags have been set -disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv - -enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" - -# add some useful compiler flags if supported -check_cflags -Wdeclaration-after-statement -check_cflags -Wall -check_cflags -Wno-parentheses -check_cflags -Wno-switch -check_cflags -Wno-format-zero-length -check_cflags -Wdisabled-optimization -check_cflags -Wpointer-arith -check_cflags -Wredundant-decls -check_cflags -Wno-pointer-sign -check_cflags -Wwrite-strings -check_cflags -Wtype-limits -check_cflags -Wundef -check_cflags -Wmissing-prototypes -check_cflags -Wno-pointer-to-int-cast -check_cflags -Wstrict-prototypes -enabled extra_warnings && check_cflags -Winline - -# add some linker flags -check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample -test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic - -# add some strip flags -# -wN '..@*' is more selective than -x, but not available everywhere. -check_stripflags -wN \'..@*\' || check_stripflags -x - -enabled xmm_clobber_test && - check_ldflags -Wl,--wrap,avcodec_open2 \ - -Wl,--wrap,avcodec_decode_audio4 \ - -Wl,--wrap,avcodec_decode_video2 \ - -Wl,--wrap,avcodec_decode_subtitle2 \ - -Wl,--wrap,avcodec_encode_audio2 \ - -Wl,--wrap,avcodec_encode_video \ - -Wl,--wrap,avcodec_encode_video2 \ - -Wl,--wrap,avcodec_encode_subtitle \ - -Wl,--wrap,sws_scale || - disable xmm_clobber_test - -echo "X{};" > $TMPV -if test_ldflags -Wl,--version-script,$TMPV; then - append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' - check_cc <= 1400" && - add_cflags -Qansi-alias - # icl will pass the inline asm tests but inline asm is currently - # not supported (build will fail) - disabled inline_asm || warn "inline asm disabled due to issues with it in ICL" - disable inline_asm - fi -fi - -case $target_os in - osf1) - enabled ccc && add_ldflags '-Wl,-expect_unresolved,*' - ;; - plan9) - add_cppflags -Dmain=plan9_main - ;; -esac - -enable frame_thread_encoder -enabled_any $THREADS_LIST && enable threads -enabled_any $ATOMICS_LIST && enable atomics_native - -enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" - -enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } - -check_deps $CONFIG_LIST \ - $CONFIG_EXTRA \ - $HAVE_LIST \ - $ALL_COMPONENTS \ - - -if test $target_os = "haiku"; then - disable memalign - disable posix_memalign -fi - -! enabled_any memalign posix_memalign aligned_malloc && - enabled_any $need_memalign && enable memalign_hack - -# add_dep lib dep -# -> enable ${lib}_deps_${dep} -# -> add $dep to ${lib}_deps only once -add_dep() { - lib=$1 - dep=$2 - enabled "${lib}_deps_${dep}" && return 0 - enable "${lib}_deps_${dep}" - prepend "${lib}_deps" $dep -} - -# merge deps lib components -# merge all ${component}_deps into ${lib}_deps and ${lib}_deps_* -merge_deps() { - lib=$1 - shift - for comp in $*; do - enabled $comp || continue - eval "dep=\"\$${comp}_deps\"" - for d in $dep; do - add_dep $lib $d - done - done -} - -merge_deps libavfilter $FILTER_LIST - -echo "install prefix $prefix" -echo "source path $source_path" -echo "C compiler $cc" -echo "ARCH $arch ($cpu)" -if test "$build_suffix" != ""; then - echo "build suffix $build_suffix" -fi -if test "$progs_suffix" != ""; then - echo "progs suffix $progs_suffix" -fi -if test "$extra_version" != ""; then - echo "version string suffix $extra_version" -fi -echo "big-endian ${bigendian-no}" -echo "runtime cpu detection ${runtime_cpudetect-no}" -if enabled x86; then - echo "${yasmexe} ${yasm-no}" - echo "MMX enabled ${mmx-no}" - echo "MMXEXT enabled ${mmxext-no}" - echo "3DNow! enabled ${amd3dnow-no}" - echo "3DNow! extended enabled ${amd3dnowext-no}" - echo "SSE enabled ${sse-no}" - echo "SSSE3 enabled ${ssse3-no}" - echo "AVX enabled ${avx-no}" - echo "FMA4 enabled ${fma4-no}" - echo "i686 features enabled ${i686-no}" - echo "CMOV is fast ${fast_cmov-no}" - echo "EBX available ${ebx_available-no}" - echo "EBP available ${ebp_available-no}" -fi -if enabled arm; then - echo "ARMv5TE enabled ${armv5te-no}" - echo "ARMv6 enabled ${armv6-no}" - echo "ARMv6T2 enabled ${armv6t2-no}" - echo "VFP enabled ${vfp-no}" - echo "NEON enabled ${neon-no}" - echo "THUMB enabled ${thumb-no}" -fi -if enabled mips; then - echo "MIPS FPU enabled ${mipsfpu-no}" - echo "MIPS32R2 enabled ${mips32r2-no}" - echo "MIPS DSP R1 enabled ${mipsdspr1-no}" - echo "MIPS DSP R2 enabled ${mipsdspr2-no}" -fi -if enabled ppc; then - echo "AltiVec enabled ${altivec-no}" - echo "PPC 4xx optimizations ${ppc4xx-no}" - echo "dcbzl available ${dcbzl-no}" -fi -if enabled sparc; then - echo "VIS enabled ${vis-no}" -fi -echo "debug symbols ${debug-no}" -echo "strip symbols ${stripping-no}" -echo "optimize for size ${small-no}" -echo "optimizations ${optimizations-no}" -echo "static ${static-no}" -echo "shared ${shared-no}" -echo "postprocessing support ${postproc-no}" -echo "new filter support ${avfilter-no}" -echo "network support ${network-no}" -echo "threading support ${thread_type-no}" -echo "safe bitstream reader ${safe_bitstream_reader-no}" -echo "SDL support ${sdl-no}" -echo "opencl enabled ${opencl-no}" -echo "libzvbi enabled ${libzvbi-no}" -echo "texi2html enabled ${texi2html-no}" -echo "perl enabled ${perl-no}" -echo "pod2man enabled ${pod2man-no}" -echo "makeinfo enabled ${makeinfo-no}" -test -n "$random_seed" && - echo "random seed ${random_seed}" -echo - -echo "External libraries:" -print_enabled '' $EXTERNAL_LIBRARY_LIST | print_3_columns -echo - -for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do - echo "Enabled ${type}s:" - eval list=\$$(toupper $type)_LIST - print_enabled '_*' $list | print_3_columns - echo -done - -license="LGPL version 2.1 or later" -if enabled nonfree; then - license="nonfree and unredistributable" -elif enabled gplv3; then - license="GPL version 3 or later" -elif enabled lgplv3; then - license="LGPL version 3 or later" -elif enabled gpl; then - license="GPL version 2 or later" -fi - -echo "License: $license" - -echo "Creating config.mak, config.h, and doc/config.texi..." - -test -e Makefile || $ln_s "$source_path/Makefile" . - -enabled stripping || strip="echo skipping strip" - -config_files="$TMPH config.mak doc/config.texi" - -cat > config.mak <> config.mak - eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak - eval echo "${lcname}_VERSION_MINOR=\$${name}_VERSION_MINOR" >> config.mak -} - -map 'get_version $v' $LIBRARY_LIST - -cat > $TMPH <>$TMPH - -test -n "$malloc_prefix" && - echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH - -if enabled yasm; then - append config_files $TMPASM - printf '' >$TMPASM -fi - -enabled getenv || echo "#define getenv(x) NULL" >> $TMPH - - -mkdir -p doc -echo "@c auto-generated by configure" > doc/config.texi - -print_config ARCH_ "$config_files" $ARCH_LIST -print_config HAVE_ "$config_files" $HAVE_LIST -print_config CONFIG_ "$config_files" $CONFIG_LIST \ - $CONFIG_EXTRA \ - $ALL_COMPONENTS \ - -echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH -echo "endif # FFMPEG_CONFIG_MAK" >> config.mak - -# Do not overwrite an unchanged config.h to avoid superfluous rebuilds. -cp_if_changed $TMPH config.h -touch .config - -enabled yasm && cp_if_changed $TMPASM config.asm - -cat > $TMPH <> $TMPH - -cp_if_changed $TMPH libavutil/avconfig.h - -if test -n "$WARNINGS"; then - printf "\n$WARNINGS" - enabled fatal_warnings && exit 1 -fi - -# build pkg-config files - -pkgconfig_generate(){ - name=$1 - shortname=${name#lib}${build_suffix} - comment=$2 - version=$3 - libs=$4 - requires=$5 - enabled ${name#lib} || return 0 - mkdir -p $name - cat < $name/$name${build_suffix}.pc -prefix=$prefix -exec_prefix=\${prefix} -libdir=$libdir -includedir=$incdir - -Name: $name -Description: $comment -Version: $version -Requires: $(enabled shared || echo $requires) -Requires.private: $(enabled shared && echo $requires) -Conflicts: -Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs) -Libs.private: $(enabled shared && echo $libs) -Cflags: -I\${includedir} -EOF - -mkdir -p doc/examples/pc-uninstalled -includedir=${source_path} -[ "$includedir" = . ] && includedir="\${pcfiledir}/../../.." - cat < doc/examples/pc-uninstalled/$name.pc -prefix= -exec_prefix= -libdir=\${pcfiledir}/../../../$name -includedir=${includedir} - -Name: $name -Description: $comment -Version: $version -Requires: $requires -Conflicts: -Libs: -L\${libdir} -Wl,-rpath,\${libdir} -l${shortname} $(enabled shared || echo $libs) -Cflags: -I\${includedir} -EOF -} - -lavfi_libs="libavutil${build_suffix} = $LIBAVUTIL_VERSION" -enabled libavfilter_deps_avcodec && prepend lavfi_libs "libavcodec${build_suffix} = $LIBAVCODEC_VERSION," -enabled libavfilter_deps_avformat && prepend lavfi_libs "libavformat${build_suffix} = $LIBAVFORMAT_VERSION," -enabled libavfilter_deps_avresample && prepend lavfi_libs "libavresample${build_suffix} = $LIBAVRESAMPLE_VERSION," -enabled libavfilter_deps_swscale && prepend lavfi_libs "libswscale${build_suffix} = $LIBSWSCALE_VERSION," -enabled libavfilter_deps_swresample && prepend lavfi_libs "libswresample${build_suffix} = $LIBSWRESAMPLE_VERSION," -enabled libavfilter_deps_postproc && prepend lavfi_libs "libpostproc${build_suffix} = $LIBPOSTPROC_VERSION," -lavfi_libs=${lavfi_libs%, } - -lavd_libs="libavformat${build_suffix} = $LIBAVFORMAT_VERSION" -enabled lavfi_indev && prepend lavd_libs "libavfilter${build_suffix} = $LIBAVFILTER_VERSION," - -pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM" -pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil${build_suffix} = $LIBAVUTIL_VERSION" -pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec${build_suffix} = $LIBAVCODEC_VERSION" -pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$lavd_libs" -pkgconfig_generate libavfilter "FFmpeg audio/video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$lavfi_libs" -pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil${build_suffix} = $LIBAVUTIL_VERSION" -pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil${build_suffix} = $LIBAVUTIL_VERSION" -pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil${build_suffix} = $LIBAVUTIL_VERSION" -pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil${build_suffix} = $LIBAVUTIL_VERSION" - -fix_ffmpeg_remote(){ - git_remote_from=$1 - git_remote_to=$2 - fixme_remote=$(git --git-dir=$source_path/.git --work-tree=$source_path remote -v | grep $git_remote_from | cut -f 1 | sort | uniq) - if [ "$fixme_remote" != "" ]; then - echolog " -Outdated domain in git config, the official domain for ffmpeg git is since -November 2011, source.ffmpeg.org, both the old and the new point to the same -repository and server. To update it enter the following commands: -" - for remote in $fixme_remote; do - echolog "git remote set-url $remote $git_remote_to" - done - fi -} - -if test -f "$source_path/.git/config"; then - remote_from=git.videolan.org - remote_to=source.ffmpeg.org - fix_ffmpeg_remote git@$remote_from:ffmpeg git@$remote_to:ffmpeg - fix_ffmpeg_remote git://$remote_from/ffmpeg git://$remote_to/ffmpeg -fi diff --git a/bundle/ffmpeg/doc/APIchanges b/bundle/ffmpeg/doc/APIchanges deleted file mode 100644 index 456b35c1d2..0000000000 --- a/bundle/ffmpeg/doc/APIchanges +++ /dev/null @@ -1,1753 +0,0 @@ -Never assume the API of libav* to be stable unless at least 1 month has passed -since the last major version increase or the API was added. - -The last version increases were: -libavcodec: 2013-03-xx -libavdevice: 2013-03-xx -libavfilter: 2012-06-22 -libavformat: 2013-03-xx -libavresample: 2012-10-05 -libpostproc: 2011-04-18 -libswresample: 2011-09-19 -libswscale: 2011-06-20 -libavutil: 2012-10-22 - - -API changes, most recent first: - -2013-10-27 - xxxxxxx - lavc 55.39.100 - avcodec.h - Add CODEC_CAP_DELAY support to avcodec_decode_subtitle2. - -2013-10-27 - xxxxxxx - lavu 52.48.100 - parseutils.h - Add av_get_known_color_name(). - -2013-10-17 - xxxxxxx - lavu 52.47.100 - opt.h - Add AV_OPT_TYPE_CHANNEL_LAYOUT and channel layout option handlers - av_opt_get_channel_layout() and av_opt_set_channel_layout(). - -2013-10-xx - xxxxxxx -libswscale 2.5.101 - options.c - Change default scaler to bicubic - -2013-10-03 - xxxxxxx - lavc 55.34.100 - avcodec.h - Add av_codec_get_max_lowres() - -2013-10-02 - xxxxxxx - lavf 55.19.100 - avformat.h - Add audio/video/subtitle AVCodec fields to AVFormatContext to force specific - decoders - -2013-08-xx - xxxxxxx - lavfi 3.11.0 - avfilter.h - Add AVFilterGraph.execute and AVFilterGraph.opaque for custom slice threading - implementations. - -2013-09-21 - xxxxxxx - lavu 52.16.0 - pixfmt.h - Add interleaved 4:2:2 8/10-bit formats AV_PIX_FMT_NV16 and - AV_PIX_FMT_NV20. - -2013-09-16 - c74c3fb / 3feb3d6 - lavu 52.44.100 / 52.15.0 - mem.h - Add av_reallocp. - -2013-09-04 - 3e1f507 - lavc 55.31.101 - avcodec.h - avcodec_close() argument can be NULL. - -2013-09-04 - 36cd017 - lavf 55.16.101 - avformat.h - avformat_close_input() argument can be NULL and point on NULL. - -2013-08-29 - e31db62 - lavf 55.15.100 - avformat.h - Add av_format_get_probe_score(). - -2013-08-15 - 1e0e193 - lsws 2.5.100 - - Add a sws_dither AVOption, allowing to set the dither algorithm used - -2013-08-xx - xxxxxxx - lavc 55.27.100 - vdpau.h - Add a render2 alternative to the render callback function. - -2013-08-xx - xxxxxxx - lavc 55.26.100 - vdpau.h - Add allocation function for AVVDPAUContext, allowing - to extend it in the future without breaking ABI/API. - -2013-08-10 - 67a580f / 5a9a9d4 - lavc 55.25.100 / 55.16.0 - avcodec.h - Extend AVPacket API with av_packet_unref, av_packet_ref, - av_packet_move_ref, av_packet_copy_props, av_packet_free_side_data. - -2013-08-05 - 9547e3e / f824535 - lavc 55.22.100 / 55.13.0 - avcodec.h - Deprecate the bitstream-related members from struct AVVDPAUContext. - The bistream buffers no longer need to be explicitly freed. - -2013-08-05 - 3b805dc / 549294f - lavc 55.21.100 / 55.12.0 - avcodec.h - Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL - and select the AV_PIX_FMT_VDPAU format with get_format() instead. - -2013-08-05 - 4ee0984 / a0ad5d0 - lavu 52.41.100 / 52.14.0 - pixfmt.h - Deprecate AV_PIX_FMT_VDPAU_*. Use AV_PIX_FMT_VDPAU instead. - -2013-08-02 - 82fdfe8 / a8b1927 - lavc 55.20.100 / 55.11.0 - avcodec.h - Add output_picture_number to AVCodecParserContext. - -2013-07-23 - abc8110 - lavc 55.19.100 - avcodec.h - Add avcodec_chroma_pos_to_enum() - Add avcodec_enum_to_chroma_pos() - -2013-07-03 - 838bd73 - lavfi 3.78.100 - avfilter.h - Deprecate avfilter_graph_parse() in favor of the equivalent - avfilter_graph_parse_ptr(). - -2013-06-24 - af5f9c0 / 95d5246 - lavc 55.17.100 / 55.10.0 - avcodec.h - Add MPEG-2 AAC profiles - -2013-06-25 - af5f9c0 / 95d5246 - lavf 55.10.100 - avformat.h - Add AV_DISPOSITION_* flags to indicate text track kind. - -2013-06-15 - 99b8cd0 - lavu 52.36.100 - Add AVRIPEMD: - av_ripemd_alloc() - av_ripemd_init() - av_ripemd_update() - av_ripemd_final() - -2013-06-04 - 30b491f / fc962d4 - lavu 52.35.100 / 52.13.0 - mem.h - Add av_realloc_array and av_reallocp_array - -2013-05-30 - 682b227 - lavu 52.35.100 - Add AVSHA512: - av_sha512_alloc() - av_sha512_init() - av_sha512_update() - av_sha512_final() - -2013-05-24 - 8d4e969 / 129bb23 - lavfi 3.10.0 / 3.70.100 - avfilter.h - Add support for slice multithreading to lavfi. Filters supporting threading - are marked with AVFILTER_FLAG_SLICE_THREADS. - New fields AVFilterContext.thread_type, AVFilterGraph.thread_type and - AVFilterGraph.nb_threads (accessible directly or through AVOptions) may be - used to configure multithreading. - -2013-05-24 - fe40a9f / 2a6eaea - lavu 52.12.0 / 52.34.100 - cpu.h - Add av_cpu_count() function for getting the number of logical CPUs. - -2013-05-24 - 0c25c39 / b493847 - lavc 55.7.0 / 55.12.100 - avcodec.h - Add picture_structure to AVCodecParserContext. - -2013-05-17 - 3a751ea - lavu 52.33.100 - opt.h - Add AV_OPT_TYPE_COLOR value to AVOptionType enum. - -2013-05-13 - e398416 - lavu 52.31.100 - mem.h - Add av_dynarray2_add(). - -2013-05-12 - 1776177 - lavfi 3.65.100 - Add AVFILTER_FLAG_SUPPORT_TIMELINE* filter flags. - -2013-04-19 - 380cfce - lavc 55.4.100 - Add AV_CODEC_PROP_TEXT_SUB property for text based subtitles codec. - -2013-04-18 - 7c1a002 - lavf 55.3.100 - The matroska demuxer can now output proper verbatim ASS packets. It will - become the default starting lavf 56.0.100. - -2013-04-10 - af0d270 - lavu 25.26.100 - avutil.h,opt.h - Add av_int_list_length() - and av_opt_set_int_list(). - -2013-03-30 - 5c73645 - lavu 52.24.100 - samplefmt.h - Add av_samples_alloc_array_and_samples(). - -2013-03-29 - ef7b6b4 - lavf 55.1.100 - avformat.h - Add av_guess_frame_rate() - -2013-03-20 - 8d928a9 - lavu 52.22.100 - opt.h - Add AV_OPT_TYPE_DURATION value to AVOptionType enum. - -2013-03-17 - 7aa9af5 - lavu 52.20.100 - opt.h - Add AV_OPT_TYPE_VIDEO_RATE value to AVOptionType enum. - -2013-03-07 - 9767ec6 - lavu 52.18.100 - avstring.h,bprint.h - Add av_escape() and av_bprint_escape() API. - -2013-02-24 - b59cd08 - lavfi 3.41.100 - buffersink.h - Add sample_rates field to AVABufferSinkParams. - -2013-01-17 - a1a707f - lavf 54.61.100 - Add av_codec_get_tag2(). - -2013-01-01 - 2eb2e17 - lavfi 3.34.100 - Add avfilter_get_audio_buffer_ref_from_arrays_channels. - -2012-12-20 - 34de47aa - lavfi 3.29.100 - avfilter.h - Add AVFilterLink.channels, avfilter_link_get_channels() - and avfilter_ref_get_channels(). - -2012-12-15 - 96d815fc - lavc 54.80.100 - avcodec.h - Add pkt_size field to AVFrame. - -2012-11-25 - c70ec631 - lavu 52.9.100 - opt.h - Add the following convenience functions to opt.h: - av_opt_get_image_size - av_opt_get_pixel_fmt - av_opt_get_sample_fmt - av_opt_set_image_size - av_opt_set_pixel_fmt - av_opt_set_sample_fmt - -2012-11-17 - 4cd74c81 - lavu 52.8.100 - bprint.h - Add av_bprint_strftime(). - -2012-11-15 - 92648107 - lavu 52.7.100 - opt.h - Add av_opt_get_key_value(). - -2012-11-13 - 79456652 - lavfi 3.23.100 - avfilter.h - Add channels field to AVFilterBufferRefAudioProps. - -2012-11-03 - 481fdeee - lavu 52.3.100 - opt.h - Add AV_OPT_TYPE_SAMPLE_FMT value to AVOptionType enum. - -2012-10-21 - 6fb2fd8 - lavc 54.68.100 - avcodec.h - lavfi 3.20.100 - avfilter.h - Add AV_PKT_DATA_STRINGS_METADATA side data type, used to transmit key/value - strings between AVPacket and AVFrame, and add metadata field to - AVCodecContext (which shall not be accessed by users; see AVFrame metadata - instead). - -2012-09-27 - a70b493 - lavd 54.3.100 - version.h - Add LIBAVDEVICE_IDENT symbol. - -2012-09-27 - a70b493 - lavfi 3.18.100 - version.h - Add LIBAVFILTER_IDENT symbol. - -2012-09-27 - a70b493 - libswr 0.16.100 - version.h - Add LIBSWRESAMPLE_VERSION, LIBSWRESAMPLE_BUILD - and LIBSWRESAMPLE_IDENT symbols. - -2012-09-06 - 29e972f - lavu 51.72.100 - parseutils.h - Add av_small_strptime() time parsing function. - - Can be used as a stripped-down replacement for strptime(), on - systems which do not support it. - -2012-08-25 - 2626cc4 - lavf 54.28.100 - Matroska demuxer now identifies SRT subtitles as AV_CODEC_ID_SUBRIP instead - of AV_CODEC_ID_TEXT. - -2012-08-13 - 5c0d8bc - lavfi 3.8.100 - avfilter.h - Add avfilter_get_class() function, and priv_class field to AVFilter - struct. - -2012-08-12 - a25346e - lavu 51.69.100 - opt.h - Add AV_OPT_FLAG_FILTERING_PARAM symbol in opt.h. - -2012-07-31 - 23fc4dd - lavc 54.46.100 - Add channels field to AVFrame. - -2012-07-30 - f893904 - lavu 51.66.100 - Add av_get_channel_description() - and av_get_standard_channel_layout() functions. - -2012-07-21 - 016a472 - lavc 54.43.100 - Add decode_error_flags field to AVFrame. - -2012-07-20 - b062936 - lavf 54.18.100 - Add avformat_match_stream_specifier() function. - -2012-07-14 - f49ec1b - lavc 54.38.100 - avcodec.h - Add metadata to AVFrame, and the accessor functions - av_frame_get_metadata() and av_frame_set_metadata(). - -2012-07-10 - 0e003d8 - lavc 54.33.100 - Add av_fast_padded_mallocz(). - -2012-07-10 - 21d5609 - lavfi 3.2.0 - avfilter.h - Add init_opaque() callback to AVFilter struct. - -2012-06-26 - e6674e4 - lavu 51.63.100 - imgutils.h - Add functions to libavutil/imgutils.h: - av_image_get_buffer_size() - av_image_fill_arrays() - av_image_copy_to_buffer() - -2012-06-24 - c41899a - lavu 51.62.100 - version.h - version moved from avutil.h to version.h - -2012-04-11 - 359abb1 - lavu 51.58.100 - error.h - Add av_make_error_string() and av_err2str() utilities to - libavutil/error.h. - -2012-06-05 - 62b39d4 - lavc 54.24.100 - Add pkt_duration field to AVFrame. - -2012-05-24 - f2ee065 - lavu 51.54.100 - Move AVPALETTE_SIZE and AVPALETTE_COUNT macros from - libavcodec/avcodec.h to libavutil/pixfmt.h. - -2012-05-14 - 94a9ac1 - lavf 54.5.100 - Add av_guess_sample_aspect_ratio() function. - -2012-04-20 - 65fa7bc - lavfi 2.70.100 - Add avfilter_unref_bufferp() to avfilter.h. - -2012-04-13 - 162e400 - lavfi 2.68.100 - Install libavfilter/asrc_abuffer.h public header. - -2012-03-26 - a67d9cf - lavfi 2.66.100 - Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions. - -2013-05-15 - ff46809 / e6c4ac7 - lavu 52.32.100 / 52.11.0 - pixdesc.h - Replace PIX_FMT_* flags with AV_PIX_FMT_FLAG_*. - -2013-04-03 - 6fc58a8 / 507b1e4 - lavc 55.7.100 / 55.4.0 - avcodec.h - Add field_order to AVCodecParserContext. - -2013-04-19 - f4b05cd / 5e83d9a - lavc 55.5.100 / 55.2.0 - avcodec.h - Add CODEC_FLAG_UNALIGNED to allow decoders to produce unaligned output. - -2013-04-11 - lavfi 3.53.100 / 3.8.0 - 231fd44 / 38f0c07 - Move all content from avfiltergraph.h to avfilter.h. Deprecate - avfilterhraph.h, user applications should include just avfilter.h - 86070b8 / bc1a985 - Add avfilter_graph_alloc_filter(), deprecate avfilter_open() and - avfilter_graph_add_filter(). - 4fde705 / 1113672 - Add AVFilterContext.graph pointing to the AVFilterGraph that contains the - filter. - 710b0aa / 48a5ada - Add avfilter_init_str(), deprecate avfilter_init_filter(). - 46de9ba / 1ba95a9 - Add avfilter_init_dict(). - 16fc24b / 7cdd737 - Add AVFilter.flags field and AVFILTER_FLAG_DYNAMIC_{INPUTS,OUTPUTS} flags. - f4db6bf / 7e8fe4b - Add avfilter_pad_count() for counting filter inputs/outputs. - 835cc0f / fa2a34c - Add avfilter_next(), deprecate av_filter_next(). - Deprecate avfilter_uninit(). - -2013-04-09 - lavfi 3.51.100 / 3.7.0 - avfilter.h - 0594ef0 / b439c99 - Add AVFilter.priv_class for exporting filter options through the - AVOptions API in the similar way private options work in lavc and lavf. - 44d4488 / 8114c10 - Add avfilter_get_class(). - Switch all filters to use AVOptions. - -2013-03-19 - 17ebef2 / 2c328a9 - lavu 52.20.100 / 52.9.0 - pixdesc.h - Add av_pix_fmt_count_planes() function for counting planes in a pixel format. - -2013-03-16 - ecade98 / 42c7c61 - lavfi 3.47.100 / 3.6.0 - Add AVFilterGraph.nb_filters, deprecate AVFilterGraph.filter_count. - -2013-03-08 - Reference counted buffers - lavu 52.8.0, lavc 55.0.100 / 55.0.0, lavf 55.0.100 / 55.0.0, -lavd 54.4.100 / 54.0.0, lavfi 3.5.0 - 36099df / 8e401db, 532f31a / 1cec062 - add a new API for reference counted buffers and buffer - pools (new header libavutil/buffer.h). - 2653e12 / 1afddbe - add AVPacket.buf to allow reference counting for the AVPacket data. - Add av_packet_from_data() function for constructing packets from - av_malloc()ed data. - c4e8821 / 7ecc2d4 - move AVFrame from lavc to lavu (new header libavutil/frame.h), add - AVFrame.buf/extended_buf to allow reference counting for the AVFrame - data. Add new API for working with reference-counted AVFrames. - 80e9e63 / 759001c - add the refcounted_frames field to AVCodecContext to make audio and - video decoders return reference-counted frames. Add get_buffer2() - callback to AVCodecContext which allocates reference-counted frames. - Add avcodec_default_get_buffer2() as the default get_buffer2() - implementation. - Deprecate AVCodecContext.get_buffer() / release_buffer() / - reget_buffer(), avcodec_default_get_buffer(), - avcodec_default_reget_buffer(), avcodec_default_release_buffer(). - Remove avcodec_default_free_buffers(), which should not have ever - been called from outside of lavc. - Deprecate the following AVFrame fields: - * base -- is now stored in AVBufferRef - * reference, type, buffer_hints -- are unnecessary in the new API - * hwaccel_picture_private, owner, thread_opaque -- should not - have been acessed from outside of lavc - * qscale_table, qstride, qscale_type, mbskip_table, motion_val, - mb_type, dct_coeff, ref_index -- mpegvideo-specific tables, - which are not exported anymore. - a05a44e / 7e35037 - switch libavfilter to use AVFrame instead of AVFilterBufferRef. Add - av_buffersrc_add_frame(), deprecate av_buffersrc_buffer(). - Add av_buffersink_get_frame() and av_buffersink_get_samples(), - deprecate av_buffersink_read() and av_buffersink_read_samples(). - Deprecate AVFilterBufferRef and all functions for working with it. - -2013-03-17 - 6c17ff8 / 12c5c1d - lavu 52.19.100 / 52.8.0 - avstring.h - Add av_isdigit, av_isgraph, av_isspace, av_isxdigit. - -2013-02-23 - 71cf094 / 9f12235 - lavfi 3.40.100 / 3.4.0 - avfiltergraph.h - Add resample_lavr_opts to AVFilterGraph for setting libavresample options - for auto-inserted resample filters. - -2013-01-25 - e7e14bc / 38c1466 - lavu 52.17.100 / 52.7.0 - dict.h - Add av_dict_parse_string() to set multiple key/value pairs at once from a - string. - -2013-01-25 - 25be630 / b85a5e8 - lavu 52.16.100 / 52.6.0 - avstring.h - Add av_strnstr() - -2013-01-15 - e7e0186 / 8ee288d - lavu 52.15.100 / 52.5.0 - hmac.h - Add AVHMAC. - -2013-01-13 - 8ee7b38 / 44e065d - lavc 54.87.100 / 54.36.0 - vdpau.h - Add AVVDPAUContext struct for VDPAU hardware-accelerated decoding. - -2013-01-12 - dae382b / 169fb94 - lavu 52.14.100 / 52.4.0 - pixdesc.h - Add AV_PIX_FMT_VDPAU flag. - -2013-01-07 - 249fca3 / 074a00d - lavr 1.1.0 - Add avresample_set_channel_mapping() for input channel reordering, - duplication, and silencing. - -2012-12-29 - 2ce43b3 / d8fd06c - lavu 52.13.100 / 52.3.0 - avstring.h - Add av_basename() and av_dirname(). - -2012-11-11 - 03b0787 / 5980f5d - lavu 52.6.100 / 52.2.0 - audioconvert.h - Rename audioconvert.h to channel_layout.h. audioconvert.h is now deprecated. - -2012-11-05 - 7d26be6 / dfde8a3 - lavu 52.5.100 / 52.1.0 - intmath.h - Add av_ctz() for trailing zero bit count - -2012-10-21 - e3a91c5 / a893655 - lavu 51.77.100 / 51.45.0 - error.h - Add AVERROR_EXPERIMENTAL - -2012-10-12 - a33ed6b / d2fcb35 - lavu 51.76.100 / 51.44.0 - pixdesc.h - Add functions for accessing pixel format descriptors. - Accessing the av_pix_fmt_descriptors array directly is now - deprecated. - -2012-10-11 - f391e40 / 9a92aea - lavu 51.75.100 / 51.43.0 - aes.h, md5.h, sha.h, tree.h - Add functions for allocating the opaque contexts for the algorithms, - -2012-10-10 - de31814 / b522000 - lavf 54.32.100 / 54.18.0 - avio.h - Add avio_closep to complement avio_close. - -2012-10-08 - ae77266 / 78071a1 - lavu 51.74.100 / 51.42.0 - pixfmt.h - Rename PixelFormat to AVPixelFormat and all PIX_FMT_* to AV_PIX_FMT_*. - To provide backwards compatibility, PixelFormat is now #defined as - AVPixelFormat. - Note that this can break user code that includes pixfmt.h and uses the - 'PixelFormat' identifier. Such code should either #undef PixelFormat - or stop using the PixelFormat name. - -2012-10-05 - 55c49af / e7ba5b1 - lavr 1.0.0 - avresample.h - Data planes parameters to avresample_convert() and - avresample_read() are now uint8_t** instead of void**. - Libavresample is now stable. - -2012-09-24 - 46a3595 / a42aada - lavc 54.59.100 / 54.28.0 - avcodec.h - Add avcodec_free_frame(). This function must now - be used for freeing an AVFrame. - -2012-09-12 - e3e09f2 / 8919fee - lavu 51.73.100 / 51.41.0 - audioconvert.h - Added AV_CH_LOW_FREQUENCY_2 channel mask value. - -2012-09-04 - b21b5b0 / 686a329 - lavu 51.71.100 / 51.40.0 - opt.h - Reordered the fields in default_val in AVOption, changed which - default_val field is used for which AVOptionType. - -2012-08-30 - 98298eb / a231832 - lavc 54.54.101 / 54.26.1 - avcodec.h - Add codec descriptor properties AV_CODEC_PROP_LOSSY and - AV_CODEC_PROP_LOSSLESS. - -2012-08-18 - lavc 54.26 - avcodec.h - Add codec descriptors for accessing codec properties without having - to refer to a specific decoder or encoder. - - f5f3684 / c223d79 - Add an AVCodecDescriptor struct and functions - avcodec_descriptor_get() and avcodec_descriptor_next(). - f5f3684 / 51efed1 - Add AVCodecDescriptor.props and AV_CODEC_PROP_INTRA_ONLY. - 6c180b3 / 91e59fe - Add avcodec_descriptor_get_by_name(). - -2012-08-08 - f5f3684 / 987170c - lavu 51.68.100 / 51.38.0 - dict.h - Add av_dict_count(). - -2012-08-07 - 7a72695 / 104e10f - lavc 54.51.100 / 54.25.0 - avcodec.h - Rename CodecID to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*. - To provide backwards compatibility, CodecID is now #defined as AVCodecID. - Note that this can break user code that includes avcodec.h and uses the - 'CodecID' identifier. Such code should either #undef CodecID or stop using the - CodecID name. - -2012-08-03 - e776ee8 / 239fdf1 - lavu 51.66.101 / 51.37.1 - cpu.h - lsws 2.1.1 - swscale.h - Rename AV_CPU_FLAG_MMX2 ---> AV_CPU_FLAG_MMXEXT. - Rename SWS_CPU_CAPS_MMX2 ---> SWS_CPU_CAPS_MMXEXT. - -2012-07-29 - 7c26761 / 681ed00 - lavf 54.22.100 / 54.13.0 - avformat.h - Add AVFMT_FLAG_NOBUFFER for low latency use cases. - -2012-07-10 - fbe0245 / f3e5e6f - lavu 51.65.100 / 51.37.0 - Add av_malloc_array() and av_mallocz_array() - -2012-06-22 - e847f41 / d3d3a32 - lavu 51.61.100 / 51.34.0 - Add av_usleep() - -2012-06-20 - 4da42eb / ae0a301 - lavu 51.60.100 / 51.33.0 - Move av_gettime() to libavutil, add libavutil/time.h - -2012-06-09 - 82edf67 / 3971be0 - lavr 0.0.3 - Add a parameter to avresample_build_matrix() for Dolby/DPLII downmixing. - -2012-06-12 - c7b9eab / 9baeff9 - lavfi 2.79.100 / 2.23.0 - avfilter.h - Add AVFilterContext.nb_inputs/outputs. Deprecate - AVFilterContext.input/output_count. - -2012-06-12 - c7b9eab / 84b9fbe - lavfi 2.79.100 / 2.22.0 - avfilter.h - Add avfilter_pad_get_type() and avfilter_pad_get_name(). Those - should now be used instead of accessing AVFilterPad members - directly. - -2012-06-12 - 3630a07 / b0f0dfc - lavu 51.57.100 / 51.32.0 - audioconvert.h - Add av_get_channel_layout_channel_index(), av_get_channel_name() - and av_channel_layout_extract_channel(). - -2012-05-25 - 53ce990 / 154486f - lavu 51.55.100 / 51.31.0 - opt.h - Add av_opt_set_bin() - -2012-05-15 - lavfi 2.74.100 / 2.17.0 - Add support for audio filters - 61930bd / ac71230, 1cbf7fb / a2cd9be - add video/audio buffer sink in a new installed - header buffersink.h - 1cbf7fb / 720c6b7 - add av_buffersrc_write_frame(), deprecate - av_vsrc_buffer_add_frame() - 61930bd / ab16504 - add avfilter_copy_buf_props() - 61930bd / 9453c9e - add extended_data to AVFilterBuffer - 61930bd / 1b8c927 - add avfilter_get_audio_buffer_ref_from_arrays() - -2012-05-09 - lavu 51.53.100 / 51.30.0 - samplefmt.h - 61930bd / 142e740 - add av_samples_copy() - 61930bd / 6d7f617 - add av_samples_set_silence() - -2012-05-09 - 61930bd / a5117a2 - lavc 54.21.101 / 54.13.1 - For audio formats with fixed frame size, the last frame - no longer needs to be padded with silence, libavcodec - will handle this internally (effectively all encoders - behave as if they had CODEC_CAP_SMALL_LAST_FRAME set). - -2012-05-07 - 653d117 / 828bd08 - lavc 54.20.100 / 54.13.0 - avcodec.h - Add sample_rate and channel_layout fields to AVFrame. - -2012-05-01 - 2330eb1 / 4010d72 - lavr 0.0.1 - Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8. - -2012-04-25 - e890b68 / 3527a73 - lavu 51.48.100 / 51.29.0 - cpu.h - Add av_parse_cpu_flags() - -2012-04-24 - 3ead79e / c8af852 - lavr 0.0.0 - Add libavresample audio conversion library - -2012-04-20 - 3194ab7 / 0c0d1bc - lavu 51.47.100 / 51.28.0 - audio_fifo.h - Add audio FIFO functions: - av_audio_fifo_free() - av_audio_fifo_alloc() - av_audio_fifo_realloc() - av_audio_fifo_write() - av_audio_fifo_read() - av_audio_fifo_drain() - av_audio_fifo_reset() - av_audio_fifo_size() - av_audio_fifo_space() - -2012-04-14 - lavfi 2.70.100 / 2.16.0 - avfiltergraph.h - 7432bcf / d7bcc71 Add avfilter_graph_parse2(). - -2012-04-08 - 6bfb304 / 4d693b0 - lavu 51.46.100 / 51.27.0 - samplefmt.h - Add av_get_packed_sample_fmt() and av_get_planar_sample_fmt() - -2012-03-21 - b75c67d - lavu 51.43.100 - Add bprint.h for bprint API. - -2012-02-21 - 9cbf17e - lavc 54.4.100 - Add av_get_pcm_codec() function. - -2012-02-16 - 560b224 - libswr 0.7.100 - Add swr_set_matrix() function. - -2012-02-09 - c28e7af - lavu 51.39.100 - Add a new installed header libavutil/timestamp.h with timestamp - utilities. - -2012-02-06 - 70ffda3 - lavu 51.38.100 - Add av_parse_ratio() function to parseutils.h. - -2012-02-06 - 70ffda3 - lavu 51.38.100 - Add AV_LOG_MAX_OFFSET macro to log.h. - -2012-02-02 - 0eaa123 - lavu 51.37.100 - Add public timecode helpers. - -2012-01-24 - 0c3577b - lavfi 2.60.100 - Add avfilter_graph_dump. - -2012-03-20 - 0ebd836 / 3c90cc2 - lavfo 54.2.0 - Deprecate av_read_packet(), use av_read_frame() with - AVFMT_FLAG_NOPARSE | AVFMT_FLAG_NOFILLIN in AVFormatContext.flags - -2012-03-05 - lavc 54.10.100 / 54.8.0 - f095391 / 6699d07 Add av_get_exact_bits_per_sample() - f095391 / 9524cf7 Add av_get_audio_frame_duration() - -2012-03-04 - 2af8f2c / 44fe77b - lavc 54.8.100 / 54.7.0 - avcodec.h - Add av_codec_is_encoder/decoder(). - -2012-03-01 - 1eb7f39 / 442c132 - lavc 54.5.100 / 54.3.0 - avcodec.h - Add av_packet_shrink_side_data. - -2012-02-29 - 79ae084 / dd2a4bc - lavf 54.2.100 / 54.2.0 - avformat.h - Add AVStream.attached_pic and AV_DISPOSITION_ATTACHED_PIC, - used for dealing with attached pictures/cover art. - -2012-02-25 - 305e4b3 / c9bca80 - lavu 51.41.100 / 51.24.0 - error.h - Add AVERROR_UNKNOWN - NOTE: this was backported to 0.8 - -2012-02-20 - eadd426 / e9cda85 - lavc 54.2.100 / 54.2.0 - Add duration field to AVCodecParserContext - -2012-02-20 - eadd426 / 0b42a93 - lavu 51.40.100 / 51.23.1 - mathematics.h - Add av_rescale_q_rnd() - -2012-02-08 - f2b20b7 / 38d5533 - lavu 51.38.101 / 51.22.1 - pixdesc.h - Add PIX_FMT_PSEUDOPAL flag. - -2012-02-08 - f2b20b7 / 52f82a1 - lavc 54.2.100 / 54.1.0 - Add avcodec_encode_video2() and deprecate avcodec_encode_video(). - -2012-02-01 - 4c677df / 316fc74 - lavc 54.1.0 - Add av_fast_padded_malloc() as alternative for av_realloc() when aligned - memory is required. The buffer will always have FF_INPUT_BUFFER_PADDING_SIZE - zero-padded bytes at the end. - -2012-01-31 - a369a6b / dd6d3b0 - lavf 54.1.0 - Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags(). - NOTE: this was backported to 0.8 - -2012-01-31 - a369a6b / af08d9a - lavc 54.1.0 - Add avcodec_is_open() function. - NOTE: this was backported to 0.8 - -2012-01-30 - 151ecc2 / 8b93312 - lavu 51.36.100 / 51.22.0 - intfloat.h - Add a new installed header libavutil/intfloat.h with int/float punning - functions. - NOTE: this was backported to 0.8 - -2012-01-25 - lavf 53.31.100 / 53.22.0 - 3c5fe5b / f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible - buffered data within a muxer. Added AVFMT_ALLOW_FLUSH for - muxers supporting it (av_write_frame makes sure it is called - only for muxers with this flag). - -2012-01-15 - lavc 53.56.105 / 53.34.0 - New audio encoding API: - 67f5650 / b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio - encoders. - 67f5650 / 5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function. - 67f5650 / b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio(). - Add AVCodec.encode2(). - -2012-01-12 - b18e17e / 3167dc9 - lavfi 2.59.100 / 2.15.0 - Add a new installed header -- libavfilter/version.h -- with version macros. - -2011-12-08 - a502939 - lavfi 2.52.0 - Add av_buffersink_poll_frame() to buffersink.h. - -2011-12-08 - 26c6fec - lavu 51.31.0 - Add av_log_format_line. - -2011-12-03 - 976b095 - lavu 51.30.0 - Add AVERROR_BUG. - -2011-11-24 - 573ffbb - lavu 51.28.1 - Add av_get_alt_sample_fmt() to samplefmt.h. - -2011-11-03 - 96949da - lavu 51.23.0 - Add av_strcasecmp() and av_strncasecmp() to avstring.h. - -2011-10-20 - b35e9e1 - lavu 51.22.0 - Add av_strtok() to avstring.h. - -2012-01-03 - ad1c8dd / b73ec05 - lavu 51.34.100 / 51.21.0 - Add av_popcount64 - -2011-12-18 - 7c29313 / 8400b12 - lavc 53.46.1 / 53.28.1 - Deprecate AVFrame.age. The field is unused. - -2011-12-12 - 8bc7fe4 / 5266045 - lavf 53.25.0 / 53.17.0 - Add avformat_close_input(). - Deprecate av_close_input_file() and av_close_input_stream(). - -2011-12-02 - e4de716 / 0eea212 - lavc 53.40.0 / 53.25.0 - Add nb_samples and extended_data fields to AVFrame. - Deprecate AVCODEC_MAX_AUDIO_FRAME_SIZE. - Deprecate avcodec_decode_audio3() in favor of avcodec_decode_audio4(). - avcodec_decode_audio4() writes output samples to an AVFrame, which allows - audio decoders to use get_buffer(). - -2011-12-04 - e4de716 / 560f773 - lavc 53.40.0 / 53.24.0 - Change AVFrame.data[4]/base[4]/linesize[4]/error[4] to [8] at next major bump. - Change AVPicture.data[4]/linesize[4] to [8] at next major bump. - Change AVCodecContext.error[4] to [8] at next major bump. - Add AV_NUM_DATA_POINTERS to simplify the bump transition. - -2011-11-23 - 8e576d5 / bbb46f3 - lavu 51.27.0 / 51.18.0 - Add av_samples_get_buffer_size(), av_samples_fill_arrays(), and - av_samples_alloc(), to samplefmt.h. - -2011-11-23 - 8e576d5 / 8889cc4 - lavu 51.27.0 / 51.17.0 - Add planar sample formats and av_sample_fmt_is_planar() to samplefmt.h. - -2011-11-19 - dbb38bc / f3a29b7 - lavc 53.36.0 / 53.21.0 - Move some AVCodecContext fields to a new private struct, AVCodecInternal, - which is accessed from a new field, AVCodecContext.internal. - - fields moved: - AVCodecContext.internal_buffer --> AVCodecInternal.buffer - AVCodecContext.internal_buffer_count --> AVCodecInternal.buffer_count - AVCodecContext.is_copy --> AVCodecInternal.is_copy - -2011-11-16 - 8709ba9 / 6270671 - lavu 51.26.0 / 51.16.0 - Add av_timegm() - -2011-11-13 - lavf 53.21.0 / 53.15.0 - New interrupt callback API, allowing per-AVFormatContext/AVIOContext - interrupt callbacks. - 5f268ca / 6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to - AVFormatContext. - 5f268ca / 1dee0ac Add avio_open2() with additional parameters. Those are - an interrupt callback and an options AVDictionary. - This will allow passing AVOptions to protocols after lavf - 54.0. - -2011-11-06 - 13b7781 / ba04ecf - lavu 51.24.0 / 51.14.0 - Add av_strcasecmp() and av_strncasecmp() to avstring.h. - -2011-11-06 - 13b7781 / 07b172f - lavu 51.24.0 / 51.13.0 - Add av_toupper()/av_tolower() - -2011-11-05 - d8cab5c / b6d08f4 - lavf 53.19.0 / 53.13.0 - Add avformat_network_init()/avformat_network_deinit() - -2011-10-27 - 6faf0a2 / 512557b - lavc 53.24.0 / 53.15.0 - Remove avcodec_parse_frame. - Deprecate AVCodecContext.parse_only and CODEC_CAP_PARSE_ONLY. - -2011-10-19 - d049257 / 569129a - lavf 53.17.0 / 53.10.0 - Add avformat_new_stream(). Deprecate av_new_stream(). - -2011-10-13 - 91eb1b1 / b631fba - lavf 53.16.0 / 53.9.0 - Add AVFMT_NO_BYTE_SEEK AVInputFormat flag. - -2011-10-12 - lavu 51.21.0 / 51.12.0 - AVOptions API rewrite. - - - f884ef0 / 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_* - - new setting/getting functions with slightly different semantics: - f884ef0 / dac66da av_set_string3 -> av_opt_set - av_set_double -> av_opt_set_double - av_set_q -> av_opt_set_q - av_set_int -> av_opt_set_int - - f884ef0 / 41d9d51 av_get_string -> av_opt_get - av_get_double -> av_opt_get_double - av_get_q -> av_opt_get_q - av_get_int -> av_opt_get_int - - - f884ef0 / 8c5dcaa trivial rename av_next_option -> av_opt_next - - f884ef0 / 641c7af new functions - av_opt_child_next, av_opt_child_class_next - and av_opt_find2() - -2011-09-22 - a70e787 - lavu 51.17.0 - Add av_x_if_null(). - -2011-09-18 - 645cebb - lavc 53.16.0 - Add showall flag2 - -2011-09-16 - ea8de10 - lavfi 2.42.0 - Add avfilter_all_channel_layouts. - -2011-09-16 - 9899037 - lavfi 2.41.0 - Rename avfilter_all_* function names to avfilter_make_all_*. - - In particular, apply the renames: - avfilter_all_formats -> avfilter_make_all_formats - avfilter_all_channel_layouts -> avfilter_make_all_channel_layouts - avfilter_all_packing_formats -> avfilter_make_all_packing_formats - -2011-09-12 - 4381bdd - lavfi 2.40.0 - Change AVFilterBufferRefAudioProps.sample_rate type from uint32_t to int. - -2011-09-12 - 2c03174 - lavfi 2.40.0 - Simplify signature for avfilter_get_audio_buffer(), make it - consistent with avfilter_get_video_buffer(). - -2011-09-06 - 4f7dfe1 - lavfi 2.39.0 - Rename libavfilter/vsink_buffer.h to libavfilter/buffersink.h. - -2011-09-06 - c4415f6 - lavfi 2.38.0 - Unify video and audio sink API. - - In particular, add av_buffersink_get_buffer_ref(), deprecate - av_vsink_buffer_get_video_buffer_ref() and change the value for the - opaque field passed to the abuffersink init function. - -2011-09-04 - 61e2e29 - lavu 51.16.0 - Add av_asprintf(). - -2011-08-22 - dacd827 - lavf 53.10.0 - Add av_find_program_from_stream(). - -2011-08-20 - 69e2c1a - lavu 51.13.0 - Add av_get_media_type_string(). - -2011-09-03 - 1889c67 / fb4ca26 - lavc 53.13.0 - lavf 53.11.0 - lsws 2.1.0 - Add {avcodec,avformat,sws}_get_class(). - -2011-08-03 - 1889c67 / c11fb82 - lavu 51.15.0 - Add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find() function. - -2011-08-14 - 323b930 - lavu 51.12.0 - Add av_fifo_peek2(), deprecate av_fifo_peek(). - -2011-08-26 - lavu 51.14.0 / 51.9.0 - - 976a8b2 / add41de..976a8b2 / abc78a5 Do not include intfloat_readwrite.h, - mathematics.h, rational.h, pixfmt.h, or log.h from avutil.h. - -2011-08-16 - 27fbe31 / 48f9e45 - lavf 53.11.0 / 53.8.0 - Add avformat_query_codec(). - -2011-08-16 - 27fbe31 / bca06e7 - lavc 53.11.0 - Add avcodec_get_type(). - -2011-08-06 - 0cb233c / 2f63440 - lavf 53.7.0 - Add error_recognition to AVFormatContext. - -2011-08-02 - 1d186e9 / 9d39cbf - lavc 53.9.1 - Add AV_PKT_FLAG_CORRUPT AVPacket flag. - -2011-07-16 - b57df29 - lavfi 2.27.0 - Add audio packing negotiation fields and helper functions. - - In particular, add AVFilterPacking enum, planar, in_packings and - out_packings fields to AVFilterLink, and the functions: - avfilter_set_common_packing_formats() - avfilter_all_packing_formats() - -2011-07-10 - 3602ad7 / a67c061 - lavf 53.6.0 - Add avformat_find_stream_info(), deprecate av_find_stream_info(). - NOTE: this was backported to 0.7 - -2011-07-10 - 3602ad7 / 0b950fe - lavc 53.8.0 - Add avcodec_open2(), deprecate avcodec_open(). - NOTE: this was backported to 0.7 - - Add avcodec_alloc_context3. Deprecate avcodec_alloc_context() and - avcodec_alloc_context2(). - -2011-07-01 - b442ca6 - lavf 53.5.0 - avformat.h - Add function av_get_output_timestamp(). - -2011-06-28 - 5129336 - lavu 51.11.0 - avutil.h - Define the AV_PICTURE_TYPE_NONE value in AVPictureType enum. - -2011-06-19 - fd2c0a5 - lavfi 2.23.0 - avfilter.h - Add layout negotiation fields and helper functions. - - In particular, add in_chlayouts and out_chlayouts to AVFilterLink, - and the functions: - avfilter_set_common_sample_formats() - avfilter_set_common_channel_layouts() - avfilter_all_channel_layouts() - -2011-06-19 - 527ca39 - lavfi 2.22.0 - AVFilterFormats - Change type of AVFilterFormats.formats from int * to int64_t *, - and update formats handling API accordingly. - - avfilter_make_format_list() still takes a int32_t array and converts - it to int64_t. A new function, avfilter_make_format64_list(), that - takes int64_t arrays has been added. - -2011-06-19 - 44f669e - lavfi 2.21.0 - vsink_buffer.h - Add video sink buffer and vsink_buffer.h public header. - -2011-06-12 - 9fdf772 - lavfi 2.18.0 - avcodec.h - Add avfilter_get_video_buffer_ref_from_frame() function in - libavfilter/avcodec.h. - -2011-06-12 - c535494 - lavfi 2.17.0 - avfiltergraph.h - Add avfilter_inout_alloc() and avfilter_inout_free() functions. - -2011-06-12 - 6119b23 - lavfi 2.16.0 - avfilter_graph_parse() - Change avfilter_graph_parse() signature. - -2011-06-23 - 686959e / 67e9ae1 - lavu 51.10.0 / 51.8.0 - attributes.h - Add av_printf_format(). - -2011-06-16 - 2905e3f / 05e84c9, 2905e3f / 25de595 - lavf 53.4.0 / 53.2.0 - avformat.h - Add avformat_open_input and avformat_write_header(). - Deprecate av_open_input_stream, av_open_input_file, - AVFormatParameters and av_write_header. - -2011-06-16 - 2905e3f / 7e83e1c, 2905e3f / dc59ec5 - lavu 51.9.0 / 51.7.0 - opt.h - Add av_opt_set_dict() and av_opt_find(). - Deprecate av_find_opt(). - Add AV_DICT_APPEND flag. - -2011-06-10 - 45fb647 / cb7c11c - lavu 51.6.0 - opt.h - Add av_opt_flag_is_set(). - -2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays - Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h. - -2011-06-09 - f9ecb84 / d9f80ea - lavu 51.8.0 - AVMetadata - Move AVMetadata from lavf to lavu and rename it to - AVDictionary -- new installed header dict.h. - All av_metadata_* functions renamed to av_dict_*. - -2011-06-07 - d552f61 / a6703fa - lavu 51.8.0 - av_get_bytes_per_sample() - Add av_get_bytes_per_sample() in libavutil/samplefmt.h. - Deprecate av_get_bits_per_sample_fmt(). - -2011-06-05 - f956924 / b39b062 - lavu 51.8.0 - opt.h - Add av_opt_free convenience function. - -2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps - Remove AVFilterBufferRefAudioProps.size, and use nb_samples in - avfilter_get_audio_buffer() and avfilter_default_get_audio_buffer() in - place of size. - -2011-06-06 - 0bc2cca - lavu 51.6.0 - av_samples_alloc() - Switch nb_channels and nb_samples parameters order in - av_samples_alloc(). - -2011-06-06 - e1c7414 - lavu 51.5.0 - av_samples_* - Change the data layout created by av_samples_fill_arrays() and - av_samples_alloc(). - -2011-06-06 - 27bcf55 - lavfi 2.13.0 - vsrc_buffer.h - Make av_vsrc_buffer_add_video_buffer_ref() accepts an additional - flags parameter in input. - -2011-06-03 - e977ca2 - lavfi 2.12.0 - avfilter_link_free() - Add avfilter_link_free() function. - -2011-06-02 - 5ad38d9 - lavu 51.4.0 - av_force_cpu_flags() - Add av_cpu_flags() in libavutil/cpu.h. - -2011-05-28 - e71f260 - lavu 51.3.0 - pixdesc.h - Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate - avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor. - -2011-05-25 - 39e4206 / 30315a8 - lavf 53.3.0 - avformat.h - Add fps_probe_size to AVFormatContext. - -2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h - Introduce avformat_alloc_output_context2() and deprecate - avformat_alloc_output_context(). - -2011-05-22 - 83db719 - lavfi 2.10.0 - vsrc_buffer.h - Make libavfilter/vsrc_buffer.h public. - -2011-05-19 - c000a9f - lavfi 2.8.0 - avcodec.h - Add av_vsrc_buffer_add_frame() to libavfilter/avcodec.h. - -2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h - Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h. - -2011-05-18 - 75a37b5 / 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt - Add request_sample_fmt field to AVCodecContext. - -2011-05-10 - 59eb12f / 188dea1 - lavc 53.6.0 - avcodec.h - Deprecate AVLPCType and the following fields in - AVCodecContext: lpc_coeff_precision, prediction_order_method, - min_partition_order, max_partition_order, lpc_type, lpc_passes. - Corresponding FLAC encoder options should be used instead. - -2011-05-07 - 9fdf772 - lavfi 2.5.0 - avcodec.h - Add libavfilter/avcodec.h header and avfilter_copy_frame_props() - function. - -2011-05-07 - 18ded93 - lavc 53.5.0 - AVFrame - Add format field to AVFrame. - -2011-05-07 - 22333a6 - lavc 53.4.0 - AVFrame - Add width and height fields to AVFrame. - -2011-05-01 - 35fe66a - lavfi 2.4.0 - avfilter.h - Rename AVFilterBufferRefVideoProps.pixel_aspect to - sample_aspect_ratio. - -2011-05-01 - 77e9dee - lavc 53.3.0 - AVFrame - Add a sample_aspect_ratio field to AVFrame. - -2011-05-01 - 1ba5727 - lavc 53.2.0 - AVFrame - Add a pkt_pos field to AVFrame. - -2011-04-29 - 35ceaa7 - lavu 51.2.0 - mem.h - Add av_dynarray_add function for adding - an element to a dynamic array. - -2011-04-26 - d7e5aeb / bebe72f - lavu 51.1.0 - avutil.h - Add AVPictureType enum and av_get_picture_type_char(), deprecate - FF_*_TYPE defines and av_get_pict_type_char() defined in - libavcodec/avcodec.h. - -2011-04-26 - d7e5aeb / 10d3940 - lavfi 2.3.0 - avfilter.h - Add pict_type and key_frame fields to AVFilterBufferRefVideo. - -2011-04-26 - d7e5aeb / 7a11c82 - lavfi 2.2.0 - vsrc_buffer - Add sample_aspect_ratio fields to vsrc_buffer arguments - -2011-04-21 - 8772156 / 94f7451 - lavc 53.1.0 - avcodec.h - Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading. - -2011-04-15 - lavc 52.120.0 - avcodec.h - AVPacket structure got additional members for passing side information: - c407984 / 4de339e introduce side information for AVPacket - c407984 / 2d8591c make containers pass palette change in AVPacket - -2011-04-12 - lavf 52.107.0 - avio.h - Avio cleanup, part II - deprecate the entire URLContext API: - c55780d / 175389c add avio_check as a replacement for url_exist - 9891004 / ff1ec0c add avio_pause and avio_seek_time as replacements - for _av_url_read_fseek/fpause - d4d0932 / cdc6a87 deprecate av_protocol_next(), avio_enum_protocols - should be used instead. - c88caa5 / 80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb. - c88caa5 / f87b1b3 rename open flags: URL_* -> AVIO_* - d4d0932 / f8270bb add avio_enum_protocols. - d4d0932 / 5593f03 deprecate URLProtocol. - d4d0932 / c486dad deprecate URLContext. - d4d0932 / 026e175 deprecate the typedef for URLInterruptCB - c88caa5 / 8e76a19 deprecate av_register_protocol2. - 11d7841 / b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME - 11d7841 / 1305d93 deprecate av_url_read_seek - 11d7841 / fa104e1 deprecate av_url_read_pause - 434f248 / 727c7aa deprecate url_get_filename(). - 434f248 / 5958df3 deprecate url_max_packet_size(). - 434f248 / 1869ea0 deprecate url_get_file_handle(). - 434f248 / 32a97d4 deprecate url_filesize(). - 434f248 / e52a914 deprecate url_close(). - 434f248 / 58a48c6 deprecate url_seek(). - 434f248 / 925e908 deprecate url_write(). - 434f248 / dce3756 deprecate url_read_complete(). - 434f248 / bc371ac deprecate url_read(). - 434f248 / 0589da0 deprecate url_open(). - 434f248 / 62eaaea deprecate url_connect. - 434f248 / 5652bb9 deprecate url_alloc. - 434f248 / 333e894 deprecate url_open_protocol - 434f248 / e230705 deprecate url_poll and URLPollEntry - -2011-04-08 - lavf 52.106.0 - avformat.h - Minor avformat.h cleanup: - d4d0932 / a9bf9d8 deprecate av_guess_image2_codec - d4d0932 / c3675df rename avf_sdp_create->av_sdp_create - -2011-04-03 - lavf 52.105.0 - avio.h - Large-scale renaming/deprecating of AVIOContext-related functions: - 2cae980 / 724f6a0 deprecate url_fdopen - 2cae980 / 403ee83 deprecate url_open_dyn_packet_buf - 2cae980 / 6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf - 2cae980 / b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf - 2cae980 / 8978fed introduce an AVIOContext.seekable field as a replacement for - AVIOContext.is_streamed and url_is_streamed() - 1caa412 / b64030f deprecate get_checksum() - 1caa412 / 4c4427a deprecate init_checksum() - 2fd41c9 / 4ec153b deprecate udp_set_remote_url/get_local_port - 4fa0e24 / 933e90a deprecate av_url_read_fseek/fpause - 4fa0e24 / 8d9769a deprecate url_fileno - 0fecf26 / b7f2fdd rename put_flush_packet -> avio_flush - 0fecf26 / 35f1023 deprecate url_close_buf - 0fecf26 / 83fddae deprecate url_open_buf - 0fecf26 / d9d86e0 rename url_fprintf -> avio_printf - 0fecf26 / 59f65d9 deprecate url_setbufsize - 6947b0c / 3e68b3b deprecate url_ferror - e8bb2e2 deprecate url_fget_max_packet_size - 76aa876 rename url_fsize -> avio_size - e519753 deprecate url_fgetc - 655e45e deprecate url_fgets - a2704c9 rename url_ftell -> avio_tell - e16ead0 deprecate get_strz() in favor of avio_get_str - 0300db8,2af07d3 rename url_fskip -> avio_skip - 6b4aa5d rename url_fseek -> avio_seek - 61840b4 deprecate put_tag - 22a3212 rename url_fopen/fclose -> avio_open/close. - 0ac8e2b deprecate put_nbyte - 77eb550 rename put_byte -> avio_w8 - put_[b/l]e -> avio_w[b/l] - put_buffer -> avio_write - b7effd4 rename get_byte -> avio_r8, - get_[b/l]e -> avio_r[b/l] - get_buffer -> avio_read - b3db9ce deprecate get_partial_buffer - 8d9ac96 rename av_alloc_put_byte -> avio_alloc_context - -2011-03-25 - 27ef7b1 / 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type - Add audio_service_type field to AVCodecContext. - -2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h - Add PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats - -2011-03-02 - 863c471 - lavf 52.103.0 - av_pkt_dump2, av_pkt_dump_log2 - Add new functions av_pkt_dump2, av_pkt_dump_log2 that uses the - source stream timebase for outputting timestamps. Deprecate - av_pkt_dump and av_pkt_dump_log. - -2011-02-20 - e731b8d - lavf 52.102.0 - avio.h - * e731b8d - rename init_put_byte() to ffio_init_context(), deprecating the - original, and move it to a private header so it is no longer - part of our public API. Instead, use av_alloc_put_byte(). - * ae628ec - rename ByteIOContext to AVIOContext. - -2011-02-16 - 09d171b - lavf 52.101.0 - avformat.h - lavu 52.39.0 - parseutils.h - * 610219a - Add av_ prefix to dump_format(). - * f6c7375 - Replace parse_date() in lavf with av_parse_time() in lavu. - * ab0287f - Move find_info_tag from lavf to lavu and add av_prefix to it. - -2011-02-15 - lavu 52.38.0 - merge libavcore - libavcore is merged back completely into libavutil - -2011-02-10 - 55bad0c - lavc 52.113.0 - vbv_delay - Add vbv_delay field to AVCodecContext - -2011-02-14 - 24a83bd - lavf 52.100.0 - AV_DISPOSITION_CLEAN_EFFECTS - Add AV_DISPOSITION_CLEAN_EFFECTS disposition flag. - -2011-02-14 - 910b5b8 - lavfi 1.76.0 - AVFilterLink sample_aspect_ratio - Add sample_aspect_ratio field to AVFilterLink. - -2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition - Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED. - -2011-02-09 - c0b102c - lavc 52.112.0 - avcodec_thread_init() - Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead - set thread_count before calling avcodec_open. - -2011-02-09 - 37b00b4 - lavc 52.111.0 - threading API - Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/ - release_buffer()/draw_horiz_band() callbacks for appropriate codecs. - Add thread_type and active_thread_type fields to AVCodecContext. - -2011-02-08 - 3940caa - lavf 52.98.0 - av_probe_input_buffer - Add av_probe_input_buffer() to avformat.h for probing format from a - ByteIOContext. - -2011-02-06 - fe174fc - lavf 52.97.0 - avio.h - Add flag for non-blocking protocols: URL_FLAG_NONBLOCK - -2011-02-04 - f124b08 - lavf 52.96.0 - avformat_free_context() - Add avformat_free_context() in avformat.h. - -2011-02-03 - f5b82f4 - lavc 52.109.0 - add CODEC_ID_PRORES - Add CODEC_ID_PRORES to avcodec.h. - -2011-02-03 - fe9a3fb - lavc 52.109.0 - H.264 profile defines - Add defines for H.264 * Constrained Baseline and Intra profiles - -2011-02-02 - lavf 52.95.0 - * 50196a9 - add a new installed header version.h. - * 4efd5cf, dccbd97, 93b78d1 - add several variants of public - avio_{put,get}_str* functions. Deprecate corresponding semi-public - {put,get}_str*. - -2011-02-02 - dfd2a00 - lavu 50.37.0 - log.h - Make av_dlog public. - -2011-01-31 - 7b3ea55 - lavfi 1.76.0 - vsrc_buffer - Add sample_aspect_ratio fields to vsrc_buffer arguments - -2011-01-31 - 910b5b8 - lavfi 1.75.0 - AVFilterLink sample_aspect_ratio - Add sample_aspect_ratio field to AVFilterLink. - -2011-01-15 - a242ac3 - lavfi 1.74.0 - AVFilterBufferRefAudioProps - Rename AVFilterBufferRefAudioProps.samples_nb to nb_samples. - -2011-01-14 - 7f88a5b - lavf 52.93.0 - av_metadata_copy() - Add av_metadata_copy() in avformat.h. - -2011-01-07 - 81c623f - lavc 52.107.0 - deprecate reordered_opaque - Deprecate reordered_opaque in favor of pkt_pts/dts. - -2011-01-07 - 1919fea - lavc 52.106.0 - pkt_dts - Add pkt_dts to AVFrame, this will in the future allow multithreading decoders - to not mess up dts. - -2011-01-07 - 393cbb9 - lavc 52.105.0 - pkt_pts - Add pkt_pts to AVFrame. - -2011-01-07 - 060ec0a - lavc 52.104.0 - av_get_profile_name() - Add av_get_profile_name to libavcodec/avcodec.h. - -2010-12-27 - 0ccabee - lavfi 1.71.0 - AV_PERM_NEG_LINESIZES - Add AV_PERM_NEG_LINESIZES in avfilter.h. - -2010-12-27 - 9128ae0 - lavf 52.91.0 - av_find_best_stream() - Add av_find_best_stream to libavformat/avformat.h. - -2010-12-27 - 107a7e3 - lavf 52.90.0 - Add AVFMT_NOSTREAMS flag for formats with no streams, - like e.g. text metadata. - -2010-12-22 - 0328b9e - lavu 50.36.0 - file.h - Add functions av_file_map() and av_file_unmap() in file.h. - -2010-12-19 - 0bc55f5 - lavu 50.35.0 - error.h - Add "not found" error codes: - AVERROR_DEMUXER_NOT_FOUND - AVERROR_MUXER_NOT_FOUND - AVERROR_DECODER_NOT_FOUND - AVERROR_ENCODER_NOT_FOUND - AVERROR_PROTOCOL_NOT_FOUND - AVERROR_FILTER_NOT_FOUND - AVERROR_BSF_NOT_FOUND - AVERROR_STREAM_NOT_FOUND - -2010-12-09 - c61cdd0 - lavcore 0.16.0 - avcore.h - Move AV_NOPTS_VALUE, AV_TIME_BASE, AV_TIME_BASE_Q symbols from - avcodec.h to avcore.h. - -2010-12-04 - 16cfc96 - lavc 52.98.0 - CODEC_CAP_NEG_LINESIZES - Add CODEC_CAP_NEG_LINESIZES codec capability flag in avcodec.h. - -2010-12-04 - bb4afa1 - lavu 50.34.0 - av_get_pix_fmt_string() - Deprecate avcodec_pix_fmt_string() in favor of - pixdesc.h/av_get_pix_fmt_string(). - -2010-12-04 - 4da12e3 - lavcore 0.15.0 - av_image_alloc() - Add av_image_alloc() to libavcore/imgutils.h. - -2010-12-02 - 037be76 - lavfi 1.67.0 - avfilter_graph_create_filter() - Add function avfilter_graph_create_filter() in avfiltergraph.h. - -2010-11-25 - 4723bc2 - lavfi 1.65.0 - avfilter_get_video_buffer_ref_from_arrays() - Add function avfilter_get_video_buffer_ref_from_arrays() in - avfilter.h. - -2010-11-21 - 176a615 - lavcore 0.14.0 - audioconvert.h - Add a public audio channel API in audioconvert.h, and deprecate the - corresponding functions in libavcodec: - avcodec_get_channel_name() - avcodec_get_channel_layout() - avcodec_get_channel_layout_string() - avcodec_channel_layout_num_channels() - and the CH_* macros defined in libavcodec/avcodec.h. - -2010-11-21 - 6bfc268 - lavf 52.85.0 - avformat.h - Add av_append_packet(). - -2010-11-21 - a08d918 - lavc 52.97.0 - avcodec.h - Add av_grow_packet(). - -2010-11-17 - 0985e1a - lavcore 0.13.0 - parseutils.h - Add av_parse_color() declared in libavcore/parseutils.h. - -2010-11-13 - cb2c971 - lavc 52.95.0 - AVCodecContext - Add AVCodecContext.subtitle_header and AVCodecContext.subtitle_header_size - fields. - -2010-11-13 - 5aaea02 - lavfi 1.62.0 - avfiltergraph.h - Make avfiltergraph.h public. - -2010-11-13 - 4fcbb2a - lavfi 1.61.0 - avfiltergraph.h - Remove declarations from avfiltergraph.h for the functions: - avfilter_graph_check_validity() - avfilter_graph_config_links() - avfilter_graph_config_formats() - which are now internal. - Use avfilter_graph_config() instead. - -2010-11-08 - d2af720 - lavu 50.33.0 - eval.h - Deprecate functions: - av_parse_and_eval_expr(), - av_parse_expr(), - av_eval_expr(), - av_free_expr(), - in favor of the functions: - av_expr_parse_and_eval(), - av_expr_parse(), - av_expr_eval(), - av_expr_free(). - -2010-11-08 - 24de0ed - lavfi 1.59.0 - avfilter_free() - Rename avfilter_destroy() to avfilter_free(). - This change breaks libavfilter API/ABI. - -2010-11-07 - 1e80a0e - lavfi 1.58.0 - avfiltergraph.h - Remove graphparser.h header, move AVFilterInOut and - avfilter_graph_parse() declarations to libavfilter/avfiltergraph.h. - -2010-11-07 - 7313132 - lavfi 1.57.0 - AVFilterInOut - Rename field AVFilterInOut.filter to AVFilterInOut.filter_ctx. - This change breaks libavfilter API. - -2010-11-04 - 97dd1e4 - lavfi 1.56.0 - avfilter_graph_free() - Rename avfilter_graph_destroy() to avfilter_graph_free(). - This change breaks libavfilter API/ABI. - -2010-11-04 - e15aeea - lavfi 1.55.0 - avfilter_graph_alloc() - Add avfilter_graph_alloc() to libavfilter/avfiltergraph.h. - -2010-11-02 - 6f84cd1 - lavcore 0.12.0 - av_get_bits_per_sample_fmt() - Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and - deprecate av_get_bits_per_sample_format(). - -2010-11-02 - d63e456 - lavcore 0.11.0 - samplefmt.h - Add sample format functions in libavcore/samplefmt.h: - av_get_sample_fmt_name(), - av_get_sample_fmt(), - av_get_sample_fmt_string(), - and deprecate the corresponding libavcodec/audioconvert.h functions: - avcodec_get_sample_fmt_name(), - avcodec_get_sample_fmt(), - avcodec_sample_fmt_string(). - -2010-11-02 - 262d1c5 - lavcore 0.10.0 - samplefmt.h - Define enum AVSampleFormat in libavcore/samplefmt.h, deprecate enum - SampleFormat. - -2010-10-16 - 2a24df9 - lavfi 1.52.0 - avfilter_graph_config() - Add the function avfilter_graph_config() in avfiltergraph.h. - -2010-10-15 - 03700d3 - lavf 52.83.0 - metadata API - Change demuxers to export metadata in generic format and - muxers to accept generic format. Deprecate the public - conversion API. - -2010-10-10 - 867ae7a - lavfi 1.49.0 - AVFilterLink.time_base - Add time_base field to AVFilterLink. - -2010-09-27 - c85eef4 - lavu 50.31.0 - av_set_options_string() - Move av_set_options_string() from libavfilter/parseutils.h to - libavutil/opt.h. - -2010-09-27 - acc0490 - lavfi 1.47.0 - AVFilterLink - Make the AVFilterLink fields srcpad and dstpad store the pointers to - the source and destination pads, rather than their indexes. - -2010-09-27 - 372e288 - lavu 50.30.0 - av_get_token() - Move av_get_token() from libavfilter/parseutils.h to - libavutil/avstring.h. - -2010-09-26 - 635d4ae - lsws 0.12.0 - swscale.h - Add the functions sws_alloc_context() and sws_init_context(). - -2010-09-26 - 6ed0404 - lavu 50.29.0 - opt.h - Move libavcodec/opt.h to libavutil/opt.h. - -2010-09-24 - 1c1c80f - lavu 50.28.0 - av_log_set_flags() - Default of av_log() changed due to many problems to the old no repeat - detection. Read the docs of AV_LOG_SKIP_REPEATED in log.h before - enabling it for your app!. - -2010-09-24 - f66eb58 - lavc 52.90.0 - av_opt_show2() - Deprecate av_opt_show() in favor or av_opt_show2(). - -2010-09-14 - bc6f0af - lavu 50.27.0 - av_popcount() - Add av_popcount() to libavutil/common.h. - -2010-09-08 - c6c98d0 - lavu 50.26.0 - av_get_cpu_flags() - Add av_get_cpu_flags(). - -2010-09-07 - 34017fd - lavcore 0.9.0 - av_image_copy() - Add av_image_copy(). - -2010-09-07 - 9686abb - lavcore 0.8.0 - av_image_copy_plane() - Add av_image_copy_plane(). - -2010-09-07 - 9b7269e - lavcore 0.7.0 - imgutils.h - Adopt hierarchical scheme for the imgutils.h function names, - deprecate the old names. - -2010-09-04 - 7160bb7 - lavu 50.25.0 - AV_CPU_FLAG_* - Deprecate the FF_MM_* flags defined in libavcodec/avcodec.h in favor - of the AV_CPU_FLAG_* flags defined in libavutil/cpu.h. - -2010-08-26 - 5da19b5 - lavc 52.87.0 - avcodec_get_channel_layout() - Add avcodec_get_channel_layout() in audioconvert.h. - -2010-08-20 - e344336 - lavcore 0.6.0 - av_fill_image_max_pixsteps() - Rename av_fill_image_max_pixstep() to av_fill_image_max_pixsteps(). - -2010-08-18 - a6ddf8b - lavcore 0.5.0 - av_fill_image_max_pixstep() - Add av_fill_image_max_pixstep() in imgutils.h. - -2010-08-17 - 4f2d2e4 - lavu 50.24.0 - AV_NE() - Add the AV_NE macro. - -2010-08-17 - ad2c950 - lavfi 1.36.0 - audio framework - Implement AVFilterBufferRefAudioProps struct for audio properties, - get_audio_buffer(), filter_samples() functions and related changes. - -2010-08-12 - 81c1eca - lavcore 0.4.0 - av_get_image_linesize() - Add av_get_image_linesize() in imgutils.h. - -2010-08-11 - c1db7bf - lavfi 1.34.0 - AVFilterBufferRef - Resize data and linesize arrays in AVFilterBufferRef to 8. - - This change breaks libavfilter API/ABI. - -2010-08-11 - 9f08d80 - lavc 52.85.0 - av_picture_data_copy() - Add av_picture_data_copy in avcodec.h. - -2010-08-11 - 84c0386 - lavfi 1.33.0 - avfilter_open() - Change avfilter_open() signature: - AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name) -> - int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *inst_name); - - This change breaks libavfilter API/ABI. - -2010-08-11 - cc80caf - lavfi 1.32.0 - AVFilterBufferRef - Add a type field to AVFilterBufferRef, and move video specific - properties to AVFilterBufferRefVideoProps. - - This change breaks libavfilter API/ABI. - -2010-08-07 - 5d4890d - lavfi 1.31.0 - AVFilterLink - Rename AVFilterLink fields: - AVFilterLink.srcpic -> AVFilterLink.src_buf - AVFilterLink.cur_pic -> AVFilterLink.cur_buf - AVFilterLink.outpic -> AVFilterLink.out_buf - -2010-08-07 - 7fce481 - lavfi 1.30.0 - Rename functions and fields: - avfilter_(un)ref_pic -> avfilter_(un)ref_buffer - avfilter_copy_picref_props -> avfilter_copy_buffer_ref_props - AVFilterBufferRef.pic -> AVFilterBufferRef.buffer - -2010-08-07 - ecc8dad - lavfi 1.29.0 - AVFilterBufferRef - Rename AVFilterPicRef to AVFilterBufferRef. - -2010-08-07 - d54e094 - lavfi 1.28.0 - AVFilterBuffer - Move format field from AVFilterBuffer to AVFilterPicRef. - -2010-08-06 - bf176f5 - lavcore 0.3.0 - av_check_image_size() - Deprecate avcodec_check_dimensions() in favor of the function - av_check_image_size() defined in libavcore/imgutils.h. - -2010-07-30 - 56b5e9d - lavfi 1.27.0 - AVFilterBuffer - Increase size of the arrays AVFilterBuffer.data and - AVFilterBuffer.linesize from 4 to 8. - - This change breaks libavfilter ABI. - -2010-07-29 - e7bd48a - lavcore 0.2.0 - imgutils.h - Add functions av_fill_image_linesizes() and - av_fill_image_pointers(), declared in libavcore/imgutils.h. - -2010-07-27 - 126b638 - lavcore 0.1.0 - parseutils.h - Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate() - defined in libavcodec in favor of the newly added functions - av_parse_video_size() and av_parse_video_rate() declared in - libavcore/parseutils.h. - -2010-07-23 - 4485247 - lavu 50.23.0 - mathematics.h - Add the M_PHI constant definition. - -2010-07-22 - bdab614 - lavfi 1.26.0 - media format generalization - Add a type field to AVFilterLink. - - Change the field types: - enum PixelFormat format -> int format in AVFilterBuffer - enum PixelFormat *formats -> int *formats in AVFilterFormats - enum PixelFormat *format -> int format in AVFilterLink - - Change the function signatures: - AVFilterFormats *avfilter_make_format_list(const enum PixelFormat *pix_fmts); -> - AVFilterFormats *avfilter_make_format_list(const int *fmts); - - int avfilter_add_colorspace(AVFilterFormats **avff, enum PixelFormat pix_fmt); -> - int avfilter_add_format (AVFilterFormats **avff, int fmt); - - AVFilterFormats *avfilter_all_colorspaces(void); -> - AVFilterFormats *avfilter_all_formats (enum AVMediaType type); - - This change breaks libavfilter API/ABI. - -2010-07-21 - aac6ca6 - lavcore 0.0.0 - Add libavcore. - -2010-07-17 - b5c582f - lavfi 1.25.0 - AVFilterBuffer - Remove w and h fields from AVFilterBuffer. - -2010-07-17 - f0d77b2 - lavfi 1.24.0 - AVFilterBuffer - Rename AVFilterPic to AVFilterBuffer. - -2010-07-17 - 57fe80f - lavf 52.74.0 - url_fskip() - Make url_fskip() return an int error code instead of void. - -2010-07-11 - 23940f1 - lavc 52.83.0 - Add AVCodecContext.lpc_type and AVCodecContext.lpc_passes fields. - Add AVLPCType enum. - Deprecate AVCodecContext.use_lpc. - -2010-07-11 - e1d7c88 - lavc 52.82.0 - avsubtitle_free() - Add a function for free the contents of a AVSubtitle generated by - avcodec_decode_subtitle. - -2010-07-11 - b91d08f - lavu 50.22.0 - bswap.h and intreadwrite.h - Make the bswap.h and intreadwrite.h API public. - -2010-07-08 - ce1cd1c - lavu 50.21.0 - pixdesc.h - Rename read/write_line() to av_read/write_image_line(). - -2010-07-07 - 4d508e4 - lavfi 1.21.0 - avfilter_copy_picref_props() - Add avfilter_copy_picref_props(). - -2010-07-03 - 2d525ef - lavc 52.79.0 - Add FF_COMPLIANCE_UNOFFICIAL and change all instances of - FF_COMPLIANCE_INOFFICIAL to use FF_COMPLIANCE_UNOFFICIAL. - -2010-07-02 - 89eec74 - lavu 50.20.0 - lfg.h - Export av_lfg_init(), av_lfg_get(), av_mlfg_get(), and av_bmg_get() through - lfg.h. - -2010-06-28 - a52e2c3 - lavfi 1.20.1 - av_parse_color() - Extend av_parse_color() syntax, make it accept an alpha value specifier and - set the alpha value to 255 by default. - -2010-06-22 - 735cf6b - lavf 52.71.0 - URLProtocol.priv_data_size, priv_data_class - Add priv_data_size and priv_data_class to URLProtocol. - -2010-06-22 - ffbb289 - lavf 52.70.0 - url_alloc(), url_connect() - Add url_alloc() and url_connect(). - -2010-06-22 - 9b07a2d - lavf 52.69.0 - av_register_protocol2() - Add av_register_protocol2(), deprecating av_register_protocol(). - -2010-06-09 - 65db058 - lavu 50.19.0 - av_compare_mod() - Add av_compare_mod() to libavutil/mathematics.h. - -2010-06-05 - 0b99215 - lavu 50.18.0 - eval API - Make the eval API public. - -2010-06-04 - 31878fc - lavu 50.17.0 - AV_BASE64_SIZE - Add AV_BASE64_SIZE() macro. - -2010-06-02 - 7e566bb - lavc 52.73.0 - av_get_codec_tag_string() - Add av_get_codec_tag_string(). - -2010-06-01 - 2b99142 - lsws 0.11.0 - convertPalette API - Add sws_convertPalette8ToPacked32() and sws_convertPalette8ToPacked24(). - -2010-05-26 - 93ebfee - lavc 52.72.0 - CODEC_CAP_EXPERIMENTAL - Add CODEC_CAP_EXPERIMENTAL flag. - NOTE: this was backported to 0.6 - -2010-05-23 - 9977863 - lavu 50.16.0 - av_get_random_seed() - Add av_get_random_seed(). - -2010-05-18 - 796ac23 - lavf 52.63.0 - AVFMT_FLAG_RTP_HINT - Add AVFMT_FLAG_RTP_HINT as possible value for AVFormatContext.flags. - NOTE: this was backported to 0.6 - -2010-05-09 - b6bc205 - lavfi 1.20.0 - AVFilterPicRef - Add interlaced and top_field_first fields to AVFilterPicRef. - -------------------------------8<------------------------------------- - 0.6 branch was cut here ------------------------------>8-------------------------------------- - -2010-05-01 - 8e2ee18 - lavf 52.62.0 - probe function - Add av_probe_input_format2 to API, it allows ignoring probe - results below given score and returns the actual probe score. - -2010-04-01 - 3dd6180 - lavf 52.61.0 - metadata API - Add a flag for av_metadata_set2() to disable overwriting of - existing tags. - -2010-04-01 - 0fb49b5 - lavc 52.66.0 - Add avcodec_get_edge_width(). - -2010-03-31 - d103218 - lavc 52.65.0 - Add avcodec_copy_context(). - -2010-03-31 - 1a70d12 - lavf 52.60.0 - av_match_ext() - Make av_match_ext() public. - -2010-03-31 - 1149150 - lavu 50.14.0 - AVMediaType - Move AVMediaType enum from libavcodec to libavutil. - -2010-03-31 - 72415b2 - lavc 52.64.0 - AVMediaType - Define AVMediaType enum, and use it instead of enum CodecType, which - is deprecated and will be dropped at the next major bump. - -2010-03-25 - 8795823 - lavu 50.13.0 - av_strerror() - Implement av_strerror(). - -2010-03-23 - e1484eb - lavc 52.60.0 - av_dct_init() - Support DCT-I and DST-I. - -2010-03-15 - b8819c8 - lavf 52.56.0 - AVFormatContext.start_time_realtime - Add AVFormatContext.start_time_realtime field. - -2010-03-13 - 5bb5c1d - lavfi 1.18.0 - AVFilterPicRef.pos - Add AVFilterPicRef.pos field. - -2010-03-13 - 60c144f - lavu 50.12.0 - error.h - Move error code definitions from libavcodec/avcodec.h to - the new public header libavutil/error.h. - -2010-03-07 - c709483 - lavc 52.56.0 - avfft.h - Add public FFT interface. - -2010-03-06 - ac6ef86 - lavu 50.11.0 - av_stristr() - Add av_stristr(). - -2010-03-03 - 4b83fc0 - lavu 50.10.0 - av_tree_enumerate() - Add av_tree_enumerate(). - -2010-02-07 - b687c1a - lavu 50.9.0 - av_compare_ts() - Add av_compare_ts(). - -2010-02-05 - 3f3dc76 - lsws 0.10.0 - sws_getCoefficients() - Add sws_getCoefficients(). - -2010-02-01 - ca76a11 - lavf 52.50.0 - metadata API - Add a list of generic tag names, change 'author' -> 'artist', - 'year' -> 'date'. - -2010-01-30 - 80a07f6 - lavu 50.8.0 - av_get_pix_fmt() - Add av_get_pix_fmt(). - -2010-01-21 - 01cc47d - lsws 0.9.0 - sws_scale() - Change constness attributes of sws_scale() parameters. - -2010-01-10 - 3fb8e77 - lavfi 1.15.0 - avfilter_graph_config_links() - Add a log_ctx parameter to avfilter_graph_config_links(). - -2010-01-07 - 8e9767f - lsws 0.8.0 - sws_isSupported{In,Out}put() - Add sws_isSupportedInput() and sws_isSupportedOutput() functions. - -2010-01-06 - c1d662f - lavfi 1.14.0 - avfilter_add_colorspace() - Change the avfilter_add_colorspace() signature, make it accept an - (AVFilterFormats **) rather than an (AVFilterFormats *) as before. - -2010-01-03 - 4fd1f18 - lavfi 1.13.0 - avfilter_add_colorspace() - Add avfilter_add_colorspace(). - -2010-01-02 - 8eb631f - lavf 52.46.0 - av_match_ext() - Add av_match_ext(), it should be used in place of match_ext(). - -2010-01-01 - a1f547b - lavf 52.45.0 - av_guess_format() - Add av_guess_format(), it should be used in place of guess_format(). - -2009-12-13 - a181981 - lavf 52.43.0 - metadata API - Add av_metadata_set2(), AV_METADATA_DONT_STRDUP_KEY and - AV_METADATA_DONT_STRDUP_VAL. - -2009-12-13 - 277c733 - lavu 50.7.0 - avstring.h API - Add av_d2str(). - -2009-12-13 - 02b398e - lavc 52.42.0 - AVStream - Add avg_frame_rate. - -2009-12-12 - 3ba69a1 - lavu 50.6.0 - av_bmg_next() - Introduce the av_bmg_next() function. - -2009-12-05 - a13a543 - lavfi 1.12.0 - avfilter_draw_slice() - Add a slice_dir parameter to avfilter_draw_slice(). - -2009-11-26 - 4cc3f6a - lavfi 1.11.0 - AVFilter - Remove the next field from AVFilter, this is not anymore required. - -2009-11-25 - 1433c4a - lavfi 1.10.0 - avfilter_next() - Introduce the avfilter_next() function. - -2009-11-25 - 86a60fa - lavfi 1.9.0 - avfilter_register() - Change the signature of avfilter_register() to make it return an - int. This is required since now the registration operation may fail. - -2009-11-25 - 74a0059 - lavu 50.5.0 - pixdesc.h API - Make the pixdesc.h API public. - -2009-10-27 - 243110f - lavfi 1.5.0 - AVFilter.next - Add a next field to AVFilter, this is used for simplifying the - registration and management of the registered filters. - -2009-10-23 - cccd292 - lavfi 1.4.1 - AVFilter.description - Add a description field to AVFilter. - -2009-10-19 - 6b5dc05 - lavfi 1.3.0 - avfilter_make_format_list() - Change the interface of avfilter_make_format_list() from - avfilter_make_format_list(int n, ...) to - avfilter_make_format_list(enum PixelFormat *pix_fmts). - -2009-10-18 - 0eb4ff9 - lavfi 1.0.0 - avfilter_get_video_buffer() - Make avfilter_get_video_buffer() recursive and add the w and h - parameters to it. - -2009-10-07 - 46c40e4 - lavfi 0.5.1 - AVFilterPic - Add w and h fields to AVFilterPic. - -2009-06-22 - 92400be - lavf 52.34.1 - AVFormatContext.packet_size - This is now an unsigned int instead of a signed int. - -2009-06-19 - a4276ba - lavc 52.32.0 - AVSubtitle.pts - Add a pts field to AVSubtitle which gives the subtitle packet pts - in AV_TIME_BASE. Some subtitle de-/encoders (e.g. XSUB) will - not work right without this. - -2009-06-03 - 8f3f2e0 - lavc 52.30.2 - AV_PKT_FLAG_KEY - PKT_FLAG_KEY has been deprecated and will be dropped at the next - major version. Use AV_PKT_FLAG_KEY instead. - -2009-06-01 - f988ce6 - lavc 52.30.0 - av_lockmgr_register() - av_lockmgr_register() can be used to register a callback function - that lavc (and in the future, libraries that depend on lavc) can use - to implement mutexes. The application should provide a callback function - that implements the AV_LOCK_* operations described in avcodec.h. - When the lock manager is registered, FFmpeg is guaranteed to behave - correctly in a multi-threaded application. - -2009-04-30 - ce1d9c8 - lavc 52.28.0 - av_free_packet() - av_free_packet() is no longer an inline function. It is now exported. - -2009-04-11 - 80d403f - lavc 52.25.0 - deprecate av_destruct_packet_nofree() - Please use NULL instead. This has been supported since r16506 - (lavf > 52.23.1, lavc > 52.10.0). - -2009-04-07 - 7a00bba - lavc 52.23.0 - avcodec_decode_video/audio/subtitle - The old decoding functions are deprecated, all new code should use the - new functions avcodec_decode_video2(), avcodec_decode_audio3() and - avcodec_decode_subtitle2(). These new functions take an AVPacket *pkt - argument instead of a const uint8_t *buf / int buf_size pair. - -2009-04-03 - 7b09db3 - lavu 50.3.0 - av_fifo_space() - Introduce the av_fifo_space() function. - -2009-04-02 - fabd246 - lavc 52.23.0 - AVPacket - Move AVPacket declaration from libavformat/avformat.h to - libavcodec/avcodec.h. - -2009-03-22 - 6e08ca9 - lavu 50.2.0 - RGB32 pixel formats - Convert the pixel formats PIX_FMT_ARGB, PIX_FMT_RGBA, PIX_FMT_ABGR, - PIX_FMT_BGRA, which were defined as macros, into enum PixelFormat values. - Conversely PIX_FMT_RGB32, PIX_FMT_RGB32_1, PIX_FMT_BGR32 and - PIX_FMT_BGR32_1 are now macros. - avcodec_get_pix_fmt() now recognizes the "rgb32" and "bgr32" aliases. - Re-sort the enum PixelFormat list accordingly. - This change breaks API/ABI backward compatibility. - -2009-03-22 - f82674e - lavu 50.1.0 - PIX_FMT_RGB5X5 endian variants - Add the enum PixelFormat values: - PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, - PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, PIX_FMT_BGR555BE, PIX_FMT_BGR555LE. - -2009-03-21 - ee6624e - lavu 50.0.0 - av_random* - The Mersenne Twister PRNG implemented through the av_random* functions - was removed. Use the lagged Fibonacci PRNG through the av_lfg* functions - instead. - -2009-03-08 - 41dd680 - lavu 50.0.0 - AVFifoBuffer - av_fifo_init, av_fifo_read, av_fifo_write and av_fifo_realloc were dropped - and replaced by av_fifo_alloc, av_fifo_generic_read, av_fifo_generic_write - and av_fifo_realloc2. - In addition, the order of the function arguments of av_fifo_generic_read - was changed to match av_fifo_generic_write. - The AVFifoBuffer/struct AVFifoBuffer may only be used in an opaque way by - applications, they may not use sizeof() or directly access members. - -2009-03-01 - ec26457 - lavf 52.31.0 - Generic metadata API - Introduce a new metadata API (see av_metadata_get() and friends). - The old API is now deprecated and should not be used anymore. This especially - includes the following structure fields: - - AVFormatContext.title - - AVFormatContext.author - - AVFormatContext.copyright - - AVFormatContext.comment - - AVFormatContext.album - - AVFormatContext.year - - AVFormatContext.track - - AVFormatContext.genre - - AVStream.language - - AVStream.filename - - AVProgram.provider_name - - AVProgram.name - - AVChapter.title diff --git a/bundle/ffmpeg/doc/Doxyfile b/bundle/ffmpeg/doc/Doxyfile deleted file mode 100644 index bc1595f45b..0000000000 --- a/bundle/ffmpeg/doc/Doxyfile +++ /dev/null @@ -1,1624 +0,0 @@ -# Doxyfile 1.7.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = FFmpeg - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 2.1.3 - -# With the PROJECT_LOGO tag one can specify a logo or icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will -# copy the logo to the output directory. -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/doxy - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = . - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = YES - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = NO - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = *.git \ - *.d - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = doc/examples/ - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = *.c - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 2 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -#HTML_HEADER = doc/doxy/header.html - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -#HTML_FOOTER = doc/doxy/footer.html - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -#HTML_STYLESHEET = doc/doxy/doxy_stylesheet.css - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -#HTML_COLORSTYLE_HUE = 120 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OS X 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = NO - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvances is that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = YES - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = YES - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = "__attribute__(x)=" \ - "DECLARE_ALIGNED(a,t,n)=t n" \ - "offsetof(x,y)=0x42" \ - av_alloc_size \ - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = declare_idct \ - READ_PAR_DATA \ - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = YES - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/bundle/ffmpeg/doc/Makefile b/bundle/ffmpeg/doc/Makefile deleted file mode 100644 index 50a68b4e05..0000000000 --- a/bundle/ffmpeg/doc/Makefile +++ /dev/null @@ -1,137 +0,0 @@ -LIBRARIES-$(CONFIG_AVUTIL) += libavutil -LIBRARIES-$(CONFIG_SWSCALE) += libswscale -LIBRARIES-$(CONFIG_SWRESAMPLE) += libswresample -LIBRARIES-$(CONFIG_AVCODEC) += libavcodec -LIBRARIES-$(CONFIG_AVFORMAT) += libavformat -LIBRARIES-$(CONFIG_AVDEVICE) += libavdevice -LIBRARIES-$(CONFIG_AVFILTER) += libavfilter - -COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils -COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler -COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler -COMPONENTS-$(CONFIG_AVCODEC) += ffmpeg-codecs ffmpeg-bitstream-filters -COMPONENTS-$(CONFIG_AVFORMAT) += ffmpeg-formats ffmpeg-protocols -COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices -COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters - -MANPAGES1 = $(PROGS-yes:%=doc/%.1) $(PROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1) -MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3) -MANPAGES = $(MANPAGES1) $(MANPAGES3) -PODPAGES = $(PROGS-yes:%=doc/%.pod) $(PROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod) -HTMLPAGES = $(PROGS-yes:%=doc/%.html) $(PROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \ - doc/developer.html \ - doc/faq.html \ - doc/fate.html \ - doc/general.html \ - doc/git-howto.html \ - doc/nut.html \ - doc/platform.html \ - -TXTPAGES = doc/fate.txt \ - - -DOCS-$(CONFIG_HTMLPAGES) += $(HTMLPAGES) -DOCS-$(CONFIG_PODPAGES) += $(PODPAGES) -DOCS-$(CONFIG_MANPAGES) += $(MANPAGES) -DOCS-$(CONFIG_TXTPAGES) += $(TXTPAGES) -DOCS = $(DOCS-yes) - -all-$(CONFIG_DOC): doc - -doc: documentation - -apidoc: doc/doxy/html -documentation: $(DOCS) - -TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) - -doc/%.txt: TAG = TXT -doc/%.txt: doc/%.texi - $(Q)$(TEXIDEP) - $(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null - -GENTEXI = format codec -GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi) - -$(GENTEXI): TAG = GENTEXI -$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF) - $(M)doc/print_options $* > $@ - -doc/%.html: TAG = HTML -doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI) - $(Q)$(TEXIDEP) - $(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $< - -doc/%-all.html: TAG = HTML -doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI) - $(Q)$(TEXIDEP) - $(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $< - -doc/%.pod: TAG = POD -doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI) - $(Q)$(TEXIDEP) - $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@ - -doc/%-all.pod: TAG = POD -doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI) - $(Q)$(TEXIDEP) - $(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@ - -doc/%.1 doc/%.3: TAG = MAN -doc/%.1: doc/%.pod $(GENTEXI) - $(M)pod2man --section=1 --center=" " --release=" " $< > $@ -doc/%.3: doc/%.pod $(GENTEXI) - $(M)pod2man --section=3 --center=" " --release=" " $< > $@ - -$(DOCS) doc/doxy/html: | doc/ - -doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS) - $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^ - -install-doc: install-html install-man - -install-html: - -install-man: - -ifdef CONFIG_HTMLPAGES -install-progs-$(CONFIG_DOC): install-html - -install-html: $(HTMLPAGES) - $(Q)mkdir -p "$(DOCDIR)" - $(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)" -endif - -ifdef CONFIG_MANPAGES -install-progs-$(CONFIG_DOC): install-man - -install-man: $(MANPAGES) - $(Q)mkdir -p "$(MANDIR)/man1" - $(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1" - $(Q)mkdir -p "$(MANDIR)/man3" - $(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3" -endif - -uninstall: uninstall-doc - -uninstall-doc: uninstall-html uninstall-man - -uninstall-html: - $(RM) -r "$(DOCDIR)" - -uninstall-man: - $(RM) $(addprefix "$(MANDIR)/man1/",$(PROGS-yes:%=%.1) $(PROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1)) - $(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3)) - -clean:: docclean - -distclean:: docclean - $(RM) doc/config.texi - -docclean: - $(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi - $(RM) -r doc/doxy/html - --include $(wildcard $(DOCS:%=%.d)) - -.PHONY: apidoc doc documentation diff --git a/bundle/ffmpeg/doc/RELEASE_NOTES b/bundle/ffmpeg/doc/RELEASE_NOTES deleted file mode 100644 index fae3a2bf3f..0000000000 --- a/bundle/ffmpeg/doc/RELEASE_NOTES +++ /dev/null @@ -1,16 +0,0 @@ -Release Notes -============= - -* 2.1 "Fourier" October, 2013 - - -General notes -------------- -See the Changelog file for a list of significant changes. Note, there -are many more new features and bugfixes than whats listed there. - -Bugreports against FFmpeg git master or the most recent FFmpeg release are -accepted. If you are experiencing issues with any formally released version of -FFmpeg, please try git master to check if the issue still exists. If it does, -make your report against the development code following the usual bug reporting -guidelines. diff --git a/bundle/ffmpeg/doc/authors.texi b/bundle/ffmpeg/doc/authors.texi deleted file mode 100644 index 6c8c1d7efa..0000000000 --- a/bundle/ffmpeg/doc/authors.texi +++ /dev/null @@ -1,11 +0,0 @@ -@chapter Authors - -The FFmpeg developers. - -For details about the authorship, see the Git history of the project -(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command -@command{git log} in the FFmpeg source directory, or browsing the -online repository at @url{http://source.ffmpeg.org}. - -Maintainers for the specific components are listed in the file -@file{MAINTAINERS} in the source code tree. diff --git a/bundle/ffmpeg/doc/avutil.txt b/bundle/ffmpeg/doc/avutil.txt deleted file mode 100644 index 0847683d1d..0000000000 --- a/bundle/ffmpeg/doc/avutil.txt +++ /dev/null @@ -1,36 +0,0 @@ -AVUtil -====== -libavutil is a small lightweight library of generally useful functions. -It is not a library for code needed by both libavcodec and libavformat. - - -Overview: -========= -adler32.c adler32 checksum -aes.c AES encryption and decryption -fifo.c resizeable first in first out buffer -intfloat_readwrite.c portable reading and writing of floating point values -log.c "printf" with context and level -md5.c MD5 Message-Digest Algorithm -rational.c code to perform exact calculations with rational numbers -tree.c generic AVL tree -crc.c generic CRC checksumming code -integer.c 128bit integer math -lls.c -mathematics.c greatest common divisor, integer sqrt, integer log2, ... -mem.c memory allocation routines with guaranteed alignment - -Headers: -bswap.h big/little/native-endian conversion code -x86_cpu.h a few useful macros for unifying x86-64 and x86-32 code -avutil.h -common.h -intreadwrite.h reading and writing of unaligned big/little/native-endian integers - - -Goals: -====== -* Modular (few interdependencies and the possibility of disabling individual parts during ./configure) -* Small (source and object) -* Efficient (low CPU and memory usage) -* Useful (avoid useless features almost no one needs) diff --git a/bundle/ffmpeg/doc/bitstream_filters.texi b/bundle/ffmpeg/doc/bitstream_filters.texi deleted file mode 100644 index 315fe33002..0000000000 --- a/bundle/ffmpeg/doc/bitstream_filters.texi +++ /dev/null @@ -1,128 +0,0 @@ -@chapter Bitstream Filters -@c man begin BITSTREAM FILTERS - -When you configure your FFmpeg build, all the supported bitstream -filters are enabled by default. You can list all available ones using -the configure option @code{--list-bsfs}. - -You can disable all the bitstream filters using the configure option -@code{--disable-bsfs}, and selectively enable any bitstream filter using -the option @code{--enable-bsf=BSF}, or you can disable a particular -bitstream filter using the option @code{--disable-bsf=BSF}. - -The option @code{-bsfs} of the ff* tools will display the list of -all the supported bitstream filters included in your build. - -Below is a description of the currently available bitstream filters. - -@section aac_adtstoasc - -Convert MPEG-2/4 AAC ADTS to MPEG-4 Audio Specific Configuration -bitstream filter. - -This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4 -ADTS header and removes the ADTS header. - -This is required for example when copying an AAC stream from a raw -ADTS AAC container to a FLV or a MOV/MP4 file. - -@section chomp - -Remove zero padding at the end of a packet. - -@section dump_extra - -Add extradata to the beginning of the filtered packets. - -The additional argument specifies which packets should be filtered. -It accepts the values: -@table @samp -@item a -add extradata to all key packets, but only if @var{local_header} is -set in the @option{flags2} codec context field - -@item k -add extradata to all key packets - -@item e -add extradata to all packets -@end table - -If not specified it is assumed @samp{k}. - -For example the following @command{ffmpeg} command forces a global -header (thus disabling individual packet headers) in the H.264 packets -generated by the @code{libx264} encoder, but corrects them by adding -the header stored in extradata to the key packets: -@example -ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts -@end example - -@section h264_mp4toannexb - -Convert an H.264 bitstream from length prefixed mode to start code -prefixed mode (as defined in the Annex B of the ITU-T H.264 -specification). - -This is required by some streaming formats, typically the MPEG-2 -transport stream format ("mpegts"). - -For example to remux an MP4 file containing an H.264 stream to mpegts -format with @command{ffmpeg}, you can use the command: - -@example -ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts -@end example - -@section imx_dump_header - -@section mjpeg2jpeg - -Convert MJPEG/AVI1 packets to full JPEG/JFIF packets. - -MJPEG is a video codec wherein each video frame is essentially a -JPEG image. The individual frames can be extracted without loss, -e.g. by - -@example -ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg -@end example - -Unfortunately, these chunks are incomplete JPEG images, because -they lack the DHT segment required for decoding. Quoting from -@url{http://www.digitalpreservation.gov/formats/fdd/fdd000063.shtml}: - -Avery Lee, writing in the rec.video.desktop newsgroup in 2001, -commented that "MJPEG, or at least the MJPEG in AVIs having the -MJPG fourcc, is restricted JPEG with a fixed -- and *omitted* -- -Huffman table. The JPEG must be YCbCr colorspace, it must be 4:2:2, -and it must use basic Huffman encoding, not arithmetic or -progressive. . . . You can indeed extract the MJPEG frames and -decode them with a regular JPEG decoder, but you have to prepend -the DHT segment to them, or else the decoder won't have any idea -how to decompress the data. The exact table necessary is given in -the OpenDML spec." - -This bitstream filter patches the header of frames extracted from an MJPEG -stream (carrying the AVI1 header ID and lacking a DHT segment) to -produce fully qualified JPEG images. - -@example -ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg -exiftran -i -9 frame*.jpg -ffmpeg -i frame_%d.jpg -c:v copy rotated.avi -@end example - -@section mjpega_dump_header - -@section movsub - -@section mp3_header_compress - -@section mp3_header_decompress - -@section noise - -@section remove_extra - -@c man end BITSTREAM FILTERS diff --git a/bundle/ffmpeg/doc/build_system.txt b/bundle/ffmpeg/doc/build_system.txt deleted file mode 100644 index 36c141e9e4..0000000000 --- a/bundle/ffmpeg/doc/build_system.txt +++ /dev/null @@ -1,50 +0,0 @@ -FFmpeg currently uses a custom build system, this text attempts to document -some of its obscure features and options. - -Makefile variables: - -V - Disable the default terse mode, the full command issued by make and its - output will be shown on the screen. - -DESTDIR - Destination directory for the install targets, useful to prepare packages - or install FFmpeg in cross-environments. - -Makefile targets: - -all - Default target, builds all the libraries and the executables. - -fate - Run the fate test suite, note you must have installed it - -fate-list - Will list all fate/regression test targets - -install - Install headers, libraries and programs. - -libavformat/output-example - Build the libavformat basic example. - -libavcodec/api-example - Build the libavcodec basic example. - -libswscale/swscale-test - Build the swscale self-test (useful also as example). - - -Useful standard make commands: -make -t - Touch all files that otherwise would be build, this is useful to reduce - unneeded rebuilding when changing headers, but note you must force rebuilds - of files that actually need it by hand then. - -make -j - rebuild with multiple jobs at the same time. Faster on multi processor systems - -make -k - continue build in case of errors, this is useful for the regression tests - sometimes but note it will still not run all reg tests. - diff --git a/bundle/ffmpeg/doc/codecs.texi b/bundle/ffmpeg/doc/codecs.texi deleted file mode 100644 index e79e462146..0000000000 --- a/bundle/ffmpeg/doc/codecs.texi +++ /dev/null @@ -1,1087 +0,0 @@ -@anchor{codec-options} -@chapter Codec Options -@c man begin CODEC OPTIONS - -libavcodec provides some generic global options, which can be set on -all the encoders and decoders. In addition each codec may support -so-called private options, which are specific for a given codec. - -Sometimes, a global option may only affect a specific kind of codec, -and may be unsensical or ignored by another, so you need to be aware -of the meaning of the specified options. Also some options are -meant only for decoding or encoding. - -Options may be set by specifying -@var{option} @var{value} in the -FFmpeg tools, or by setting the value explicitly in the -@code{AVCodecContext} options or using the @file{libavutil/opt.h} API -for programmatic use. - -The list of supported options follow: - -@table @option -@item b @var{integer} (@emph{encoding,audio,video}) -Set bitrate in bits/s. Default value is 200K. - -@item ab @var{integer} (@emph{encoding,audio}) -Set audio bitrate (in bits/s). Default value is 128K. - -@item bt @var{integer} (@emph{encoding,video}) -Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate -tolerance specifies how far ratecontrol is willing to deviate from the -target average bitrate value. This is not related to min/max -bitrate. Lowering tolerance too much has an adverse effect on quality. - -@item flags @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) -Set generic flags. - -Possible values: -@table @samp -@item mv4 -Use four motion vector by macroblock (mpeg4). -@item qpel -Use 1/4 pel motion compensation. -@item loop -Use loop filter. -@item qscale -Use fixed qscale. -@item gmc -Use gmc. -@item mv0 -Always try a mb with mv=<0,0>. -@item input_preserved - -@item pass1 -Use internal 2pass ratecontrol in first pass mode. -@item pass2 -Use internal 2pass ratecontrol in second pass mode. -@item gray -Only decode/encode grayscale. -@item emu_edge -Do not draw edges. -@item psnr -Set error[?] variables during encoding. -@item truncated - -@item naq -Normalize adaptive quantization. -@item ildct -Use interlaced DCT. -@item low_delay -Force low delay. -@item global_header -Place global headers in extradata instead of every keyframe. -@item bitexact -Use only bitexact stuff (except (I)DCT). -@item aic -Apply H263 advanced intra coding / mpeg4 ac prediction. -@item cbp -Deprecated, use mpegvideo private options instead. -@item qprd -Deprecated, use mpegvideo private options instead. -@item ilme -Apply interlaced motion estimation. -@item cgop -Use closed gop. -@end table - -@item me_method @var{integer} (@emph{encoding,video}) -Set motion estimation method. - -Possible values: -@table @samp -@item zero -zero motion estimation (fastest) -@item full -full motion estimation (slowest) -@item epzs -EPZS motion estimation (default) -@item esa -esa motion estimation (alias for full) -@item tesa -tesa motion estimation -@item dia -dia motion estimation (alias for epzs) -@item log -log motion estimation -@item phods -phods motion estimation -@item x1 -X1 motion estimation -@item hex -hex motion estimation -@item umh -umh motion estimation -@item iter -iter motion estimation -@end table - -@item extradata_size @var{integer} -Set extradata size. - -@item time_base @var{rational number} -Set codec time base. - -It is the fundamental unit of time (in seconds) in terms of which -frame timestamps are represented. For fixed-fps content, timebase -should be @code{1 / frame_rate} and timestamp increments should be -identically 1. - -@item g @var{integer} (@emph{encoding,video}) -Set the group of picture size. Default value is 12. - -@item ar @var{integer} (@emph{decoding/encoding,audio}) -Set audio sampling rate (in Hz). - -@item ac @var{integer} (@emph{decoding/encoding,audio}) -Set number of audio channels. - -@item cutoff @var{integer} (@emph{encoding,audio}) -Set cutoff bandwidth. - -@item frame_size @var{integer} (@emph{encoding,audio}) -Set audio frame size. - -Each submitted frame except the last must contain exactly frame_size -samples per channel. May be 0 when the codec has -CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not -restricted. It is set by some decoders to indicate constant frame -size. - -@item frame_number @var{integer} -Set the frame number. - -@item delay @var{integer} - -@item qcomp @var{float} (@emph{encoding,video}) -Set video quantizer scale compression (VBR). It is used as a constant -in the ratecontrol equation. Recommended range for default rc_eq: -0.0-1.0. - -@item qblur @var{float} (@emph{encoding,video}) -Set video quantizer scale blur (VBR). - -@item qmin @var{integer} (@emph{encoding,video}) -Set min video quantizer scale (VBR). Must be included between -1 and -69, default value is 2. - -@item qmax @var{integer} (@emph{encoding,video}) -Set max video quantizer scale (VBR). Must be included between -1 and -1024, default value is 31. - -@item qdiff @var{integer} (@emph{encoding,video}) -Set max difference between the quantizer scale (VBR). - -@item bf @var{integer} (@emph{encoding,video}) -Set max number of B frames. - -@item b_qfactor @var{float} (@emph{encoding,video}) -Set qp factor between P and B frames. - -@item rc_strategy @var{integer} (@emph{encoding,video}) -Set ratecontrol method. - -@item b_strategy @var{integer} (@emph{encoding,video}) -Set strategy to choose between I/P/B-frames. - -@item ps @var{integer} (@emph{encoding,video}) -Set RTP payload size in bytes. - -@item mv_bits @var{integer} -@item header_bits @var{integer} -@item i_tex_bits @var{integer} -@item p_tex_bits @var{integer} -@item i_count @var{integer} -@item p_count @var{integer} -@item skip_count @var{integer} -@item misc_bits @var{integer} -@item frame_bits @var{integer} -@item codec_tag @var{integer} -@item bug @var{flags} (@emph{decoding,video}) -Workaround not auto detected encoder bugs. - -Possible values: -@table @samp -@item autodetect - -@item old_msmpeg4 -some old lavc generated msmpeg4v3 files (no autodetection) -@item xvid_ilace -Xvid interlacing bug (autodetected if fourcc==XVIX) -@item ump4 -(autodetected if fourcc==UMP4) -@item no_padding -padding bug (autodetected) -@item amv - -@item ac_vlc -illegal vlc bug (autodetected per fourcc) -@item qpel_chroma - -@item std_qpel -old standard qpel (autodetected per fourcc/version) -@item qpel_chroma2 - -@item direct_blocksize -direct-qpel-blocksize bug (autodetected per fourcc/version) -@item edge -edge padding bug (autodetected per fourcc/version) -@item hpel_chroma - -@item dc_clip - -@item ms -Workaround various bugs in microsoft broken decoders. -@item trunc -trancated frames -@end table - -@item lelim @var{integer} (@emph{encoding,video}) -Set single coefficient elimination threshold for luminance (negative -values also consider DC coefficient). - -@item celim @var{integer} (@emph{encoding,video}) -Set single coefficient elimination threshold for chrominance (negative -values also consider dc coefficient) - -@item strict @var{integer} (@emph{decoding/encoding,audio,video}) -Specify how strictly to follow the standards. - -Possible values: -@table @samp -@item very -strictly conform to a older more strict version of the spec or reference software -@item strict -strictly conform to all the things in the spec no matter what consequences -@item normal - -@item unofficial -allow unofficial extensions -@item experimental -allow non standardized experimental things, experimental -(unfinished/work in progress/not well tested) decoders and encoders. -Note: experimental decoders can pose a security risk, do not use this for -decoding untrusted input. -@end table - -@item b_qoffset @var{float} (@emph{encoding,video}) -Set QP offset between P and B frames. - -@item err_detect @var{flags} (@emph{decoding,audio,video}) -Set error detection flags. - -Possible values: -@table @samp -@item crccheck -verify embedded CRCs -@item bitstream -detect bitstream specification deviations -@item buffer -detect improper bitstream length -@item explode -abort decoding on minor error detection -@item careful -consider things that violate the spec and have not been seen in the wild as errors -@item compliant -consider all spec non compliancies as errors -@item aggressive -consider things that a sane encoder should not do as an error -@end table - -@item has_b_frames @var{integer} - -@item block_align @var{integer} - -@item mpeg_quant @var{integer} (@emph{encoding,video}) -Use MPEG quantizers instead of H.263. - -@item qsquish @var{float} (@emph{encoding,video}) -How to keep quantizer between qmin and qmax (0 = clip, 1 = use -differentiable function). - -@item rc_qmod_amp @var{float} (@emph{encoding,video}) -Set experimental quantizer modulation. - -@item rc_qmod_freq @var{integer} (@emph{encoding,video}) -Set experimental quantizer modulation. - -@item rc_override_count @var{integer} - -@item rc_eq @var{string} (@emph{encoding,video}) -Set rate control equation. When computing the expression, besides the -standard functions defined in the section 'Expression Evaluation', the -following functions are available: bits2qp(bits), qp2bits(qp). Also -the following constants are available: iTex pTex tex mv fCode iCount -mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex -avgTex. - -@item maxrate @var{integer} (@emph{encoding,audio,video}) -Set max bitrate tolerance (in bits/s). Requires bufsize to be set. - -@item minrate @var{integer} (@emph{encoding,audio,video}) -Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR -encode. It is of little use elsewise. - -@item bufsize @var{integer} (@emph{encoding,audio,video}) -Set ratecontrol buffer size (in bits). - -@item rc_buf_aggressivity @var{float} (@emph{encoding,video}) -Currently useless. - -@item i_qfactor @var{float} (@emph{encoding,video}) -Set QP factor between P and I frames. - -@item i_qoffset @var{float} (@emph{encoding,video}) -Set QP offset between P and I frames. - -@item rc_init_cplx @var{float} (@emph{encoding,video}) -Set initial complexity for 1-pass encoding. - -@item dct @var{integer} (@emph{encoding,video}) -Set DCT algorithm. - -Possible values: -@table @samp -@item auto -autoselect a good one (default) -@item fastint -fast integer -@item int -accurate integer -@item mmx - -@item altivec - -@item faan -floating point AAN DCT -@end table - -@item lumi_mask @var{float} (@emph{encoding,video}) -Compress bright areas stronger than medium ones. - -@item tcplx_mask @var{float} (@emph{encoding,video}) -Set temporal complexity masking. - -@item scplx_mask @var{float} (@emph{encoding,video}) -Set spatial complexity masking. - -@item p_mask @var{float} (@emph{encoding,video}) -Set inter masking. - -@item dark_mask @var{float} (@emph{encoding,video}) -Compress dark areas stronger than medium ones. - -@item idct @var{integer} (@emph{decoding/encoding,video}) -Select IDCT implementation. - -Possible values: -@table @samp -@item auto - -@item int - -@item simple - -@item simplemmx - -@item arm - -@item altivec - -@item sh4 - -@item simplearm - -@item simplearmv5te - -@item simplearmv6 - -@item simpleneon - -@item simplealpha - -@item ipp - -@item xvidmmx - -@item faani -floating point AAN IDCT -@end table - -@item slice_count @var{integer} - -@item ec @var{flags} (@emph{decoding,video}) -Set error concealment strategy. - -Possible values: -@table @samp -@item guess_mvs -iterative motion vector (MV) search (slow) -@item deblock -use strong deblock filter for damaged MBs -@end table - -@item bits_per_coded_sample @var{integer} - -@item pred @var{integer} (@emph{encoding,video}) -Set prediction method. - -Possible values: -@table @samp -@item left - -@item plane - -@item median - -@end table - -@item aspect @var{rational number} (@emph{encoding,video}) -Set sample aspect ratio. - -@item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) -Print specific debug info. - -Possible values: -@table @samp -@item pict -picture info -@item rc -rate control -@item bitstream - -@item mb_type -macroblock (MB) type -@item qp -per-block quantization parameter (QP) -@item mv -motion vector -@item dct_coeff - -@item skip - -@item startcode - -@item pts - -@item er -error recognition -@item mmco -memory management control operations (H.264) -@item bugs - -@item vis_qp -visualize quantization parameter (QP), lower QP are tinted greener -@item vis_mb_type -visualize block types -@item buffers -picture buffer allocations -@item thread_ops -threading operations -@end table - -@item vismv @var{integer} (@emph{decoding,video}) -Visualize motion vectors (MVs). - -Possible values: -@table @samp -@item pf -forward predicted MVs of P-frames -@item bf -forward predicted MVs of B-frames -@item bb -backward predicted MVs of B-frames -@end table - -@item cmp @var{integer} (@emph{encoding,video}) -Set full pel me compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - -@item subcmp @var{integer} (@emph{encoding,video}) -Set sub pel me compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - -@item mbcmp @var{integer} (@emph{encoding,video}) -Set macroblock compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - -@item ildctcmp @var{integer} (@emph{encoding,video}) -Set interlaced dct compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - -@item dia_size @var{integer} (@emph{encoding,video}) -Set diamond type & size for motion estimation. - -@item last_pred @var{integer} (@emph{encoding,video}) -Set amount of motion predictors from the previous frame. - -@item preme @var{integer} (@emph{encoding,video}) -Set pre motion estimation. - -@item precmp @var{integer} (@emph{encoding,video}) -Set pre motion estimation compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - -@item pre_dia_size @var{integer} (@emph{encoding,video}) -Set diamond type & size for motion estimation pre-pass. - -@item subq @var{integer} (@emph{encoding,video}) -Set sub pel motion estimation quality. - -@item dtg_active_format @var{integer} - -@item me_range @var{integer} (@emph{encoding,video}) -Set limit motion vectors range (1023 for DivX player). - -@item ibias @var{integer} (@emph{encoding,video}) -Set intra quant bias. - -@item pbias @var{integer} (@emph{encoding,video}) -Set inter quant bias. - -@item color_table_id @var{integer} - -@item global_quality @var{integer} (@emph{encoding,audio,video}) - -@item coder @var{integer} (@emph{encoding,video}) - -Possible values: -@table @samp -@item vlc -variable length coder / huffman coder -@item ac -arithmetic coder -@item raw -raw (no encoding) -@item rle -run-length coder -@item deflate -deflate-based coder -@end table - -@item context @var{integer} (@emph{encoding,video}) -Set context model. - -@item slice_flags @var{integer} - -@item xvmc_acceleration @var{integer} - -@item mbd @var{integer} (@emph{encoding,video}) -Set macroblock decision algorithm (high quality mode). - -Possible values: -@table @samp -@item simple -use mbcmp (default) -@item bits -use fewest bits -@item rd -use best rate distortion -@end table - -@item stream_codec_tag @var{integer} - -@item sc_threshold @var{integer} (@emph{encoding,video}) -Set scene change threshold. - -@item lmin @var{integer} (@emph{encoding,video}) -Set min lagrange factor (VBR). - -@item lmax @var{integer} (@emph{encoding,video}) -Set max lagrange factor (VBR). - -@item nr @var{integer} (@emph{encoding,video}) -Set noise reduction. - -@item rc_init_occupancy @var{integer} (@emph{encoding,video}) -Set number of bits which should be loaded into the rc buffer before -decoding starts. - -@item flags2 @var{flags} (@emph{decoding/encoding,audio,video}) - -Possible values: -@table @samp -@item fast -Allow non spec compliant speedup tricks. -@item sgop -Deprecated, use mpegvideo private options instead. -@item noout -Skip bitstream encoding. -@item ignorecrop -Ignore cropping information from sps. -@item local_header -Place global headers at every keyframe instead of in extradata. -@item chunks -Frame data might be split into multiple chunks. -@item showall -Show all frames before the first keyframe. -@item skiprd -Deprecated, use mpegvideo private options instead. -@end table - -@item error @var{integer} (@emph{encoding,video}) - -@item qns @var{integer} (@emph{encoding,video}) -Deprecated, use mpegvideo private options instead. - -@item threads @var{integer} (@emph{decoding/encoding,video}) - -Possible values: -@table @samp -@item auto -detect a good number of threads -@end table - -@item me_threshold @var{integer} (@emph{encoding,video}) -Set motion estimation threshold. - -@item mb_threshold @var{integer} (@emph{encoding,video}) -Set macroblock threshold. - -@item dc @var{integer} (@emph{encoding,video}) -Set intra_dc_precision. - -@item nssew @var{integer} (@emph{encoding,video}) -Set nsse weight. - -@item skip_top @var{integer} (@emph{decoding,video}) -Set number of macroblock rows at the top which are skipped. - -@item skip_bottom @var{integer} (@emph{decoding,video}) -Set number of macroblock rows at the bottom which are skipped. - -@item profile @var{integer} (@emph{encoding,audio,video}) - -Possible values: -@table @samp -@item unknown - -@item aac_main - -@item aac_low - -@item aac_ssr - -@item aac_ltp - -@item aac_he - -@item aac_he_v2 - -@item aac_ld - -@item aac_eld - -@item mpeg2_aac_low - -@item mpeg2_aac_he - -@item dts - -@item dts_es - -@item dts_96_24 - -@item dts_hd_hra - -@item dts_hd_ma - -@end table - -@item level @var{integer} (@emph{encoding,audio,video}) - -Possible values: -@table @samp -@item unknown - -@end table - -@item lowres @var{integer} (@emph{decoding,audio,video}) -Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions. - -@item skip_threshold @var{integer} (@emph{encoding,video}) -Set frame skip threshold. - -@item skip_factor @var{integer} (@emph{encoding,video}) -Set frame skip factor. - -@item skip_exp @var{integer} (@emph{encoding,video}) -Set frame skip exponent. - -@item skipcmp @var{integer} (@emph{encoding,video}) -Set frame skip compare function. - -Possible values: -@table @samp -@item sad -sum of absolute differences, fast (default) -@item sse -sum of squared errors -@item satd -sum of absolute Hadamard transformed differences -@item dct -sum of absolute DCT transformed differences -@item psnr -sum of squared quantization errors (avoid, low quality) -@item bit -number of bits needed for the block -@item rd -rate distortion optimal, slow -@item zero -0 -@item vsad -sum of absolute vertical differences -@item vsse -sum of squared vertical differences -@item nsse -noise preserving sum of squared differences -@item w53 -5/3 wavelet, only used in snow -@item w97 -9/7 wavelet, only used in snow -@item dctmax - -@item chroma - -@end table - -@item border_mask @var{float} (@emph{encoding,video}) -Increase the quantizer for macroblocks close to borders. - -@item mblmin @var{integer} (@emph{encoding,video}) -Set min macroblock lagrange factor (VBR). - -@item mblmax @var{integer} (@emph{encoding,video}) -Set max macroblock lagrange factor (VBR). - -@item mepc @var{integer} (@emph{encoding,video}) -Set motion estimation bitrate penalty compensation (1.0 = 256). - -@item skip_loop_filter @var{integer} (@emph{decoding,video}) -@item skip_idct @var{integer} (@emph{decoding,video}) -@item skip_frame @var{integer} (@emph{decoding,video}) - -Make decoder discard processing depending on the frame type selected -by the option value. - -@option{skip_loop_filter} skips frame loop filtering, @option{skip_idct} -skips frame IDCT/dequantization, @option{skip_frame} skips decoding. - -Possible values: -@table @samp -@item none -Discard no frame. - -@item default -Discard useless frames like 0-sized frames. - -@item noref -Discard all non-reference frames. - -@item bidir -Discard all bidirectional frames. - -@item nokey -Discard all frames excepts keyframes. - -@item all -Discard all frames. -@end table - -Default value is @samp{default}. - -@item bidir_refine @var{integer} (@emph{encoding,video}) -Refine the two motion vectors used in bidirectional macroblocks. - -@item brd_scale @var{integer} (@emph{encoding,video}) -Downscale frames for dynamic B-frame decision. - -@item keyint_min @var{integer} (@emph{encoding,video}) -Set minimum interval between IDR-frames. - -@item refs @var{integer} (@emph{encoding,video}) -Set reference frames to consider for motion compensation. - -@item chromaoffset @var{integer} (@emph{encoding,video}) -Set chroma qp offset from luma. - -@item trellis @var{integer} (@emph{encoding,audio,video}) -Set rate-distortion optimal quantization. - -@item sc_factor @var{integer} (@emph{encoding,video}) -Set value multiplied by qscale for each frame and added to -scene_change_score. - -@item mv0_threshold @var{integer} (@emph{encoding,video}) -@item b_sensitivity @var{integer} (@emph{encoding,video}) -Adjust sensitivity of b_frame_strategy 1. - -@item compression_level @var{integer} (@emph{encoding,audio,video}) -@item min_prediction_order @var{integer} (@emph{encoding,audio}) -@item max_prediction_order @var{integer} (@emph{encoding,audio}) -@item timecode_frame_start @var{integer} (@emph{encoding,video}) -Set GOP timecode frame start number, in non drop frame format. - -@item request_channels @var{integer} (@emph{decoding,audio}) -Set desired number of audio channels. - -@item bits_per_raw_sample @var{integer} -@item channel_layout @var{integer} (@emph{decoding/encoding,audio}) - -Possible values: -@table @samp -@end table -@item request_channel_layout @var{integer} (@emph{decoding,audio}) - -Possible values: -@table @samp -@end table -@item rc_max_vbv_use @var{float} (@emph{encoding,video}) -@item rc_min_vbv_use @var{float} (@emph{encoding,video}) -@item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video}) -@item color_primaries @var{integer} (@emph{decoding/encoding,video}) -@item color_trc @var{integer} (@emph{decoding/encoding,video}) -@item colorspace @var{integer} (@emph{decoding/encoding,video}) -@item color_range @var{integer} (@emph{decoding/encoding,video}) -@item chroma_sample_location @var{integer} (@emph{decoding/encoding,video}) - -@item log_level_offset @var{integer} -Set the log level offset. - -@item slices @var{integer} (@emph{encoding,video}) -Number of slices, used in parallelized encoding. - -@item thread_type @var{flags} (@emph{decoding/encoding,video}) -Select multithreading type. - -Possible values: -@table @samp -@item slice - -@item frame - -@end table -@item audio_service_type @var{integer} (@emph{encoding,audio}) -Set audio service type. - -Possible values: -@table @samp -@item ma -Main Audio Service -@item ef -Effects -@item vi -Visually Impaired -@item hi -Hearing Impaired -@item di -Dialogue -@item co -Commentary -@item em -Emergency -@item vo -Voice Over -@item ka -Karaoke -@end table - -@item request_sample_fmt @var{sample_fmt} (@emph{decoding,audio}) -Set sample format audio decoders should prefer. Default value is -@code{none}. - -@item pkt_timebase @var{rational number} - -@item sub_charenc @var{encoding} (@emph{decoding,subtitles}) -Set the input subtitles character encoding. - -@item field_order @var{field_order} (@emph{video}) -Set/override the field order of the video. -Possible values: -@table @samp -@item progressive -Progressive video -@item tt -Interlaced video, top field coded and displayed first -@item bb -Interlaced video, bottom field coded and displayed first -@item tb -Interlaced video, top coded first, bottom displayed first -@item bt -Interlaced video, bottom coded first, top displayed first -@end table - -@item skip_alpha @var{integer} (@emph{decoding,video}) -Set to 1 to disable processing alpha (transparency). This works like the -@samp{gray} flag in the @option{flags} option which skips chroma information -instead of alpha. Default is 0. -@end table - -@c man end CODEC OPTIONS - -@include decoders.texi -@include encoders.texi diff --git a/bundle/ffmpeg/doc/decoders.texi b/bundle/ffmpeg/doc/decoders.texi deleted file mode 100644 index 9d9f298471..0000000000 --- a/bundle/ffmpeg/doc/decoders.texi +++ /dev/null @@ -1,202 +0,0 @@ -@chapter Decoders -@c man begin DECODERS - -Decoders are configured elements in FFmpeg which allow the decoding of -multimedia streams. - -When you configure your FFmpeg build, all the supported native decoders -are enabled by default. Decoders requiring an external library must be enabled -manually via the corresponding @code{--enable-lib} option. You can list all -available decoders using the configure option @code{--list-decoders}. - -You can disable all the decoders with the configure option -@code{--disable-decoders} and selectively enable / disable single decoders -with the options @code{--enable-decoder=@var{DECODER}} / -@code{--disable-decoder=@var{DECODER}}. - -The option @code{-codecs} of the ff* tools will display the list of -enabled decoders. - -@c man end DECODERS - -@chapter Video Decoders -@c man begin VIDEO DECODERS - -A description of some of the currently available video decoders -follows. - -@section rawvideo - -Raw video decoder. - -This decoder decodes rawvideo streams. - -@subsection Options - -@table @option -@item top @var{top_field_first} -Specify the assumed field type of the input video. -@table @option -@item -1 -the video is assumed to be progressive (default) -@item 0 -bottom-field-first is assumed -@item 1 -top-field-first is assumed -@end table - -@end table - -@c man end VIDEO DECODERS - -@chapter Audio Decoders -@c man begin AUDIO DECODERS - -@section ffwavesynth - -Internal wave synthetizer. - -This decoder generates wave patterns according to predefined sequences. Its -use is purely internal and the format of the data it accepts is not publicly -documented. - -@section libcelt - -libcelt decoder wrapper. - -libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec. -Requires the presence of the libcelt headers and library during configuration. -You need to explicitly configure the build with @code{--enable-libcelt}. - -@section libgsm - -libgsm decoder wrapper. - -libgsm allows libavcodec to decode the GSM full rate audio codec. Requires -the presence of the libgsm headers and library during configuration. You need -to explicitly configure the build with @code{--enable-libgsm}. - -This decoder supports both the ordinary GSM and the Microsoft variant. - -@section libilbc - -libilbc decoder wrapper. - -libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC) -audio codec. Requires the presence of the libilbc headers and library during -configuration. You need to explicitly configure the build with -@code{--enable-libilbc}. - -@subsection Options - -The following option is supported by the libilbc wrapper. - -@table @option -@item enhance - -Enable the enhancement of the decoded audio when set to 1. The default -value is 0 (disabled). - -@end table - -@section libopencore-amrnb - -libopencore-amrnb decoder wrapper. - -libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate -Narrowband audio codec. Using it requires the presence of the -libopencore-amrnb headers and library during configuration. You need to -explicitly configure the build with @code{--enable-libopencore-amrnb}. - -An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB -without this library. - -@section libopencore-amrwb - -libopencore-amrwb decoder wrapper. - -libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate -Wideband audio codec. Using it requires the presence of the -libopencore-amrwb headers and library during configuration. You need to -explicitly configure the build with @code{--enable-libopencore-amrwb}. - -An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB -without this library. - -@section libopus - -libopus decoder wrapper. - -libopus allows libavcodec to decode the Opus Interactive Audio Codec. -Requires the presence of the libopus headers and library during -configuration. You need to explicitly configure the build with -@code{--enable-libopus}. - -@c man end AUDIO DECODERS - -@chapter Subtitles Decoders -@c man begin SUBTILES DECODERS - -@section dvdsub - -This codec decodes the bitmap subtitles used in DVDs; the same subtitles can -also be found in VobSub file pairs and in some Matroska files. - -@subsection Options - -@table @option -@item palette -Specify the global palette used by the bitmaps. When stored in VobSub, the -palette is normally specified in the index file; in Matroska, the palette is -stored in the codec extra-data in the same format as in VobSub. In DVDs, the -palette is stored in the IFO file, and therefore not available when reading -from dumped VOB files. - -The format for this option is a string containing 16 24-bits hexadecimal -numbers (without 0x prefix) separated by comas, for example @code{0d00ee, -ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1, -7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}. -@end table - -@section libzvbi-teletext - -Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext -subtitles. Requires the presence of the libzvbi headers and library during -configuration. You need to explicitly configure the build with -@code{--enable-libzvbi}. - -@subsection Options - -@table @option -@item txt_page -List of teletext page numbers to decode. You may use the special * string to -match all pages. Pages that do not match the specified list are dropped. -Default value is *. -@item txt_chop_top -Discards the top teletext line. Default value is 1. -@item txt_format -Specifies the format of the decoded subtitles. The teletext decoder is capable -of decoding the teletext pages to bitmaps or to simple text, you should use -"bitmap" for teletext pages, because certain graphics and colors cannot be -expressed in simple text. You might use "text" for teletext based subtitles if -your application can handle simple text based subtitles. Default value is -bitmap. -@item txt_left -X offset of generated bitmaps, default is 0. -@item txt_top -Y offset of generated bitmaps, default is 0. -@item txt_chop_spaces -Chops leading and trailing spaces and removes empty lines from the generated -text. This option is useful for teletext based subtitles where empty spaces may -be present at the start or at the end of the lines or empty lines may be -present between the subtitle lines because of double-sized teletext charactes. -Default value is 1. -@item txt_duration -Sets the display duration of the decoded teletext pages or subtitles in -miliseconds. Default value is 30000 which is 30 seconds. -@item txt_transparent -Force transparent background of the generated teletext bitmaps. Default value -is 0 which means an opaque (black) background. -@end table - -@c man end SUBTILES DECODERS diff --git a/bundle/ffmpeg/doc/default.css b/bundle/ffmpeg/doc/default.css deleted file mode 100644 index e6c6cfec00..0000000000 --- a/bundle/ffmpeg/doc/default.css +++ /dev/null @@ -1,165 +0,0 @@ -a.summary-letter { - text-decoration: none; -} - -a { - color: #2D6198; -} - -a:visited { - color: #884488; -} - -#banner { - background-color: white; - position: relative; - text-align: center; -} - -#banner img { - padding-bottom: 1px; - padding-top: 5px; -} - -#body { - margin-left: 1em; - margin-right: 1em; -} - -body { - background-color: #313131; - margin: 0; - text-align: justify; -} - -.center { - margin-left: auto; - margin-right: auto; - text-align: center; -} - -#container { - background-color: white; - color: #202020; - margin-left: 1em; - margin-right: 1em; -} - -#footer { - text-align: center; -} - -h1 a, h2 a, h3 a, h4 a { - text-decoration: inherit; - color: inherit; -} - -h1, h2, h3, h4 { - padding-left: 0.4em; - border-radius: 4px; - padding-bottom: 0.25em; - padding-top: 0.25em; - border: 1px solid #6A996A; -} - -h1 { - background-color: #7BB37B; - color: #151515; - font-size: 1.2em; - padding-bottom: 0.3em; - padding-top: 0.3em; -} - -h2 { - color: #313131; - font-size: 1.0em; - background-color: #ABE3AB; -} - -h3 { - color: #313131; - font-size: 0.9em; - margin-bottom: -6px; - background-color: #BBF3BB; -} - -h4 { - color: #313131; - font-size: 0.8em; - margin-bottom: -8px; - background-color: #D1FDD1; -} - -img { - border: 0; -} - -#navbar { - background-color: #738073; - border-bottom: 1px solid #5C665C; - border-top: 1px solid #5C665C; - margin-top: 12px; - padding: 0.3em; - position: relative; - text-align: center; -} - -#navbar a, #navbar_secondary a { - color: white; - padding: 0.3em; - text-decoration: none; -} - -#navbar a:hover, #navbar_secondary a:hover { - background-color: #313131; - color: white; - text-decoration: none; -} - -#navbar_secondary { - background-color: #738073; - border-bottom: 1px solid #5C665C; - border-left: 1px solid #5C665C; - border-right: 1px solid #5C665C; - padding: 0.3em; - position: relative; - text-align: center; -} - -p { - margin-left: 1em; - margin-right: 1em; -} - -pre { - margin-left: 3em; - margin-right: 3em; - padding: 0.3em; - border: 1px solid #bbb; - background-color: #f7f7f7; -} - -dl dt { - font-weight: bold; -} - -#proj_desc { - font-size: 1.2em; -} - -#repos { - margin-left: 1em; - margin-right: 1em; - border-collapse: collapse; - border: solid 1px #6A996A; -} - -#repos th { - background-color: #7BB37B; - border: solid 1px #6A996A; -} - -#repos td { - padding: 0.2em; - border: solid 1px #6A996A; -} diff --git a/bundle/ffmpeg/doc/demuxers.texi b/bundle/ffmpeg/doc/demuxers.texi deleted file mode 100644 index bfc0bdc6b1..0000000000 --- a/bundle/ffmpeg/doc/demuxers.texi +++ /dev/null @@ -1,375 +0,0 @@ -@chapter Demuxers -@c man begin DEMUXERS - -Demuxers are configured elements in FFmpeg that can read the -multimedia streams from a particular type of file. - -When you configure your FFmpeg build, all the supported demuxers -are enabled by default. You can list all available ones using the -configure option @code{--list-demuxers}. - -You can disable all the demuxers using the configure option -@code{--disable-demuxers}, and selectively enable a single demuxer with -the option @code{--enable-demuxer=@var{DEMUXER}}, or disable it -with the option @code{--disable-demuxer=@var{DEMUXER}}. - -The option @code{-formats} of the ff* tools will display the list of -enabled demuxers. - -The description of some of the currently available demuxers follows. - -@section applehttp - -Apple HTTP Live Streaming demuxer. - -This demuxer presents all AVStreams from all variant streams. -The id field is set to the bitrate variant index number. By setting -the discard flags on AVStreams (by pressing 'a' or 'v' in ffplay), -the caller can decide which variant streams to actually receive. -The total bitrate of the variant that the stream belongs to is -available in a metadata key named "variant_bitrate". - -@section asf - -Advanced Systems Format demuxer. - -This demuxer is used to demux ASF files and MMS network streams. - -@table @option -@item -no_resync_search @var{bool} -Do not try to resynchronize by looking for a certain optional start code. -@end table - -@anchor{concat} -@section concat - -Virtual concatenation script demuxer. - -This demuxer reads a list of files and other directives from a text file and -demuxes them one after the other, as if all their packet had been muxed -together. - -The timestamps in the files are adjusted so that the first file starts at 0 -and each next file starts where the previous one finishes. Note that it is -done globally and may cause gaps if all streams do not have exactly the same -length. - -All files must have the same streams (same codecs, same time base, etc.). - -The duration of each file is used to adjust the timestamps of the next file: -if the duration is incorrect (because it was computed using the bit-rate or -because the file is truncated, for example), it can cause artifacts. The -@code{duration} directive can be used to override the duration stored in -each file. - -@subsection Syntax - -The script is a text file in extended-ASCII, with one directive per line. -Empty lines, leading spaces and lines starting with '#' are ignored. The -following directive is recognized: - -@table @option - -@item @code{file @var{path}} -Path to a file to read; special characters and spaces must be escaped with -backslash or single quotes. - -All subsequent directives apply to that file. - -@item @code{ffconcat version 1.0} -Identify the script type and version. It also sets the @option{safe} option -to 1 if it was to its default -1. - -To make FFmpeg recognize the format automatically, this directive must -appears exactly as is (no extra space or byte-order-mark) on the very first -line of the script. - -@item @code{duration @var{dur}} -Duration of the file. This information can be specified from the file; -specifying it here may be more efficient or help if the information from the -file is not available or accurate. - -If the duration is set for all files, then it is possible to seek in the -whole concatenated video. - -@end table - -@subsection Options - -This demuxer accepts the following option: - -@table @option - -@item safe -If set to 1, reject unsafe file paths. A file path is considered safe if it -does not contain a protocol specification and is relative and all components -only contain characters from the portable character set (letters, digits, -period, underscore and hyphen) and have no period at the beginning of a -component. - -If set to 0, any file name is accepted. - -The default is -1, it is equivalent to 1 if the format was automatically -probed and 0 otherwise. - -@end table - -@section flv - -Adobe Flash Video Format demuxer. - -This demuxer is used to demux FLV files and RTMP network streams. - -@table @option -@item -flv_metadata @var{bool} -Allocate the streams according to the onMetaData array content. -@end table - -@section libgme - -The Game Music Emu library is a collection of video game music file emulators. - -See @url{http://code.google.com/p/game-music-emu/} for more information. - -Some files have multiple tracks. The demuxer will pick the first track by -default. The @option{track_index} option can be used to select a different -track. Track indexes start at 0. The demuxer exports the number of tracks as -@var{tracks} meta data entry. - -For very large files, the @option{max_size} option may have to be adjusted. - -@section libquvi - -Play media from Internet services using the quvi project. - -The demuxer accepts a @option{format} option to request a specific quality. It -is by default set to @var{best}. - -See @url{http://quvi.sourceforge.net/} for more information. - -FFmpeg needs to be built with @code{--enable-libquvi} for this demuxer to be -enabled. - -@section image2 - -Image file demuxer. - -This demuxer reads from a list of image files specified by a pattern. -The syntax and meaning of the pattern is specified by the -option @var{pattern_type}. - -The pattern may contain a suffix which is used to automatically -determine the format of the images contained in the files. - -The size, the pixel format, and the format of each image must be the -same for all the files in the sequence. - -This demuxer accepts the following options: -@table @option -@item framerate -Set the frame rate for the video stream. It defaults to 25. -@item loop -If set to 1, loop over the input. Default value is 0. -@item pattern_type -Select the pattern type used to interpret the provided filename. - -@var{pattern_type} accepts one of the following values. -@table @option -@item sequence -Select a sequence pattern type, used to specify a sequence of files -indexed by sequential numbers. - -A sequence pattern may contain the string "%d" or "%0@var{N}d", which -specifies the position of the characters representing a sequential -number in each filename matched by the pattern. If the form -"%d0@var{N}d" is used, the string representing the number in each -filename is 0-padded and @var{N} is the total number of 0-padded -digits representing the number. The literal character '%' can be -specified in the pattern with the string "%%". - -If the sequence pattern contains "%d" or "%0@var{N}d", the first filename of -the file list specified by the pattern must contain a number -inclusively contained between @var{start_number} and -@var{start_number}+@var{start_number_range}-1, and all the following -numbers must be sequential. - -For example the pattern "img-%03d.bmp" will match a sequence of -filenames of the form @file{img-001.bmp}, @file{img-002.bmp}, ..., -@file{img-010.bmp}, etc.; the pattern "i%%m%%g-%d.jpg" will match a -sequence of filenames of the form @file{i%m%g-1.jpg}, -@file{i%m%g-2.jpg}, ..., @file{i%m%g-10.jpg}, etc. - -Note that the pattern must not necessarily contain "%d" or -"%0@var{N}d", for example to convert a single image file -@file{img.jpeg} you can employ the command: -@example -ffmpeg -i img.jpeg img.png -@end example - -@item glob -Select a glob wildcard pattern type. - -The pattern is interpreted like a @code{glob()} pattern. This is only -selectable if libavformat was compiled with globbing support. - -@item glob_sequence @emph{(deprecated, will be removed)} -Select a mixed glob wildcard/sequence pattern. - -If your version of libavformat was compiled with globbing support, and -the provided pattern contains at least one glob meta character among -@code{%*?[]@{@}} that is preceded by an unescaped "%", the pattern is -interpreted like a @code{glob()} pattern, otherwise it is interpreted -like a sequence pattern. - -All glob special characters @code{%*?[]@{@}} must be prefixed -with "%". To escape a literal "%" you shall use "%%". - -For example the pattern @code{foo-%*.jpeg} will match all the -filenames prefixed by "foo-" and terminating with ".jpeg", and -@code{foo-%?%?%?.jpeg} will match all the filenames prefixed with -"foo-", followed by a sequence of three characters, and terminating -with ".jpeg". - -This pattern type is deprecated in favor of @var{glob} and -@var{sequence}. -@end table - -Default value is @var{glob_sequence}. -@item pixel_format -Set the pixel format of the images to read. If not specified the pixel -format is guessed from the first image file in the sequence. -@item start_number -Set the index of the file matched by the image file pattern to start -to read from. Default value is 0. -@item start_number_range -Set the index interval range to check when looking for the first image -file in the sequence, starting from @var{start_number}. Default value -is 5. -@item ts_from_file -If set to 1, will set frame timestamp to modification time of image file. Note -that monotonity of timestamps is not provided: images go in the same order as -without this option. Default value is 0. -@item video_size -Set the video size of the images to read. If not specified the video -size is guessed from the first image file in the sequence. -@end table - -@subsection Examples - -@itemize -@item -Use @command{ffmpeg} for creating a video from the images in the file -sequence @file{img-001.jpeg}, @file{img-002.jpeg}, ..., assuming an -input frame rate of 10 frames per second: -@example -ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv -@end example - -@item -As above, but start by reading from a file with index 100 in the sequence: -@example -ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv -@end example - -@item -Read images matching the "*.png" glob pattern , that is all the files -terminating with the ".png" suffix: -@example -ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv -@end example -@end itemize - -@section mpegts - -MPEG-2 transport stream demuxer. - -@table @option - -@item fix_teletext_pts -Overrides teletext packet PTS and DTS values with the timestamps calculated -from the PCR of the first program which the teletext stream is part of and is -not discarded. Default value is 1, set this option to 0 if you want your -teletext packet PTS and DTS values untouched. -@end table - -@section rawvideo - -Raw video demuxer. - -This demuxer allows to read raw video data. Since there is no header -specifying the assumed video parameters, the user must specify them -in order to be able to decode the data correctly. - -This demuxer accepts the following options: -@table @option - -@item framerate -Set input video frame rate. Default value is 25. - -@item pixel_format -Set the input video pixel format. Default value is @code{yuv420p}. - -@item video_size -Set the input video size. This value must be specified explicitly. -@end table - -For example to read a rawvideo file @file{input.raw} with -@command{ffplay}, assuming a pixel format of @code{rgb24}, a video -size of @code{320x240}, and a frame rate of 10 images per second, use -the command: -@example -ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw -@end example - -@section sbg - -SBaGen script demuxer. - -This demuxer reads the script language used by SBaGen -@url{http://uazu.net/sbagen/} to generate binaural beats sessions. A SBG -script looks like that: -@example --SE -a: 300-2.5/3 440+4.5/0 -b: 300-2.5/0 440+4.5/3 -off: - -NOW == a -+0:07:00 == b -+0:14:00 == a -+0:21:00 == b -+0:30:00 off -@end example - -A SBG script can mix absolute and relative timestamps. If the script uses -either only absolute timestamps (including the script start time) or only -relative ones, then its layout is fixed, and the conversion is -straightforward. On the other hand, if the script mixes both kind of -timestamps, then the @var{NOW} reference for relative timestamps will be -taken from the current time of day at the time the script is read, and the -script layout will be frozen according to that reference. That means that if -the script is directly played, the actual times will match the absolute -timestamps up to the sound controller's clock accuracy, but if the user -somehow pauses the playback or seeks, all times will be shifted accordingly. - -@section tedcaptions - -JSON captions used for @url{http://www.ted.com/, TED Talks}. - -TED does not provide links to the captions, but they can be guessed from the -page. The file @file{tools/bookmarklets.html} from the FFmpeg source tree -contains a bookmarklet to expose them. - -This demuxer accepts the following option: -@table @option -@item start_time -Set the start time of the TED talk, in milliseconds. The default is 15000 -(15s). It is used to sync the captions with the downloadable videos, because -they include a 15s intro. -@end table - -Example: convert the captions to a format most players understand: -@example -ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt -@end example - -@c man end DEMUXERS diff --git a/bundle/ffmpeg/doc/developer.texi b/bundle/ffmpeg/doc/developer.texi deleted file mode 100644 index 9c72c44907..0000000000 --- a/bundle/ffmpeg/doc/developer.texi +++ /dev/null @@ -1,797 +0,0 @@ -\input texinfo @c -*- texinfo -*- - -@settitle Developer Documentation -@titlepage -@center @titlefont{Developer Documentation} -@end titlepage - -@top - -@contents - -@chapter Developers Guide - -@section Notes for external developers - -This document is mostly useful for internal FFmpeg developers. -External developers who need to use the API in their application should -refer to the API doxygen documentation in the public headers, and -check the examples in @file{doc/examples} and in the source code to -see how the public API is employed. - -You can use the FFmpeg libraries in your commercial program, but you -are encouraged to @emph{publish any patch you make}. In this case the -best way to proceed is to send your patches to the ffmpeg-devel -mailing list following the guidelines illustrated in the remainder of -this document. - -For more detailed legal information about the use of FFmpeg in -external programs read the @file{LICENSE} file in the source tree and -consult @url{http://ffmpeg.org/legal.html}. - -@section Contributing - -There are 3 ways by which code gets into ffmpeg. -@itemize @bullet -@item Submitting Patches to the main developer mailing list - see @ref{Submitting patches} for details. -@item Directly committing changes to the main tree. -@item Committing changes to a git clone, for example on github.com or - gitorious.org. And asking us to merge these changes. -@end itemize - -Whichever way, changes should be reviewed by the maintainer of the code -before they are committed. And they should follow the @ref{Coding Rules}. -The developer making the commit and the author are responsible for their changes -and should try to fix issues their commit causes. - -@anchor{Coding Rules} -@section Coding Rules - -@subsection Code formatting conventions - -There are the following guidelines regarding the indentation in files: - -@itemize @bullet -@item -Indent size is 4. - -@item -The TAB character is forbidden outside of Makefiles as is any -form of trailing whitespace. Commits containing either will be -rejected by the git repository. - -@item -You should try to limit your code lines to 80 characters; however, do so if -and only if this improves readability. -@end itemize -The presentation is one inspired by 'indent -i4 -kr -nut'. - -The main priority in FFmpeg is simplicity and small code size in order to -minimize the bug count. - -@subsection Comments -Use the JavaDoc/Doxygen format (see examples below) so that code documentation -can be generated automatically. All nontrivial functions should have a comment -above them explaining what the function does, even if it is just one sentence. -All structures and their member variables should be documented, too. - -Avoid Qt-style and similar Doxygen syntax with @code{!} in it, i.e. replace -@code{//!} with @code{///} and similar. Also @@ syntax should be employed -for markup commands, i.e. use @code{@@param} and not @code{\param}. - -@example -/** - * @@file - * MPEG codec. - * @@author ... - */ - -/** - * Summary sentence. - * more text ... - * ... - */ -typedef struct Foobar@{ - int var1; /**< var1 description */ - int var2; ///< var2 description - /** var3 description */ - int var3; -@} Foobar; - -/** - * Summary sentence. - * more text ... - * ... - * @@param my_parameter description of my_parameter - * @@return return value description - */ -int myfunc(int my_parameter) -... -@end example - -@subsection C language features - -FFmpeg is programmed in the ISO C90 language with a few additional -features from ISO C99, namely: - -@itemize @bullet -@item -the @samp{inline} keyword; - -@item -@samp{//} comments; - -@item -designated struct initializers (@samp{struct s x = @{ .i = 17 @};}) - -@item -compound literals (@samp{x = (struct s) @{ 17, 23 @};}) -@end itemize - -These features are supported by all compilers we care about, so we will not -accept patches to remove their use unless they absolutely do not impair -clarity and performance. - -All code must compile with recent versions of GCC and a number of other -currently supported compilers. To ensure compatibility, please do not use -additional C99 features or GCC extensions. Especially watch out for: - -@itemize @bullet -@item -mixing statements and declarations; - -@item -@samp{long long} (use @samp{int64_t} instead); - -@item -@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar; - -@item -GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}). -@end itemize - -@subsection Naming conventions -All names should be composed with underscores (_), not CamelCase. For example, -@samp{avfilter_get_video_buffer} is an acceptable function name and -@samp{AVFilterGetVideo} is not. The exception from this are type names, like -for example structs and enums; they should always be in the CamelCase - -There are the following conventions for naming variables and functions: - -@itemize @bullet -@item -For local variables no prefix is required. - -@item -For file-scope variables and functions declared as @code{static}, no prefix -is required. - -@item -For variables and functions visible outside of file scope, but only used -internally by a library, an @code{ff_} prefix should be used, -e.g. @samp{ff_w64_demuxer}. - -@item -For variables and functions visible outside of file scope, used internally -across multiple libraries, use @code{avpriv_} as prefix, for example, -@samp{avpriv_aac_parse_header}. - -@item -Each library has its own prefix for public symbols, in addition to the -commonly used @code{av_} (@code{avformat_} for libavformat, -@code{avcodec_} for libavcodec, @code{swr_} for libswresample, etc). -Check the existing code and choose names accordingly. -Note that some symbols without these prefixes are also exported for -retro-compatibility reasons. These exceptions are declared in the -@code{lib/lib.v} files. -@end itemize - -Furthermore, name space reserved for the system should not be invaded. -Identifiers ending in @code{_t} are reserved by -@url{http://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html#tag_02_02_02, POSIX}. -Also avoid names starting with @code{__} or @code{_} followed by an uppercase -letter as they are reserved by the C standard. Names starting with @code{_} -are reserved at the file level and may not be used for externally visible -symbols. If in doubt, just avoid names starting with @code{_} altogether. - -@subsection Miscellaneous conventions - -@itemize @bullet -@item -fprintf and printf are forbidden in libavformat and libavcodec, -please use av_log() instead. - -@item -Casts should be used only when necessary. Unneeded parentheses -should also be avoided if they don't make the code easier to understand. -@end itemize - -@subsection Editor configuration -In order to configure Vim to follow FFmpeg formatting conventions, paste -the following snippet into your @file{.vimrc}: -@example -" indentation rules for FFmpeg: 4 spaces, no tabs -set expandtab -set shiftwidth=4 -set softtabstop=4 -set cindent -set cinoptions=(0 -" Allow tabs in Makefiles. -autocmd FileType make,automake set noexpandtab shiftwidth=8 softtabstop=8 -" Trailing whitespace and tabs are forbidden, so highlight them. -highlight ForbiddenWhitespace ctermbg=red guibg=red -match ForbiddenWhitespace /\s\+$\|\t/ -" Do not highlight spaces at the end of line while typing on that line. -autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@ 5 lines) chunk of code, -then either do NOT change the indentation of the inner part within (do not -move it to the right)! or do so in a separate commit - -@item -Always fill out the commit log message. Describe in a few lines what you -changed and why. You can refer to mailing list postings if you fix a -particular bug. Comments such as "fixed!" or "Changed it." are unacceptable. -Recommended format: -area changed: Short 1 line description - -details describing what and why and giving references. - -@item -Make sure the author of the commit is set correctly. (see git commit --author) -If you apply a patch, send an -answer to ffmpeg-devel (or wherever you got the patch from) saying that -you applied the patch. - -@item -When applying patches that have been discussed (at length) on the mailing -list, reference the thread in the log message. - -@item -Do NOT commit to code actively maintained by others without permission. -Send a patch to ffmpeg-devel instead. If no one answers within a reasonable -timeframe (12h for build failures and security fixes, 3 days small changes, -1 week for big patches) then commit your patch if you think it is OK. -Also note, the maintainer can simply ask for more time to review! - -@item -Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits -are sent there and reviewed by all the other developers. Bugs and possible -improvements or general questions regarding commits are discussed there. We -expect you to react if problems with your code are uncovered. - -@item -Update the documentation if you change behavior or add features. If you are -unsure how best to do this, send a patch to ffmpeg-devel, the documentation -maintainer(s) will review and commit your stuff. - -@item -Try to keep important discussions and requests (also) on the public -developer mailing list, so that all developers can benefit from them. - -@item -Never write to unallocated memory, never write over the end of arrays, -always check values read from some untrusted source before using them -as array index or other risky things. - -@item -Remember to check if you need to bump versions for the specific libav* -parts (libavutil, libavcodec, libavformat) you are changing. You need -to change the version integer. -Incrementing the first component means no backward compatibility to -previous versions (e.g. removal of a function from the public API). -Incrementing the second component means backward compatible change -(e.g. addition of a function to the public API or extension of an -existing data structure). -Incrementing the third component means a noteworthy binary compatible -change (e.g. encoder bug fix that matters for the decoder). The third -component always starts at 100 to distinguish FFmpeg from Libav. - -@item -Compiler warnings indicate potential bugs or code with bad style. If a type of -warning always points to correct and clean code, that warning should -be disabled, not the code changed. -Thus the remaining warnings can either be bugs or correct code. -If it is a bug, the bug has to be fixed. If it is not, the code should -be changed to not generate a warning unless that causes a slowdown -or obfuscates the code. - -@item -Make sure that no parts of the codebase that you maintain are missing from the -@file{MAINTAINERS} file. If something that you want to maintain is missing add it with -your name after it. -If at some point you no longer want to maintain some code, then please help -finding a new maintainer and also don't forget updating the @file{MAINTAINERS} file. -@end enumerate - -We think our rules are not too hard. If you have comments, contact us. - -@anchor{Submitting patches} -@section Submitting patches - -First, read the @ref{Coding Rules} above if you did not yet, in particular -the rules regarding patch submission. - -When you submit your patch, please use @code{git format-patch} or -@code{git send-email}. We cannot read other diffs :-) - -Also please do not submit a patch which contains several unrelated changes. -Split it into separate, self-contained pieces. This does not mean splitting -file by file. Instead, make the patch as small as possible while still -keeping it as a logical unit that contains an individual change, even -if it spans multiple files. This makes reviewing your patches much easier -for us and greatly increases your chances of getting your patch applied. - -Use the patcheck tool of FFmpeg to check your patch. -The tool is located in the tools directory. - -Run the @ref{Regression tests} before submitting a patch in order to verify -it does not cause unexpected problems. - -It also helps quite a bit if you tell us what the patch does (for example -'replaces lrint by lrintf'), and why (for example '*BSD isn't C99 compliant -and has no lrint()') - -Also please if you send several patches, send each patch as a separate mail, -do not attach several unrelated patches to the same mail. - -Patches should be posted to the -@uref{http://lists.ffmpeg.org/mailman/listinfo/ffmpeg-devel, ffmpeg-devel} -mailing list. Use @code{git send-email} when possible since it will properly -send patches without requiring extra care. If you cannot, then send patches -as base64-encoded attachments, so your patch is not trashed during -transmission. - -Your patch will be reviewed on the mailing list. You will likely be asked -to make some changes and are expected to send in an improved version that -incorporates the requests from the review. This process may go through -several iterations. Once your patch is deemed good enough, some developer -will pick it up and commit it to the official FFmpeg tree. - -Give us a few days to react. But if some time passes without reaction, -send a reminder by email. Your patch should eventually be dealt with. - - -@section New codecs or formats checklist - -@enumerate -@item -Did you use av_cold for codec initialization and close functions? - -@item -Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or -AVInputFormat/AVOutputFormat struct? - -@item -Did you bump the minor version number (and reset the micro version -number) in @file{libavcodec/version.h} or @file{libavformat/version.h}? - -@item -Did you register it in @file{allcodecs.c} or @file{allformats.c}? - -@item -Did you add the AVCodecID to @file{avcodec.h}? -When adding new codec IDs, also add an entry to the codec descriptor -list in @file{libavcodec/codec_desc.c}. - -@item -If it has a FourCC, did you add it to @file{libavformat/riff.c}, -even if it is only a decoder? - -@item -Did you add a rule to compile the appropriate files in the Makefile? -Remember to do this even if you're just adding a format to a file that is -already being compiled by some other rule, like a raw demuxer. - -@item -Did you add an entry to the table of supported formats or codecs in -@file{doc/general.texi}? - -@item -Did you add an entry in the Changelog? - -@item -If it depends on a parser or a library, did you add that dependency in -configure? - -@item -Did you @code{git add} the appropriate files before committing? - -@item -Did you make sure it compiles standalone, i.e. with -@code{configure --disable-everything --enable-decoder=foo} -(or @code{--enable-demuxer} or whatever your component is)? -@end enumerate - - -@section patch submission checklist - -@enumerate -@item -Does @code{make fate} pass with the patch applied? - -@item -Was the patch generated with git format-patch or send-email? - -@item -Did you sign off your patch? (git commit -s) -See @url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/SubmittingPatches} for the meaning -of sign off. - -@item -Did you provide a clear git commit log message? - -@item -Is the patch against latest FFmpeg git master branch? - -@item -Are you subscribed to ffmpeg-devel? -(the list is subscribers only due to spam) - -@item -Have you checked that the changes are minimal, so that the same cannot be -achieved with a smaller patch and/or simpler final code? - -@item -If the change is to speed critical code, did you benchmark it? - -@item -If you did any benchmarks, did you provide them in the mail? - -@item -Have you checked that the patch does not introduce buffer overflows or -other security issues? - -@item -Did you test your decoder or demuxer against damaged data? If no, see -tools/trasher, the noise bitstream filter, and -@uref{http://caca.zoy.org/wiki/zzuf, zzuf}. Your decoder or demuxer -should not crash, end in a (near) infinite loop, or allocate ridiculous -amounts of memory when fed damaged data. - -@item -Does the patch not mix functional and cosmetic changes? - -@item -Did you add tabs or trailing whitespace to the code? Both are forbidden. - -@item -Is the patch attached to the email you send? - -@item -Is the mime type of the patch correct? It should be text/x-diff or -text/x-patch or at least text/plain and not application/octet-stream. - -@item -If the patch fixes a bug, did you provide a verbose analysis of the bug? - -@item -If the patch fixes a bug, did you provide enough information, including -a sample, so the bug can be reproduced and the fix can be verified? -Note please do not attach samples >100k to mails but rather provide a -URL, you can upload to ftp://upload.ffmpeg.org - -@item -Did you provide a verbose summary about what the patch does change? - -@item -Did you provide a verbose explanation why it changes things like it does? - -@item -Did you provide a verbose summary of the user visible advantages and -disadvantages if the patch is applied? - -@item -Did you provide an example so we can verify the new feature added by the -patch easily? - -@item -If you added a new file, did you insert a license header? It should be -taken from FFmpeg, not randomly copied and pasted from somewhere else. - -@item -You should maintain alphabetical order in alphabetically ordered lists as -long as doing so does not break API/ABI compatibility. - -@item -Lines with similar content should be aligned vertically when doing so -improves readability. - -@item -Consider to add a regression test for your code. - -@item -If you added YASM code please check that things still work with --disable-yasm - -@item -Make sure you check the return values of function and return appropriate -error codes. Especially memory allocation functions like @code{av_malloc()} -are notoriously left unchecked, which is a serious problem. - -@item -Test your code with valgrind and or Address Sanitizer to ensure it's free -of leaks, out of array accesses, etc. -@end enumerate - -@section Patch review process - -All patches posted to ffmpeg-devel will be reviewed, unless they contain a -clear note that the patch is not for the git master branch. -Reviews and comments will be posted as replies to the patch on the -mailing list. The patch submitter then has to take care of every comment, -that can be by resubmitting a changed patch or by discussion. Resubmitted -patches will themselves be reviewed like any other patch. If at some point -a patch passes review with no comments then it is approved, that can for -simple and small patches happen immediately while large patches will generally -have to be changed and reviewed many times before they are approved. -After a patch is approved it will be committed to the repository. - -We will review all submitted patches, but sometimes we are quite busy so -especially for large patches this can take several weeks. - -If you feel that the review process is too slow and you are willing to try to -take over maintainership of the area of code you change then just clone -git master and maintain the area of code there. We will merge each area from -where its best maintained. - -When resubmitting patches, please do not make any significant changes -not related to the comments received during review. Such patches will -be rejected. Instead, submit significant changes or new features as -separate patches. - -@anchor{Regression tests} -@section Regression tests - -Before submitting a patch (or committing to the repository), you should at least -test that you did not break anything. - -Running 'make fate' accomplishes this, please see @url{fate.html} for details. - -[Of course, some patches may change the results of the regression tests. In -this case, the reference results of the regression tests shall be modified -accordingly]. - -@subsection Adding files to the fate-suite dataset - -When there is no muxer or encoder available to generate test media for a -specific test then the media has to be inlcuded in the fate-suite. -First please make sure that the sample file is as small as possible to test the -respective decoder or demuxer sufficiently. Large files increase network -bandwidth and disk space requirements. -Once you have a working fate test and fate sample, provide in the commit -message or introductionary message for the patch series that you post to -the ffmpeg-devel mailing list, a direct link to download the sample media. - - -@subsection Visualizing Test Coverage - -The FFmpeg build system allows visualizing the test coverage in an easy -manner with the coverage tools @code{gcov}/@code{lcov}. This involves -the following steps: - -@enumerate -@item - Configure to compile with instrumentation enabled: - @code{configure --toolchain=gcov}. - -@item - Run your test case, either manually or via FATE. This can be either - the full FATE regression suite, or any arbitrary invocation of any - front-end tool provided by FFmpeg, in any combination. - -@item - Run @code{make lcov} to generate coverage data in HTML format. - -@item - View @code{lcov/index.html} in your preferred HTML viewer. -@end enumerate - -You can use the command @code{make lcov-reset} to reset the coverage -measurements. You will need to rerun @code{make lcov} after running a -new test. - -@subsection Using Valgrind - -The configure script provides a shortcut for using valgrind to spot bugs -related to memory handling. Just add the option -@code{--toolchain=valgrind-memcheck} or @code{--toolchain=valgrind-massif} -to your configure line, and reasonable defaults will be set for running -FATE under the supervision of either the @strong{memcheck} or the -@strong{massif} tool of the valgrind suite. - -In case you need finer control over how valgrind is invoked, use the -@code{--target-exec='valgrind } option in -your configure line instead. - -@anchor{Release process} -@section Release process - -FFmpeg maintains a set of @strong{release branches}, which are the -recommended deliverable for system integrators and distributors (such as -Linux distributions, etc.). At regular times, a @strong{release -manager} prepares, tests and publishes tarballs on the -@url{http://ffmpeg.org} website. - -There are two kinds of releases: - -@enumerate -@item -@strong{Major releases} always include the latest and greatest -features and functionality. - -@item -@strong{Point releases} are cut from @strong{release} branches, -which are named @code{release/X}, with @code{X} being the release -version number. -@end enumerate - -Note that we promise to our users that shared libraries from any FFmpeg -release never break programs that have been @strong{compiled} against -previous versions of @strong{the same release series} in any case! - -However, from time to time, we do make API changes that require adaptations -in applications. Such changes are only allowed in (new) major releases and -require further steps such as bumping library version numbers and/or -adjustments to the symbol versioning file. Please discuss such changes -on the @strong{ffmpeg-devel} mailing list in time to allow forward planning. - -@anchor{Criteria for Point Releases} -@subsection Criteria for Point Releases - -Changes that match the following criteria are valid candidates for -inclusion into a point release: - -@enumerate -@item -Fixes a security issue, preferably identified by a @strong{CVE -number} issued by @url{http://cve.mitre.org/}. - -@item -Fixes a documented bug in @url{https://trac.ffmpeg.org}. - -@item -Improves the included documentation. - -@item -Retains both source code and binary compatibility with previous -point releases of the same release branch. -@end enumerate - -The order for checking the rules is (1 OR 2 OR 3) AND 4. - - -@subsection Release Checklist - -The release process involves the following steps: - -@enumerate -@item -Ensure that the @file{RELEASE} file contains the version number for -the upcoming release. - -@item -Add the release at @url{https://trac.ffmpeg.org/admin/ticket/versions}. - -@item -Announce the intent to do a release to the mailing list. - -@item -Make sure all relevant security fixes have been backported. See -@url{https://ffmpeg.org/security.html}. - -@item -Ensure that the FATE regression suite still passes in the release -branch on at least @strong{i386} and @strong{amd64} -(cf. @ref{Regression tests}). - -@item -Prepare the release tarballs in @code{bz2} and @code{gz} formats, and -supplementing files that contain @code{gpg} signatures - -@item -Publish the tarballs at @url{http://ffmpeg.org/releases}. Create and -push an annotated tag in the form @code{nX}, with @code{X} -containing the version number. - -@item -Propose and send a patch to the @strong{ffmpeg-devel} mailing list -with a news entry for the website. - -@item -Publish the news entry. - -@item -Send announcement to the mailing list. -@end enumerate - -@bye diff --git a/bundle/ffmpeg/doc/devices.texi b/bundle/ffmpeg/doc/devices.texi deleted file mode 100644 index 8f8b22a94b..0000000000 --- a/bundle/ffmpeg/doc/devices.texi +++ /dev/null @@ -1,21 +0,0 @@ -@chapter Device Options -@c man begin DEVICE OPTIONS - -The libavdevice library provides the same interface as -libavformat. Namely, an input device is considered like a demuxer, and -an output device like a muxer, and the interface and generic device -options are the same provided by libavformat (see the ffmpeg-formats -manual). - -In addition each input or output device may support so-called private -options, which are specific for that component. - -Options may be set by specifying -@var{option} @var{value} in the -FFmpeg tools, or by setting the value explicitly in the device -@code{AVFormatContext} options or using the @file{libavutil/opt.h} API -for programmatic use. - -@c man end DEVICE OPTIONS - -@include indevs.texi -@include outdevs.texi diff --git a/bundle/ffmpeg/doc/doxy-wrapper.sh b/bundle/ffmpeg/doc/doxy-wrapper.sh deleted file mode 100755 index 6650e38850..0000000000 --- a/bundle/ffmpeg/doc/doxy-wrapper.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -SRC_PATH="${1}" -DOXYFILE="${2}" - -shift 2 - -doxygen - < li > a { - display: block; -} -.tablist > li > a:hover { - text-decoration: none; - background-color: #eeeeee; -} -.tablist > .pull-right { - float: right; -} -.tablist-header { - display: block; - padding: 3px 15px; - font-size: 11px; - font-weight: bold; - line-height: 20px; - color: #999999; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-transform: uppercase; -} -.tablist li + .tablist-header { - margin-top: 9px; -} -.tablist-list { - padding-left: 15px; - padding-right: 15px; - margin-bottom: 0; -} -.tablist-list > li > a, -.tablist-list .tablist-header { - margin-left: -15px; - margin-right: -15px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); -} -.tablist-list > li > a { - padding: 3px 15px; -} -.tablist-list > .current > a, -.tablist-list > .current > a:hover { - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); - background-color: #0088cc; -} -.tablist-list [class^="icon-"] { - margin-right: 2px; -} -.tablist-list .divider { - *width: 100%; - height: 1px; - margin: 9px 1px; - *margin: -5px 0 5px; - overflow: hidden; - background-color: #e5e5e5; - border-bottom: 1px solid #ffffff; -} -.tablist-tabs, -.tablist { - *zoom: 1; -} -.tablist-tabs:before, -.tablist:before, -.tablist-tabs:after, -.tablist:after { - display: table; - content: ""; - line-height: 0; -} -.tablist-tabs:after, -.tablist:after { - clear: both; -} -.tablist-tabs > li, -.tablist > li { - float: left; -} -.tablist-tabs > li > a, -.tablist > li > a { - padding-right: 12px; - padding-left: 12px; - margin-right: 2px; - line-height: 14px; -} -.tablist-tabs { - border-bottom: 1px solid #ddd; -} -.tablist-tabs > li { - margin-bottom: -1px; -} -.tablist-tabs > li > a { - padding-top: 8px; - padding-bottom: 8px; - line-height: 20px; - border: 1px solid transparent; - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} -.tablist-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #dddddd; -} -.tablist-tabs > .current > a, -.tablist-tabs > .current > a:hover { - color: #555555; - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; -} -.tablist > li > a { - padding-top: 8px; - padding-bottom: 8px; - margin-top: 2px; - margin-bottom: 2px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; -} -.tablist > .current > a, -.tablist > .current > a:hover { - color: #ffffff; - background-color: #0088cc; -} -.tablist-stacked > li { - float: none; -} -.tablist-stacked > li > a { - margin-right: 0; -} -.tablist-tabs.tablist-stacked { - border-bottom: 0; -} -.tablist-tabs.tablist-stacked > li > a { - border: 1px solid #ddd; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -.tablist-tabs.tablist-stacked > li:first-child > a { - -webkit-border-top-right-radius: 4px; - -moz-border-radius-topright: 4px; - border-top-right-radius: 4px; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; - border-top-left-radius: 4px; -} -.tablist-tabs.tablist-stacked > li:last-child > a { - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-bottomright: 4px; - border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-bottomleft: 4px; - border-bottom-left-radius: 4px; -} -.tablist-tabs.tablist-stacked > li > a:hover { - border-color: #ddd; - z-index: 2; -} -.tablist.tablist-stacked > li > a { - margin-bottom: 3px; -} -.tablist.tablist-stacked > li:last-child > a { - margin-bottom: 1px; -} -.tablist-tabs .dropdown-menu { - -webkit-border-radius: 0 0 6px 6px; - -moz-border-radius: 0 0 6px 6px; - border-radius: 0 0 6px 6px; -} -.tablist .dropdown-menu { - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; -} -.tablist .dropdown-toggle .caret { - border-top-color: #0088cc; - border-bottom-color: #0088cc; - margin-top: 6px; -} -.tablist .dropdown-toggle:hover .caret { - border-top-color: #005580; - border-bottom-color: #005580; -} -/* move down carets for tabs */ -.tablist-tabs .dropdown-toggle .caret { - margin-top: 8px; -} -.tablist .current .dropdown-toggle .caret { - border-top-color: #fff; - border-bottom-color: #fff; -} -.tablist-tabs .current .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} -.tablist > .dropdown.current > a:hover { - cursor: pointer; -} -.tablist-tabs .open .dropdown-toggle, -.tablist .open .dropdown-toggle, -.tablist > li.dropdown.open.current > a:hover { - color: #ffffff; - background-color: #999999; - border-color: #999999; -} -.tablist li.dropdown.open .caret, -.tablist li.dropdown.open.current .caret, -.tablist li.dropdown.open a:hover .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; - opacity: 1; - filter: alpha(opacity=100); -} -.tabs-stacked .open > a:hover { - border-color: #999999; -} -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} -.tab-content > .current, -.pill-content > .current { - display: block; -} -.tabs-below > .tablist-tabs { - border-top: 1px solid #ddd; -} -.tabs-below > .tablist-tabs > li { - margin-top: -1px; - margin-bottom: 0; -} -.tabs-below > .tablist-tabs > li > a { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} -.tabs-below > .tablist-tabs > li > a:hover { - border-bottom-color: transparent; - border-top-color: #ddd; -} -.tabs-below > .tablist-tabs > .current > a, -.tabs-below > .tablist-tabs > .current > a:hover { - border-color: transparent #ddd #ddd #ddd; -} -.tabs-left > .tablist-tabs > li, -.tabs-right > .tablist-tabs > li { - float: none; -} -.tabs-left > .tablist-tabs > li > a, -.tabs-right > .tablist-tabs > li > a { - min-width: 74px; - margin-right: 0; - margin-bottom: 3px; -} -.tabs-left > .tablist-tabs { - float: left; - margin-right: 19px; - border-right: 1px solid #ddd; -} -.tabs-left > .tablist-tabs > li > a { - margin-right: -1px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} -.tabs-left > .tablist-tabs > li > a:hover { - border-color: #eeeeee #dddddd #eeeeee #eeeeee; -} -.tabs-left > .tablist-tabs .current > a, -.tabs-left > .tablist-tabs .current > a:hover { - border-color: #ddd transparent #ddd #ddd; - *border-right-color: #ffffff; -} -.tabs-right > .tablist-tabs { - float: right; - margin-left: 19px; - border-left: 1px solid #ddd; -} -.tabs-right > .tablist-tabs > li > a { - margin-left: -1px; - -webkit-border-radius: 0 4px 4px 0; - -moz-border-radius: 0 4px 4px 0; - border-radius: 0 4px 4px 0; -} -.tabs-right > .tablist-tabs > li > a:hover { - border-color: #eeeeee #eeeeee #eeeeee #dddddd; -} -.tabs-right > .tablist-tabs .current > a, -.tabs-right > .tablist-tabs .current > a:hover { - border-color: #ddd #ddd #ddd transparent; - *border-left-color: #ffffff; -} -.tablist > .disabled > a { - color: #999999; -} -.tablist > .disabled > a:hover { - text-decoration: none; - background-color: transparent; - cursor: default; -} -.tablistbar { - overflow: visible; - margin-bottom: 20px; - color: #ffffff; - *position: relative; - *z-index: 2; -} -.tablistbar-inner { - min-height: 40px; - padding-left: 20px; - padding-right: 20px; - background-color: #034c03; - background-image: -moz-linear-gradient(top, #024002, #045f04); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#024002), to(#045f04)); - background-image: -webkit-linear-gradient(top, #024002, #045f04); - background-image: -o-linear-gradient(top, #024002, #045f04); - background-image: linear-gradient(to bottom, #024002, #045f04); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff024002', endColorstr='#ff045f04', GradientType=0); - border: 1px solid #022402; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - *zoom: 1; -} -.tablistbar-inner:before, -.tablistbar-inner:after { - display: table; - content: ""; - line-height: 0; -} -.tablistbar-inner:after { - clear: both; -} -.tablistbar .container { - width: auto; -} -.tablist-collapse.collapse { - height: auto; -} -.tablistbar .brand { - float: left; - display: block; - padding: 10px 20px 10px; - margin-left: -20px; - font-size: 20px; - font-weight: 200; - color: #ffffff; - text-shadow: 0 1px 0 #024002; -} -.tablistbar .brand:hover { - text-decoration: none; -} -.tablistbar-text { - margin-bottom: 0; - line-height: 40px; -} -.tablistbar-link { - color: #ffffff; -} -.tablistbar-link:hover { - color: #333333; -} -.tablistbar .tablist { - position: relative; - left: 0; - display: block; - float: left; - margin: 0 10px 0 0; -} -.tablistbar .tablist.pull-right { - float: right; - margin-right: 0; -} -.tablistbar .tablist > li { - float: left; -} -.tablistbar .tablist > li > a { - float: none; - padding: 10px 15px 10px; - color: #ffffff; - text-decoration: none; - text-shadow: 0 1px 0 #024002; -} -.tablistbar .tablist .dropdown-toggle .caret { - margin-top: 8px; -} -.tablistbar .tablist > li > a:focus, -.tablistbar .tablist > li > a:hover { - background-color: transparent; - color: white; - text-decoration: none; -} -.tablistbar .tablist > .current > a, -.tablistbar .tablist > .current > a:hover, -.tablistbar .tablist > .current > a:focus { - color: #555555; - text-decoration: none; - background-color: #034703; - -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -} -.tablistbar .btn-navbar { - display: none; - float: right; - padding: 7px 10px; - margin-left: 5px; - margin-right: 5px; - color: #ffffff; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - background-color: #023402; - background-image: -moz-linear-gradient(top, #012701, #034703); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#012701), to(#034703)); - background-image: -webkit-linear-gradient(top, #012701, #034703); - background-image: -o-linear-gradient(top, #012701, #034703); - background-image: linear-gradient(to bottom, #012701, #034703); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff012701', endColorstr='#ff034703', GradientType=0); - border-color: #034703 #034703 #000000; - border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); - *background-color: #034703; - /* Darken IE7 buttons by default so they stand out more given they won't have borders */ - - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -} -.tablistbar .tablist > li > .dropdown-menu:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #ccc; - border-bottom-color: rgba(0, 0, 0, 0.2); - position: absolute; - top: -7px; - left: 9px; -} -.tablistbar .tablist > li > .dropdown-menu:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid #ffffff; - position: absolute; - top: -6px; - left: 10px; -} -.tablistbar .tablist li.dropdown.open > .dropdown-toggle, -.tablistbar .tablist li.dropdown.current > .dropdown-toggle, -.tablistbar .tablist li.dropdown.open.current > .dropdown-toggle { - background-color: #034703; - color: #555555; -} -.tablistbar .tablist li.dropdown > .dropdown-toggle .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} -.tablistbar .tablist li.dropdown.open > .dropdown-toggle .caret, -.tablistbar .tablist li.dropdown.current > .dropdown-toggle .caret, -.tablistbar .tablist li.dropdown.open.current > .dropdown-toggle .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} -.tablistbar .pull-right > li > .dropdown-menu, -.tablistbar .tablist > li > .dropdown-menu.pull-right { - left: auto; - right: 0; -} -.tablistbar .pull-right > li > .dropdown-menu:before, -.tablistbar .tablist > li > .dropdown-menu.pull-right:before { - left: auto; - right: 12px; -} -.tablistbar .pull-right > li > .dropdown-menu:after, -.tablistbar .tablist > li > .dropdown-menu.pull-right:after { - left: auto; - right: 13px; -} -.tablistbar .pull-right > li > .dropdown-menu .dropdown-menu, -.tablistbar .tablist > li > .dropdown-menu.pull-right .dropdown-menu { - left: auto; - right: 100%; - margin-left: 0; - margin-right: -1px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; -} -.breadcrumb { - padding: 8px 15px; - margin: 0 0 20px; - list-style: none; - background-color: #f5f5f5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.breadcrumb li { - display: inline-block; - *display: inline; - /* IE7 inline-block hack */ - - *zoom: 1; - text-shadow: 0 1px 0 #ffffff; -} -.breadcrumb .divider { - padding: 0 5px; - color: #ccc; -} -.breadcrumb .current { - color: #999999; -} -.pagination-right { - text-align: right; -} -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - -moz-transition: opacity 0.15s linear; - -o-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - -moz-transition: height 0.35s ease; - -o-transition: height 0.35s ease; - transition: height 0.35s ease; -} -.collapse.in { - height: auto; -} -.hidden { - display: none; - visibility: hidden; -} -.visible-phone { - display: none !important; -} -.visible-tablet { - display: none !important; -} -.hidden-desktop { - display: none !important; -} -.visible-desktop { - display: inherit !important; -} -@media (min-width: 768px) and (max-width: 979px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important ; - } - .visible-tablet { - display: inherit !important; - } - .hidden-tablet { - display: none !important; - } -} -@media (max-width: 767px) { - .hidden-desktop { - display: inherit !important; - } - .visible-desktop { - display: none !important; - } - .visible-phone { - display: inherit !important; - } - .hidden-phone { - display: none !important; - } -} -@media (max-width: 767px) { - body { - padding-left: 20px; - padding-right: 20px; - } - .container { - width: auto; - } - .row, - .thumbnails { - margin-left: 0; - } -} -@media (max-width: 480px) { - .tablist-collapse { - -webkit-transform: translate3d(0, 0, 0); - } - .page-header h1 small { - display: block; - line-height: 20px; - } -} -@media (min-width: 768px) and (max-width: 979px) { - .row { - margin-left: -20px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - line-height: 0; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 20px; - } - .container { - width: 724px; - } -} -@media (min-width: 1200px) { - .row { - margin-left: -30px; - *zoom: 1; - } - .row:before, - .row:after { - display: table; - content: ""; - line-height: 0; - } - .row:after { - clear: both; - } - [class*="span"] { - float: left; - min-height: 1px; - margin-left: 30px; - } - .container { - width: 1070px; - } -} -@media (max-width: 979px) { - body { - padding-top: 0; - } -} -@media (min-width: 980px) { - .tablist-collapse.collapse { - height: auto !important; - overflow: visible !important; - } -} -.tablistbar .brand { - padding: 5px; - margin-left: 0; -} -.tablistbar .brand img { - width: 30px; - vertical-align: middle; -} - -h1 small { - font-size: 18px; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.page-header small { - line-height: 0.8; - font-weight: normal; - color: #999999; - display:block; - vertical-align: middle; -} - -.page-header h1, h1:first-child { - font-size: 40px; - padding-bottom: 5px; -} - -.page-header h1 { - border-bottom: 1px solid #999999; - padding-bottom: 9px; -} - -.page-header img { - height: 80px; - padding-bottom: 5px; -} - -.page-header small { - line-height: 1.1; - font-size: 18px; -} - -h2, -h3, -h4, -div.ah, -.title { - border-color: #D6E9C6; - color: #468847; - border-style: solid; - border-width: 0 0 1px; - padding-left: 0.5em; -} - - -.google { - color: white; -} - -.breadcrumb { - font-size: 11px; - padding-top: 2px; - padding-bottom: 2px; -} - -h1 a, -h2 a, -h3 a, -h4 a { - color: inherit; -} - -.tablistbar-inner a { - font-weight: bold; -} - -.list-2panes:before, -.list-2panes:after { - display: table; - content: ""; - line-height: 0; -} - -.list-2panes:after { - clear:both; -} - -.list-2panes li { - width: 470px; - width: 470px; - float: left; - margin-left: 30px; - min-height: 1px; -} -/* The standard CSS for doxygen */ - -/* @group Heading Levels */ - - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd, p.starttd { - margin-top: 2px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.tablisttab{ - background-color: #EBF6EB; - border: 1px solid #A3D7A3; - text-align: center; -} - -div.qindex, div.tablistpath { - width: 100%; - line-height: 140%; -} - -div.tablisttab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D8C3D; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #46A246; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CD49C; - color: #ffffff; - border: 1px double #86CA86; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code { - color: #4665A2; -} - -a.codeRef { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -.fragment { - font-family: monospace, fixed; - font-size: 105%; -} - -pre.fragment { - border: 1px solid #C4E5C4; - background-color: #FBFDFB; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -div.contents { - margin-top: 10px; - margin-left: 8px; - margin-right: 8px; -} - -td.indexkey { - white-space: nowrap; - vertical-align: top; -} - - -tr.memlist { - background-color: #EEF7EE; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -#footer { - margin: -10px 1em 0; - padding-top: 20px; - text-align: center; - font-size: small; -} - -address.footer { - background-color: #ffffff; - text-align: center; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3D7A3; -} - -th.dirtab { - background: #EBF6EB; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4AAA4A; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FCF9; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4E5C4; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #46A246; - white-space: nowrap; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #46A246; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBF6EB; - border: 1px solid #A3D7A3; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; -} - -.memname { - white-space: nowrap; - font-weight: bold; - margin-left: 6px; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8D9A8; - border-left: 1px solid #A8D9A8; - border-right: 1px solid #A8D9A8; - padding: 6px 0px 6px 0px; - color: #255525; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 8px; - border-top-left-radius: 8px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2F2E2; - -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8D9A8; - border-left: 1px solid #A8D9A8; - border-right: 1px solid #A8D9A8; - padding: 2px 5px; - background-color: #FBFDFB; - border-top-width: 0; - /* opera specific markup */ - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7FBF7 95%, #EEF7EE); - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7FBF7), to(#EEF7EE)); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -.params, .retval, .exception, .tparams { - border-spacing: 6px 2px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - - - - -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ - -.ftvtree { - font-family: sans-serif; - margin: 0px; -} - -/* these are for tree view when used as main index */ - -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} - -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ - -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ - -.directory > h3 { - margin-top: 0; -} - -.directory p { - margin: 0px; - white-space: nowrap; -} - -.directory div { - display: none; - margin: 0px; -} - -.directory img { - vertical-align: -30%; -} - -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; -} - -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -.directory-alt > h3 { - margin-top: 0; -} - -.directory-alt p { - margin: 0px; - white-space: nowrap; -} - -.directory-alt div { - display: none; - margin: 0px; -} - -.directory-alt img { - vertical-align: -30%; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; -} - -address { - font-style: normal; - color: #2A612A; -} - -table.doxtable { - border-collapse:collapse; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D682D; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #377F37; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; -} - -table.fieldtable { - width: 100%; - margin-bottom: 10px; - border: 1px solid #A8D9A8; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8D9A8; - border-bottom: 1px solid #A8D9A8; - vertical-align: top; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8D9A8; - width: 100%; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2F2E2; - font-size: 90%; - color: #255525; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8D9A8; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.tablistpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - height:30px; - line-height:30px; - color:#8ACC8A; - border:solid 1px #C2E4C2; - overflow:hidden; - margin:0px; - padding:0px; -} - -.tablistpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#367C36; -} - -.tablistpath li.tablistelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; -} - -.tablistpath li.tablistelem a:hover -{ - color:#68BD68; -} - -.tablistpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#367C36; - font-size: 8pt; -} - - -div.summary -{ - margin-top: 12px; - text-align: center; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - margin-left: 5px; - font-size: 8pt; - padding-left: 5px; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.headertitle -{ - padding: 5px 5px 5px 7px; -} - -dl -{ - padding: 0 0 0 10px; -} - -dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug -{ - border-left:4px solid; - padding: 0 0 0 6px; -} - -dl.note -{ - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - border-color: #00D000; -} - -dl.deprecated -{ - border-color: #505050; -} - -dl.todo -{ - border-color: #00C0E0; -} - -dl.test -{ - border-color: #3030E0; -} - -dl.bug -{ - border-color: #C08050; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #53B453; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90CE90; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#337533; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } - pre.fragment - { - overflow: visible; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - } -} - -#proj_desc { - font-size: 1.2em; -} diff --git a/bundle/ffmpeg/doc/doxy/footer.html b/bundle/ffmpeg/doc/doxy/footer.html deleted file mode 100644 index 101e6fe70b..0000000000 --- a/bundle/ffmpeg/doc/doxy/footer.html +++ /dev/null @@ -1,9 +0,0 @@ - -
- - Generated on $datetime for $projectname by doxygen $doxygenversion - -
- - - diff --git a/bundle/ffmpeg/doc/doxy/header.html b/bundle/ffmpeg/doc/doxy/header.html deleted file mode 100644 index 312990cdbc..0000000000 --- a/bundle/ffmpeg/doc/doxy/header.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - -$projectname: $title -$title - - - - - -
- - -
\n"; -} - -$float = \&FFmpeg_float; - -sub FFmpeg_float($$$$) -{ - my $text = shift; - my $float = shift; - my $caption = shift; - my $shortcaption = shift; - - my $label = ''; - if (exists($float->{'id'})) - { - $label = &$anchor($float->{'id'}); - } - my $class = ''; - my $subject = ''; - - if ($caption =~ /NOTE/) - { - $class = "alert alert-info"; - } - elsif ($caption =~ /IMPORTANT/) - { - $class = "alert alert-warning"; - } - - return '
' . "$label\n" . $text . '
'; -} - -$print_page_head = \&FFmpeg_print_page_head; -sub FFmpeg_print_page_head($$) -{ - my $fh = shift; - my $longtitle = "$Texi2HTML::THISDOC{'fulltitle_no_texi'}"; - $longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'}; - my $description = $DOCUMENT_DESCRIPTION; - $description = $longtitle if (!defined($description)); - $description = "" if - ($description ne ''); - $description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'})); - my $encoding = ''; - $encoding = "" if (defined($ENCODING) and ($ENCODING ne '')); - $longtitle =~ s/Documentation.*//g; - $longtitle = "FFmpeg documentation : " . $longtitle; - - print $fh < - -$Texi2HTML::THISDOC{'copying'} - - -$longtitle - -$description - - -$encoding -$CSS_LINES -$TEMPLATE_HEADER -EOT -} - -# declare encoding in header -$IN_ENCODING = $ENCODING = "utf-8"; - -# no navigation elements -$SECTION_NAVIGATION = 0; -# the same for texi2html 5.0 -$HEADERS = 0; - -# TOC and Chapter headings link -$TOC_LINKS = 1; - -# print the TOC where @contents is used -$INLINE_CONTENTS = 1; diff --git a/bundle/ffmpeg/doc/tablegen.txt b/bundle/ffmpeg/doc/tablegen.txt deleted file mode 100644 index 4c4f036e6a..0000000000 --- a/bundle/ffmpeg/doc/tablegen.txt +++ /dev/null @@ -1,70 +0,0 @@ -Writing a table generator - -This documentation is preliminary. -Parts of the API are not good and should be changed. - -Basic concepts - -A table generator consists of two files, *_tablegen.c and *_tablegen.h. -The .h file will provide the variable declarations and initialization -code for the tables, the .c calls the initialization code and then prints -the tables as a header file using the tableprint.h helpers. -Both of these files will be compiled for the host system, so to avoid -breakage with cross-compilation neither of them may include, directly -or indirectly, config.h or avconfig.h. -This means that e.g. libavutil/mathematics.h is ok but libavutil/libm.h is not. -Due to this, the .c file or Makefile may have to provide additional defines -or stubs, though if possible this should be avoided. -In particular, CONFIG_HARDCODED_TABLES should always be defined to 0. - -The .c file - -This file should include the *_tablegen.h and tableprint.h files and -anything else it needs as long as it does not depend on config.h or -avconfig.h. -In addition to that it must contain a main() function which initializes -all tables by calling the init functions from the .h file and then prints -them. -The printing code typically looks like this: - write_fileheader(); - printf("static const uint8_t my_array[100] = {\n"); - write_uint8_t_array(my_array, 100); - printf("};\n"); - -This is the more generic form, in case you need to do something special. -Usually you should instead use the short form: - write_fileheader(); - WRITE_ARRAY("static const", uint8_t, my_array); - -write_fileheader() adds some minor things like a "this is a generated file" -comment and some standard includes. -tablegen.h defines some write functions for one- and two-dimensional arrays -for standard types - they print only the "core" parts so they are easier -to reuse for multi-dimensional arrays so the outermost {} must be printed -separately. -If there's no standard function for printing the type you need, the -WRITE_1D_FUNC_ARGV macro is a very quick way to create one. -See libavcodec/dv_tablegen.c for an example. - - -The .h file - -This file should contain: - - one or more initialization functions - - the table variable declarations -If CONFIG_HARDCODED_TABLES is set, the initialization functions should -not do anything, and instead of the variable declarations the -generated *_tables.h file should be included. -Since that will be generated in the build directory, the path must be -included, i.e. -#include "libavcodec/example_tables.h" -not -#include "example_tables.h" - -Makefile changes - -To make the automatic table creation work, you must manually declare the -new dependency. -For this add a line similar to this: -$(SUBDIR)example.o: $(SUBDIR)example_tables.h -under the "ifdef CONFIG_HARDCODED_TABLES" section in the Makefile. diff --git a/bundle/ffmpeg/doc/texi2pod.pl b/bundle/ffmpeg/doc/texi2pod.pl deleted file mode 100755 index 610f349afb..0000000000 --- a/bundle/ffmpeg/doc/texi2pod.pl +++ /dev/null @@ -1,453 +0,0 @@ -#! /usr/bin/perl - -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. - -# This file is part of GNU CC. - -# GNU CC 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. - -# GNU CC 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 GNU CC; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA - -# This does trivial (and I mean _trivial_) conversion of Texinfo -# markup to Perl POD format. It's intended to be used to extract -# something suitable for a manpage from a Texinfo document. - -use warnings; - -$output = 0; -$skipping = 0; -%chapters = (); -@chapters_sequence = (); -$chapter = ""; -@icstack = (); -@endwstack = (); -@skstack = (); -@instack = (); -$shift = ""; -%defs = (); -$fnno = 1; -$inf = ""; -@ibase = (); - -while ($_ = shift) { - if (/^-D(.*)$/) { - if ($1 ne "") { - $flag = $1; - } else { - $flag = shift; - } - $value = ""; - ($flag, $value) = ($flag =~ /^([^=]+)(?:=(.+))?/); - die "no flag specified for -D\n" - unless $flag ne ""; - die "flags may only contain letters, digits, hyphens, dashes and underscores\n" - unless $flag =~ /^[a-zA-Z0-9_-]+$/; - $defs{$flag} = $value; - } elsif (/^-I(.*)$/) { - push @ibase, $1 ne "" ? $1 : shift; - } elsif (/^-/) { - usage(); - } else { - $in = $_, next unless defined $in; - $out = $_, next unless defined $out; - usage(); - } -} - -push @ibase, "."; - -if (defined $in) { - $inf = gensym(); - open($inf, "<$in") or die "opening \"$in\": $!\n"; - push @ibase, $1 if $in =~ m|^(.+)/[^/]+$|; -} else { - $inf = \*STDIN; -} - -if (defined $out) { - open(STDOUT, ">$out") or die "opening \"$out\": $!\n"; -} - -while(defined $inf) { -INF: while(<$inf>) { - # Certain commands are discarded without further processing. - /^\@(?: - [a-z]+index # @*index: useful only in complete manual - |need # @need: useful only in printed manual - |(?:end\s+)?group # @group .. @end group: ditto - |page # @page: ditto - |node # @node: useful only in .info file - |(?:end\s+)?ifnottex # @ifnottex .. @end ifnottex: use contents - )\b/x and next; - - chomp; - - # Look for filename and title markers. - /^\@setfilename\s+([^.]+)/ and $fn = $1, next; - /^\@settitle\s+([^.]+)/ and $tl = postprocess($1), next; - - # Identify a man title but keep only the one we are interested in. - /^\@c\s+man\s+title\s+([A-Za-z0-9-]+)\s+(.+)/ and do { - if (exists $defs{$1}) { - $fn = $1; - $tl = postprocess($2); - } - next; - }; - - /^\@include\s+(.+)$/ and do { - push @instack, $inf; - $inf = gensym(); - - for (@ibase) { - open($inf, "<" . $_ . "/" . $1) and next INF; - } - die "cannot open $1: $!\n"; - }; - - /^\@chapter\s+([A-Za-z ]+)/ and do { - # close old chapter - $chapters{$chapter_name} .= postprocess($chapter) if ($chapter_name); - - # start new chapter - $chapter_name = $1, push (@chapters_sequence, $chapter_name) unless $skipping; - $chapters{$chapter_name} = "" unless exists $chapters{$chapter_name}; - $chapter = ""; - $output = 1; - next; - }; - - /^\@bye/ and do { - # close old chapter - $chapters{$chapter_name} .= postprocess($chapter) if ($chapter_name); - last INF; - }; - - # handle variables - /^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do { - $defs{$1} = $2; - next; - }; - /^\@clear\s+([a-zA-Z0-9_-]+)/ and do { - delete $defs{$1}; - next; - }; - - next unless $output; - - # Discard comments. (Can't do it above, because then we'd never see - # @c man lines.) - /^\@c\b/ and next; - - # End-block handler goes up here because it needs to operate even - # if we are skipping. - /^\@end\s+([a-z]+)/ and do { - # Ignore @end foo, where foo is not an operation which may - # cause us to skip, if we are presently skipping. - my $ended = $1; - next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex|ifhtml|ifnothtml)$/; - - die "\@end $ended without \@$ended at line $.\n" unless defined $endw; - die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw; - - $endw = pop @endwstack; - - if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex|ifhtml|ifnothtml)$/) { - $skipping = pop @skstack; - next; - } elsif ($ended =~ /^(?:example|smallexample|display)$/) { - $shift = ""; - $_ = ""; # need a paragraph break - } elsif ($ended =~ /^(?:itemize|enumerate|(?:multi|[fv])?table)$/) { - $_ = "\n=back\n"; - $ic = pop @icstack; - } else { - die "unknown command \@end $ended at line $.\n"; - } - }; - - # We must handle commands which can cause skipping even while we - # are skipping, otherwise we will not process nested conditionals - # correctly. - /^\@ifset\s+([a-zA-Z0-9_-]+)/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = "ifset"; - $skipping = 1 unless exists $defs{$1}; - next; - }; - - /^\@ifclear\s+([a-zA-Z0-9_-]+)/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = "ifclear"; - $skipping = 1 if exists $defs{$1}; - next; - }; - - /^\@(ignore|menu|iftex|ifhtml|ifnothtml)\b/ and do { - push @endwstack, $endw; - push @skstack, $skipping; - $endw = $1; - $skipping = $endw !~ /ifnothtml/; - next; - }; - - next if $skipping; - - # Character entities. First the ones that can be replaced by raw text - # or discarded outright: - s/\@copyright\{\}/(c)/g; - s/\@dots\{\}/.../g; - s/\@enddots\{\}/..../g; - s/\@([.!? ])/$1/g; - s/\@[:-]//g; - s/\@bullet(?:\{\})?/*/g; - s/\@TeX\{\}/TeX/g; - s/\@pounds\{\}/\#/g; - s/\@minus(?:\{\})?/-/g; - - # Now the ones that have to be replaced by special escapes - # (which will be turned back into text by unmunge()) - s/&/&/g; - s/\@\{/{/g; - s/\@\}/}/g; - s/\@\@/&at;/g; - - # Inside a verbatim block, handle @var specially. - if ($shift ne "") { - s/\@var\{([^\}]*)\}/<$1>/g; - } - - # POD doesn't interpret E<> inside a verbatim block. - if ($shift eq "") { - s//>/g; - } else { - s//>/g; - } - - # Single line command handlers. - - /^\@(?:section|unnumbered|unnumberedsec|center|heading)\s+(.+)$/ - and $_ = "\n=head2 $1\n"; - /^\@(?:subsection|subheading)\s+(.+)$/ - and $_ = "\n=head3 $1\n"; - /^\@(?:subsubsection|subsubheading)\s+(.+)$/ - and $_ = "\n=head4 $1\n"; - - # Block command handlers: - /^\@itemize\s*(\@[a-z]+|\*|-)?/ and do { - push @endwstack, $endw; - push @icstack, $ic; - $ic = $1 ? $1 : "*"; - $_ = "\n=over 4\n"; - $endw = "itemize"; - }; - - /^\@enumerate(?:\s+([a-zA-Z0-9]+))?/ and do { - push @endwstack, $endw; - push @icstack, $ic; - if (defined $1) { - $ic = $1 . "."; - } else { - $ic = "1."; - } - $_ = "\n=over 4\n"; - $endw = "enumerate"; - }; - - /^\@((?:multi|[fv])?table)\s+(\@[a-z]+)/ and do { - push @endwstack, $endw; - push @icstack, $ic; - $endw = $1; - $ic = $2; - $ic =~ s/\@(?:samp|strong|key|gcctabopt|option|env|command)/B/; - $ic =~ s/\@(?:code|kbd)/C/; - $ic =~ s/\@(?:dfn|var|emph|cite|i)/I/; - $ic =~ s/\@(?:file)/F/; - $ic =~ s/\@(?:columnfractions)//; - $_ = "\n=over 4\n"; - }; - - /^\@((?:small)?example|display)/ and do { - push @endwstack, $endw; - $endw = $1; - $shift = "\t"; - $_ = ""; # need a paragraph break - }; - - /^\@item\s+(.*\S)\s*$/ and $endw eq "multitable" and do { - my $columns = $1; - $columns =~ s/\@tab/ : /; - - $_ = "\n=item B<". $columns .">\n"; - }; - - /^\@tab\s+(.*\S)\s*$/ and $endw eq "multitable" and do { - my $columns = $1; - $columns =~ s/\@tab/ : /; - - $_ = " : ". $columns; - $chapter =~ s/\n+\s+$//; - }; - - /^\@itemx?\s*(.+)?$/ and do { - if (defined $1) { - # Entity escapes prevent munging by the <> processing below. - $_ = "\n=item $ic\<$1\>\n"; - } else { - $_ = "\n=item $ic\n"; - $ic =~ y/A-Ya-y/B-Zb-z/; - $ic =~ s/(\d+)/$1 + 1/eg; - } - }; - - $chapter .= $shift.$_."\n"; -} -# End of current file. -close($inf); -$inf = pop @instack; -} - -die "No filename or title\n" unless defined $fn && defined $tl; - -$chapters{NAME} = "$fn \- $tl\n"; -$chapters{FOOTNOTES} .= "=back\n" if exists $chapters{FOOTNOTES}; - -unshift @chapters_sequence, "NAME"; -for $chapter (@chapters_sequence) { - if (exists $chapters{$chapter}) { - $head = uc($chapter); - print "=head1 $head\n\n"; - print scalar unmunge ($chapters{$chapter}); - print "\n"; - } -} - -sub usage -{ - die "usage: $0 [-D toggle...] [infile [outfile]]\n"; -} - -sub postprocess -{ - local $_ = $_[0]; - - # @value{foo} is replaced by whatever 'foo' is defined as. - while (m/(\@value\{([a-zA-Z0-9_-]+)\})/g) { - if (! exists $defs{$2}) { - print STDERR "Option $2 not defined\n"; - s/\Q$1\E//; - } else { - $value = $defs{$2}; - s/\Q$1\E/$value/; - } - } - - # Formatting commands. - # Temporary escape for @r. - s/\@r\{([^\}]*)\}/R<$1>/g; - s/\@(?:dfn|var|emph|cite|i)\{([^\}]*)\}/I<$1>/g; - s/\@(?:code|kbd)\{([^\}]*)\}/C<$1>/g; - s/\@(?:gccoptlist|samp|strong|key|option|env|command|b)\{([^\}]*)\}/B<$1>/g; - s/\@sc\{([^\}]*)\}/\U$1/g; - s/\@file\{([^\}]*)\}/F<$1>/g; - s/\@w\{([^\}]*)\}/S<$1>/g; - s/\@(?:dmn|math)\{([^\}]*)\}/$1/g; - - # Cross references are thrown away, as are @noindent and @refill. - # (@noindent is impossible in .pod, and @refill is unnecessary.) - # @* is also impossible in .pod; we discard it and any newline that - # follows it. Similarly, our macro @gol must be discarded. - - s/\@anchor{(?:[^\}]*)\}//g; - s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g; - s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g; - s/;\s+\@pxref\{(?:[^\}]*)\}//g; - s/\@ref\{(?:[^,\}]*,)(?:[^,\}]*,)([^,\}]*).*\}/$1/g; - s/\@ref\{([^\}]*)\}/$1/g; - s/\@noindent\s*//g; - s/\@refill//g; - s/\@gol//g; - s/\@\*\s*\n?//g; - - # @uref can take one, two, or three arguments, with different - # semantics each time. @url and @email are just like @uref with - # one argument, for our purposes. - s/\@(?:uref|url|email)\{([^\},]*),?[^\}]*\}/<B<$1>>/g; - s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; - s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; - - # Turn B blah> into B I B to - # match Texinfo semantics of @emph inside @samp. Also handle @r - # inside bold. - s/<//g; - 1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B]*)I<([^>]+)>/B<$1>I<$2>B]*)B<([^>]+)>/I<$1>B<$2>I//g; - s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; - s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g; - - # Extract footnotes. This has to be done after all other - # processing because otherwise the regexp will choke on formatting - # inside @footnote. - while (/\@footnote/g) { - s/\@footnote\{([^\}]+)\}/[$fnno]/; - add_footnote($1, $fnno); - $fnno++; - } - - return $_; -} - -sub unmunge -{ - # Replace escaped symbols with their equivalents. - local $_ = $_[0]; - - s/</E/g; - s/>/E/g; - s/{/\{/g; - s/}/\}/g; - s/&at;/\@/g; - s/&/&/g; - return $_; -} - -sub add_footnote -{ - unless (exists $chapters{FOOTNOTES}) { - $chapters{FOOTNOTES} = "\n=over 4\n\n"; - } - - $chapters{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++; - $chapters{FOOTNOTES} .= $_[0]; - $chapters{FOOTNOTES} .= "\n\n"; -} - -# stolen from Symbol.pm -{ - my $genseq = 0; - sub gensym - { - my $name = "GEN" . $genseq++; - my $ref = \*{$name}; - delete $::{$name}; - return $ref; - } -} diff --git a/bundle/ffmpeg/doc/utils.texi b/bundle/ffmpeg/doc/utils.texi deleted file mode 100644 index 937713902a..0000000000 --- a/bundle/ffmpeg/doc/utils.texi +++ /dev/null @@ -1,1064 +0,0 @@ -@chapter Syntax -@c man begin SYNTAX - -This section documents the syntax and formats employed by the FFmpeg -libraries and tools. - -@anchor{quoting_and_escaping} -@section Quoting and escaping - -FFmpeg adopts the following quoting and escaping mechanism, unless -explicitly specified. The following rules are applied: - -@itemize -@item -@code{'} and @code{\} are special characters (respectively used for -quoting and escaping). In addition to them, there might be other -special characters depending on the specific syntax where the escaping -and quoting are employed. - -@item -A special character is escaped by prefixing it with a '\'. - -@item -All characters enclosed between '' are included literally in the -parsed string. The quote character @code{'} itself cannot be quoted, -so you may need to close the quote and escape it. - -@item -Leading and trailing whitespaces, unless escaped or quoted, are -removed from the parsed string. -@end itemize - -Note that you may need to add a second level of escaping when using -the command line or a script, which depends on the syntax of the -adopted shell language. - -The function @code{av_get_token} defined in -@file{libavutil/avstring.h} can be used to parse a token quoted or -escaped according to the rules defined above. - -The tool @file{tools/ffescape} in the FFmpeg source tree can be used -to automatically quote or escape a string in a script. - -@subsection Examples - -@itemize -@item -Escape the string @code{Crime d'Amour} containing the @code{'} special -character: -@example -Crime d\'Amour -@end example - -@item -The string above contains a quote, so the @code{'} needs to be escaped -when quoting it: -@example -'Crime d'\''Amour' -@end example - -@item -Include leading or trailing whitespaces using quoting: -@example -' this string starts and ends with whitespaces ' -@end example - -@item -Escaping and quoting can be mixed together: -@example -' The string '\'string\'' is a string ' -@end example - -@item -To include a literal @code{\} you can use either escaping or quoting: -@example -'c:\foo' can be written as c:\\foo -@end example -@end itemize - -@anchor{date syntax} -@section Date - -The accepted syntax is: -@example -[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z] -now -@end example - -If the value is "now" it takes the current time. - -Time is local time unless Z is appended, in which case it is -interpreted as UTC. -If the year-month-day part is not specified it takes the current -year-month-day. - -@anchor{time duration syntax} -@section Time duration - -There are two accepted syntaxes for expressing time duration. - -@example -[-][@var{HH}:]@var{MM}:@var{SS}[.@var{m}...] -@end example - -@var{HH} expresses the number of hours, @var{MM} the number of minutes -for a maximum of 2 digits, and @var{SS} the number of seconds for a -maximum of 2 digits. The @var{m} at the end expresses decimal value for -@var{SS}. - -@emph{or} - -@example -[-]@var{S}+[.@var{m}...] -@end example - -@var{S} expresses the number of seconds, with the optional decimal part -@var{m}. - -In both expressions, the optional @samp{-} indicates negative duration. - -@subsection Examples - -The following examples are all valid time duration: - -@table @samp -@item 55 -55 seconds - -@item 12:03:45 -12 hours, 03 minutes and 45 seconds - -@item 23.189 -23.189 seconds -@end table - -@anchor{video size syntax} -@section Video size -Specify the size of the sourced video, it may be a string of the form -@var{width}x@var{height}, or the name of a size abbreviation. - -The following abbreviations are recognized: -@table @samp -@item ntsc -720x480 -@item pal -720x576 -@item qntsc -352x240 -@item qpal -352x288 -@item sntsc -640x480 -@item spal -768x576 -@item film -352x240 -@item ntsc-film -352x240 -@item sqcif -128x96 -@item qcif -176x144 -@item cif -352x288 -@item 4cif -704x576 -@item 16cif -1408x1152 -@item qqvga -160x120 -@item qvga -320x240 -@item vga -640x480 -@item svga -800x600 -@item xga -1024x768 -@item uxga -1600x1200 -@item qxga -2048x1536 -@item sxga -1280x1024 -@item qsxga -2560x2048 -@item hsxga -5120x4096 -@item wvga -852x480 -@item wxga -1366x768 -@item wsxga -1600x1024 -@item wuxga -1920x1200 -@item woxga -2560x1600 -@item wqsxga -3200x2048 -@item wquxga -3840x2400 -@item whsxga -6400x4096 -@item whuxga -7680x4800 -@item cga -320x200 -@item ega -640x350 -@item hd480 -852x480 -@item hd720 -1280x720 -@item hd1080 -1920x1080 -@item 2k -2048x1080 -@item 2kflat -1998x1080 -@item 2kscope -2048x858 -@item 4k -4096x2160 -@item 4kflat -3996x2160 -@item 4kscope -4096x1716 -@item nhd -640x360 -@item hqvga -240x160 -@item wqvga -400x240 -@item fwqvga -432x240 -@item hvga -480x320 -@item qhd -960x540 -@end table - -@anchor{video rate syntax} -@section Video rate - -Specify the frame rate of a video, expressed as the number of frames -generated per second. It has to be a string in the format -@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float -number or a valid video frame rate abbreviation. - -The following abbreviations are recognized: -@table @samp -@item ntsc -30000/1001 -@item pal -25/1 -@item qntsc -30000/1001 -@item qpal -25/1 -@item sntsc -30000/1001 -@item spal -25/1 -@item film -24/1 -@item ntsc-film -24000/1001 -@end table - -@anchor{ratio syntax} -@section Ratio - -A ratio can be expressed as an expression, or in the form -@var{numerator}:@var{denominator}. - -Note that a ratio with infinite (1/0) or negative value is -considered valid, so you should check on the returned value if you -want to exclude those values. - -The undefined value can be expressed using the "0:0" string. - -@anchor{color syntax} -@section Color - -It can be the name of a color as defined below (case insensitive match) or a -@code{[0x|#]RRGGBB[AA]} sequence, possibly followed by @@ and a string -representing the alpha component. - -The alpha component may be a string composed by "0x" followed by an -hexadecimal number or a decimal number between 0.0 and 1.0, which -represents the opacity value (@samp{0x00} or @samp{0.0} means completely -transparent, @samp{0xff} or @samp{1.0} completely opaque). If the alpha -component is not specified then @samp{0xff} is assumed. - -The string @samp{random} will result in a random color. - -The following names of colors are recognized: -@table @samp -@item AliceBlue -0xF0F8FF -@item AntiqueWhite -0xFAEBD7 -@item Aqua -0x00FFFF -@item Aquamarine -0x7FFFD4 -@item Azure -0xF0FFFF -@item Beige -0xF5F5DC -@item Bisque -0xFFE4C4 -@item Black -0x000000 -@item BlanchedAlmond -0xFFEBCD -@item Blue -0x0000FF -@item BlueViolet -0x8A2BE2 -@item Brown -0xA52A2A -@item BurlyWood -0xDEB887 -@item CadetBlue -0x5F9EA0 -@item Chartreuse -0x7FFF00 -@item Chocolate -0xD2691E -@item Coral -0xFF7F50 -@item CornflowerBlue -0x6495ED -@item Cornsilk -0xFFF8DC -@item Crimson -0xDC143C -@item Cyan -0x00FFFF -@item DarkBlue -0x00008B -@item DarkCyan -0x008B8B -@item DarkGoldenRod -0xB8860B -@item DarkGray -0xA9A9A9 -@item DarkGreen -0x006400 -@item DarkKhaki -0xBDB76B -@item DarkMagenta -0x8B008B -@item DarkOliveGreen -0x556B2F -@item Darkorange -0xFF8C00 -@item DarkOrchid -0x9932CC -@item DarkRed -0x8B0000 -@item DarkSalmon -0xE9967A -@item DarkSeaGreen -0x8FBC8F -@item DarkSlateBlue -0x483D8B -@item DarkSlateGray -0x2F4F4F -@item DarkTurquoise -0x00CED1 -@item DarkViolet -0x9400D3 -@item DeepPink -0xFF1493 -@item DeepSkyBlue -0x00BFFF -@item DimGray -0x696969 -@item DodgerBlue -0x1E90FF -@item FireBrick -0xB22222 -@item FloralWhite -0xFFFAF0 -@item ForestGreen -0x228B22 -@item Fuchsia -0xFF00FF -@item Gainsboro -0xDCDCDC -@item GhostWhite -0xF8F8FF -@item Gold -0xFFD700 -@item GoldenRod -0xDAA520 -@item Gray -0x808080 -@item Green -0x008000 -@item GreenYellow -0xADFF2F -@item HoneyDew -0xF0FFF0 -@item HotPink -0xFF69B4 -@item IndianRed -0xCD5C5C -@item Indigo -0x4B0082 -@item Ivory -0xFFFFF0 -@item Khaki -0xF0E68C -@item Lavender -0xE6E6FA -@item LavenderBlush -0xFFF0F5 -@item LawnGreen -0x7CFC00 -@item LemonChiffon -0xFFFACD -@item LightBlue -0xADD8E6 -@item LightCoral -0xF08080 -@item LightCyan -0xE0FFFF -@item LightGoldenRodYellow -0xFAFAD2 -@item LightGreen -0x90EE90 -@item LightGrey -0xD3D3D3 -@item LightPink -0xFFB6C1 -@item LightSalmon -0xFFA07A -@item LightSeaGreen -0x20B2AA -@item LightSkyBlue -0x87CEFA -@item LightSlateGray -0x778899 -@item LightSteelBlue -0xB0C4DE -@item LightYellow -0xFFFFE0 -@item Lime -0x00FF00 -@item LimeGreen -0x32CD32 -@item Linen -0xFAF0E6 -@item Magenta -0xFF00FF -@item Maroon -0x800000 -@item MediumAquaMarine -0x66CDAA -@item MediumBlue -0x0000CD -@item MediumOrchid -0xBA55D3 -@item MediumPurple -0x9370D8 -@item MediumSeaGreen -0x3CB371 -@item MediumSlateBlue -0x7B68EE -@item MediumSpringGreen -0x00FA9A -@item MediumTurquoise -0x48D1CC -@item MediumVioletRed -0xC71585 -@item MidnightBlue -0x191970 -@item MintCream -0xF5FFFA -@item MistyRose -0xFFE4E1 -@item Moccasin -0xFFE4B5 -@item NavajoWhite -0xFFDEAD -@item Navy -0x000080 -@item OldLace -0xFDF5E6 -@item Olive -0x808000 -@item OliveDrab -0x6B8E23 -@item Orange -0xFFA500 -@item OrangeRed -0xFF4500 -@item Orchid -0xDA70D6 -@item PaleGoldenRod -0xEEE8AA -@item PaleGreen -0x98FB98 -@item PaleTurquoise -0xAFEEEE -@item PaleVioletRed -0xD87093 -@item PapayaWhip -0xFFEFD5 -@item PeachPuff -0xFFDAB9 -@item Peru -0xCD853F -@item Pink -0xFFC0CB -@item Plum -0xDDA0DD -@item PowderBlue -0xB0E0E6 -@item Purple -0x800080 -@item Red -0xFF0000 -@item RosyBrown -0xBC8F8F -@item RoyalBlue -0x4169E1 -@item SaddleBrown -0x8B4513 -@item Salmon -0xFA8072 -@item SandyBrown -0xF4A460 -@item SeaGreen -0x2E8B57 -@item SeaShell -0xFFF5EE -@item Sienna -0xA0522D -@item Silver -0xC0C0C0 -@item SkyBlue -0x87CEEB -@item SlateBlue -0x6A5ACD -@item SlateGray -0x708090 -@item Snow -0xFFFAFA -@item SpringGreen -0x00FF7F -@item SteelBlue -0x4682B4 -@item Tan -0xD2B48C -@item Teal -0x008080 -@item Thistle -0xD8BFD8 -@item Tomato -0xFF6347 -@item Turquoise -0x40E0D0 -@item Violet -0xEE82EE -@item Wheat -0xF5DEB3 -@item White -0xFFFFFF -@item WhiteSmoke -0xF5F5F5 -@item Yellow -0xFFFF00 -@item YellowGreen -0x9ACD32 -@end table - -@anchor{channel layout syntax} -@section Channel Layout - -A channel layout specifies the spatial disposition of the channels in -a multi-channel audio stream. To specify a channel layout, FFmpeg -makes use of a special syntax. - -Individual channels are identified by an id, as given by the table -below: -@table @samp -@item FL -front left -@item FR -front right -@item FC -front center -@item LFE -low frequency -@item BL -back left -@item BR -back right -@item FLC -front left-of-center -@item FRC -front right-of-center -@item BC -back center -@item SL -side left -@item SR -side right -@item TC -top center -@item TFL -top front left -@item TFC -top front center -@item TFR -top front right -@item TBL -top back left -@item TBC -top back center -@item TBR -top back right -@item DL -downmix left -@item DR -downmix right -@item WL -wide left -@item WR -wide right -@item SDL -surround direct left -@item SDR -surround direct right -@item LFE2 -low frequency 2 -@end table - -Standard channel layout compositions can be specified by using the -following identifiers: -@table @samp -@item mono -FC -@item stereo -FL+FR -@item 2.1 -FL+FR+LFE -@item 3.0 -FL+FR+FC -@item 3.0(back) -FL+FR+BC -@item 4.0 -FL+FR+FC+BC -@item quad -FL+FR+BL+BR -@item quad(side) -FL+FR+SL+SR -@item 3.1 -FL+FR+FC+LFE -@item 5.0 -FL+FR+FC+BL+BR -@item 5.0(side) -FL+FR+FC+SL+SR -@item 4.1 -FL+FR+FC+LFE+BC -@item 5.1 -FL+FR+FC+LFE+BL+BR -@item 5.1(side) -FL+FR+FC+LFE+SL+SR -@item 6.0 -FL+FR+FC+BC+SL+SR -@item 6.0(front) -FL+FR+FLC+FRC+SL+SR -@item hexagonal -FL+FR+FC+BL+BR+BC -@item 6.1 -FL+FR+FC+LFE+BC+SL+SR -@item 6.1 -FL+FR+FC+LFE+BL+BR+BC -@item 6.1(front) -FL+FR+LFE+FLC+FRC+SL+SR -@item 7.0 -FL+FR+FC+BL+BR+SL+SR -@item 7.0(front) -FL+FR+FC+FLC+FRC+SL+SR -@item 7.1 -FL+FR+FC+LFE+BL+BR+SL+SR -@item 7.1(wide) -FL+FR+FC+LFE+BL+BR+FLC+FRC -@item 7.1(wide-side) -FL+FR+FC+LFE+FLC+FRC+SL+SR -@item octagonal -FL+FR+FC+BL+BR+BC+SL+SR -@item downmix -DL+DR -@end table - -A custom channel layout can be specified as a sequence of terms, separated by -'+' or '|'. Each term can be: -@itemize -@item -the name of a standard channel layout (e.g. @samp{mono}, -@samp{stereo}, @samp{4.0}, @samp{quad}, @samp{5.0}, etc.) - -@item -the name of a single channel (e.g. @samp{FL}, @samp{FR}, @samp{FC}, @samp{LFE}, etc.) - -@item -a number of channels, in decimal, optionally followed by 'c', yielding -the default channel layout for that number of channels (see the -function @code{av_get_default_channel_layout}) - -@item -a channel layout mask, in hexadecimal starting with "0x" (see the -@code{AV_CH_*} macros in @file{libavutil/channel_layout.h}. -@end itemize - -Starting from libavutil version 53 the trailing character "c" to -specify a number of channels will be required, while a channel layout -mask could also be specified as a decimal number (if and only if not -followed by "c"). - -See also the function @code{av_get_channel_layout} defined in -@file{libavutil/channel_layout.h}. -@c man end SYNTAX - -@chapter Expression Evaluation -@c man begin EXPRESSION EVALUATION - -When evaluating an arithmetic expression, FFmpeg uses an internal -formula evaluator, implemented through the @file{libavutil/eval.h} -interface. - -An expression may contain unary, binary operators, constants, and -functions. - -Two expressions @var{expr1} and @var{expr2} can be combined to form -another expression "@var{expr1};@var{expr2}". -@var{expr1} and @var{expr2} are evaluated in turn, and the new -expression evaluates to the value of @var{expr2}. - -The following binary operators are available: @code{+}, @code{-}, -@code{*}, @code{/}, @code{^}. - -The following unary operators are available: @code{+}, @code{-}. - -The following functions are available: -@table @option -@item abs(x) -Compute absolute value of @var{x}. - -@item acos(x) -Compute arccosine of @var{x}. - -@item asin(x) -Compute arcsine of @var{x}. - -@item atan(x) -Compute arctangent of @var{x}. - -@item between(x, min, max) -Return 1 if @var{x} is greater than or equal to @var{min} and lesser than or -equal to @var{max}, 0 otherwise. - -@item bitand(x, y) -@item bitor(x, y) -Compute bitwise and/or operation on @var{x} and @var{y}. - -The results of the evaluation of @var{x} and @var{y} are converted to -integers before executing the bitwise operation. - -Note that both the conversion to integer and the conversion back to -floating point can lose precision. Beware of unexpected results for -large numbers (usually 2^53 and larger). - -@item ceil(expr) -Round the value of expression @var{expr} upwards to the nearest -integer. For example, "ceil(1.5)" is "2.0". - -@item cos(x) -Compute cosine of @var{x}. - -@item cosh(x) -Compute hyperbolic cosine of @var{x}. - -@item eq(x, y) -Return 1 if @var{x} and @var{y} are equivalent, 0 otherwise. - -@item exp(x) -Compute exponential of @var{x} (with base @code{e}, the Euler's number). - -@item floor(expr) -Round the value of expression @var{expr} downwards to the nearest -integer. For example, "floor(-1.5)" is "-2.0". - -@item gauss(x) -Compute Gauss function of @var{x}, corresponding to -@code{exp(-x*x/2) / sqrt(2*PI)}. - -@item gcd(x, y) -Return the greatest common divisor of @var{x} and @var{y}. If both @var{x} and -@var{y} are 0 or either or both are less than zero then behavior is undefined. - -@item gt(x, y) -Return 1 if @var{x} is greater than @var{y}, 0 otherwise. - -@item gte(x, y) -Return 1 if @var{x} is greater than or equal to @var{y}, 0 otherwise. - -@item hypot(x, y) -This function is similar to the C function with the same name; it returns -"sqrt(@var{x}*@var{x} + @var{y}*@var{y})", the length of the hypotenuse of a -right triangle with sides of length @var{x} and @var{y}, or the distance of the -point (@var{x}, @var{y}) from the origin. - -@item if(x, y) -Evaluate @var{x}, and if the result is non-zero return the result of -the evaluation of @var{y}, return 0 otherwise. - -@item if(x, y, z) -Evaluate @var{x}, and if the result is non-zero return the evaluation -result of @var{y}, otherwise the evaluation result of @var{z}. - -@item ifnot(x, y) -Evaluate @var{x}, and if the result is zero return the result of the -evaluation of @var{y}, return 0 otherwise. - -@item ifnot(x, y, z) -Evaluate @var{x}, and if the result is zero return the evaluation -result of @var{y}, otherwise the evaluation result of @var{z}. - -@item isinf(x) -Return 1.0 if @var{x} is +/-INFINITY, 0.0 otherwise. - -@item isnan(x) -Return 1.0 if @var{x} is NAN, 0.0 otherwise. - -@item ld(var) -Allow to load the value of the internal variable with number -@var{var}, which was previously stored with st(@var{var}, @var{expr}). -The function returns the loaded value. - -@item log(x) -Compute natural logarithm of @var{x}. - -@item lt(x, y) -Return 1 if @var{x} is lesser than @var{y}, 0 otherwise. - -@item lte(x, y) -Return 1 if @var{x} is lesser than or equal to @var{y}, 0 otherwise. - -@item max(x, y) -Return the maximum between @var{x} and @var{y}. - -@item min(x, y) -Return the maximum between @var{x} and @var{y}. - -@item mod(x, y) -Compute the remainder of division of @var{x} by @var{y}. - -@item not(expr) -Return 1.0 if @var{expr} is zero, 0.0 otherwise. - -@item pow(x, y) -Compute the power of @var{x} elevated @var{y}, it is equivalent to -"(@var{x})^(@var{y})". - -@item print(t) -@item print(t, l) -Print the value of expression @var{t} with loglevel @var{l}. If -@var{l} is not specified then a default log level is used. -Returns the value of the expression printed. - -Prints t with loglevel l - -@item random(x) -Return a pseudo random value between 0.0 and 1.0. @var{x} is the index of the -internal variable which will be used to save the seed/state. - -@item root(expr, max) -Find an input value for which the function represented by @var{expr} -with argument @var{ld(0)} is 0 in the interval 0..@var{max}. - -The expression in @var{expr} must denote a continuous function or the -result is undefined. - -@var{ld(0)} is used to represent the function input value, which means -that the given expression will be evaluated multiple times with -various input values that the expression can access through -@code{ld(0)}. When the expression evaluates to 0 then the -corresponding input value will be returned. - -@item sin(x) -Compute sine of @var{x}. - -@item sinh(x) -Compute hyperbolic sine of @var{x}. - -@item sqrt(expr) -Compute the square root of @var{expr}. This is equivalent to -"(@var{expr})^.5". - -@item squish(x) -Compute expression @code{1/(1 + exp(4*x))}. - -@item st(var, expr) -Allow to store the value of the expression @var{expr} in an internal -variable. @var{var} specifies the number of the variable where to -store the value, and it is a value ranging from 0 to 9. The function -returns the value stored in the internal variable. -Note, Variables are currently not shared between expressions. - -@item tan(x) -Compute tangent of @var{x}. - -@item tanh(x) -Compute hyperbolic tangent of @var{x}. - -@item taylor(expr, x) -@item taylor(expr, x, id) -Evaluate a Taylor series at @var{x}, given an expression representing -the @code{ld(id)}-th derivative of a function at 0. - -When the series does not converge the result is undefined. - -@var{ld(id)} is used to represent the derivative order in @var{expr}, -which means that the given expression will be evaluated multiple times -with various input values that the expression can access through -@code{ld(id)}. If @var{id} is not specified then 0 is assumed. - -Note, when you have the derivatives at y instead of 0, -@code{taylor(expr, x-y)} can be used. - -@item time(0) -Return the current (wallclock) time in seconds. - -@item trunc(expr) -Round the value of expression @var{expr} towards zero to the nearest -integer. For example, "trunc(-1.5)" is "-1.0". - -@item while(cond, expr) -Evaluate expression @var{expr} while the expression @var{cond} is -non-zero, and returns the value of the last @var{expr} evaluation, or -NAN if @var{cond} was always false. -@end table - -The following constants are available: -@table @option -@item PI -area of the unit disc, approximately 3.14 -@item E -exp(1) (Euler's number), approximately 2.718 -@item PHI -golden ratio (1+sqrt(5))/2, approximately 1.618 -@end table - -Assuming that an expression is considered "true" if it has a non-zero -value, note that: - -@code{*} works like AND - -@code{+} works like OR - -For example the construct: -@example -if (A AND B) then C -@end example -is equivalent to: -@example -if(A*B, C) -@end example - -In your C code, you can extend the list of unary and binary functions, -and define recognized constants, so that they are available for your -expressions. - -The evaluator also recognizes the International System unit prefixes. -If 'i' is appended after the prefix, binary prefixes are used, which -are based on powers of 1024 instead of powers of 1000. -The 'B' postfix multiplies the value by 8, and can be appended after a -unit prefix or used alone. This allows using for example 'KB', 'MiB', -'G' and 'B' as number postfix. - -The list of available International System prefixes follows, with -indication of the corresponding powers of 10 and of 2. -@table @option -@item y -10^-24 / 2^-80 -@item z -10^-21 / 2^-70 -@item a -10^-18 / 2^-60 -@item f -10^-15 / 2^-50 -@item p -10^-12 / 2^-40 -@item n -10^-9 / 2^-30 -@item u -10^-6 / 2^-20 -@item m -10^-3 / 2^-10 -@item c -10^-2 -@item d -10^-1 -@item h -10^2 -@item k -10^3 / 2^10 -@item K -10^3 / 2^10 -@item M -10^6 / 2^20 -@item G -10^9 / 2^30 -@item T -10^12 / 2^40 -@item P -10^15 / 2^40 -@item E -10^18 / 2^50 -@item Z -10^21 / 2^60 -@item Y -10^24 / 2^70 -@end table - -@c man end - -@chapter OpenCL Options -@c man begin OPENCL OPTIONS - -When FFmpeg is configured with @code{--enable-opencl}, it is possible -to set the options for the global OpenCL context. - -The list of supported options follows: - -@table @option -@item build_options -Set build options used to compile the registered kernels. - -See reference "OpenCL Specification Version: 1.2 chapter 5.6.4". - -@item platform_idx -Select the index of the platform to run OpenCL code. - -The specified index must be one of the indexes in the device list -which can be obtained with @code{av_opencl_get_device_list()}. - -@item device_idx -Select the index of the device used to run OpenCL code. - -The specifed index must be one of the indexes in the device list which -can be obtained with @code{av_opencl_get_device_list()}. - -@end table - -@c man end OPENCL OPTIONS diff --git a/bundle/ffmpeg/doc/viterbi.txt b/bundle/ffmpeg/doc/viterbi.txt deleted file mode 100644 index 97825462cc..0000000000 --- a/bundle/ffmpeg/doc/viterbi.txt +++ /dev/null @@ -1,109 +0,0 @@ -This is a quick description of the viterbi aka dynamic programing -algorthm. - -Its reason for existence is that wikipedia has become very poor on -describing algorithms in a way that makes it useable for understanding -them or anything else actually. It tends now to describe the very same -algorithm under 50 different names and pages with few understandable -by even people who fully understand the algorithm and the theory behind. - -Problem description: (that is what it can solve) -assume we have a 2d table, or you could call it a graph or matrix if you -prefer - - O O O O O O O - - O O O O O O O - - O O O O O O O - - O O O O O O O - - -That table has edges connecting points from each column to the next column -and each edge has a score like: (only some edge and scores shown to keep it -readable) - - - O--5--O-----O-----O-----O-----O - 2 / 7 / \ / \ / \ / - \ / \ / \ / \ / \ / - O7-/--O--/--O--/--O--/--O--/--O - \/ \/ 1/ \/ \/ \/ \/ \/ \/ \/ - /\ /\ 2\ /\ /\ /\ /\ /\ /\ /\ - O3-/--O--/--O--/--O--/--O--/--O - / \ / \ / \ / \ / \ - 1 \ 9 \ / \ / \ / \ - O--2--O--1--O--5--O--3--O--8--O - - - -Our goal is to find a path from left to right through it which -minimizes the sum of the score of all edges. -(and of course left/right is just a convention here it could be top down too) -Similarly the minimum could be the maximum by just fliping the sign, -Example of a path with scores: - - O O O O O O O - ->---O. O O .O-2-O O O - 5. .7 . - O O-1-O O O 8 O O - . - O O O O O O-1-O---> (sum here is 24) - - -The viterbi algorthm now solves this simply column by column -For the previous column each point has a best path and a associated -score: - - O-----5 O - \ - \ - O \ 1 O - \/ - /\ - O / 2 O - / - / - O-----2 O - - -To move one column forward we just need to find the best path and associated -scores for the next column -here are some edges we could choose from: - - - O-----5--3--O - \ \8 - \ \ - O \ 1--9--O - \/ \3 - /\ \ - O / 2--1--O - / \2 - / \ - O-----2--4--O - -Finding the new best paths and scores for each point of our new column is -trivial given we know the previous column best paths and scores: - - O-----0-----8 - \ - \ - O \ 0----10 - \/ - /\ - O / 0-----3 - / \ - / \ - O 0 4 - - -the viterbi algorthm continues exactly like this column for column until the -end and then just picks the path with the best score (above that would be the -one with score 3) - - -Author: Michael niedermayer -Copyright LGPL diff --git a/bundle/ffmpeg/ffmpeg.c b/bundle/ffmpeg/ffmpeg.c deleted file mode 100644 index dba608931d..0000000000 --- a/bundle/ffmpeg/ffmpeg.c +++ /dev/null @@ -1,3468 +0,0 @@ -/* - * Copyright (c) 2000-2003 Fabrice Bellard - * - * This file is part of FFmpeg. - * - * FFmpeg 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.1 of the License, or (at your option) any later version. - * - * FFmpeg 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 FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * multimedia converter based on the FFmpeg libraries - */ - -#include "config.h" -#include -#include -#include -#include -#include -#include -#if HAVE_ISATTY -#if HAVE_IO_H -#include -#endif -#if HAVE_UNISTD_H -#include -#endif -#endif -#include "libavformat/avformat.h" -#include "libavdevice/avdevice.h" -#include "libswscale/swscale.h" -#include "libswresample/swresample.h" -#include "libavutil/opt.h" -#include "libavutil/channel_layout.h" -#include "libavutil/parseutils.h" -#include "libavutil/samplefmt.h" -#include "libavutil/fifo.h" -#include "libavutil/intreadwrite.h" -#include "libavutil/dict.h" -#include "libavutil/mathematics.h" -#include "libavutil/pixdesc.h" -#include "libavutil/avstring.h" -#include "libavutil/libm.h" -#include "libavutil/imgutils.h" -#include "libavutil/timestamp.h" -#include "libavutil/bprint.h" -#include "libavutil/time.h" -#include "libavformat/os_support.h" - -#include "libavformat/ffm.h" // not public API - -# include "libavfilter/avcodec.h" -# include "libavfilter/avfilter.h" -# include "libavfilter/buffersrc.h" -# include "libavfilter/buffersink.h" - -#if HAVE_SYS_RESOURCE_H -#include -#include -#include -#elif HAVE_GETPROCESSTIMES -#include -#endif -#if HAVE_GETPROCESSMEMORYINFO -#include -#include -#endif - -#if HAVE_SYS_SELECT_H -#include -#endif - -#if HAVE_TERMIOS_H -#include -#include -#include -#include -#elif HAVE_KBHIT -#include -#endif - -#if HAVE_PTHREADS -#include -#endif - -#include - -#include "ffmpeg.h" -#include "cmdutils.h" - -#include "libavutil/avassert.h" - -const char program_name[] = "ffmpeg"; -const int program_birth_year = 2000; - -static FILE *vstats_file; - -const char *const forced_keyframes_const_names[] = { - "n", - "n_forced", - "prev_forced_n", - "prev_forced_t", - "t", - NULL -}; - -static void do_video_stats(OutputStream *ost, int frame_size); -static int64_t getutime(void); -static int64_t getmaxrss(void); - -static int run_as_daemon = 0; -static int64_t video_size = 0; -static int64_t audio_size = 0; -static int64_t subtitle_size = 0; -static int64_t extra_size = 0; -static int nb_frames_dup = 0; -static int nb_frames_drop = 0; -static int64_t decode_error_stat[2]; - -static int current_time; -AVIOContext *progress_avio = NULL; - -static uint8_t *subtitle_out; - -#if HAVE_PTHREADS -/* signal to input threads that they should exit; set by the main thread */ -static int transcoding_finished; -#endif - -#define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" - -InputStream **input_streams = NULL; -int nb_input_streams = 0; -InputFile **input_files = NULL; -int nb_input_files = 0; - -OutputStream **output_streams = NULL; -int nb_output_streams = 0; -OutputFile **output_files = NULL; -int nb_output_files = 0; - -FilterGraph **filtergraphs; -int nb_filtergraphs; - -#if HAVE_TERMIOS_H - -/* init terminal so that we can grab keys */ -static struct termios oldtty; -static int restore_tty; -#endif - -static void free_input_threads(void); - - -/* sub2video hack: - Convert subtitles to video with alpha to insert them in filter graphs. - This is a temporary solution until libavfilter gets real subtitles support. - */ - -static int sub2video_get_blank_frame(InputStream *ist) -{ - int ret; - AVFrame *frame = ist->sub2video.frame; - - av_frame_unref(frame); - ist->sub2video.frame->width = ist->sub2video.w; - ist->sub2video.frame->height = ist->sub2video.h; - ist->sub2video.frame->format = AV_PIX_FMT_RGB32; - if ((ret = av_frame_get_buffer(frame, 32)) < 0) - return ret; - memset(frame->data[0], 0, frame->height * frame->linesize[0]); - return 0; -} - -static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h, - AVSubtitleRect *r) -{ - uint32_t *pal, *dst2; - uint8_t *src, *src2; - int x, y; - - if (r->type != SUBTITLE_BITMAP) { - av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n"); - return; - } - if (r->x < 0 || r->x + r->w > w || r->y < 0 || r->y + r->h > h) { - av_log(NULL, AV_LOG_WARNING, "sub2video: rectangle overflowing\n"); - return; - } - - dst += r->y * dst_linesize + r->x * 4; - src = r->pict.data[0]; - pal = (uint32_t *)r->pict.data[1]; - for (y = 0; y < r->h; y++) { - dst2 = (uint32_t *)dst; - src2 = src; - for (x = 0; x < r->w; x++) - *(dst2++) = pal[*(src2++)]; - dst += dst_linesize; - src += r->pict.linesize[0]; - } -} - -static void sub2video_push_ref(InputStream *ist, int64_t pts) -{ - AVFrame *frame = ist->sub2video.frame; - int i; - - av_assert1(frame->data[0]); - ist->sub2video.last_pts = frame->pts = pts; - for (i = 0; i < ist->nb_filters; i++) - av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame, - AV_BUFFERSRC_FLAG_KEEP_REF | - AV_BUFFERSRC_FLAG_PUSH); -} - -static void sub2video_update(InputStream *ist, AVSubtitle *sub) -{ - int w = ist->sub2video.w, h = ist->sub2video.h; - AVFrame *frame = ist->sub2video.frame; - int8_t *dst; - int dst_linesize; - int num_rects, i; - int64_t pts, end_pts; - - if (!frame) - return; - if (sub) { - pts = av_rescale_q(sub->pts + sub->start_display_time * 1000, - AV_TIME_BASE_Q, ist->st->time_base); - end_pts = av_rescale_q(sub->pts + sub->end_display_time * 1000, - AV_TIME_BASE_Q, ist->st->time_base); - num_rects = sub->num_rects; - } else { - pts = ist->sub2video.end_pts; - end_pts = INT64_MAX; - num_rects = 0; - } - if (sub2video_get_blank_frame(ist) < 0) { - av_log(ist->st->codec, AV_LOG_ERROR, - "Impossible to get a blank canvas.\n"); - return; - } - dst = frame->data [0]; - dst_linesize = frame->linesize[0]; - for (i = 0; i < num_rects; i++) - sub2video_copy_rect(dst, dst_linesize, w, h, sub->rects[i]); - sub2video_push_ref(ist, pts); - ist->sub2video.end_pts = end_pts; -} - -static void sub2video_heartbeat(InputStream *ist, int64_t pts) -{ - InputFile *infile = input_files[ist->file_index]; - int i, j, nb_reqs; - int64_t pts2; - - /* When a frame is read from a file, examine all sub2video streams in - the same file and send the sub2video frame again. Otherwise, decoded - video frames could be accumulating in the filter graph while a filter - (possibly overlay) is desperately waiting for a subtitle frame. */ - for (i = 0; i < infile->nb_streams; i++) { - InputStream *ist2 = input_streams[infile->ist_index + i]; - if (!ist2->sub2video.frame) - continue; - /* subtitles seem to be usually muxed ahead of other streams; - if not, substracting a larger time here is necessary */ - pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base) - 1; - /* do not send the heartbeat frame if the subtitle is already ahead */ - if (pts2 <= ist2->sub2video.last_pts) - continue; - if (pts2 >= ist2->sub2video.end_pts || !ist2->sub2video.frame->data[0]) - sub2video_update(ist2, NULL); - for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++) - nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter); - if (nb_reqs) - sub2video_push_ref(ist2, pts2); - } -} - -static void sub2video_flush(InputStream *ist) -{ - int i; - - for (i = 0; i < ist->nb_filters; i++) - av_buffersrc_add_ref(ist->filters[i]->filter, NULL, 0); -} - -/* end of sub2video hack */ - -void term_exit(void) -{ - av_log(NULL, AV_LOG_QUIET, "%s", ""); -#if HAVE_TERMIOS_H - if(restore_tty) - tcsetattr (0, TCSANOW, &oldtty); -#endif -} - -static volatile int received_sigterm = 0; -static volatile int received_nb_signals = 0; - -static void -sigterm_handler(int sig) -{ - received_sigterm = sig; - received_nb_signals++; - term_exit(); - if(received_nb_signals > 3) - exit_program(123); -} - -void term_init(void) -{ -#if HAVE_TERMIOS_H - if(!run_as_daemon){ - struct termios tty; - int istty = 1; -#if HAVE_ISATTY - istty = isatty(0) && isatty(2); -#endif - if (istty && tcgetattr (0, &tty) == 0) { - oldtty = tty; - restore_tty = 1; - - tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP - |INLCR|IGNCR|ICRNL|IXON); - tty.c_oflag |= OPOST; - tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); - tty.c_cflag &= ~(CSIZE|PARENB); - tty.c_cflag |= CS8; - tty.c_cc[VMIN] = 1; - tty.c_cc[VTIME] = 0; - - tcsetattr (0, TCSANOW, &tty); - } - signal(SIGQUIT, sigterm_handler); /* Quit (POSIX). */ - } -#endif - avformat_network_deinit(); - - signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */ - signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */ -#ifdef SIGXCPU - signal(SIGXCPU, sigterm_handler); -#endif -} - -/* read a key without blocking */ -static int read_key(void) -{ - unsigned char ch; -#if HAVE_TERMIOS_H - int n = 1; - struct timeval tv; - fd_set rfds; - - FD_ZERO(&rfds); - FD_SET(0, &rfds); - tv.tv_sec = 0; - tv.tv_usec = 0; - n = select(1, &rfds, NULL, NULL, &tv); - if (n > 0) { - n = read(0, &ch, 1); - if (n == 1) - return ch; - - return n; - } -#elif HAVE_KBHIT -# if HAVE_PEEKNAMEDPIPE - static int is_pipe; - static HANDLE input_handle; - DWORD dw, nchars; - if(!input_handle){ - input_handle = GetStdHandle(STD_INPUT_HANDLE); - is_pipe = !GetConsoleMode(input_handle, &dw); - } - - if (stdin->_cnt > 0) { - read(0, &ch, 1); - return ch; - } - if (is_pipe) { - /* When running under a GUI, you will end here. */ - if (!PeekNamedPipe(input_handle, NULL, 0, NULL, &nchars, NULL)) { - // input pipe may have been closed by the program that ran ffmpeg - return -1; - } - //Read it - if(nchars != 0) { - read(0, &ch, 1); - return ch; - }else{ - return -1; - } - } -# endif - if(kbhit()) - return(getch()); -#endif - return -1; -} - -static int decode_interrupt_cb(void *ctx) -{ - return received_nb_signals > 1; -} - -const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }; - -static void ffmpeg_cleanup(int ret) -{ - int i, j; - - if (do_benchmark) { - int maxrss = getmaxrss() / 1024; - printf("bench: maxrss=%ikB\n", maxrss); - } - - for (i = 0; i < nb_filtergraphs; i++) { - avfilter_graph_free(&filtergraphs[i]->graph); - for (j = 0; j < filtergraphs[i]->nb_inputs; j++) { - av_freep(&filtergraphs[i]->inputs[j]->name); - av_freep(&filtergraphs[i]->inputs[j]); - } - av_freep(&filtergraphs[i]->inputs); - for (j = 0; j < filtergraphs[i]->nb_outputs; j++) { - av_freep(&filtergraphs[i]->outputs[j]->name); - av_freep(&filtergraphs[i]->outputs[j]); - } - av_freep(&filtergraphs[i]->outputs); - av_freep(&filtergraphs[i]->graph_desc); - av_freep(&filtergraphs[i]); - } - av_freep(&filtergraphs); - - av_freep(&subtitle_out); - - /* close files */ - for (i = 0; i < nb_output_files; i++) { - AVFormatContext *s = output_files[i]->ctx; - if (s && s->oformat && !(s->oformat->flags & AVFMT_NOFILE) && s->pb) - avio_close(s->pb); - avformat_free_context(s); - av_dict_free(&output_files[i]->opts); - av_freep(&output_files[i]); - } - for (i = 0; i < nb_output_streams; i++) { - AVBitStreamFilterContext *bsfc = output_streams[i]->bitstream_filters; - while (bsfc) { - AVBitStreamFilterContext *next = bsfc->next; - av_bitstream_filter_close(bsfc); - bsfc = next; - } - output_streams[i]->bitstream_filters = NULL; - avcodec_free_frame(&output_streams[i]->filtered_frame); - - av_freep(&output_streams[i]->forced_keyframes); - av_expr_free(output_streams[i]->forced_keyframes_pexpr); - av_freep(&output_streams[i]->avfilter); - av_freep(&output_streams[i]->logfile_prefix); - av_freep(&output_streams[i]); - } -#if HAVE_PTHREADS - free_input_threads(); -#endif - for (i = 0; i < nb_input_files; i++) { - avformat_close_input(&input_files[i]->ctx); - av_freep(&input_files[i]); - } - for (i = 0; i < nb_input_streams; i++) { - av_frame_free(&input_streams[i]->decoded_frame); - av_frame_free(&input_streams[i]->filter_frame); - av_dict_free(&input_streams[i]->opts); - avsubtitle_free(&input_streams[i]->prev_sub.subtitle); - av_frame_free(&input_streams[i]->sub2video.frame); - av_freep(&input_streams[i]->filters); - av_freep(&input_streams[i]); - } - - if (vstats_file) - fclose(vstats_file); - av_free(vstats_filename); - - av_freep(&input_streams); - av_freep(&input_files); - av_freep(&output_streams); - av_freep(&output_files); - - uninit_opts(); - - avformat_network_deinit(); - - if (received_sigterm) { - av_log(NULL, AV_LOG_INFO, "Received signal %d: terminating.\n", - (int) received_sigterm); - } - term_exit(); -} - -void assert_avoptions(AVDictionary *m) -{ - AVDictionaryEntry *t; - if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) { - av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key); - exit_program(1); - } -} - -static void abort_codec_experimental(AVCodec *c, int encoder) -{ - exit_program(1); -} - -static void update_benchmark(const char *fmt, ...) -{ - if (do_benchmark_all) { - int64_t t = getutime(); - va_list va; - char buf[1024]; - - if (fmt) { - va_start(va, fmt); - vsnprintf(buf, sizeof(buf), fmt, va); - va_end(va); - printf("bench: %8"PRIu64" %s \n", t - current_time, buf); - } - current_time = t; - } -} - -static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost) -{ - AVBitStreamFilterContext *bsfc = ost->bitstream_filters; - AVCodecContext *avctx = ost->st->codec; - int ret; - - if ((avctx->codec_type == AVMEDIA_TYPE_VIDEO && video_sync_method == VSYNC_DROP) || - (avctx->codec_type == AVMEDIA_TYPE_AUDIO && audio_sync_method < 0)) - pkt->pts = pkt->dts = AV_NOPTS_VALUE; - - /* - * Audio encoders may split the packets -- #frames in != #packets out. - * But there is no reordering, so we can limit the number of output packets - * by simply dropping them here. - * Counting encoded video frames needs to be done separately because of - * reordering, see do_video_out() - */ - if (!(avctx->codec_type == AVMEDIA_TYPE_VIDEO && avctx->codec)) { - if (ost->frame_number >= ost->max_frames) { - av_free_packet(pkt); - return; - } - ost->frame_number++; - } - - while (bsfc) { - AVPacket new_pkt = *pkt; - int a = av_bitstream_filter_filter(bsfc, avctx, NULL, - &new_pkt.data, &new_pkt.size, - pkt->data, pkt->size, - pkt->flags & AV_PKT_FLAG_KEY); - if(a == 0 && new_pkt.data != pkt->data && new_pkt.destruct) { - uint8_t *t = av_malloc(new_pkt.size + FF_INPUT_BUFFER_PADDING_SIZE); //the new should be a subset of the old so cannot overflow - if(t) { - memcpy(t, new_pkt.data, new_pkt.size); - memset(t + new_pkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE); - new_pkt.data = t; - new_pkt.buf = NULL; - a = 1; - } else - a = AVERROR(ENOMEM); - } - if (a > 0) { - av_free_packet(pkt); - new_pkt.buf = av_buffer_create(new_pkt.data, new_pkt.size, - av_buffer_default_free, NULL, 0); - if (!new_pkt.buf) - exit_program(1); - } else if (a < 0) { - av_log(NULL, AV_LOG_ERROR, "Failed to open bitstream filter %s for stream %d with codec %s", - bsfc->filter->name, pkt->stream_index, - avctx->codec ? avctx->codec->name : "copy"); - print_error("", a); - if (exit_on_error) - exit_program(1); - } - *pkt = new_pkt; - - bsfc = bsfc->next; - } - - if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS) && - (avctx->codec_type == AVMEDIA_TYPE_AUDIO || avctx->codec_type == AVMEDIA_TYPE_VIDEO) && - pkt->dts != AV_NOPTS_VALUE && - ost->last_mux_dts != AV_NOPTS_VALUE) { - int64_t max = ost->last_mux_dts + !(s->oformat->flags & AVFMT_TS_NONSTRICT); - if (pkt->dts < max) { - int loglevel = max - pkt->dts > 2 || avctx->codec_type == AVMEDIA_TYPE_VIDEO ? AV_LOG_WARNING : AV_LOG_DEBUG; - av_log(s, loglevel, "Non-monotonous DTS in output stream " - "%d:%d; previous: %"PRId64", current: %"PRId64"; ", - ost->file_index, ost->st->index, ost->last_mux_dts, pkt->dts); - if (exit_on_error) { - av_log(NULL, AV_LOG_FATAL, "aborting.\n"); - exit_program(1); - } - av_log(s, loglevel, "changing to %"PRId64". This may result " - "in incorrect timestamps in the output file.\n", - max); - if(pkt->pts >= pkt->dts) - pkt->pts = FFMAX(pkt->pts, max); - pkt->dts = max; - } - } - ost->last_mux_dts = pkt->dts; - - pkt->stream_index = ost->index; - - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "muxer <- type:%s " - "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s size:%d\n", - av_get_media_type_string(ost->st->codec->codec_type), - av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base), - av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base), - pkt->size - ); - } - - ret = av_interleaved_write_frame(s, pkt); - if (ret < 0) { - print_error("av_interleaved_write_frame()", ret); - exit_program(1); - } -} - -static void close_output_stream(OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - - ost->finished = 1; - if (of->shortest) { - int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, ost->st->codec->time_base, AV_TIME_BASE_Q); - of->recording_time = FFMIN(of->recording_time, end); - } -} - -static int check_recording_time(OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - - if (of->recording_time != INT64_MAX && - av_compare_ts(ost->sync_opts - ost->first_pts, ost->st->codec->time_base, of->recording_time, - AV_TIME_BASE_Q) >= 0) { - close_output_stream(ost); - return 0; - } - return 1; -} - -static void do_audio_out(AVFormatContext *s, OutputStream *ost, - AVFrame *frame) -{ - AVCodecContext *enc = ost->st->codec; - AVPacket pkt; - int got_packet = 0; - - av_init_packet(&pkt); - pkt.data = NULL; - pkt.size = 0; - - if (!check_recording_time(ost)) - return; - - if (frame->pts == AV_NOPTS_VALUE || audio_sync_method < 0) - frame->pts = ost->sync_opts; - ost->sync_opts = frame->pts + frame->nb_samples; - - av_assert0(pkt.size || !pkt.data); - update_benchmark(NULL); - if (avcodec_encode_audio2(enc, &pkt, frame, &got_packet) < 0) { - av_log(NULL, AV_LOG_FATAL, "Audio encoding failed (avcodec_encode_audio2)\n"); - exit_program(1); - } - update_benchmark("encode_audio %d.%d", ost->file_index, ost->index); - - if (got_packet) { - if (pkt.pts != AV_NOPTS_VALUE) - pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); - if (pkt.dts != AV_NOPTS_VALUE) - pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base); - if (pkt.duration > 0) - pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base); - - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "encoder -> type:audio " - "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n", - av_ts2str(pkt.pts), av_ts2timestr(pkt.pts, &ost->st->time_base), - av_ts2str(pkt.dts), av_ts2timestr(pkt.dts, &ost->st->time_base)); - } - - audio_size += pkt.size; - write_frame(s, &pkt, ost); - - av_free_packet(&pkt); - } -} - -static void do_subtitle_out(AVFormatContext *s, - OutputStream *ost, - InputStream *ist, - AVSubtitle *sub) -{ - int subtitle_out_max_size = 1024 * 1024; - int subtitle_out_size, nb, i; - AVCodecContext *enc; - AVPacket pkt; - int64_t pts; - - if (sub->pts == AV_NOPTS_VALUE) { - av_log(NULL, AV_LOG_ERROR, "Subtitle packets must have a pts\n"); - if (exit_on_error) - exit_program(1); - return; - } - - enc = ost->st->codec; - - if (!subtitle_out) { - subtitle_out = av_malloc(subtitle_out_max_size); - } - - /* Note: DVB subtitle need one packet to draw them and one other - packet to clear them */ - /* XXX: signal it in the codec context ? */ - if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) - nb = 2; - else - nb = 1; - - /* shift timestamp to honor -ss and make check_recording_time() work with -t */ - pts = sub->pts; - if (output_files[ost->file_index]->start_time != AV_NOPTS_VALUE) - pts -= output_files[ost->file_index]->start_time; - for (i = 0; i < nb; i++) { - ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base); - if (!check_recording_time(ost)) - return; - - sub->pts = pts; - // start_display_time is required to be 0 - sub->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q); - sub->end_display_time -= sub->start_display_time; - sub->start_display_time = 0; - if (i == 1) - sub->num_rects = 0; - subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out, - subtitle_out_max_size, sub); - if (subtitle_out_size < 0) { - av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed\n"); - exit_program(1); - } - - av_init_packet(&pkt); - pkt.data = subtitle_out; - pkt.size = subtitle_out_size; - pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base); - pkt.duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->st->time_base); - if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) { - /* XXX: the pts correction is handled here. Maybe handling - it in the codec would be better */ - if (i == 0) - pkt.pts += 90 * sub->start_display_time; - else - pkt.pts += 90 * sub->end_display_time; - } - subtitle_size += pkt.size; - write_frame(s, &pkt, ost); - } -} - -static void do_video_out(AVFormatContext *s, - OutputStream *ost, - AVFrame *in_picture) -{ - int ret, format_video_sync; - AVPacket pkt; - AVCodecContext *enc = ost->st->codec; - int nb_frames, i; - double sync_ipts, delta; - double duration = 0; - int frame_size = 0; - InputStream *ist = NULL; - - if (ost->source_index >= 0) - ist = input_streams[ost->source_index]; - - if(ist && ist->st->start_time != AV_NOPTS_VALUE && ist->st->first_dts != AV_NOPTS_VALUE && ost->frame_rate.num) - duration = 1/(av_q2d(ost->frame_rate) * av_q2d(enc->time_base)); - - sync_ipts = in_picture->pts; - delta = sync_ipts - ost->sync_opts + duration; - - /* by default, we output a single frame */ - nb_frames = 1; - - format_video_sync = video_sync_method; - if (format_video_sync == VSYNC_AUTO) { - format_video_sync = (s->oformat->flags & AVFMT_VARIABLE_FPS) ? ((s->oformat->flags & AVFMT_NOTIMESTAMPS) ? VSYNC_PASSTHROUGH : VSYNC_VFR) : VSYNC_CFR; - if ( ist - && format_video_sync == VSYNC_CFR - && input_files[ist->file_index]->ctx->nb_streams == 1 - && input_files[ist->file_index]->input_ts_offset == 0) { - format_video_sync = VSYNC_VSCFR; - } - if (format_video_sync == VSYNC_CFR && copy_ts) { - format_video_sync = VSYNC_VSCFR; - } - } - - switch (format_video_sync) { - case VSYNC_VSCFR: - if (ost->frame_number == 0 && delta - duration >= 0.5) { - av_log(NULL, AV_LOG_DEBUG, "Not duplicating %d initial frames\n", (int)lrintf(delta - duration)); - delta = duration; - ost->sync_opts = lrint(sync_ipts); - } - case VSYNC_CFR: - // FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c - if (delta < -1.1) - nb_frames = 0; - else if (delta > 1.1) - nb_frames = lrintf(delta); - break; - case VSYNC_VFR: - if (delta <= -0.6) - nb_frames = 0; - else if (delta > 0.6) - ost->sync_opts = lrint(sync_ipts); - break; - case VSYNC_DROP: - case VSYNC_PASSTHROUGH: - ost->sync_opts = lrint(sync_ipts); - break; - default: - av_assert0(0); - } - - nb_frames = FFMIN(nb_frames, ost->max_frames - ost->frame_number); - if (nb_frames == 0) { - nb_frames_drop++; - av_log(NULL, AV_LOG_VERBOSE, "*** drop!\n"); - return; - } else if (nb_frames > 1) { - if (nb_frames > dts_error_threshold * 30) { - av_log(NULL, AV_LOG_ERROR, "%d frame duplication too large, skipping\n", nb_frames - 1); - nb_frames_drop++; - return; - } - nb_frames_dup += nb_frames - 1; - av_log(NULL, AV_LOG_VERBOSE, "*** %d dup!\n", nb_frames - 1); - } - - /* duplicates frame if needed */ - for (i = 0; i < nb_frames; i++) { - av_init_packet(&pkt); - pkt.data = NULL; - pkt.size = 0; - - in_picture->pts = ost->sync_opts; - -#if 1 - if (!check_recording_time(ost)) -#else - if (ost->frame_number >= ost->max_frames) -#endif - return; - - if (s->oformat->flags & AVFMT_RAWPICTURE && - enc->codec->id == AV_CODEC_ID_RAWVIDEO) { - /* raw pictures are written as AVPicture structure to - avoid any copies. We support temporarily the older - method. */ - enc->coded_frame->interlaced_frame = in_picture->interlaced_frame; - enc->coded_frame->top_field_first = in_picture->top_field_first; - if (enc->coded_frame->interlaced_frame) - enc->field_order = enc->coded_frame->top_field_first ? AV_FIELD_TB:AV_FIELD_BT; - else - enc->field_order = AV_FIELD_PROGRESSIVE; - pkt.data = (uint8_t *)in_picture; - pkt.size = sizeof(AVPicture); - pkt.pts = av_rescale_q(in_picture->pts, enc->time_base, ost->st->time_base); - pkt.flags |= AV_PKT_FLAG_KEY; - - video_size += pkt.size; - write_frame(s, &pkt, ost); - } else { - int got_packet, forced_keyframe = 0; - double pts_time; - - if (ost->st->codec->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME) && - ost->top_field_first >= 0) - in_picture->top_field_first = !!ost->top_field_first; - - if (in_picture->interlaced_frame) { - if (enc->codec->id == AV_CODEC_ID_MJPEG) - enc->field_order = in_picture->top_field_first ? AV_FIELD_TT:AV_FIELD_BB; - else - enc->field_order = in_picture->top_field_first ? AV_FIELD_TB:AV_FIELD_BT; - } else - enc->field_order = AV_FIELD_PROGRESSIVE; - - in_picture->quality = ost->st->codec->global_quality; - if (!enc->me_threshold) - in_picture->pict_type = 0; - - pts_time = in_picture->pts != AV_NOPTS_VALUE ? - in_picture->pts * av_q2d(enc->time_base) : NAN; - if (ost->forced_kf_index < ost->forced_kf_count && - in_picture->pts >= ost->forced_kf_pts[ost->forced_kf_index]) { - ost->forced_kf_index++; - forced_keyframe = 1; - } else if (ost->forced_keyframes_pexpr) { - double res; - ost->forced_keyframes_expr_const_values[FKF_T] = pts_time; - res = av_expr_eval(ost->forced_keyframes_pexpr, - ost->forced_keyframes_expr_const_values, NULL); - av_dlog(NULL, "force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n", - ost->forced_keyframes_expr_const_values[FKF_N], - ost->forced_keyframes_expr_const_values[FKF_N_FORCED], - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N], - ost->forced_keyframes_expr_const_values[FKF_T], - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T], - res); - if (res) { - forced_keyframe = 1; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] = - ost->forced_keyframes_expr_const_values[FKF_N]; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T] = - ost->forced_keyframes_expr_const_values[FKF_T]; - ost->forced_keyframes_expr_const_values[FKF_N_FORCED] += 1; - } - - ost->forced_keyframes_expr_const_values[FKF_N] += 1; - } - if (forced_keyframe) { - in_picture->pict_type = AV_PICTURE_TYPE_I; - av_log(NULL, AV_LOG_DEBUG, "Forced keyframe at time %f\n", pts_time); - } - - update_benchmark(NULL); - ret = avcodec_encode_video2(enc, &pkt, in_picture, &got_packet); - update_benchmark("encode_video %d.%d", ost->file_index, ost->index); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, "Video encoding failed\n"); - exit_program(1); - } - - if (got_packet) { - if (pkt.pts == AV_NOPTS_VALUE && !(enc->codec->capabilities & CODEC_CAP_DELAY)) - pkt.pts = ost->sync_opts; - - if (pkt.pts != AV_NOPTS_VALUE) - pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); - if (pkt.dts != AV_NOPTS_VALUE) - pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base); - - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "encoder -> type:video " - "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s\n", - av_ts2str(pkt.pts), av_ts2timestr(pkt.pts, &ost->st->time_base), - av_ts2str(pkt.dts), av_ts2timestr(pkt.dts, &ost->st->time_base)); - } - - frame_size = pkt.size; - video_size += pkt.size; - write_frame(s, &pkt, ost); - av_free_packet(&pkt); - - /* if two pass, output log */ - if (ost->logfile && enc->stats_out) { - fprintf(ost->logfile, "%s", enc->stats_out); - } - } - } - ost->sync_opts++; - /* - * For video, number of frames in == number of packets out. - * But there may be reordering, so we can't throw away frames on encoder - * flush, we need to limit them here, before they go into encoder. - */ - ost->frame_number++; - - if (vstats_filename && frame_size) - do_video_stats(ost, frame_size); - } -} - -static double psnr(double d) -{ - return -10.0 * log(d) / log(10.0); -} - -static void do_video_stats(OutputStream *ost, int frame_size) -{ - AVCodecContext *enc; - int frame_number; - double ti1, bitrate, avg_bitrate; - - /* this is executed just the first time do_video_stats is called */ - if (!vstats_file) { - vstats_file = fopen(vstats_filename, "w"); - if (!vstats_file) { - perror("fopen"); - exit_program(1); - } - } - - enc = ost->st->codec; - if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { - frame_number = ost->st->nb_frames; - fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality / (float)FF_QP2LAMBDA); - if (enc->flags&CODEC_FLAG_PSNR) - fprintf(vstats_file, "PSNR= %6.2f ", psnr(enc->coded_frame->error[0] / (enc->width * enc->height * 255.0 * 255.0))); - - fprintf(vstats_file,"f_size= %6d ", frame_size); - /* compute pts value */ - ti1 = ost->st->pts.val * av_q2d(enc->time_base); - if (ti1 < 0.01) - ti1 = 0.01; - - bitrate = (frame_size * 8) / av_q2d(enc->time_base) / 1000.0; - avg_bitrate = (double)(video_size * 8) / ti1 / 1000.0; - fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ", - (double)video_size / 1024, ti1, bitrate, avg_bitrate); - fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(enc->coded_frame->pict_type)); - } -} - -/** - * Get and encode new output from any of the filtergraphs, without causing - * activity. - * - * @return 0 for success, <0 for severe errors - */ -static int reap_filters(void) -{ - AVFrame *filtered_frame = NULL; - int i; - int64_t frame_pts; - - /* Reap all buffers present in the buffer sinks */ - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - OutputFile *of = output_files[ost->file_index]; - int ret = 0; - - if (!ost->filter) - continue; - - if (!ost->filtered_frame && !(ost->filtered_frame = avcodec_alloc_frame())) { - return AVERROR(ENOMEM); - } else - avcodec_get_frame_defaults(ost->filtered_frame); - filtered_frame = ost->filtered_frame; - - while (1) { - ret = av_buffersink_get_frame_flags(ost->filter->filter, filtered_frame, - AV_BUFFERSINK_FLAG_NO_REQUEST); - if (ret < 0) { - if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) { - av_log(NULL, AV_LOG_WARNING, - "Error in av_buffersink_get_frame_flags(): %s\n", av_err2str(ret)); - } - break; - } - frame_pts = AV_NOPTS_VALUE; - if (filtered_frame->pts != AV_NOPTS_VALUE) { - int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; - filtered_frame->pts = frame_pts = av_rescale_q(filtered_frame->pts, - ost->filter->filter->inputs[0]->time_base, - ost->st->codec->time_base) - - av_rescale_q(start_time, - AV_TIME_BASE_Q, - ost->st->codec->time_base); - } - //if (ost->source_index >= 0) - // *filtered_frame= *input_streams[ost->source_index]->decoded_frame; //for me_threshold - - - switch (ost->filter->filter->inputs[0]->type) { - case AVMEDIA_TYPE_VIDEO: - filtered_frame->pts = frame_pts; - if (!ost->frame_aspect_ratio.num) - ost->st->codec->sample_aspect_ratio = filtered_frame->sample_aspect_ratio; - - do_video_out(of->ctx, ost, filtered_frame); - break; - case AVMEDIA_TYPE_AUDIO: - filtered_frame->pts = frame_pts; - if (!(ost->st->codec->codec->capabilities & CODEC_CAP_PARAM_CHANGE) && - ost->st->codec->channels != av_frame_get_channels(filtered_frame)) { - av_log(NULL, AV_LOG_ERROR, - "Audio filter graph output is not normalized and encoder does not support parameter changes\n"); - break; - } - do_audio_out(of->ctx, ost, filtered_frame); - break; - default: - // TODO support subtitle filters - av_assert0(0); - } - - av_frame_unref(filtered_frame); - } - } - - return 0; -} - -static void print_report(int is_last_report, int64_t timer_start, int64_t cur_time) -{ - char buf[1024]; - AVBPrint buf_script; - OutputStream *ost; - AVFormatContext *oc; - int64_t total_size; - AVCodecContext *enc; - int frame_number, vid, i; - double bitrate; - int64_t pts = INT64_MIN; - static int64_t last_time = -1; - static int qp_histogram[52]; - int hours, mins, secs, us; - - if (!print_stats && !is_last_report && !progress_avio) - return; - - if (!is_last_report) { - if (last_time == -1) { - last_time = cur_time; - return; - } - if ((cur_time - last_time) < 500000) - return; - last_time = cur_time; - } - - - oc = output_files[0]->ctx; - - total_size = avio_size(oc->pb); - if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too - total_size = avio_tell(oc->pb); - - buf[0] = '\0'; - vid = 0; - av_bprint_init(&buf_script, 0, 1); - for (i = 0; i < nb_output_streams; i++) { - float q = -1; - ost = output_streams[i]; - enc = ost->st->codec; - if (!ost->stream_copy && enc->coded_frame) - q = enc->coded_frame->quality / (float)FF_QP2LAMBDA; - if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", q); - av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", - ost->file_index, ost->index, q); - } - if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { - float fps, t = (cur_time-timer_start) / 1000000.0; - - frame_number = ost->frame_number; - fps = t > 1 ? frame_number / t : 0; - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "frame=%5d fps=%3.*f q=%3.1f ", - frame_number, fps < 9.95, fps, q); - av_bprintf(&buf_script, "frame=%d\n", frame_number); - av_bprintf(&buf_script, "fps=%.1f\n", fps); - av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", - ost->file_index, ost->index, q); - if (is_last_report) - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "L"); - if (qp_hist) { - int j; - int qp = lrintf(q); - if (qp >= 0 && qp < FF_ARRAY_ELEMS(qp_histogram)) - qp_histogram[qp]++; - for (j = 0; j < 32; j++) - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%X", (int)lrintf(log2(qp_histogram[j] + 1))); - } - if ((enc->flags&CODEC_FLAG_PSNR) && (enc->coded_frame || is_last_report)) { - int j; - double error, error_sum = 0; - double scale, scale_sum = 0; - double p; - char type[3] = { 'Y','U','V' }; - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "PSNR="); - for (j = 0; j < 3; j++) { - if (is_last_report) { - error = enc->error[j]; - scale = enc->width * enc->height * 255.0 * 255.0 * frame_number; - } else { - error = enc->coded_frame->error[j]; - scale = enc->width * enc->height * 255.0 * 255.0; - } - if (j) - scale /= 4; - error_sum += error; - scale_sum += scale; - p = psnr(error / scale); - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%c:%2.2f ", type[j], p); - av_bprintf(&buf_script, "stream_%d_%d_psnr_%c=%2.2f\n", - ost->file_index, ost->index, type[j] | 32, p); - } - p = psnr(error_sum / scale_sum); - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "*:%2.2f ", psnr(error_sum / scale_sum)); - av_bprintf(&buf_script, "stream_%d_%d_psnr_all=%2.2f\n", - ost->file_index, ost->index, p); - } - vid = 1; - } - /* compute min output value */ - if ((is_last_report || !ost->finished) && ost->st->pts.val != AV_NOPTS_VALUE) - pts = FFMAX(pts, av_rescale_q(ost->st->pts.val, - ost->st->time_base, AV_TIME_BASE_Q)); - } - - secs = pts / AV_TIME_BASE; - us = pts % AV_TIME_BASE; - mins = secs / 60; - secs %= 60; - hours = mins / 60; - mins %= 60; - - bitrate = pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1; - - if (total_size < 0) snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "size=N/A time="); - else snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "size=%8.0fkB time=", total_size / 1024.0); - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "%02d:%02d:%02d.%02d ", hours, mins, secs, - (100 * us) / AV_TIME_BASE); - if (bitrate < 0) snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "bitrate=N/A"); - else snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - "bitrate=%6.1fkbits/s", bitrate); - if (total_size < 0) av_bprintf(&buf_script, "total_size=N/A\n"); - else av_bprintf(&buf_script, "total_size=%"PRId64"\n", total_size); - av_bprintf(&buf_script, "out_time_ms=%"PRId64"\n", pts); - av_bprintf(&buf_script, "out_time=%02d:%02d:%02d.%06d\n", - hours, mins, secs, us); - - if (nb_frames_dup || nb_frames_drop) - snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " dup=%d drop=%d", - nb_frames_dup, nb_frames_drop); - av_bprintf(&buf_script, "dup_frames=%d\n", nb_frames_dup); - av_bprintf(&buf_script, "drop_frames=%d\n", nb_frames_drop); - - if (print_stats || is_last_report) { - if (print_stats==1 && AV_LOG_INFO > av_log_get_level()) { - fprintf(stderr, "%s \r", buf); - } else - av_log(NULL, AV_LOG_INFO, "%s \r", buf); - - fflush(stderr); - } - - if (progress_avio) { - av_bprintf(&buf_script, "progress=%s\n", - is_last_report ? "end" : "continue"); - avio_write(progress_avio, buf_script.str, - FFMIN(buf_script.len, buf_script.size - 1)); - avio_flush(progress_avio); - av_bprint_finalize(&buf_script, NULL); - if (is_last_report) { - avio_close(progress_avio); - progress_avio = NULL; - } - } - - if (is_last_report) { - int64_t raw= audio_size + video_size + subtitle_size + extra_size; - av_log(NULL, AV_LOG_INFO, "\n"); - av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB subtitle:%1.0f global headers:%1.0fkB muxing overhead %f%%\n", - video_size / 1024.0, - audio_size / 1024.0, - subtitle_size / 1024.0, - extra_size / 1024.0, - 100.0 * (total_size - raw) / raw - ); - if(video_size + audio_size + subtitle_size + extra_size == 0){ - av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)\n"); - } - } -} - -static void flush_encoders(void) -{ - int i, ret; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - AVCodecContext *enc = ost->st->codec; - AVFormatContext *os = output_files[ost->file_index]->ctx; - int stop_encoding = 0; - - if (!ost->encoding_needed) - continue; - - if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1) - continue; - if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == AV_CODEC_ID_RAWVIDEO) - continue; - - for (;;) { - int (*encode)(AVCodecContext*, AVPacket*, const AVFrame*, int*) = NULL; - const char *desc; - int64_t *size; - - switch (ost->st->codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - encode = avcodec_encode_audio2; - desc = "Audio"; - size = &audio_size; - break; - case AVMEDIA_TYPE_VIDEO: - encode = avcodec_encode_video2; - desc = "Video"; - size = &video_size; - break; - default: - stop_encoding = 1; - } - - if (encode) { - AVPacket pkt; - int got_packet; - av_init_packet(&pkt); - pkt.data = NULL; - pkt.size = 0; - - update_benchmark(NULL); - ret = encode(enc, &pkt, NULL, &got_packet); - update_benchmark("flush %s %d.%d", desc, ost->file_index, ost->index); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, "%s encoding failed\n", desc); - exit_program(1); - } - *size += pkt.size; - if (ost->logfile && enc->stats_out) { - fprintf(ost->logfile, "%s", enc->stats_out); - } - if (!got_packet) { - stop_encoding = 1; - break; - } - if (pkt.pts != AV_NOPTS_VALUE) - pkt.pts = av_rescale_q(pkt.pts, enc->time_base, ost->st->time_base); - if (pkt.dts != AV_NOPTS_VALUE) - pkt.dts = av_rescale_q(pkt.dts, enc->time_base, ost->st->time_base); - if (pkt.duration > 0) - pkt.duration = av_rescale_q(pkt.duration, enc->time_base, ost->st->time_base); - write_frame(os, &pkt, ost); - if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && vstats_filename) { - do_video_stats(ost, pkt.size); - } - } - - if (stop_encoding) - break; - } - } -} - -/* - * Check whether a packet from ist should be written into ost at this time - */ -static int check_output_constraints(InputStream *ist, OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - int ist_index = input_files[ist->file_index]->ist_index + ist->st->index; - - if (ost->source_index != ist_index) - return 0; - - if (of->start_time != AV_NOPTS_VALUE && ist->pts < of->start_time) - return 0; - - return 1; -} - -static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt) -{ - OutputFile *of = output_files[ost->file_index]; - InputFile *f = input_files [ist->file_index]; - int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; - int64_t ost_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ost->st->time_base); - int64_t ist_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ist->st->time_base); - AVPicture pict; - AVPacket opkt; - - av_init_packet(&opkt); - - if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) && - !ost->copy_initial_nonkeyframes) - return; - - if (pkt->pts == AV_NOPTS_VALUE) { - if (!ost->frame_number && ist->pts < start_time && - !ost->copy_prior_start) - return; - } else { - if (!ost->frame_number && pkt->pts < ist_tb_start_time && - !ost->copy_prior_start) - return; - } - - if (of->recording_time != INT64_MAX && - ist->pts >= of->recording_time + start_time) { - close_output_stream(ost); - return; - } - - if (f->recording_time != INT64_MAX) { - start_time = f->ctx->start_time; - if (f->start_time != AV_NOPTS_VALUE) - start_time += f->start_time; - if (ist->pts >= f->recording_time + start_time) { - close_output_stream(ost); - return; - } - } - - /* force the input stream PTS */ - if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) - audio_size += pkt->size; - else if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { - video_size += pkt->size; - ost->sync_opts++; - } else if (ost->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) { - subtitle_size += pkt->size; - } - - if (pkt->pts != AV_NOPTS_VALUE) - opkt.pts = av_rescale_q(pkt->pts, ist->st->time_base, ost->st->time_base) - ost_tb_start_time; - else - opkt.pts = AV_NOPTS_VALUE; - - if (pkt->dts == AV_NOPTS_VALUE) - opkt.dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ost->st->time_base); - else - opkt.dts = av_rescale_q(pkt->dts, ist->st->time_base, ost->st->time_base); - opkt.dts -= ost_tb_start_time; - - if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && pkt->dts != AV_NOPTS_VALUE) { - int duration = av_get_audio_frame_duration(ist->st->codec, pkt->size); - if(!duration) - duration = ist->st->codec->frame_size; - opkt.dts = opkt.pts = av_rescale_delta(ist->st->time_base, pkt->dts, - (AVRational){1, ist->st->codec->sample_rate}, duration, &ist->filter_in_rescale_delta_last, - ost->st->time_base) - ost_tb_start_time; - } - - opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->st->time_base); - opkt.flags = pkt->flags; - - // FIXME remove the following 2 lines they shall be replaced by the bitstream filters - if ( ost->st->codec->codec_id != AV_CODEC_ID_H264 - && ost->st->codec->codec_id != AV_CODEC_ID_MPEG1VIDEO - && ost->st->codec->codec_id != AV_CODEC_ID_MPEG2VIDEO - && ost->st->codec->codec_id != AV_CODEC_ID_VC1 - ) { - if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY)) { - opkt.buf = av_buffer_create(opkt.data, opkt.size, av_buffer_default_free, NULL, 0); - if (!opkt.buf) - exit_program(1); - } - } else { - opkt.data = pkt->data; - opkt.size = pkt->size; - } - - if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (of->ctx->oformat->flags & AVFMT_RAWPICTURE)) { - /* store AVPicture in AVPacket, as expected by the output format */ - avpicture_fill(&pict, opkt.data, ost->st->codec->pix_fmt, ost->st->codec->width, ost->st->codec->height); - opkt.data = (uint8_t *)&pict; - opkt.size = sizeof(AVPicture); - opkt.flags |= AV_PKT_FLAG_KEY; - } - - write_frame(of->ctx, &opkt, ost); - ost->st->codec->frame_number++; -} - -int guess_input_channel_layout(InputStream *ist) -{ - AVCodecContext *dec = ist->st->codec; - - if (!dec->channel_layout) { - char layout_name[256]; - - if (dec->channels > ist->guess_layout_max) - return 0; - dec->channel_layout = av_get_default_channel_layout(dec->channels); - if (!dec->channel_layout) - return 0; - av_get_channel_layout_string(layout_name, sizeof(layout_name), - dec->channels, dec->channel_layout); - av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream " - "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name); - } - return 1; -} - -static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) -{ - AVFrame *decoded_frame, *f; - AVCodecContext *avctx = ist->st->codec; - int i, ret, err = 0, resample_changed; - AVRational decoded_frame_tb; - - if (!ist->decoded_frame && !(ist->decoded_frame = avcodec_alloc_frame())) - return AVERROR(ENOMEM); - if (!ist->filter_frame && !(ist->filter_frame = av_frame_alloc())) - return AVERROR(ENOMEM); - decoded_frame = ist->decoded_frame; - - update_benchmark(NULL); - ret = avcodec_decode_audio4(avctx, decoded_frame, got_output, pkt); - update_benchmark("decode_audio %d.%d", ist->file_index, ist->st->index); - - if (ret >= 0 && avctx->sample_rate <= 0) { - av_log(avctx, AV_LOG_ERROR, "Sample rate %d invalid\n", avctx->sample_rate); - ret = AVERROR_INVALIDDATA; - } - - if (*got_output || ret<0 || pkt->size) - decode_error_stat[ret<0] ++; - - if (!*got_output || ret < 0) { - if (!pkt->size) { - for (i = 0; i < ist->nb_filters; i++) -#if 1 - av_buffersrc_add_ref(ist->filters[i]->filter, NULL, 0); -#else - av_buffersrc_add_frame(ist->filters[i]->filter, NULL); -#endif - } - return ret; - } - -#if 1 - /* increment next_dts to use for the case where the input stream does not - have timestamps or there are multiple frames in the packet */ - ist->next_pts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / - avctx->sample_rate; - ist->next_dts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / - avctx->sample_rate; -#endif - - resample_changed = ist->resample_sample_fmt != decoded_frame->format || - ist->resample_channels != avctx->channels || - ist->resample_channel_layout != decoded_frame->channel_layout || - ist->resample_sample_rate != decoded_frame->sample_rate; - if (resample_changed) { - char layout1[64], layout2[64]; - - if (!guess_input_channel_layout(ist)) { - av_log(NULL, AV_LOG_FATAL, "Unable to find default channel " - "layout for Input Stream #%d.%d\n", ist->file_index, - ist->st->index); - exit_program(1); - } - decoded_frame->channel_layout = avctx->channel_layout; - - av_get_channel_layout_string(layout1, sizeof(layout1), ist->resample_channels, - ist->resample_channel_layout); - av_get_channel_layout_string(layout2, sizeof(layout2), avctx->channels, - decoded_frame->channel_layout); - - av_log(NULL, AV_LOG_INFO, - "Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d chl:%s to rate:%d fmt:%s ch:%d chl:%s\n", - ist->file_index, ist->st->index, - ist->resample_sample_rate, av_get_sample_fmt_name(ist->resample_sample_fmt), - ist->resample_channels, layout1, - decoded_frame->sample_rate, av_get_sample_fmt_name(decoded_frame->format), - avctx->channels, layout2); - - ist->resample_sample_fmt = decoded_frame->format; - ist->resample_sample_rate = decoded_frame->sample_rate; - ist->resample_channel_layout = decoded_frame->channel_layout; - ist->resample_channels = avctx->channels; - - for (i = 0; i < nb_filtergraphs; i++) - if (ist_in_filtergraph(filtergraphs[i], ist)) { - FilterGraph *fg = filtergraphs[i]; - int j; - if (configure_filtergraph(fg) < 0) { - av_log(NULL, AV_LOG_FATAL, "Error reinitializing filters!\n"); - exit_program(1); - } - for (j = 0; j < fg->nb_outputs; j++) { - OutputStream *ost = fg->outputs[j]->ost; - if (ost->enc->type == AVMEDIA_TYPE_AUDIO && - !(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) - av_buffersink_set_frame_size(ost->filter->filter, - ost->st->codec->frame_size); - } - } - } - - /* if the decoder provides a pts, use it instead of the last packet pts. - the decoder could be delaying output by a packet or more. */ - if (decoded_frame->pts != AV_NOPTS_VALUE) { - ist->dts = ist->next_dts = ist->pts = ist->next_pts = av_rescale_q(decoded_frame->pts, avctx->time_base, AV_TIME_BASE_Q); - decoded_frame_tb = avctx->time_base; - } else if (decoded_frame->pkt_pts != AV_NOPTS_VALUE) { - decoded_frame->pts = decoded_frame->pkt_pts; - pkt->pts = AV_NOPTS_VALUE; - decoded_frame_tb = ist->st->time_base; - } else if (pkt->pts != AV_NOPTS_VALUE) { - decoded_frame->pts = pkt->pts; - pkt->pts = AV_NOPTS_VALUE; - decoded_frame_tb = ist->st->time_base; - }else { - decoded_frame->pts = ist->dts; - decoded_frame_tb = AV_TIME_BASE_Q; - } - if (decoded_frame->pts != AV_NOPTS_VALUE) - decoded_frame->pts = av_rescale_delta(decoded_frame_tb, decoded_frame->pts, - (AVRational){1, ist->st->codec->sample_rate}, decoded_frame->nb_samples, &ist->filter_in_rescale_delta_last, - (AVRational){1, ist->st->codec->sample_rate}); - for (i = 0; i < ist->nb_filters; i++) { - if (i < ist->nb_filters - 1) { - f = ist->filter_frame; - err = av_frame_ref(f, decoded_frame); - if (err < 0) - break; - } else - f = decoded_frame; - err = av_buffersrc_add_frame_flags(ist->filters[i]->filter, f, - AV_BUFFERSRC_FLAG_PUSH); - if (err == AVERROR_EOF) - err = 0; /* ignore */ - if (err < 0) - break; - } - decoded_frame->pts = AV_NOPTS_VALUE; - - av_frame_unref(ist->filter_frame); - av_frame_unref(decoded_frame); - return err < 0 ? err : ret; -} - -static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output) -{ - AVFrame *decoded_frame, *f; - void *buffer_to_free = NULL; - int i, ret = 0, err = 0, resample_changed; - int64_t best_effort_timestamp; - AVRational *frame_sample_aspect; - - if (!ist->decoded_frame && !(ist->decoded_frame = av_frame_alloc())) - return AVERROR(ENOMEM); - if (!ist->filter_frame && !(ist->filter_frame = av_frame_alloc())) - return AVERROR(ENOMEM); - decoded_frame = ist->decoded_frame; - pkt->dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base); - - update_benchmark(NULL); - ret = avcodec_decode_video2(ist->st->codec, - decoded_frame, got_output, pkt); - update_benchmark("decode_video %d.%d", ist->file_index, ist->st->index); - - if (*got_output || ret<0 || pkt->size) - decode_error_stat[ret<0] ++; - - if (!*got_output || ret < 0) { - if (!pkt->size) { - for (i = 0; i < ist->nb_filters; i++) -#if 1 - av_buffersrc_add_ref(ist->filters[i]->filter, NULL, 0); -#else - av_buffersrc_add_frame(ist->filters[i]->filter, NULL); -#endif - } - return ret; - } - - if(ist->top_field_first>=0) - decoded_frame->top_field_first = ist->top_field_first; - - best_effort_timestamp= av_frame_get_best_effort_timestamp(decoded_frame); - if(best_effort_timestamp != AV_NOPTS_VALUE) - ist->next_pts = ist->pts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q); - - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "decoder -> ist_index:%d type:video " - "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64" best_effort_ts_time:%s keyframe:%d frame_type:%d \n", - ist->st->index, av_ts2str(decoded_frame->pts), - av_ts2timestr(decoded_frame->pts, &ist->st->time_base), - best_effort_timestamp, - av_ts2timestr(best_effort_timestamp, &ist->st->time_base), - decoded_frame->key_frame, decoded_frame->pict_type); - } - - pkt->size = 0; - - if (ist->st->sample_aspect_ratio.num) - decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; - - resample_changed = ist->resample_width != decoded_frame->width || - ist->resample_height != decoded_frame->height || - ist->resample_pix_fmt != decoded_frame->format; - if (resample_changed) { - av_log(NULL, AV_LOG_INFO, - "Input stream #%d:%d frame changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s\n", - ist->file_index, ist->st->index, - ist->resample_width, ist->resample_height, av_get_pix_fmt_name(ist->resample_pix_fmt), - decoded_frame->width, decoded_frame->height, av_get_pix_fmt_name(decoded_frame->format)); - - ist->resample_width = decoded_frame->width; - ist->resample_height = decoded_frame->height; - ist->resample_pix_fmt = decoded_frame->format; - - for (i = 0; i < nb_filtergraphs; i++) { - if (ist_in_filtergraph(filtergraphs[i], ist) && ist->reinit_filters && - configure_filtergraph(filtergraphs[i]) < 0) { - av_log(NULL, AV_LOG_FATAL, "Error reinitializing filters!\n"); - exit_program(1); - } - } - } - - frame_sample_aspect= av_opt_ptr(avcodec_get_frame_class(), decoded_frame, "sample_aspect_ratio"); - for (i = 0; i < ist->nb_filters; i++) { - if (!frame_sample_aspect->num) - *frame_sample_aspect = ist->st->sample_aspect_ratio; - - if (i < ist->nb_filters - 1) { - f = ist->filter_frame; - err = av_frame_ref(f, decoded_frame); - if (err < 0) - break; - } else - f = decoded_frame; - ret = av_buffersrc_add_frame_flags(ist->filters[i]->filter, f, AV_BUFFERSRC_FLAG_PUSH); - if (ret == AVERROR_EOF) { - ret = 0; /* ignore */ - } else if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, - "Failed to inject frame into filter network: %s\n", av_err2str(ret)); - exit_program(1); - } - } - - av_frame_unref(ist->filter_frame); - av_frame_unref(decoded_frame); - av_free(buffer_to_free); - return err < 0 ? err : ret; -} - -static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output) -{ - AVSubtitle subtitle; - int i, ret = avcodec_decode_subtitle2(ist->st->codec, - &subtitle, got_output, pkt); - - if (*got_output || ret<0 || pkt->size) - decode_error_stat[ret<0] ++; - - if (ret < 0 || !*got_output) { - if (!pkt->size) - sub2video_flush(ist); - return ret; - } - - if (ist->fix_sub_duration) { - if (ist->prev_sub.got_output) { - int end = av_rescale(subtitle.pts - ist->prev_sub.subtitle.pts, - 1000, AV_TIME_BASE); - if (end < ist->prev_sub.subtitle.end_display_time) { - av_log(ist->st->codec, AV_LOG_DEBUG, - "Subtitle duration reduced from %d to %d\n", - ist->prev_sub.subtitle.end_display_time, end); - ist->prev_sub.subtitle.end_display_time = end; - } - } - FFSWAP(int, *got_output, ist->prev_sub.got_output); - FFSWAP(int, ret, ist->prev_sub.ret); - FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle); - } - - sub2video_update(ist, &subtitle); - - if (!*got_output || !subtitle.num_rects) - return ret; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - - if (!check_output_constraints(ist, ost) || !ost->encoding_needed) - continue; - - do_subtitle_out(output_files[ost->file_index]->ctx, ost, ist, &subtitle); - } - - avsubtitle_free(&subtitle); - return ret; -} - -/* pkt = NULL means EOF (needed to flush decoder buffers) */ -static int output_packet(InputStream *ist, const AVPacket *pkt) -{ - int ret = 0, i; - int got_output = 0; - - AVPacket avpkt; - if (!ist->saw_first_ts) { - ist->dts = ist->st->avg_frame_rate.num ? - ist->st->codec->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0; - ist->pts = 0; - if (pkt != NULL && pkt->pts != AV_NOPTS_VALUE && !ist->decoding_needed) { - ist->dts += av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q); - ist->pts = ist->dts; //unused but better to set it to a value thats not totally wrong - } - ist->saw_first_ts = 1; - } - - if (ist->next_dts == AV_NOPTS_VALUE) - ist->next_dts = ist->dts; - if (ist->next_pts == AV_NOPTS_VALUE) - ist->next_pts = ist->pts; - - if (pkt == NULL) { - /* EOF handling */ - av_init_packet(&avpkt); - avpkt.data = NULL; - avpkt.size = 0; - goto handle_eof; - } else { - avpkt = *pkt; - } - - if (pkt->dts != AV_NOPTS_VALUE) { - ist->next_dts = ist->dts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q); - if (ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO || !ist->decoding_needed) - ist->next_pts = ist->pts = ist->dts; - } - - // while we have more to decode or while the decoder did output something on EOF - while (ist->decoding_needed && (avpkt.size > 0 || (!pkt && got_output))) { - int duration; - handle_eof: - - ist->pts = ist->next_pts; - ist->dts = ist->next_dts; - - if (avpkt.size && avpkt.size != pkt->size) { - av_log(NULL, ist->showed_multi_packet_warning ? AV_LOG_VERBOSE : AV_LOG_WARNING, - "Multiple frames in a packet from stream %d\n", pkt->stream_index); - ist->showed_multi_packet_warning = 1; - } - - switch (ist->st->codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - ret = decode_audio (ist, &avpkt, &got_output); - break; - case AVMEDIA_TYPE_VIDEO: - ret = decode_video (ist, &avpkt, &got_output); - if (avpkt.duration) { - duration = av_rescale_q(avpkt.duration, ist->st->time_base, AV_TIME_BASE_Q); - } else if(ist->st->codec->time_base.num != 0 && ist->st->codec->time_base.den != 0) { - int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame; - duration = ((int64_t)AV_TIME_BASE * - ist->st->codec->time_base.num * ticks) / - ist->st->codec->time_base.den; - } else - duration = 0; - - if(ist->dts != AV_NOPTS_VALUE && duration) { - ist->next_dts += duration; - }else - ist->next_dts = AV_NOPTS_VALUE; - - if (got_output) - ist->next_pts += duration; //FIXME the duration is not correct in some cases - break; - case AVMEDIA_TYPE_SUBTITLE: - ret = transcode_subtitles(ist, &avpkt, &got_output); - break; - default: - return -1; - } - - if (ret < 0) - return ret; - - avpkt.dts= - avpkt.pts= AV_NOPTS_VALUE; - - // touch data and size only if not EOF - if (pkt) { - if(ist->st->codec->codec_type != AVMEDIA_TYPE_AUDIO) - ret = avpkt.size; - avpkt.data += ret; - avpkt.size -= ret; - } - if (!got_output) { - continue; - } - } - - /* handle stream copy */ - if (!ist->decoding_needed) { - ist->dts = ist->next_dts; - switch (ist->st->codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - ist->next_dts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) / - ist->st->codec->sample_rate; - break; - case AVMEDIA_TYPE_VIDEO: - if (ist->framerate.num) { - // TODO: Remove work-around for c99-to-c89 issue 7 - AVRational time_base_q = AV_TIME_BASE_Q; - int64_t next_dts = av_rescale_q(ist->next_dts, time_base_q, av_inv_q(ist->framerate)); - ist->next_dts = av_rescale_q(next_dts + 1, av_inv_q(ist->framerate), time_base_q); - } else if (pkt->duration) { - ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); - } else if(ist->st->codec->time_base.num != 0) { - int ticks= ist->st->parser ? ist->st->parser->repeat_pict + 1 : ist->st->codec->ticks_per_frame; - ist->next_dts += ((int64_t)AV_TIME_BASE * - ist->st->codec->time_base.num * ticks) / - ist->st->codec->time_base.den; - } - break; - } - ist->pts = ist->dts; - ist->next_pts = ist->next_dts; - } - for (i = 0; pkt && i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - - if (!check_output_constraints(ist, ost) || ost->encoding_needed) - continue; - - do_streamcopy(ist, ost, pkt); - } - - return 0; -} - -static void print_sdp(void) -{ - char sdp[16384]; - int i; - AVFormatContext **avc = av_malloc(sizeof(*avc) * nb_output_files); - - if (!avc) - exit_program(1); - for (i = 0; i < nb_output_files; i++) - avc[i] = output_files[i]->ctx; - - av_sdp_create(avc, nb_output_files, sdp, sizeof(sdp)); - printf("SDP:\n%s\n", sdp); - fflush(stdout); - av_freep(&avc); -} - -static int init_input_stream(int ist_index, char *error, int error_len) -{ - int ret; - InputStream *ist = input_streams[ist_index]; - - if (ist->decoding_needed) { - AVCodec *codec = ist->dec; - if (!codec) { - snprintf(error, error_len, "Decoder (codec %s) not found for input stream #%d:%d", - avcodec_get_name(ist->st->codec->codec_id), ist->file_index, ist->st->index); - return AVERROR(EINVAL); - } - - av_opt_set_int(ist->st->codec, "refcounted_frames", 1, 0); - - if (!av_dict_get(ist->opts, "threads", NULL, 0)) - av_dict_set(&ist->opts, "threads", "auto", 0); - if ((ret = avcodec_open2(ist->st->codec, codec, &ist->opts)) < 0) { - char errbuf[128]; - if (ret == AVERROR_EXPERIMENTAL) - abort_codec_experimental(codec, 0); - - av_strerror(ret, errbuf, sizeof(errbuf)); - - snprintf(error, error_len, - "Error while opening decoder for input stream " - "#%d:%d : %s", - ist->file_index, ist->st->index, errbuf); - return ret; - } - assert_avoptions(ist->opts); - } - - ist->next_pts = AV_NOPTS_VALUE; - ist->next_dts = AV_NOPTS_VALUE; - ist->is_start = 1; - - return 0; -} - -static InputStream *get_input_stream(OutputStream *ost) -{ - if (ost->source_index >= 0) - return input_streams[ost->source_index]; - return NULL; -} - -static int compare_int64(const void *a, const void *b) -{ - int64_t va = *(int64_t *)a, vb = *(int64_t *)b; - return va < vb ? -1 : va > vb ? +1 : 0; -} - -static void parse_forced_key_frames(char *kf, OutputStream *ost, - AVCodecContext *avctx) -{ - char *p; - int n = 1, i, size, index = 0; - int64_t t, *pts; - - for (p = kf; *p; p++) - if (*p == ',') - n++; - size = n; - pts = av_malloc(sizeof(*pts) * size); - if (!pts) { - av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n"); - exit_program(1); - } - - p = kf; - for (i = 0; i < n; i++) { - char *next = strchr(p, ','); - - if (next) - *next++ = 0; - - if (!memcmp(p, "chapters", 8)) { - - AVFormatContext *avf = output_files[ost->file_index]->ctx; - int j; - - if (avf->nb_chapters > INT_MAX - size || - !(pts = av_realloc_f(pts, size += avf->nb_chapters - 1, - sizeof(*pts)))) { - av_log(NULL, AV_LOG_FATAL, - "Could not allocate forced key frames array.\n"); - exit_program(1); - } - t = p[8] ? parse_time_or_die("force_key_frames", p + 8, 1) : 0; - t = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); - - for (j = 0; j < avf->nb_chapters; j++) { - AVChapter *c = avf->chapters[j]; - av_assert1(index < size); - pts[index++] = av_rescale_q(c->start, c->time_base, - avctx->time_base) + t; - } - - } else { - - t = parse_time_or_die("force_key_frames", p, 1); - av_assert1(index < size); - pts[index++] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); - - } - - p = next; - } - - av_assert0(index == size); - qsort(pts, size, sizeof(*pts), compare_int64); - ost->forced_kf_count = size; - ost->forced_kf_pts = pts; -} - -static void report_new_stream(int input_index, AVPacket *pkt) -{ - InputFile *file = input_files[input_index]; - AVStream *st = file->ctx->streams[pkt->stream_index]; - - if (pkt->stream_index < file->nb_streams_warn) - return; - av_log(file->ctx, AV_LOG_WARNING, - "New %s stream %d:%d at pos:%"PRId64" and DTS:%ss\n", - av_get_media_type_string(st->codec->codec_type), - input_index, pkt->stream_index, - pkt->pos, av_ts2timestr(pkt->dts, &st->time_base)); - file->nb_streams_warn = pkt->stream_index + 1; -} - -static int transcode_init(void) -{ - int ret = 0, i, j, k; - AVFormatContext *oc; - AVCodecContext *codec; - OutputStream *ost; - InputStream *ist; - char error[1024]; - int want_sdp = 1; - - for (i = 0; i < nb_filtergraphs; i++) { - FilterGraph *fg = filtergraphs[i]; - for (j = 0; j < fg->nb_outputs; j++) { - OutputFilter *ofilter = fg->outputs[j]; - if (!ofilter->ost || ofilter->ost->source_index >= 0) - continue; - if (fg->nb_inputs != 1) - continue; - for (k = nb_input_streams-1; k >= 0 ; k--) - if (fg->inputs[0]->ist == input_streams[k]) - break; - ofilter->ost->source_index = k; - } - } - - /* init framerate emulation */ - for (i = 0; i < nb_input_files; i++) { - InputFile *ifile = input_files[i]; - if (ifile->rate_emu) - for (j = 0; j < ifile->nb_streams; j++) - input_streams[j + ifile->ist_index]->start = av_gettime(); - } - - /* output stream init */ - for (i = 0; i < nb_output_files; i++) { - oc = output_files[i]->ctx; - if (!oc->nb_streams && !(oc->oformat->flags & AVFMT_NOSTREAMS)) { - av_dump_format(oc, i, oc->filename, 1); - av_log(NULL, AV_LOG_ERROR, "Output file #%d does not contain any stream\n", i); - return AVERROR(EINVAL); - } - } - - /* init complex filtergraphs */ - for (i = 0; i < nb_filtergraphs; i++) - if ((ret = avfilter_graph_config(filtergraphs[i]->graph, NULL)) < 0) - return ret; - - /* for each output stream, we compute the right encoding parameters */ - for (i = 0; i < nb_output_streams; i++) { - AVCodecContext *icodec = NULL; - ost = output_streams[i]; - oc = output_files[ost->file_index]->ctx; - ist = get_input_stream(ost); - - if (ost->attachment_filename) - continue; - - codec = ost->st->codec; - - if (ist) { - icodec = ist->st->codec; - - ost->st->disposition = ist->st->disposition; - codec->bits_per_raw_sample = icodec->bits_per_raw_sample; - codec->chroma_sample_location = icodec->chroma_sample_location; - } else { - for (j=0; jnb_streams; j++) { - AVStream *st = oc->streams[j]; - if (st != ost->st && st->codec->codec_type == codec->codec_type) - break; - } - if (j == oc->nb_streams) - if (codec->codec_type == AVMEDIA_TYPE_AUDIO || codec->codec_type == AVMEDIA_TYPE_VIDEO) - ost->st->disposition = AV_DISPOSITION_DEFAULT; - } - - if (ost->stream_copy) { - AVRational sar; - uint64_t extra_size; - - av_assert0(ist && !ost->filter); - - extra_size = (uint64_t)icodec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE; - - if (extra_size > INT_MAX) { - return AVERROR(EINVAL); - } - - /* if stream_copy is selected, no need to decode or encode */ - codec->codec_id = icodec->codec_id; - codec->codec_type = icodec->codec_type; - - if (!codec->codec_tag) { - unsigned int codec_tag; - if (!oc->oformat->codec_tag || - av_codec_get_id (oc->oformat->codec_tag, icodec->codec_tag) == codec->codec_id || - !av_codec_get_tag2(oc->oformat->codec_tag, icodec->codec_id, &codec_tag)) - codec->codec_tag = icodec->codec_tag; - } - - codec->bit_rate = icodec->bit_rate; - codec->rc_max_rate = icodec->rc_max_rate; - codec->rc_buffer_size = icodec->rc_buffer_size; - codec->field_order = icodec->field_order; - codec->extradata = av_mallocz(extra_size); - if (!codec->extradata) { - return AVERROR(ENOMEM); - } - memcpy(codec->extradata, icodec->extradata, icodec->extradata_size); - codec->extradata_size= icodec->extradata_size; - codec->bits_per_coded_sample = icodec->bits_per_coded_sample; - - codec->time_base = ist->st->time_base; - /* - * Avi is a special case here because it supports variable fps but - * having the fps and timebase differe significantly adds quite some - * overhead - */ - if(!strcmp(oc->oformat->name, "avi")) { - if ( copy_tb<0 && av_q2d(ist->st->r_frame_rate) >= av_q2d(ist->st->avg_frame_rate) - && 0.5/av_q2d(ist->st->r_frame_rate) > av_q2d(ist->st->time_base) - && 0.5/av_q2d(ist->st->r_frame_rate) > av_q2d(icodec->time_base) - && av_q2d(ist->st->time_base) < 1.0/500 && av_q2d(icodec->time_base) < 1.0/500 - || copy_tb==2){ - codec->time_base.num = ist->st->r_frame_rate.den; - codec->time_base.den = 2*ist->st->r_frame_rate.num; - codec->ticks_per_frame = 2; - } else if ( copy_tb<0 && av_q2d(icodec->time_base)*icodec->ticks_per_frame > 2*av_q2d(ist->st->time_base) - && av_q2d(ist->st->time_base) < 1.0/500 - || copy_tb==0){ - codec->time_base = icodec->time_base; - codec->time_base.num *= icodec->ticks_per_frame; - codec->time_base.den *= 2; - codec->ticks_per_frame = 2; - } - } else if(!(oc->oformat->flags & AVFMT_VARIABLE_FPS) - && strcmp(oc->oformat->name, "mov") && strcmp(oc->oformat->name, "mp4") && strcmp(oc->oformat->name, "3gp") - && strcmp(oc->oformat->name, "3g2") && strcmp(oc->oformat->name, "psp") && strcmp(oc->oformat->name, "ipod") - && strcmp(oc->oformat->name, "f4v") - ) { - if( copy_tb<0 && icodec->time_base.den - && av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base) - && av_q2d(ist->st->time_base) < 1.0/500 - || copy_tb==0){ - codec->time_base = icodec->time_base; - codec->time_base.num *= icodec->ticks_per_frame; - } - } - if ( codec->codec_tag == AV_RL32("tmcd") - && icodec->time_base.num < icodec->time_base.den - && icodec->time_base.num > 0 - && 121LL*icodec->time_base.num > icodec->time_base.den) { - codec->time_base = icodec->time_base; - } - - if (ist && !ost->frame_rate.num) - ost->frame_rate = ist->framerate; - if(ost->frame_rate.num) - codec->time_base = av_inv_q(ost->frame_rate); - - av_reduce(&codec->time_base.num, &codec->time_base.den, - codec->time_base.num, codec->time_base.den, INT_MAX); - - switch (codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - if (audio_volume != 256) { - av_log(NULL, AV_LOG_FATAL, "-acodec copy and -vol are incompatible (frames are not decoded)\n"); - exit_program(1); - } - codec->channel_layout = icodec->channel_layout; - codec->sample_rate = icodec->sample_rate; - codec->channels = icodec->channels; - codec->frame_size = icodec->frame_size; - codec->audio_service_type = icodec->audio_service_type; - codec->block_align = icodec->block_align; - if((codec->block_align == 1 || codec->block_align == 1152 || codec->block_align == 576) && codec->codec_id == AV_CODEC_ID_MP3) - codec->block_align= 0; - if(codec->codec_id == AV_CODEC_ID_AC3) - codec->block_align= 0; - break; - case AVMEDIA_TYPE_VIDEO: - codec->pix_fmt = icodec->pix_fmt; - codec->width = icodec->width; - codec->height = icodec->height; - codec->has_b_frames = icodec->has_b_frames; - if (ost->frame_aspect_ratio.num) { // overridden by the -aspect cli option - sar = - av_mul_q(ost->frame_aspect_ratio, - (AVRational){ codec->height, codec->width }); - av_log(NULL, AV_LOG_WARNING, "Overriding aspect ratio " - "with stream copy may produce invalid files\n"); - } - else if (ist->st->sample_aspect_ratio.num) - sar = ist->st->sample_aspect_ratio; - else - sar = icodec->sample_aspect_ratio; - ost->st->sample_aspect_ratio = codec->sample_aspect_ratio = sar; - ost->st->avg_frame_rate = ist->st->avg_frame_rate; - break; - case AVMEDIA_TYPE_SUBTITLE: - codec->width = icodec->width; - codec->height = icodec->height; - break; - case AVMEDIA_TYPE_DATA: - case AVMEDIA_TYPE_ATTACHMENT: - break; - default: - abort(); - } - } else { - if (!ost->enc) - ost->enc = avcodec_find_encoder(codec->codec_id); - if (!ost->enc) { - /* should only happen when a default codec is not present. */ - snprintf(error, sizeof(error), "Encoder (codec %s) not found for output stream #%d:%d", - avcodec_get_name(ost->st->codec->codec_id), ost->file_index, ost->index); - ret = AVERROR(EINVAL); - goto dump_format; - } - - if (ist) - ist->decoding_needed++; - ost->encoding_needed = 1; - - if (!ost->filter && - (codec->codec_type == AVMEDIA_TYPE_VIDEO || - codec->codec_type == AVMEDIA_TYPE_AUDIO)) { - FilterGraph *fg; - fg = init_simple_filtergraph(ist, ost); - if (configure_filtergraph(fg)) { - av_log(NULL, AV_LOG_FATAL, "Error opening filters!\n"); - exit_program(1); - } - } - - if (codec->codec_type == AVMEDIA_TYPE_VIDEO) { - if (ost->filter && !ost->frame_rate.num) - ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter); - if (ist && !ost->frame_rate.num) - ost->frame_rate = ist->framerate; - if (ist && !ost->frame_rate.num) - ost->frame_rate = ist->st->r_frame_rate.num ? ist->st->r_frame_rate : (AVRational){25, 1}; -// ost->frame_rate = ist->st->avg_frame_rate.num ? ist->st->avg_frame_rate : (AVRational){25, 1}; - if (ost->enc && ost->enc->supported_framerates && !ost->force_fps) { - int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates); - ost->frame_rate = ost->enc->supported_framerates[idx]; - } - } - - switch (codec->codec_type) { - case AVMEDIA_TYPE_AUDIO: - codec->sample_fmt = ost->filter->filter->inputs[0]->format; - codec->sample_rate = ost->filter->filter->inputs[0]->sample_rate; - codec->channel_layout = ost->filter->filter->inputs[0]->channel_layout; - codec->channels = avfilter_link_get_channels(ost->filter->filter->inputs[0]); - codec->time_base = (AVRational){ 1, codec->sample_rate }; - break; - case AVMEDIA_TYPE_VIDEO: - codec->time_base = av_inv_q(ost->frame_rate); - if (ost->filter && !(codec->time_base.num && codec->time_base.den)) - codec->time_base = ost->filter->filter->inputs[0]->time_base; - if ( av_q2d(codec->time_base) < 0.001 && video_sync_method != VSYNC_PASSTHROUGH - && (video_sync_method == VSYNC_CFR || video_sync_method == VSYNC_VSCFR || (video_sync_method == VSYNC_AUTO && !(oc->oformat->flags & AVFMT_VARIABLE_FPS)))){ - av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n" - "Please consider specifying a lower framerate, a different muxer or -vsync 2\n"); - } - for (j = 0; j < ost->forced_kf_count; j++) - ost->forced_kf_pts[j] = av_rescale_q(ost->forced_kf_pts[j], - AV_TIME_BASE_Q, - codec->time_base); - - codec->width = ost->filter->filter->inputs[0]->w; - codec->height = ost->filter->filter->inputs[0]->h; - codec->sample_aspect_ratio = ost->st->sample_aspect_ratio = - ost->frame_aspect_ratio.num ? // overridden by the -aspect cli option - av_mul_q(ost->frame_aspect_ratio, (AVRational){ codec->height, codec->width }) : - ost->filter->filter->inputs[0]->sample_aspect_ratio; - if (!strncmp(ost->enc->name, "libx264", 7) && - codec->pix_fmt == AV_PIX_FMT_NONE && - ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P) - av_log(NULL, AV_LOG_WARNING, - "No pixel format specified, %s for H.264 encoding chosen.\n" - "Use -pix_fmt yuv420p for compatibility with outdated media players.\n", - av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format)); - if (!strncmp(ost->enc->name, "mpeg2video", 10) && - codec->pix_fmt == AV_PIX_FMT_NONE && - ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P) - av_log(NULL, AV_LOG_WARNING, - "No pixel format specified, %s for MPEG-2 encoding chosen.\n" - "Use -pix_fmt yuv420p for compatibility with outdated media players.\n", - av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format)); - codec->pix_fmt = ost->filter->filter->inputs[0]->format; - - if (!icodec || - codec->width != icodec->width || - codec->height != icodec->height || - codec->pix_fmt != icodec->pix_fmt) { - codec->bits_per_raw_sample = frame_bits_per_raw_sample; - } - - if (ost->forced_keyframes) { - if (!strncmp(ost->forced_keyframes, "expr:", 5)) { - ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5, - forced_keyframes_const_names, NULL, NULL, NULL, NULL, 0, NULL); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, - "Invalid force_key_frames expression '%s'\n", ost->forced_keyframes+5); - return ret; - } - ost->forced_keyframes_expr_const_values[FKF_N] = 0; - ost->forced_keyframes_expr_const_values[FKF_N_FORCED] = 0; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] = NAN; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T] = NAN; - } else { - parse_forced_key_frames(ost->forced_keyframes, ost, ost->st->codec); - } - } - break; - case AVMEDIA_TYPE_SUBTITLE: - codec->time_base = (AVRational){1, 1000}; - if (!codec->width) { - codec->width = input_streams[ost->source_index]->st->codec->width; - codec->height = input_streams[ost->source_index]->st->codec->height; - } - break; - default: - abort(); - break; - } - /* two pass mode */ - if (codec->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2)) { - char logfilename[1024]; - FILE *f; - - snprintf(logfilename, sizeof(logfilename), "%s-%d.log", - ost->logfile_prefix ? ost->logfile_prefix : - DEFAULT_PASS_LOGFILENAME_PREFIX, - i); - if (!strcmp(ost->enc->name, "libx264")) { - av_dict_set(&ost->opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE); - } else { - if (codec->flags & CODEC_FLAG_PASS2) { - char *logbuffer; - size_t logbuffer_size; - if (cmdutils_read_file(logfilename, &logbuffer, &logbuffer_size) < 0) { - av_log(NULL, AV_LOG_FATAL, "Error reading log file '%s' for pass-2 encoding\n", - logfilename); - exit_program(1); - } - codec->stats_in = logbuffer; - } - if (codec->flags & CODEC_FLAG_PASS1) { - f = fopen(logfilename, "wb"); - if (!f) { - av_log(NULL, AV_LOG_FATAL, "Cannot write log file '%s' for pass-1 encoding: %s\n", - logfilename, strerror(errno)); - exit_program(1); - } - ost->logfile = f; - } - } - } - } - } - - /* open each encoder */ - for (i = 0; i < nb_output_streams; i++) { - ost = output_streams[i]; - if (ost->encoding_needed) { - AVCodec *codec = ost->enc; - AVCodecContext *dec = NULL; - - if ((ist = get_input_stream(ost))) - dec = ist->st->codec; - if (dec && dec->subtitle_header) { - /* ASS code assumes this buffer is null terminated so add extra byte. */ - ost->st->codec->subtitle_header = av_mallocz(dec->subtitle_header_size + 1); - if (!ost->st->codec->subtitle_header) { - ret = AVERROR(ENOMEM); - goto dump_format; - } - memcpy(ost->st->codec->subtitle_header, dec->subtitle_header, dec->subtitle_header_size); - ost->st->codec->subtitle_header_size = dec->subtitle_header_size; - } - if (!av_dict_get(ost->opts, "threads", NULL, 0)) - av_dict_set(&ost->opts, "threads", "auto", 0); - if ((ret = avcodec_open2(ost->st->codec, codec, &ost->opts)) < 0) { - if (ret == AVERROR_EXPERIMENTAL) - abort_codec_experimental(codec, 1); - snprintf(error, sizeof(error), "Error while opening encoder for output stream #%d:%d - maybe incorrect parameters such as bit_rate, rate, width or height", - ost->file_index, ost->index); - goto dump_format; - } - if (ost->enc->type == AVMEDIA_TYPE_AUDIO && - !(ost->enc->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)) - av_buffersink_set_frame_size(ost->filter->filter, - ost->st->codec->frame_size); - assert_avoptions(ost->opts); - if (ost->st->codec->bit_rate && ost->st->codec->bit_rate < 1000) - av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." - " It takes bits/s as argument, not kbits/s\n"); - extra_size += ost->st->codec->extradata_size; - - if (ost->st->codec->me_threshold) - input_streams[ost->source_index]->st->codec->debug |= FF_DEBUG_MV; - } else { - av_opt_set_dict(ost->st->codec, &ost->opts); - } - } - - /* init input streams */ - for (i = 0; i < nb_input_streams; i++) - if ((ret = init_input_stream(i, error, sizeof(error))) < 0) { - for (i = 0; i < nb_output_streams; i++) { - ost = output_streams[i]; - avcodec_close(ost->st->codec); - } - goto dump_format; - } - - /* discard unused programs */ - for (i = 0; i < nb_input_files; i++) { - InputFile *ifile = input_files[i]; - for (j = 0; j < ifile->ctx->nb_programs; j++) { - AVProgram *p = ifile->ctx->programs[j]; - int discard = AVDISCARD_ALL; - - for (k = 0; k < p->nb_stream_indexes; k++) - if (!input_streams[ifile->ist_index + p->stream_index[k]]->discard) { - discard = AVDISCARD_DEFAULT; - break; - } - p->discard = discard; - } - } - - /* open files and write file headers */ - for (i = 0; i < nb_output_files; i++) { - oc = output_files[i]->ctx; - oc->interrupt_callback = int_cb; - if ((ret = avformat_write_header(oc, &output_files[i]->opts)) < 0) { - char errbuf[128]; - av_strerror(ret, errbuf, sizeof(errbuf)); - snprintf(error, sizeof(error), - "Could not write header for output file #%d " - "(incorrect codec parameters ?): %s", - i, errbuf); - ret = AVERROR(EINVAL); - goto dump_format; - } -// assert_avoptions(output_files[i]->opts); - if (strcmp(oc->oformat->name, "rtp")) { - want_sdp = 0; - } - } - - dump_format: - /* dump the file output parameters - cannot be done before in case - of stream copy */ - for (i = 0; i < nb_output_files; i++) { - av_dump_format(output_files[i]->ctx, i, output_files[i]->ctx->filename, 1); - } - - /* dump the stream mapping */ - av_log(NULL, AV_LOG_INFO, "Stream mapping:\n"); - for (i = 0; i < nb_input_streams; i++) { - ist = input_streams[i]; - - for (j = 0; j < ist->nb_filters; j++) { - if (ist->filters[j]->graph->graph_desc) { - av_log(NULL, AV_LOG_INFO, " Stream #%d:%d (%s) -> %s", - ist->file_index, ist->st->index, ist->dec ? ist->dec->name : "?", - ist->filters[j]->name); - if (nb_filtergraphs > 1) - av_log(NULL, AV_LOG_INFO, " (graph %d)", ist->filters[j]->graph->index); - av_log(NULL, AV_LOG_INFO, "\n"); - } - } - } - - for (i = 0; i < nb_output_streams; i++) { - ost = output_streams[i]; - - if (ost->attachment_filename) { - /* an attached file */ - av_log(NULL, AV_LOG_INFO, " File %s -> Stream #%d:%d\n", - ost->attachment_filename, ost->file_index, ost->index); - continue; - } - - if (ost->filter && ost->filter->graph->graph_desc) { - /* output from a complex graph */ - av_log(NULL, AV_LOG_INFO, " %s", ost->filter->name); - if (nb_filtergraphs > 1) - av_log(NULL, AV_LOG_INFO, " (graph %d)", ost->filter->graph->index); - - av_log(NULL, AV_LOG_INFO, " -> Stream #%d:%d (%s)\n", ost->file_index, - ost->index, ost->enc ? ost->enc->name : "?"); - continue; - } - - av_log(NULL, AV_LOG_INFO, " Stream #%d:%d -> #%d:%d", - input_streams[ost->source_index]->file_index, - input_streams[ost->source_index]->st->index, - ost->file_index, - ost->index); - if (ost->sync_ist != input_streams[ost->source_index]) - av_log(NULL, AV_LOG_INFO, " [sync #%d:%d]", - ost->sync_ist->file_index, - ost->sync_ist->st->index); - if (ost->stream_copy) - av_log(NULL, AV_LOG_INFO, " (copy)"); - else - av_log(NULL, AV_LOG_INFO, " (%s -> %s)", input_streams[ost->source_index]->dec ? - input_streams[ost->source_index]->dec->name : "?", - ost->enc ? ost->enc->name : "?"); - av_log(NULL, AV_LOG_INFO, "\n"); - } - - if (ret) { - av_log(NULL, AV_LOG_ERROR, "%s\n", error); - return ret; - } - - if (want_sdp) { - print_sdp(); - } - - return 0; -} - -/* Return 1 if there remain streams where more output is wanted, 0 otherwise. */ -static int need_output(void) -{ - int i; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - OutputFile *of = output_files[ost->file_index]; - AVFormatContext *os = output_files[ost->file_index]->ctx; - - if (ost->finished || - (os->pb && avio_tell(os->pb) >= of->limit_filesize)) - continue; - if (ost->frame_number >= ost->max_frames) { - int j; - for (j = 0; j < of->ctx->nb_streams; j++) - close_output_stream(output_streams[of->ost_index + j]); - continue; - } - - return 1; - } - - return 0; -} - -/** - * Select the output stream to process. - * - * @return selected output stream, or NULL if none available - */ -static OutputStream *choose_output(void) -{ - int i; - int64_t opts_min = INT64_MAX; - OutputStream *ost_min = NULL; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - int64_t opts = av_rescale_q(ost->st->cur_dts, ost->st->time_base, - AV_TIME_BASE_Q); - if (!ost->unavailable && !ost->finished && opts < opts_min) { - opts_min = opts; - ost_min = ost; - } - } - return ost_min; -} - -static int check_keyboard_interaction(int64_t cur_time) -{ - int i, ret, key; - static int64_t last_time; - if (received_nb_signals) - return AVERROR_EXIT; - /* read_key() returns 0 on EOF */ - if(cur_time - last_time >= 100000 && !run_as_daemon){ - key = read_key(); - last_time = cur_time; - }else - key = -1; - if (key == 'q') - return AVERROR_EXIT; - if (key == '+') av_log_set_level(av_log_get_level()+10); - if (key == '-') av_log_set_level(av_log_get_level()-10); - if (key == 's') qp_hist ^= 1; - if (key == 'h'){ - if (do_hex_dump){ - do_hex_dump = do_pkt_dump = 0; - } else if(do_pkt_dump){ - do_hex_dump = 1; - } else - do_pkt_dump = 1; - av_log_set_level(AV_LOG_DEBUG); - } - if (key == 'c' || key == 'C'){ - char buf[4096], target[64], command[256], arg[256] = {0}; - double time; - int k, n = 0; - fprintf(stderr, "\nEnter command: |all