diff options
author | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-11-07 16:41:42 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2011-11-07 16:41:42 +0000 |
commit | 0ff703b520509104fc5facb2f86e1464287926be (patch) | |
tree | b12697b7d6d060fc10c0722470072b4be6fbba96 /gst/adpcmenc/adpcmenc.c | |
parent | 9674c5aefab9d061284a8e0e320bdef9c187bebd (diff) | |
download | gstreamer-plugins-bad-0ff703b520509104fc5facb2f86e1464287926be.tar.gz |
adpcm: add more consts, espcially for static const data
Diffstat (limited to 'gst/adpcmenc/adpcmenc.c')
-rw-r--r-- | gst/adpcmenc/adpcmenc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/adpcmenc/adpcmenc.c b/gst/adpcmenc/adpcmenc.c index 49e055061..5f6a24424 100644 --- a/gst/adpcmenc/adpcmenc.c +++ b/gst/adpcmenc/adpcmenc.c @@ -66,11 +66,11 @@ static GstStaticPadTemplate adpcmenc_src_template = #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, @@ -302,7 +302,8 @@ adpcmenc_encode_ima_sample (gint16 sample, gint16 * prev_sample, } 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 }; @@ -368,7 +369,7 @@ adpcmenc_encode_ima_block (ADPCMEnc * enc, gint16 * samples, guint8 * outbuf) } 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; |