[FFmpeg-devel] [PATCH] ALS decoder
Thilo Borgmann
thilo.borgmann
Mon Aug 31 01:38:59 CEST 2009
M?ns Rullg?rd schrieb:
> Thilo Borgmann <thilo.borgmann at googlemail.com> writes:
>
>>>>> [...]
>>>>>> +/** Reads and decodes a Rice codeword.
>>>>>> + */
>>>>>> +static int32_t decode_rice(GetBitContext *gb, unsigned int k)
>>>>>> +{
>>>>>> + int max = gb->size_in_bits - get_bits_count(gb) - k;
>>>>>> + int32_t q = get_unary(gb, 0, max);
>>>>> i suspect int is fine for these 2 instead of int32_t ?
>>>> Is int at least 32 bits long? k <= 32 and therefore q might have to hold
>>>> up to 32 bits.
>>> int in POSIX is at least 32bits long, yes
>> This makes (u)int32_t useless, doesn't it?
>
> No:
>
> - int32_t is *exactly* 32 bits (and it's optional)
> - int could be much wider than 32 bits. In this case, if another
> type (short, char, or a compiler-specific type) is 32 bits, this will
> be used for int32_t.
>
Oh yes.. lazy me!
-Thilo
More information about the ffmpeg-devel
mailing list