Mercurial > libavcodec.hg
comparison common.c @ 609:153a7ffd289b libavcodec
faster ff_sqrt()
| author | michaelni |
|---|---|
| date | Thu, 22 Aug 2002 19:41:39 +0000 |
| parents | 7f1b09bb34c6 |
| children | 4c22dcf3ba65 |
comparison
equal
deleted
inserted
replaced
| 608:98e39397636b | 609:153a7ffd289b |
|---|---|
| 18 * | 18 * |
| 19 * alternative bitstream reader & writer by Michael Niedermayer <michaelni@gmx.at> | 19 * alternative bitstream reader & writer by Michael Niedermayer <michaelni@gmx.at> |
| 20 */ | 20 */ |
| 21 #include "avcodec.h" | 21 #include "avcodec.h" |
| 22 | 22 |
| 23 const UINT8 ff_sqrt_tab[128]={ | |
| 24 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, | |
| 25 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, | |
| 26 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, | |
| 27 9, 9, 9, 9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11 | |
| 28 }; | |
| 29 | |
| 23 void init_put_bits(PutBitContext *s, | 30 void init_put_bits(PutBitContext *s, |
| 24 UINT8 *buffer, int buffer_size, | 31 UINT8 *buffer, int buffer_size, |
| 25 void *opaque, | 32 void *opaque, |
| 26 void (*write_data)(void *, UINT8 *, int)) | 33 void (*write_data)(void *, UINT8 *, int)) |
| 27 { | 34 { |
