[Ffmpeg-devel] FFMPEG code a mess
Mike Melanson
mike
Fri Sep 16 21:50:22 CEST 2005
Rich Felker wrote:
> No, you're just a baka who can't read code.. The reason it's
Maybe we're being too hard on the sciatl.com guy. Based on his email
and every OO/C++/Java FAQ I have ever read, I think a complete OO
rewrite could magically solve every shortcoming that FFmpeg has. Indeed,
it's high time for FFmpeg++.
> "intermingled" as you say is exactly BECAUSE of so-called object
> oriented principles like organizing code into reusable 'classes' for
> basic functionality which almost all of the codecs share. Grow up and
I think this is the problem that multiple inheritance solves. So we
make a BitStreamReader class and an InverseDiscreteCosineTransform class
and a CoefficientDezigzag class. Then the VlcDecoder class inherits from
the BitStreamReader class. The Mpeg12Decoder class would inherit from
all of the aforementioned classes.
Of course, there are different versions of the
InverseDiscreteCosineTransform class for different CPUs and SIMD sets. I
think this is where C++ templates would come in handy. Or maybe it needs
to be a pure virtual class that would then be inherited and implemented
by InverseDiscreteCosineTransformC, InverseDiscreteCosineTransformMMX, etc.
Here's hoping that all of the various C++ constructs work across all of
the g++ versions people will be using. If not, I'm sure the gcc folks
will be able to sort out any issues by the next point release.
Anyone else want to jump in here? Decomposing object hierarchies is
much more fun than doing actual programming work.
>> - - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
I think we need to include this in as much email traffic as possible.
It will make this discussion score much higher on Google when someone
searches for info on that company.
--
-Mike Melanson
More information about the ffmpeg-devel
mailing list