[asterisk-commits] qwell: branch qwell/codec_consistency_fix r147102 - /team/qwell/codec_consist...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 7 10:20:30 CDT 2008


Author: qwell
Date: Tue Oct  7 10:20:30 2008
New Revision: 147102

URL: http://svn.digium.com/view/asterisk?view=rev&rev=147102
Log:
Part 1 of cleanup.  More to come. (doesn't compile)

Removed:
    team/qwell/codec_consistency_fix/codecs/adpcm_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/g722_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/g726_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/gsm_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/ilbc_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/lpc10_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_adpcm_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_g722_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_g726_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_gsm_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_ilbc_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_lpc10_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_resample_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_speex_ex.h
    team/qwell/codec_consistency_fix/codecs/slin_ulaw_ex.h
    team/qwell/codec_consistency_fix/codecs/speex_slin_ex.h
    team/qwell/codec_consistency_fix/codecs/ulaw_slin_ex.h
Modified:
    team/qwell/codec_consistency_fix/codecs/codec_a_mu.c
    team/qwell/codec_consistency_fix/codecs/codec_adpcm.c
    team/qwell/codec_consistency_fix/codecs/codec_alaw.c
    team/qwell/codec_consistency_fix/codecs/codec_g722.c
    team/qwell/codec_consistency_fix/codecs/codec_g726.c
    team/qwell/codec_consistency_fix/codecs/codec_gsm.c
    team/qwell/codec_consistency_fix/codecs/codec_ilbc.c
    team/qwell/codec_consistency_fix/codecs/codec_lpc10.c
    team/qwell/codec_consistency_fix/codecs/codec_resample.c
    team/qwell/codec_consistency_fix/codecs/codec_speex.c
    team/qwell/codec_consistency_fix/codecs/codec_ulaw.c

Modified: team/qwell/codec_consistency_fix/codecs/codec_a_mu.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_a_mu.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_a_mu.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_a_mu.c Tue Oct  7 10:20:30 2008
@@ -40,7 +40,8 @@
 
 /* Sample frame data (Mu data is okay) */
 
-#include "ulaw_slin_ex.h"
+#include "ulaw_ex.h"
+#include "alaw_ex.h"
 
 /*! \brief convert frame data and store into the buffer */
 static int alawtoulaw_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
@@ -75,33 +76,33 @@
 }
 
 /*
- * alawToLin_Sample. Just random data, somehow...
+ * alaw_sample.
  */
-static struct ast_frame *alawtoulaw_sample(void)
+static struct ast_frame *alaw_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ALAW;
-	f.datalen = sizeof(ulaw_slin_ex);
-	f.samples = sizeof(ulaw_slin_ex);
+	f.datalen = sizeof(alaw_ex);
+	f.samples = sizeof(alaw_ex);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ulaw_slin_ex; /* XXX what ? */
+	f.data.ptr = alaw_ex; /* XXX what ? */
 	return &f;
 }
 
-static struct ast_frame *ulawtoalaw_sample(void)
+static struct ast_frame *ulaw_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ULAW;
-	f.datalen = sizeof(ulaw_slin_ex);
-	f.samples = sizeof(ulaw_slin_ex);
+	f.datalen = sizeof(ulaw_ex);
+	f.samples = sizeof(ulaw_ex);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ulaw_slin_ex;
+	f.data.ptr = ulaw_ex;
 	return &f;
 }
 
@@ -110,7 +111,7 @@
 	.srcfmt = AST_FORMAT_ALAW,
 	.dstfmt = AST_FORMAT_ULAW,
 	.framein = alawtoulaw_framein,
-	.sample = alawtoulaw_sample,
+	.sample = alaw_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES,
 };
@@ -120,7 +121,7 @@
 	.srcfmt = AST_FORMAT_ULAW,
 	.dstfmt = AST_FORMAT_ALAW,
 	.framein = ulawtoalaw_framein,
-	.sample = ulawtoalaw_sample,
+	.sample = ulaw_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES,
 };

Modified: team/qwell/codec_consistency_fix/codecs/codec_adpcm.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_adpcm.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_adpcm.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_adpcm.c Tue Oct  7 10:20:30 2008
@@ -45,8 +45,8 @@
 
 /* Sample frame data */
 
