From 7faa80ace82f89036f6bb46e9539cc4a0cdce25c Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 30 Jun 2015 22:39:57 +0200 Subject: af_lavrresample: log actual channel layout conversions With all the reordering etc. that can go on in this filter, it's useful to see what upmix/downmix it's actually performing. --- audio/filter/af_lavrresample.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'audio') diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c index 38fd84c901..a103c46dd9 100644 --- a/audio/filter/af_lavrresample.c +++ b/audio/filter/af_lavrresample.c @@ -270,8 +270,13 @@ static int configure_lavrr(struct af_instance *af, struct mp_audio *in, uint64_t in_ch_layout = mp_chmap_to_lavc_unchecked(&map_in); uint64_t out_ch_layout = mp_chmap_to_lavc_unchecked(&map_out); - struct mp_chmap in_lavc; + struct mp_chmap in_lavc, out_lavc; mp_chmap_from_lavc(&in_lavc, in_ch_layout); + mp_chmap_from_lavc(&out_lavc, out_ch_layout); + + MP_VERBOSE(af, "Remix: %s -> %s\n", mp_chmap_to_str(&in_lavc), + mp_chmap_to_str(&out_lavc)); + if (in_lavc.num != map_in.num) { // For handling NA channels, we would have to add a planarization step. MP_FATAL(af, "Unsupported channel remapping.\n"); @@ -281,8 +286,6 @@ static int configure_lavrr(struct af_instance *af, struct mp_audio *in, mp_chmap_get_reorder(s->reorder_in, &map_in, &in_lavc); transpose_order(s->reorder_in, map_in.num); - struct mp_chmap out_lavc; - mp_chmap_from_lavc(&out_lavc, out_ch_layout); if (mp_chmap_equals(&out_lavc, &map_out)) { // No intermediate step required - output new format directly. out_samplefmtp = out_samplefmt; -- cgit v1.2.3