关于boost库的一个auto_link问题?

gaoxinglong_9999 2011-11-21 07:51:48
C:\Program Files\boost_1_47_0\boost/config/auto_link.hpp(258): catastrophic error: #error directive: "Build options aren't compatible with pre-built libraries"
1> # error "Build options aren't compatible with pre-built libraries"

这是提示错误:
错误定位:

if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))

# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
# define BOOST_LIB_RT_OPT "-sgydp"
# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
# define BOOST_LIB_RT_OPT "-sgdp"
# elif defined(_DEBUG)\
&& defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
# define BOOST_LIB_RT_OPT "-sgydp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries"
# elif defined(_DEBUG)
# define BOOST_LIB_RT_OPT "-sgdp"
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
# error "Build options aren't compatible with pre-built libraries" <------------此处定位错误!!!
# else
# define BOOST_LIB_RT_OPT "-sp"
# endif


我只在cpp文件里面写了一行字;#include <boost/regex/concepts.hpp>
然后编译+链接,就这样了!
...全文
340 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
gaoxinglong_9999 2011-11-22
  • 打赏
  • 举报
回复
可是我确实把目录拷贝了。我现在知道是什么原因了。主要是我同时用了STL5.2.1和boost1.4.8,但是boost并没有依赖stl编译,按照网上说的各种修改办法,我的依赖编译都没能成功。谁能给我一个好点的办法呢?谢谢……谢谢……[Quote=引用 4 楼 taodm 的回复:]

那又如何。你没有把正确的.lib文件拷到vc目录里。
[/Quote]
taodm 2011-11-22
  • 打赏
  • 举报
回复
你既然用的intel2011xe编译器,vs2008链接,就没必要瞎折腾stlport了。
拆掉stlport就好了。
taodm 2011-11-21
  • 打赏
  • 举报
回复
那又如何。你没有把正确的.lib文件拷到vc目录里。
gaoxinglong_9999 2011-11-21
  • 打赏
  • 举报
回复
我编译选用的是complete啊[Quote=引用 2 楼 taodm 的回复:]

说得多清楚啊,你编译boost用的选项和你现在项目的选项不兼容啊。要么重新编译boost,要么重新调整你现在的工程。
[/Quote]
taodm 2011-11-21
  • 打赏
  • 举报
回复
说得多清楚啊,你编译boost用的选项和你现在项目的选项不兼容啊。要么重新编译boost,要么重新调整你现在的工程。
gaoxinglong_9999 2011-11-21
  • 打赏
  • 举报
