Le quartidi 14 brumaire, an CCXXIV, Kyle Swanson a écrit : > I can change this, but most filters I've seen have used floating point > sample formats. Anyone else have any opinions on this?
Floating point is easier, that explains why a lot of code use it. But it is less efficient, and most importantly: it is not bit-exact, and therefore it makes it much harder to do regression tests (either for the source itself or using the source as input for a filter that needs testing): instead of comparing the output to a constant reference, it requires using a mean deviation. > This makes it easier for someone to add different flavors of filtered > noise later on, and define their own sample buffer. I understand this > is a tiny buffer, but why allocate too much memory if we won't need > it? Dynamic allocation has a cost too. With padding and structure overhead, when allocating 1 cell, you end up reserving 24-32 octets, possibly more, while the current code only requires 56 at most. And of course, avoiding the dynamic allocation and the indirection makes the code itself smaller: unless a lot of instances of the source are created, the benefit is larger than the cost. Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel