Mercurial > libavcodec.hg
comparison mpegvideo.c @ 6438:e1dd408a7864 libavcodec
move ff_init_scantable() into dsputil
author | aurel |
---|---|
date | Tue, 04 Mar 2008 10:26:56 +0000 |
parents | 5154ab444372 |
children | 2b553c57ec51 |
comparison
equal
deleted
inserted
replaced
6437:5154ab444372 | 6438:e1dd408a7864 |
---|---|
68 static const uint8_t ff_default_chroma_qscale_table[32]={ | 68 static const uint8_t ff_default_chroma_qscale_table[32]={ |
69 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 69 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
70 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 | 70 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 |
71 }; | 71 }; |
72 | 72 |
73 void ff_init_scantable(uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable){ | |
74 int i; | |
75 int end; | |
76 | |
77 st->scantable= src_scantable; | |
78 | |
79 for(i=0; i<64; i++){ | |
80 int j; | |
81 j = src_scantable[i]; | |
82 st->permutated[i] = permutation[j]; | |
83 #ifdef ARCH_POWERPC | |
84 st->inverse[j] = i; | |
85 #endif | |
86 } | |
87 | |
88 end=-1; | |
89 for(i=0; i<64; i++){ | |
90 int j; | |
91 j = st->permutated[i]; | |
92 if(j>end) end=j; | |
93 st->raster_end[i]= end; | |
94 } | |
95 } | |
96 | 73 |
97 const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){ | 74 const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){ |
98 int i; | 75 int i; |
99 | 76 |
100 assert(p<=end); | 77 assert(p<=end); |