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

Matthieu CASTET castet.matthieu
Fri Aug 21 17:58:46 CEST 2009


Michael Niedermayer <michaelni <at> gmx.at> writes:

> 
> On Thu, Aug 20, 2009 at 08:10:57PM +0200, Reimar D?ffinger wrote:

> > 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

There some code that use it :

$ grep put_bits */*.[hc] | grep "32,"
libavcodec/alacenc.c:    put_bits(&s->pbctx, 32, s->avctx->frame_size);        
 // No. of samples in the frame
libavcodec/mjpegenc.c:        put_bits(&s->pb, 32, 0);
libavcodec/vorbis_enc.c:    put_bits(pb, 32, res);
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, 0); // version
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, venc->sample_rate);
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, 0); // bitrate
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, 0); // bitrate
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, 0); // bitrate
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, 0); // vendor length TODO
libavcodec/vorbis_enc.c:    put_bits(&pb, 32, 0); // amount of comments
libavformat/mpegenc.c:    put_bits(&pb, 32, PACK_START_CODE);
libavformat/mpegenc.c:    put_bits(&pb, 32, SYSTEM_HEADER_START_CODE);


Matthieu




More information about the ffmpeg-devel mailing list