Displaying 20 results from an estimated 27 matches for "qlp_coeff_precision".
2015 Apr 20
2
"keep qlp coeff precision such that only 32-bit math is required"
...hould the latter ignore that?
>
> We can only speculate about this, but I think this code has been duplicated
> by accident, and therefore it wasn't changed as the code shouldn't have
> been there in the first place.
Well, the code in process_subframe_() calculates MAX value of qlp_coeff_precision,
while the code in evaluate_lpc_subframe_() adjusts CURRENT qlp_coeff_precision.
It's possible to move the logic from evaluate_lpc_subframe_() into
process_subframe_(), see the attached patch, but I'm not sure that the
code becomes much clearer after it.
-------------- next part ----------...
2015 Apr 22
2
"keep qlp coeff precision such that only 32-bit math is required"
Martijn van Beurden wrote:
> Yes, but that MAX value is used to loop over the
> qlp_coeff_precision values between MIN and MAX. So, if the
> qlp_coeff_precision value is limited in the loop but MAX is not
> limited, the loop does the exact same thing multiple times: a
> waste of time. Therefore, only the MAX should be limited.
>
> I don't think the logic is needed directly afte...
2014 Jun 19
5
[PATCH] stream_encoder : Improve selection of residual accumulator width
...cl 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) << 32) )
> */
> if(bps + subframe->qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32)
>
> Is it really "not pessimistic enough"? Can it be changed similarly to your patch
> for stream_encoder.c?
Good question. I'...
2014 Jun 19
1
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 06:25:57PM +0400, lvqcl wrote:
> Now I wonder why evaluate_lpc_subframe_() function in stream_encoder.c contains
> almost the same code, but without any comments that it's not enough pessimistic:
> evaluate_lpc_subframe_():
>
> if(subframe_bps + qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32)
> if(subframe_bps <= 16 && qlp_coeff_precision <= 16)
> encoder->private_->local_lpc_compute_residual_from_qlp_coefficients_16bit(...);
> else
> encoder->private_->local_lpc_compute_residual_from_qlp_coefficients(......
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=8534bbe4e92300609fd6dc289d882130b69d48cd
First, I suspect that there's a typo and the intended code is
....
2004 Sep 10
1
lpc slowdown
...e "private/cpu.h"
#include "private/crc.h"
#include "private/fixed.h"
@@ -1738,10 +1739,11 @@
/* decode the subframe */
memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order);
- if(bps <= 16 && subframe->qlp_coeff_precision <= 16)
- decoder->private_->local_lpc_restore_signal_16bit(decoder->private_->residual[channel], decoder->private_->frame.header.blocksize-order, subframe->qlp_coeff, order, subframe->quantization_level, decoder->private_->output[channel]+order);
- else if(bps + su...
2015 Aug 08
1
[PATCH] treat negative qlp_shift as an error
...pposite direction but
they were implemented directly with << >> and in C negative shifts
are undefined.
treat as an error for now to avoid bad behavior but I need to
come back to this to specify exactly."
But libFLAC itself doesn't care about their values. It checks a value
of qlp_coeff_precision, though. So this patch adds a check of
a value of quantization_level.
I'm not sure what should libFLAC do if a negative (=invalid) value of
quantization_level is encountered. But it seems logical that it should
treat an invalid value of quantization_level in the same way as it treats
an inval...
2014 Jul 28
1
Duplicate QLP coefficient restricting code
...f flac. This
switch should enable exhaustive search for the optimal qlp
coefficient precision, but the resulting files are usually 0.5%
larger then when not using the switch. I stumbled upon this code
in stream_encoder
> if(encoder->protected_->do_qlp_coeff_prec_search) {
> min_qlp_coeff_precision = FLAC__MIN_QLP_COEFF_PRECISION;
> /* try to ensure a 32-bit datapath throughout for
> 16bps(+1bps for side channel) or less */
> if(subframe_bps <= 17) {
> max_qlp_coeff_precision = flac_min(32 - subframe_bps -
> lpc_order, FLAC__MAX_QLP_COEFF_PRECISION);
>...
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->qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32
>
> So IMHO the comm...
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 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...7 +682,7 @@ static FLAC__StreamEncoderInitStatus init_stream_internal_(
if(encoder->protected_->bits_per_sample < 16) {
/* @@@ need some data about how to set this here w.r.t. blocksize and sample rate */
/* @@@ until then we'll make a guess */
- encoder->protected_->qlp_coeff_precision = max(FLAC__MIN_QLP_COEFF_PRECISION, 2 + encoder->protected_->bits_per_sample / 2);
+ encoder->protected_->qlp_coeff_precision = flac_max(FLAC__MIN_QLP_COEFF_PRECISION, 2 + encoder->protected_->bits_per_sample / 2);
}
else if(encoder->protected_->bits_per_sample == 1...
2004 Sep 10
1
AW: AW: Incomplete format description?
...ream.
I've checked my interpretation against "flac -a" and it seems to
read 17 bits for each warmup sample. Here is its output:
frame=168
blocksize=4608
sample_rate=44100
channels=2
channel_assignment=RIGHT_SIDE
subframe=0
wasted_bits=0
type=LPC
order=5
partition_order=4
qlp_coeff_precision=12
quantization_level=9
warmup[0]=-993
warmup[1]=-476
warmup[2]=171
warmup[3]=115
warmup[4]=-766
Tor
===================================================================
EASY and FREE access to your email anywhere: http://Mailreader.com/
=============================================...
2015 Oct 11
1
[PATCH] stream_encoder.c: fix subframe_bps comparison
libFLAC limits the value of qlp_coeff_precision to make
sure that 32-bit math is enough for decoding of 16-bit audio.
subframe_bps can be equal to 17 for 16-bit input (for side channel).
So the value of subframe_bps should be compared with 17, not 16
(see also http://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_encoder.c;hb=02591f6b4b0...
2015 Apr 19
2
"keep qlp coeff precision such that only 32-bit math is required"
Martijn van Beurden wrote:
> Yes, indeed. I removed the 17-bits part because I just matched
> the code in evaluate_lpc_subframe_ with the process_subframe_
> code. It appears it only makes sense that those two pieces code
> are the same.
A bit of history:
1) The conditional "if(subframe_bps <= 16)" was added to evaluate_lpc_subframe_()
in the commit
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
...gt;private_->partitioned_rice_contents[channel], residual))
return false;
break;
default:
***************
*** 1925,1936 ****
/* decode the subframe */
memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order);
if(bps + subframe->qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32)
! if(bps <= 16 && subframe->qlp_coeff_precision <= 16)
! decoder->private_->local_lpc_restore_signal_16bit(decoder->private_->residual[channel], decoder->private_->frame.header.blocksize-order, subframe->qlp_coeff, or...
2004 Sep 10
3
1.0 source candidate
...x400000000000d840 in init_encoder (lax=0, do_mid_side=0,
loose_mid_side=0, do_exhaustive_model_search=0, do_escape_coding=0,
do_qlp_coeff_prec_search=0, min_residual_partition_order=3,
max_residual_partition_order=3, rice_parameter_search_dist=0,
max_lpc_order=8, blocksize=4608, qlp_coeff_precision=0, channels=1,
bps=16, sample_rate=44100, padding=0,
requested_seek_points=0x60000000002ab138 "100x",
num_requested_seek_points=-1, encoder_wrapper=0x80000fffffffa5c0)
at encode.c:711
#6 0x2000000000123dc0 in stream_decoder_read_metadata_ (
decoder=0x60000000002b7d...
2004 Sep 10
3
0.9 problems
...6 "/home/mdz/english.wav",
outfile=0x11ffffe3c "/home/mdz/english.flac", verbose=1, skip=0, verify=0,
lax=0, do_mid_side=1, loose_mid_side=0, do_exhaustive_model_search=0,
do_qlp_coeff_prec_search=0, rice_optimization_level=4, max_lpc_order=8,
blocksize=4608, qlp_coeff_precision=0, padding=0) at encode.c:280
#7 0x12000a208 in main (argc=3, argv=0x11ffffc38) at main.c:293
and when decoding:
#0 0x200000e7830 in FLAC__fixed_restore_signal (residual=0x1202ce480,
data_len=4606, order=2, data=0x1202c9c78) at fixed.c:209
#1 0x200000ef25c in stream_decoder_read_subframe_...
2004 Sep 10
0
ERROR: mismatch in decoded data, verify FAILED!
.../tmp/test-9.flac", verbose=1, skip=0, verify=1,
lax=0, do_mid_side=1, loose_mid_side=0, do_exhaustive_model_search=1,
do_qlp_coeff_prec_search=1, min_residual_partition_order=0,
max_residual_partition_order=16, rice_parameter_search_dist=0,
max_lpc_order=32, blocksize=4608, qlp_coeff_precision=0, padding=0,
requested_seek_points=0x8308120 "100x", num_requested_seek_points=-1)
at encode.c:292
#13 0x8050aa4 in encode_file (infilename=0xbffffa09 "/tmp/test-9.wav",
forced_outfilename=0xbfffe7d8 "/tmp/test-9.flac") at main.c:581
#14 0x804fd34 in mai...
2004 Sep 10
0
1.0 source candidate
..._encoder (lax=0, do_mid_side=0,
> loose_mid_side=0, do_exhaustive_model_search=0,
> do_escape_coding=0,
> do_qlp_coeff_prec_search=0, min_residual_partition_order=3,
> max_residual_partition_order=3, rice_parameter_search_dist=0,
> max_lpc_order=8, blocksize=4608, qlp_coeff_precision=0,
> channels=1,
> bps=16, sample_rate=44100, padding=0,
> requested_seek_points=0x60000000002ab138 "100x",
> num_requested_seek_points=-1, encoder_wrapper=0x80000fffffffa5c0)
> at encode.c:711
> #6 0x2000000000123dc0 in stream_decoder_read_metadata_...