[FFmpeg-devel] [PATCH] IFF: Add error checking to byterun1 decoder

Ronald S. Bultje rsbultje
Mon May 24 16:09:21 CEST 2010


Hi,

On Mon, May 24, 2010 at 9:51 AM, Sebastian Vater
<cdgs.basty at googlemail.com> wrote:
> This makes the code larger and slower actually (I tried this out when
> you told me that for the first time), because there are three checks to
> be done:
> 0 <= value < 128
> 128 <= value < 255
> value == 255
>
> Making it unsigned I have to do sth. like:
> if (value < 128) {
> } else if (value < 255) {
> } else {
> }
>
> This is slower than just:
> if (value >= 0) { // No extra cmp instruction required, it just uses the
> flag setting of the movzbl (%esi),al to test if it's >= 0
> } else if (value != -128) {
> } else {
> }

You're over-optimizing stuff that isn't really all that important, imo...

Ronald



More information about the ffmpeg-devel mailing list