[MPlayer-dev-eng] Size of codecs_t, CODECS_MAX_FOURCC

Lauri Kasanen cand at gmx.com
Wed May 31 10:34:52 EEST 2017


On Tue, 30 May 2017 13:44:57 -0400
Compn <tempn at mi.rr.com> wrote:

> > Having just updated mplayer, I had a quick look at its current size.
> > The builtin codec arrays take 700kb currently.
> 
> updated it how? did you --disable-mencoder and also disable all of the
> encoders in ffmpeg compile? that usually shrinks mplayer binary size
> considerably. also check what libs are linked in and strip debug
> symbols.

Yes, disabled mencoder and stripped. I didn't manually disable
encoders, configure does that itself, see mplayer_encoders in it.

configure args:
--prefix=/usr --disable-real --disable-xanim --confdir=/etc/mplayer
--enable-menu --disable-fribidi --disable-win32dll --disable-qtx
--disable-vidix --disable-vidix-pcidb
--extra-cflags=-I/usr/X11R7/include --extra-ldflags=-L/usr/X11R7/lib
--disable-cddb --cc=/opt/gcc52/bin/gcc --disable-relocatable
--enable-openssl-nondistributable --disable-mencoder --disable-pvr

16180612, 16mb.

> > Dropping it to the 71 would save 100kb. 72 or 80 would be more "round",
> > saving less but maybe giving some headroom to add fourccs to that
> > largest codec.
> 
> is there a way to change the code without reducing the max fourcc
> number, so that it does not require that much size in the binary?

Certainly, by making dedicated fourcc and fourccmap arrays, and
replacing those in codec_t with a start index and a count. That's a lot
more work than just reducing the number, though.

> unfortunately, i think we will find more mpeg2 fourcc in the wild in
> the future, so i am not for reducing this max fourcc number.

Why would that be a blocker? If more mpeg2 fourccs appear, then the max
would be increased at that time?

- Lauri


More information about the MPlayer-dev-eng mailing list