search for: max_frame_size

Displaying 20 results from an estimated 28 matches for "max_frame_size".

2015 Feb 23
1
[PATCH] opus_demo: remove unused but set values
...=0; opus_uint64 tot_in, tot_out; - int bandwidth=-1; + int bandwidth=OPUS_AUTO; const char *bandwidth_string; int lost = 0, lost_prev = 1; int toggle = 0; opus_uint32 enc_final_range[2]; opus_uint32 dec_final_range; int encode_only=0, decode_only=0; - int max_frame_size = 960*6; + int max_frame_size = 48000*2; int curr_read=0; int sweep_bps = 0; int random_framesize=0, newsize=0, delayed_celt=0; @@ -336,15 +336,12 @@ int main(int argc, char *argv[]) /* defaults: */ use_vbr = 1; - bandwidth = OPUS_AUTO; max_payload_bytes = MAX_...
2016 Dec 08
3
[PATCH] linux/types.h: enable endian checks for all sparse builds
On 12/07/16 21:54, Michael S. Tsirkin wrote: > On Thu, Dec 08, 2016 at 05:21:47AM +0000, Bart Van Assche wrote: >> Additionally, there are notable exceptions to the rule that most drivers >> are endian-clean, e.g. drivers/scsi/qla2xxx. I would appreciate it if it >> would remain possible to check such drivers with sparse without enabling >> endianness checks. Have you
2016 Dec 08
3
[PATCH] linux/types.h: enable endian checks for all sparse builds
On 12/07/16 21:54, Michael S. Tsirkin wrote: > On Thu, Dec 08, 2016 at 05:21:47AM +0000, Bart Van Assche wrote: >> Additionally, there are notable exceptions to the rule that most drivers >> are endian-clean, e.g. drivers/scsi/qla2xxx. I would appreciate it if it >> would remain possible to check such drivers with sparse without enabling >> endianness checks. Have you
2013 May 09
1
Moving from Speex to Opus (question 2)
Hello! I was using Speex all the time, and I am now moving to Opus. I had encapsulated the decoder a bit, I had the following cpp file: #include "StdAfx.h" #include "spxcodec.h" #define MAX_FRAME_SIZE 2000 #define MAX_FRAME_BYTES 2000 CSpxCodec::CSpxCodec() : enh(1), rate(8000) { } CSpxCodec::~CSpxCodec() { } void CSpxCodec::Init() { speex_bits_init(&bits); decstate = speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(decstate, SPEEX_SET_SAMPLING_RATE, &rate);...
2016 Dec 08
0
[PATCH] linux/types.h: enable endian checks for all sparse builds
...0x%x, response 0x%x\n", routine, vha->d_id.b.domain, vha->d_id.b.area, vha->d_id.b.al_pa, comp_status, ct_rsp->header.response); response is BE and isn't printed correctly. another: eiter->a.max_frame_size = cpu_to_be32(eiter->a.max_frame_size); size += 4 + 4; ql_dbg(ql_dbg_disc, vha, 0x20bc, "Max_Frame_Size = %x.\n", eiter->a.max_frame_size); printed too late, it's be by that time. Here's another suspicious line ctio24->u.status1.fla...
2016 Dec 09
2
[PATCH] linux/types.h: enable endian checks for all sparse builds
...routine, vha->d_id.b.domain, > vha->d_id.b.area, vha->d_id.b.al_pa, comp_status, ct_rsp->header.response); > > >response is BE and isn't printed correctly. > >another: > > eiter->a.max_frame_size = cpu_to_be32(eiter->a.max_frame_size); > size += 4 + 4; > > ql_dbg(ql_dbg_disc, vha, 0x20bc, > "Max_Frame_Size = %x.\n", eiter->a.max_frame_size); > >printed too late, it's be by that time. > >Here's another suspicious line &...
2016 Dec 09
2
[PATCH] linux/types.h: enable endian checks for all sparse builds
...routine, vha->d_id.b.domain, > vha->d_id.b.area, vha->d_id.b.al_pa, comp_status, ct_rsp->header.response); > > >response is BE and isn't printed correctly. > >another: > > eiter->a.max_frame_size = cpu_to_be32(eiter->a.max_frame_size); > size += 4 + 4; > > ql_dbg(ql_dbg_disc, vha, 0x20bc, > "Max_Frame_Size = %x.\n", eiter->a.max_frame_size); > >printed too late, it's be by that time. > >Here's another suspicious line &...
2007 Dec 06
2
Some question about speexcodex 1.2 beta2 on linux
...all : configure -prefix=/home/...../test -enable-shared -enable-static make make install then I try to compile my encode.c here is the encode.c of mine: ===================================== #include <speex/speex.h> #include <speex/speex_preprocess.h> #include <stdio.h> #define MAX_FRAME_SIZE 320 int main() { FILE *fin, *fout; short in[MAX_FRAME_SIZE]; char cbits[200]; int nbBytes = 0; void *state; SpeexBits bits; int m_frame_size; int m_channels = 1; // SpeeX encode options int m_bitrate = (8 << 10)...
2011 Dec 21
3
Decoding only a certain frame results in different values than when decoding the entire file
...//testFile = "test2"; //ftest = fopen(testFile, "wb"); //fwrite(inBuf,1,inlen,ftest); //fwrite(outBuf, 1, outBufpos, ftest); //fclose(ftest); //take every 62 bytes //decode, then write to outbuf char cbits[MAX_FRAME_BYTES]; float output[MAX_FRAME_SIZE]; short out[MAX_FRAME_SIZE]; unsigned int i,j; unsigned char* tout; tout = (unsigned char*)&out; for (i=0; i<(Dinlen/62); i++) { for (j=0;j<62;j++) cbits[j] = DinBuf[(i*62)+j]; speex_bits_read_from(&bits, cbits, 62); speex_...
2011 Dec 22
2
Decoding only a certain frame results in different values than when decoding the entire file
...nlen) { //char *testFile; //FILE *ftest; //testFile = "test"; //ftest = fopen(testFile, "wb"); //fwrite(inBuf,1,inlen,ftest); //take every 320 bytes //copy every short to float array, and make sure to put null in unused area float input[MAX_FRAME_SIZE]; char cbits[MAX_FRAME_BYTES]; unsigned int inBufpos = 0, j, outBufpos = 0; short *sinBuf; sinBuf = (short*) inBuf; do { j = 0; do { //copy to float array input[j] = sinBuf[inBufpos]; inBufpos++; j...
2007 Dec 10
1
SpeexCodec run in linux of decode
Hi , may I ask some question about the decode files? here is my decode.c but when the program run to speex_encoder_destroy(state); It shows that segmentation fault ,I feel comfused, could you tell thanks! #define MAX_FRAME_SIZE 320 int main() { FILE *fout; char *inFile; FILE *fin; short out[MAX_FRAME_SIZE]; char cbits[200]; int nbBytes; void *state; SpeexBits bits; //int tmp; int m_frame_size; speex_bits_init(&bits); state = speex_decoder_init(&speex_nb_mode); speex_decoder_ctl(state, SPEEX_GET_FRAME...
2006 Dec 29
0
using speex in C#
...enc_bits = new SpeexBits(); enc_state = speex_encoder_init_new(0); speex_encoder_settings(enc_state, 3, 8000, 10, 11000); fixed (int *fSize = &frame_size) { speex_encoder_ctl(enc_state, SPEEX_GET_FRAME_SIZE, fSize); } fixed (SpeexBits *bitsAdd = &enc_bits) { speex_bits_init(bitsAdd); } /* MAX_FRAME_SIZE is a constant and is 2000 */ input_frame = new short[MAX_FRAME_SIZE]; /* From Encode Function */ /* after voice data capture */ fixed (short *inputAdd = input_frame) fixed (SpeexBits *bitsAdd = &enc_bits) { speex_encode_int(enc_state, inputAdd, bitsAdd); encodedDataSize = speex_bits_writ...
2011 Dec 22
0
Decoding only a certain frame results in different values than when decoding the entire file
...//ftest = fopen(testFile, "wb"); > //fwrite(inBuf,1,inlen,ftest); > //fwrite(outBuf, 1, outBufpos, ftest); > //fclose(ftest); > > //take every 62 bytes > //decode, then write to outbuf > > char cbits[MAX_FRAME_BYTES]; > float output[MAX_FRAME_SIZE]; > short out[MAX_FRAME_SIZE]; > unsigned int i,j; > > unsigned char* tout; tout = (unsigned char*)&out; > > for (i=0; i<(Dinlen/62); i++) > { > for (j=0;j<62;j++) cbits[j] = DinBuf[(i*62)+j]; > > speex_bits_read_fro...
2004 Sep 10
3
slow FLAC__file_decoder_seek_absolute()...
Hi, I checked the archives, but I didn't find anything regarding this problem. FLAC__file_decoder_seek_absolute takes an incredibly long time to seek. What can I do about this? How do I fix it? Here's how I'm calling the function: if (argc > 2) { secs = atoi(argv[2]); seek_point = (FLAC__uint64) secs * sample_rate; printf("seeking to %d:%02d\n", secs/60,
2004 Aug 06
1
[PATCH] Re: Decoding .spx with 1.0 on ppc produces noise!
On Thu, 2003-04-17 at 07:48, Kaveh Goudarzi wrote: > Hi, > > I had a similar question ... is the endian-ness of the encoded > speex file, system dependent? or is it always little endian? If it's > always little endian (like the header seems to be) then big endian > machines (or java) will need to map everything to bigendian before > decoding ... > I have spent some
2004 Sep 10
2
slow FLAC__file_decoder_seek_absolute()...
...added a thing to print out the max_framesize and max_framesize from > the stream_info block. Those are both zero. The ..._seek_absolute() > > function of the SeekableStreamDecoder uses the max_framesize to guess > at where to seek. It doesn't seem to handle the case when > max_frame_size is zero very well. I'm looking at > seekable_stream_decoder.c, by the way. > > > The files I am playing were encoded using the command line 'flac' > encoder and default options. > > > Brendan Dowling > Phatnoise, Inc. > crypt@phatnoise.com > ht...
2011 Nov 28
1
Speex stereo encoding
...ta to speex and put it into the .flv file format. But at the output I can hear only noise. What I doing wrong? Here is the code: void main() { SpeexBits bits; void *enc_state; int frame_size; int quality = 10; char cbits[MAX_FRAME_BYTES]; FILE *fin, *speex; short input[MAX_FRAME_SIZE]; int nbBytes; int channels = 0; int format = 0; int rate = 0; spx_int32_t fileSize; //Open input wav file and read wav header fin = fopen("StereoPcm.wav", "rb"); read_wav_header(fin, &rate, &channels, &format, &fileSize); //Initiali...
2011 Dec 23
0
Decoding only a certain frame results in different values than when decoding the entire file
...t; > //testFile = "test"; > //ftest = fopen(testFile, "wb"); > //fwrite(inBuf,1,inlen,ftest); > > //take every 320 bytes > //copy every short to float array, and make sure to put null in > unused area > > float input[MAX_FRAME_SIZE]; > char cbits[MAX_FRAME_BYTES]; > unsigned int inBufpos = 0, j, outBufpos = 0; > short *sinBuf; > > sinBuf = (short*) inBuf; > > do > { > j = 0; > do > { > //copy to float array...
2004 Sep 10
0
slow FLAC__file_decoder_seek_absolute()...
...my metadata_callback, I added a thing to print out the max_framesize and max_framesize from the stream_info block. Those are both zero. The ..._seek_absolute() function of the SeekableStreamDecoder uses the max_framesize to guess at where to seek. It doesn't seem to handle the case when max_frame_size is zero very well. I'm looking at seekable_stream_decoder.c, by the way. The files I am playing were encoded using the command line 'flac' encoder and default options. Brendan Dowling Phatnoise, Inc. crypt@phatnoise.com http://www.phatnoise.com/ On Thu, Jan 17, 2002 at 05:...
2013 Feb 28
0
FEC-related bug in opus_demo.c
Hi, When running opus_demo with FEC enabled, there is a bug related to the length of FEC frames. The FEC frames will be decoded with a length of max_frame_size and the resulting output file will be much longer than the input file.