• Home
  • Raw
  • Download

Lines Matching refs:equ

40 #define BANDS_LOCK(equ) g_mutex_lock(&equ->bands_lock)  argument
41 #define BANDS_UNLOCK(equ) g_mutex_unlock(&equ->bands_lock) argument
52 static void set_passthrough (GstIirEqualizer * equ);
150 GstIirEqualizer *equ = in gst_iir_equalizer_band_set_property() local
160 BANDS_LOCK (equ); in gst_iir_equalizer_band_set_property()
161 equ->need_new_coefficients = TRUE; in gst_iir_equalizer_band_set_property()
163 set_passthrough (equ); in gst_iir_equalizer_band_set_property()
164 BANDS_UNLOCK (equ); in gst_iir_equalizer_band_set_property()
175 BANDS_LOCK (equ); in gst_iir_equalizer_band_set_property()
176 equ->need_new_coefficients = TRUE; in gst_iir_equalizer_band_set_property()
178 BANDS_UNLOCK (equ); in gst_iir_equalizer_band_set_property()
189 BANDS_LOCK (equ); in gst_iir_equalizer_band_set_property()
190 equ->need_new_coefficients = TRUE; in gst_iir_equalizer_band_set_property()
192 BANDS_UNLOCK (equ); in gst_iir_equalizer_band_set_property()
203 BANDS_LOCK (equ); in gst_iir_equalizer_band_set_property()
204 equ->need_new_coefficients = TRUE; in gst_iir_equalizer_band_set_property()
206 BANDS_UNLOCK (equ); in gst_iir_equalizer_band_set_property()
216 gst_object_unref (equ); in gst_iir_equalizer_band_set_property()
319 GstIirEqualizer *equ = GST_IIR_EQUALIZER (child_proxy); in gst_iir_equalizer_child_proxy_get_child_by_index() local
322 BANDS_LOCK (equ); in gst_iir_equalizer_child_proxy_get_child_by_index()
323 if (G_UNLIKELY (index >= equ->freq_band_count)) { in gst_iir_equalizer_child_proxy_get_child_by_index()
324 BANDS_UNLOCK (equ); in gst_iir_equalizer_child_proxy_get_child_by_index()
325 g_return_val_if_fail (index < equ->freq_band_count, NULL); in gst_iir_equalizer_child_proxy_get_child_by_index()
328 ret = g_object_ref (G_OBJECT (equ->bands[index])); in gst_iir_equalizer_child_proxy_get_child_by_index()
329 BANDS_UNLOCK (equ); in gst_iir_equalizer_child_proxy_get_child_by_index()
331 GST_LOG_OBJECT (equ, "return child[%d] %" GST_PTR_FORMAT, index, ret); in gst_iir_equalizer_child_proxy_get_child_by_index()
338 GstIirEqualizer *equ = GST_IIR_EQUALIZER (child_proxy); in gst_iir_equalizer_child_proxy_get_children_count() local
340 GST_LOG ("we have %d children", equ->freq_band_count); in gst_iir_equalizer_child_proxy_get_children_count()
341 return equ->freq_band_count; in gst_iir_equalizer_child_proxy_get_children_count()
387 GstIirEqualizer *equ = GST_IIR_EQUALIZER (object); in gst_iir_equalizer_finalize() local
390 for (i = 0; i < equ->freq_band_count; i++) { in gst_iir_equalizer_finalize()
391 if (equ->bands[i]) in gst_iir_equalizer_finalize()
392 gst_object_unparent (GST_OBJECT (equ->bands[i])); in gst_iir_equalizer_finalize()
393 equ->bands[i] = NULL; in gst_iir_equalizer_finalize()
395 equ->freq_band_count = 0; in gst_iir_equalizer_finalize()
397 g_free (equ->bands); in gst_iir_equalizer_finalize()
398 g_free (equ->history); in gst_iir_equalizer_finalize()
400 g_mutex_clear (&equ->bands_lock); in gst_iir_equalizer_finalize()
469 setup_peak_filter (GstIirEqualizer * equ, GstIirEqualizerBand * band) in setup_peak_filter() argument
471 gint rate = GST_AUDIO_FILTER_RATE (equ); in setup_peak_filter()
507 setup_low_shelf_filter (GstIirEqualizer * equ, GstIirEqualizerBand * band) in setup_low_shelf_filter() argument
509 gint rate = GST_AUDIO_FILTER_RATE (equ); in setup_low_shelf_filter()
547 setup_high_shelf_filter (GstIirEqualizer * equ, GstIirEqualizerBand * band) in setup_high_shelf_filter() argument
549 gint rate = GST_AUDIO_FILTER_RATE (equ); in setup_high_shelf_filter()
588 set_passthrough (GstIirEqualizer * equ) in set_passthrough() argument
593 for (i = 0; i < equ->freq_band_count; i++) { in set_passthrough()
594 passthrough = passthrough && (equ->bands[i]->gain == 0.0); in set_passthrough()
597 gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (equ), passthrough); in set_passthrough()
603 update_coefficients (GstIirEqualizer * equ) in update_coefficients() argument
605 gint i, n = equ->freq_band_count; in update_coefficients()
608 if (equ->bands[i]->type == BAND_TYPE_PEAK) in update_coefficients()
609 setup_peak_filter (equ, equ->bands[i]); in update_coefficients()
610 else if (equ->bands[i]->type == BAND_TYPE_LOW_SHELF) in update_coefficients()
611 setup_low_shelf_filter (equ, equ->bands[i]); in update_coefficients()
613 setup_high_shelf_filter (equ, equ->bands[i]); in update_coefficients()
616 equ->need_new_coefficients = FALSE; in update_coefficients()
621 alloc_history (GstIirEqualizer * equ, const GstAudioInfo * info) in alloc_history() argument
624 g_free (equ->history); in alloc_history()
625 equ->history = in alloc_history()
626 g_malloc0 (equ->history_size * GST_AUDIO_INFO_CHANNELS (info) * in alloc_history()
627 equ->freq_band_count); in alloc_history()
631 gst_iir_equalizer_compute_frequencies (GstIirEqualizer * equ, guint new_count) in gst_iir_equalizer_compute_frequencies() argument
637 if (equ->freq_band_count == new_count) in gst_iir_equalizer_compute_frequencies()
640 BANDS_LOCK (equ); in gst_iir_equalizer_compute_frequencies()
642 if (G_UNLIKELY (equ->freq_band_count == new_count)) { in gst_iir_equalizer_compute_frequencies()
643 BANDS_UNLOCK (equ); in gst_iir_equalizer_compute_frequencies()
647 old_count = equ->freq_band_count; in gst_iir_equalizer_compute_frequencies()
648 equ->freq_band_count = new_count; in gst_iir_equalizer_compute_frequencies()
653 equ->bands = g_realloc (equ->bands, sizeof (GstObject *) * new_count); in gst_iir_equalizer_compute_frequencies()
657 equ->bands[i] = g_object_new (GST_TYPE_IIR_EQUALIZER_BAND, in gst_iir_equalizer_compute_frequencies()
659 GST_DEBUG ("adding band[%d]=%p", i, equ->bands[i]); in gst_iir_equalizer_compute_frequencies()
661 gst_object_set_parent (GST_OBJECT (equ->bands[i]), GST_OBJECT (equ)); in gst_iir_equalizer_compute_frequencies()
662 gst_child_proxy_child_added (GST_CHILD_PROXY (equ), in gst_iir_equalizer_compute_frequencies()
663 G_OBJECT (equ->bands[i]), name); in gst_iir_equalizer_compute_frequencies()
668 GST_DEBUG ("removing band[%d]=%p", i, equ->bands[i]); in gst_iir_equalizer_compute_frequencies()
669 gst_child_proxy_child_removed (GST_CHILD_PROXY (equ), in gst_iir_equalizer_compute_frequencies()
670 G_OBJECT (equ->bands[i]), GST_OBJECT_NAME (equ->bands[i])); in gst_iir_equalizer_compute_frequencies()
671 gst_object_unparent (GST_OBJECT (equ->bands[i])); in gst_iir_equalizer_compute_frequencies()
672 equ->bands[i] = NULL; in gst_iir_equalizer_compute_frequencies()
676 alloc_history (equ, GST_AUDIO_FILTER_INFO (equ)); in gst_iir_equalizer_compute_frequencies()
689 equ->bands[i]->type = BAND_TYPE_LOW_SHELF; in gst_iir_equalizer_compute_frequencies()
691 equ->bands[i]->type = BAND_TYPE_HIGH_SHELF; in gst_iir_equalizer_compute_frequencies()
693 equ->bands[i]->type = BAND_TYPE_PEAK; in gst_iir_equalizer_compute_frequencies()
695 equ->bands[i]->freq = freq0 + ((freq1 - freq0) / 2.0); in gst_iir_equalizer_compute_frequencies()
696 equ->bands[i]->width = freq1 - freq0; in gst_iir_equalizer_compute_frequencies()
697 GST_DEBUG ("band[%2d] = '%lf'", i, equ->bands[i]->freq); in gst_iir_equalizer_compute_frequencies()
699 g_object_notify (G_OBJECT (equ->bands[i]), "bandwidth"); in gst_iir_equalizer_compute_frequencies()
700 g_object_notify (G_OBJECT (equ->bands[i]), "freq"); in gst_iir_equalizer_compute_frequencies()
701 g_object_notify (G_OBJECT (equ->bands[i]), "type"); in gst_iir_equalizer_compute_frequencies()
714 equ->need_new_coefficients = TRUE; in gst_iir_equalizer_compute_frequencies()
715 BANDS_UNLOCK (equ); in gst_iir_equalizer_compute_frequencies()
747 gst_iir_equ_process_ ## TYPE (GstIirEqualizer *equ, guint8 *data, \
751 guint i, c, f, nf = equ->freq_band_count; \
753 GstIirEqualizerBand **filters = equ->bands; \
756 SecondOrderHistory ## TYPE *history = equ->history; \
797 gst_iir_equ_process_ ## TYPE (GstIirEqualizer *equ, guint8 *data, \
801 guint i, c, f, nf = equ->freq_band_count; \
803 GstIirEqualizerBand **filters = equ->bands; \
806 SecondOrderHistory ## TYPE *history = equ->history; \
827 GstIirEqualizer *equ = GST_IIR_EQUALIZER (btrans); in gst_iir_equalizer_transform_ip() local
833 if (G_UNLIKELY (channels < 1 || equ->process == NULL)) in gst_iir_equalizer_transform_ip()
836 BANDS_LOCK (equ); in gst_iir_equalizer_transform_ip()
837 need_new_coefficients = equ->need_new_coefficients; in gst_iir_equalizer_transform_ip()
838 BANDS_UNLOCK (equ); in gst_iir_equalizer_transform_ip()
845 GstIirEqualizerBand **filters = equ->bands; in gst_iir_equalizer_transform_ip()
846 guint f, nf = equ->freq_band_count; in gst_iir_equalizer_transform_ip()
848 gst_object_sync_values (GST_OBJECT (equ), timestamp); in gst_iir_equalizer_transform_ip()
857 BANDS_LOCK (equ); in gst_iir_equalizer_transform_ip()
859 update_coefficients (equ); in gst_iir_equalizer_transform_ip()
861 BANDS_UNLOCK (equ); in gst_iir_equalizer_transform_ip()
864 equ->process (equ, map.data, map.size, channels); in gst_iir_equalizer_transform_ip()
873 GstIirEqualizer *equ = GST_IIR_EQUALIZER (audio); in gst_iir_equalizer_setup() local
877 equ->history_size = history_size_gint16; in gst_iir_equalizer_setup()
878 equ->process = gst_iir_equ_process_gint16; in gst_iir_equalizer_setup()
881 equ->history_size = history_size_gfloat; in gst_iir_equalizer_setup()
882 equ->process = gst_iir_equ_process_gfloat; in gst_iir_equalizer_setup()
885 equ->history_size = history_size_gdouble; in gst_iir_equalizer_setup()
886 equ->process = gst_iir_equ_process_gdouble; in gst_iir_equalizer_setup()
892 alloc_history (equ, info); in gst_iir_equalizer_setup()