*
*=====================================================================
*/
-static int AdaptationTable[] = {
+static const int AdaptationTable[] = {
230, 230, 230, 230, 307, 409, 512, 614,
768, 614, 512, 409, 307, 230, 230, 230
};
-static int AdaptCoeff1[] = {
+static const int AdaptCoeff1[] = {
256, 512, 0, 192, 240, 460, 392
};
-static int AdaptCoeff2[] = {
+static const int AdaptCoeff2[] = {
0, -256, 0, 64, 0, -208, -232
};
static gint16
-read_sample (guint8 * data)
+read_sample (const guint8 * data)
{
guint16 val = data[0] | (data[1] << 8);
return *((gint16 *) & val);
All buffer lengths have been verified by the caller
*/
static gboolean
-adpcmdec_decode_ms_block (ADPCMDec * dec, int n_samples, guint8 * data,
+adpcmdec_decode_ms_block (ADPCMDec * dec, int n_samples, const guint8 * data,
gint16 * samples)
{
gint16 pred[2];
return TRUE;
}
-static int ima_indx_adjust[16] = {
+static const int ima_indx_adjust[16] = {
-1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8,
};
-static int ima_step_size[89] = {
+static const int ima_step_size[89] = {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230,
253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963,
All buffer lengths have been verified by the caller
*/
static gboolean
-adpcmdec_decode_ima_block (ADPCMDec * dec, int n_samples, guint8 * data,
+adpcmdec_decode_ima_block (ADPCMDec * dec, int n_samples, const guint8 * data,
gint16 * samples)
{
gint16 stepindex[2];
}
static GstFlowReturn
-adpcmdec_decode_block (ADPCMDec * dec, guint8 * data, int blocksize)
+adpcmdec_decode_block (ADPCMDec * dec, const guint8 * data, int blocksize)
{
gboolean res;
GstBuffer *outbuf = NULL;
#define DEFAULT_ADPCM_BLOCK_SIZE 1024
#define DEFAULT_ADPCM_LAYOUT LAYOUT_ADPCM_DVI
-static int ima_indx_adjust[16] = {
+static const int ima_indx_adjust[16] = {
-1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8,
};
-static int ima_step_size[89] = {
+static const int ima_step_size[89] = {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230,
253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963,
}
static gboolean
-adpcmenc_encode_ima_block (ADPCMEnc * enc, gint16 * samples, guint8 * outbuf)
+adpcmenc_encode_ima_block (ADPCMEnc * enc, const gint16 * samples,
+ guint8 * outbuf)
{
const int HEADER_SIZE = 4;
gint16 prev_sample[2] = { 0, 0 };
}
static GstFlowReturn
-adpcmenc_encode_block (ADPCMEnc * enc, gint16 * samples, int blocksize)
+adpcmenc_encode_block (ADPCMEnc * enc, const gint16 * samples, int blocksize)
{
gboolean res;
GstBuffer *outbuf = NULL;