Changeset 63 for trunk/liba52

Show
Ignore:
Timestamp:
02/28/08 13:49:33 (10 months ago)
Author:
gbooker
Message:

Updated the liba52 lib (they switched to svn in some other location and didn't update any of the pointers on the sf site).

Fixes #51

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/liba52/AUTHORS

    r1 r63  
    88        Gildas Bazin <gbazin@netcourrier.com> - mingw32 port 
    99        Billy Biggs <vektor@div8.net> - most of liba52.txt 
     10        Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com> - fixed point version 
    1011        Eduard Hasenleithner <eduardh@aon.at> - gcc 3.0 fixes 
    1112        HÃ¥kan Hjort <d95hjort@dtek.chalmers.se> - Solaris output, mlib code 
  • trunk/liba52/HISTORY

    r1 r63  
    2323 
    24242002/02/24 08:54:49 - window function computed at runtime, with more precision 
     25 
     262003/01/28 06.57:37 - switched to integer q_* coefficients 
     27 
     282003/01/28 07:39:35 - use level of 0.75 for dithering instead of 0.707 
  • trunk/liba52/README

    r1 r63  
    6666        full-featured DVD and video media player. 
    6767 
     68      * VideoLAN (http://www.videolan.org/) - video streaming over an 
     69        ethernet network, can also be used as a standalone player. 
     70 
    6871      * MPlayer (http://www.MPlayerHQ.hu) - another good player, it is 
    6972        also very robust against damaged streams. 
     
    7881        player with menu support 
    7982 
    80       * a52decX (http://homepage1.nifty.com/~toku/software_en.html) - 
     83      *        a52decX (http://homepage1.nifty.com/~toku/software_en.html) - 
    8184        a graphical interface for a52dec in macintosh osX. 
    8285 
    83       * bd4go (http://denisx.dyndns.org/bd4go/) - another graphical 
     86      * TCVP (http://tcvp.sf.net) - video and music player for unix. 
     87 
     88      * bd4go (http://denisx.dyndns.org/bd4go/) - another graphical 
    8489        interface for macintosh osX. 
     90 
     91      * drip (http://drip.sourceforge.net/) - a DVD to DIVX transcoder. 
    8592 
    8693      * OMS (http://www.linuxvideo.org/oms/) 
     
    95102 
    96103If you use liba52 in another project, let us know ! 
    97  
    98 VideoLAN (http://www.videolan.org/) does not use liba52, but this is 
    99 still a cool project :) 
    100104 
    101105 
  • trunk/liba52/TODO

    r1 r63  
    1 * implement A/52a downmix extensions 
    2 * use restrict pointers where appropriate 
    3 * reduce size of delay buffer by 50% 
     1* look at possible overflow/precision issues in integer port 
    42 
    5 * get rid of globals in bitstream parsing 
    6 * get rid of statics in imdct.c 
    7 * avoid overflows, including reading the a52 stream !!! 
    8 * make dither code faster (generate dither table in advance ?) 
    93* redo all bit allocation if previous frame had zero_snr_offsets 
    104* make dynrng work in dual-channel streams 
    115 
    12 * update bitstream code 
     6* implement A/52a downmix extensions 
     7* reduce size of delay buffer by 50% 
     8* include float->s16 conversion in liba52 API ? 
     9* include up/downsampling 44100<->48000 in liba52 API ? 
     10* include audio dithering in liba52 API ? 
     11* API extensions might be at a different level (base vs. extended) 
     12 
     13* use restrict pointers where appropriate 
     14* avoid overflows, including reading the a52 stream !!! 
     15* faster bitstream parsing ? 
     16* make dither code faster (generate dither table in advance ?) 
     17* SIMD optimizations 
  • trunk/liba52/acinclude.m4

    r1 r63  
    1818    esac]) 
    1919 
     20dnl AC_C_BUILTIN_EXPECT 
     21dnl Check whether compiler understands __builtin_expect. 
     22AC_DEFUN([AC_C_BUILTIN_EXPECT], 
     23    [AC_CACHE_CHECK([for __builtin_expect],[ac_cv_builtin_expect], 
     24        [cat > conftest.c <<EOF 
     25#line __oline__ "configure" 
     26int foo (int a) 
     27{ 
     28    a = __builtin_expect (a, 10); 
     29    return a == 10 ? 0 : 1; 
     30} 
     31EOF 
     32        if AC_TRY_COMMAND([${CC-cc} $CFLAGS -nostdlib -nostartfiles 
     33            -o conftest conftest.c -lgcc >&AC_FD_CC]); then 
     34            ac_cv_builtin_expect=yes 
     35        else 
     36            ac_cv_builtin_expect=no 
     37        fi 
     38        rm -f conftest*]) 
     39    if test x"$ac_cv_builtin_expect" = x"yes"; then 
     40        AC_DEFINE(HAVE_BUILTIN_EXPECT,, 
     41            [Define if you have the `__builtin_expect' function.]) 
     42    fi]) 
     43 
    2044dnl AC_C_ALWAYS_INLINE 
    2145dnl Define inline to something appropriate, including the new always_inline 
     
    2751        SAVE_CFLAGS="$CFLAGS" 
    2852        CFLAGS="$CFLAGS -Wall -Werror" 
    29         AC_TRY_COMPILE([],[__attribute__ ((__always_inline__)) void f (void);], 
     53        AC_TRY_COMPILE([], 
     54            [__attribute__ ((__always_inline__)) void f (void); 
     55            #ifdef __cplusplus 
     56            42 = 42;    // obviously illegal - we want c++ to fail here 
     57            #endif], 
    3058            [ac_cv_always_inline=yes],[ac_cv_always_inline=no]) 
    3159        CFLAGS="$SAVE_CFLAGS" 
     
    3967dnl define ATTRIBUTE_ALIGNED_MAX to the maximum alignment if this is supported 
    4068AC_DEFUN([AC_C_ATTRIBUTE_ALIGNED], 
    41     [AC_CACHE_CHECK([__attribute__ ((aligned ())) support], 
     69    [SAV_CFLAGS=$CFLAGS; 
     70    if test x"$GCC" = xyes; then CFLAGS="$CFLAGS -Werror"; fi 
     71    AC_CACHE_CHECK([__attribute__ ((aligned ())) support], 
    4272        [ac_cv_c_attribute_aligned], 
    4373        [ac_cv_c_attribute_aligned=0 
     
    5080        AC_DEFINE_UNQUOTED([ATTRIBUTE_ALIGNED_MAX], 
    5181            [$ac_cv_c_attribute_aligned],[maximum supported data alignment]) 
    52     fi]) 
     82    fi 
     83    CFLAGS=$SAV_CFLAGS]) 
    5384 
    5485dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) 
     
    6798    fi]) 
    6899 
     100dnl AC_LIBTOOL_NON_PIC ([ACTION-IF-WORKS], [ACTION-IF-FAILS]) 
     101dnl check for nonbuggy libtool -prefer-non-pic 
     102AC_DEFUN([AC_LIBTOOL_NON_PIC], 
     103    [AC_MSG_CHECKING([if libtool supports -prefer-non-pic flag]) 
     104    mkdir ac_test_libtool; cd ac_test_libtool; ac_cv_libtool_non_pic=no 
     105    echo "int g (int i); int f (int i) {return g (i);}" >f.c 
     106    echo "int (* hook) (int) = 0; int g (int i) {if (hook) i = hook (i); return i + 1;}" >g.c 
     107    ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \ 
     108                -c f.c >/dev/null 2>&1 && \ 
     109        ../libtool --mode=compile $CC $CFLAGS -prefer-non-pic \ 
     110                -c g.c >/dev/null 2>&1 && \ 
     111        ../libtool --mode=link $CC $CFLAGS -prefer-non-pic -o libfoo.la \ 
     112                -rpath / f.lo g.lo >/dev/null 2>&1 && 
     113        ac_cv_libtool_non_pic=yes 
     114    cd ..; rm -fr ac_test_libtool; AC_MSG_RESULT([$ac_cv_libtool_non_pic]) 
     115    if test x"$ac_cv_libtool_non_pic" = x"yes"; then 
     116        ifelse([$1],[],[:],[$1]) 
     117    else 
     118        ifelse([$2],[],[:],[$2]) 
     119    fi]) 
    69120 
    70121dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY) 
     
    72123AC_DEFUN([AC_CHECK_GENERATE_INTTYPES], 
    73124    [rm -f $1/inttypes.h 
    74     AC_CHECK_HEADER([inttypes.h],[], 
    75         [AC_CHECK_SIZEOF([char]) 
    76         AC_CHECK_SIZEOF([short]) 
    77         AC_CHECK_SIZEOF([int]) 
    78         if test x"$ac_cv_sizeof_char" != x"1" -o \ 
    79             x"$ac_cv_sizeof_short" != x"2" -o \ 
    80             x"$ac_cv_sizeof_int" != x"4"; then 
    81             AC_MSG_ERROR([can not build a default inttypes.h]) 
    82         fi 
    83         cat >$1/inttypes.h << EOF 
    84 /* default inttypes.h for people who do not have it on their system */ 
    85  
    86 #ifndef _INTTYPES_H 
    87 #define _INTTYPES_H 
    88 #if (!defined __int8_t_defined) && (!defined __BIT_TYPES_DEFINED__) 
     125    AC_CHECK_HEADER([inttypes.h],[],[AX_CREATE_STDINT_H([$1/inttypes.h])])]) 
     126 
     127dnl from http://ac-archive.sourceforge.net/guidod/ax_create_stdint_h.html 
     128dnl modified: s/AC_COMPILE_CHECK_SIZEOF/AC_CHECK_SIZEOF/g 
     129 
     130dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] 
     131dnl 
     132dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the 
     133dnl existence of an include file <stdint.h> that defines a set of  
     134dnl typedefs, especially uint8_t,int32_t,uintptr_t. 
     135dnl Many older installations will not provide this file, but some will 
     136dnl have the very same definitions in <inttypes.h>. In other enviroments 
     137dnl we can use the inet-types in <sys/types.h> which would define the 
     138dnl typedefs int8_t and u_int8_t respectivly. 
     139dnl 
     140dnl This macros will create a local "_stdint.h" or the headerfile given as  
     141dnl an argument. In many cases that file will just "#include <stdint.h>"  
     142dnl or "#include <inttypes.h>", while in other environments it will provide  
     143dnl the set of basic 'stdint's definitions/typedefs:  
     144dnl   int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t 
     145dnl   int_least32_t.. int_fast32_t.. intmax_t 
     146dnl which may or may not rely on the definitions of other files, 
     147dnl or using the AC_CHECK_SIZEOF macro to determine the actual 
     148dnl sizeof each type. 
     149dnl 
     150dnl if your header files require the stdint-types you will want to create an 
     151dnl installable file mylib-int.h that all your other installable header 
     152dnl may include. So if you have a library package named "mylib", just use 
     153dnl      AX_CREATE_STDINT_H(mylib-int.h)  
     154dnl in configure.ac and go to install that very header file in Makefile.am 
     155dnl along with the other headers (mylib.h) - and the mylib-specific headers 
     156dnl can simply use "#include <mylib-int.h>" to obtain the stdint-types. 
     157dnl 
     158dnl Remember, if the system already had a valid <stdint.h>, the generated 
     159dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things... 
     160dnl 
     161dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/) 
     162dnl @version $Id: acinclude.m4 594 2006-05-15 02:48:49Z sam $ 
     163dnl @author  Guido Draheim <guidod@gmx.de>  
     164 
     165AC_DEFUN([AX_CREATE_STDINT_H], 
     166[# ------ AX CREATE STDINT H ------------------------------------- 
     167AC_MSG_CHECKING([for stdint types]) 
     168ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` 
     169# try to shortcircuit - if the default include path of the compiler 
     170# can find a "stdint.h" header then we assume that all compilers can. 
     171AC_CACHE_VAL([ac_cv_header_stdint_t],[ 
     172old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" 
     173old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" 
     174old_CFLAGS="$CFLAGS"     ; CFLAGS="" 
     175AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;], 
     176[ac_cv_stdint_result="(assuming C99 compatible system)" 
     177 ac_cv_header_stdint_t="stdint.h"; ], 
     178[ac_cv_header_stdint_t=""]) 
     179CXXFLAGS="$old_CXXFLAGS" 
     180CPPFLAGS="$old_CPPFLAGS" 
     181CFLAGS="$old_CFLAGS" ]) 
     182 
     183v="... $ac_cv_header_stdint_h" 
     184if test "$ac_stdint_h" = "stdint.h" ; then 
     185 AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) 
     186elif test "$ac_stdint_h" = "inttypes.h" ; then 
     187 AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) 
     188elif test "_$ac_cv_header_stdint_t" = "_" ; then 
     189 AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) 
     190else 
     191 ac_cv_header_stdint="$ac_cv_header_stdint_t" 
     192 AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) 
     193fi 
     194 
     195if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit.. 
     196 
     197dnl .....intro message done, now do a few system checks..... 
     198dnl btw, all CHECK_TYPE macros do automatically "DEFINE" a type, therefore 
     199dnl we use the autoconf implementation detail _AC CHECK_TYPE_NEW instead 
     200 
     201inttype_headers=`echo $2 | sed -e 's/,/ /g'` 
     202 
     203ac_cv_stdint_result="(no helpful system typedefs seen)" 
     204AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ 
     205 ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) 
     206  AC_MSG_RESULT([(..)]) 
     207  for i in stdint.h inttypes.h sys/inttypes.h $inttype_headers ; do 
     208   unset ac_cv_type_uintptr_t  
     209   unset ac_cv_type_uint64_t 
     210   _AC_CHECK_TYPE_NEW(uintptr_t,[ac_cv_header_stdint_x=$i],dnl 
     211     continue,[#include <$i>]) 
     212   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) 
     213   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)" 
     214   break; 
     215  done 
     216  AC_MSG_CHECKING([for stdint uintptr_t]) 
     217 ]) 
     218 
     219if test "_$ac_cv_header_stdint_x" = "_" ; then 
     220AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ 
     221 ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) 
     222  AC_MSG_RESULT([(..)]) 
     223  for i in inttypes.h sys/inttypes.h stdint.h $inttype_headers ; do 
     224   unset ac_cv_type_uint32_t 
     225   unset ac_cv_type_uint64_t 
     226   AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],dnl 
     227     continue,[#include <$i>]) 
     228   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) 
     229   ac_cv_stdint_result="(seen uint32_t$and64 in $i)" 
     230   break; 
     231  done 
     232  AC_MSG_CHECKING([for stdint uint32_t]) 
     233 ]) 
     234fi 
     235 
     236if test "_$ac_cv_header_stdint_x" = "_" ; then 
     237if test "_$ac_cv_header_stdint_o" = "_" ; then 
     238AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ 
     239 ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) 
     240  AC_MSG_RESULT([(..)]) 
     241  for i in sys/types.h inttypes.h sys/inttypes.h $inttype_headers ; do 
     242   unset ac_cv_type_u_int32_t 
     243   unset ac_cv_type_u_int64_t 
     244   AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],dnl 
     245     continue,[#include <$i>]) 
     246   AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) 
     247   ac_cv_stdint_result="(seen u_int32_t$and64 in $i)" 
     248   break; 
     249  done 
     250  AC_MSG_CHECKING([for stdint u_int32_t]) 
     251 ]) 
     252fi fi 
     253 
     254dnl if there was no good C99 header file, do some typedef checks... 
     255if test "_$ac_cv_header_stdint_x" = "_" ; then 
     256   AC_MSG_CHECKING([for stdint datatype model]) 
     257   AC_MSG_RESULT([(..)]) 
     258   AC_CHECK_SIZEOF(char) 
     259   AC_CHECK_SIZEOF(short) 
     260   AC_CHECK_SIZEOF(int) 
     261   AC_CHECK_SIZEOF(long) 
     262   AC_CHECK_SIZEOF(void*) 
     263   ac_cv_stdint_char_model="" 
     264   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_char" 
     265   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_short" 
     266   ac_cv_stdint_char_model="$ac_cv_stdint_char_model$ac_cv_sizeof_int" 
     267   ac_cv_stdint_long_model="" 
     268   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_int" 
     269   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_long" 
     270   ac_cv_stdint_long_model="$ac_cv_stdint_long_model$ac_cv_sizeof_voidp" 
     271   name="$ac_cv_stdint_long_model" 
     272   case "$ac_cv_stdint_char_model/$ac_cv_stdint_long_model" in 
     273    122/242)     name="$name,  IP16 (standard 16bit machine)" ;; 
     274    122/244)     name="$name,  LP32 (standard 32bit mac/win)" ;; 
     275    122/*)       name="$name        (unusual int16 model)" ;;  
     276    124/444)     name="$name, ILP32 (standard 32bit unixish)" ;; 
     277    124/488)     name="$name,  LP64 (standard 64bit unixish)" ;; 
     278    124/448)     name="$name, LLP64 (unusual  64bit unixish)" ;; 
     279    124/*)       name="$name        (unusual int32 model)" ;;  
     280    128/888)     name="$name, ILP64 (unusual  64bit numeric)" ;; 
     281    128/*)       name="$name        (unusual int64 model)" ;;  
     282    222/*|444/*) name="$name        (unusual dsptype)" ;; 
     283     *)          name="$name        (very unusal model)" ;; 
     284   esac 
     285   AC_MSG_RESULT([combined for stdint datatype model...  $name]) 
     286fi 
     287 
     288if test "_$ac_cv_header_stdint_x" != "_" ; then 
     289   ac_cv_header_stdint="$ac_cv_header_stdint_x" 
     290elif  test "_$ac_cv_header_stdint_o" != "_" ; then 
     291   ac_cv_header_stdint="$ac_cv_header_stdint_o" 
     292elif  test "_$ac_cv_header_stdint_u" != "_" ; then 
     293   ac_cv_header_stdint="$ac_cv_header_stdint_u" 
     294else 
     295   ac_cv_header_stdint="stddef.h" 
     296fi 
     297 
     298AC_MSG_CHECKING([for extra inttypes in chosen header]) 
     299AC_MSG_RESULT([($ac_cv_header_stdint)]) 
     300dnl see if int_least and int_fast types are present in _this_ header. 
     301unset ac_cv_type_int_least32_t 
     302unset ac_cv_type_int_fast32_t 
     303AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) 
     304AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) 
     305AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) 
     306 
     307fi # shortcircut to system "stdint.h" 
     308# ------------------ PREPARE VARIABLES ------------------------------ 
     309if test "$GCC" = "yes" ; then 
     310ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`  
     311else 
     312ac_cv_stdint_message="using $CC" 
     313fi 
     314 
     315AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl 
     316$ac_cv_stdint_result]) 
     317 
     318# ----------------- DONE inttypes.h checks START header ------------- 
     319AC_CONFIG_COMMANDS([$ac_stdint_h],[ 
     320AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) 
     321ac_stdint=$tmp/_stdint.h 
     322 
     323echo "#ifndef" $_ac_stdint_h >$ac_stdint 
     324echo "#define" $_ac_stdint_h "1" >>$ac_stdint 
     325echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint 
     326echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint 
     327echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint 
     328if test "_$ac_cv_header_stdint_t" != "_" ; then  
     329echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint 
     330fi 
     331 
     332cat >>$ac_stdint <<STDINT_EOF 
     333 
     334/* ................... shortcircuit part ........................... */ 
     335 
     336#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H 
     337#include <stdint.h> 
     338#else 
     339#include <stddef.h> 
     340 
     341/* .................... configured part ............................ */ 
     342 
     343STDINT_EOF 
     344 
     345echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint 
     346if test "_$ac_cv_header_stdint_x" != "_" ; then 
     347  ac_header="$ac_cv_header_stdint_x" 
     348  echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint 
     349else 
     350  echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint 
     351fi 
     352 
     353echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint 
     354if  test "_$ac_cv_header_stdint_o" != "_" ; then 
     355  ac_header="$ac_cv_header_stdint_o" 
     356  echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint 
     357else 
     358  echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint 
     359fi 
     360 
     361echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint 
     362if  test "_$ac_cv_header_stdint_u" != "_" ; then 
     363  ac_header="$ac_cv_header_stdint_u" 
     364  echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint 
     365else 
     366  echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint 
     367fi 
     368 
     369echo "" >>$ac_stdint 
     370 
     371if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then 
     372  echo "#include <$ac_header>" >>$ac_stdint 
     373  echo "" >>$ac_stdint 
     374fi fi 
     375 
     376echo "/* which 64bit typedef has been found */" >>$ac_stdint 
     377if test "$ac_cv_type_uint64_t" = "yes" ; then 
     378echo "#define   _STDINT_HAVE_UINT64_T" "1"  >>$ac_stdint 
     379else 
     380echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint 
     381fi 
     382if test "$ac_cv_type_u_int64_t" = "yes" ; then 
     383echo "#define   _STDINT_HAVE_U_INT64_T" "1"  >>$ac_stdint 
     384else 
     385echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint 
     386fi 
     387echo "" >>$ac_stdint 
     388 
     389echo "/* which type model has been detected */" >>$ac_stdint 
     390if test "_$ac_cv_stdint_char_model" != "_" ; then 
     391echo "#define   _STDINT_CHAR_MODEL" "$ac_cv_stdint_char_model" >>$ac_stdint 
     392echo "#define   _STDINT_LONG_MODEL" "$ac_cv_stdint_long_model" >>$ac_stdint 
     393else 
     394echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint 
     395echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint 
     396fi 
     397echo "" >>$ac_stdint 
     398 
     399echo "/* whether int_least types were detected */" >>$ac_stdint 
     400if test "$ac_cv_type_int_least32_t" = "yes"; then 
     401echo "#define   _STDINT_HAVE_INT_LEAST32_T" "1"  >>$ac_stdint 
     402else 
     403echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint 
     404fi 
     405echo "/* whether int_fast types were detected */" >>$ac_stdint 
     406if test "$ac_cv_type_int_fast32_t" = "yes"; then 
     407echo "#define   _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint 
     408else 
     409echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint 
     410fi 
     411echo "/* whether intmax_t type was detected */" >>$ac_stdint 
     412if test "$ac_cv_type_intmax_t" = "yes"; then 
     413echo "#define   _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint 
     414else 
     415echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint 
     416fi 
     417echo "" >>$ac_stdint 
     418 
     419  cat >>$ac_stdint <<STDINT_EOF 
     420/* .................... detections part ............................ */ 
     421 
     422/* whether we need to define bitspecific types from compiler base types */ 
     423#ifndef _STDINT_HEADER_INTPTR 
     424#ifndef _STDINT_HEADER_UINT32 
     425#ifndef _STDINT_HEADER_U_INT32 
     426#define _STDINT_NEED_INT_MODEL_T 
     427#else 
     428#define _STDINT_HAVE_U_INT_TYPES 
     429#endif 
     430#endif 
     431#endif 
     432 
     433#ifdef _STDINT_HAVE_U_INT_TYPES 
     434#undef _STDINT_NEED_INT_MODEL_T 
     435#endif 
     436 
     437#ifdef  _STDINT_CHAR_MODEL 
     438#if     _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124 
     439#ifndef _STDINT_BYTE_MODEL 
     440#define _STDINT_BYTE_MODEL 12 
     441#endif 
     442#endif 
     443#endif 
     444 
     445#ifndef _STDINT_HAVE_INT_LEAST32_T 
     446#define _STDINT_NEED_INT_LEAST_T 
     447#endif 
     448 
     449#ifndef _STDINT_HAVE_INT_FAST32_T 
     450#define _STDINT_NEED_INT_FAST_T 
     451#endif 
     452 
     453#ifndef _STDINT_HEADER_INTPTR 
     454#define _STDINT_NEED_INTPTR_T 
     455#ifndef _STDINT_HAVE_INTMAX_T 
     456#define _STDINT_NEED_INTMAX_T 
     457#endif 
     458#endif 
     459 
     460 
     461/* .................... definition part ............................ */ 
     462 
     463/* some system headers have good uint64_t */ 
     464#ifndef _HAVE_UINT64_T 
     465#if     defined _STDINT_HAVE_UINT64_T  || defined HAVE_UINT64_T 
     466#define _HAVE_UINT64_T 
     467#elif   defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T 
     468#define _HAVE_UINT64_T 
     469typedef u_int64_t uint64_t; 
     470#endif 
     471#endif 
     472 
     473#ifndef _HAVE_UINT64_T 
     474/* .. here are some common heuristics using compiler runtime specifics */ 
     475#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L 
     476#define _HAVE_UINT64_T 
     477typedef long long int64_t; 
     478typedef unsigned long long uint64_t; 
     479 
     480#elif !defined __STRICT_ANSI__ 
     481#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ 
     482#define _HAVE_UINT64_T 
     483typedef __int64 int64_t; 
     484typedef unsigned __int64 uint64_t; 
     485 
     486#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ 
     487/* note: all ELF-systems seem to have loff-support which needs 64-bit */ 
     488#if !defined _NO_LONGLONG 
     489#define _HAVE_UINT64_T 
     490typedef long long int64_t; 
     491typedef unsigned long long uint64_t; 
     492#endif 
     493 
     494#elif defined __alpha || (defined __mips && defined _ABIN32) 
     495#if !defined _NO_LONGLONG 
     496typedef long int64_t; 
     497typedef unsigned long uint64_t; 
     498#endif 
     499  /* compiler/cpu type to define int64_t */ 
     500#endif 
     501#endif 
     502#endif 
     503 
     504#if defined _STDINT_HAVE_U_INT_TYPES 
     505/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ 
     506typedef u_int8_t uint8_t; 
     507typedef u_int16_t uint16_t; 
     508typedef u_int32_t uint32_t; 
     509 
     510/* glibc compatibility */ 
     511#ifndef __int8_t_defined 
    89512#define __int8_t_defined 
    90 typedef signed char int8_t; 
    91 typedef signed short int16_t; 
    92 typedef signed int int32_t; 
    93 #ifdef ARCH_X86 
    94 typedef signed long long int64_t; 
    95 #endif 
    96 #endif 
    97 #if (!defined _LINUX_TYPES_H) 
    98 typedef unsigned char uint8_t; 
    99 typedef unsigned short uint16_t; 
    100 typedef unsigned int uint32_t; 
    101 #ifdef ARCH_X86 
     513#endif 
     514#endif 
     515 
     516#ifdef _STDINT_NEED_INT_MODEL_T 
     517/* we must guess all the basic types. Apart from byte-adressable system, */ 
     518/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ 
     519/* (btw, those nibble-addressable systems are way off, or so we assume) */ 
     520 
     521dnl   /* have a look at "64bit and data size neutrality" at */ 
     522dnl   /* http://unix.org/version2/whatsnew/login_64bit.html */ 
     523dnl   /* (the shorthand "ILP" types always have a "P" part) */ 
     524 
     525#if defined _STDINT_BYTE_MODEL 
     526#if _STDINT_LONG_MODEL+0 == 242 
     527/* 2:4:2 =  IP16 = a normal 16-bit system                */ 
     528typedef unsigned char   uint8_t; 
     529typedef unsigned short  uint16_t; 
     530typedef unsigned long   uint32_t; 
     531#ifndef __int8_t_defined 
     532#define __int8_t_defined 
     533typedef          char    int8_t; 
     534typedef          short   int16_t; 
     535typedef          long    int32_t; 
     536#endif 
     537#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 
     538/* 2:4:4 =  LP32 = a 32-bit system derived from a 16-bit */ 
     539/* 4:4:4 = ILP32 = a normal 32-bit system                */ 
     540typedef unsigned char   uint8_t; 
     541typedef unsigned short  uint16_t; 
     542typedef unsigned int    uint32_t; 
     543#ifndef __int8_t_defined 
     544#define __int8_t_defined 
     545typedef          char    int8_t; 
     546typedef          short   int16_t; 
     547typedef          int     int32_t; 
     548#endif 
     549#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 
     550/* 4:8:4 =  IP32 = a 32-bit system prepared for 64-bit    */ 
     551/* 4:8:8 =  LP64 = a normal 64-bit system                 */ 
     552typedef unsigned char   uint8_t; 
     553typedef unsigned short  uint16_t; 
     554typedef unsigned int    uint32_t; 
     555#ifndef __int8_t_defined 
     556#define __int8_t_defined 
     557typedef          char    int8_t; 
     558typedef          short   int16_t; 
     559typedef          int     int32_t; 
     560#endif 
     561/* this system has a "long" of 64bit */ 
     562#ifndef _HAVE_UINT64_T 
     563#define _HAVE_UINT64_T 
     564typedef unsigned long   uint64_t; 
     565typedef          long    int64_t; 
     566#endif 
     567#elif _STDINT_LONG_MODEL+0 == 448 
     568/*      LLP64   a 64-bit system derived from a 32-bit system */ 
     569typedef unsigned char   uint8_t; 
     570typedef unsigned short  uint16_t; 
     571typedef unsigned int    uint32_t; 
     572#ifndef __int8_t_defined 
     573#define __int8_t_defined 
     574typedef          char    int8_t; 
     575typedef          short   int16_t; 
     576typedef          int     int32_t; 
     577#endif 
     578/* assuming the system has a "long long" */ 
     579#ifndef _HAVE_UINT64_T 
     580#define _HAVE_UINT64_T 
    102581typedef unsigned long long uint64_t; 
    103 #endif 
    104 #endif 
    105 #endif 
    106 EOF 
    107         ])]) 
     582typedef          long long  int64_t; 
     583#endif 
     584#else 
     585#define _STDINT_NO_INT32_T 
     586#endif 
     587#else 
     588#define _STDINT_NO_INT8_T 
     589#define _STDINT_NO_INT32_T 
     590#endif 
     591#endif 
     592 
     593/* 
     594 * quote from SunOS-5.8 sys/inttypes.h: 
     595 * Use at your own risk.  As of February 1996, the committee is squarely 
     596 * behind the fixed sized types; the "least" and "fast" types are still being 
     597 * discussed.  The probability that the "fast" types may be removed before 
     598 * the standard is finalized is high enough that they are not currently 
     599 * implemented. 
     600 */ 
     601 
     602#if defined _STDINT_NEED_INT_LEAST_T 
     603typedef  int8_t    int_least8_t; 
     604typedef  int16_t   int_least16_t; 
     605typedef  int32_t   int_least32_t; 
     606#ifdef _HAVE_UINT64_T 
     607typedef  int64_t   int_least64_t; 
     608#endif 
     609 
     610typedef uint8_t   uint_least8_t; 
     611typedef uint16_t  uint_least16_t; 
     612typedef uint32_t  uint_least32_t; 
     613#ifdef _HAVE_UINT64_T 
     614typedef uint64_t  uint_least64_t; 
     615#endif 
     616  /* least types */ 
     617#endif 
     618 
     619#if defined _STDINT_NEED_INT_FAST_T 
     620typedef  int8_t    int_fast8_t;  
     621typedef  int       int_fast16_t; 
     622typedef  int32_t   int_fast32_t; 
     623#ifdef _HAVE_UINT64_T 
     624typedef  int64_t   int_fast64_t; 
     625#endif 
     626 
     627typedef uint8_t   uint_fast8_t;  
     628typedef unsigned  uint_fast16_t; 
     629typedef uint32_t  uint_fast32_t; 
     630#ifdef _HAVE_UINT64_T 
     631typedef uint64_t  uint_fast64_t; 
     632#endif 
     633  /* fast types */ 
     634#endif 
     635 
     636#ifdef _STDINT_NEED_INTMAX_T 
     637#ifdef _HAVE_UINT64_T 
     638typedef  int64_t       intmax_t; 
     639typedef uint64_t      uintmax_t; 
     640#else 
     641typedef          long  intmax_t; 
     642typedef unsigned long uintmax_t; 
     643#endif 
     644#endif 
     645 
     646#ifdef _STDINT_NEED_INTPTR_T 
     647#ifndef __intptr_t_defined 
     648#define __intptr_t_defined 
     649/* we encourage using "long" to store pointer values, never use "int" ! */ 
     650#if   _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 
     651typedef  unsinged int   uintptr_t; 
     652typedef           int    intptr_t; 
     653#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 
     654typedef  unsigned long  uintptr_t; 
     655typedef           long   intptr_t; 
     656#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T 
     657typedef        uint64_t uintptr_t; 
     658typedef         int64_t  intptr_t; 
     659#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ 
     660typedef  unsigned long  uintptr_t; 
     661typedef           long   intptr_t; 
     662#endif 
     663#endif 
     664#endif 
     665 
     666  /* shortcircuit*/ 
     667#endif 
     668  /* once */ 
     669#endif 
     670#endif 
     671STDINT_EOF 
     672    if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then 
     673      AC_MSG_NOTICE([$ac_stdint_h is unchanged]) 
     674    else 
     675      ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` 
     676      AS_MKDIR_P(["$ac_dir"]) 
     677      rm -f $ac_stdint_h 
     678      mv $ac_stdint $ac_stdint_h 
     679    fi 
     680],[# variables for create stdint.h replacement 
     681PACKAGE="$PACKAGE" 
     682VERSION="$VERSION" 
     683ac_stdint_h="$ac_stdint_h" 
     684_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) 
     685ac_cv_stdint_message="$ac_cv_stdint_message" 
     686ac_cv_header_stdint_t="$ac_cv_header_stdint_t" 
     687ac_cv_header_stdint_x="$ac_cv_header_stdint_x" 
     688ac_cv_header_stdint_o="$ac_cv_header_stdint_o" 
     689ac_cv_header_stdint_u="$ac_cv_header_stdint_u" 
     690ac_cv_type_uint64_t="$ac_cv_type_uint64_t" 
     691ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" 
     692ac_cv_stdint_char_model="$ac_cv_stdint_char_model" 
     693ac_cv_stdint_long_model="$ac_cv_stdint_long_model" 
     694ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" 
     695ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" 
     696ac_cv_type_intmax_t="$ac_cv_type_intmax_t" 
     697]) 
     698]) 
  • trunk/liba52/bootstrap

    r1 r63  
    11#! /bin/sh 
     2# $Id: bootstrap 602 2008-01-20 23:32:22Z xtophe $ 
     3 
     4# bootstrap: generic bootstrap/autogen.sh script for autotools projects 
     5# 
     6# Copyright (c) 2002-2007 Sam Hocevar <sam@zoy.org> 
     7# 
     8#    This program is free software. It comes without any warranty, to 
     9#    the extent permitted by applicable law. You can redistribute it 
     10#    and/or modify it under the terms of the Do What The Fuck You Want 
     11#    To Public License, Version 2, as published by Sam Hocevar. See 
     12#    http://sam.zoy.org/wtfpl/COPYING for more details. 
     13# 
     14# The latest version of this script can be found at the following place: 
     15#   http://sam.zoy.org/autotools/ 
     16 
     17# Die if an error occurs 
     18set -e 
     19 
     20# Guess whether we are using configure.ac or configure.in 
     21if test -f configure.ac; then 
     22  conffile="configure.ac" 
     23elif test -f configure.in; then 
     24  conffile="configure.in" 
     25else 
     26  echo "$0: could not find configure.ac or configure.in" 
     27  exit 1 
     28fi 
     29 
     30# Check for needed features 
     31auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *([[ ]*\([^] )]*\).*/\1/p' $conffile`" 
     32libtool="`grep -q '^[ \t]*A._PROG_LIBTOOL' $conffile && echo yes || echo no`" 
     33header="`grep -q '^[ \t]*A._CONFIG_HEADER' $conffile && echo yes || echo no`" 
     34aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am`" 
     35 
     36# Check for automake 
     37amvers="no" 
     38for v in 10 9 8 7 6 5; do 
     39  if automake-1.${v} --version >/dev/null 2>&1; then 
     40    amvers="-1.${v}" 
     41    break 
     42  elif automake1.${v} --version >/dev/null 2>&1; then 
     43    amvers="1.${v}" 
     44    break 
     45  fi 
     46done 
     47 
     48if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then 
     49  amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`" 
     50  if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then 
     51    amvers="no" 
     52  else 
     53    amvers="" 
     54  fi 
     55fi 
     56 
     57if test "$amvers" = "no"; then 
     58  echo "$0: you need automake version 1.5 or later" 
     59  exit 1 
     60fi 
     61 
     62# Check for autoconf 
     63acvers="no" 
     64for v in "" "259" "253"; do 
     65  if autoconf${v} --version >/dev/null 2>&1; then 
     66    acvers="${v}" 
     67    break 
     68  fi 
     69done 
     70 
     71if test "$acvers" = "no"; then 
     72  echo "$0: you need autoconf" 
     73  exit 1 
     74fi 
     75 
     76# Check for libtool 
     77if test "$libtool" = "yes"; then 
     78  libtoolize="no" 
     79  if glibtoolize --version >/dev/null 2>&1; then 
     80    libtoolize="glibtoolize" 
     81  else 
     82    for v in "16" "15" "" "14"; do 
     83      if libtoolize${v} --version >/dev/null 2>&1; then 
     84        libtoolize="libtoolize${v}" 
     85        break 
     86      fi 
     87    done 
     88  fi 
     89 
     90  if test "$libtoolize" = "no"; then 
     91    echo "$0: you need libtool" 
     92    exit 1 
     93  fi 
     94fi 
     95 
     96# Remove old cruft 
     97for x in aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh; do rm -f $x autotools/$x; if test -n "$auxdir"; then rm -f "$auxdir/$x"; fi; done 
     98rm -Rf autom4te.cache 
     99if test -n "$auxdir"; then 
     100  if test ! -d "$auxdir"; then 
     101    mkdir "$auxdir" 
     102  fi 
     103  aclocalflags="${aclocalflags} -I $auxdir -I ." 
     104fi 
     105 
     106# Explain what we are doing from now 
    2107set -x 
    3 aclocal -I autotools 
    4 libtoolize --force --copy 
    5 autoheader 
    6 automake --add-missing --copy 
    7 autoconf 
    8 rm -f config.cache 
     108 
     109# Bootstrap package 
     110if test "$libtool" = "yes"; then 
     111  ${libtoolize} --copy --force 
     112  if test -n "$auxdir" -a ! "$auxdir" = "." -a -f "ltmain.sh"; then 
     113    echo "$0: working around a minor libtool issue" 
     114    mv ltmain.sh "$auxdir/" 
     115  fi 
     116fi 
     117 
     118aclocal${amvers} ${aclocalflags} 
     119autoconf${acvers} 
     120if test "$header" = "yes"; then 
     121  autoheader${acvers} 
     122fi 
     123#add --include-deps if you want to bootstrap with any other compiler than gcc 
     124#automake${amvers} --add-missing --copy --include-deps 
     125automake${amvers} --foreign --add-missing --copy 
     126 
     127# Remove cruft that we no longer want 
     128rm -Rf autom4te.cache 
     129 
  • trunk/liba52/include/Makefile.am

    r1 r63  
    1 pkginclude_HEADERS = a52.h attributes.h audio_out.h mm_accel.h 
     1pkginclude_HEADERS = a52.h attributes.h audio_out.h 
    22 
    3 EXTRA_DIST = tendra.h 
     3EXTRA_DIST = mmx.h tendra.h 
  • trunk/liba52/include/a52.h

    r43 r63  
    11/* 
    22 * a52.h 
    3  * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org> 
     3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> 
    44 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> 
    55 * 
     
    2525extern "C"{ 
    2626#endif 
    27  
     27         
    2828#ifndef A52_H 
    2929#define A52_H 
    3030 
    31 #ifndef LIBA52_DOUBLE 
     31#if defined(LIBA52_FIXED) 
     32typedef int32_t sample_t; 
     33typedef int32_t level_t; 
     34#elif defined(LIBA52_DOUBLE) 
     35typedef double sample_t; 
     36typedef double level_t; 
     37#else 
    3238typedef float sample_t; 
    33 #else 
    34 typedef double sample_t; 
     39typedef float level_t; 
    3540#endif 
    3641 
     
    5560// this next constant can be ORed with A52_DOLBY to tell liba52 to use 5.0 DPLII matrix encoding, 
    5661// rather than just 4.0 Dolby Surround matrix encoding 
    57 #define A52_USE_DPLII 64 
     62#define A52_USE_DPLII 64         
     63         
     64#define A52_ACCEL_DJBFFT 65536 
    5865 
    59 a52_state_t * a52_init (uint32_t mm_accel); 
     66#define A52_ACCEL_X86_MMX 1 
     67#define A52_ACCEL_X86_3DNOW 2 
     68#define A52_ACCEL_X86_MMXEXT 4 
     69#define A52_ACCEL_X86_SSE2 8 
     70#define A52_ACCEL_X86_SSE3 16 
     71#define A52_ACCEL_PPC_ALTIVEC 1 
     72#define A52_ACCEL_ALPHA 1 
     73#define A52_ACCEL_ALPHA_MVI 2 
     74#define A52_ACCEL_SPARC_VIS 1 
     75#define A52_ACCEL_SPARC_VIS2 2 
     76#define A52_ACCEL_DETECT 0x80000000 
     77 
     78uint32_t a52_accel (uint32_t accel); 
     79a52_state_t * a52_init (void); 
    6080sample_t * a52_samples (a52_state_t * state); 
    6181int a52_syncinfo (const uint8_t * buf, int * flags, 
    6282                  int * sample_rate, int * bit_rate); 
     83int a52_crc (uint8_t * buf, int len); 
    6384int a52_frame (a52_state_t * state, uint8_t * buf, int * flags, 
    64                sample_t * level, sample_t bias); 
     85               level_t * level, sample_t bias); 
    6586void a52_dynrng (a52_state_t * state, 
    66                  sample_t (* call) (sample_t, void *), void * data); 
     87                 level_t (* call) (level_t, void *), void * data); 
    6788int a52_block (a52_state_t * state); 
    6889void a52_free (a52_state_t * state); 
     
    7394}; 
    7495#endif 
     96 
  • trunk/liba52/include/attributes.h

    r1 r63  
    11/* 
    22 * attributes.h 
    3  * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org> 
     3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> 
    44 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> 
    55 * 
     
    2828#define ATTR_ALIGN(align) 
    2929#endif 
     30 
     31#ifdef HAVE_BUILTIN_EXPECT 
     32#define likely(x) __builtin_expect ((x) != 0, 1) 
     33#define unlikely(x) __builtin_expect ((x) != 0, 0) 
     34#else 
     35#define likely(x) (x) 
     36#define unlikely(x) (x) 
     37#endif 
  • trunk/liba52/include/audio_out.h

    r1 r63  
    11/* 
    22 * audio_out.h 
    3  * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org> 
     3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> 
    44 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> 
    55 * 
     
    2626struct ao_instance_s { 
    2727    int (* setup) (ao_instance_t * instance, int sample_rate, int * flags, 
    28                    sample_t * level, sample_t * bias); 
     28                   level_t * level, sample_t * bias); 
    2929    int (* play) (ao_instance_t * instance, int flags, sample_t * samples); 
    3030    void (* close) (ao_instance_t * instance); 
     
    4040/* return NULL terminated array of all drivers */ 
    4141ao_driver_t * ao_drivers (void); 
    42  
    43 static inline ao_instance_t * ao_open (ao_open_t * open) 
    44 { 
    45     return open (); 
    46 } 
    47  
    48 static inline int ao_setup (ao_instance_t * instance, int sample_rate, 
    49                             int * flags, sample_t * level, sample_t * bias) 
    50 { 
    51     return instance->setup (instance, sample_rate, flags, level, bias); 
    52 } 
    53  
    54 static inline int ao_play (ao_instance_t * instance, int flags, 
    55                            sample_t * samples) 
    56 { 
    57     return instance->play (instance, flags, samples); 
    58 } 
    59  
    60 static inline void ao_close (ao_instance_t * instance) 
    61 { 
    62     if (instance->close) 
    63         instance->close (instance); 
    64 } 
  • trunk/liba52/include/tendra.h

    r1 r63  
    11/* 
    22 * tendra.h 
    3  * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org> 
     3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> 
    44 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> 
    55 * 
  • trunk/liba52/liba52/Makefile.am

    r1 r63  
    1 CFLAGS = @CFLAGS@ @LIBA52_CFLAGS@ 
     1AM_CFLAGS = $(OPT_CFLAGS) $(LIBA52_CFLAGS) 
    22 
    33lib_LTLIBRARIES = liba52.la 
    4  
    5 liba52_la_SOURCES = bitstream.c imdct.c bit_allocate.c parse.c downmix.c 
    6 liba52_la_LIBADD = @LIBA52_LIBS@ -lm 
     4liba52_la_SOURCES = bitstream.c imdct.c bit_allocate.c parse.c downmix.c crc.c cpu_accel.c cpu_state.c 
     5liba52_