Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Tremor OggDec (Read 4391 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Tremor OggDec

I've built an OggDec using Tremor, you can download it at:

http://sjeng.org/ftp/vorbis/oggdec.exe

May be faster than plain oggdec on systems like K6, Cyrix, 486, ...

I'm going to try a hybrid decoder and see if I can speed it up even more for Athlon, P3/P4.

Edit: naah, the hybrid decoder would be too hard

Tremor OggDec

Reply #1
I ran this on a 333MHz K6-2.

Code: [Select]
E:\>timer oggdec.exe jackal.ogg                                                            
                                                           
OggDec v1.8 (libVorbis I 20020718) Compiled on: Aug 26 2002
Encoder Version: 0                                        
Serial Number: 21750                                      
                                                           
Bitstream is 2 channel, 44100Hz                            
Scale = 1.0000                                            
Decoded length: 18056185 samples = 6:49 mins.              
Encoded by: Xiphophorus libVorbis I 20011231              
Decoding: jackal.ogg                      
                                                           
 100% decoded.                                            
                                                           
********** Done decoding all input files. **********      
Elapsed time is 110 seconds. (1 Min)



E:\>timer oggdec_tremor.exe jackal.ogg
OggDec 1.0 Tremor                                  
Decoding "jackal.ogg" to "jackal.wav"          
       [100.0%]                                  
Elapsed time is 68 seconds. (1 Min)


Impressive!
"Something bothering you, Mister Spock?"

 

Tremor OggDec

Reply #2
If anyone is interested, here is an addition to the Tremor lib that replaces ov_read_float with ov_read_int.
Code: [Select]
long ov_read_int(OggVorbis_File *vf,int ***pcm_channels,int length,
    int *bitstream){

 if(vf->ready_state<OPENED)return(OV_EINVAL);

 while(1){
   if(vf->ready_state>=STREAMSET){
     int **pcm;
     long samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
     if(samples){
        if(pcm_channels)*pcm_channels=pcm;
        if(samples>length)samples=length;
        vorbis_synthesis_read(&vf->vd,samples);
        vf->pcm_offset+=samples;
        if(bitstream)*bitstream=vf->current_link;
        return samples;
     }
   }

   /* suck in another packet */
   {
     int ret=_process_packet(vf,1);
     if(ret==OV_EOF)return(0);
     if(ret<=0)return(ret);
   }
 }
}

The only thing to be aware of is that the returned integer values are scaled to 24 bits.