[MPlayer-dev-eng] compiling mplayer on Sharp Zaurus SL600L with vorbis support.....
Dinosoft Italia
support at dinosoft.it
Mon Jul 5 10:40:25 CEST 2004
Good morning,
i hope this is the rigth place for this question...
i want to compile mplayer with vorbis support ( tremor patch) on SL
6000L ( i search but i didnt find any version running on SL6000L !!!)
On the web i find this patch :
*************************************************************************************
diff -ubr MPlayer-0.90pre8.orig/configure MPlayer-0.90pre8/configure
--- MPlayer-0.90pre8.orig/configure Tue Sep 17 15:47:55 2002
+++ MPlayer-0.90pre8/configure Sat Nov 9 15:53:11 2002
@@ -3393,11 +3394,11 @@
#include <vorbis/codec.h>
int main(void) { vorbis_packet_blocksize(0,0); return 0; }
EOF
- cc_check -lvorbis -logg -lm && _vorbis=yes
+ cc_check -lvorbisidec -lm && _vorbis=yes
fi
if test "$_vorbis" = yes ; then
_def_vorbis='#define HAVE_OGGVORBIS 1'
- _ld_vorbis='-lvorbis -logg'
+ _ld_vorbis='-lvorbisidec'
_codecmodules="libvorbis $_codecmodules"
else
_def_vorbis='#undef HAVE_OGGVORBIS'
diff -ubr MPlayer-0.90pre8.orig/libmpcodecs/ad_libvorbis.c
MPlayer-0.90pre8/libmpcodecs/ad_libvorbis.c
--- MPlayer-0.90pre8.orig/libmpcodecs/ad_libvorbis.c Sat Aug 31 09:09:23
2002
+++ MPlayer-0.90pre8/libmpcodecs/ad_libvorbis.c Fri Nov 8 11:40:36 2002
@@ -19,7 +19,7 @@
LIBAD_EXTERN(libvorbis)
-#include <vorbis/codec.h>
+#include <tremor/ivorbiscodec.h>
// This struct is also defined in demux_ogg.c => common header ?
typedef struct ov_struct_st {
@@ -121,11 +121,25 @@
return CONTROL_UNKNOWN;
}
+static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
+ int tmp;
+ asm volatile("subs %1, %0, #32768\n\t"
+ "movpl %0, #0x7f00\n\t"
+ "orrpl %0, %0, #0xff\n"
+ "adds %1, %0, #32768\n\t"
+ "movmi %0, #0x8000"
+ : "+r"(x),"=r"(tmp)
+ :
+ : "cc");
+ return(x);
+}
+
+
static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int
maxlen)
{
int len = 0;
int samples;
- float **pcm;
+ ogg_int32_t **pcm;
ogg_packet op;
struct ov_struct_st *ov = sh->context;
op.b_o_s = op.e_o_s = 0;
@@ -148,23 +162,9 @@
for(i=0;i<ov->vi.channels;i++){
ogg_int16_t *convbuffer=(ogg_int16_t *)(&buf[len]);
ogg_int16_t *ptr=convbuffer+i;
- float *mono=pcm[i];
+ ogg_int32_t *mono=pcm[i];
for(j=0;j<bout;j++){
-#if 1
- int val=mono[j]*32767.f;
-#else /* optional dither */
- int val=mono[j]*32767.f+drand48()-0.5f;
-#endif
- /* might as well guard against clipping */
- if(val>32767){
- val=32767;
- clipflag=1;
- }
- if(val<-32768){
- val=-32768;
- clipflag=1;
- }
- *ptr=val;
+ *ptr=CLIP_TO_15(mono[j]>>9);
ptr+=ov->vi.channels;
}
}
diff -ubr MPlayer-0.90pre8.orig/libmpdemux/demux_ogg.c
MPlayer-0.90pre8/libmpdemux/demux_ogg.c
--- MPlayer-0.90pre8.orig/libmpdemux/demux_ogg.c Sun Sep 15 18:38:30
2002
+++ MPlayer-0.90pre8/libmpdemux/demux_ogg.c Sat Nov 9 15:49:58 2002
@@ -12,8 +12,8 @@
#include "demuxer.h"
#include "stheader.h"
-#include <ogg/ogg.h>
-#include <vorbis/codec.h>
+#include <tremor/ogg.h>
+#include <tremor/ivorbiscodec.h>
#define BLOCK_SIZE 4096
@@ -518,7 +518,16 @@
// Check new header
} else if ( (*pack.packet & PACKET_TYPE_BITS ) == PACKET_TYPE_HEADER &&
pack.bytes >= (int)sizeof(stream_header)+1) {
- stream_header *st = (stream_header*)(pack.packet+1);
+ int i;
+ stream_header sst, *st;
+ char* t=(char*) &sst;
+
+ for(i = 0; i < sizeof sst; i++) {
+ t[i] = pack.packet[i+1];
+ }
+
+ st = &sst;
+
/// New video header
if(strncmp(st->streamtype,"video",5) == 0) {
sh_v = new_sh_video(demuxer,ogg_d->num_sub);
***********************************************************************************************
So i downloaded mplayer090pre 8 and then i've modified the sources....
* Where can i find tremor sources for vorbis support ?
* Is there anything else i've to do before start compiling ?
I compile on my SL6000L with gcc2.95.1 cram fs (DEV_IMG1.3)
I see, most of softtware doesent run on sl6000l so...we have to
recompile.....
--
Dinosoft Italia
http://www.dinosoft.it
Tel. +39 0187 1873615
More information about the MPlayer-dev-eng
mailing list