This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 9646228fd676ff59168dd546924705d2fb3f250c
Author:     James Almer <[email protected]>
AuthorDate: Thu Jun 4 14:44:15 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Sat Jul 11 19:32:17 2026 -0300

    swresample/rematrix: print custom downmix matrix coefficients
    
    Similar to how it's done to the matrix built in auto_matrix().
    
    Signed-off-by: James Almer <[email protected]>
---
 libswresample/rematrix.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c
index a4911a2922..6f4c16ee45 100644
--- a/libswresample/rematrix.c
+++ b/libswresample/rematrix.c
@@ -465,6 +465,20 @@ av_cold int swri_rematrix_init(SwrContext *s){
         int r = auto_matrix(s);
         if (r)
             return r;
+    } else {
+        char buf[128];
+        av_log(s, AV_LOG_DEBUG, "Custom matrix coefficients:\n");
+            double *matrix_param = (double*)s->matrix;
+            ptrdiff_t stride = s->matrix[1] - s->matrix[0];
+        for (i = 0; i < s->out_ch_layout.nb_channels; i++) {
+            av_channel_name(buf, sizeof(buf), 
av_channel_layout_channel_from_index(&s->out_ch_layout, i));
+            av_log(s, AV_LOG_DEBUG, "%s: ", buf);
+            for (j = 0; j < s->in_ch_layout.nb_channels; j++){
+                av_channel_name(buf, sizeof(buf), 
av_channel_layout_channel_from_index(&s->in_ch_layout, j));
+                av_log(s, AV_LOG_DEBUG, "%s:%f ", buf, matrix_param[stride*i + 
j]);
+            }
+            av_log(s, AV_LOG_DEBUG, "\n");
+        }
     }
     if (s->midbuf.fmt == AV_SAMPLE_FMT_S16P){
         int maxsum = 0;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to