[FFmpeg-devel] [PATCH] ALS decoder

Reimar Döffinger Reimar.Doeffinger
Wed Aug 26 18:07:47 CEST 2009


On Wed, Aug 26, 2009 at 04:36:20PM +0200, Michael Niedermayer wrote:
> On Tue, Aug 25, 2009 at 07:59:32PM +0200, Thilo Borgmann wrote:
> [...]
> > +/** Computes the bytes left to decode for the current frame
> > + */
> > +static inline unsigned int count_remaining(unsigned int b, unsigned int b_max,
> > +                                           unsigned int *div_blocks)
> 
> this doesnt need to be inline, i belive its not speed critical, but rather
> handling just damaged bitstreams or am i misunderstanding the code?
> 
> also maybe this one could do the memset as well

Since it is not speed-critical that may change things, but I proposed
this on purpose because
1) it avoids one loop in the joint-stereo case
2) memset is called with larger values, thus newer libc implementations
can make better use of optimizations for large copies in addition to
reducing the call overhead (that was a thinko, it can still be had with
having the memset in the function).
3) I am still lobbying to have someone implement a bytestream_fill_byte
function which would merge the memset and increment, which would make
the code look "good enough" if not even clearer than with the memset
"hidden" in there (well, that was the idea anyway).



More information about the ffmpeg-devel mailing list