[MPlayer-dev-eng] [PATCH] x264 option renaming

Ivan Kalvachev ivan at cacad.com
Sat Oct 9 02:55:03 CEST 2004


On Tue, 5 Oct 2004 02:59:20 +0200
Diego Biurrun <diego at biurrun.de> wrote:

> Loren Merritt writes:
> > On Mon, 27 Sep 2004, Ivan Kalvachev wrote:
> > 
> > > Commited.
> > > I have removed the variable change name, because:
> > > 1. the local variable names are the same as the one used in x264 structure.
> > > 2. it is considered cosmetic change and violate the MPlayer rules.
> > 
> > No problem. Just that the first time I submitted the patch,
> > On Sat, 25 Sep 2004, Diego Biurrun wrote:
> > > IMO (others may disagree) you should rename the variables as well,
> > > having variable names and option names differ is a recipe for code
> > > obfuscation IMO.
> > ... and I took it as a suggestion.
> 
> And I am still convinced that not updating variable names when the
> option names change is a recipe for code obfuscation.  Ivan what about
> changing the variable names in a separate patch then?  Why are you
> opposed to changing the variable names when the option names change as
> well?

Read what I wrote before!

Changing variable name is good only when variable have changed it's role (e.g. quantizer becomes quality or something like that), but this also involves functional changes.
To have consistent name of variables over the code is more importan as it helps understanding it easier.
> > > 1. the local variable names are the same as the one used in x264 structure.
As the variables have same names as the fields of the x264 encoder strcuture I won't change them. If x264 author changes variable name, I could follow him change and change to the coresponding variable (it even would be fix or update, because code won't compile anymore).

Now what will happen if we agree on consistent options names for all codecs? Should we rename also all local variables? Well we could, but it will be mess. 
Wish You Best
   Ivan Kalvachev
 iive




More information about the MPlayer-dev-eng mailing list