Displaying 8 results from an estimated 8 matches for "lower_bound_sampl".
Did you mean:
lower_bound_sample
2006 Nov 03
2
better seeking
...uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample, this_frame_sample;
+ FLAC__int64 pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
- FLAC__bool needs_seek;
+ FLAC__bool needs_seek = true, first_seek = true;
const FLAC__uint64 total_samples = FLAC__stre...
2006 Oct 28
3
better seeking
...C__StreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound;
+ FLAC__uint64 first_frame_offset = decoder->private_->first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
+ FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff), this_...
2005 Jan 25
0
bitbuffer optimizations
...eStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff);
+ FLAC__uint64 last_frame_sample = FLAC__U64L(0xffffffffffffffff), this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64...
2004 Sep 10
2
better seeking
...eStreamDecoder *decoder, FLAC__uint64 stream_length, FLAC__uint64 target_sample)
{
- FLAC__uint64 first_frame_offset, lower_bound, upper_bound;
- FLAC__int64 pos = -1, last_pos = -1;
- int i, lower_seek_point = -1, upper_seek_point = -1;
+ FLAC__uint64 first_frame_offset, lower_bound, upper_bound, lower_bound_sample, upper_bound_sample;
+ FLAC__int64 pos, last_pos = -1;
+ int i;
unsigned approx_bytes_per_frame;
- FLAC__uint64 last_frame_sample = 0xffffffffffffffff;
+ FLAC__uint64 last_frame_sample = 0xffffffffffffffff, this_frame_sample;
FLAC__bool needs_seek;
const FLAC__uint64 total_samples = decoder-...
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) *
2007 Mar 06
1
FLAC__stream_decoder_seek_absolute with FLAC__STREAM_DECODER_SEEK_ERROR in 1.1.3 but it worked before
...old version of FLAC) have a seek table where all the
entries have a stream offset of 0.
The result is that in the function seek_to_absolute_sample_, on line
3076 (file stream_decoder.c), the following test returns:
/* make sure we are not seeking in corrupted stream */
if (this_frame_sample < lower_bound_sample) {
decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
return false;
}
because 'this_frame_sample' is equal to 0 (because the seek table caused
the seek search to start at the beginning of the stream)
Now, since seeking in that file worked perfectly fine with o...
2006 Nov 06
2
better seeking
...av Lichvar
> > --- flac/src/libFLAC/stream_decoder.c.orig 2006-11-03
> 18:52:38.104291323 +0100
> +++ flac/src/libFLAC/stream_decoder.c 2006-11-03 18:53:41.350727144
> +0100
> @@ -2995,7 +2995,7 @@
>
> while(1) {
> /* check if the bounds are still ok */
> - if (lower_bound_sample + FLAC__MIN_BLOCK_SIZE > upper_bound_sample
> || lower_bound > upper_bound) {
> + if (lower_bound_sample >= upper_bound_sample || lower_bound >
> upper_bound) {
> decoder->protected_->state = FLAC__STREAM_DECODER_SEEK_ERROR;
> return false;
> }
>...
2015 Jun 16
0
Low-level seek routines in libFLAC
...nt behavior.
This is a short description of the proposed API:
/*
An object of this structure lives within FLAC__StreamDecoderPrivate.
It saves the local variables needed for seek functions.
*/
typedef struct seek_t {
int state;
FLAC__uint64 lower_bound;
FLAC__uint64 upper_bound;
FLAC__uint64 lower_bound_sample;
FLAC__uint64 upper_bound_sample;
FLAC__uint64 this_frame_sample;
unsigned approx_bytes_per_frame;
FLAC__bool first_seek;
} seek_t;
/*
This function initializes an object of type "struct seek_t" and sets initial lower/upper bounds.
*/
FLAC_API int FLAC__stream_decoder_seek_prepare(...