Skip to content
Snippets Groups Projects
Commit 6c3b0658 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Fixed some more allocation issue -- there's now a basic codec working

parent 0437c4ca
No related branches found
No related tags found
No related merge requests found
celt @ c7bcf389
Subproject commit bdcaaf73c62844f7971b946ae19d641e58a8afad
Subproject commit c7bcf389da1d5537cd66ae552f0dfe164834bd3d
......@@ -65,7 +65,7 @@ HybridEncoder *hybrid_encoder_create()
st->encControl.useInBandFEC = 0;
st->encControl.useDTX = 0;
st->encControl.complexity = 2;
st->encControl.bitRate = 20000;
st->encControl.bitRate = 18000;
/* Create CELT encoder */
/* We should not have to create a CELT mode for each encoder state */
......@@ -87,6 +87,10 @@ int hybrid_encode(HybridEncoder *st, const short *pcm, int frame_size,
ec_byte_writeinit_buffer(&buf, data, bytes_per_packet);
ec_enc_init(&enc,&buf);
st->encControl.bitRate = (bytes_per_packet*50*8+4000)/2;
if (st->encControl.bitRate>30000)
st->encControl.bitRate = 30000;
/* Call SILK encoder for the low band */
silk_ret = SKP_Silk_SDK_Encode( st->silk_enc, &st->encControl, pcm, 960, &enc, &nBytes );
if( silk_ret ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment