[FFmpeg-devel] Various small fixes
Måns Rullgård
mans
Sat Dec 13 16:36:01 CET 2008
Uoti Urpala <uoti.urpala at pp1.inet.fi> writes:
> 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.
I should have checked that. I assumed it wasn't.
> If int is 32-bit then (pix_fmt_mask & (1 << i)) can access at most
> 32 bits of it.
Of course.
I still blame the patch submitter for not explaining a single line.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list