Mercurial > libavcodec.hg
comparison dv.c @ 8596:68e959302527 libavcodec
replace all occurrence of ENABLE_ by the corresponding CONFIG_, HAVE_ or ARCH_
and remove all ENABLE_ definitions.
author | aurel |
---|---|
date | Wed, 14 Jan 2009 17:19:17 +0000 |
parents | 7a463923ecd1 |
children | 04423b2f6e0b |
comparison
equal
deleted
inserted
replaced
8595:2f476018b4ac | 8596:68e959302527 |
---|---|
60 void (*idct_put[2])(uint8_t *dest, int line_size, DCTELEM *block); | 60 void (*idct_put[2])(uint8_t *dest, int line_size, DCTELEM *block); |
61 } DVVideoContext; | 61 } DVVideoContext; |
62 | 62 |
63 #define TEX_VLC_BITS 9 | 63 #define TEX_VLC_BITS 9 |
64 | 64 |
65 #if ENABLE_SMALL | 65 #if CONFIG_SMALL |
66 #define DV_VLC_MAP_RUN_SIZE 15 | 66 #define DV_VLC_MAP_RUN_SIZE 15 |
67 #define DV_VLC_MAP_LEV_SIZE 23 | 67 #define DV_VLC_MAP_LEV_SIZE 23 |
68 #else | 68 #else |
69 #define DV_VLC_MAP_RUN_SIZE 64 | 69 #define DV_VLC_MAP_RUN_SIZE 64 |
70 #define DV_VLC_MAP_LEV_SIZE 512 //FIXME sign was removed so this should be /2 but needs check | 70 #define DV_VLC_MAP_LEV_SIZE 512 //FIXME sign was removed so this should be /2 but needs check |
324 free_vlc(&dv_vlc); | 324 free_vlc(&dv_vlc); |
325 | 325 |
326 for (i = 0; i < NB_DV_VLC - 1; i++) { | 326 for (i = 0; i < NB_DV_VLC - 1; i++) { |
327 if (dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE) | 327 if (dv_vlc_run[i] >= DV_VLC_MAP_RUN_SIZE) |
328 continue; | 328 continue; |
329 #if ENABLE_SMALL | 329 #if CONFIG_SMALL |
330 if (dv_vlc_level[i] >= DV_VLC_MAP_LEV_SIZE) | 330 if (dv_vlc_level[i] >= DV_VLC_MAP_LEV_SIZE) |
331 continue; | 331 continue; |
332 #endif | 332 #endif |
333 | 333 |
334 if (dv_vlc_map[dv_vlc_run[i]][dv_vlc_level[i]].size != 0) | 334 if (dv_vlc_map[dv_vlc_run[i]][dv_vlc_level[i]].size != 0) |
338 dv_vlc_bits[i] << (!!dv_vlc_level[i]); | 338 dv_vlc_bits[i] << (!!dv_vlc_level[i]); |
339 dv_vlc_map[dv_vlc_run[i]][dv_vlc_level[i]].size = | 339 dv_vlc_map[dv_vlc_run[i]][dv_vlc_level[i]].size = |
340 dv_vlc_len[i] + (!!dv_vlc_level[i]); | 340 dv_vlc_len[i] + (!!dv_vlc_level[i]); |
341 } | 341 } |
342 for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) { | 342 for (i = 0; i < DV_VLC_MAP_RUN_SIZE; i++) { |
343 #if ENABLE_SMALL | 343 #if CONFIG_SMALL |
344 for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) { | 344 for (j = 1; j < DV_VLC_MAP_LEV_SIZE; j++) { |
345 if (dv_vlc_map[i][j].size == 0) { | 345 if (dv_vlc_map[i][j].size == 0) { |
346 dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc | | 346 dv_vlc_map[i][j].vlc = dv_vlc_map[0][j].vlc | |
347 (dv_vlc_map[i-1][0].vlc << (dv_vlc_map[0][j].size)); | 347 (dv_vlc_map[i-1][0].vlc << (dv_vlc_map[0][j].size)); |
348 dv_vlc_map[i][j].size = dv_vlc_map[i-1][0].size + | 348 dv_vlc_map[i][j].size = dv_vlc_map[i-1][0].size + |
690 } | 690 } |
691 } | 691 } |
692 return 0; | 692 return 0; |
693 } | 693 } |
694 | 694 |
695 #if ENABLE_SMALL | 695 #if CONFIG_SMALL |
696 /* Converts run and level (where level != 0) pair into vlc, returning bit size */ | 696 /* Converts run and level (where level != 0) pair into vlc, returning bit size */ |
697 static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc) | 697 static av_always_inline int dv_rl2vlc(int run, int level, int sign, uint32_t* vlc) |
698 { | 698 { |
699 int size; | 699 int size; |
700 if (run < DV_VLC_MAP_RUN_SIZE && level < DV_VLC_MAP_LEV_SIZE) { | 700 if (run < DV_VLC_MAP_RUN_SIZE && level < DV_VLC_MAP_LEV_SIZE) { |