[FFmpeg-devel] [PATCH] fix vp6-huffman sort order
pross at xvid.org
pross
Sun Jun 22 12:40:36 CEST 2008
On Sun, Jun 22, 2008 at 09:43:18AM +0100, M?ns Rullg?rd wrote:
> pross at xvid.org writes:
> > +/* sort comparator: nodes must ascend by count, but with descending symbol order */
> > static int vp6_huff_cmp(const void *va, const void *vb)
> > {
> > const Node *a = va, *b = vb;
> > - return a->count >= b->count;
> > + return (a->count - b->count)*12 + (b->sym - a->sym);
> > }
>
> *16 would be faster. What is the range of ->count?
Actually, it is at least 256.
The vp6 maintainer will be able to provide further insight. Aurel?
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- 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/20080622/88cd7392/attachment.pgp>
More information about the ffmpeg-devel
mailing list