-#include "slin_adpcm_ex.h"
-#include "adpcm_slin_ex.h"
+#include "slin_ex.h"
+#include "adpcm_ex.h"
 
 /*
  * Step size index shift table 
@@ -285,34 +285,34 @@
 }
 
 
-/*! \brief AdpcmToLin_Sample */
-static struct ast_frame *adpcmtolin_sample(void)
+/*! \brief adpcm_sample */
+static struct ast_frame *adpcm_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ADPCM;
-	f.datalen = sizeof(adpcm_slin_ex);
-	f.samples = sizeof(adpcm_slin_ex) * 2;
+	f.datalen = sizeof(adpcm_ex);
+	f.samples = sizeof(adpcm_ex) * 2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = adpcm_slin_ex;
+	f.data.ptr = adpcm_ex;
 	return &f;
 }
 
-/*! \brief LinToAdpcm_Sample */
-static struct ast_frame *lintoadpcm_sample(void)
+/*! \brief lin_sample */
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_adpcm_ex);
+	f.datalen = sizeof(slin8_ex);
 	/* Assume 8000 Hz */
-	f.samples = sizeof(slin_adpcm_ex) / 2;
+	f.samples = sizeof(slin8_ex) / 2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_adpcm_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
@@ -321,7 +321,7 @@
 	.srcfmt = AST_FORMAT_ADPCM,
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.framein = adpcmtolin_framein,
-	.sample = adpcmtolin_sample,
+	.sample = adpcm_sample,
 	.desc_size = sizeof(struct adpcm_decoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
@@ -334,7 +334,7 @@
 	.dstfmt = AST_FORMAT_ADPCM,
 	.framein = lintoadpcm_framein,
 	.frameout = lintoadpcm_frameout,
-	.sample = lintoadpcm_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof (struct adpcm_encoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES/ 2,	/* 2 samples per byte */

Modified: team/qwell/codec_consistency_fix/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_alaw.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_alaw.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_alaw.c Tue Oct  7 10:20:30 2008
@@ -37,8 +37,8 @@
 
 /* Sample frame data (Mu data is okay) */
 
-#include "slin_ulaw_ex.h"
-#include "ulaw_slin_ex.h"
+#include "slin_ex.h"
+#include "alaw_ex.h"
 
 /*! \brief decode frame into lin and fill output buffer. */
 static int alawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
@@ -72,33 +72,33 @@
 	return 0;
 }
 
-/*! \brief alawToLin_Sample */
-static struct ast_frame *alawtolin_sample(void)
+/*! \brief alaw_sample */
+static struct ast_frame *alaw_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ALAW;
-	f.datalen = sizeof(ulaw_slin_ex);
-	f.samples = sizeof(ulaw_slin_ex);
+	f.datalen = sizeof(alaw_ex);
+	f.samples = sizeof(alaw_ex);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ulaw_slin_ex;
+	f.data.ptr = alaw_ex;
 	return &f;
 }
 
-/*! \brief LinToalaw_Sample */
-static struct ast_frame *lintoalaw_sample(void)
+/*! \brief lin_sample */
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_ulaw_ex);
-	f.samples = sizeof(slin_ulaw_ex) / 2;
+	f.datalen = sizeof(slin8_ex);
+	f.samples = sizeof(slin8_ex) / 2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_ulaw_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
@@ -107,7 +107,7 @@
 	.srcfmt = AST_FORMAT_ALAW,
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.framein = alawtolin_framein,
-	.sample = alawtolin_sample,
+	.sample = alaw_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
 	.plc_samples = 160,
@@ -118,7 +118,7 @@
 	.srcfmt = AST_FORMAT_SLINEAR,
 	.dstfmt = AST_FORMAT_ALAW,
 	.framein = lintoalaw_framein,
-	.sample = lintoalaw_sample,
+	.sample = lin_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES,
 };

Modified: team/qwell/codec_consistency_fix/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_g722.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_g722.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_g722.c Tue Oct  7 10:20:30 2008
@@ -49,8 +49,8 @@
 /* Sample frame data */
 
 #include "g722/g722.h"
