Displaying 9 results from an estimated 9 matches for "approx_bytes_per_frame".
2006 Oct 28
3
better seeking
...rame_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__bool needs_seek;
const FLAC__uint64 total_samples = FLAC__stream_decoder_get_total_samples(decoder);
const unsigned min_blocksize = d...
2005 Jan 25
0
bitbuffer optimizations
...nt64 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 = decoder->private_->stream_info.total_samples;
const unsigned min_blocksize...
2004 Sep 10
2
better seeking
...nt64 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_->stream_info.total_samples;
const unsigned min_blocksize = decoder->private_-&...
2006 Nov 03
2
better seeking
...AC__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_samples(decoder);
const unsigned min_blocksize = decoder->private_->stream_info...
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) *
2006 Nov 07
1
better seeking
...latest frame
to try and keep it working even for streams where they change
in mid stream. even though I don't know of anything that does
this, in the streaming case it could happen, and there might
not be any STREAMINFO or it might be incorrect.
I was going to change it further down also when
approx_bytes_per_frame is recalculated but couldn't tell if
this would make the algorithm unstable (not converge).
maybe it's best to not try and solve that case though.
Josh
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the al...
2006 Nov 06
2
better seeking
ok, tried it out... passes test/test_seeking.sh and my
"xmms twitch" test, checked in to CVS. thanks!
Josh
--- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote:
> On Fri, Nov 03, 2006 at 10:01:42AM +0100, Miroslav Lichvar wrote:
> > Thanks. Sending latest version of the patch. Now it can seek in
> files
> > that have large id3 tag (or any random data) at
2006 Nov 07
0
better seeking
...nfo if we didn't decode a frame */
+ if (channels == 0)
+ channels = decoder->private_->stream_info.data.stream_info.channels;
+ if (bps == 0)
+ bps = decoder->private_->stream_info.data.stream_info.bits_per_sample;
+
/* we are just guessing here */
if(max_framesize > 0)
approx_bytes_per_frame = (max_framesize + min_framesize) / 2 + 1;
2015 Jun 16
0
Low-level seek routines in libFLAC
...ves 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__uint64 target_sample, FLAC__uint64 stream_length);
/*
This funct...