History

avfilter/af_astats: fix identation

Marton Balint committed 7 years ago

Commit 233fdd81 parent e85f37d1 file · +74 −74Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_astats.c+74−74
@@ -331,79 +331,79 @@ static void set_metadata(AudioStatsContext *s, AVDictionary **metadata) · 330 unmodified lines
331 max_sigma_x = p->sigma_x;331 max_sigma_x = p->sigma_x;
332 332
333 if (s->measure_perchannel & MEASURE_DC_OFFSET)333 if (s->measure_perchannel & MEASURE_DC_OFFSET)
334 set_meta(metadata, c + 1, "DC_offset", "%f", p->sigma_x / p->nb_samples);334 set_meta(metadata, c + 1, "DC_offset", "%f", p->sigma_x / p->nb_samples);
335 if (s->measure_perchannel & MEASURE_MIN_LEVEL)335 if (s->measure_perchannel & MEASURE_MIN_LEVEL)
336 set_meta(metadata, c + 1, "Min_level", "%f", p->min);336 set_meta(metadata, c + 1, "Min_level", "%f", p->min);
337 if (s->measure_perchannel & MEASURE_MAX_LEVEL)337 if (s->measure_perchannel & MEASURE_MAX_LEVEL)
338 set_meta(metadata, c + 1, "Max_level", "%f", p->max);338 set_meta(metadata, c + 1, "Max_level", "%f", p->max);
339 if (s->measure_perchannel & MEASURE_MIN_DIFFERENCE)339 if (s->measure_perchannel & MEASURE_MIN_DIFFERENCE)
340 set_meta(metadata, c + 1, "Min_difference", "%f", p->min_diff);340 set_meta(metadata, c + 1, "Min_difference", "%f", p->min_diff);
341 if (s->measure_perchannel & MEASURE_MAX_DIFFERENCE)341 if (s->measure_perchannel & MEASURE_MAX_DIFFERENCE)
342 set_meta(metadata, c + 1, "Max_difference", "%f", p->max_diff);342 set_meta(metadata, c + 1, "Max_difference", "%f", p->max_diff);
343 if (s->measure_perchannel & MEASURE_MEAN_DIFFERENCE)343 if (s->measure_perchannel & MEASURE_MEAN_DIFFERENCE)
344 set_meta(metadata, c + 1, "Mean_difference", "%f", p->diff1_sum / (p->nb_samples - 1));344 set_meta(metadata, c + 1, "Mean_difference", "%f", p->diff1_sum / (p->nb_samples - 1));
345 if (s->measure_perchannel & MEASURE_RMS_DIFFERENCE)345 if (s->measure_perchannel & MEASURE_RMS_DIFFERENCE)
346 set_meta(metadata, c + 1, "RMS_difference", "%f", sqrt(p->diff1_sum_x2 / (p->nb_samples - 1)));346 set_meta(metadata, c + 1, "RMS_difference", "%f", sqrt(p->diff1_sum_x2 / (p->nb_samples - 1)));
347 if (s->measure_perchannel & MEASURE_PEAK_LEVEL)347 if (s->measure_perchannel & MEASURE_PEAK_LEVEL)
348 set_meta(metadata, c + 1, "Peak_level", "%f", LINEAR_TO_DB(FFMAX(-p->nmin, p->nmax)));348 set_meta(metadata, c + 1, "Peak_level", "%f", LINEAR_TO_DB(FFMAX(-p->nmin, p->nmax)));
349 if (s->measure_perchannel & MEASURE_RMS_LEVEL)349 if (s->measure_perchannel & MEASURE_RMS_LEVEL)
350 set_meta(metadata, c + 1, "RMS_level", "%f", LINEAR_TO_DB(sqrt(p->sigma_x2 / p->nb_samples)));350 set_meta(metadata, c + 1, "RMS_level", "%f", LINEAR_TO_DB(sqrt(p->sigma_x2 / p->nb_samples)));
351 if (s->measure_perchannel & MEASURE_RMS_PEAK)351 if (s->measure_perchannel & MEASURE_RMS_PEAK)
352 set_meta(metadata, c + 1, "RMS_peak", "%f", LINEAR_TO_DB(sqrt(p->max_sigma_x2)));352 set_meta(metadata, c + 1, "RMS_peak", "%f", LINEAR_TO_DB(sqrt(p->max_sigma_x2)));
353 if (s->measure_perchannel & MEASURE_RMS_TROUGH)353 if (s->measure_perchannel & MEASURE_RMS_TROUGH)
354 set_meta(metadata, c + 1, "RMS_trough", "%f", LINEAR_TO_DB(sqrt(p->min_sigma_x2)));354 set_meta(metadata, c + 1, "RMS_trough", "%f", LINEAR_TO_DB(sqrt(p->min_sigma_x2)));
355 if (s->measure_perchannel & MEASURE_CREST_FACTOR)355 if (s->measure_perchannel & MEASURE_CREST_FACTOR)
356 set_meta(metadata, c + 1, "Crest_factor", "%f", p->sigma_x2 ? FFMAX(-p->min, p->max) / sqrt(p->sigma_x2 / p->nb_samples) : 1);356 set_meta(metadata, c + 1, "Crest_factor", "%f", p->sigma_x2 ? FFMAX(-p->min, p->max) / sqrt(p->sigma_x2 / p->nb_samples) : 1);
357 if (s->measure_perchannel & MEASURE_FLAT_FACTOR)357 if (s->measure_perchannel & MEASURE_FLAT_FACTOR)
358 set_meta(metadata, c + 1, "Flat_factor", "%f", LINEAR_TO_DB((p->min_runs + p->max_runs) / (p->min_count + p->max_count)));358 set_meta(metadata, c + 1, "Flat_factor", "%f", LINEAR_TO_DB((p->min_runs + p->max_runs) / (p->min_count + p->max_count)));
359 if (s->measure_perchannel & MEASURE_PEAK_COUNT)359 if (s->measure_perchannel & MEASURE_PEAK_COUNT)
360 set_meta(metadata, c + 1, "Peak_count", "%f", (float)(p->min_count + p->max_count));360 set_meta(metadata, c + 1, "Peak_count", "%f", (float)(p->min_count + p->max_count));
361 if (s->measure_perchannel & MEASURE_BIT_DEPTH) {361 if (s->measure_perchannel & MEASURE_BIT_DEPTH) {
362 bit_depth(s, p->mask, p->imask, &depth);362 bit_depth(s, p->mask, p->imask, &depth);
363 set_meta(metadata, c + 1, "Bit_depth", "%f", depth.num);363 set_meta(metadata, c + 1, "Bit_depth", "%f", depth.num);
364 set_meta(metadata, c + 1, "Bit_depth2", "%f", depth.den);364 set_meta(metadata, c + 1, "Bit_depth2", "%f", depth.den);
365 }365 }
366 if (s->measure_perchannel & MEASURE_DYNAMIC_RANGE)366 if (s->measure_perchannel & MEASURE_DYNAMIC_RANGE)
367 set_meta(metadata, c + 1, "Dynamic_range", "%f", LINEAR_TO_DB(2 * FFMAX(FFABS(p->min), FFABS(p->max))/ p->min_non_zero));367 set_meta(metadata, c + 1, "Dynamic_range", "%f", LINEAR_TO_DB(2 * FFMAX(FFABS(p->min), FFABS(p->max))/ p->min_non_zero));
368 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS)368 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS)
369 set_meta(metadata, c + 1, "Zero_crossings", "%f", p->zero_runs);369 set_meta(metadata, c + 1, "Zero_crossings", "%f", p->zero_runs);
370 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS_RATE)370 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS_RATE)
371 set_meta(metadata, c + 1, "Zero_crossings_rate", "%f", p->zero_runs/(double)p->nb_samples);371 set_meta(metadata, c + 1, "Zero_crossings_rate", "%f", p->zero_runs/(double)p->nb_samples);
372 }372 }
373 373
374 if (s->measure_overall & MEASURE_DC_OFFSET)374 if (s->measure_overall & MEASURE_DC_OFFSET)
375 set_meta(metadata, 0, "Overall.DC_offset", "%f", max_sigma_x / (nb_samples / s->nb_channels));375 set_meta(metadata, 0, "Overall.DC_offset", "%f", max_sigma_x / (nb_samples / s->nb_channels));
376 if (s->measure_overall & MEASURE_MIN_LEVEL)376 if (s->measure_overall & MEASURE_MIN_LEVEL)
377 set_meta(metadata, 0, "Overall.Min_level", "%f", min);377 set_meta(metadata, 0, "Overall.Min_level", "%f", min);
378 if (s->measure_overall & MEASURE_MAX_LEVEL)378 if (s->measure_overall & MEASURE_MAX_LEVEL)
379 set_meta(metadata, 0, "Overall.Max_level", "%f", max);379 set_meta(metadata, 0, "Overall.Max_level", "%f", max);
380 if (s->measure_overall & MEASURE_MIN_DIFFERENCE)380 if (s->measure_overall & MEASURE_MIN_DIFFERENCE)
381 set_meta(metadata, 0, "Overall.Min_difference", "%f", min_diff);381 set_meta(metadata, 0, "Overall.Min_difference", "%f", min_diff);
382 if (s->measure_overall & MEASURE_MAX_DIFFERENCE)382 if (s->measure_overall & MEASURE_MAX_DIFFERENCE)
383 set_meta(metadata, 0, "Overall.Max_difference", "%f", max_diff);383 set_meta(metadata, 0, "Overall.Max_difference", "%f", max_diff);
384 if (s->measure_overall & MEASURE_MEAN_DIFFERENCE)384 if (s->measure_overall & MEASURE_MEAN_DIFFERENCE)
385 set_meta(metadata, 0, "Overall.Mean_difference", "%f", diff1_sum / (nb_samples - s->nb_channels));385 set_meta(metadata, 0, "Overall.Mean_difference", "%f", diff1_sum / (nb_samples - s->nb_channels));
386 if (s->measure_overall & MEASURE_RMS_DIFFERENCE)386 if (s->measure_overall & MEASURE_RMS_DIFFERENCE)
387 set_meta(metadata, 0, "Overall.RMS_difference", "%f", sqrt(diff1_sum_x2 / (nb_samples - s->nb_channels)));387 set_meta(metadata, 0, "Overall.RMS_difference", "%f", sqrt(diff1_sum_x2 / (nb_samples - s->nb_channels)));
388 if (s->measure_overall & MEASURE_PEAK_LEVEL)388 if (s->measure_overall & MEASURE_PEAK_LEVEL)
389 set_meta(metadata, 0, "Overall.Peak_level", "%f", LINEAR_TO_DB(FFMAX(-nmin, nmax)));389 set_meta(metadata, 0, "Overall.Peak_level", "%f", LINEAR_TO_DB(FFMAX(-nmin, nmax)));
390 if (s->measure_overall & MEASURE_RMS_LEVEL)390 if (s->measure_overall & MEASURE_RMS_LEVEL)
391 set_meta(metadata, 0, "Overall.RMS_level", "%f", LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));391 set_meta(metadata, 0, "Overall.RMS_level", "%f", LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));
392 if (s->measure_overall & MEASURE_RMS_PEAK)392 if (s->measure_overall & MEASURE_RMS_PEAK)
393 set_meta(metadata, 0, "Overall.RMS_peak", "%f", LINEAR_TO_DB(sqrt(max_sigma_x2)));393 set_meta(metadata, 0, "Overall.RMS_peak", "%f", LINEAR_TO_DB(sqrt(max_sigma_x2)));
394 if (s->measure_overall & MEASURE_RMS_TROUGH)394 if (s->measure_overall & MEASURE_RMS_TROUGH)
395 set_meta(metadata, 0, "Overall.RMS_trough", "%f", LINEAR_TO_DB(sqrt(min_sigma_x2)));395 set_meta(metadata, 0, "Overall.RMS_trough", "%f", LINEAR_TO_DB(sqrt(min_sigma_x2)));
396 if (s->measure_overall & MEASURE_FLAT_FACTOR)396 if (s->measure_overall & MEASURE_FLAT_FACTOR)
397 set_meta(metadata, 0, "Overall.Flat_factor", "%f", LINEAR_TO_DB((min_runs + max_runs) / (min_count + max_count)));397 set_meta(metadata, 0, "Overall.Flat_factor", "%f", LINEAR_TO_DB((min_runs + max_runs) / (min_count + max_count)));
398 if (s->measure_overall & MEASURE_PEAK_COUNT)398 if (s->measure_overall & MEASURE_PEAK_COUNT)
399 set_meta(metadata, 0, "Overall.Peak_count", "%f", (float)(min_count + max_count) / (double)s->nb_channels);399 set_meta(metadata, 0, "Overall.Peak_count", "%f", (float)(min_count + max_count) / (double)s->nb_channels);
400 if (s->measure_overall & MEASURE_BIT_DEPTH) {400 if (s->measure_overall & MEASURE_BIT_DEPTH) {
401 bit_depth(s, mask, imask, &depth);401 bit_depth(s, mask, imask, &depth);
402 set_meta(metadata, 0, "Overall.Bit_depth", "%f", depth.num);402 set_meta(metadata, 0, "Overall.Bit_depth", "%f", depth.num);
403 set_meta(metadata, 0, "Overall.Bit_depth2", "%f", depth.den);403 set_meta(metadata, 0, "Overall.Bit_depth2", "%f", depth.den);
404 }404 }
405 if (s->measure_overall & MEASURE_NUMBER_OF_SAMPLES)405 if (s->measure_overall & MEASURE_NUMBER_OF_SAMPLES)
406 set_meta(metadata, 0, "Overall.Number_of_samples", "%f", nb_samples / s->nb_channels);406 set_meta(metadata, 0, "Overall.Number_of_samples", "%f", nb_samples / s->nb_channels);
407}407}
408 408
409static int filter_frame(AVFilterLink *inlink, AVFrame *buf)409static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
@@ -562,80 +562,80 @@ static void print_stats(AVFilterContext *ctx) · 152 unmodified lines
562 562
563 av_log(ctx, AV_LOG_INFO, "Channel: %d\n", c + 1);563 av_log(ctx, AV_LOG_INFO, "Channel: %d\n", c + 1);
564 if (s->measure_perchannel & MEASURE_DC_OFFSET)564 if (s->measure_perchannel & MEASURE_DC_OFFSET)
565 av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", p->sigma_x / p->nb_samples);565 av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", p->sigma_x / p->nb_samples);
566 if (s->measure_perchannel & MEASURE_MIN_LEVEL)566 if (s->measure_perchannel & MEASURE_MIN_LEVEL)
567 av_log(ctx, AV_LOG_INFO, "Min level: %f\n", p->min);567 av_log(ctx, AV_LOG_INFO, "Min level: %f\n", p->min);
568 if (s->measure_perchannel & MEASURE_MAX_LEVEL)568 if (s->measure_perchannel & MEASURE_MAX_LEVEL)
569 av_log(ctx, AV_LOG_INFO, "Max level: %f\n", p->max);569 av_log(ctx, AV_LOG_INFO, "Max level: %f\n", p->max);
570 if (s->measure_perchannel & MEASURE_MIN_DIFFERENCE)570 if (s->measure_perchannel & MEASURE_MIN_DIFFERENCE)
571 av_log(ctx, AV_LOG_INFO, "Min difference: %f\n", p->min_diff);571 av_log(ctx, AV_LOG_INFO, "Min difference: %f\n", p->min_diff);
572 if (s->measure_perchannel & MEASURE_MAX_DIFFERENCE)572 if (s->measure_perchannel & MEASURE_MAX_DIFFERENCE)
573 av_log(ctx, AV_LOG_INFO, "Max difference: %f\n", p->max_diff);573 av_log(ctx, AV_LOG_INFO, "Max difference: %f\n", p->max_diff);
574 if (s->measure_perchannel & MEASURE_MEAN_DIFFERENCE)574 if (s->measure_perchannel & MEASURE_MEAN_DIFFERENCE)
575 av_log(ctx, AV_LOG_INFO, "Mean difference: %f\n", p->diff1_sum / (p->nb_samples - 1));575 av_log(ctx, AV_LOG_INFO, "Mean difference: %f\n", p->diff1_sum / (p->nb_samples - 1));
576 if (s->measure_perchannel & MEASURE_RMS_DIFFERENCE)576 if (s->measure_perchannel & MEASURE_RMS_DIFFERENCE)
577 av_log(ctx, AV_LOG_INFO, "RMS difference: %f\n", sqrt(p->diff1_sum_x2 / (p->nb_samples - 1)));577 av_log(ctx, AV_LOG_INFO, "RMS difference: %f\n", sqrt(p->diff1_sum_x2 / (p->nb_samples - 1)));
578 if (s->measure_perchannel & MEASURE_PEAK_LEVEL)578 if (s->measure_perchannel & MEASURE_PEAK_LEVEL)
579 av_log(ctx, AV_LOG_INFO, "Peak level dB: %f\n", LINEAR_TO_DB(FFMAX(-p->nmin, p->nmax)));579 av_log(ctx, AV_LOG_INFO, "Peak level dB: %f\n", LINEAR_TO_DB(FFMAX(-p->nmin, p->nmax)));
580 if (s->measure_perchannel & MEASURE_RMS_LEVEL)580 if (s->measure_perchannel & MEASURE_RMS_LEVEL)
581 av_log(ctx, AV_LOG_INFO, "RMS level dB: %f\n", LINEAR_TO_DB(sqrt(p->sigma_x2 / p->nb_samples)));581 av_log(ctx, AV_LOG_INFO, "RMS level dB: %f\n", LINEAR_TO_DB(sqrt(p->sigma_x2 / p->nb_samples)));
582 if (s->measure_perchannel & MEASURE_RMS_PEAK)582 if (s->measure_perchannel & MEASURE_RMS_PEAK)
583 av_log(ctx, AV_LOG_INFO, "RMS peak dB: %f\n", LINEAR_TO_DB(sqrt(p->max_sigma_x2)));583 av_log(ctx, AV_LOG_INFO, "RMS peak dB: %f\n", LINEAR_TO_DB(sqrt(p->max_sigma_x2)));
584 if (s->measure_perchannel & MEASURE_RMS_TROUGH)584 if (s->measure_perchannel & MEASURE_RMS_TROUGH)
585 if (p->min_sigma_x2 != 1)585 if (p->min_sigma_x2 != 1)
586 av_log(ctx, AV_LOG_INFO, "RMS trough dB: %f\n",LINEAR_TO_DB(sqrt(p->min_sigma_x2)));586 av_log(ctx, AV_LOG_INFO, "RMS trough dB: %f\n",LINEAR_TO_DB(sqrt(p->min_sigma_x2)));
587 if (s->measure_perchannel & MEASURE_CREST_FACTOR)587 if (s->measure_perchannel & MEASURE_CREST_FACTOR)
588 av_log(ctx, AV_LOG_INFO, "Crest factor: %f\n", p->sigma_x2 ? FFMAX(-p->nmin, p->nmax) / sqrt(p->sigma_x2 / p->nb_samples) : 1);588 av_log(ctx, AV_LOG_INFO, "Crest factor: %f\n", p->sigma_x2 ? FFMAX(-p->nmin, p->nmax) / sqrt(p->sigma_x2 / p->nb_samples) : 1);
589 if (s->measure_perchannel & MEASURE_FLAT_FACTOR)589 if (s->measure_perchannel & MEASURE_FLAT_FACTOR)
590 av_log(ctx, AV_LOG_INFO, "Flat factor: %f\n", LINEAR_TO_DB((p->min_runs + p->max_runs) / (p->min_count + p->max_count)));590 av_log(ctx, AV_LOG_INFO, "Flat factor: %f\n", LINEAR_TO_DB((p->min_runs + p->max_runs) / (p->min_count + p->max_count)));
591 if (s->measure_perchannel & MEASURE_PEAK_COUNT)591 if (s->measure_perchannel & MEASURE_PEAK_COUNT)
592 av_log(ctx, AV_LOG_INFO, "Peak count: %"PRId64"\n", p->min_count + p->max_count);592 av_log(ctx, AV_LOG_INFO, "Peak count: %"PRId64"\n", p->min_count + p->max_count);
593 if (s->measure_perchannel & MEASURE_BIT_DEPTH) {593 if (s->measure_perchannel & MEASURE_BIT_DEPTH) {
594 bit_depth(s, p->mask, p->imask, &depth);594 bit_depth(s, p->mask, p->imask, &depth);
595 av_log(ctx, AV_LOG_INFO, "Bit depth: %u/%u\n", depth.num, depth.den);595 av_log(ctx, AV_LOG_INFO, "Bit depth: %u/%u\n", depth.num, depth.den);
596 }596 }
597 if (s->measure_perchannel & MEASURE_DYNAMIC_RANGE)597 if (s->measure_perchannel & MEASURE_DYNAMIC_RANGE)
598 av_log(ctx, AV_LOG_INFO, "Dynamic range: %f\n", LINEAR_TO_DB(2 * FFMAX(FFABS(p->min), FFABS(p->max))/ p->min_non_zero));598 av_log(ctx, AV_LOG_INFO, "Dynamic range: %f\n", LINEAR_TO_DB(2 * FFMAX(FFABS(p->min), FFABS(p->max))/ p->min_non_zero));
599 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS)599 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS)
600 av_log(ctx, AV_LOG_INFO, "Zero crossings: %"PRId64"\n", p->zero_runs);600 av_log(ctx, AV_LOG_INFO, "Zero crossings: %"PRId64"\n", p->zero_runs);
601 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS_RATE)601 if (s->measure_perchannel & MEASURE_ZERO_CROSSINGS_RATE)
602 av_log(ctx, AV_LOG_INFO, "Zero crossings rate: %f\n", p->zero_runs/(double)p->nb_samples);602 av_log(ctx, AV_LOG_INFO, "Zero crossings rate: %f\n", p->zero_runs/(double)p->nb_samples);
603 }603 }
604 604
605 av_log(ctx, AV_LOG_INFO, "Overall\n");605 av_log(ctx, AV_LOG_INFO, "Overall\n");
606 if (s->measure_overall & MEASURE_DC_OFFSET)606 if (s->measure_overall & MEASURE_DC_OFFSET)
607 av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", max_sigma_x / (nb_samples / s->nb_channels));607 av_log(ctx, AV_LOG_INFO, "DC offset: %f\n", max_sigma_x / (nb_samples / s->nb_channels));
608 if (s->measure_overall & MEASURE_MIN_LEVEL)608 if (s->measure_overall & MEASURE_MIN_LEVEL)
609 av_log(ctx, AV_LOG_INFO, "Min level: %f\n", min);609 av_log(ctx, AV_LOG_INFO, "Min level: %f\n", min);
610 if (s->measure_overall & MEASURE_MAX_LEVEL)610 if (s->measure_overall & MEASURE_MAX_LEVEL)
611 av_log(ctx, AV_LOG_INFO, "Max level: %f\n", max);611 av_log(ctx, AV_LOG_INFO, "Max level: %f\n", max);
612 if (s->measure_overall & MEASURE_MIN_DIFFERENCE)612 if (s->measure_overall & MEASURE_MIN_DIFFERENCE)
613 av_log(ctx, AV_LOG_INFO, "Min difference: %f\n", min_diff);613 av_log(ctx, AV_LOG_INFO, "Min difference: %f\n", min_diff);
614 if (s->measure_overall & MEASURE_MAX_DIFFERENCE)614 if (s->measure_overall & MEASURE_MAX_DIFFERENCE)
615 av_log(ctx, AV_LOG_INFO, "Max difference: %f\n", max_diff);615 av_log(ctx, AV_LOG_INFO, "Max difference: %f\n", max_diff);
616 if (s->measure_overall & MEASURE_MEAN_DIFFERENCE)616 if (s->measure_overall & MEASURE_MEAN_DIFFERENCE)
617 av_log(ctx, AV_LOG_INFO, "Mean difference: %f\n", diff1_sum / (nb_samples - s->nb_channels));617 av_log(ctx, AV_LOG_INFO, "Mean difference: %f\n", diff1_sum / (nb_samples - s->nb_channels));
618 if (s->measure_overall & MEASURE_RMS_DIFFERENCE)618 if (s->measure_overall & MEASURE_RMS_DIFFERENCE)
619 av_log(ctx, AV_LOG_INFO, "RMS difference: %f\n", sqrt(diff1_sum_x2 / (nb_samples - s->nb_channels)));619 av_log(ctx, AV_LOG_INFO, "RMS difference: %f\n", sqrt(diff1_sum_x2 / (nb_samples - s->nb_channels)));
620 if (s->measure_overall & MEASURE_PEAK_LEVEL)620 if (s->measure_overall & MEASURE_PEAK_LEVEL)
621 av_log(ctx, AV_LOG_INFO, "Peak level dB: %f\n", LINEAR_TO_DB(FFMAX(-nmin, nmax)));621 av_log(ctx, AV_LOG_INFO, "Peak level dB: %f\n", LINEAR_TO_DB(FFMAX(-nmin, nmax)));
622 if (s->measure_overall & MEASURE_RMS_LEVEL)622 if (s->measure_overall & MEASURE_RMS_LEVEL)
623 av_log(ctx, AV_LOG_INFO, "RMS level dB: %f\n", LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));623 av_log(ctx, AV_LOG_INFO, "RMS level dB: %f\n", LINEAR_TO_DB(sqrt(sigma_x2 / nb_samples)));
624 if (s->measure_overall & MEASURE_RMS_PEAK)624 if (s->measure_overall & MEASURE_RMS_PEAK)
625 av_log(ctx, AV_LOG_INFO, "RMS peak dB: %f\n", LINEAR_TO_DB(sqrt(max_sigma_x2)));625 av_log(ctx, AV_LOG_INFO, "RMS peak dB: %f\n", LINEAR_TO_DB(sqrt(max_sigma_x2)));
626 if (s->measure_overall & MEASURE_RMS_TROUGH)626 if (s->measure_overall & MEASURE_RMS_TROUGH)
627 if (min_sigma_x2 != 1)627 if (min_sigma_x2 != 1)
628 av_log(ctx, AV_LOG_INFO, "RMS trough dB: %f\n", LINEAR_TO_DB(sqrt(min_sigma_x2)));628 av_log(ctx, AV_LOG_INFO, "RMS trough dB: %f\n", LINEAR_TO_DB(sqrt(min_sigma_x2)));
629 if (s->measure_overall & MEASURE_FLAT_FACTOR)629 if (s->measure_overall & MEASURE_FLAT_FACTOR)
630 av_log(ctx, AV_LOG_INFO, "Flat factor: %f\n", LINEAR_TO_DB((min_runs + max_runs) / (min_count + max_count)));630 av_log(ctx, AV_LOG_INFO, "Flat factor: %f\n", LINEAR_TO_DB((min_runs + max_runs) / (min_count + max_count)));
631 if (s->measure_overall & MEASURE_PEAK_COUNT)631 if (s->measure_overall & MEASURE_PEAK_COUNT)
632 av_log(ctx, AV_LOG_INFO, "Peak count: %f\n", (min_count + max_count) / (double)s->nb_channels);632 av_log(ctx, AV_LOG_INFO, "Peak count: %f\n", (min_count + max_count) / (double)s->nb_channels);
633 if (s->measure_overall & MEASURE_BIT_DEPTH) {633 if (s->measure_overall & MEASURE_BIT_DEPTH) {
634 bit_depth(s, mask, imask, &depth);634 bit_depth(s, mask, imask, &depth);
635 av_log(ctx, AV_LOG_INFO, "Bit depth: %u/%u\n", depth.num, depth.den);635 av_log(ctx, AV_LOG_INFO, "Bit depth: %u/%u\n", depth.num, depth.den);
636 }636 }
637 if (s->measure_overall & MEASURE_NUMBER_OF_SAMPLES)637 if (s->measure_overall & MEASURE_NUMBER_OF_SAMPLES)
638 av_log(ctx, AV_LOG_INFO, "Number of samples: %"PRId64"\n", nb_samples / s->nb_channels);638 av_log(ctx, AV_LOG_INFO, "Number of samples: %"PRId64"\n", nb_samples / s->nb_channels);
639}639}
640 640
641static av_cold void uninit(AVFilterContext *ctx)641static av_cold void uninit(AVFilterContext *ctx)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t