Displaying 11 results from an estimated 11 matches for "celt_mode_create".
2009 Oct 16
3
API Change
Hi everyone,
I've just changed the API for CELT, but at least there's a good reason
for that. It's now possible to use the same mode data for both mono and
stereo. So here's the change:
- The celt_mode_create() function has a "channels" parameter
- The celt_encode_create() and celt_decoder_create() functions now have
an additional "channels" parameter.
- I also added an error parameter celt_encode_create() and
celt_decoder_create() to return any error that occurs.
Sorry about the...
2009 Jul 22
2
Allocating all memory up front
...I'm currently working on a CELT implementation for FMOD, and one of the
things we want to do is have all memory required allocated beforehand.
This is before we have any information about what sounds will be played.
We would like to create all of our CELTDecode instances up front.
Because celt_mode_create() requires a sample rate and number of channels
passed in, this doesn't seem like it is currently possible.
What I am thinking of doing is calling celt_mode_create() and
celt_decoder_create() up front with the maximum values for sample rate
and number of channels, this will allocate all the...
2011 Jan 12
2
Crash when using odd frame size
Hi
I noticed a crash issue when I passed the following values:
celt_mode_create(96000, 258, &e);
CELTMode->mdct.kfft[0] is not initialized after calling?clt_mdct_init() and when?celt_mode_destroy() is called it tries to dereference this value in kiss_fft_free().
-- Bjoern
Here's the callstack:
!kiss_fft_free(const kiss_fft_state * cfg=0x00000000) ?Line 650 + 0x3 byt...
2010 Mar 03
2
uint decode error on visual studio...
...uot;,outputfilename);
return -1;
}
int bytes_per_packet = ((gBitRate*gFrameSize/gSampleRate+4)/8)*gNrChannels;
int error=0;
celt_int16*
pcmbuffer=(celt_int16*)malloc(sizeof(celt_int16)*gFrameSize*gNrChannels);
unsigned char* encodedbuffer=(unsigned char*)malloc(bytes_per_packet);
CELTMode* mode=celt_mode_create(gSampleRate,gFrameSize,&error);
if(mode==NULL || error!=CELT_OK)
{
printf("ERROR: celt_mode_create %s\n",celt_strerror(error));
return -1;
}
int offset=0;
int res=0;
CELTEncoder* encoder=celt_encoder_create(mode,gNrChannels,&error);
if(encoder==NULL || error!=CELT_OK)
{
print...
2009 Jul 24
1
STATIC_MODES, fft and prob members
Hi Guys,
I've just been looking into STATIC_MODES. My plan is to generate and
store the modes as part of our sound banks when they are encoded.
I have noticed that even with STATIC_MODES turned on, celt_mode_create
still allocs and generates the fft and prob members (via
pitch_state_alloc and quant_prob_alloc respectively). I also notice that
in dump_modes.c, these two members are just set to 0 explicitly. Why
aren't these two members part of the static mode?
Would anything bad happen if I make them...
2009 Oct 15
1
multichannel
Hi All,
Would it be possible to encode n channels with the CELT api?
I can't find a negative or positive in the CELT docs; all I could find
is c a check on the nr of channels in wav_io.c in the CELT tools. No
clear insight on wheter or not the channels parameter in
celt_mode_create can be > 2.
Answers on the list were (thanks!):
- Sure, You just encode each channel and then store the encoded frames one after another.
- I recommend you just encode N separate mono streams. I'm pretty sure that's what Vorbis does internally anyway.
- It is possible. See, for example...
2010 Jun 07
1
GLOBAL_STACK_SIZE
...attempts to allocate (using calloc) 100,000 bytes for the global
stack. However, the *celt_alloc_scratch expects an "int", which in C55x
lingo is 16bits (+/-32768). When debugging this macro, a value of -31072 is
passed to *celt_alloc_scratch, which allocates no stack, causing failure of
celt_mode_create(). What am I missing? Can you provide some insight on how
the stack should be allocated? How large should it be? 100,000 bytes seems a
bit large to me.
Thx
MikeH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments...
2010 Dec 03
1
memory violation in mode_create() !
?
There seems to be a memory violation when calling celt_mode_create(48000, 240).
?
The function compute_pulse_cache() calls celt_alloc (the second one,
bits=celt_alloc()) in order to allocate 343 byte, but it is using about 872
bytes at that location, which will be deleted by the following allocations.
?
In this case the following encoder call crashes at first run....
2011 May 02
1
Modes?
...r 11+). However, I am having problems with modes. I don't
completely understand what is going on in the following code. Could you
provide some guidance on what parameters are now acceptable? I am trying to
create a stereo channel with Fs=48000 and 128 byte frames, but get NULL
returned from the celt_mode_create function. I am not defining
CUSTOM_MODES_ONLY (because I don't know what it means). On the last couple
of lines of code, there is no error (error=0), but it appears that you
always return NULL..?
CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)
#ifndef CUSTOM_MODES_...
2011 Jun 07
1
Celt modes
I seem to be having trouble creating correct modes for a 44100 samplerate. In reading the header file it says an even value from 64 to 512 I believe (going off memory) for the frame_rate but celt_mode_create returns a null mode. I can get it all working if I use 48000 with 480 frame_rate.
I guess in short what is the best way to calculate the optimal mode for latency.
Thanks
Mike
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
2011 Mar 03
1
fixed point code
...ently for the decoder, depending on frame size and sampling freq. of the bitstream ..
Could you provide us with fixed-point code for initialization of this array? Or you may kindly provide us with ROM tables of the array for each possible combination of frame size and sampling freq...?
CELTMode *celt_mode_create(celt_int32 Fs, int frame_size, int *error)
{
....
....
#ifndef FIXED_POINT
for (i=0;i<mode->overlap;i++)
window[i] = Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap));
#else
for (i=0;i<mode->overlap;i++)
window[i] = MIN3...