search for: upper_bound_sampl

Displaying 8 results from an estimated 8 matches for "upper_bound_sampl".

Did you mean: upper_bound_sample
2006 Nov 03
2
better seeking
...ffset = 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__stream_decoder_get_total...
2004 Sep 10
2
better seeking
...der, 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->private_->str...
2006 Oct 28
3
better seeking
...coder, 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_frame_sample; FLAC...
2005 Jan 25
0
bitbuffer optimizations
...der, 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 total_samples = deco...
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) *
2004 Sep 10
0
better seeking
...nt 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 = (total_samples > 0) ? true : false; + n...
2006 Nov 06
2
better seeking
...m_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
...ription 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(FLAC__StreamDecoder *decoder, FLAC...