[FFmpeg-devel] rmdec.c: add SIPR codec try #2

Ronald S. Bultje rsbultje
Tue Mar 17 20:45:51 CET 2009

Hi Reimar,

On Tue, Mar 17, 2009 at 3:21 PM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de> wrote:
> That's simply wrong, for the ((i ^ o) & 1) case you will alternate
> between i & 1 and not, so you can't move that check out of the loop.

Well, I calculate the mask per iteration so then it's OK (right?). The
end result was identical to original code.

> If performance is relevant this can of course be optimized a lot, e.g.
> using using memcpy for the !((i ^ o) & 1) case except the first and last
> byte, and doing two swaps per iteration for the other case to avoid
> swapping i and o.

I shamefully admit that I didn't see that...


More information about the ffmpeg-devel mailing list