# HG changeset patch # User rtognimp # Date 1104362626 0 # Node ID 17dd4530221220704916577c53a6f217e1be2ef3 # Parent 58f3a6ce6ff382cc8fe9d3e50d6ea35d1344a206 Support amr_nb and amr_wb via libavcodec Add fourcc for H.263 used in 3gp files (s263) diff -r 58f3a6ce6ff3 -r 17dd45302212 configure --- a/configure Wed Dec 29 20:32:26 2004 +0000 +++ b/configure Wed Dec 29 23:23:46 2004 +0000 @@ -220,6 +220,9 @@ --disable-liba52 disable builtin liba52 [enabled] --enable-libdts enable libdts support [autodetect] --disable-libmpeg2 disable builtin libmpeg2 [enabled] + --disable-amr_nb disable amr narrowband, floating point [autodetect] + --disable-amr_nb-fixed disable amr narrowband, fixed point [autodetect] + --disable-amr_wb disable amr wideband, floating point [autodetect] Video output: --disable-vidix disable VIDIX [enable on x86 *nix] @@ -1268,6 +1271,9 @@ # and have - unless stated otherwise - at least 2 states : yes no # If autodetection is available then the third state is: auto _libavcodec=auto +_amr_nb=auto +_amr_nb_fixed=auto +_amr_wb=auto _libavcodecso=auto _libavformat=auto _fame=auto @@ -1576,6 +1582,12 @@ --disable-opendivx) _opendivx=no ;; --enable-libavcodec) _libavcodec=yes ;; --disable-libavcodec) _libavcodec=no ;; + --enable-amr_nb) _amr_nb=yes ;; + --disable-amr_nb) _amr_nb=no ;; + --enable-amr_nb-fixed) _amr_nb_fixed=yes ;; + --disable-amr_nb-fixed) _amr_nb_fixed=no ;; + --enable-amr_wb) _amr_wb=yes ;; + --disable-amr_wb) _amr_wb=no ;; --enable-libavformat) _libavformat=yes;; --disable-libavformat) _libavformat=no ;; --enable-libfame) _fame=yes ;; @@ -5689,6 +5701,84 @@ fi fi +echocheck "amr narrowband" +_echomsg="" +if test "$_amr_nb" = auto ; then + if test -f libavcodec/amr_float/sp_dec.c ; then + if test "$_libavcodec" = yes ; then + _amr_nb=yes + else + _amr_nb=no + _echomsg "libavcodec (static) is required by amr_nb, sorry" + fi + else + _amr_nb=no + fi +fi +if test "$_amr_nb" = yes ; then + _def_amr_nb='#define AMR_NB 1' +else + _def_amr_nb='#undef AMR_NB' +fi +echores "$_amr_nb $_echomsg" + +echocheck "amr narrowband, fixed point" +_echomsg="" +if test "$_amr_nb_fixed" = auto ; then + if test -f libavcodec/amr/dtx_dec.c ; then + if test "$_libavcodec" = yes ; then + if test "$_amr_nb" = no ; then + _amr_nb_fixed=yes + else + _amr_nb_fixed=no + _echomsg="(disabled by amr_nb)" + fi + else + _amr_nb_fixed=no + _echomsg "libavcodec (static) is required by amr_nb-fixed, sorry" + fi + else + _amr_nb_fixed=no + fi +fi +if test "$_amr_nb_fixed" = yes ; then + _def_amr_nb='#define AMR_NB 1' + _def_amr_nb_fixed='#define AMR_NB_FIXED 1' + _amr_nb=yes; +else + _def_amr_nb_fixed='#undef AMR_NB_FIXED' +fi +echores "$_amr_nb_fixed $_echomsg" + +if test "$_amr_nb" = yes ; then + _codecmodules="amr_nb $_codecmodules" +else + _nocodecmodules="amr_nb $_nocodecmodules" +fi + +echocheck "amr wideband" +_echomsg="" +if test "$_amr_wb" = auto ; then + if test -f libavcodec/amrwb_float/dec_dtx.c ; then + if test "$_libavcodec" = yes ; then + _amr_wb=yes + else + _amr_wb=no + _echomsg="libavcodec (static) is required by amr_wb, sorry" + fi + else + _amr_wb=no + fi +fi +if test "$_amr_wb" = yes ; then + _def_amr_wb='#define AMR_WB 1' + _codecmodules="amr_wb $_codecmodules" +else + _def_amr_wb='#undef AMR_WB' + _nocodecmodules="amr_wb $_nocodecmodules" +fi +echores "$_amr_wb $_echomsg" + echocheck "libdv-0.9.5+" if test "$_libdv" = auto ; then _libdv=no @@ -6676,6 +6766,9 @@ TOOLAME=$_toolame TOOLAME_EXTRAFLAGS=$_toolame_extraflags TOOLAME_LIB=$_toolame_lib +AMR_NB=$_amr_nb +AMR_NB_FIXED=$_amr_nb_fixed +AMR_WB=$_amr_wb # --- Some stuff for autoconfigure ---- $_target_arch @@ -7005,6 +7098,11 @@ #define CONFIG_MPEGAUDIO_HP 1 +/* Use amr codecs from libavcodec (requires amr sources) */ +$_def_amr_nb +$_def_amr_nb_fixed +$_def_amr_wb + /* Use codec libs included in mplayer CVS / source dist: */ $_def_mp3lib $_def_liba52 diff -r 58f3a6ce6ff3 -r 17dd45302212 etc/codecs.conf --- a/etc/codecs.conf Wed Dec 29 20:32:26 2004 +0000 +++ b/etc/codecs.conf Wed Dec 29 23:23:46 2004 +0000 @@ -893,6 +893,7 @@ status working fourcc H263,U263,h263,X263 fourcc viv1 h263 + fourcc s263 driver ffmpeg dll h263 out YV12,I420,IYUV @@ -2327,6 +2328,20 @@ driver ffmpeg dll "dts" +audiocodec ffamrnb + info "AMR Narrowband" + status working + fourcc samr + driver ffmpeg + dll "amr_nb" + +audiocodec ffamrwb + info "AMR Widewband" + status working + fourcc sawb + driver ffmpeg + dll "amr_wb" + audiocodec voxware info "VoxWare" status working