search for: flac__max_block_size

Displaying 18 results from an estimated 18 matches for "flac__max_block_size".

2007 Sep 07
1
FLAC__FrameHeader's blocksize element
Hi all, I've found that the FLAC__FrameHeader struct's blocksize member has values limited to the range (0, FLAC__MAX_BLOCK_SIZE] where FLAC__MAX_BLOCK_SIZE is 65535. In the encoder, what determines the size of a block? Cheers, Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- "When your hammer is C++, everyt...
2014 Jun 29
6
FIxed rest of cast-align warnings
Hi all, In commit 3eb4094b859 I think I have fixed all the cast-align warnings. I have tested this in amd64/Linux (little endian) and powerpc64/Linux (big endian) and it passed all tests (including the new MD5 tests). I also did a little performance testing on amd64/Linux with a one hour long stereo WAV file and could not find any mesasurable difference between the old and the new code. I
2014 Jun 30
1
FIxed rest of cast-align warnings
lvqcl wrote: > Erik de Castro Lopo wrote: > > >> FLAC__int16 s16buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)/sizeof(FLAC__int16)]; > >> > >> instead of > >> > >> FLAC__int16 s16buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int16)]; > > > > Really? Would you also write this? : > > > > FL...
2014 Jun 26
1
Lets work towards a new version
...13 08:25:10 +0200, to be specific), compiling on > Raspbian (Debian Wheezy, GCC 4.6) returns quite some warnings of > the type -Wcast-align. What happens if you change the definitions of s8buffer[] and ucbuffer_[] arrays as follows: static __attribute__((__aligned__(4))) FLAC__int8 s8buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)]; static __attribute__((__aligned__(4))) unsigned char ucbuffer_[CHUNK_OF_SAMPLES*FLAC__MAX_CHANNELS*((FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE+7)/8)]; ?
2004 Sep 10
2
Using libFLAC++
samples in FLAC are always signed. they must be signed going into the encoder (flac converts unsigned samples to signed) and they come out of the decoder signed. Josh --- David Bishop <tech@bishop.dhs.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Followup to original question: how do I determine if a particular > flac file is > signed (and then, if
2004 Sep 10
2
better seeking
...lower_bound_sample = 0; /* calc the upper_bound, beyond which we never want to seek */ if(max_framesize > 0) upper_bound = stream_length - (max_framesize + 128 + 2); /* 128 for a possible ID3V1 tag, 2 for indexing differences */ else upper_bound = stream_length - ((channels * bps * FLAC__MAX_BLOCK_SIZE) / 8 + 128 + 2); + upper_bound_sample = total_samples; /* * Now we refine the bounds if we have a seektable with @@ -882,7 +884,7 @@ } if(i >= 0) { /* i.e. we found a suitable seek point... */ lower_bound = first_frame_offset + decoder->private_->seek_table->points[i].s...
2004 Sep 10
0
Using libFLAC++
...format, or do I have to do some sort of conversion? This code is ripped almost directly from decode.c in flac/, just heavily cut down to deal with only 1 type of file (i.e., I'm not dealing with differing endianess right now). [this code is in my write callback] static FLAC__int8 s8buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)]; FLAC__int16 *s16buffer = (FLAC__int16 *)s8buffer; if( wide_samples > 0 ) { for(sample = wide_sample = 0; wide_sample < wide_samples; wide_sample++) { for(channel = 0; channel < channels; channel++, sample++) { s16buffe...
2004 Sep 10
0
better seeking
.../* we are just guessing here, but we want to guess high, not low */ if(max_framesize > 0) { @@ -869,7 +869,7 @@ upper_bound = stream_length - (max_framesize + 128 + 2); /* 128 for a possible ID3V1 tag, 2 for indexing differences */ else upper_bound = stream_length - ((channels * bps * FLAC__MAX_BLOCK_SIZE) / 8 + 128 + 2); - upper_bound_sample = total_samples; + upper_bound_sample = total_samples > 0 ? total_samples : target_sample; /* * Now we refine the bounds if we have a seektable with @@ -900,7 +900,7 @@ decoder->private_->target_sample = target_sample; - needs_seek = (tota...
2004 Sep 10
2
getting framesize in client
...002-11-09 17:28:45.000000000 +0100 @@ -58,6 +58,7 @@ unsigned channels; unsigned sample_rate; unsigned length_in_msec; + gchar *title; AFormat sample_format; int seek_to_in_sec; FLAC__bool has_replaygain; @@ -114,6 +115,10 @@ #define SAMPLES_PER_WRITE 512 static FLAC__int32 reservoir_[FLAC__MAX_BLOCK_SIZE * 2/*for overflow*/ * FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS]; static FLAC__byte sample_buffer_[SAMPLES_PER_WRITE * FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS * (24/8)]; /* (24/8) for max bytes per sample */ +#define BITRATE_HIST_SEGMENT_MSEC 500 +/* 500ms * 50 = 25s should be enough */ +#define BITRATE_HIS...
2004 Sep 10
0
new checkins
....h 6 May 2002 15:07:22 -0000 @@ -22,6 +22,10 @@ #include "ordinals.h" +#ifdef __cplusplus +extern "C" { +#endif + /* changing the following values to be higher will break the framing and hence the stream format, so DON'T! */ #define FLAC__MIN_BLOCK_SIZE (16u) #define FLAC__MAX_BLOCK_SIZE (65535u) @@ -503,5 +507,9 @@ * encapsulated here: */ FLAC__bool FLAC__format_is_valid_sample_rate(unsigned sample_rate); + +#ifdef __cplusplus +} +#endif #endif Index: seek_table.h =================================================================== RCS file: /cvsroot/flac/flac/include/FLAC/...
2004 Sep 10
0
getting framesize in client
...002-11-10 00:40:20.000000000 +0100 @@ -58,6 +58,7 @@ unsigned channels; unsigned sample_rate; unsigned length_in_msec; + gchar *title; AFormat sample_format; int seek_to_in_sec; FLAC__bool has_replaygain; @@ -114,6 +115,10 @@ #define SAMPLES_PER_WRITE 512 static FLAC__int32 reservoir_[FLAC__MAX_BLOCK_SIZE * 2/*for overflow*/ * FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS]; static FLAC__byte sample_buffer_[SAMPLES_PER_WRITE * FLAC_PLUGIN__MAX_SUPPORTED_CHANNELS * (24/8)]; /* (24/8) for max bytes per sample */ +#define BITRATE_HIST_SEGMENT_MSEC 500 +/* 500ms * 50 = 25s should be enough */ +#define BITRATE_HIS...
2004 Sep 10
3
new checkins
FYI, I have checked in a few interesting things. One is a speedup to the decoder (about 15% improvement in overall decode time). Another is a new interface to FLAC file metadata. If you're curious look at include/FLAC/metadata.h. It is basically a collection of object manipulation routines and iterators that make it pretty easy to add/edit/delete FLAC metadata in files efficiently. The
2006 Oct 28
3
better seeking
...lower_bound_sample = 0; /* calc the upper_bound, beyond which we never want to seek */ if(max_framesize > 0) upper_bound = stream_length - (max_framesize + 128 + 2); /* 128 for a possible ID3V1 tag, 2 for indexing differences */ else upper_bound = stream_length - ((channels * bps * FLAC__MAX_BLOCK_SIZE) / 8 + 128 + 2); + upper_bound_sample = total_samples > 0 ? total_samples : target_sample; /* * Now we refine the bounds if we have a seektable with @@ -2981,7 +2983,7 @@ } if(i >= 0) { /* i.e. we found a suitable seek point... */ lower_bound = first_frame_offset + seek_table...
2005 Jan 25
0
bitbuffer optimizations
...lower_bound_sample = 0; /* calc the upper_bound, beyond which we never want to seek */ if(max_framesize > 0) upper_bound = stream_length - (max_framesize + 128 + 2); /* 128 for a possible ID3V1 tag, 2 for indexing differences */ else upper_bound = stream_length - ((channels * bps * FLAC__MAX_BLOCK_SIZE) / 8 + 128 + 2); + upper_bound_sample = total_samples > 0 ? total_samples : target_sample; /* * Now we refine the bounds if we have a seektable with @@ -923,7 +925,7 @@ } if(i >= 0) { /* i.e. we found a suitable seek point... */ lower_bound = first_frame_offset + decoder->...
2006 Nov 03
2
better seeking
...d = first_frame_offset; - - /* calc the upper_bound, beyond which we never want to seek */ - if(max_framesize > 0) - upper_bound = stream_length - (max_framesize + 128 + 2); /* 128 for a possible ID3V1 tag, 2 for indexing differences */ - else - upper_bound = stream_length - ((channels * bps * FLAC__MAX_BLOCK_SIZE) / 8 + 128 + 2); + lower_bound_sample = 0; + upper_bound = stream_length; + upper_bound_sample = total_samples > 0 ? total_samples : target_sample; /* * Now we refine the bounds if we have a seektable with @@ -2981,7 +2978,7 @@ } if(i >= 0) { /* i.e. we found a suitable seek poin...
2004 Sep 10
3
getting framesize in client
On Fri, Nov 08, 2002 at 12:39:52PM -0800, Josh Coalson wrote: > --- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote: > > I have few notes: > > > > It seems there is changed API in CVS again. So, what about adding > > function like > > unsigned FLAC__format_frame_size(const FLAC__Frame *frame) > > which returns size of the frame in bytes. This
2014 Jun 19
10
Lets work towards a new version
Hi all, It sees that the most serious bug in the flac bug tracker: https://sourceforge.net/p/flac/bugs/413/ has been fixed in git. This fix alone is worth a new release so its time to work towards one. Things I need to do for this new release: * Deal with all current patches on the mailing list. * Review all bugs reported against 1.3.0 on the sf.net. * Testing and coordination of testing
2004 Sep 10
4
bitbuffer optimizations
Ok, here is a patch waiting for new CVS :). It works fine for me, but please check it before commiting... -- Miroslav Lichvar -------------- next part -------------- --- src/libFLAC/bitbuffer.c.orig 2003-01-30 17:36:01.000000000 +0100 +++ src/libFLAC/bitbuffer.c 2003-01-30 21:53:18.000000000 +0100 @@ -51,6 +51,25 @@ */ static const unsigned FLAC__BITBUFFER_DEFAULT_CAPACITY = ((65536 - 64) *