-#include "slin_g722_ex.h"
-#include "g722_slin_ex.h"
+#include "slin_ex.h"
+#include "g722_ex.h"
 
 struct g722_encoder_pvt {
 	g722_encode_state_t g722;
@@ -132,57 +132,43 @@
 	return 0;
 }
 
-static struct ast_frame *g722tolin_sample(void)
+static struct ast_frame *g722_sample(void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G722,
-		.datalen = sizeof(g722_slin_ex),
-		.samples = sizeof(g722_slin_ex) * 2,
+		.datalen = sizeof(g722_ex),
+		.samples = sizeof(g722_ex) * 2,
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = g722_slin_ex,
+		.data.ptr = g722_ex,
 	};
 
 	return &f;
 }
 
-static struct ast_frame *g722tolin16_sample(void)
-{
-	static struct ast_frame f = {
-		.frametype = AST_FRAME_VOICE,
-		.subclass = AST_FORMAT_G722,
-		.datalen = sizeof(g722_slin_ex),
-		.samples = sizeof(g722_slin_ex) * 2,
-		.src = __PRETTY_FUNCTION__,
-		.data.ptr = g722_slin_ex,
-	};
-
-	return &f;
-}
-
-static struct ast_frame *lintog722_sample (void)
+static struct ast_frame *lin_sample (void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(slin_g722_ex),
-		.samples = ARRAY_LEN(slin_g722_ex),
+		.datalen = sizeof(slin8_ex),
+		.samples = ARRAY_LEN(slin8_ex),
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin_g722_ex,
+		.data.ptr = slin8_ex,
 	};
 
 	return &f;
 }
 
-static struct ast_frame *lin16tog722_sample (void)
+static struct ast_frame *lin16_sample (void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR16,
-		.datalen = sizeof(slin_g722_ex),
-		.samples = ARRAY_LEN(slin_g722_ex),
+		.datalen = sizeof(slin16_ex),
+		.samples = ARRAY_LEN(slin16_ex),
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin_g722_ex,
+		.data.ptr = slin16_ex,
 	};
 
 	return &f;
@@ -194,7 +180,7 @@
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.newpvt = g722tolin_new,	/* same for both directions */
 	.framein = g722tolin_framein,