回复
补充:我用的是intel2011xe编译器,vs2008链接
基于Python以及Flask的微型本地Arcaea服务器.zip 特性 Features :x: : 不支持 Not supported :warning: : 可能存在问题 / 可能与官方不一样 Possible issues / may differ from official :wastebasket: : 不再更新,可能会移除或重构 No longer updated, may be removed or refactored :construction: : 建设中 In construction 登录、注册 Login and registration 多设备自动封号 Auto-ban of multiple devices :warning: 多设备登录 Multi device login 登录频次限制 Login rate limit :x: 销号 Destroy account 成绩上传 Score upload 成绩校验 Score check 成绩排名 Score rank 潜力值机制 Potential Best 30 :warning: Recent Top 10 :warning: 世界排名 Global rank 段位系统 Course system :warning: Link Play 好友系统 Friends :x: 好友位提升 Max friend number increase 云端存档 Cloud save 尝试全剧情、曲目解锁 Try to unlock all the stories and songs 世界模式 World mode 体力系统 Stamina system :warning: 普通梯子强化和绳子强化 Normal steps boost & beyond boost :warning: 角色技能 Character skills 歌曲下载 Songs downloading :x: 加密下载 Encrypted downloading 下载校验 Download check 下载频次限制 Download rate limit 购买系统 Purchase system 单曲和曲包 Single & Pack :x: 捆绑包 Bundle 折扣 Discount 五周年兑换券 5-th anniversary ticket :x: Extend 包自动降价 Extend pack automatic price reduction 奖励系统 Present system 兑换码系统 Redeem code system 角色系统 Character system 数据记录 Data recording 用户成绩 Users' scores 用户每日潜力值 Users' daily potential :wastebasket: 简单的网页管理后台 Simple web admin backend :construction: API 服务器日志 Server log
Table of Contents Header Files The #define Guard Header File Dependencies Inline Functions The -inl.h Files Function Parameter Ordering Names and Order of Includes Scoping Namespaces Nested Classes Nonmember, Static Member, and Global Functions Local Variables Static and Global Variables Classes Doing Work in Constructors Default Constructors Explicit Constructors Copy Constructors Structs vs. Classes Inheritance Multiple Inheritance Interfaces Operator Overloading Access Control Declaration Order Write Short Functions Google-Specific Magic Smart Pointers cpplint Other C++ Features Reference Arguments Function Overloading Default Arguments Variable-Length Arrays and alloca() Friends Exceptions Run-Time Type Information (RTTI) Casting Streams Preincrement and Predecrement Use of const Integer Types 64-bit Portability Preprocessor Macros 0 and NULL sizeof Boost C++0x Naming General Naming Rules File Names Type Names Variable Names Constant Names Function Names Namespace Names Enumerator Names Macro Names Exceptions to Naming Rules Comments Comment Style File Comments Class Comments Function Comments Variable Comments Implementation Comments Punctuation, Spelling and Grammar TODO Comments Deprecation Comments Formatting Line Length Non-ASCII Characters Spaces vs. Tabs Function Declarations and Definitions Function Calls Conditionals Loops and Switch Statements Pointer and Reference Expressions Boolean Expressions Return Values Variable and Array Initialization Preprocessor Directives Class Format Constructor Initializer Lists Namespace Formatting Horizontal Whitespace Vertical Whitespace Exceptions to the Rules Existing Non-conformant Code Windows Code Important Note Displaying Hidden Details in this Guide link ▶This style guide contains many details that are initially hidden from view. They are marked by the triangle icon, which you see here on your left. Click it now. You should see "Hooray" appear below. Hooray! Now you know you can expand points to get more details. Alternatively, there's an "expand all" at the top of this document. Background C++ is the main development language used by many of Google's open-source projects. As every C++ programmer knows, the language has many powerful features, but this power brings with it complexity, which in turn can make code more bug-prone and harder to read and maintain. The goal of this guide is to manage this complexity by describing in detail the dos and don'ts of writing C++ code. These rules exist to keep the code base manageable while still allowing coders to use C++ language features productively. Style, also known as readability, is what we call the conventions that govern our C++ code. The term Style is a bit of a misnomer, since these conventions cover far more than just source file formatting. One way in which we keep the code base manageable is by enforcing consistency. It is very important that any programmer be able to look at another's code and quickly understand it. Maintaining a uniform style and following conventions means that we can more easily use "pattern-matching" to infer what various symbols are and what invariants are true about them. Creating common, required idioms and patterns makes code much easier to understand. In some cases there might be good arguments for changing certain style rules, but we nonetheless keep things as they are in order to preserve consistency. Another issue this guide addresses is that of C++ feature bloat. C++ is a huge language with many advanced features. In some cases we constrain, or even ban, use of certain features. We do this to keep code simple and to avoid the various common errors and problems that these features can cause. This guide lists these features and explains why their use is restricted. Open-source projects developed by Google conform to the requirements in this guide. Note that this guide is not a C++ tutorial: we assume that the reader is familiar with the language. Header Files In general, every .cc file should have an associated .h file. There are some common exceptions, such as unittests and small .cc files containing just a main() function. Correct use of header files can make a huge difference to the readability, size and performance of your code. The following rules will guide you through the various pitfalls of using header files. The #define Guard link ▶All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be ___H_. To guarantee uniqueness, they should be based on the full path in a project's source tree. For example, the file foo/src/bar/baz.h in project foo should have the following guard: #ifndef FOO_BAR_BAZ_H_ #define FOO_BAR_BAZ_H_ ... #endif // FOO_BAR_BAZ_H_ Header File Dependencies link ▶Don't use an #include when a forward declaration would suffice. When you include a header file you introduce a dependency that will cause your code to be recompiled whenever the header file changes. If your header file includes other header files, any change to those files will cause any code that includes your header to be recompiled. Therefore, we prefer to minimize includes, particularly includes of header files in other header files. You can significantly minimize the number of header files you need to include in your own header files by using forward declarations. For example, if your header file uses the File class in ways that do not require access to the declaration of the File class, your header file can just forward declare class File; instead of having to #include "file/base/file.h". How can we use a class Foo in a header file without access to its definition? We can declare data members of type Foo* or Foo&. We can declare (but not define) functions with arguments, and/or return values, of type Foo. (One exception is if an argument Foo or const Foo& has a non-explicit, one-argument constructor, in which case we need the full definition to support automatic type conversion.) We can declare static data members of type Foo. This is because static data members are defined outside the class definition. On the other hand, you must include the header file for Foo if your class subclasses Foo or has a data member of type Foo. Sometimes it makes sense to have pointer (or better, scoped_ptr) members instead of object members. However, this complicates code readability and imposes a performance penalty, so avoid doing this transformation if the only purpose is to minimize includes in header files. Of course, .cc files typically do require the definitions of the classes they use, and usually have to include several header files. Note: If you use a symbol Foo in your source file, you should bring in a definition for Foo yourself, either via an #include or via a forward declaration. Do not depend on the symbol being brought in transitively via headers not directly included. One exception is if Foo is used in myfile.cc, it's ok to #include (or forward-declare) Foo in myfile.h, instead of myfile.cc. Inline Functions link ▶Define functions inline only when they are small, say, 10 lines or less. Definition: You can declare functions in a way that allows the compiler to expand them inline rather than calling them through the usual function call mechanism. Pros: Inlining a function can generate more efficient object code, as long as the inlined function is small. Feel free to inline accessors and mutators, and other short, performance-critical functions. Cons: Overuse of inlining can actually make programs slower. Depending on a function's size, inlining it can cause the code size to increase or decrease. Inlining a very small accessor function will usually decrease code size while inlining a very large function can dramatically increase code size. On modern processors smaller code usually runs faster due to better use of the instruction cache. Decision: A decent rule of thumb is to not inline a function if it is more than 10 lines long. Beware of destructors, which are often longer than they appear because of implicit member- and base-destructor calls! Another useful rule of thumb: it's typically not cost effective to inline functions with loops or switch statements (unless, in the common case, the loop or switch statement is never executed). It is important to know that functions are not always inlined even if they are declared as such; for example, virtual and recursive functions are not normally inlined. Usually recursive functions should not be inline. The main reason for making a virtual function inline is to place its definition in the class, either for convenience or to document its behavior, e.g., for accessors and mutators. The -inl.h Files link ▶You may use file names with a -inl.h suffix to define complex inline functions when needed. The definition of an inline function needs to be in a header file, so that the compiler has the definition available for inlining at the call sites. However, implementation code properly belongs in .cc files, and we do not like to have much actual code in .h files unless there is a readability or performance advantage. If an inline function definition is short, with very little, if any, logic in it, you should put the code in your .h file. For example, accessors and mutators should certainly be inside a class definition. More complex inline functions may also be put in a .h file for the convenience of the implementer and callers, though if this makes the .h file too unwieldy you can instead put that code in a separate -inl.h file. This separates the implementation from the class definition, while still allowing the implementation to be included where necessary. Another use of -inl.h files is for definitions of function templates. This can be used to keep your template definitions easy to read. Do not forget that a -inl.h file requires a #define guard just like any other header file. Function Parameter Ordering link ▶When defining a function, parameter order is: inputs, then outputs. Parameters to C/C++ functions are either input to the function, output from the function, or both. Input parameters are usually values or const references, while output and input/output parameters will be non-const pointers. When ordering function parameters, put all input-only parameters before any output parameters. In particular, do not add new parameters to the end of the function just because they are new; place new input-only parameters before the output parameters. This is not a hard-and-fast rule. Parameters that are both input and output (often classes/structs) muddy the waters, and, as always, consistency with related functions may require you to bend the rule. Names and Order of Includes link ▶Use standard order for readability and to avoid hidden dependencies: C library, C++ library, other libraries' .h, your project's .h. All of a project's header files should be listed as descentants of the project's source directory without use of UNIX directory shortcuts . (the current directory) or .. (the parent directory). For example, google-awesome-project/src/base/logging.h should be included as #include "base/logging.h" In dir/foo.cc, whose main purpose is to implement or test the stuff in dir2/foo2.h, order your includes as follows: dir2/foo2.h (preferred location — see details below). C system files. C++ system files. Other libraries' .h files. Your project's .h files. The preferred ordering reduces hidden dependencies. We want every header file to be compilable on its own. The easiest way to achieve this is to make sure that every one of them is the first .h file #included in some .cc. dir/foo.cc and dir2/foo2.h are often in the same directory (e.g. base/basictypes_test.cc and base/basictypes.h), but can be in different directories too. Within each section it is nice to order the includes alphabetically. For example, the includes in google-awesome-project/src/foo/internal/fooserver.cc might look like this: #include "foo/public/fooserver.h" // Preferred location. #include #include #include #include #include "base/basictypes.h" #include "base/commandlineflags.h" #include "foo/public/bar.h" Scoping Namespaces link ▶Unnamed namespaces in .cc files are encouraged. With named namespaces, choose the name based on the project, and possibly its path. Do not use a using-directive. Definition: Namespaces subdivide the global scope into distinct, named scopes, and so are useful for preventing name collisions in the global scope. Pros: Namespaces provide a (hierarchical) axis of naming, in addition to the (also hierarchical) name axis provided by classes. For example, if two different projects have a class Foo in the global scope, these symbols may collide at compile time or at runtime. If each project places their code in a namespace, project1::Foo and project2::Foo are now distinct symbols that do not collide. Cons: Namespaces can be confusing, because they provide an additional (hierarchical) axis of naming, in addition to the (also hierarchical) name axis provided by classes. Use of unnamed spaces in header files can easily cause violations of the C++ One Definition Rule (ODR). Decision: Use namespaces according to the policy described below. Unnamed Namespaces Unnamed namespaces are allowed and even encouraged in .cc files, to avoid runtime naming conflicts: namespace { // This is in a .cc file. // The content of a namespace is not indented enum { kUnused, kEOF, kError }; // Commonly used tokens. bool AtEof() { return pos_ == kEOF; } // Uses our namespace's EOF. } // namespace However, file-scope declarations that are associated with a particular class may be declared in that class as types, static data members or static member functions rather than as members of an unnamed namespace. Terminate the unnamed namespace as shown, with a comment // namespace. Do not use unnamed namespaces in .h files. Named Namespaces Named namespaces should be used as follows: Namespaces wrap the entire source file after includes, gflags definitions/declarations, and forward declarations of classes from other namespaces: // In the .h file namespace mynamespace { // All declarations are within the namespace scope. // Notice the lack of indentation. class MyClass { public: ... void Foo(); }; } // namespace mynamespace // In the .cc file namespace mynamespace { // Definition of functions is within scope of the namespace. void MyClass::Foo() { ... } } // namespace mynamespace The typical .cc file might have more complex detail, including the need to reference classes in other namespaces. #include "a.h" DEFINE_bool(someflag, false, "dummy flag"); class C; // Forward declaration of class C in the global namespace. namespace a { class A; } // Forward declaration of a::A. namespace b { ...code for b... // Code goes against the left margin. } // namespace b Do not declare anything in namespace std, not even forward declarations of standard library classes. Declaring entities in namespace std is undefined behavior, i.e., not portable. To declare entities from the standard library, include the appropriate header file. You may not use a using-directive to make all names from a namespace available. // Forbidden -- This pollutes the namespace. using namespace foo; You may use a using-declaration anywhere in a .cc file, and in functions, methods or classes in .h files. // OK in .cc files. // Must be in a function, method or class in .h files. using ::foo::bar; Namespace aliases are allowed anywhere in a .cc file, anywhere inside the named namespace that wraps an entire .h file, and in functions and methods. // Shorten access to some commonly used names in .cc files. namespace fbz = ::foo::bar::baz; // Shorten access to some commonly used names (in a .h file). namespace librarian { // The following alias is available to all files including // this header (in namespace librarian): // alias names should therefore be chosen consistently // within a project. namespace pd_s = ::pipeline_diagnostics::sidetable; inline void my_inline_function() { // namespace alias local to a function (or method). namespace fbz = ::foo::bar::baz; ... } } // namespace librarian Note that an alias in a .h file is visible to everyone #including that file, so public headers (those available outside a project) and headers transitively #included by them, should avoid defining aliases, as part of the general goal of keeping public APIs as small as possible. Nested Classes link ▶Although you may use public nested classes when they are part of an interface, consider a namespace to keep declarations out of the global scope. Definition: A class can define another class within it; this is also called a member class. class Foo { private: // Bar is a member class, nested within Foo. class Bar { ... }; }; Pros: This is useful when the nested (or member) class is only used by the enclosing class; making it a member puts it in the enclosing class scope rather than polluting the outer scope with the class name. Nested classes can be forward declared within the enclosing class and then defined in the .cc file to avoid including the nested class definition in the enclosing class declaration, since the nested class definition is usually only relevant to the implementation. Cons: Nested classes can be forward-declared only within the definition of the enclosing class. Thus, any header file manipulating a Foo::Bar* pointer will have to include the full class declaration for Foo. Decision: Do not make nested classes public unless they are actually part of the interface, e.g., a class that holds a set of options for some method. Nonmember, Static Member, and Global Functions link ▶Prefer nonmember functions within a namespace or static member functions to global functions; use completely global functions rarely. Pros: Nonmember and static member functions can be useful in some situations. Putting nonmember functions in a namespace avoids polluting the global namespace. Cons: Nonmember and static member functions may make more sense as members of a new class, especially if they access external resources or have significant dependencies. Decision: Sometimes it is useful, or even necessary, to define a function not bound to a class instance. Such a function can be either a static member or a nonmember function. Nonmember functions should not depend on external variables, and should nearly always exist in a namespace. Rather than creating classes only to group static member functions which do not share static data, use namespaces instead. Functions defined in the same compilation unit as production classes may introduce unnecessary coupling and link-time dependencies when directly called from other compilation units; static member functions are particularly susceptible to this. Consider extracting a new class, or placing the functions in a namespace possibly in a separate library. If you must define a nonmember function and it is only needed in its .cc file, use an unnamed namespace or static linkage (eg static int Foo() {...}) to limit its scope. Local Variables link ▶Place a function's variables in the narrowest scope possible, and initialize variables in the declaration. C++ allows you to declare variables anywhere in a function. We encourage you to declare them in as local a scope as possible, and as close to the first use as possible. This makes it easier for the reader to find the declaration and see what type the variable is and what it was initialized to. In particular, initialization should be used instead of declaration and assignment, e.g. int i; i = f(); // Bad -- initialization separate from declaration. int j = g(); // Good -- declaration has initialization. Note that gcc implements for (int i = 0; i < 10; ++i) correctly (the scope of i is only the scope of the for loop), so you can then reuse i in another for loop in the same scope. It also correctly scopes declarations in if and while statements, e.g. while (const char* p = strchr(str, '/')) str = p + 1; There is one caveat: if the variable is an object, its constructor is invoked every time it enters scope and is created, and its destructor is invoked every time it goes out of scope. // Inefficient implementation: for (int i = 0; i < 1000000; ++i) { Foo f; // My ctor and dtor get called 1000000 times each. f.DoSomething(i); } It may be more efficient to declare such a variable used in a loop outside that loop: Foo f; // My ctor and dtor get called once each. for (int i = 0; i < 1000000; ++i) { f.DoSomething(i); } Static and Global Variables link ▶Static or global variables of class type are forbidden: they cause hard-to-find bugs due to indeterminate order of construction and destruction. Objects with static storage duration, including global variables, static variables, static class member variables, and function static variables, must be Plain Old Data (POD): only ints, chars, floats, or pointers, or arrays/structs of POD. The order in which class constructors and initializers for static variables are called is only partially specified in C++ and can even change from build to build, which can cause bugs that are difficult to find. Therefore in addition to banning globals of class type, we do not allow static POD variables to be initialized with the result of a function, unless that function (such as getenv(), or getpid()) does not itself depend on any other globals. Likewise, the order in which destructors are called is defined to be the reverse of the order in which the constructors were called. Since constructor order is indeterminate, so is destructor order. For example, at program-end time a static variable might have been destroyed, but code still running -- perhaps in another thread -- tries to access it and fails. Or the destructor for a static 'string' variable might be run prior to the destructor for another variable that contains a reference to that string. As a result we only allow static variables to contain POD data. This rule completely disallows vector (use C arrays instead), or string (use const char []). If you need a static or global variable of a class type, consider initializing a pointer (which will never be freed), from either your main() function or from pthread_once(). Note that this must be a raw pointer, not a "smart" pointer, since the smart pointer's destructor will have the order-of-destructor issue that we are trying to avoid. Classes Classes are the fundamental unit of code in C++. Naturally, we use them extensively. This section lists the main dos and don'ts you should follow when writing a class. Doing Work in Constructors link ▶In general, constructors should merely set member variables to their initial values. Any complex initialization should go in an explicit Init() method. Definition: It is possible to perform initialization in the body of the constructor. Pros: Convenience in typing. No need to worry about whether the class has been initialized or not. Cons: The problems with doing work in constructors are: There is no easy way for constructors to signal errors, short of using exceptions (which are forbidden). If the work fails, we now have an object whose initialization code failed, so it may be an indeterminate state. If the work calls virtual functions, these calls will not get dispatched to the subclass implementations. Future modification to your class can quietly introduce this problem even if your class is not currently subclassed, causing much confusion. If someone creates a global variable of this type (which is against the rules, but still), the constructor code will be called before main(), possibly breaking some implicit assumptions in the constructor code. For instance, gflags will not yet have been initialized. Decision: If your object requires non-trivial initialization, consider having an explicit Init() method. In particular, constructors should not call virtual functions, attempt to raise errors, access potentially uninitialized global variables, etc. Default Constructors link ▶You must define a default constructor if your class defines member variables and has no other constructors. Otherwise the compiler will do it for you, badly. Definition: The default constructor is called when we new a class object with no arguments. It is always called when calling new[] (for arrays). Pros: Initializing structures by default, to hold "impossible" values, makes debugging much easier. Cons: Extra work for you, the code writer. Decision: If your class defines member variables and has no other constructors you must define a default constructor (one that takes no arguments). It should preferably initialize the object in such a way that its internal state is consistent and valid. The reason for this is that if you have no other constructors and do not define a default constructor, the compiler will generate one for you. This compiler generated constructor may not initialize your object sensibly. If your class inherits from an existing class but you add no new member variables, you are not required to have a default constructor. Explicit Constructors link ▶Use the C++ keyword explicit for constructors with one argument. Definition: Normally, if a constructor takes one argument, it can be used as a conversion. For instance, if you define Foo::Foo(string name) and then pass a string to a function that expects a Foo, the constructor will be called to convert the string into a Foo and will pass the Foo to your function for you. This can be convenient but is also a source of trouble when things get converted and new objects created without you meaning them to. Declaring a constructor explicit prevents it from being invoked implicitly as a conversion. Pros: Avoids undesirable conversions. Cons: None. Decision: We require all single argument constructors to be explicit. Always put explicit in front of one-argument constructors in the class definition: explicit Foo(string name); The exception is copy constructors, which, in the rare cases when we allow them, should probably not be explicit. Classes that are intended to be transparent wrappers around other classes are also exceptions. Such exceptions should be clearly marked with comments. Copy Constructors link ▶Provide a copy constructor and assignment operator only when necessary. Otherwise, disable them with DISALLOW_COPY_AND_ASSIGN. Definition: The copy constructor and assignment operator are used to create copies of objects. The copy constructor is implicitly invoked by the compiler in some situations, e.g. passing objects by value. Pros: Copy constructors make it easy to copy objects. STL containers require that all contents be copyable and assignable. Copy constructors can be more efficient than CopyFrom()-style workarounds because they combine construction with copying, the compiler can elide them in some contexts, and they make it easier to avoid heap allocation. Cons: Implicit copying of objects in C++ is a rich source of bugs and of performance problems. It also reduces readability, as it becomes hard to track which objects are being passed around by value as opposed to by reference, and therefore where changes to an object are reflected. Decision: Few classes need to be copyable. Most should have neither a copy constructor nor an assignment operator. In many situations, a pointer or reference will work just as well as a copied value, with better performance. For example, you can pass function parameters by reference or pointer instead of by value, and you can store pointers rather than objects in an STL container. If your class needs to be copyable, prefer providing a copy method, such as CopyFrom() or Clone(), rather than a copy constructor, because such methods cannot be invoked implicitly. If a copy method is insufficient in your situation (e.g. for performance reasons, or because your class needs to be stored by value in an STL container), provide both a copy constructor and assignment operator. If your class does not need a copy constructor or assignment operator, you must explicitly disable them. To do so, add dummy declarations for the copy constructor and assignment operator in the private: section of your class, but do not provide any corresponding definition (so that any attempt to use them results in a link error). For convenience, a DISALLOW_COPY_AND_ASSIGN macro can be used: // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declarations for a class #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) Then, in class Foo: class Foo { public: Foo(int f); ~Foo(); private: DISALLOW_COPY_AND_ASSIGN(Foo); }; Structs vs. Classes link ▶Use a struct only for passive objects that carry data; everything else is a class. The struct and class keywords behave almost identically in C++. We add our own semantic meanings to each keyword, so you should use the appropriate keyword for the data-type you're defining. structs should be used for passive objects that carry data, and may have associated constants, but lack any functionality other than access/setting the data members. The accessing/setting of fields is done by directly accessing the fields rather than through method invocations. Methods should not provide behavior but should only be used to set up the data members, e.g., constructor, destructor, Initialize(), Reset(), Validate(). If more functionality is required, a class is more appropriate. If in doubt, make it a class. For consistency with STL, you can use struct instead of class for functors and traits. Note that member variables in structs and classes have different naming rules. Inheritance link ▶Composition is often more appropriate than inheritance. When using inheritance, make it public. Definition: When a sub-class inherits from a base class, it includes the definitions of all the data and operations that the parent base class defines. In practice, inheritance is used in two major ways in C++: implementation inheritance, in which actual code is inherited by the child, and interface inheritance, in which only method names are inherited. Pros: Implementation inheritance reduces code size by re-using the base class code as it specializes an existing type. Because inheritance is a compile-time declaration, you and the compiler can understand the operation and detect errors. Interface inheritance can be used to programmatically enforce that a class expose a particular API. Again, the compiler can detect errors, in this case, when a class does not define a necessary method of the API. Cons: For implementation inheritance, because the code implementing a sub-class is spread between the base and the sub-class, it can be more difficult to understand an implementation. The sub-class cannot override functions that are not virtual, so the sub-class cannot change implementation. The base class may also define some data members, so that specifies physical layout of the base class. Decision: All inheritance should be public. If you want to do private inheritance, you should be including an instance of the base class as a member instead. Do not overuse implementation inheritance. Composition is often more appropriate. Try to restrict use of inheritance to the "is-a" case: Bar subclasses Foo if it can reasonably be said that Bar "is a kind of" Foo. Make your destructor virtual if necessary. If your class has virtual methods, its destructor should be virtual. Limit the use of protected to those member functions that might need to be accessed from subclasses. Note that data members should be private. When redefining an inherited virtual function, explicitly declare it virtual in the declaration of the derived class. Rationale: If virtual is omitted, the reader has to check all ancestors of the class in question to determine if the function is virtual or not. Multiple Inheritance link ▶Only very rarely is multiple implementation inheritance actually useful. We allow multiple inheritance only when at most one of the base classes has an implementation; all other base classes must be pure interface classes tagged with the Interface suffix. Definition: Multiple inheritance allows a sub-class to have more than one base class. We distinguish between base classes that are pure interfaces and those that have an implementation. Pros: Multiple implementation inheritance may let you re-use even more code than single inheritance (see Inheritance). Cons: Only very rarely is multiple implementation inheritance actually useful. When multiple implementation inheritance seems like the solution, you can usually find a different, more explicit, and cleaner solution. Decision: Multiple inheritance is allowed only when all superclasses, with the possible exception of the first one, are pure interfaces. In order to ensure that they remain pure interfaces, they must end with the Interface suffix. Note: There is an exception to this rule on Windows. Interfaces link ▶Classes that satisfy certain conditions are allowed, but not required, to end with an Interface suffix. Definition: A class is a pure interface if it meets the following requirements: It has only public pure virtual ("= 0") methods and static methods (but see below for destructor). It may not have non-static data members. It need not have any constructors defined. If a constructor is provided, it must take no arguments and it must be protected. If it is a subclass, it may only be derived from classes that satisfy these conditions and are tagged with the Interface suffix. An interface class can never be directly instantiated because of the pure virtual method(s) it declares. To make sure all implementations of the interface can be destroyed correctly, they must also declare a virtual destructor (in an exception to the first rule, this should not be pure). See Stroustrup, The C++ Programming Language, 3rd edition, section 12.4 for details. Pros: Tagging a class with the Interface suffix lets others know that they must not add implemented methods or non static data members. This is particularly important in the case of multiple inheritance. Additionally, the interface concept is already well-understood by Java programmers. Cons: The Interface suffix lengthens the class name, which can make it harder to read and understand. Also, the interface property may be considered an implementation detail that shouldn't be exposed to clients. Decision: A class may end with Interface only if it meets the above requirements. We do not require the converse, however: classes that meet the above requirements are not required to end with Interface. Operator Overloading link ▶Do not overload operators except in rare, special circumstances. Definition: A class can define that operators such as + and / operate on the class as if it were a built-in type. Pros: Can make code appear more intuitive because a class will behave in the same way as built-in types (such as int). Overloaded operators are more playful names for functions that are less-colorfully named, such as Equals() or Add(). For some template functions to work correctly, you may need to define operators. Cons: While operator overloading can make code more intuitive, it has several drawbacks: It can fool our intuition into thinking that expensive operations are cheap, built-in operations. It is much harder to find the call sites for overloaded operators. Searching for Equals() is much easier than searching for relevant invocations of ==. Some operators work on pointers too, making it easy to introduce bugs. Foo + 4 may do one thing, while &Foo + 4 does something totally different. The compiler does not complain for either of these, making this very hard to debug. Overloading also has surprising ramifications. For instance, if a class overloads unary operator&, it cannot safely be forward-declared. Decision: In general, do not overload operators. The assignment operator (operator=), in particular, is insidious and should be avoided. You can define functions like Equals() and CopyFrom() if you need them. Likewise, avoid the dangerous unary operator& at all costs, if there's any possibility the class might be forward-declared. However, there may be rare cases where you need to overload an operator to interoperate with templates or "standard" C++ classes (such as operator<<(ostream&, const T&) for logging). These are acceptable if fully justified, but you should try to avoid these whenever possible. In particular, do not overload operator== or operator< just so that your class can be used as a key in an STL container; instead, you should create equality and comparison functor types when declaring the container. Some of the STL algorithms do require you to overload operator==, and you may do so in these cases, provided you document why. See also Copy Constructors and Function Overloading. Access Control link ▶Make data members private, and provide access to them through accessor functions as needed (for technical reasons, we allow data members of a test fixture class to be protected when using Google Test). Typically a variable would be called foo_ and the accessor function foo(). You may also want a mutator function set_foo(). Exception: static const data members (typically called kFoo) need not be private. The definitions of accessors are usually inlined in the header file. See also Inheritance and Function Names. Declaration Order link ▶Use the specified order of declarations within a class: public: before private:, methods before data members (variables), etc. Your class definition should start with its public: section, followed by its protected: section and then its private: section. If any of these sections are empty, omit them. Within each section, the declarations generally should be in the following order: Typedefs and Enums Constants (static const data members) Constructors Destructor Methods, including static methods Data Members (except static const data members) Friend declarations should always be in the private section, and the DISALLOW_COPY_AND_ASSIGN macro invocation should be at the end of the private: section. It should be the last thing in the class. See Copy Constructors. Method definitions in the corresponding .cc file should be the same as the declaration order, as much as possible. Do not put large method definitions inline in the class definition. Usually, only trivial or performance-critical, and very short, methods may be defined inline. See Inline Functions for more details. Write Short Functions link ▶Prefer small and focused functions. We recognize that long functions are sometimes appropriate, so no hard limit is placed on functions length. If a function exceeds about 40 lines, think about whether it can be broken up without harming the structure of the program. Even if your long function works perfectly now, someone modifying it in a few months may add new behavior. This could result in bugs that are hard to find. Keeping your functions short and simple makes it easier for other people to read and modify your code. You could find long and complicated functions when working with some code. Do not be intimidated by modifying existing code: if working with such a function proves to be difficult, you find that errors are hard to debug, or you want to use a piece of it in several different contexts, consider breaking up the function into smaller and more manageable pieces. Google-Specific Magic There are various tricks and utilities that we use to make C++ code more robust, and various ways we use C++ that may differ from what you see elsewhere. Smart Pointers link ▶If you actually need pointer semantics, scoped_ptr is great. You should only use std::tr1::shared_ptr under very specific conditions, such as when objects need to be held by STL containers. You should never use auto_ptr. "Smart" pointers are objects that act like pointers but have added semantics. When a scoped_ptr is destroyed, for instance, it deletes the object it's pointing to. shared_ptr is the same way, but implements reference-counting so only the last pointer to an object deletes it. Generally speaking, we prefer that we design code with clear object ownership. The clearest object ownership is obtained by using an object directly as a field or local variable, without using pointers at all. On the other extreme, by their very definition, reference counted pointers are owned by nobody. The problem with this design is that it is easy to create circular references or other strange conditions that cause an object to never be deleted. It is also slow to perform atomic operations every time a value is copied or assigned. Although they are not recommended, reference counted pointers are sometimes the simplest and most elegant way to solve a problem. cpplint link ▶Use cpplint.py to detect style errors. cpplint.py is a tool that reads a source file and identifies many style errors. It is not perfect, and has both false positives and false negatives, but it is still a valuable tool. False positives can be ignored by putting // NOLINT at the end of the line. Some projects have instructions on how to run cpplint.py from their project tools. If the project you are contributing to does not, you can download cpplint.py separately. Other C++ Features Reference Arguments link ▶All parameters passed by reference must be labeled const. Definition: In C, if a function needs to modify a variable, the parameter must use a pointer, eg int foo(int *pval). In C++, the function can alternatively declare a reference parameter: int foo(int &val). Pros: Defining a parameter as reference avoids ugly code like (*pval)++. Necessary for some applications like copy constructors. Makes it clear, unlike with pointers, that NULL is not a possible value. Cons: References can be confusing, as they have value syntax but pointer semantics. Decision: Within function parameter lists all references must be const: void Foo(const string &in, string *out); In fact it is a very strong convention in Google code that input arguments are values or const references while output arguments are pointers. Input parameters may be const pointers, but we never allow non-const reference parameters. One case when you might want an input parameter to be a const pointer is if you want to emphasize that the argument is not copied, so it must exist for the lifetime of the object; it is usually best to document this in comments as well. STL adapters such as bind2nd and mem_fun do not permit reference parameters, so you must declare functions with pointer parameters in these cases, too. Function Overloading link ▶Use overloaded functions (including constructors) only if a reader looking at a call site can get a good idea of what is happening without having to first figure out exactly which overload is being called. Definition: You may write a function that takes a const string& and overload it with another that takes const char*. class MyClass { public: void Analyze(const string &text); void Analyze(const char *text, size_t textlen); }; Pros: Overloading can make code more intuitive by allowing an identically-named function to take different arguments. It may be necessary for templatized code, and it can be convenient for Visitors. Cons: If a function is overloaded by the argument types alone, a reader may have to understand C++'s complex matching rules in order to tell what's going on. Also many people are confused by the semantics of inheritance if a derived class overrides only some of the variants of a function. Decision: If you want to overload a function, consider qualifying the name with some information about the arguments, e.g., AppendString(), AppendInt() rather than just Append(). Default Arguments link ▶We do not allow default function parameters, except in a few uncommon situations explained below. Pros: Often you have a function that uses lots of default values, but occasionally you want to override the defaults. Default parameters allow an easy way to do this without having to define many functions for the rare exceptions. Cons: People often figure out how to use an API by looking at existing code that uses it. Default parameters are more difficult to maintain because copy-and-paste from previous code may not reveal all the parameters. Copy-and-pasting of code segments can cause major problems when the default arguments are not appropriate for the new code. Decision: Except as described below, we require all arguments to be explicitly specified, to force programmers to consider the API and the values they are passing for each argument rather than silently accepting defaults they may not be aware of. One specific exception is when default arguments are used to simulate variable-length argument lists. // Support up to 4 params by using a default empty AlphaNum. string StrCat(const AlphaNum &a, const AlphaNum &b = gEmptyAlphaNum, const AlphaNum &c = gEmptyAlphaNum, const AlphaNum &d = gEmptyAlphaNum); Variable-Length Arrays and alloca() link ▶We do not allow variable-length arrays or alloca(). Pros: Variable-length arrays have natural-looking syntax. Both variable-length arrays and alloca() are very efficient. Cons: Variable-length arrays and alloca are not part of Standard C++. More importantly, they allocate a data-dependent amount of stack space that can trigger difficult-to-find memory overwriting bugs: "It ran fine on my machine, but dies mysteriously in production". Decision: Use a safe allocator instead, such as scoped_ptr/scoped_array. Friends link ▶We allow use of friend classes and functions, within reason. Friends should usually be defined in the same file so that the reader does not have to look in another file to find uses of the private members of a class. A common use of friend is to have a FooBuilder class be a friend of Foo so that it can construct the inner state of Foo correctly, without exposing this state to the world. In some cases it may be useful to make a unittest class a friend of the class it tests. Friends extend, but do not break, the encapsulation boundary of a class. In some cases this is better than making a member public when you want to give only one other class access to it. However, most classes should interact with other classes solely through their public members. Exceptions link ▶We do not use C++ exceptions. Pros: Exceptions allow higher levels of an application to decide how to handle "can't happen" failures in deeply nested functions, without the obscuring and error-prone bookkeeping of error codes. Exceptions are used by most other modern languages. Using them in C++ would make it more consistent with Python, Java, and the C++ that others are familiar with. Some third-party C++ libraries use exceptions, and turning them off internally makes it harder to integrate with those libraries. Exceptions are the only way for a constructor to fail. We can simulate this with a factory function or an Init() method, but these require heap allocation or a new "invalid" state, respectively. Exceptions are really handy in testing frameworks. Cons: When you add a throw statement to an existing function, you must examine all of its transitive callers. Either they must make at least the basic exception safety guarantee, or they must never catch the exception and be happy with the program terminating as a result. For instance, if f() calls g() calls h(), and h throws an exception that f catches, g has to be careful or it may not clean up properly. More generally, exceptions make the control flow of programs difficult to evaluate by looking at code: functions may return in places you don't expect. This causes maintainability and debugging difficulties. You can minimize this cost via some rules on how and where exceptions can be used, but at the cost of more that a developer needs to know and understand. Exception safety requires both RAII and different coding practices. Lots of supporting machinery is needed to make writing correct exception-safe code easy. Further, to avoid requiring readers to understand the entire call graph, exception-safe code must isolate logic that writes to persistent state into a "commit" phase. This will have both benefits and costs (perhaps where you're forced to obfuscate code to isolate the commit). Allowing exceptions would force us to always pay those costs even when they're not worth it. Turning on exceptions adds data to each binary produced, increasing compile time (probably slightly) and possibly increasing address space pressure. The availability of exceptions may encourage developers to throw them when they are not appropriate or recover from them when it's not safe to do so. For example, invalid user input should not cause exceptions to be thrown. We would need to make the style guide even longer to document these restrictions! Decision: On their face, the benefits of using exceptions outweigh the costs, especially in new projects. However, for existing code, the introduction of exceptions has implications on all dependent code. If exceptions can be propagated beyond a new project, it also becomes problematic to integrate the new project into existing exception-free code. Because most existing C++ code at Google is not prepared to deal with exceptions, it is comparatively difficult to adopt new code that generates exceptions. Given that Google's existing code is not exception-tolerant, the costs of using exceptions are somewhat greater than the costs in a new project. The conversion process would be slow and error-prone. We don't believe that the available alternatives to exceptions, such as error codes and assertions, introduce a significant burden. Our advice against using exceptions is not predicated on philosophical or moral grounds, but practical ones. Because we'd like to use our open-source projects at Google and it's difficult to do so if those projects use exceptions, we need to advise against exceptions in Google open-source projects as well. Things would probably be different if we had to do it all over again from scratch. There is an exception to this rule (no pun intended) for Windows code. Run-Time Type Information (RTTI) link ▶We do not use Run Time Type Information (RTTI). Definition: RTTI allows a programmer to query the C++ class of an object at run time. Pros: It is useful in some unittests. For example, it is useful in tests of factory classes where the test has to verify that a newly created object has the expected dynamic type. In rare circumstances, it is useful even outside of tests. Cons: A query of type during run-time typically means a design problem. If you need to know the type of an object at runtime, that is often an indication that you should reconsider the design of your class. Decision: Do not use RTTI, except in unittests. If you find yourself in need of writing code that behaves differently based on the class of an object, consider one of the alternatives to querying the type. Virtual methods are the preferred way of executing different code paths depending on a specific subclass type. This puts the work within the object itself. If the work belongs outside the object and instead in some processing code, consider a double-dispatch solution, such as the Visitor design pattern. This allows a facility outside the object itself to determine the type of class using the built-in type system. If you think you truly cannot use those ideas, you may use RTTI. But think twice about it. :-) Then think twice again. Do not hand-implement an RTTI-like workaround. The arguments against RTTI apply just as much to workarounds like class hierarchies with type tags. Casting link ▶Use C++ casts like static_cast(). Do not use other cast formats like int y = (int)x; or int y = int(x);. Definition: C++ introduced a different cast system from C that distinguishes the types of cast operations. Pros: The problem with C casts is the ambiguity of the operation; sometimes you are doing a conversion (e.g., (int)3.5) and sometimes you are doing a cast (e.g., (int)"hello"); C++ casts avoid this. Additionally C++ casts are more visible when searching for them. Cons: The syntax is nasty. Decision: Do not use C-style casts. Instead, use these C++-style casts. Use static_cast as the equivalent of a C-style cast that does value conversion, or when you need to explicitly up-cast a pointer from a class to its superclass. Use const_cast to remove the const qualifier (see const). Use reinterpret_cast to do unsafe conversions of pointer types to and from integer and other pointer types. Use this only if you know what you are doing and you understand the aliasing issues. Do not use dynamic_cast except in test code. If you need to know type information at runtime in this way outside of a unittest, you probably have a design flaw. Streams link ▶Use streams only for logging. Definition: Streams are a replacement for printf() and scanf(). Pros: With streams, you do not need to know the type of the object you are printing. You do not have problems with format strings not matching the argument list. (Though with gcc, you do not have that problem with printf either.) Streams have automatic constructors and destructors that open and close the relevant files. Cons: Streams make it difficult to do functionality like pread(). Some formatting (particularly the common format string idiom %.*s) is difficult if not impossible to do efficiently using streams without using printf-like hacks. Streams do not support operator reordering (the %1s directive), which is helpful for internationalization. Decision: Do not use streams, except where required by a logging interface. Use printf-like routines instead. There are various pros and cons to using streams, but in this case, as in many other cases, consistency trumps the debate. Do not use streams in your code. Extended Discussion There has been debate on this issue, so this explains the reasoning in greater depth. Recall the Only One Way guiding principle: we want to make sure that whenever we do a certain type of I/O, the code looks the same in all those places. Because of this, we do not want to allow users to decide between using streams or using printf plus Read/Write/etc. Instead, we should settle on one or the other. We made an exception for logging because it is a pretty specialized application, and for historical reasons. Proponents of streams have argued that streams are the obvious choice of the two, but the issue is not actually so clear. For every advantage of streams they point out, there is an equivalent disadvantage. The biggest advantage is that you do not need to know the type of the object to be printing. This is a fair point. But, there is a downside: you can easily use the wrong type, and the compiler will not warn you. It is easy to make this kind of mistake without knowing when using streams. cout << this; // Prints the address cout << *this; // Prints the contents The compiler does not generate an error because << has been overloaded. We discourage overloading for just this reason. Some say printf formatting is ugly and hard to read, but streams are often no better. Consider the following two fragments, both with the same typo. Which is easier to discover? cerr << "Error connecting to '" hostname.first << ":" hostname.second << ": " hostname.first, foo->bar()->hostname.second, strerror(errno)); And so on and so forth for any issue you might bring up. (You could argue, "Things would be better with the right wrappers," but if it is true for one scheme, is it not also true for the other? Also, remember the goal is to make the language smaller, not add yet more machinery that someone has to learn.) Either path would yield different advantages and disadvantages, and there is not a clearly superior solution. The simplicity doctrine mandates we settle on one of them though, and the majority decision was on printf + read/write. Preincrement and Predecrement link ▶Use prefix form (++i) of the increment and decrement operators with iterators and other template objects. Definition: When a variable is incremented (++i or i++) or decremented (--i or i--) and the value of the expression is not used, one must decide whether to preincrement (decrement) or postincrement (decrement). Pros: When the return value is ignored, the "pre" form (++i) is never less efficient than the "post" form (i++), and is often more efficient. This is because post-increment (or decrement) requires a copy of i to be made, which is the value of the expression. If i is an iterator or other non-scalar type, copying i could be expensive. Since the two types of increment behave the same when the value is ignored, why not just always pre-increment? Cons: The tradition developed, in C, of using post-increment when the expression value is not used, especially in for loops. Some find post-increment easier to read, since the "subject" (i) precedes the "verb" (++), just like in English. Decision: For simple scalar (non-object) values there is no reason to prefer one form and we allow either. For iterators and other template types, use pre-increment. Use of const link ▶We strongly recommend that you use const whenever it makes sense to do so. Definition: Declared variables and parameters can be preceded by the keyword const to indicate the variables are not changed (e.g., const int foo). Class functions can have the const qualifier to indicate the function does not change the state of the class member variables (e.g., class Foo { int Bar(char c) const; };). Pros: Easier for people to understand how variables are being used. Allows the compiler to do better type checking, and, conceivably, generate better code. Helps people convince themselves of program correctness because they know the functions they call are limited in how they can modify your variables. Helps people know what functions are safe to use without locks in multi-threaded programs. Cons: const is viral: if you pass a const variable to a function, that function must have const in its prototype (or the variable will need a const_cast). This can be a particular problem when calling library functions. Decision: const variables, data members, methods and arguments add a level of compile-time type checking; it is better to detect errors as soon as possible. Therefore we strongly recommend that you use const whenever it makes sense to do so: If a function does not modify an argument passed by reference or by pointer, that argument should be const. Declare methods to be const whenever possible. Accessors should almost always be const. Other methods should be const if they do not modify any data members, do not call any non-const methods, and do not return a non-const pointer or non-const reference to a data member. Consider making data members const whenever they do not need to be modified after construction. However, do not go crazy with const. Something like const int * const * const x; is likely overkill, even if it accurately describes how const x is. Focus on what's really useful to know: in this case, const int** x is probably sufficient. The mutable keyword is allowed but is unsafe when used with threads, so thread safety should be carefully considered first. Where to put the const Some people favor the form int const *foo to const int* foo. They argue that this is more readable because it's more consistent: it keeps the rule that const always follows the object it's describing. However, this consistency argument doesn't apply in this case, because the "don't go crazy" dictum eliminates most of the uses you'd have to be consistent with. Putting the const first is arguably more readable, since it follows English in putting the "adjective" (const) before the "noun" (int). That said, while we encourage putting const first, we do not require it. But be consistent with the code around you! Integer Types link ▶Of the built-in C++ integer types, the only one used is int. If a program needs a variable of a different size, use a precise-width integer type from , such as int16_t. Definition: C++ does not specify the sizes of its integer types. Typically people assume that short is 16 bits, int is 32 bits, long is 32 bits and long long is 64 bits. Pros: Uniformity of declaration. Cons: The sizes of integral types in C++ can vary based on compiler and architecture. Decision: defines types like int16_t, uint32_t, int64_t, etc. You should always use those in preference to short, unsigned long long and the like, when you need a guarantee on the size of an integer. Of the C integer types, only int should be used. When appropriate, you are welcome to use standard types like size_t and ptrdiff_t. We use int very often, for integers we know are not going to be too big, e.g., loop counters. Use plain old int for such things. You should assume that an int is at least 32 bits, but don't assume that it has more than 32 bits. If you need a 64-bit integer type, use int64_t or uint64_t. For integers we know can be "big", use int64_t. You should not use the unsigned integer types such as uint32_t, unless the quantity you are representing is really a bit pattern rather than a number, or unless you need defined twos-complement overflow. In particular, do not use unsigned types to say a number will never be negative. Instead, use assertions for this. On Unsigned Integers Some people, including some textbook authors, recommend using unsigned types to represent numbers that are never negative. This is intended as a form of self-documentation. However, in C, the advantages of such documentation are outweighed by the real bugs it can introduce. Consider: for (unsigned int i = foo.Length()-1; i >= 0; --i) ... This code will never terminate! Sometimes gcc will notice this bug and warn you, but often it will not. Equally bad bugs can occur when comparing signed and unsigned variables. Basically, C's type-promotion scheme causes unsigned types to behave differently than one might expect. So, document that a variable is non-negative using assertions. Don't use an unsigned type. 64-bit Portability link ▶Code should be 64-bit and 32-bit friendly. Bear in mind problems of printing, comparisons, and structure alignment. printf() specifiers for some types are not cleanly portable between 32-bit and 64-bit systems. C99 defines some portable format specifiers. Unfortunately, MSVC 7.1 does not understand some of these specifiers and the standard is missing a few, so we have to define our own ugly versions in some cases (in the style of the standard include file inttypes.h): // printf macros for size_t, in the style of inttypes.h #ifdef _LP64 #define __PRIS_PREFIX "z" #else #define __PRIS_PREFIX #endif // Use these macros after a % in a printf format string // to get correct 32/64 bit behavior, like this: // size_t size = records.size(); // printf("%"PRIuS"\n", size); #define PRIdS __PRIS_PREFIX "d" #define PRIxS __PRIS_PREFIX "x" #define PRIuS __PRIS_PREFIX "u" #define PRIXS __PRIS_PREFIX "X" #define PRIoS __PRIS_PREFIX "o" Type DO NOT use DO use Notes void * (or any pointer) %lx %p int64_t %qd, %lld %"PRId64" uint64_t %qu, %llu, %llx %"PRIu64", %"PRIx64" size_t %u %"PRIuS", %"PRIxS" C99 specifies %zu ptrdiff_t %d %"PRIdS" C99 specifies %zd Note that the PRI* macros expand to independent strings which are concatenated by the compiler. Hence if you are using a non-constant format string, you need to insert the value of the macro into the format, rather than the name. It is still possible, as usual, to include length specifiers, etc., after the % when using the PRI* macros. So, e.g. printf("x = %30"PRIuS"\n", x) would expand on 32-bit Linux to printf("x = %30" "u" "\n", x), which the compiler will treat as printf("x = %30u\n", x). Remember that sizeof(void *) != sizeof(int). Use intptr_t if you want a pointer-sized integer. You may need to be careful with structure alignments, particularly for structures being stored on disk. Any class/structure with a int64_t/uint64_t member will by default end up being 8-byte aligned on a 64-bit system. If you have such structures being shared on disk between 32-bit and 64-bit code, you will need to ensure that they are packed the same on both architectures. Most compilers offer a way to alter structure alignment. For gcc, you can use __attribute__((packed)). MSVC offers #pragma pack() and __declspec(align()). Use the LL or ULL suffixes a
Twitter Digg Facebook Del.icio.us Reddit Stumbleupon Newsvine Technorati Mr. Wong Yahoo! Google Windows Live Send as Email Add to your CodeProject bookmarks Discuss this article 85 Print Article Database » Database » Other databasesLicence CPOL First Posted 19 Jan 2012 Views 24,219 Downloads 992 Bookmarked 74 times RaptorDB - The Key Value Store V2 By Mehdi Gholam | 8 Mar 2012 | Unedited contribution C#.NETDBABeginnerIntermediateAdvanceddatabase Even faster Key/Value store nosql embedded database engine utilizing the new MGIndex data structure with MurMur2 Hashing and WAH Bitmap indexes for duplicates. See Also More like this More by this author Article Browse Code Stats Revisions (8) Alternatives 4.95 (56 votes) 1 2 3 4 5 4.95/5 - 56 votes μ 4.95, σa 1.05 [?] Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions. Add your own alternative version Introduction What is RaptorDB? Features Why another data structure? The problem with a b+tree Requirements of a good index structure The MGIndex Page Splits Interesting side effects of MGIndex The road not taken / the road taken and doubled back! Performance Tests Comparing B+tree and MGIndex Really big data sets! Index parameter tuning Performance Tests - v2.3 Using the Code Differences to v1 Using RaptorDBString and RaptorDBGuid Global parameters RaptorDB interface Non-clean shutdowns Removing Keys Unit tests File Formats File Format : *.mgdat File Format : *.mgbmp File Format : *.mgidx File Format : *.mgbmr , *.mgrec History Download RaptorDB_v2.0.zip - 38.7 KB Download RaptorDB_v2.1.zip - 39 KB Download RaptorDB_v2.2.zip - 39 KB Download RaptorDB_v2.3.zip - 39.6 KB D
v3.17 * updated libFLAC to version 1.2.1 * added a flush after every log line to help GUIs * "eac3to some.mpls" now also works if the stream files aren't there, anymore * fixed: number of subtitles was not appended to demuxed subtitles' file name * fixed: dialnorm removal (for Nero decoder) failed with some 2.0 TrueHD files v3.16 * added undocumented "-no2ndpass" switch to turn off 2nd pass processing * fixed: two pass processing sometimes produced superfluous sup files * fixed: MPG/EVO/VOB audio tracks with "PES extension 2" were not detected * fixed: very small W64/RF64 files were not detected correctly * fixed: when processing was aborted, log file was sometimes not created * fixed: sometimes specifying a title number addressed the wrong HD DVD title v3.15 * "24.975" is now interpreted as "25.000/1.001" * Blu-Ray "sup" are demuxed with DTS set to 0 again, proper fix will come later * fixed: error code not set for "source file format could not be detected" * fixed: audio resampling from/to 24.975 didn't work properly * fixed: WAV files beginning with lots of zeroes were sometimes not accepted v3.14 * WAV reading was broken for all but very small files (introduced in v3.13) v3.13 * fields and frames are counted and displayed separately now * added DIRAC bitstream parser * added support for "-24.975" and "-changeto24.975" * Blu-Ray subtitle demuxing: PTS value is now written to both PTS + DTS * joining MKV files is now declined with a proper error message * last chapter is now removed, if it's less than 10 seconds from end of movie * fixed: "-normalize" didn't work with stdout, anymore * fixed: audio delay was incorrect when 1st m2ts part contained no audio data * fixed: very small WAV files were not detected correctly * fixed: "eac3to source.eac3 dest.dts -core" crashed v3.12 * fixed: track languages for HD DVD discs were not shown * fixed: MLP channel order was wrong for some specific channel configurations * fixed: "DirectShow reported 255 channels" happened sometimes v3.11 * fixed: MKV subtitle track language wasn't shown v3.10 * Blu-Ray title listing now includes chapter information * fixed: v3.09 didn't show track languages for Blu-Rays v3.09 * added support for MKV "SRT/UTF8", "SRT/ASCII", "ASS" and "SSA" subtitles * increased some internal buffers to avoid AC3 overflow in the "thd ac3 joiner" * fixed: frame counting didn't work for MKV video tracks * fixed: video track FPS change was sometimes declined * fixed: video tracks with "strange" FPS were sometimes handled incorrectly * fixed: clipping removal 2nd pass was executed even for "stdout" * fixed: "eac3to -test" displayed an outdated Nero download link * fixed: specifying a specific playlist still used default playlist's chapters v3.08 * fixed: reading physical disc speed was abysmal (introduced in v3.07) * fixed: read error from physical drive resulted in crash v3.07 * added support for MKV video tracks without sequence headers in bitstream * added support for old style MKV AAC tracks * added support for various MKV "A_MS/ACM" audio formats * added support for various MKV "V_MS/VFW/FOURCC" video formats * added warning for tracks where bitstream parsing failed * demuxing a video track now also complains about video gaps/overlaps * the "-check" option now also complains about video gaps/overlaps * optimized memory allocation * fixed: adding subtitle caption count to filenames sometimes didn't work * fixed: subtitle caption counts in log sometimes had wrong track numbers * fixed: all non-supported MKV tracks shared the same description * fixed: incorrect framerate mismatch complaint was shown for pulldown sources * fixed: FLAC tracks in MKV files don't slow down detection, anymore * fixed: source file detection read 300MB from every source file v3.06 * added MKV reading/parsing support * added demux support for MKV (E-)AC3, DTS(-HD), AAC, MPx, FLAC and WAV tracks * added demux support for MKV "modern style" MPEG2, VC-1 and h264/AVC tracks * reading from (HD) DVD and Blu-Ray drives uses different reading APIs now * empty tracks in TS/m2ts container are not listed, anymore * for 24.000 fps video tracks a little warning is displayed now * when demuxing subtitle files, the number of captions is added to the filename * timestamp derived FPS is used for gap checking instead of video bitstream FPS * fixed: 44.1khz AC3 encoding was still broken * fixed: zero byte stripping pass was done for true 24bit TrueHD tracks * fixed: downconverting WAV files with 0x3f channel mask didn't work * fixed: log output "remaining delay [...]" was sometimes wrong for AC3 tracks * fixed: silent frame creation was tried for E-AC3 although it can't work v3.05 * warning is shown if h264 video bitstream contains "full range" flag * h264 video bitstream "full range" flag is automatically removed * you can disable removal of the "full range" flag by doing "-keepFullRange" * added reader for external DVD, HD DVD and Blu-Ray SUP files * external SUP files can be delayed now * number of HD DVD and DVD subtitles in SUP track is counted and displayed * number of forced and non-forced Blu-Ray subtitles in SUP track is displayed * "-check" option now also works for demuxed audio, video and subtitle tracks * when reading from physical disc drive, 2KB (instead of 1MB) blocks are read * improved automatic skipping over damaged first 5MB of TS/m2ts files * fixed: resampling and Surcode encoding didn't work in one step * fixed: TRP detection crashed * fixed: track listing sometimes contained tracks without description * fixed: h264 with missing framerate in 1st sequence header made eac3to crash * fixed: some AC3WAV files were not detected correctly * fixed: video frame count was not displayed when 2nd pass was executed v3.04 * video track framerates are now shown with up to 3 decimals, if necessary * m2ts/TS framerate is determined by interpreting video track timestamps * m2ts/TS framerate is displayed in the format description (if available) * warning is shown if container timestamps don't match video framerate * warning is shown if video bitstream has a non-standard framerate * video without framerate information: container framerate is used * video without framerate information: framerate can be set (e.g. "-23.976") * video without framerate information: new framerate is written to bitstream * remaining non-fixed audio delay is now shown in log * command prompt colors are restored after eac3to has run through * fixed: 2-pass processing for stripping zero bytes sometimes crashed * fixed: CA (Conditional Access) tracks were shown as "Unknown audio track" v3.03 * fixed: MPEG2 1088 to 1080 cropping was still incomplete v3.02 * fixed: VC-1 stream handling was broken * fixed: destination file extension "*.lpcm" didn't work with 2pass processing * fixed: MPEG2 1088 to 1080 cropping was incomplete * fixed: no log was being created when "temp file could not be interpreted" v3.01 * fixed: m2ts LCPM demuxing didn't work with v3.00 * fixed: TrueHD -> TrueHD+AC3 conversion didn't work with v3.00 v3.00 * broken AC3, DTS, AAC and MPx streams are now automatically repaired * errors in TS/m2ts files are now reported (with runtime) and ignored * damaged first max 5MB and max 5% of a TS/m2ts file are automatically skipped * video/audio tracks which can't be parsed, are now demuxed in raw form * added support for "line 21" closed captions in ATSC/NTSC broadcasts and DVDs * added reading of movie / network name from "line 21" XDS information * for gaps, edits & repairs > 1000ms eac3to now inserts silence by default * for gaps, edits & repairs < 1000ms eac3to now loops audio by default * option "-silence" forces eac3to to insert silence instead of looping audio * option "-loop" forces eac3to to loop audio instead of inserting silence * newly encoded AC3 frame is now used for "silence" instead of file's 1st frame * increased reading block size (might improve reading performance) * optimized TS/m2ts demuxing performance * optimized MPEG2, VC-1 and h264 parsing performance * command line output is colored now (e.g. errors drawn in red) * MPEG2 1920x1088 bitstream is now automatically patched/cropped to 1920x1080 * log file now contains "" and "" indicators * workaround for movie playlists which want the same m2ts file played twice * added version check for eac3to (doh!) * when a read error occurs, reading is tried again up to 3 times * (E-)AC3 frames with -0db dialnorm are now automatically patched to -31db * updated to newer libAften build -> fixes 44.1khz encoding * fixed: sometimes "The last DTS frame is incomplete" was a false alarm * fixed: mkvtoolnix version check didn't work, anymore * fixed: errors were meant to be output to stderr, but they weren't * fixed: automatic gap/overlap fixing with AAC targets aborted processing * fixed: positive edit began a bit too early * fixed: two ID3 tags after each other made eac3to fail detecting the format * fixed: some VOB files were not detected properly v2.87 * fixed: negative edit was done too late (introduced in v2.86) v2.86 * fixed: "1:some.ac3" instead of "1: some.ac3" failed for 2 digit track numbers * fixed: "eac3to source movie.mkv" demuxed video instead of muxing to MKV * negative edit now begins at the specified runtime instead of ending there v2.85 * using "eac3to source video.h264" doesn't demux audio/subtitle tracks, anymore * using "eac3to source movie.*" demuxes video, audio and subtitle tracks * using "eac3to source 1: video.* 2: audio.*" demuxes the specified tracks * AC3 and E-AC3 dialnorm removal now uses "-31db" instead of "-0db" * workaround for DTS files where last byte is missing in each audio frame * fixed: v2.84 sometimes crashed when parsing HD DVD XML files * fixed: v2.84 sometimes chose incorrect XML file * fixed: v2.84 sometimes chose wrong m2ts playlist file * fixed: some actions were eventually applied twice when "-2pass" was used * fixed: AAC encoding quality "quality=0.0x" was passed to Nero as "0.x" v2.84 * fixed: 2nd pass gap removal was tried (and failed) for TrueHD+AC3 targets * fixed: processing aborted when trying to fix gaps in PCM destination files * fixed: more than one RAW/PCM overlaps resulted in lost sync (since v2.81) * fixed: demuxing TrueHD+AC3 stream by title number didn't renew the AC3 part * new option for removing or looping audio data, e.g. "-edit=0:20:47,-100ms" * title sorting criteria changed: resolution is more important than runtime * new option "-lowPriority" sets eac3to to background/idle priority * libav warnings are now assigned to the affected audio track * fixed: "lossless check failed" false alarms for seamless branching movies * fixed: spike removal filter was not active for the very last overlap/gap * improved muxing h264 streams which begin with double sequence headers * source files are now opened with "share read + write access" * destination files are now opened with "share read access" v2.83 * fixed: gap/overlap correction didn't work for FLAC and WAV files * fixed: when clipping was detected, 2nd pass was not always executed correctly v2.82 * fixed: sometimes eac3to stalled before processing (introduced in v2.81) v2.81 * audio gap/overlap fixing is now automatically done in a 2nd pass * option "-normalize" maximizes the volume of the audio data, needs 2 passes * audio clipping is detected and automatically removed in a 2nd pass * "-2pass" activates 2 pass mode (can speedup seamless branching processing) * superfluous zero bytes are now automatically removed in 2nd pass * "-phaseShift" shifts surround channel phase by 90?for DPL II downmixing * spike removal post processing filter now always produces 16bit samples * empty channels are now reported by the bitdepth analyzer as "no audio data" * option "-shutdown" shuts the PC down automatically after processing is done * the HD DVD XPL with the longest title is now loaded instead of VPLST000.XPL * eac3to can now open selected XPL files (e.g. "eac3to ADV_OBJ\VPLS002.XPL") * eac3to can now open selected mpls files (e.g. "eac3to PLAYLIST\00002.mpls") * fixed: TrueHD streams starting with a non-major header failed to decode * fixed: WAV files created by eac3to with empty channels had incorrect header * fixed: RAW/PCM gap/overlap remover sometimes didn't work correctly v2.80 * fixed: FLAC files with missing runtime information were not accepted * gone back to old VOB/EVO auto delay calculation method, more reliable for me * improved TS broadcast audio delay detection * added support for constant bitrate AAC encoding * added support for AAC encoding 0.00 and 1.00 quality v2.79 * improved m2ts file joining overlap detection (mainly for interlaced video) * vob/evo audio delay detection now uses "vobu start presentation time" * program streams which are neither VOB nor EVO are now reported as "MPG" * resampling is now automatically activated for AC3/DTS encoding, if necessary * "Mersenne Twister" random number generator is used for dithering now * zero padded DTS tracks are now displayed as such * fixed: 32bit PCM conversion to floating point was broken * fixed: with some (rare) movies first subtitle began after 50 minutes runtime * only plugins with the extension *.dll are loaded now v2.78 * fixed: h264 interlaced muxing to MKV could result in too long runtime * fixed: transcoding DTS-HD/E-AC3 core sometimes failed to work correctly * improved TS/m2ts audio delay detection * added filter to remove spikes when fixing gaps/overlaps in RAW/PCM audio * each eac3to instance has its own log file now * playlist output now also works with "-log" option * default bitrate for mono & stereo AC3 encodes lowered to 448kbps * default bitrate for mono & stereo DTS encodes lowered to 768kbps * it should be possible to handle TsSplitter splitted TS files via "+" now v2.77 * pcm/raw audio delay is now applied before resampling and fps change * parsing of command line with multiple sources files sometimes failed v2.76 * "-slowdown" now works to convert 24.000 movies to 23.976 * "-speedup" now works to convert 24.000 movies to 25.000 * option "-xx.xxx" (e.g. "-24.000") sets the FPS of the source track * option "-changeToXx.xxx" (e.g. "-changeTo23.976") changes video/audio FPS * modified FPS information is written to video bitstream (VC-1, MPEG2, h264) * demuxing with FPS change option now activates audio track transcoding * SSRC resampling parameters modified slightly to reduce steepness and ringing * fixed incorrect h264 movie slowdown gap/overlap complaints * fixed DTS-HD High Resolution bitrate calculation * dithering is now done differently per channel v2.75 * added (E-)AC3 5.1 "EX" detection * added (E-)AC3 2.0 "Surround" detection * added (E-)AC3 2.0 "Headphone" detection * NeroAacEnc is now fed with up to 32bit float (if available) * resampling option "-quality=low|high|ultra" not supported, anymore * new option "-fast" switches SSRC resampler to fast, but low quality mode * new option "-r8brain" forces use of r8brain resampler instead of SSRC * added support for AES3 PCM streams in TS container * started working on encoder plugin interface v2.74 * "-demux" failed to work for DTS-HD and "TrueHD/AC3" tracks in v2.73 * fixed: DTS-HD tracks could make processing abort at the very end of the movie v2.73 * changed TS demuxing logic to make the broken (!) new SkyHD broadcasts work * DTS core and "TrueHD/AC3" AC3 parameters are displayed separately now * when using "-core" option, eac3to now bases its decisions on core parameters * added WAV/W64/RF64 read/write support for 32bit PCM and 32/64 bit float * option "-full" allows WAV/W64/RF64 output to be native (default <= 24bit PCM) * Surcode DTS encoding is now done with up to 32bit float (if available) * Aften AC3 encoding is now done with up to 64bit float (if available) v2.72 * fixed: per channel bitdepth analyzation didn't work correctly v2.71 * fixed: v2.70 detected Blu-Rays as "TS" without chapters and track languages * fixed: TrueHD downmixing to 2.0 didn't work v2.70 * added floating point support to the complete audio processing chain * added gain functionality, e.g. "-3db" or "+1db" * bitdepth analyzation is now done separately for each channel * fixed: when decoding lossy audio with libav, peaks were clipped incorrectly * fixed: libav MP1/2/3 decoder output was cut down to 24bit * fixed: with some EVO sources the AC3 track was not listed * fixed: if no key frame was found, h264 track in m2(ts) was not listed * fixed: video/audio data before first PAT/PMT was discarded * Blu-Ray chapters now don't contain link points, anymore, unless necessary * added 10db boost to LFE channel, when "-down2" and "-mixlfe" are used * ArcSoft output can now be overwritten to "-2", "-6", "-7" or "-8" channels v2.69 * added high precision SSRC resampler * resampling "-quality" now allows "low", "high" (SSRC) or "ultra" (r8brain) * resampling quality now defaults to "high" (SSRC) * bitdepth is now analyzed separately for original vs. processed data * fixed: downmixing 16 bit DTS tracks to 5.1 or 2.0 didn't work * fixed: Sonic Decoder was incorrectly assumed to decode XXCh DTS files to 6.1 * for movies the Haali Muxer can't handle "-seekToIFrames" is suggested now v2.68 * fixed crash when transcoding Blu-Ray/HD DVD track to FLAC v2.67 * information about HDCD and real bitdepth is now stored into FLAC metadata * information about real bitdepth is now read from FLAC metadata * PTS break: PTS is increased by 1 frame (fixes some false overlap warnings) * fixed: video gap log text was sometimes not correct (runtime information) * added undocumented switch "-neroaacenc="c:\whatever\neroaacenc.exe"" * error log messages are now output to stderr instead of stdout * improved "which mkvtoolnix is currently installed?" check * fixed: mkvtoolnix version check "Oct" date was not interpreted correctly v2.66 * changed eac3to to allow AAC encoding with 7.1 channels (for new Nero encoder) * fixed AGM creation for files bigger than 4GB * added support for Nero's new AAC Encoder download URL * lowered volume of error/success sounds * when there are 2 similar playlists the one with less chapters is ignored now v2.65 * automatic channel remapping for 6.1 tracks with wrong channel mask * automatic channel remapping for ArcSoft DTS decoder 6.1 tracks * fixed: TrueHD -> Surcode encoding didn't work, anymore * fixed: MPEG2 + h264 video gap/overlap removal didn't work properly v2.64 * added channel mask reading support to Blu-Ray PCM track parser * added channel mask reading support to TrueHD parser * added channel mask reading & writing support to FLAC decoder / encoder * changed 5.x channel mask from $03x to $60x * changed 6.x channel mask from $13x to $70x * mono wavs output now creates correct names for some channel masks * when transcoding 6.1 sources to PCM, 7 channel doubling is activated now * fixed: DTS channelmask detection was incorrect for very strange configs * fixed: sometimes the h264 video stream of a Blu-Ray m2ts was not detected v2.63 * fixed: incorrect detection of 6.0 DTS tracks as 5.0 * fixed: incorrect libav DTS channel remapping for 6.x or 7.x tracks * fixed: incorrect ArcSoft DTS channel remapping for "6.0" and "2/2.1" tracks * fixed: v2.61+62 incorrectly decoded 16bit TrueHD tracks to 24bit FLAC/WAV/RAW * fixed: some DTSWAV files made HDCD decoder crash * fixed: DTSWAV and AC3WAV samplerate and bitdepth were reported incorrectly * improved DirectShow channel configuration reporting * undocumented option -progressnumbers now outputs "analyze:" and "process:" v2.62 * fixed: downmixing 16 bit 7.1 DTS tracks to 5.1 stopped working in v2.61 v2.61 * option "-no7doubling" is not supported anymore * option "-double7" added which upconverts 6.1 to 7.1 * added read/write support for Sony wave64 (*.w64) format * added read/write support for RF64 wave64 (*.rf64) format * added write support for AGM format * true bitdepth (e.g. 18 bits) is written to extensible wav header now * when reading 16/24 (true/storage) WAV files, zero bytes are stripped now * added HDCD detection for WAV and FLAC files * added HDCD detection for PCM tracks in VOB/EVO/m2ts containers * added HDCD decoder written by Christopher Key * added new option "-decodeHdcd" to decode HDCD information * HDCD track -> lossy format: HDCD decoding is automatically activated * when DTS-MA and TrueHD tracks are decoded, a check for HDCD is done * fixed some incorrect DTS channel masks * added automatic libav DTS channel remapping * added automatic ArcSoft DTS channel remapping * added channel map manipulation to make funny DTS tracks decode with Sonic * added channel map manipulation to make funny DTS tracks decode with ArcSoft * added channel volume modification to undo ArcSoft mono surround splitting * for TrueHD+AC3 creation AC3 delay and gap correction are disabled now * fixed: DTSWAV and DTSAC3 readers reported too long runtime * fixed: sometimes processing aborted with a "bitdepth reducer" complaint v2.60 * fixed: in v2.59 "-analyzeBitdepth" stopped working for Blu-Ray TrueHD tracks v2.59 * extension ".thd+ac3" is supported now to define destination format * TrueHD tracks without AC3 core can be converted to TrueHD/AC3 now * demuxing a single-part Blu-Ray title keeps the original "TrueHD/AC3" data * demuxing a multi-part Blu-Ray title automatically redoes the AC3 substream * added workaround for Blu-Ray playlists with multiple last "invalid" parts * fixed: "-check" didn't work for LPCM tracks v2.58 * h264 parser rewritten: framerate, pulldown etc is detected reliably now * h264 pulldown is automatically removed from progressive movie sources now * h264 pulldown removal can be disabled by using "-keepPulldown" * h264 muxing now fully supports streams with mixed 23.976 and 29.970 content * h264 1920x1088 bitstream is now automatically patched/cropped to 1920x1080 * h264 filler data is now already removed during demuxing * h264 sources with funny framerates (e.g. Luxe.tv HD) are patched to 25fps now * mixed video/movie h264 streams are now always muxed with 29.970 timestamps * speedup/slowdown now changes framerate information in the h264 bitstream * options "-24p", "-60i" and "-30p" are no longer supported * fixed Blu-Ray seamless branching subtitle remuxing * added workaround for Blu-Ray playlists with a last small "invalid" m2ts part * bitdepth analyzation is now done for decoded FLAC, WAV, PCM, DTS MA, too * bitrate is now also reported for FLAC, WAV and PCM tracks * when encoding AC3, DTS or AAC, the encoding bitrate is reported * fixed: v2.57 incorrectly decoded 16bit TrueHD tracks to 24bit FLAC/WAV/RAW * (M2)TS discontinuities before the first unit start are ignored now * new option "-progressnumbers" replaces progress bar with percentage numbers v2.57 * added automated support for Nero AAC command line encoder * added "quality=0.xx" (0.00 - 0.99) parameter to control AAC encoder quality * added Nero AAC encoder check to the "-test" list * "-test" checks whether a new Haali Matroska Muxer version is available * "-test" checks whether a new MkvToolnix release build is available * "-test" checks whether a new MkvToolnix beta build is available * "-test" checks whether a new Nero AAC encoder version is available * added TRP container support (TS files without PMT/PAT) * parameter "-extensible" is no longer supported (it's default now) * new parameter "-simple" can be used to disable the "-extensible" wav header * decoded TrueHD tracks: bitdepth is now automatically analyzed in more detail * option "-analyzeBitdepth" manually activates extended bitdepth analyzation * DVB subtitle tracks are listed now - can't be demuxed, though * option "-check" doesn't fail on DTS Express tracks, anymore v2.56 * fixed: processing aborted when a VC-1 sequence end code was found v2.55 * AAC bitstream parser added * AAC auto detection added * AAC bitstream delay added * AAC bitstream gap/overlap correction added * AAC decoding (Nero & Sonic) added * old MP2 parser now "officially" and properly supports MP1, MP2 and MP3 * MP3 decoding (libav & Nero) added * added support for MPEG Audio version 2 and version 2.5 * added (limited) support for ID3, APE and LYRICS tags in MP3 and AAC tracks * improved VOB/EVO audio delay detection algorithm * detection and automatic skipping of invalid vob units * options "-60i" and "-24p" are no longer supported for MPEG2 video * improved detection of MPEG2 framerate / pulldown state / mode * improved MPEG2 muxing warnings * several bugs in MPEG2 video muxing fixed * fixed interlaced VC-1 muxing with user data (Nine Inch Nails) v2.54 * VC-1 pulldown removal rewritten (comparable to vc1conv 0.4, but faster) * VC-1 pulldown removal is activated by default * VC-1 pulldown removal can be manually deactivated by "-keepPulldown" option * VC-1 pulldown removal is also available and activated when muxing to MKV now * fixed Blu-Ray subtitle demuxing for seamless branching movies * better task separation when doing multiple operations with an audio track v2.53 * Blu-Ray PGS subtitle demuxing support added * added support for EVO/VOB subtitles which begin very late in the file * MPEG2 video muxing doesn't rely on GOP headers, anymore * all (M2)TS discontinuities are now reported with exact file position * fixed: reading language information from TS files didn't work correctly v2.52 * fixed muxing of MPEG2 broadcasts where "temporal_reference" overruns * MPEG2 bitstream headers are now updated correctly when speedup is performed * MPEG2 bitstream headers are now updated correctly when slowdown is performed * MPEG2 bitstream headers are now updated correctly when pulldown is removed * pulldown removal is now automatically disabled for MPEG2 broadcasts * AC3WAV (SPDIF formatted) support added v2.51 * DTS Express bitstream parser added * DTS Express auto detection added * DTS Express bitstream delay added * DTS Express bitstream gap/overlap correction added * DTS Express decoding (Nero & ArcSoft) added * fixed: 6.1 -> 7.1 channel doubling resulted in wrong channel order * added (undocum.) option "-no7doubling" to disable 6.1 -> 7.1 channel doubling * DTS tracks with funny speaker settings are displayed as "7.1 (strange setup)" * warning is displayed when decoding "7.1 (strange setup)" tracks with ArcSoft v2.50 * ArcSoft DTS Decoder DLL is now directly accessed instead of using DirectShow v2.49 * DTS parser sets correct channel mask now * DTS-HD parser now properly detects format, channels and samplerate * added support for ArcSoft DTS(-HD) Decoder * added several tweaks to make ArcSoft Decoder behave correctly * added ArcSoft test to the "-test" processing * made ArcSoft Decoder default for DTS and DTS-HD decoding v2.48 * 96kHz LPCM tracks in (M2)TS and EVO/VOB containers didn't work correctly * "Applying (E-)AC3 delay" now only shows if the bitstream is actually modified * fixed crash in MP2 reader when checking some PCM tracks * added support for MLP formats 13 - 16 * improved/corrected MLP channel descriptions * MLP parser sets correct channel mask * added proper channel remaps for libav MLP decoding of "funny" channel formats * added proper channel remaps for Nero MLP decoding of "funny" channel formats * added proper channel remaps for Nero AC3 decoding of "funny" channel formats * when doubling 7th channel the channel mask is set correctly now * channel mask is corrected if a decoder doesn't output all channels * channel mask is corrected if channel downmixing is performed v2.47 * improved detection of AC3/DTS tracks in TS/M2TS container * added support for Blu-Ray style LPCM tracks in TS container * fixed 44.1kHz AC3 tracks * fixed crazy audio delay values when no video track was detected * sometimes video/audio tracks were not properly detected in (M2)TS container * MPEG2 demuxing/remuxing incorrectly output the first sequence headers twice * sequence end codes are removed when demuxing video now, too * MPEG2 pulldown removal is automatically activated only for EVO HD sources now * MPEG2 pulldown removal can be manually activated by using "-stripPulldown" * MPEG2 pulldown removal can be disabled by using "-keepPulldown" v2.46 * MPEG2 muxing now fully supports streams with mixed 23.976 and 29.970 content * mixed video/movie MPEG2 streams are now always muxed with 29.970 timestamps * if a movie MPEG2 stream goes video, processing is automatically restarted * MPEG2 pulldown is now automatically removed whenever an MPEG2 stream is read * new option "-keepPulldown" can be used to disable MPEG2 pulldown removal * corrected default WAV channel masks for 4.0, 6.1 and 7.1 * added proper channel remaps for libav AC3 decoding of "funny" channel formats * added general channel mask support * WAV parser reads channel mask from extensible header * (E-)AC3 parser sets correct channel mask v2.45 * Blu-Ray angles are now reported as separate titles * duplicate playlists are not listed in the "folder view", anymore * reduced TrueHD and RAW/PCM gap/overlap threshold to 7ms * reduced (E-)AC3 gap/overlap threshold to 60% of the runtime of one audio frame * reduced MP2 gap/overlap threshold to 60% of the runtime of one MP2 frame * reduced DTS threshold to 60% of the runtime of one DTS frame, but at least 7ms * fixed: Blu-Ray chapter export sometimes wrote incorrect "00:00:00.000" items * improved handling of MPEG2 streams (changes from interlaced to progressive) * video information now shows "with pulldown flags", if applicable * removed "-ignoreDiscon" from help; hint is shown when a discontinuity occurs * added "-ignoreEncrypt" option; hint is shown when a source is encrypted * new option "-extensible" creates WAV files with a slightly different header * fixed some smaller bugs v2.44 * libav is now automatically used when Nero/Sonic decoders are not working * gap/overlap correction of RAW/PCM tracks sometimes aborted * rerunning de/remuxing to correct gaps/overlaps ignored RAW/PCM tracks * "lossless check failed" messages are surpressed on join points now v2.43 * added automatic Blu-Ray playlist parsing * added support for multi part (e.g. seamless branching) Blu-Ray titles * audio gap/overlap detection rewrite completed * added audio gap/overlap correction functionality * added Blu-Ray chapter support * log lines are now prefixed with a track identifier * RAW/PCM delay is used instead of bitstream delay, if possible * fixed: video framecount was missing v2.42 * added support for 16bit DTSWAV files * fixed: Blu-Ray TrueHD support was broken v2.41 * added full MP2 (MPEG2 audio) support including decoding + bitstream delay * added TS/M2TS runtime detection * improved VOB/EVO runtime detection * added TrueHD gap/overlap detection * audio gap/overlap detection logic rewritten (not complete yet) * fixed: log file option didn't work correctly * fixed: some DTS tracks in PAL TS broadcasts weren't detected correctly * fixed: some E-AC3 tracks in PAL TS broadcasts weren't detected correctly v2.40 * video framecount is now also shown for TS/M2TS demuxing/remuxing * "-check" option added to check container for corruption * TS/M2TS: discontinuity check sometimes fired false alarms * HD DVD subtitle language/description was not always correct * title listing is only shown if there are at least 2 titles * if there is only one title, the title is automatically selected * TS/M2TS audio delay detection was broken * improved audio delay detection for broadcasts and badly mastered discs * TS/M2TS video demuxing could eventually add some invalid data * new option "log=c:\whatever\log.txt" specifies the log file path/name v2.39 * simple audio transcoding was broken v2.38 * fixed file path handling bug v2.37 * added HD DVD chapter support * added HD DVD subtitle demuxing support * added pre-freeze detection for Haali Matroska Muxer bug * invalid characters are removed from file names now * log file is copied to destination path (of first destination file) v2.36 * TS/M2TS: discontinuity is only checked for tracks which are de- or remuxed * TS/M2TS: "-demux" creates both a "thd" and an "ac3" file for "thd/ac3" tracks * TS/M2TS: "eac3to source.m2ts movie.mkv" transcodes "thd/ac3" tracks to FLAC * M2TS: track language is displayed (if the file "xxxxx.clpi" is available) * TS: track language is displayed (if the source file contains this info) * video gaps/overlaps in the last 5 seconds of the movie are ignored now v2.35 * fixed broken EVO support v2.34 * TS/M2TS: fixed PAT/PMT reading bug * TS/M2TS: new "-ignoreDiscon" option makes eac3to ignore discontinuity errors v2.33 * added full TS and M2TS support (file joining not supported yet, though) * further improved "-demux" file names * help text and HD DVD track listing is now also written to the log v2.32 * added automatic "VPLST000.XPL" and "HVA00001.VTI" parsing * "eac3to" or "eac3to ." inside of a HD DVD folder lists all title sets * "eac3to someHdDvdMovieFolder" lists all title sets * "eac3to someHdDvdMovieFolder whatever.mkv" converts the longest title set * "eac3to someHdDvdMovieFolder x) whatever.mkv" converts the selected title set * EVO report now contains the EVO display name (if "VPLST000.XPL" is available) * added language to EVO audio track listing (if "VPLST000.XPL" is available) * added EVO audio track display names (if "VPLST000.XPL" is available) * sequence end codes are stripped from VC-1, MPEG2 and h264/AVC * put "-stripPulldown" option back in on request * option "-demux" now writes to "current directory" instead of source directory * option "-demux" now creates files with meaningful names * doing "eac3to src.evo dst.mkv" now creates audio files with meaningful names * doing "eac3to src.evo dst.mkv" writes the audio files to same path as the MKV * after successful (erroneous) processing "success.wav" (error.wav) is played v2.31 * DTSWAV input support added * fixed bitstream delaying of 96khz DTS tracks * improved DTS runtime calculation * fixed DTS audio gap/overlap correction for strange DTS formats * fixed E-AC3 audio gap/overlap correction for strange bitrates * fixed incorrect MKV "default duration" when using "-24p" or "-30p" * fixed incorrect MKV "default duration" when using "-slowdown" or "-speedup" * improved support for "open bitrate" DTS files * slightly improved automatic (E-)AC3 delaying exactness v2.30 * fixed wrong MPEG2 framerate (bug introduced in v2.29) v2.29 * added automatic audio gap/overlap correction for (E-)AC3, DTS(-HD) and LPCM * options "-slowdown" and "-speedup" can now also be used for video muxing * added support for muxing of EVO's secondary video track to MKV * added "-24p", "-30p" and "-60i" options to overwrite detected h264 framerate * fixed some MPEG2 muxing problems * temporarily disabled "-stripPulldown" because vc1conv 0.3 is better v2.28 * new "-seekToIFrames" switch makes Basic Instinct (h264) muxing work v2.27 * fixed h264/AVC muxing crash with some movies (due to too high RAM usage) * fixed missing frames at the end of the movie when doing h264/AVC muxing * fixed non-working "eac3to -test" v2.26 * Haali Splitter replaced with internal splitter for EVO h264/AVC tracks * external raw h264/AVC tracks can now be muxed directly to Matroska * timestamps for h264/AVC MKV videos don't need to be rewritten, anymore * gaps/overlaps in h264/AVC track of EVO files are detected now * h264 aspect ratio is detected and written into MKV now * Haali Media Splitter is not being used at all, anymore * mkvtoolnix is not being used at all, anymore * added detection for MPEG2 interlaced -> progressive mode change * workaround for eacGui bug v2.25 * fixed MPEG2 muxing for interlaced content v2.24 * Haali Splitter replaced with internal splitter for EVO MPEG2 tracks * external raw MPEG2 tracks can now be muxed directly to Matroska * timestamps for MPEG2 MKV videos don't need to be rewritten, anymore * gaps/overlaps in MPEG2 track of EVO files are detected now * VC-1 and MPEG2 aspect ratios are detected and written into MKV now * fixed bug with "-down2" option v2.23 * fixed bug which made some DTS tracks appear dirty although they weren't * fixed extremely big gap detection with Fantastic Four 2 * fixed non cleaned up gaps file bug v2.22 * gap/overlap logic changed completely (optional two pass muxing now) * "-ignoreGaps" parameter is gone v2.21 * latest libav MLP/TrueHD decoder fixes "lossless check failed" bug * latest libav MLP/TrueHD decoder supports & decodes 7.1 TrueHD tracks * Matroska muxing speed dramatically improved * eac3to now detects and handles E-AC3 7.1 tracks correctly * option "-core" extracts 5.1 core from E-AC3 7.1 tracks * added support for small DTS files (< 300kb) v2.20 * changed VC-1 muxing method to fix problems with several movies, e.g. - Unforgiven - Phantom of the Opera - Million Dollar Baby - Fantastic Four 2 * fps value is now also added to MKV header when muxing raw VC-1 stream * added new "-skip" option to skip corruption in the beginning of an EVO file * added extra handling which fixes some EVO authoring bugs v2.19 * fixed h264 bitstream parsing of framerate information format * fixed (again) muxing of some rare VC-1 titles like e.g. POTO USA v2.18 * fixed bug which stopped eac3to v2.15-17 from working on some PCs * fixed h264 bitstream parsing bug (Sum of all Fears) * fps value is added to MKV header now * relaxed VC-1 gap detection once more * TrueHD decoding to stdout fixed (always output as 24 bit now) v2.17 * fixed VC-1 pulldown removal * VC-1 pulldown removal must now be activated by the new option "-stripPulldown" * improved VC-1 gap/overlap detection * new option "-ignoreGaps" disables VC-1 gap/overlap detection * libav E-AC3 decoder background decoding removed again v2.16 * fixed "eac3to -test" crash * fixed "eac3to some.ddp some.wav" crash * made video gap/overlap detection a little more relaxed * WAV header is initialized to 4GB instead of 0GB (for stdout) * fixed incorrect "primary/secondary" text v2.15 * Haali Splitter replaced with internal splitter for EVO VC-1 tracks * external raw VC-1 tracks can now be muxed directly to Matroska * timestamps for VC-1 MKV videos don't need to be rewritten, anymore * some problematic VC-1 movies should mux fine to MKV now (e.g. POTO USA) * gaps/overlaps in VC-1 track of EVO files are detected and displayed now * pulldown can be removed from external raw VC-1 tracks now * pulldown is automatically removed when demuxing EVO VC-1 tracks now * updated to the latest revision of the libav E-AC3 decoder * some minor changes and bugfixes v2.14 * libav TrueHD decoder "end of stream" bug should be fixed now * fixed libav DTS decoder - subwoofer channels is properly decoded now, too * patched libav DTS decoder to output full 24 bit * updated to the latest revision of the libav E-AC3 decoder * when decoding E-AC3 with Nero, libav decoding is also executed at the same time v2.13 * added option to downmix multi channel audio to stereo * added support for VC-1 custom aspect ratios * added stdout output support v2.12 (thanks to Ron/drmpeg for all his help) * video resolution, framerate and mode (progressive/interlaced) are displayed * rewriting timestamps should now always write the correct framerate * after a full EVO/VOB processing the number of video frames is shown * EVO 16 bit and 24 bit LPCM demuxing supported now (need samples for 20 bit) * (E-)AC3 bitstream can be delayed now (similar to delaycut) * DTS bitstream can be delayed now (similar to delaycut) * DTS-HD High-Res and Master Audio bitstream can be delayed now * when demuxing bitstream audio tracks from EVO delay is automatically applied * some little bugs fixed v2.11 * libav E-AC3 decoding is without DRC now * libav AC3 decoding added (without DRC) * libav E-AC3 and AC3 decoding hacked to return full 24 bit * fixed: delay was not applied for lossless audio tracks * fixed crash when parsing PCM files without doing any conversion * TrueHD dialnorm was displayed incorrectly * changed 23.976 to 24/1.001 * fixed some more minor bugs v2.10 * fixed crash which occurred when doing "EVO/VOB -> Surcode DTS encoding" * "eac3to source.evo movie.mkv" syntax replaces "-auto" option * "eac3to 1.evo+2.evo movie.evo" syntax supported now for simple EVO/VOB joining v2.09 * EVO demuxing added with proper delays for all audio tracks * EVO file joining/rebuilding added * automated EVO video remuxing (Matroska) added * automated rewriting of Matroska timestamps to 24p via mkvtoolnix added * multiple operations on the source file can now be run at the same time * switch "-test" tests all external DirectShow filters and tools * latest ffmpeg/libav TrueHD and E-AC3 decoder patches included * latest libAften build included * libav TrueHD decoder is now the default decoder for TrueHD/MLP * support for libav DTS decoding added * fixed a whole lot of bugs (and might have added a few new ones) v2.08 * fixed: bitdepth reducer sometimes crashed when being fed a PCM file * fixed: FLAC encoder sometimes crashed when delay was applied * fixed: some TrueHD files were dithered/processed by Nero when they shouldn't * fixed: Surcode 1.0.29 encoding automation * fixed: source file was deleted when source and dest file names were identical * eac3to output is now always written to "log.txt" * when a crash occurs, "log.txt" is added to the bug report * improved help text + hints slightly * undocumented switch "-check16bit" added * undocumented switch "-mono" added v2.07 * fixed libAV MLP decoding support * added automatic MLP ID20 channel remapping * Surcode 1.0.29 (or newer) home directory detection added v2.06 * doing FLAC -> FLAC now copies metadata from source to destination file * MLP files are correctly decoded now (by both Nero and libav/ffmpeg) * runtime for padded DTS files is shown correctly now v2.05 * added support for libav/ffmpeg decoding of TrueHD/MLP and E-AC3 * added "-libav" switch to force libav decoding v2.04 * don't need dtsac3source.ax, anymore * don't need Nero Splitter, anymore * don't need Sonic HD Demuxer, anymore * replaced hacked DirectShow feeding with a cleaner approach * added support for DTS-HD Master Audio 7.1 tracks (only 5.1 decoding) * little performance boost for PAL speedup/down on DualCore CPUs * fixed some bugs v2.03 * new "-debug" switch added v2.02 * fixed: automatic registering of the dtsac3source filter crashed v2.01 * fixed: AC3 encoding sometimes crashed when being fed 24 bit audio data * fixed: AC3 encoded files were invalid when being fed 24 bit audio data * eac3toGUI didn't work with eac3to v2.0 * "eac3to source.ac3 dest.ac3 -slowdown" didn't do anything useful * when a crash occurs, the bug report is automatically copied to clipboard now * some minor cosmetic improvements v2.00 totally new features * AC3 decoding support (Nero's decoder without DRC/dialnorm) * resampling to 44.1/48/96 kHz (by using "r8brain") * apply/reverse PAL speedup (by using "r8brain") * "eac3to sourceFile" will print out source file details strongly enhanced features * dramatically improved performance (no intermediate files, anymore!) * proper 6.1/7.1 downmixing to 5.1 instead of just dropping the back surround channels * RAW/PCM file detection now auto detects channels, bitdepth and endian * WAV is now fully supported as source file format * destination file extension "PCM" creates Blu-Ray style LPCM tracks * bitdepth can be reduced to anything between 14 bits and 23 bits DTS related improvements/changes * DTS-96/24 support added * "open bitrate" support added * strange channel configuration support added * removal of zero padding from DTS files added * eac3to can fix broken DTS-ES files (they decode to 5.1 instead of 6.1 without the fix) * dialog normalization can be removed without removing the additional DTS-HD data now * core extraction must be specifically asked for now (see "-core" switch) AC3 related improvements * did I mention that eac3to can decode AC3 now? * strange channel configuration support added TrueHD related improvements * delay problem (hopefully) solved * fixed: sometimes some audio data in the middle of a track was lost * TrueHD/AC3 interweaved file can be stripped to TrueHD only now various minor improvements/changes * progress bar added * eac3to detects file format independently of file extension * multiple input files can be treated as one big file * "sox" is not needed, anymore * "dump" filter not needed, anymore * "aften.exe" replaced by "libAften.dll" * "flac.exe" replaced by "libFlac.dll" * DTS/DD+/AC3 source filter ships with eac3to now * 8bit support added * crash analyzer and bug reporting added v1.23 * bugfix: sometimes TrueHD decoding resulted in incorrect sampling rate v1.22 * 6.1 -> 7.1 channel doubling was sometimes incorrectly skipped * OS speaker settings now don't have to be 7.1, anymore * added detection of 5.1 output when 6.1 was expected * DTS and DTS-ES files are now forcefully patched to 24 bit by eac3to (workaround for Sonic decoder) * Sonic Audio Decoder is now always used by default for DTS decoding v1.21 * bugfix: 2 channel DTS files were not accepted * added: DTS-ES 6.1 support * added: DTS-HD High Resolution Matrix 5.1 support * added: DTS-HD Master Audio 6.1 support v1.20 * bugfix: some Blu-Ray TrueHD tracks were not accepted * change: eac3to output text slightly improved v1.19 * bugfix: still some TrueHD files were not accepted ("The source file format is unknown") * added: FLAC supported as source/input file format now * added: full delay functionality v1.18 * bugfix: some TrueHD files were not accepted ("The source file format is unknown") * change: EVO files are not accepted as source files, anymore * added: detection and repacking of 16 bit TrueHD tracks * added: proper detection of "DTS-HD Master Audio" and "DTS-HD High Resolution" tracks * added: runtime information for "DTS-HD High Resolution" tracks * bugfix: bitrate information for "DTS-HD High Resolution" tracks * added: decoding of "DTS-HD Master Audio" tracks (Sonic) * added: decoding of "DTS-HD High Resolution" tracks (Sonic) * added: decoding of conventional DTS tracks (Sonic/Nero) v1.17 * TrueHD dialog normalization removal added v1.16 * added decoding support for Blu-Ray TrueHD files v1.15 * bugfixes v1.14 * DTS dialog normalization can be removed now * DTS core can be extracted from DTS-HD track now v1.13 * "eac3to src.ac3 dst.ac3" removes dialog normalization from AC3 files * "eac3to src.eac3 dst.eac3" removes dialog normalization from E-AC3 files * "eac3to src.thd dst.ac3" extracts the AC3 frames from a Blu-Ray TrueHD track and removes dialog normalization v1.12 * tools "flac.exe", "aften.exe" and "sox.exe" are now distributed in the eac3to zip * correct channel mapping for 7.1 LPCM tracks is default now * new option "-down6" allows downconverting of 7.1 tracks to 5.1 * modded "flac.exe" ships with eac3to now, which has no problems with 2GB file output, anymore v1.11 * bugfix: (L)PCM -> DTS encoding automation failed when source and destination folders differed * added: new "-allowDnr" switch allows Nero's audio decoder to apply DNR * added: new "-keepDialnorm" switch disables removal of E-AC3 dialnorm information v1.10 * E-AC3 dialog normalization detection and removal * DRC turned off for Nero E-AC3 decoder * Surcode automation improved * Nero is now the default E-AC3 and TrueHD decoder * the flag "/nero" is no more * there is a flag "/sonic" now to force the use of the Sonic filters v1.09 * multi channel mono wav output added * automated SurCode DTS encoding added * 24bit PCM handling works now (was buggy before) * "-blu-ray" option removed * with PCM input files "bigendian" is default now * with 5.1 PCM input blu-ray style channel remapping is default now * switches "-16" and "-24" are valid for both TrueHD and PCM input now * eac3to now creates the WAV files on its own instead of using sox * target extension ".wavs" results in one mono wav for each channel being created * SurCode DVD DTS encoding automation added * new options "-768" and "-1536" for DTS encoding * TrueHD output is not downconverted to 16bit by default, anymore * new option "-down16" downconverts the raw data from 24 -> 16 bit (not limited to TrueHD input) v1.08 * added PCM input support * automatic detection of PCM bitdepth added (16bit or 24bit) * "-blu-ray" switch remaps PCM channels correctly v1.07 * added "-8" switch for 8 channel support v1.06 * mono E-AC3 support added v1.05 * support for 5.1 TrueHD audio tracks added v1.04 * E-AC3 files bigger than 4GB are supported now v1.03 * AC3 files bigger than 2GB are supported now v1.02 * FLAC encoding works now without any input/output size limits v1.01 * support for FLAC encoding added * bitrate can be specified via command line parameter * ffdshow removed from the filter chain * "ddp" and "ec3" file extensions are accepted now, too * fix: "dd+" file extension didn't work correctly. v1.00 * initial release * can convert a 2.0 or 5.1 channel E-AC3 file to AC3.

64,331

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