comparison pcm.c @ 1064:b32afefe7d33 libavcodec

* UINTX -> uintx_t INTX -> intx_t
author kabi
date Tue, 11 Feb 2003 16:35:48 +0000
parents 48349e11c9b2
children bfc18110d4b6
comparison
equal deleted inserted replaced
1063:fdeac9642346 1064:b32afefe7d33
71 71
72 return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS)); 72 return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
73 } 73 }
74 74
75 /* 16384 entries per table */ 75 /* 16384 entries per table */
76 static UINT8 *linear_to_alaw = NULL; 76 static uint8_t *linear_to_alaw = NULL;
77 static int linear_to_alaw_ref = 0; 77 static int linear_to_alaw_ref = 0;
78 78
79 static UINT8 *linear_to_ulaw = NULL; 79 static uint8_t *linear_to_ulaw = NULL;
80 static int linear_to_ulaw_ref = 0; 80 static int linear_to_ulaw_ref = 0;
81 81
82 static void build_xlaw_table(UINT8 *linear_to_xlaw, 82 static void build_xlaw_table(uint8_t *linear_to_xlaw,
83 int (*xlaw2linear)(unsigned char), 83 int (*xlaw2linear)(unsigned char),
84 int mask) 84 int mask)
85 { 85 {
86 int i, j, v, v1, v2; 86 int i, j, v, v1, v2;
87 87
272 return 0; 272 return 0;
273 } 273 }
274 274
275 static int pcm_decode_frame(AVCodecContext *avctx, 275 static int pcm_decode_frame(AVCodecContext *avctx,
276 void *data, int *data_size, 276 void *data, int *data_size,
277 UINT8 *buf, int buf_size) 277 uint8_t *buf, int buf_size)
278 { 278 {
279 PCMDecode *s = avctx->priv_data; 279 PCMDecode *s = avctx->priv_data;
280 int n; 280 int n;
281 short *samples; 281 short *samples;
282 UINT8 *src; 282 uint8_t *src;
283 283
284 samples = data; 284 samples = data;
285 src = buf; 285 src = buf;
286 286
287 switch(avctx->codec->id) { 287 switch(avctx->codec->id) {
337 break; 337 break;
338 default: 338 default:
339 *data_size = 0; 339 *data_size = 0;
340 return -1; 340 return -1;
341 } 341 }
342 *data_size = (UINT8 *)samples - (UINT8 *)data; 342 *data_size = (uint8_t *)samples - (uint8_t *)data;
343 return src - buf; 343 return src - buf;
344 } 344 }
345 345
346 #define PCM_CODEC(id, name) \ 346 #define PCM_CODEC(id, name) \
347 AVCodec name ## _encoder = { \ 347 AVCodec name ## _encoder = { \