[Bug 785471] [API]: gst_audio_channel_mixer_new_with_matrix
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Sep 22 14:22:41 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=785471
--- Comment #34 from Mathieu Duponchelle <mduponchelle1 at gmail.com> ---
Review of attachment 360187:
--> (https://bugzilla.gnome.org/review?bug=785471&attachment=360187)
Updated the patch, along with the requested changes I've also removed
mixer->flags and mixer->format, they're not needed anymore.
::: gst-libs/gst/audio/audio-channel-mixer.c
@@ +124,3 @@
+ * an identity matrix */
+ if (flags & GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_IN) {
+ matrix[ci][co] = ci == co ? 1.0 : 0.0;
This is related to determining passthrough, and lets us avoid storing positions
in the mixer structure.
The passthrough calculations were wrong before, as explained in the commit
message, as they didn't check the actual matrix, but rather the positions, this
commit fixes it, and in order not to special case anything this is needed :)
@@ +446,3 @@
RATIO_FRONT_SIDE);
} else if (!in_has_front && in_has_center && in_has_side && out_has_front) {
+ gst_audio_channel_mixer_fill_one_other (matrix, in_c, out_f,
Hm it's quite tricky to disentangle this, if by could you mean "should" I'll do
it :)
@@ +840,3 @@
+ mix->matrix[i] = g_new (gfloat, out_channels);
+ for (j = 0; j < out_channels; j++) {
+ mix->matrix[i][j] = i == j ? 1.0 : 0.0;
Yes, that's not related to what we did before, it's to handle your previous
requirement of "identity if NULL" :)
@@ +965,3 @@
+ for (j = 0; j < mix->out_channels; j++) {
+ if ((i == j && mix->matrix[i][j] != 1.0f) ||
+ (i != j && mix->matrix[i][j] != 0.0f)) {
It's documented directly in the API comment :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list