[FFmpeg-devel] Various small fixes
Uoti Urpala
uoti.urpala
Sat Dec 13 16:04:34 CET 2008
On Sat, 2008-12-13 at 14:52 +0000, M?ns Rullg?rd wrote:
> "Anders Gr?nberg" <galileo.m2 at gmail.com> writes:
> > +++ libavcodec/imgconvert.c (working copy)
> > @@ -783,7 +783,7 @@
> > dst_pix_fmt = -1;
> > min_dist = 0x7fffffff;
> > for(i = 0;i < PIX_FMT_NB; i++) {
> > - if (pix_fmt_mask & (1 << i)) {
> > + if (pix_fmt_mask & (1ULL << i)) {
> > loss = avcodec_get_pix_fmt_loss(i, src_pix_fmt, has_alpha) & loss_mask;
> > if (loss == 0) {
> > dist = avg_bits_per_pixel(i);
>
> This is madness. What do you believe the benefit of that to be?
pix_fmt_mask is int64_t. If int is 32-bit then (pix_fmt_mask & (1 << i))
can access at most 32 bits of it.
More information about the ffmpeg-devel
mailing list