Author: reimar Date: Wed Jan 31 21:57:30 2007 New Revision: 7786 Modified: trunk/libavcodec/lzo.c Log: Remove boundary checks that are actually done "well enough" in copy function Modified: trunk/libavcodec/lzo.c ============================================================================== --- trunk/libavcodec/lzo.c (original) +++ trunk/libavcodec/lzo.c Wed Jan 31 21:57:30 2007 @@ -213,10 +213,6 @@ cnt = get_len(&c, x, 15); copy(&c, cnt + 3); x = GETB(c); - if (c.in > c.in_end) { - c.error |= LZO_INPUT_DEPLETED; - continue; - } if (x > 15) continue; cnt = 1; @@ -228,11 +224,8 @@ copy_backptr(&c, back, cnt + 2); state= cnt = x & 3; - if (cnt) - copy(&c, cnt); + copy(&c, cnt); x = GETB(c); - if (c.in > c.in_end) - c.error |= LZO_INPUT_DEPLETED; } *inlen = c.in_end - c.in; if (c.in > c.in_end)
Hi On Wed, Jan 31, 2007 at 09:57:30PM +0100, reimar wrote:
Author: reimar Date: Wed Jan 31 21:57:30 2007 New Revision: 7786
Modified: trunk/libavcodec/lzo.c
Log: Remove boundary checks that are actually done "well enough" in copy function [...] @@ -228,11 +224,8 @@ copy_backptr(&c, back, cnt + 2); state= cnt = x & 3; - if (cnt) - copy(&c, cnt); + copy(&c, cnt);
have you benchmarked this? i tried the very same change a few hours ago and with nirvana.nuv it was slower [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato
Hello, On Wed, Jan 31, 2007 at 10:54:44PM +0100, Michael Niedermayer wrote:
On Wed, Jan 31, 2007 at 09:57:30PM +0100, reimar wrote:
Author: reimar Date: Wed Jan 31 21:57:30 2007 New Revision: 7786
Modified: trunk/libavcodec/lzo.c
Log: Remove boundary checks that are actually done "well enough" in copy function [...] @@ -228,11 +224,8 @@ copy_backptr(&c, back, cnt + 2); state= cnt = x & 3; - if (cnt) - copy(&c, cnt); + copy(&c, cnt);
have you benchmarked this? i tried the very same change a few hours ago and with nirvana.nuv it was slower
I admit I did not with nirvana.nuv but with some other random picture and binary files. That change alone made no difference (was not slower either) but with the simplification of the checks in copy() it was faster. Greetings, Reimar D?ffinger
participants (3)
-
michaelni@gmx.at -
Reimar.Doeffinger@stud.uni-karlsruhe.de -
subversion@mplayerhq.hu