Lines Matching defs:verify
297 /* verify-related routines: */
425 * The data for the verify section
441 } verify;
607 if(0 != encoder->private_->verify.decoder)
608 FLAC__stream_decoder_delete(encoder->private_->verify.decoder);
988 * Set up the verify stuff if necessary
990 if(encoder->protected_->verify) {
995 encoder->private_->verify.input_fifo.size = encoder->protected_->blocksize+OVERREAD_;
997 if(0 == (encoder->private_->verify.input_fifo.data[i] = (FLAC__int32*)safe_malloc_mul_2op_(sizeof(FLAC__int32), /*times*/encoder->private_->verify.input_fifo.size))) {
1002 encoder->private_->verify.input_fifo.tail = 0;
1007 encoder->private_->verify.decoder = FLAC__stream_decoder_new();
1008 if(0 == encoder->private_->verify.decoder) {
1013 if(FLAC__stream_decoder_init_stream(encoder->private_->verify.decoder, verify_read_callback_, /*seek_callback=*/0, /*tell_callback=*/0, /*length_callback=*/0, /*eof_callback=*/0, verify_write_callback_, verify_metadata_callback_, verify_error_callback_, /*client_data=*/encoder) != FLAC__STREAM_DECODER_INIT_STATUS_OK) {
1018 encoder->private_->verify.error_stats.absolute_sample = 0;
1019 encoder->private_->verify.error_stats.frame_number = 0;
1020 encoder->private_->verify.error_stats.channel = 0;
1021 encoder->private_->verify.error_stats.sample = 0;
1022 encoder->private_->verify.error_stats.expected = 0;
1023 encoder->private_->verify.error_stats.got = 0;
1038 if(encoder->protected_->verify)
1039 encoder->private_->verify.state_hint = ENCODER_IN_MAGIC;
1052 if(encoder->protected_->verify)
1053 encoder->private_->verify.state_hint = ENCODER_IN_METADATA;
1135 if(encoder->protected_->verify)
1136 encoder->private_->verify.state_hint = ENCODER_IN_AUDIO;
1357 if(encoder->protected_->verify && 0 != encoder->private_->verify.decoder && !FLAC__stream_decoder_finish(encoder->private_->verify.decoder)) {
1409 encoder->protected_->verify = value;
1799 if(encoder->protected_->verify)
1800 return FLAC__stream_decoder_get_state(encoder->private_->verify.decoder);
1813 return FLAC__stream_decoder_get_resolved_state_string(encoder->private_->verify.decoder);
1822 *absolute_sample = encoder->private_->verify.error_stats.absolute_sample;
1824 *frame_number = encoder->private_->verify.error_stats.frame_number;
1826 *channel = encoder->private_->verify.error_stats.channel;
1828 *sample = encoder->private_->verify.error_stats.sample;
1830 *expected = encoder->private_->verify.error_stats.expected;
1832 *got = encoder->private_->verify.error_stats.got;
1840 return encoder->protected_->verify;
1992 if(encoder->protected_->verify)
1993 append_to_verify_fifo_(&encoder->private_->verify.input_fifo, buffer, j, channels, n);
2052 if(encoder->protected_->verify)
2053 append_to_verify_fifo_interleaved_(&encoder->private_->verify.input_fifo, buffer, j, channels, min(blocksize+OVERREAD_-encoder->private_->current_sample_number, samples-j));
2087 if(encoder->protected_->verify)
2088 append_to_verify_fifo_interleaved_(&encoder->private_->verify.input_fifo, buffer, j, channels, min(blocksize+OVERREAD_-encoder->private_->current_sample_number, samples-j));
2124 encoder->protected_->verify = true;
2126 encoder->protected_->verify = false;
2243 if(encoder->protected_->verify) {
2245 if(0 != encoder->private_->verify.input_fifo.data[i]) {
2246 free(encoder->private_->verify.input_fifo.data[i]);
2247 encoder->private_->verify.input_fifo.data[i] = 0;
2400 if(encoder->protected_->verify) {
2401 encoder->private_->verify.output.data = buffer;
2402 encoder->private_->verify.output.bytes = bytes;
2403 if(encoder->private_->verify.state_hint == ENCODER_IN_MAGIC) {
2404 encoder->private_->verify.needs_magic_hack = true;
2407 if(!FLAC__stream_decoder_process_single(encoder->private_->verify.decoder)) {
4173 const size_t encoded_bytes = encoder->private_->verify.output.bytes;
4176 if(encoder->private_->verify.needs_magic_hack) {
4180 encoder->private_->verify.needs_magic_hack = false;
4193 memcpy(buffer, encoder->private_->verify.output.data, *bytes);
4194 encoder->private_->verify.output.data += *bytes;
4195 encoder->private_->verify.output.bytes -= *bytes;
4212 if(0 != memcmp(buffer[channel], encoder->private_->verify.input_fifo.data[channel], bytes_per_block)) {
4217 if(buffer[channel][i] != encoder->private_->verify.input_fifo.data[channel][i]) {
4219 expect = (FLAC__int32)encoder->private_->verify.input_fifo.data[channel][i];
4226 encoder->private_->verify.error_stats.absolute_sample = frame->header.number.sample_number + sample;
4227 encoder->private_->verify.error_stats.frame_number = (unsigned)(frame->header.number.sample_number / blocksize);
4228 encoder->private_->verify.error_stats.channel = channel;
4229 encoder->private_->verify.error_stats.sample = sample;
4230 encoder->private_->verify.error_stats.expected = expect;
4231 encoder->private_->verify.error_stats.got = got;
4237 encoder->private_->verify.input_fifo.tail -= blocksize;
4238 FLAC__ASSERT(encoder->private_->verify.input_fifo.tail <= OVERREAD_);
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]));