comparison mpegaudioenc.c @ 12262:dde20597f15e libavcodec

Use "const" qualifier for pointers that point to input data of audio encoders. This is purely for clarity/documentation purposes.
author reimar
date Sat, 24 Jul 2010 13:59:49 +0000
parents f6ae68a7b1fd
children
comparison
equal deleted inserted replaced
12261:940736055764 12262:dde20597f15e
304 } 304 }
305 } 305 }
306 306
307 #define WSHIFT (WFRAC_BITS + 15 - FRAC_BITS) 307 #define WSHIFT (WFRAC_BITS + 15 - FRAC_BITS)
308 308
309 static void filter(MpegAudioContext *s, int ch, short *samples, int incr) 309 static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
310 { 310 {
311 short *p, *q; 311 short *p, *q;
312 int sum, offset, i, j; 312 int sum, offset, i, j;
313 int tmp[64]; 313 int tmp[64];
314 int tmp1[32]; 314 int tmp1[32];
750 750
751 static int MPA_encode_frame(AVCodecContext *avctx, 751 static int MPA_encode_frame(AVCodecContext *avctx,
752 unsigned char *frame, int buf_size, void *data) 752 unsigned char *frame, int buf_size, void *data)
753 { 753 {
754 MpegAudioContext *s = avctx->priv_data; 754 MpegAudioContext *s = avctx->priv_data;
755 short *samples = data; 755 const short *samples = data;
756 short smr[MPA_MAX_CHANNELS][SBLIMIT]; 756 short smr[MPA_MAX_CHANNELS][SBLIMIT];
757 unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT]; 757 unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT];
758 int padding, i; 758 int padding, i;
759 759
760 for(i=0;i<s->nb_channels;i++) { 760 for(i=0;i<s->nb_channels;i++) {