[FFmpeg-cvslog] r10500 - trunk/libavcodec/vc1.c

The Wanderer inverseparadox
Mon Sep 17 22:57:44 CEST 2007

M?ns Rullg?rd wrote:

> Mike Melanson <mike at multimedia.cx> writes:
>> Benoit Fouet wrote:
>>> kostya wrote:

>>>> -    scale = mquant * 2 + v->halfpq;
>>>> +    scale = mquant * 2 + ((mquant == v->pq) ? v->halfpq : 0);
>>> unneeded parentheses around ==
>> It's more readable that way.
> Which way?  Without the useless parens is more readable, I'd say.

They may not be necessary semantically, but I for one do not know
operator precedence well enough to be able to tell at a glance whether
the version without them would perform the ternary conditional before or
after the equality comparison. The addition of the parentheses makes it
plain, and does not hurt readability in the aesthetic sense IMO.

I am certainly not the only person who would be so unable, and though I
am unlikely to contribute actual code anytime this decade, there is
nothing which says that some who might are not in the same boat. In
addition, making the code more comprehensible even to people who do not
contribute is helpful for (at the least) cases where people would be
told to RTFS.

       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.

More information about the ffmpeg-cvslog mailing list