[FFmpeg-devel] [PATCH] MMX for Win64

Måns Rullgård mans
Wed May 7 13:25:02 CEST 2008

Reimar D?ffinger wrote:
> On Wed, May 07, 2008 at 11:05:42AM +0100, M?ns Rullg?rd wrote:
>> The point is, immediately seeing
>> that something is a struct, without searching for a definition, is often
>> helpful, especially to other people than the author of the code.
> Well, that is my problem: I don't see how.
> If you have to find the definition to know it is a struct that means:
> - The variable/argument is not really used anywhere nearby (except maybe
>   in an assignment).
> - You have no idea what it contains, so even if you know it is a struct,
>   how could you use that knowledge?
> I currently really do not see a case where it is really any help to know
> it is a struct

Well, for instance knowing that something is a struct might suggest that
allocating it on the stack should be avoided, since structs can be quite
large.  I have seen cases where structs several hundred bytes in size
were allocated on a 2k stack, resulting in stack overflows and very
hard to find bugs (this was happening in an interrupt handler).

> - possibly with the exception of input/output
> parameters, but even there a doxygen comment seems much more useful, and
> more likely to be up-to-date (in this case, the code might be using int
> * only for compatibility without actually changing it).

Code is *always* more accurate than comments.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list