# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: architecture/avr32/pkg_mplayer.patch # Copyright (C) 2007 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- mplayer/configure.vanilla 2007-02-27 18:01:10.798758333 +0100 +++ mplayer/configure 2007-02-27 18:02:34.875549596 +0100 @@ -1192,6 +1192,16 @@ _optimizing="$proc" ;; + avr32) + _def_arch='#define ARCH_AVR32 1' + _target_arch='TARGET_ARCH_AVR32 = yes' + iproc='avr32' + proc='' + _march='' + _mcpu='' + _optimizing='' + ;; + sparc64) _def_arch='#define ARCH_SPARC 1' _target_arch='TARGET_ARCH_SPARC = yes' --- mplayer/libaf/af_format.c.vanilla 2007-02-27 22:45:05.327032003 +0100 +++ mplayer/libaf/af_format.c 2007-02-27 22:46:27.975741885 +0100 @@ -18,7 +18,7 @@ #include "libvo/fastmemcpy.h" // Integer to float conversion through lrintf() -#ifdef HAVE_LRINTF +#if defined (HAVE_LRINTF) && ! defined (__AVR32__) #include long int lrintf(float); #else --- mplayer/libavcodec/mpegaudiodec.c.vanilla 2007-02-27 22:52:19.439770679 +0100 +++ mplayer/libavcodec/mpegaudiodec.c 2007-02-27 22:58:18.948257900 +0100 @@ -405,9 +405,9 @@ for(i=0; i<512*16; i++){ int exponent= (i>>4); double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5); - expval_table[exponent][i&15]= llrint(f); + expval_table[exponent][i&15]= lrintf(f); if((i&15)==1) - exp_table[exponent]= llrint(f); + exp_table[exponent]= lrintf(f); } for(i=0;i<7;i++) { --- ./libfaad2/common.c.vanilla 2007-03-16 13:55:56.072024106 +0000 +++ ./libfaad2/common.c 2007-03-16 13:56:55.735424130 +0000 @@ -34,6 +34,12 @@ #include "syntax.h" +#if defined(__AVR32__) +long int lrintf (float __x) { + rintf(__x); +} +#endif + /* Returns the sample rate index based on the samplerate */ uint8_t get_sr_index(const uint32_t samplerate) { --- mplayer/libavcodec/atrac3.c.vanilla 2007-04-23 14:35:11.691070281 +0200 +++ mplayer/libavcodec/atrac3.c 2007-04-23 14:36:13.006564452 +0200 @@ -871,6 +871,10 @@ * @param avctx pointer to the AVCodecContext */ +#ifdef __avr32__ +#define round rint +#endif + static int atrac3_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { --- mplayer/libmpdemux/demuxer.c.vanilla 2007-04-23 15:05:07.585412467 +0200 +++ mplayer/libmpdemux/demuxer.c 2007-04-23 15:05:18.482033430 +0200 @@ -75,7 +75,9 @@ &demuxer_desc_tv, #endif &demuxer_desc_mf, +#if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO) &demuxer_desc_lavf_preferred, +#endif &demuxer_desc_avi, &demuxer_desc_y4m, &demuxer_desc_asf,