summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-04-29 20:12:48 +0200
committerDiego Biurrun <diego@biurrun.de>2011-04-29 20:28:40 +0200
commitcf3ac54339c42530342ec053b981d7b717404889 (patch)
tree9f004aa53fdeb4f3824fa7d205531f720c17bf05 /libavcodec/vorbis.c
parenta734fa575f94c7c28103420f756b5f64dd0c806b (diff)
vorbis: Replace sized int_fast integer types with plain int/unsigned.
int/unsigned is the natural memory access type for CPUs, using sized types for temporary variables, counters and similar just increases code size and can possibly cause a slowdown.
Diffstat (limited to 'libavcodec/vorbis.c')
-rw-r--r--libavcodec/vorbis.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index d576a2035b..1a4d613ac8 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -51,14 +51,13 @@ unsigned int ff_vorbis_nth_root(unsigned int x, unsigned int n)
// the two bits[p] > 32 checks should be redundant, all calling code should
// already ensure that, but since it allows overwriting the stack it seems
// reasonable to check redundantly.
-int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, uint_fast32_t num)
+int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, unsigned num)
{
uint_fast32_t exit_at_level[33] = {
404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- uint_fast8_t i, j;
- uint_fast32_t code, p;
+ unsigned i, j, p, code;
#ifdef V_DEBUG
GetBitContext gb;
@@ -78,8 +77,8 @@ int ff_vorbis_len2vlc(uint8_t *bits, uint32_t *codes, uint_fast32_t num)
exit_at_level[i+1] = 1 << i;
#ifdef V_DEBUG
- av_log(NULL, AV_LOG_INFO, " %d. of %d code len %d code %d - ", p, num, bits[p], codes[p]);
- init_get_bits(&gb, (uint_fast8_t *)&codes[p], bits[p]);
+ av_log(NULL, AV_LOG_INFO, " %u. of %u code len %d code %d - ", p, num, bits[p], codes[p]);
+ init_get_bits(&gb, (uint8_t *)&codes[p], bits[p]);
for (i = 0; i < bits[p]; ++i)
av_log(NULL, AV_LOG_INFO, "%s", get_bits1(&gb) ? "1" : "0");
av_log(NULL, AV_LOG_INFO, "\n");