[MPlayer-dev-eng] [PATCH] fix numerous const issues in libmpcodecs

Rich Felker dalias at aerifal.cx
Sat Oct 20 02:40:30 CEST 2007


On Fri, Oct 19, 2007 at 07:42:27PM -0400, Alexander Strange wrote:
> 
> On Oct 19, 2007, at 8:44 AM, Rich Felker wrote:
> >>>
> >>
> >> -vf 2xsai only supports one colorspace anyway, so they should be made
> >> const values.
> >> I remember this had a significant speedup when I did it ages ago to
> >> the filters in SNES9X OS X.
> >
> > There's code later in the filter that changes these variables... Is it
> > just cruft?
> >
> > Rich
> 
> If I understand query_format() right it only accepts BGR32, so  
> they'll always be changed to the same thing.
> Of course, someone might make it  work on 16-bit again, so all the  
> init code might as well be kept around anyway.

Hmm, I don't think anyone is seriously using rgb16 image formats in
MPlayer, so it's probably ok to rip the support out. Replacing these
variables with constants (not const-qualified vars but real
compiletime constants) would surely improve performance a bit. And
it's easier than fixing the code to correctly store them in a context
(which would probably hurt performance too).

Rich



More information about the MPlayer-dev-eng mailing list