search for: flac__uint64

Displaying 20 results from an estimated 70 matches for "flac__uint64".

Did you mean: flac__int64
2004 Sep 10
2
better seeking
...-------------- next part -------------- --- src/libFLAC/seekable_stream_decoder.c.orig 2003-02-26 19:41:51.000000000 +0100 +++ src/libFLAC/seekable_stream_decoder.c 2003-07-09 23:49:35.000000000 +0200 @@ -816,11 +816,11 @@ FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *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_sampl...
2006 Oct 28
3
better seeking
...root/flac/flac/src/libFLAC/stream_decoder.c,v retrieving revision 1.117 diff -u -r1.117 stream_decoder.c --- stream_decoder.c 16 Oct 2006 15:49:18 -0000 1.117 +++ stream_decoder.c 28 Oct 2006 17:12:19 -0000 @@ -2923,18 +2923,18 @@ FLAC__bool seek_to_absolute_sample_(FLAC__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;...
2005 Jan 25
0
bitbuffer optimizations
.... -- Miroslav Lichvar -------------- next part -------------- --- seekable_stream_decoder.c.orig 2005-01-25 05:18:31.000000000 +0100 +++ seekable_stream_decoder.c 2005-01-25 23:39:03.000000000 +0100 @@ -857,11 +857,11 @@ FLAC__bool seek_to_absolute_sample_(FLAC__SeekableStreamDecoder *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_sampl...
2015 Jun 16
0
Low-level seek routines in libFLAC
...o here: just split the function seek_to_absolute_sample_() into 2 public functions (they are shown below). seek_to_absolute_sample_() can be easily modified to use those functions, and we won't change its behaviour. The user code that uses those functions might look like this: void foo() { FLAC__uint64 offset; FLAC__stream_decoder_seek_prepare(decoder, target_sample, stream_length); for (;;) { FLAC__stream_decoder_seek(decoder, &offset); my_seek(file, offset); FLAC__stream_decoder_process_single(decoder); if /* write() callback was called - seek has been completed */...
2008 May 09
1
FLAC__metadata_get_picture()
...ure(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors) 286 { 287 FLAC__Metadata_SimpleIterator *it; 288 FLAC__uint64 max_area_seen = 0; 289 FLAC__uint64 max_depth_seen = 0; 290 291 FLAC__ASSERT(0 != filename); 292 FLAC__ASSERT(0 != picture); 293 294 *picture = 0; 295 296 it = FLAC__metadata_simple_iterator_new(); 297 if(0 == it) 298 return false; 299 if(!F...
2015 Apr 20
2
About a comment in stream_decoder.c
I don't understand the comment in src/libFLAC/stream_decoder.c: /*@@@@@@ technically not pessimistic enough, should be more like if( (FLAC__uint64)order * ((((FLAC__uint64)1)<<bps)-1) * ((1<<subframe->qlp_coeff_precision)-1) < (((FLAC__uint64)-1) << 32) ) */ if(bps + subframe->qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32) see http://git.xiph.org/?p=flac.git;a=commitdiff;h=8534bbe4e92300609fd6dc289...
2006 Nov 03
2
better seeking
...LAC/stream_decoder.c,v retrieving revision 1.117 diff -u -r1.117 stream_decoder.c --- src/libFLAC/stream_decoder.c 16 Oct 2006 15:49:18 -0000 1.117 +++ src/libFLAC/stream_decoder.c 3 Nov 2006 08:32:35 -0000 @@ -2923,23 +2923,23 @@ FLAC__bool seek_to_absolute_sample_(FLAC__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__int64 pos = -1, last_pos = -1; - int i, lower_seek_point = -1, upper_seek_point = -1; + FLAC__uint64 first_frame_offset = decoder->priv...
2004 Sep 10
3
[st.n@gmx.net: Bug#200435: xmms-flac: doesn't properly support long files]
...gt; file_info->channels = metadata->data.stream_info.channels; > file_info->sample_rate = metadata->data.stream_info.sample_rate; > - file_info->length_in_msec = file_info->total_samples * 10 / (file_info->sample_rate / 100); > + file_info->length_in_msec = (FLAC__uint64)file_info->total_samples * 10 / (file_info->sample_rate / 100); > } > else if(metadata->type == FLAC__METADATA_TYPE_VORBIS_COMMENT) { > double gain, peak; It seems like would be simpler to do something like: (file_info->total_samples / file_info->sample_rate) * 1000...
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
3
problem with seek_absolute in libFLAC++
...ute() function eg. seek_absolute(3561525); and step inside it with gdb, then print the value of "sample" (the arguement), it is NOT 3561525, rather it is some huge number like 4621539102901141517. I figure it could be something to do with types or something, seek_absolute expects a FLAC__uint64, I have tried a few things along this line without success eg. FLAC__uint64 seekpos = 3561525; seek_absolute(seekpos); doesn't work either. Does anyone know what this problem is, or has anyone else had problem with seek_absolute of the C++ File decoder class ?? Thanks, Dave
2013 Sep 01
1
New routine: FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_16
...change. Declarations from MSDN: unsigned char _BitScanReverse(unsigned long * Index, unsigned long Mask); unsigned char _BitScanReverse64(unsigned long * Index, unsigned __int64 Mask); FLAC uses them as: _BitScanReverse(FLAC__uint32* idx, FLAC__uint32 v); and _BitScanReverse64(FLAC__uint64* idx, FLAC__uint64 v); AFAIK unsigned long is not the same type as FLAC__uint32 (= unsigned int) but it doesn't really matter since both of them are 4-byte unsigned integers. However, _BitScanReverse64 expects a pointer to a 4-byte uint, but it is called with a pointer to a 8-byte uint. The g...
2007 Apr 15
2
Patch : Fix pointer cast warning
...LAC__ALIGN_MALLOC_DATA /* align on 32-byte (256-bit) boundary */ x = malloc(bytes+31); - /* there's got to be a better way to do this right for all archs */ - if(sizeof(void*) == sizeof(unsigned)) - *aligned_address = (void*)(((unsigned)x + 31) & -32); - else if(sizeof(void*) == sizeof(FLAC__uint64)) - *aligned_address = (void*)(((FLAC__uint64)x + 31) & (FLAC__uint64)(-((FLAC__int64)32))); - else - return 0; +#if SIZEOF_VOIDP == 4 + increment = ((unsigned) (32 - (((unsigned) x) & 31))) & 31; +#elif SIZEOF_VOIDP == 8 + increment = ((unsigned) (32 - (((FLAC__uint64) x) & 31)))...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...* ilog2(18) = 4 - */ - -#ifndef __GNUC__ - -/* For GNUC, use static inline version in include/private/bitmath.h. */ - -unsigned FLAC__bitmath_ilog2(FLAC__uint32 v) -{ - unsigned l = 0; - if (v == 0) - return 0; - while(v >>= 1) - l++; - return l; -} - -unsigned FLAC__bitmath_ilog2_wide(FLAC__uint64 v) -{ - unsigned l = 0; - if (v == 0) - return 0; - while(v >>= 1) - l++; - return l; -} -#endif - /* An example of what FLAC__bitmath_silog2() computes: * * silog2(-10) = 5 diff --git a/src/libFLAC/bitreader.c b/src/libFLAC/bitreader.c index dcd9e42..9e15db0 100644 --- a/src/libFLA...
2014 Jun 19
7
[PATCH] stream_encoder : Improve selection of residual accumulator width
In the precompute_partition_info_sums_ function, instead of selecting 64-bit accumulator when the signal bps is larger than 16, revert to the original approach based on partition size, but make room for few extra bits to not overflow with unusual signals where the average residual magnitude may be larger than bps. It slightly improves the performance with standard encoding levels and 16-bit files
2012 Apr 17
1
[PATCH 2/2] replace local_strtoull with _strtoui64 in windows
...ude "share/grabbag/replaygain.h" #include <ctype.h> #include <stdio.h> @@ -840,34 +841,12 @@ FLAC__bool parse_uint32(const char *src, FLAC__uint32 *dest) return true; } -#ifdef _MSC_VER -/* There's no strtoull() in MSVC6 so we just write a specialized one */ -static FLAC__uint64 local__strtoull(const char *src) -{ - FLAC__uint64 ret = 0; - int c; - FLAC__ASSERT(0 != src); - while(0 != (c = *src++)) { - c -= '0'; - if(c >= 0 && c <= 9) - ret = (ret * 10) + c; - else - break; - } - return ret; -} -#endif - FLAC__bool parse_uint64(const char *src...
2015 Apr 22
0
About a comment in stream_decoder.c
On Mon, Apr 20, 2015 at 08:00:20PM +0300, lvqcl wrote: > I don't understand the comment in src/libFLAC/stream_decoder.c: > > /*@@@@@@ technically not pessimistic enough, should be more like > if( (FLAC__uint64)order * ((((FLAC__uint64)1)<<bps)-1) * ((1<<subframe->qlp_coeff_precision)-1) < (((FLAC__uint64)-1) << 32) ) > */ > if(bps + subframe->qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32) > which is equivalent to the current > > bps + subframe-...
2011 Sep 28
0
FLAC::Encoder::Stream == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"
...{ if ( FFile->Write((unsigned char*)buffer, 1, bytes) != bytes ) { return FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR; } return FLAC__STREAM_ENCODER_WRITE_STATUS_OK; } virtual FLAC__StreamEncoderSeekStatus seek_callback (FLAC__uint64 absolute_byte_offset) { if (FFile->Seek(absolute_byte_offset + FFlacOffset, SEEK_SET) < 0 ) { return FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR; } return FLAC__STREAM_ENCODER_SEEK_STATUS_OK; } virtual FLAC__StreamEncode...
2004 Sep 10
2
getting framesize in client
...* file_info_.bits_per_sample, file_info_.sample_rate, file_info_.channels); file_info_.seek_to_in_sec = -1; file_info_.play_thread_open = true; @@ -304,6 +306,10 @@ void *play_loop_(void *arg) { + unsigned written_time_last = 0, bh_index_last_w = 0, bh_index_last_o = BITRATE_HIST_SIZE; + FLAC__uint64 decode_position_last = 0; + + (void)arg; while(file_info_.is_playing) { @@ -326,7 +332,8 @@ const unsigned n = min(wide_samples_in_reservoir_, SAMPLES_PER_WRITE); const unsigned delta = n * channels; int bytes; - unsigned i; + unsigned i, written_time, bh_index_w, bh_ind...
2004 Sep 10
3
slow FLAC__file_decoder_seek_absolute()...
...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, secs%60); flac_status = FLAC__file_decoder_seek_absolute(decoder, seek_point); if (flac_status) printf("seek absolute = %d\n", flac_status); } FLAC__file_decoder_process_remaining_frames(decoder); Thanks, Br...
2004 Sep 10
0
getting framesize in client
...s * file_info_.bits_per_sample, file_info_.sample_rate, file_info_.channels); file_info_.seek_to_in_sec = -1; file_info_.play_thread_open = true; @@ -304,6 +306,9 @@ void *play_loop_(void *arg) { + unsigned written_time_last = 0, bh_index_last_w = 0, bh_index_last_o = BITRATE_HIST_SIZE; + FLAC__uint64 decode_position_last = 0; + (void)arg; while(file_info_.is_playing) { @@ -326,7 +331,8 @@ const unsigned n = min(wide_samples_in_reservoir_, SAMPLES_PER_WRITE); const unsigned delta = n * channels; int bytes; - unsigned i; + unsigned i, written_time, bh_index_w; + FLAC...