Lines Matching defs:blocksize
178 unsigned blocksize,
187 unsigned blocksize,
198 unsigned blocksize,
219 unsigned blocksize,
237 unsigned blocksize,
382 FLAC__bool use_wide_by_partition; /* use slow 64-bit versions of some functions because of the min partition order and blocksize */
506 * always try to read blocksize+1 samples before encoding a block, so that
508 * of the blocksize, we will still notice when we are encoding the last
679 if(encoder->protected_->blocksize == 0) {
681 encoder->protected_->blocksize = 1152;
683 encoder->protected_->blocksize = 4096;
686 if(encoder->protected_->blocksize < FLAC__MIN_BLOCK_SIZE || encoder->protected_->blocksize > FLAC__MAX_BLOCK_SIZE)
692 if(encoder->protected_->blocksize < encoder->protected_->max_lpc_order)
697 /* @@@ need some data about how to set this here w.r.t. blocksize and sample rate */
702 if(encoder->protected_->blocksize <= 192)
704 else if(encoder->protected_->blocksize <= 384)
706 else if(encoder->protected_->blocksize <= 576)
708 else if(encoder->protected_->blocksize <= 1152)
710 else if(encoder->protected_->blocksize <= 2304)
712 else if(encoder->protected_->blocksize <= 4608)
718 if(encoder->protected_->blocksize <= 384)
720 else if(encoder->protected_->blocksize <= 1152)
732 encoder->protected_->blocksize != 192 &&
733 encoder->protected_->blocksize != 576 &&
734 encoder->protected_->blocksize != 1152 &&
735 encoder->protected_->blocksize != 2304 &&
736 encoder->protected_->blocksize != 4608 &&
737 encoder->protected_->blocksize != 256 &&
738 encoder->protected_->blocksize != 512 &&
739 encoder->protected_->blocksize != 1024 &&
740 encoder->protected_->blocksize != 2048 &&
741 encoder->protected_->blocksize != 4096 &&
742 encoder->protected_->blocksize != 8192 &&
743 encoder->protected_->blocksize != 16384
761 encoder->protected_->blocksize > FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ ||
884 encoder->private_->loose_mid_side_stereo_frames = (unsigned)((FLAC__double)encoder->protected_->sample_rate * 0.4 / (FLAC__double)encoder->protected_->blocksize + 0.5);
891 FLAC__ASSERT(encoder->protected_->blocksize <= 65535);
892 encoder->private_->loose_mid_side_stereo_frames = (unsigned)FLAC__fixedpoint_trunc((((FLAC__uint64)(encoder->protected_->sample_rate) * (FLAC__uint64)(26214)) << 16) / (encoder->protected_->blocksize<<16) + FLAC__FP_ONE_HALF);
900 encoder->private_->use_wide_by_block = (encoder->protected_->bits_per_sample + FLAC__bitmath_ilog2(encoder->protected_->blocksize)+1 > 30);
977 if(!resize_buffers_(encoder, encoder->protected_->blocksize)) {
995 encoder->private_->verify.input_fifo.size = encoder->protected_->blocksize+OVERREAD_;
1057 encoder->private_->streaminfo.data.stream_info.min_blocksize = encoder->protected_->blocksize; /* this encoder uses the same blocksize for the whole stream */
1058 encoder->private_->streaminfo.data.stream_info.max_blocksize = encoder->protected_->blocksize;
1237 unsigned blocksize = FLAC__stream_encoder_get_blocksize(encoder);
1239 FLAC__ASSERT(blocksize != 0);
1240 encoder->private_->total_frames_estimate = (unsigned)((FLAC__stream_encoder_get_total_samples_estimate(encoder) + blocksize - 1) / blocksize);
1329 const FLAC__bool is_fractional_block = encoder->protected_->blocksize != encoder->private_->current_sample_number;
1330 encoder->protected_->blocksize = encoder->private_->current_sample_number;
1510 encoder->protected_->blocksize = value;
1888 return encoder->protected_->blocksize;
1982 const unsigned channels = encoder->protected_->channels, blocksize = encoder->protected_->blocksize;
1990 const unsigned n = min(blocksize+OVERREAD_-encoder->private_->current_sample_number, samples-j);
2000 /* "i <= blocksize" to overread 1 sample; see comment in OVERREAD_ decl */
2001 for(i = encoder->private_->current_sample_number; i <= blocksize && j < samples; i++, j++) {
2012 if(encoder->private_->current_sample_number > blocksize) {
2013 FLAC__ASSERT(encoder->private_->current_sample_number == blocksize+OVERREAD_);
2019 encoder->private_->integer_signal[channel][0] = encoder->private_->integer_signal[channel][blocksize];
2021 encoder->private_->integer_signal_mid_side[0][0] = encoder->private_->integer_signal_mid_side[0][blocksize];
2022 encoder->private_->integer_signal_mid_side[1][0] = encoder->private_->integer_signal_mid_side[1][blocksize];
2035 const unsigned channels = encoder->protected_->channels, blocksize = encoder->protected_->blocksize;
2053 append_to_verify_fifo_interleaved_(&encoder->private_->verify.input_fifo, buffer, j, channels, min(blocksize+OVERREAD_-encoder->private_->current_sample_number, samples-j));
2055 /* "i <= blocksize" to overread 1 sample; see comment in OVERREAD_ decl */
2056 for(i = encoder->private_->current_sample_number; i <= blocksize && j < samples; i++, j++) {
2068 if(i > blocksize) {
2072 FLAC__ASSERT(i == blocksize+OVERREAD_);
2074 encoder->private_->integer_signal[0][0] = encoder->private_->integer_signal[0][blocksize];
2075 encoder->private_->integer_signal[1][0] = encoder->private_->integer_signal[1][blocksize];
2076 encoder->private_->integer_signal_mid_side[0][0] = encoder->private_->integer_signal_mid_side[0][blocksize];
2077 encoder->private_->integer_signal_mid_side[1][0] = encoder->private_->integer_signal_mid_side[1][blocksize];
2088 append_to_verify_fifo_interleaved_(&encoder->private_->verify.input_fifo, buffer, j, channels, min(blocksize+OVERREAD_-encoder->private_->current_sample_number, samples-j));
2090 /* "i <= blocksize" to overread 1 sample; see comment in OVERREAD_ decl */
2091 for(i = encoder->private_->current_sample_number; i <= blocksize && j < samples; i++, j++) {
2097 if(i > blocksize) {
2101 FLAC__ASSERT(i == blocksize+OVERREAD_);
2104 encoder->private_->integer_signal[channel][0] = encoder->private_->integer_signal[channel][blocksize];
2135 encoder->protected_->blocksize = 0;
2315 /*@@@ new_blocksize*2 is too pessimistic, but to fix, we need smarter logic because a smaller new_blocksize can actually increase the # of partitions; would require moving this out into a separate function, then checking its capacity against the need of the current blocksize&min/max_partition_order (and maybe predictor order) */
2320 /* now adjust the windows if the blocksize has changed */
2463 const unsigned blocksize = FLAC__stream_encoder_get_blocksize(encoder);
2465 const FLAC__uint64 frame_last_sample = frame_first_sample + (FLAC__uint64)blocksize - 1;
2476 encoder->private_->seek_table->points[i].frame_samples = blocksize;
2878 if(encoder->protected_->do_md5 && !FLAC__MD5Accumulate(&encoder->private_->md5context, (const FLAC__int32 * const *)encoder->private_->integer_signal, encoder->protected_->channels, encoder->protected_->blocksize, (encoder->protected_->bits_per_sample+7) / 8)) {
2914 if(!write_bitbuffer_(encoder, encoder->protected_->blocksize, is_last_block)) {
2924 encoder->private_->streaminfo.data.stream_info.total_samples += (FLAC__uint64)encoder->protected_->blocksize;
2942 max_partition_order = FLAC__format_get_max_rice_partition_order_from_blocksize(encoder->protected_->blocksize);
2950 frame_header.blocksize = encoder->protected_->blocksize;
2989 const unsigned w = get_wasted_bits_(encoder->private_->integer_signal[channel], encoder->protected_->blocksize);
2997 const unsigned w = get_wasted_bits_(encoder->private_->integer_signal_mid_side[channel], encoder->protected_->blocksize);
3143 if(!add_subframe_(encoder, frame_header.blocksize, left_bps , left_subframe , encoder->private_->frame))
3145 if(!add_subframe_(encoder, frame_header.blocksize, right_bps, right_subframe, encoder->private_->frame))
3155 if(!add_subframe_(encoder, frame_header.blocksize, encoder->private_->subframe_bps[channel], &encoder->private_->subframe_workspace[channel][encoder->private_->best_subframe[channel]], encoder->private_->frame)) {
3206 FLAC__ASSERT(frame_header->blocksize > 0);
3210 if(encoder->private_->disable_verbatim_subframes && frame_header->blocksize >= FLAC__MAX_FIXED_ORDER)
3213 _best_bits = evaluate_verbatim_subframe_(encoder, integer_signal, frame_header->blocksize, subframe_bps, subframe[_best_subframe]);
3215 if(frame_header->blocksize >= FLAC__MAX_FIXED_ORDER) {
3217 guess_fixed_order = encoder->private_->local_fixed_compute_best_predictor(integer_signal+FLAC__MAX_FIXED_ORDER, frame_header->blocksize-FLAC__MAX_FIXED_ORDER, fixed_residual_bits_per_sample);
3230 for(i = 1; i < frame_header->blocksize; i++) {
3238 _candidate_bits = evaluate_constant_subframe_(encoder, integer_signal[0], frame_header->blocksize, subframe_bps, subframe[!_best_subframe]);
3254 if(max_fixed_order >= frame_header->blocksize)
3255 max_fixed_order = frame_header->blocksize - 1;
3280 frame_header->blocksize,
3302 if(encoder->protected_->max_lpc_order >= frame_header->blocksize)
3303 max_lpc_order = frame_header->blocksize-1;
3309 FLAC__lpc_window_data(integer_signal, encoder->private_->window[a], encoder->private_->windowed_signal, frame_header->blocksize);
3310 encoder->private_->local_lpc_compute_autocorrelation(encoder->private_->windowed_signal, frame_header->blocksize, max_lpc_order+1, autoc);
3322 frame_header->blocksize,
3331 if(max_lpc_order >= frame_header->blocksize)
3332 max_lpc_order = frame_header->blocksize - 1;
3334 lpc_residual_bits_per_sample = FLAC__lpc_compute_expected_bits_per_residual_sample(lpc_error[lpc_order-1], frame_header->blocksize-lpc_order);
3367 frame_header->blocksize,
3399 _best_bits = evaluate_verbatim_subframe_(encoder, integer_signal, frame_header->blocksize, subframe_bps, subframe[_best_subframe]);
3410 unsigned blocksize,
3424 if(!FLAC__subframe_add_fixed(&(subframe->data.fixed), blocksize - subframe->data.fixed.order, subframe_bps, subframe->wasted_bits, frame)) {
3430 if(!FLAC__subframe_add_lpc(&(subframe->data.lpc), blocksize - subframe->data.lpc.order, subframe_bps, subframe->wasted_bits, frame)) {
3436 if(!FLAC__subframe_add_verbatim(&(subframe->data.verbatim), blocksize, subframe_bps, subframe->wasted_bits, frame)) {
3452 unsigned blocksize,
3468 ret = add_subframe_(encoder, blocksize, subframe_bps, subframe, frame);
3482 unsigned blocksize,
3494 spotcheck_subframe_estimate_(encoder, blocksize, subframe_bps, subframe, estimate);
3496 (void)encoder, (void)blocksize;
3508 unsigned blocksize,
3522 const unsigned residual_samples = blocksize - order;
3557 spotcheck_subframe_estimate_(encoder, blocksize, subframe_bps, subframe, estimate);
3571 unsigned blocksize,
3588 const unsigned residual_samples = blocksize - order;
3643 spotcheck_subframe_estimate_(encoder, blocksize, subframe_bps, subframe, estimate);
3653 unsigned blocksize,
3664 estimate = FLAC__SUBFRAME_ZERO_PAD_LEN + FLAC__SUBFRAME_TYPE_LEN + FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN + subframe->wasted_bits + (blocksize * subframe_bps);
3667 spotcheck_subframe_estimate_(encoder, blocksize, subframe_bps, subframe, estimate);
3695 const unsigned blocksize = residual_samples + predictor_order;
3697 max_partition_order = FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_predictor_order(max_partition_order, blocksize, predictor_order);
3776 unsigned blocksize,
3864 const unsigned blocksize = residual_samples + predictor_order;
3872 const unsigned default_partition_samples = blocksize >> partition_order;
4206 const unsigned blocksize = frame->header.blocksize;
4207 const unsigned bytes_per_block = sizeof(FLAC__int32) * blocksize;
4216 for(i = 0; i < blocksize; i++) {
4224 FLAC__ASSERT(i < blocksize);
4227 encoder->private_->verify.error_stats.frame_number = (unsigned)(frame->header.number.sample_number / blocksize);
4237 encoder->private_->verify.input_fifo.tail -= blocksize;
4240 memmove(&encoder->private_->verify.input_fifo.data[channel][0], &encoder->private_->verify.input_fifo.data[channel][blocksize], encoder->private_->verify.input_fifo.tail * sizeof(encoder->private_->verify.input_fifo.data[0][0]));