comparison truemotion1.c @ 2753:ba8ecddf5598 libavcodec

adding a few const
author michael
date Wed, 01 Jun 2005 21:19:00 +0000
parents f67b63ed036d
children 363be7734674
comparison
equal deleted inserted replaced
2752:23665209e823 2753:ba8ecddf5598
246 b = cdt[p2]; 246 b = cdt[p2];
247 r = cdt[p1]<<16; 247 r = cdt[p1]<<16;
248 return ((b+r) << 1); 248 return ((b+r) << 1);
249 } 249 }
250 250
251 static void gen_vector_table15(TrueMotion1Context *s, uint8_t *sel_vector_table) 251 static void gen_vector_table15(TrueMotion1Context *s, const uint8_t *sel_vector_table)
252 { 252 {
253 int len, i, j; 253 int len, i, j;
254 unsigned char delta_pair; 254 unsigned char delta_pair;
255 255
256 for (i = 0; i < 1024; i += 4) 256 for (i = 0; i < 1024; i += 4)
267 s->y_predictor_table[i+(j-1)] |= 1; 267 s->y_predictor_table[i+(j-1)] |= 1;
268 s->c_predictor_table[i+(j-1)] |= 1; 268 s->c_predictor_table[i+(j-1)] |= 1;
269 } 269 }
270 } 270 }
271 271
272 static void gen_vector_table16(TrueMotion1Context *s, uint8_t *sel_vector_table) 272 static void gen_vector_table16(TrueMotion1Context *s, const uint8_t *sel_vector_table)
273 { 273 {
274 int len, i, j; 274 int len, i, j;
275 unsigned char delta_pair; 275 unsigned char delta_pair;
276 276
277 for (i = 0; i < 1024; i += 4) 277 for (i = 0; i < 1024; i += 4)
288 s->y_predictor_table[i+(j-1)] |= 1; 288 s->y_predictor_table[i+(j-1)] |= 1;
289 s->c_predictor_table[i+(j-1)] |= 1; 289 s->c_predictor_table[i+(j-1)] |= 1;
290 } 290 }
291 } 291 }
292 292
293 static void gen_vector_table24(TrueMotion1Context *s, uint8_t *sel_vector_table) 293 static void gen_vector_table24(TrueMotion1Context *s, const uint8_t *sel_vector_table)
294 { 294 {
295 int len, i, j; 295 int len, i, j;
296 unsigned char delta_pair; 296 unsigned char delta_pair;
297 297
298 for (i = 0; i < 1024; i += 4) 298 for (i = 0; i < 1024; i += 4)
322 static int truemotion1_decode_header(TrueMotion1Context *s) 322 static int truemotion1_decode_header(TrueMotion1Context *s)
323 { 323 {
324 int i; 324 int i;
325 struct frame_header header; 325 struct frame_header header;
326 uint8_t header_buffer[128]; /* logical maximum size of the header */ 326 uint8_t header_buffer[128]; /* logical maximum size of the header */
327 uint8_t *sel_vector_table; 327 const uint8_t *sel_vector_table;
328 328
329 /* There is 1 change bit per 4 pixels, so each change byte represents 329 /* There is 1 change bit per 4 pixels, so each change byte represents
330 * 32 pixels; divide width by 4 to obtain the number of change bits and 330 * 32 pixels; divide width by 4 to obtain the number of change bits and
331 * then round up to the nearest byte. */ 331 * then round up to the nearest byte. */
332 s->mb_change_bits_row_size = ((s->avctx->width >> 2) + 7) >> 3; 332 s->mb_change_bits_row_size = ((s->avctx->width >> 2) + 7) >> 3;