Modify the downmix mapping so that we include Ls, Rs and Lfe (#1281). v2.13.29
authorCarl Hetherington <cth@carlh.net>
Sat, 9 Jun 2018 23:31:35 +0000 (00:31 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 9 Jun 2018 23:31:35 +0000 (00:31 +0100)
ChangeLog
src/wx/film_viewer.cc

index 7f4c185f21cf40443acfde09a4a6d8096b83e24e..ad96a4aad583caaaf4e014ce7e772d3dce832b06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-06-10  Carl Hetherington  <cth@carlh.net>
+
+       * Include Ls/Rs and Lfe in 5.1-to-stereo downmix in the player.
+
 2018-06-09  Carl Hetherington  <cth@carlh.net>
 
        * Fix bad parsing of ASS lines embedded into FFmpeg files
index 2c0712e92bfb282a16fc34921b5f5c004d7103cf..a7e040bb5c51335d64b1239e327e7d6f4b7a45fd 100644 (file)
@@ -251,13 +251,18 @@ FilmViewer::recreate_butler ()
                        map.set (i, i, 1);
                }
        } else {
-               /* Special case: stereo output, at least 3 channel input, map L+R to L/R and
-                  C to both, all 3dB down.
+               /* Special case: stereo output, at least 3 channel input.
+                  Map so that Lt = L(-3dB) + Ls(-3dB) + C(-6dB) + Lfe(-10dB)
+                              Rt = R(-3dB) + Rs(-3dB) + C(-6dB) + Lfe(-10dB)
                */
-               map.set (0, 0, 1 / sqrt(2)); // L -> L
-               map.set (1, 1, 1 / sqrt(2)); // R -> R
-               map.set (2, 0, 1 / sqrt(2)); // C -> L
-               map.set (2, 1, 1 / sqrt(2)); // C -> R
+               map.set (dcp::LEFT,   0, 1 / sqrt(2)); // L -> Lt
+               map.set (dcp::RIGHT,  1, 1 / sqrt(2)); // R -> Rt
+               map.set (dcp::CENTRE, 0, 1 / 2.0); // C -> Lt
+               map.set (dcp::CENTRE, 1, 1 / 2.0); // C -> Rt
+               map.set (dcp::LFE,    0, 1 / sqrt(10)); // Lfe -> Lt
+               map.set (dcp::LFE,    1, 1 / sqrt(10)); // Lfe -> Rt
+               map.set (dcp::LS,     0, 1 / sqrt(2)); // Ls -> Lt
+               map.set (dcp::RS,     1, 1 / sqrt(2)); // Rs -> Rt
        }
 
        _butler.reset (new Butler (_player, _film->log(), map, _audio_channels));