GstAudioQuantize

GstAudioQuantize

Synopsis

#include <gst/audio/audio.h>

                    GstAudioQuantize;
enum                GstAudioQuantizeFlags;
enum                GstAudioDitherMethod;
enum                GstAudioNoiseShapingMethod;
void                gst_audio_quantize_free             (GstAudioQuantize *quant);
GstAudioQuantize *  gst_audio_quantize_new              (GstAudioDitherMethod dither,
                                                         GstAudioNoiseShapingMethod ns,
                                                         GstAudioQuantizeFlags flags,
                                                         GstAudioFormat format,
                                                         guint channels,
                                                         guint quantizer);
void                gst_audio_quantize_samples          (GstAudioQuantize *quant,
                                                         const gpointer in[],
                                                         gpointer out[],
                                                         guint samples);

Description

Details

GstAudioQuantize

typedef struct _GstAudioQuantize GstAudioQuantize;

enum GstAudioQuantizeFlags

typedef enum {
  GST_AUDIO_QUANTIZE_FLAG_NONE            = 0,
  GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED = (1 << 0)
} GstAudioQuantizeFlags;

Extra flags that can be passed to gst_audio_quantize_new()

GST_AUDIO_QUANTIZE_FLAG_NONE

no flags

GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED

samples are non-interleaved

enum GstAudioDitherMethod

typedef enum {
  GST_AUDIO_DITHER_NONE = 0,
  GST_AUDIO_DITHER_RPDF,
  GST_AUDIO_DITHER_TPDF,
  GST_AUDIO_DITHER_TPDF_HF
} GstAudioDitherMethod;

Set of available dithering methods.

GST_AUDIO_DITHER_NONE

No dithering

GST_AUDIO_DITHER_RPDF

Rectangular dithering

GST_AUDIO_DITHER_TPDF

Triangular dithering (default)

GST_AUDIO_DITHER_TPDF_HF

High frequency triangular dithering

enum GstAudioNoiseShapingMethod

typedef enum {
  GST_AUDIO_NOISE_SHAPING_NONE = 0,
  GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK,
  GST_AUDIO_NOISE_SHAPING_SIMPLE,
  GST_AUDIO_NOISE_SHAPING_MEDIUM,
  GST_AUDIO_NOISE_SHAPING_HIGH
} GstAudioNoiseShapingMethod;

Set of available noise shaping methods

GST_AUDIO_NOISE_SHAPING_NONE

No noise shaping (default)

GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK

Error feedback

GST_AUDIO_NOISE_SHAPING_SIMPLE

Simple 2-pole noise shaping

GST_AUDIO_NOISE_SHAPING_MEDIUM

Medium 5-pole noise shaping

GST_AUDIO_NOISE_SHAPING_HIGH

High 8-pole noise shaping

gst_audio_quantize_free ()

void                gst_audio_quantize_free             (GstAudioQuantize *quant);

Free a GstAudioQuantize.

quant :

a GstAudioQuantize

gst_audio_quantize_new ()

GstAudioQuantize *  gst_audio_quantize_new              (GstAudioDitherMethod dither,
                                                         GstAudioNoiseShapingMethod ns,
                                                         GstAudioQuantizeFlags flags,
                                                         GstAudioFormat format,
                                                         guint channels,
                                                         guint quantizer);

gst_audio_quantize_samples ()

void                gst_audio_quantize_samples          (GstAudioQuantize *quant,
                                                         const gpointer in[],
                                                         gpointer out[],
                                                         guint samples);

Perform quantization on samples in in and write the result to out.

In case the samples are interleaved, in and out must point to an array with a single element pointing to a block of interleaved samples.

If non-interleaved samples are used, in and out must point to an array with pointers to memory blocks, one for each channel.

in and out may point to the same memory location, in which case samples will be modified in-place.

quant :

a GstAudioQuantize

in :

input samples

out :

output samples

samples :

number of samples