-	.sample = g722tolin_sample,
+	.sample = g722_sample,
 	.desc_size = sizeof(struct g722_decoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES / sizeof(int16_t),
 	.buf_size = BUFFER_SAMPLES,
@@ -207,7 +193,7 @@
 	.dstfmt = AST_FORMAT_G722,
 	.newpvt = lintog722_new,	/* same for both directions */
 	.framein = lintog722_framein,
-	.sample = lintog722_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof(struct g722_encoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES * 2,
 	.buf_size = BUFFER_SAMPLES,
@@ -219,7 +205,7 @@
 	.dstfmt = AST_FORMAT_SLINEAR16,
 	.newpvt = g722tolin16_new,	/* same for both directions */
 	.framein = g722tolin_framein,
-	.sample = g722tolin16_sample,
+	.sample = g722_sample,
 	.desc_size = sizeof(struct g722_decoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES / sizeof(int16_t),
 	.buf_size = BUFFER_SAMPLES,
@@ -232,7 +218,7 @@
 	.dstfmt = AST_FORMAT_G722,
 	.newpvt = lin16tog722_new,	/* same for both directions */
 	.framein = lintog722_framein,
-	.sample = lin16tog722_sample,
+	.sample = lin16_sample,
 	.desc_size = sizeof(struct g722_encoder_pvt),
 	.buffer_samples = BUFFER_SAMPLES * 2,
 	.buf_size = BUFFER_SAMPLES,

Modified: team/qwell/codec_consistency_fix/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_g726.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_g726.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_g726.c Tue Oct  7 10:20:30 2008
@@ -59,8 +59,8 @@
 
 /* Sample frame data */
 
-#include "slin_g726_ex.h"
-#include "g726_slin_ex.h"
+#include "slin_ex.h"
+#include "g726_ex.h"
 
 /*
  * The following is the definition of the state structure
@@ -786,29 +786,29 @@
 	return 0;
 }
 
-static struct ast_frame *g726tolin_sample(void)
+static struct ast_frame *g726_sample(void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_G726,
-		.datalen = sizeof(g726_slin_ex),
-		.samples = sizeof(g726_slin_ex) * 2,	/* 2 samples per byte */
+		.datalen = sizeof(g726_ex),
+		.samples = sizeof(g726_ex) * 2,	/* 2 samples per byte */
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = g726_slin_ex,
+		.data.ptr = g726_ex,
 	};
 
 	return &f;
 }
 
-static struct ast_frame *lintog726_sample (void)
+static struct ast_frame *lin_sample (void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(slin_g726_ex),
-		.samples = sizeof(slin_g726_ex) / 2,	/* 1 sample per 2 bytes */
+		.datalen = sizeof(slin8_ex),
+		.samples = sizeof(slin8_ex) / 2,	/* 1 sample per 2 bytes */
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin_g726_ex,
+		.data.ptr = slin8_ex,
 	};
 
 	return &f;
@@ -820,7 +820,7 @@
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.newpvt = lintog726_new,	/* same for both directions */
 	.framein = g726tolin_framein,
-	.sample = g726tolin_sample,
+	.sample = g726_sample,
 	.desc_size = sizeof(struct g726_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
@@ -833,7 +833,7 @@
 	.dstfmt = AST_FORMAT_G726,
 	.newpvt = lintog726_new,	/* same for both directions */
 	.framein = lintog726_framein,
-	.sample = lintog726_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof(struct g726_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES/2,
@@ -845,7 +845,7 @@
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.newpvt = lintog726_new,	/* same for both directions */
 	.framein = g726aal2tolin_framein,
-	.sample = g726tolin_sample,
+	.sample = g726_sample,
 	.desc_size = sizeof(struct g726_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
@@ -858,7 +858,7 @@
 	.dstfmt = AST_FORMAT_G726_AAL2,
 	.newpvt = lintog726_new,	/* same for both directions */
 	.framein = lintog726aal2_framein,
-	.sample = lintog726_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof(struct g726_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES / 2,
@@ -869,7 +869,7 @@
 	.srcfmt = AST_FORMAT_G726,
 	.dstfmt = AST_FORMAT_G726_AAL2,
 	.framein = g726tog726aal2_framein,	/* same for both directions */
-	.sample = lintog726_sample,
+	.sample = g726_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES,
 };
@@ -879,7 +879,7 @@
 	.srcfmt = AST_FORMAT_G726_AAL2,
 	.dstfmt = AST_FORMAT_G726,
 	.framein = g726tog726aal2_framein,	/* same for both directions */
-	.sample = lintog726_sample,
+	.sample = g726_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES,
 };

Modified: team/qwell/codec_consistency_fix/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_gsm.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_gsm.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_gsm.c Tue Oct  7 10:20:30 2008
@@ -48,8 +48,8 @@
 #include "../formats/msgsm.h"
 
 /* Sample frame data */
-#include "slin_gsm_ex.h"
-#include "gsm_slin_ex.h"
+#include "slin_ex.h"
+#include "gsm_ex.h"
 
 #define BUFFER_SAMPLES	8000
 #define GSM_SAMPLES	160
@@ -68,33 +68,33 @@
 	return (tmp->gsm = gsm_create()) ? 0 : -1;
 }
 
-static struct ast_frame *lintogsm_sample(void)
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_gsm_ex);
+	f.datalen = sizeof(slin8_ex);
 	/* Assume 8000 Hz */
-	f.samples = sizeof(slin_gsm_ex)/2;
+	f.samples = sizeof(slin8_ex)/2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_gsm_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
-static struct ast_frame *gsmtolin_sample(void)
+static struct ast_frame *gsm_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_GSM;
-	f.datalen = sizeof(gsm_slin_ex);
+	f.datalen = sizeof(gsm_ex);
 	/* All frames are 20 ms long */
 	f.samples = GSM_SAMPLES;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = gsm_slin_ex;
+	f.data.ptr = gsm_ex;
 	return &f;
 }
 
@@ -203,7 +203,7 @@
 	.newpvt = gsm_new,
 	.framein = gsmtolin_framein,
 	.destroy = gsm_destroy_stuff,
-	.sample = gsmtolin_sample,
+	.sample = gsm_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
 	.desc_size = sizeof (struct gsm_translator_pvt ),
