search for: uninterleav

Displaying 13 results from an estimated 13 matches for "uninterleav".

Did you mean: uninterleave
2004 May 18
2
encode example
Hi, I am testing the encoder example and I have a question about it... How can I encode a mono file in 22050 and 44100? I've changed the init values to: ret=vorbis_encode_init_vbr(&vi,1,22050,.5) ; and in the loop: // uninterleave samples for(i=0;i<bytes/2;i++) { buffer[0][i]=((readbuffer[i*2+1]<<8)|(0x00ff&(int)readbuffer[i*2]))/32768.f; } .. what happened is that my file came 2x accelerated (originalsamples/2). Why this happened? thanks <p>--- >8 ---- List archive...
2004 Aug 06
0
No subject
data. On closer inspection (should have done that before, sorry), the procedure uninterleave that you gave is a direct translation of that code, and it also uses little endian (the high byte is at address i*4+1, the low byte at i*4, hence the little byte first, little endian). Procedure uninterleave_little_endian uninterleaves as well, but assumes that the machine it's running on...
2004 Aug 06
0
No subject
data. On closer inspection (should have done that before, sorry), the procedure uninterleave that you gave is a direct translation of that code, and it also uses little endian (the high byte is at address i*4+1, the low byte at i*4, hence the little byte first, little endian). Procedure uninterleave_little_endian uninterleaves as well, but assumes that the machine it's running on...
2002 Sep 02
0
encoding PCM chunks?
...shed some light on encoding chunks of PCM data rather than files. My starting point is pretty much that of vorb_enc.dll by Andy Kay and the encoder_example.c from vorbis 1.0 distribution. From what I gather encoder setup goes through fine, but when I get a PCM chunk to encode, I can't get past uninterleaving samples, it seems to die with EXCEPTION_ACCESS_VIOLATION while uninterleaving. Any ideas? I guess what I am really asking is how should I go about doing something like an equivalent of lame_encode_buffer () or lame_encode_buffer_interleaved () in vorbis? Also, a related question. Example encod...
2002 Dec 16
1
encoding question
Hi there, I've a little question abound programming an ogg-vorbis encoder. The encode_example.c works ok for files with 44100/2/16 - but not for other formats. I don"t really understand what this piece of code is really doing: /* uninterleave samples */ for(i=0;i<bytes/4;i++){ buffer[0][i]=((readbuffer[i*4+1]<<8)| (0x00ff&(int)readbuffer[i*4]))/32768.f; buffer[1][i]=((readbuffer[i*4+3]<<8)| (0x00ff&(int)readbuffer[i*4+2]))/32768.f; } how shou...
2005 Sep 26
2
encoder_example.c Questions
I've been trying to piece my way through the encoder_example.c program to better understand how to encode files as ogg/vorbis. I'm stuck on two sections of the code. This is the first /* uninterleave samples */ for(i=0;i<bytes/4;i++){ buffer[0][i]=((readbuffer[i*4+1]<<8)| (0x00ff&(int)readbuffer[i*4]))/32768.f; buffer[1][i]=((readbuffer[i*4+3]<<8)| (0x00ff&(int)readbuffer[i*4+2]))/32768.f; } This i...
2004 Feb 13
10
Encoding into MONO (delphi)
Hi! I have a problem. I hope, you can help me. I use a Delphi conversion (from Aleksandr Shamray), but it doesn't work when I'd like to convert a *.RAW into a mono *.ogg file. vorbis_encode_init_vbr(vi, 1, 44100, 0.5); //because of the mono the program stops at line: //* uninterleave samples */ . . buffer[1][i] := smallInt((pArray(@readbuffer)[i shl 2 + 3] shl 8) or pArray(@readbuffer)[i shl 2 + 2]) / 32768; . . Why????? Please, help me! Thank You! <p>--------------------------------- Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online --- >8 -...
2001 May 26
2
merging monty's branch
...ctral envelope. Advantages: more stable local spectral behavior (no more spreading stereo image at lower bitrates), more control over tuning specific error characteristics. Disadvantages: it takes more bits than LSP, but not by an absurd margin (20%-30% premiun). Residue 1: Same as residue 0, but uninterleaved. The advantages are that this is faster and allows one to more easily exploit adjacent-line structure in the MDCT, assuming that that's what the codebook model wants to do. Vorbisfile optimizations; I took HB's optimization patch, fixed a few infinite loop problems in it, and then decid...
2000 Nov 17
1
Floor codebooks vs. Residue codebooks
Hi, Please brace yourselves for some possibly stupid questions. Why are there only 2 codebooks for floors and many more for residue values? What makes the encoding of floor values fundamentally different from encoding residue values? I have a basic understanding of VQ, and looking at the floor decode function, it all makes sense 1) Read the codebook index from the stream 2) Do a
2003 Nov 08
2
Encoding in Delphi - Help
...ush(os, og); end; eos := false; while not eos do begin bytes := InFile.Read(readbuffer, SAMPLES*4); if bytes = 0 then begin fix; vorbis_analysis_wrote(vd,0); end else begin fix; buffer := vorbis_analysis_buffer(vd, SAMPLES); // uninterleave_little_endian(buffer,@readbuffer[0],bytes div 4); uninterleave(buffer,@readbuffer[0],bytes div 4); vorbis_analysis_wrote(vd, bytes div 4); end; fix; while(vorbis_analysis_blockout(vd,vb)=1) do begin fix; vorbis_analysis(vb,op); fix; vor...
2007 May 01
1
contstant bittrate mode - block size - packet size
...al_samples_consumed = 0; num_reads=0; while(!feof(fp_infile)){ // num_mseconds = 0; long i; long bytes=fread(readbuffer,1,READ*4,fp_infile); /* stereo hardwired here */ /* expose the buffer to submit data */ float **buffer=vorbis_analysis_buffer(&vd,READ); /* uninterleave samples */ for(i=0;i<bytes/4;i++){ buffer[0][i]=((readbuffer[i*4+1]<<8)| (0x00ff&(int)readbuffer[i*4]))/32768.f; buffer[1][i]=((readbuffer[i*4+3]<<8)| (0x00ff&(int)readbuffer[i*4+2]))/32768.f; } /* tell t...
2001 Nov 22
14
Small vorbis files with vorbisfile
...long ret; int StartOffset = ov_pcm_tell(&m_pDecoder->VorbisFile); if (StartOffset<0) Error("Decode","Offset error"); // uninterleave samples ret = ov_read(&m_pDecoder->VorbisFile,(char *)_pData,_nBytes,0,2,1,&m_pDecoder->Section); int EndOffset = ov_pcm_tell(&m_pDecoder->VorbisFile); if (EndOffset<0)...
2004 Nov 16
0
metadata switches for ffmpeg2theora
...t;= 0){ /* end of audio stream */ if(e_o_s) - vorbis_analysis_wrote (&info.vd, 0); + vorbis_analysis_wrote (&info->vd, 0); } else{ - vorbis_buffer = vorbis_analysis_buffer (&info.vd, samples); + vorbis_buffer = vorbis_analysis_buffer (&info->vd, samples); /* uninterleave samples */ for (i = 0; i < samples; i++){ - for(j=0;j<info.channels;j++){ + for(j=0;j<info->channels;j++){ vorbis_buffer[j][i] = buffer[count++] / 32768.f; } } - vorbis_analysis_wrote (&info.vd, samples); + vorbis_analysis_wrote (&info->vd, samples); }...