[FFmpeg-cvslog] r19234 - trunk/libavcodec/wma.c

Måns Rullgård mans
Sat Jun 20 14:53:59 CEST 2009


Ivan Kalvachev <ikalvachev at gmail.com> writes:

> On 6/20/09, faust3 <subversion at mplayerhq.hu> wrote:
>> Author: faust3
>> Date: Sat Jun 20 13:06:48 2009
>> New Revision: 19234
>>
>> Log:
>> Simplify run level decoding:
>> - remove unneeded vlc code < 0 check
>
> Hum, would you explain this a little bit more.
> Afaik -1 is returned when sequence that doesn't belong
> to any known vlc is met.
> This usually happens on broken streams.
>
> Can you prove that wma vlc don't have invalid sequences?

Wasn't this already discussed with the conclusion that all codes are
used?

> At the moment the code checks explicitly for code==1 and breaks the loop.
> You can change that with explicit check for code==0 and handle the EOB
> and errors at once. the error then can be handled outside the loop.
> Of course gcc won't be able to optimize <1 and ==1 compare into one, but ...
> you know, checks are cheap, branches are expensive ;)

Checks and branches are one and the same in general...

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list