@@ -218,7 +218,7 @@
 	.framein = lintogsm_framein,
 	.frameout = lintogsm_frameout,
 	.destroy = gsm_destroy_stuff,
-	.sample = lintogsm_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof (struct gsm_translator_pvt ),
 	.buf_size = (BUFFER_SAMPLES * GSM_FRAME_LEN + GSM_SAMPLES - 1)/GSM_SAMPLES,
 };

Modified: team/qwell/codec_consistency_fix/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_ilbc.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_ilbc.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_ilbc.c Tue Oct  7 10:20:30 2008
@@ -41,8 +41,8 @@
 #include "ilbc/iLBC_decode.h"
 
 /* Sample frame data */
-#include "slin_ilbc_ex.h"
-#include "ilbc_slin_ex.h"
+#include "slin_ex.h"
+#include "ilbc_ex.h"
 
 #define USE_ILBC_ENHANCER	0
 #define ILBC_MS 			30
@@ -77,32 +77,32 @@
 	return 0;
 }
 
-static struct ast_frame *lintoilbc_sample(void)
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_ilbc_ex);
-	f.samples = sizeof(slin_ilbc_ex)/2;
+	f.datalen = sizeof(slin8_ex);
+	f.samples = sizeof(slin8_ex)/2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_ilbc_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
-static struct ast_frame *ilbctolin_sample(void)
+static struct ast_frame *ilbc_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ILBC;
-	f.datalen = sizeof(ilbc_slin_ex);
+	f.datalen = sizeof(ilbc_ex);
 	/* All frames are 30 ms long */
 	f.samples = ILBC_SAMPLES;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ilbc_slin_ex;
+	f.data.ptr = ilbc_ex;
 	return &f;
 }
 
@@ -194,7 +194,7 @@
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.newpvt = ilbctolin_new,
 	.framein = ilbctolin_framein,
-	.sample = ilbctolin_sample,
+	.sample = ilbc_sample,
 	.desc_size = sizeof(struct ilbc_coder_pvt),
 	.buf_size = BUFFER_SAMPLES * 2,
 	.native_plc = 1,
@@ -207,7 +207,7 @@
 	.newpvt = lintoilbc_new,
 	.framein = lintoilbc_framein,
 	.frameout = lintoilbc_frameout,
-	.sample = lintoilbc_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof(struct ilbc_coder_pvt),
 	.buf_size = (BUFFER_SAMPLES * ILBC_FRAME_LEN + ILBC_SAMPLES - 1) / ILBC_SAMPLES,
 };

Modified: team/qwell/codec_consistency_fix/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_lpc10.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_lpc10.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_lpc10.c Tue Oct  7 10:20:30 2008
@@ -39,8 +39,8 @@
 #include "lpc10/lpc10.h"
 
 /* Sample frame data */
-#include "slin_lpc10_ex.h"
-#include "lpc10_slin_ex.h"
+#include "slin_ex.h"
+#include "lpc10_ex.h"
 
 /* We use a very strange format here...  I have no idea why...  The frames are 180
    samples long, which isn't even an even number of milliseconds...  Not only that
@@ -75,34 +75,34 @@
 	return (tmp->lpc10.dec = create_lpc10_decoder_state()) ? 0 : -1;
 }
 
-static struct ast_frame *lintolpc10_sample(void)
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_lpc10_ex);
+	f.datalen = sizeof(slin8_ex);
 	/* Assume 8000 Hz */
 	f.samples = LPC10_SAMPLES_PER_FRAME;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_lpc10_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
-static struct ast_frame *lpc10tolin_sample(void)
+static struct ast_frame *lpc10_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_LPC10;
-	f.datalen = sizeof(lpc10_slin_ex);
+	f.datalen = sizeof(lpc10_ex);
 	/* All frames are 22 ms long (maybe a little more -- why did he choose
 	   LPC10_SAMPLES_PER_FRAME sample frames anyway?? */
 	f.samples = LPC10_SAMPLES_PER_FRAME;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = lpc10_slin_ex;
+	f.data.ptr = lpc10_ex;
 	return &f;
 }
 
