[FFmpeg-devel] llvm failure : don't do undefined shift

Michael Niedermayer michaelni
Fri Aug 21 12:33:26 CEST 2009

On Thu, Aug 20, 2009 at 08:10:57PM +0200, Reimar D?ffinger wrote:
> On Thu, Aug 20, 2009 at 05:52:25PM +0000, matthieu castet wrote:
> > I don't know how to fix this, I only found strange that we have "if (n <
> > bit_left) {" instead of "if (n <= bit_left) {"
> So it gets written as soon as possible.
> Anyway one solution is the same as for the le case which uses:
>         bit_buf = (bit_left==32)?0:value >> bit_left;
> (just that it is  bit_buf = (bit_left==32)?0:bit_buf << bit_left; )

do we allow put_bits(32) at all? because it seems this can only happen
in that case
theres a assert(n==32 || ... that points to it being allowed but we also
do have code like:
                put_bits(&s->pb, 16, 0);
                put_bits(&s->pb, 16, 0x1C3);

that clearly splits the put_bits()

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20090821/ccffcdc8/attachment.pgp>

More information about the ffmpeg-devel mailing list