Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3852:d3bc8c09597c libavcodec
Original Commit: r50 | ods15 | 2006-09-23 16:24:51 +0300 (Sat, 23 Sep 2006) | 2 lines
ilog => av_log2
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:07:30 +0000 |
parents | a778f86c28e2 |
children | 30e824ef9e03 |
comparison
equal
deleted
inserted
replaced
3851:a778f86c28e2 | 3852:d3bc8c09597c |
---|---|
125 int total_pos; | 125 int total_pos; |
126 int pos; | 126 int pos; |
127 uint8_t * buf_ptr; | 127 uint8_t * buf_ptr; |
128 } PutBitContext; | 128 } PutBitContext; |
129 | 129 |
130 #define ilog(i) av_log2(2*(i)) | |
131 | |
130 static inline void init_put_bits(PutBitContext * pb, uint8_t * buf, int buffer_len) { | 132 static inline void init_put_bits(PutBitContext * pb, uint8_t * buf, int buffer_len) { |
131 pb->total = buffer_len * 8; | 133 pb->total = buffer_len * 8; |
132 pb->total_pos = 0; | 134 pb->total_pos = 0; |
133 pb->pos = 0; | 135 pb->pos = 0; |
134 pb->buf_ptr = buf; | 136 pb->buf_ptr = buf; |
355 venc->win[1] = vwin[venc->blocksize[1] - 6]; | 357 venc->win[1] = vwin[venc->blocksize[1] - 6]; |
356 } | 358 } |
357 | 359 |
358 ff_mdct_init(&venc->mdct[0], venc->blocksize[0], 0); | 360 ff_mdct_init(&venc->mdct[0], venc->blocksize[0], 0); |
359 ff_mdct_init(&venc->mdct[1], venc->blocksize[1], 0); | 361 ff_mdct_init(&venc->mdct[1], venc->blocksize[1], 0); |
360 } | |
361 | |
362 static inline int ilog(unsigned int a) { | |
363 int i; | |
364 for (i = 0; a >> i; i++); | |
365 return i; | |
366 } | 362 } |
367 | 363 |
368 static void put_float(PutBitContext * pb, float f) { | 364 static void put_float(PutBitContext * pb, float f) { |
369 int exp, mant; | 365 int exp, mant; |
370 uint32_t res = 0; | 366 uint32_t res = 0; |