@@ -229,7 +229,7 @@
 	.newpvt = lpc10_dec_new,
 	.framein = lpc10tolin_framein,
 	.destroy = lpc10_destroy,
-	.sample = lpc10tolin_sample,
+	.sample = lpc10_sample,
 	.desc_size = sizeof(struct lpc10_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.plc_samples = LPC10_SAMPLES_PER_FRAME,
@@ -244,7 +244,7 @@
 	.framein = lintolpc10_framein,
 	.frameout = lintolpc10_frameout,
 	.destroy = lpc10_destroy,
-	.sample = lintolpc10_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof(struct lpc10_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = LPC10_BYTES_IN_COMPRESSED_FRAME * (1 + BUFFER_SAMPLES / LPC10_SAMPLES_PER_FRAME),

Modified: team/qwell/codec_consistency_fix/codecs/codec_resample.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_resample.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_resample.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_resample.c Tue Oct  7 10:20:30 2008
@@ -49,7 +49,8 @@
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
 
-#include "slin_resample_ex.h"
+#include "slin_ex.h"
+#include "slin16_ex.h"
 
 #define RESAMPLER_QUALITY 1
 
@@ -168,29 +169,29 @@
 	return resample_frame(pvt, resampler, resample_factor, f);
 }
 
-static struct ast_frame *slin16_to_slin8_sample(void)
+static struct ast_frame *slin16_sample(void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR16,
-		.datalen = sizeof(slin16_slin8_ex),
-		.samples = ARRAY_LEN(slin16_slin8_ex),
+		.datalen = sizeof(slin16_ex),
+		.samples = ARRAY_LEN(slin16_ex),
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin16_slin8_ex,
+		.data.ptr = slin16_ex,
 	};
 
 	return &f;
 }
 
-static struct ast_frame *slin8_to_slin16_sample(void)
+static struct ast_frame *slin8_sample(void)
 {
 	static struct ast_frame f = {
 		.frametype = AST_FRAME_VOICE,
 		.subclass = AST_FORMAT_SLINEAR,
-		.datalen = sizeof(slin8_slin16_ex),
-		.samples = ARRAY_LEN(slin8_slin16_ex),
+		.datalen = sizeof(slin8_ex),
+		.samples = ARRAY_LEN(slin8_ex),
 		.src = __PRETTY_FUNCTION__,
-		.data.ptr = slin8_slin16_ex,
+		.data.ptr = slin8_ex,
 	};
 
 	return &f;
@@ -203,7 +204,7 @@
 	.newpvt = slin16_to_slin8_new,
 	.destroy = slin16_to_slin8_destroy,
 	.framein = slin16_to_slin8_framein,
-	.sample = slin16_to_slin8_sample,
+	.sample = slin16_sample,
 	.desc_size = sizeof(struct slin16_to_slin8_pvt),
 	.buffer_samples = (OUTBUF_SIZE / sizeof(int16_t)),
 	.buf_size = OUTBUF_SIZE,
@@ -216,7 +217,7 @@
 	.newpvt = slin8_to_slin16_new,
 	.destroy = slin8_to_slin16_destroy,
 	.framein = slin8_to_slin16_framein,
-	.sample = slin8_to_slin16_sample,
+	.sample = slin8_sample,
 	.desc_size = sizeof(struct slin8_to_slin16_pvt),
 	.buffer_samples = (OUTBUF_SIZE / sizeof(int16_t)),
 	.buf_size = OUTBUF_SIZE,

Modified: team/qwell/codec_consistency_fix/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_speex.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_speex.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_speex.c Tue Oct  7 10:20:30 2008
@@ -54,8 +54,8 @@
 #include "asterisk/utils.h"
 
 /* Sample frame data */
-#include "slin_speex_ex.h"
-#include "speex_slin_ex.h"
+#include "slin_ex.h"
+#include "speex_ex.h"
 
 /* codec variables */
 static int quality = 3;
@@ -154,33 +154,33 @@
 	return 0;
 }
 
-static struct ast_frame *lintospeex_sample(void)
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_speex_ex);
+	f.datalen = sizeof(slin8_ex);
 	/* Assume 8000 Hz */
