search for: partition_sampl

Displaying 15 results from an estimated 15 matches for "partition_sampl".

Did you mean: partition_samples
2013 Oct 09
3
PATCH for rice_parameter calculation
MSVS profiler shows that the following code in stream_encoder.c takes several percent of CPU time: for(rice_parameter = 0, k = partition_samples; k < mean; rice_parameter++, k <<= 1) ; this code is equivalent to: rice_parameter = 0; k = partition_samples; while(k < mean) { rice_parameter++; k <<= 1; } The idea was to accelerate it: rice_parameter = 0; k = partition_samples;...
2013 Oct 11
1
PATCH for rice_parameter calculation
Or, I was originally thinking: rice_parameter = 0; k = partition_samples; if (k < mean) { int n = mean - k; rice_parameter += n; k <<= n; } (sorry for the hasty post) On Oct 11, 2013, at 10:34, Brian Willoughby wrote: > Hmm, maybe I'm missing something, but what about this: > > rice_parameter = 0; k = partition_samples; > int n =...
2014 Nov 25
9
Two new CVEs against FLAC
Hi all, Google Security Team member, Michele Spagnuolo, recently found two potential problems in the FLAC code base. They are : CVE-2014-9028 : Heap buffer write overflow CVE-2014-8962 : Heap buffer read overflow For Linux distributions, the specific fixes for these two CVEs are available from Git here:
2014 Nov 25
1
Two new CVEs against FLAC
...n would return true and blocksize-order in > the caller would still underflow. > > --- a/src/libFLAC/stream_decoder.c > +++ b/src/libFLAC/stream_decoder.c > @@ -2744,7 +2744,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne > if(partition_samples < predictor_order) { > send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); > decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; > - return true; > +...
2014 Dec 15
1
[PATCH] src/libFLAC/stream_decoder.c : Rework fix for seeking bug.
...on_order == 0) { - if(decoder->private_->frame.header.blocksize < predictor_order) { - send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); - decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; - return true; - } - } - else { - if(partition_samples < predictor_order) { - send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); - decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; - return true; - } - } + /* invalid predictor and partition orders mush be handled in the callers */ + FLA...
2014 Jun 19
0
[PATCH] stream_encoder : Improve selection of residual accumulator width
...onedRiceContents *partitioned_rice_contents, FLAC__int32 *residual, FLAC__bool is_extended, int bps) { FLAC__uint32 rice_parameter; int i; @@ -2744,6 +2744,15 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne u = (partition_order == 0 || partition > 0)? partition_samples : partition_samples - predictor_order; if(!decoder->private_->local_bitreader_read_rice_signed_block(decoder->private_->input, residual + sample, u, rice_parameter)) return false; /* read_callback_ sets the state for us */ +#if 1 + for (i = sample; (unsigned)i < sample +...
2014 Dec 09
5
Two new CVEs against FLAC
...n would return true and blocksize-order in > the caller would still underflow. > > --- a/src/libFLAC/stream_decoder.c > +++ b/src/libFLAC/stream_decoder.c > @@ -2744,7 +2744,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne > if(partition_samples < predictor_order) { > send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); > decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; > - return true; > +...
2014 Jun 19
5
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 03:30:22PM +0400, lvqcl wrote: > BTW, what can you say about the following place in stream_decoder.c > in read_subframe_lpc_() function: > > /*@@@@@@ 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)
2014 Nov 25
0
Two new CVEs against FLAC
...nd blocksize of 4, the function would return true and blocksize-order in the caller would still underflow. --- a/src/libFLAC/stream_decoder.c +++ b/src/libFLAC/stream_decoder.c @@ -2744,7 +2744,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne if(partition_samples < predictor_order) { send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; - return true; + return f...
2014 Dec 09
0
Two new CVEs against FLAC
...ller would still underflow. > > > > --- a/src/libFLAC/stream_decoder.c > > +++ b/src/libFLAC/stream_decoder.c > > @@ -2744,7 +2744,7 @@ FLAC__bool > read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne > > if(partition_samples < predictor_order) { > > send_error_to_client_(decoder, > FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); > > decoder->protected_->state = > FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; > > - return true; > > +...
2014 Dec 09
0
Two new CVEs against FLAC
...locksize-order in >> the caller would still underflow. >> >> --- a/src/libFLAC/stream_decoder.c >> +++ b/src/libFLAC/stream_decoder.c >> @@ -2744,7 +2744,7 @@ FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigne >> if(partition_samples < predictor_order) { >> send_error_to_client_(decoder, FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC); >> decoder->protected_->state = FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC; >> - return true; &...
2004 Sep 30
1
[don@donarmstrong.com: Bug#274301: libflac4 segfaults on corrupt flac files]
...; state = 1 #1 0x4021f88d in read_residual_partitioned_rice_ (decoder=0x805ba58, predictor_order=3, partition_order=14, partitioned_rice_contents=0x805f478, residual=0x807dd80) at stream_decoder.c:1975 rice_parameter = 9 i = 2 partition = 0 sample = 0 u = 4294967293 partitions = 16384 partition_samples = 0 #2 0x4021f01f in read_subframe_fixed_ (decoder=0x805ba58, channel=1, bps=16, order=3) at stream_decoder.c:1832 subframe = (FLAC__Subframe_Fixed *) 0x805f988 i32 = -31667 u32 = 14 u = 14 #3 0x4021ecd7 in read_subframe_ (decoder=0x805ba58, channel=1, bps=1) at stream_decoder.c:1751 x = 2...
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...bits a residual value will be @@ -3886,7 +3883,7 @@ void precompute_partition_info_escapes_( } #ifdef EXACT_RICE_BITS_CALCULATION -static FLaC__INLINE unsigned count_rice_bits_in_partition_( +static inline unsigned count_rice_bits_in_partition_( const unsigned rice_parameter, const unsigned partition_samples, const FLAC__int32 *residual @@ -3901,7 +3898,7 @@ static FLaC__INLINE unsigned count_rice_bits_in_partition_( return partition_bits; } #else -static FLaC__INLINE unsigned count_rice_bits_in_partition_( +static inline unsigned count_rice_bits_in_partition_( const unsigned rice_parameter,...
2004 Sep 10
3
Altivec, automake
I think I've gotten FLAC__lpc_restore_signal() about as good as I'm going to get it. Here's what I have: -a new file, lpc_asm.s, which has the assembly routines -changes to cpu.h, cpu.c, and stream_decoder.c to enable them -changes to configure.in to support the new cpu stuff -a preliminary Makefile.am -maybe something else I'm forgetting Now automake complains that configure.in
2004 Sep 10
2
Altivec, automake
...15U & ~0xf); + + FLAC__ASSERT((((long)residual) & 0xf) == 0); decoder->private_->frame.subframes[channel].type = FLAC__SUBFRAME_TYPE_VERBATIM; *************** *** 1965,1970 **** --- 1986,1993 ---- const unsigned partitions = 1u << partition_order; const unsigned partition_samples = partition_order > 0? decoder->private_->frame.header.blocksize >> partition_order : decoder->private_->frame.header.blocksize - predictor_order; + FLAC__ASSERT((((long)residual) & 0xf) == 0); + if(!FLAC__format_entropy_coding_method_partitioned_rice_contents_ens...