Mercurial > libavcodec.hg
comparison ffv1.c @ 9546:54ddf2b7d4bd libavcodec
Optimize sign handling in get_symbol().
author | michael |
---|---|
date | Fri, 24 Apr 2009 00:26:49 +0000 |
parents | 3045aef3405c |
children | df1827eb3aaa |
comparison
equal
deleted
inserted
replaced
9545:59073f92f0e2 | 9546:54ddf2b7d4bd |
---|---|
256 a= 1; | 256 a= 1; |
257 for(i=e-1; i>=0; i--){ | 257 for(i=e-1; i>=0; i--){ |
258 a += a + get_rac(c, state+22 + i); //22..31 | 258 a += a + get_rac(c, state+22 + i); //22..31 |
259 } | 259 } |
260 | 260 |
261 if(is_signed && get_rac(c, state+11 + e)) //11..21 | 261 e= -(is_signed && get_rac(c, state+11 + e)); //11..21 |
262 return -a; | 262 return (a^e)-e; |
263 else | |
264 return a; | |
265 } | 263 } |
266 } | 264 } |
267 | 265 |
268 static inline void update_vlc_state(VlcState * const state, const int v){ | 266 static inline void update_vlc_state(VlcState * const state, const int v){ |
269 int drift= state->drift; | 267 int drift= state->drift; |