gst/audioconvert/gstaudioquantize.c: Fix C89 incompatibilities and spelling of explanations. Fixes #463215.

Original commit message from CVS:
Patch by: Jens Granseuer <jensgr at gmx dot net>
* gst/audioconvert/gstaudioquantize.c:
Fix C89 incompatibilities and spelling of explanations. Fixes #463215.
This commit is contained in:
Jens Granseuer 2007-08-03 19:40:14 +00:00 committed by Sebastian Dröge
parent 607fa48ad8
commit ef33f2fdc4
2 changed files with 17 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2007-08-03 Sebastian Dröge <slomo@circular-chaos.org>
Patch by: Jens Granseuer <jensgr at gmx dot net>
* gst/audioconvert/gstaudioquantize.c:
Fix C89 incompatibilities and spelling of explanations. Fixes #463215.
2007-08-03 Wim Taymans <wim.taymans@gmail.com> 2007-08-03 Wim Taymans <wim.taymans@gmail.com>
* gst-libs/gst/rtsp/gstrtsptransport.c: (gst_rtsp_transport_parse): * gst-libs/gst/rtsp/gstrtsptransport.c: (gst_rtsp_transport_parse):

View file

@ -56,13 +56,13 @@ MAKE_QUANTIZE_FUNC_NAME (name) (AudioConvertCtx *ctx, gint32 *src, \
gint32 tmp; \ gint32 tmp; \
guint32 mask = 0xffffffff & (0xffffffff << scale); \ guint32 mask = 0xffffffff & (0xffffffff << scale); \
guint32 bias = 1U << (scale - 1); \ guint32 bias = 1U << (scale - 1); \
DITHER_INIT_FUNC(); \ DITHER_INIT_FUNC() \
\ \
for (;count;count--) { \ for (;count;count--) { \
for (chan_pos = 0; chan_pos < channels; chan_pos++) { \ for (chan_pos = 0; chan_pos < channels; chan_pos++) { \
tmp = *src++; \ tmp = *src++; \
ADD_DITHER_FUNC(); \ ADD_DITHER_FUNC() \
ROUND_FUNC(); \ ROUND_FUNC() \
*dst = tmp & mask; \ *dst = tmp & mask; \
dst++; \ dst++; \
} \ } \
@ -95,17 +95,17 @@ MAKE_QUANTIZE_FUNC_NAME (name) (AudioConvertCtx *ctx, gdouble *src, \
\ \
if (scale > 0) { \ if (scale > 0) { \
gdouble tmp; \ gdouble tmp; \
DITHER_INIT_FUNC(); \ DITHER_INIT_FUNC() \
NS_INIT_FUNC(); \ NS_INIT_FUNC() \
\ \
for (;count;count--) { \ for (;count;count--) { \
for (chan_pos = 0; chan_pos < channels; chan_pos++) { \ for (chan_pos = 0; chan_pos < channels; chan_pos++) { \
tmp = *src++; \ tmp = *src++; \
ADD_NS_FUNC(); \ ADD_NS_FUNC() \
ADD_DITHER_FUNC(); \ ADD_DITHER_FUNC() \
tmp = floor(tmp * factor + 0.5); \ tmp = floor(tmp * factor + 0.5); \
*dst = CLAMP (tmp, -factor - 1, factor); \ *dst = CLAMP (tmp, -factor - 1, factor); \
UPDATE_ERROR_FUNC(); \ UPDATE_ERROR_FUNC() \
dst++; \ dst++; \
} \ } \
} \ } \
@ -220,7 +220,7 @@ MAKE_QUANTIZE_FUNC_NAME (name) (AudioConvertCtx *ctx, gdouble *src, \
tmp += rand; tmp += rand;
/* Noise shaping definitions. /* Noise shaping definitions.
* See http://en.wikipedia.org/wiki/Noise_shaping for explainations. */ * See http://en.wikipedia.org/wiki/Noise_shaping for explanations. */
/* Simple error feedback: Just accumulate the dithering and quantization /* Simple error feedback: Just accumulate the dithering and quantization
@ -388,7 +388,7 @@ static AudioConvertQuantize quantize_funcs[] = {
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_error_feedback), (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_error_feedback),
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_simple), (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_simple),
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_medium), (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_medium),
(AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_high), (AudioConvertQuantize) MAKE_QUANTIZE_FUNC_NAME (float_tpdf_hf_high)
}; };
static void static void