-	f.samples = sizeof(slin_speex_ex)/2;
+	f.samples = sizeof(slin8_ex)/2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_speex_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
-static struct ast_frame *speextolin_sample(void)
+static struct ast_frame *speex_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SPEEX;
-	f.datalen = sizeof(speex_slin_ex);
+	f.datalen = sizeof(speex_ex);
 	/* All frames are 20 ms long */
 	f.samples = SPEEX_SAMPLES;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = speex_slin_ex;
+	f.data.ptr = speex_ex;
 	return &f;
 }
 
@@ -346,7 +346,7 @@
 	.newpvt = speextolin_new,
 	.framein = speextolin_framein,
 	.destroy = speextolin_destroy,
-	.sample = speextolin_sample,
+	.sample = speex_sample,
 	.desc_size = sizeof(struct speex_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
@@ -361,7 +361,7 @@
 	.framein = lintospeex_framein,
 	.frameout = lintospeex_frameout,
 	.destroy = lintospeex_destroy,
-	.sample = lintospeex_sample,
+	.sample = lin_sample,
 	.desc_size = sizeof(struct speex_coder_pvt),
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2, /* XXX maybe a lot less ? */

Modified: team/qwell/codec_consistency_fix/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/team/qwell/codec_consistency_fix/codecs/codec_ulaw.c?view=diff&rev=147102&r1=147101&r2=147102
==============================================================================
--- team/qwell/codec_consistency_fix/codecs/codec_ulaw.c (original)
+++ team/qwell/codec_consistency_fix/codecs/codec_ulaw.c Tue Oct  7 10:20:30 2008
@@ -37,8 +37,8 @@
 
 /* Sample frame data */
 
-#include "slin_ulaw_ex.h"
-#include "ulaw_slin_ex.h"
+#include "slin_ex.h"
+#include "ulaw_ex.h"
 
 /*! \brief convert and store samples in outbuf */
 static int ulawtolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
@@ -73,37 +73,37 @@
 	return 0;
 }
 
-/*!  * \brief ulawToLin_Sample */
-static struct ast_frame *ulawtolin_sample(void)
+/*!  * \brief ulaw_sample */
+static struct ast_frame *ulaw_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_ULAW;
-	f.datalen = sizeof(ulaw_slin_ex);
-	f.samples = sizeof(ulaw_slin_ex);
+	f.datalen = sizeof(ulaw_ex);
+	f.samples = sizeof(ulaw_ex);
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = ulaw_slin_ex;
+	f.data.ptr = ulaw_ex;
 	return &f;
 }
 
 /*!
- * \brief LinToulaw_Sample
+ * \brief lin_sample
  */
 
-static struct ast_frame *lintoulaw_sample(void)
+static struct ast_frame *lin_sample(void)
 {
 	static struct ast_frame f;
 	f.frametype = AST_FRAME_VOICE;
 	f.subclass = AST_FORMAT_SLINEAR;
-	f.datalen = sizeof(slin_ulaw_ex);
+	f.datalen = sizeof(slin8_ex);
 	/* Assume 8000 Hz */
-	f.samples = sizeof(slin_ulaw_ex) / 2;
+	f.samples = sizeof(slin8_ex) / 2;
 	f.mallocd = 0;
 	f.offset = 0;
 	f.src = __PRETTY_FUNCTION__;
-	f.data.ptr = slin_ulaw_ex;
+	f.data.ptr = slin8_ex;
 	return &f;
 }
 
@@ -116,7 +116,7 @@
 	.srcfmt = AST_FORMAT_ULAW,
 	.dstfmt = AST_FORMAT_SLINEAR,
 	.framein = ulawtolin_framein,
-	.sample = ulawtolin_sample,
+	.sample = ulaw_sample,
 	.buffer_samples = BUFFER_SAMPLES,
 	.buf_size = BUFFER_SAMPLES * 2,
 	.plc_samples = 160,
@@ -131,7 +131,7 @@
 	.srcfmt = AST_FORMAT_SLINEAR,
 	.dstfmt = AST_FORMAT_ULAW,
 	.framein = lintoulaw_framein,
-	.sample = lintoulaw_sample,
+	.sample = lin_sample,
 	.buf_size = BUFFER_SAMPLES,
 	.buffer_samples = BUFFER_SAMPLES,
 };




More information about the asterisk-commits mailing list