Dash:
[t2-trunk.git] / architecture / avr32 / pkg_mplayer.patch
blobadf546814a945863c806f0b564c028c3b667930c
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: architecture/avr32/pkg_mplayer.patch
5 # Copyright (C) 2007 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- mplayer/configure.vanilla 2007-02-27 18:01:10.798758333 +0100
18 +++ mplayer/configure 2007-02-27 18:02:34.875549596 +0100
19 @@ -1192,6 +1192,16 @@
20 _optimizing="$proc"
23 + avr32)
24 + _def_arch='#define ARCH_AVR32 1'
25 + _target_arch='TARGET_ARCH_AVR32 = yes'
26 + iproc='avr32'
27 + proc=''
28 + _march=''
29 + _mcpu=''
30 + _optimizing=''
31 + ;;
33 sparc64)
34 _def_arch='#define ARCH_SPARC 1'
35 _target_arch='TARGET_ARCH_SPARC = yes'
36 --- mplayer/libaf/af_format.c.vanilla 2007-02-27 22:45:05.327032003 +0100
37 +++ mplayer/libaf/af_format.c 2007-02-27 22:46:27.975741885 +0100
38 @@ -18,7 +18,7 @@
39 #include "libvo/fastmemcpy.h"
41 // Integer to float conversion through lrintf()
42 -#ifdef HAVE_LRINTF
43 +#if defined (HAVE_LRINTF) && ! defined (__AVR32__)
44 #include <math.h>
45 long int lrintf(float);
46 #else
47 --- mplayer/libavcodec/mpegaudiodec.c.vanilla 2007-02-27 22:52:19.439770679 +0100
48 +++ mplayer/libavcodec/mpegaudiodec.c 2007-02-27 22:58:18.948257900 +0100
49 @@ -405,9 +405,9 @@
50 for(i=0; i<512*16; i++){
51 int exponent= (i>>4);
52 double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5);
53 - expval_table[exponent][i&15]= llrint(f);
54 + expval_table[exponent][i&15]= lrintf(f);
55 if((i&15)==1)
56 - exp_table[exponent]= llrint(f);
57 + exp_table[exponent]= lrintf(f);
60 for(i=0;i<7;i++) {
61 --- ./libfaad2/common.c.vanilla 2007-03-16 13:55:56.072024106 +0000
62 +++ ./libfaad2/common.c 2007-03-16 13:56:55.735424130 +0000
63 @@ -34,6 +34,12 @@
64 #include "syntax.h"
67 +#if defined(__AVR32__)
68 +long int lrintf (float __x) {
69 + rintf(__x);
71 +#endif
73 /* Returns the sample rate index based on the samplerate */
74 uint8_t get_sr_index(const uint32_t samplerate)
76 --- mplayer/libavcodec/atrac3.c.vanilla 2007-04-23 14:35:11.691070281 +0200
77 +++ mplayer/libavcodec/atrac3.c 2007-04-23 14:36:13.006564452 +0200
78 @@ -871,6 +871,10 @@
79 * @param avctx pointer to the AVCodecContext
82 +#ifdef __avr32__
83 +#define round rint
84 +#endif
86 static int atrac3_decode_frame(AVCodecContext *avctx,
87 void *data, int *data_size,
88 uint8_t *buf, int buf_size) {
89 --- mplayer/libmpdemux/demuxer.c.vanilla 2007-04-23 15:05:07.585412467 +0200
90 +++ mplayer/libmpdemux/demuxer.c 2007-04-23 15:05:18.482033430 +0200
91 @@ -75,7 +75,9 @@
92 &demuxer_desc_tv,
93 #endif
94 &demuxer_desc_mf,
95 +#if defined(USE_LIBAVFORMAT) || defined(USE_LIBAVFORMAT_SO)
96 &demuxer_desc_lavf_preferred,
97 +#endif
98 &demuxer_desc_avi,
99 &demuxer_desc_y4m,
100 &demuxer_desc_asf,