Commit 5347b9da authored by Michael Niedermayer's avatar Michael Niedermayer

swr-test: print channel layout, instead of just channel counts

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e6c460e3
......@@ -181,6 +181,8 @@ int main(int argc, char **argv){
qsort(remaining_tests + max_tests - num_tests, num_tests, sizeof(remaining_tests[0]), cmp);
in_sample_rate=16000;
for(test=0; test<num_tests; test++){
char in_layout_string[256];
char out_layout_string[256];
unsigned vector= remaining_tests[max_tests - test - 1];
in_ch_layout = layouts[vector % FF_ARRAY_ELEMS(layouts)]; vector /= FF_ARRAY_ELEMS(layouts);
......@@ -194,8 +196,10 @@ int main(int argc, char **argv){
in_ch_count= av_get_channel_layout_nb_channels(in_ch_layout);
int out_count, mid_count, out_ch_count;
out_ch_count= av_get_channel_layout_nb_channels(out_ch_layout);
fprintf(stderr, "ch %d->%d, rate:%5d->%5d, fmt:%s->%s\n",
in_ch_count, out_ch_count,
av_get_channel_layout_string( in_layout_string, sizeof( in_layout_string), in_ch_count, in_ch_layout);
av_get_channel_layout_string(out_layout_string, sizeof(out_layout_string), out_ch_count, out_ch_layout);
fprintf(stderr, "TEST: %s->%s, rate:%5d->%5d, fmt:%s->%s\n",
in_layout_string, out_layout_string,
in_sample_rate, out_sample_rate,
av_get_sample_fmt_name(in_sample_fmt), av_get_sample_fmt_name(out_sample_fmt));
forw_ctx = swr_alloc_set_opts(forw_ctx, out_ch_layout, av_get_alt_sample_fmt(out_sample_fmt, 1), out_sample_rate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment