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

Michael Niedermayer michaelni
Mon May 24 17:58:21 CEST 2010


On Mon, May 24, 2010 at 10:09:21AM -0400, Ronald S. Bultje wrote:
> 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...

i think the faster variant should be prefered

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100524/f0582e0e/attachment.pgp>



More information about the ffmpeg-devel mailing list