[MPlayer-dev-eng] [RFC] Color management filter

Yue Shi Lai ylai at users.sourceforge.net
Tue Aug 26 22:41:17 CEST 2008


Reimar Döffinger schrieb:
> Hm, I do not at all like the global variable the vo_gl support adds.

Can you be more specific?

> Avoiding it would be a bit of work though, e.g. setting lcms through
> a global option with suboptions instead of the filter options or
> something like that.

I am not exactly sure what you mean here. Either way vo_gl must obtain 
the data from somewhere. And even if you make vo_gl call lcms itself, 
the data structure of an color space transform is no way simpler than a 
CLUT (actually, it contains various LUTs itself). Currently vo_gl is 
also not in anyway permanently clinging to the global data, but makes a 
copy of it during initialization.

What you propose here would result in massive change of the structure, 
i.e. integrate the profile and CLUT generation infrastructure to be part 
of the main MPlayer and make vf_cm basically vf_softclut.

Another proposal from my side would be to replace the global data with 
an API from which external users can call vf_cm to check the status, 
obtain the CLUT, etc.

Or another option yet might be simply dropping the vo_gl support.

> (though I would not really even comment a movdqa).

The comments are mostly notes (like this) from the coding process to 
keep track of the registers, especially because the algorithm barely 
fits into 8 registers. Removing them would be fine for me, just tell me 
which comments you would like to get rid of.

> I think in MPlayer code it is more common to not use the != NULL and I
> also consider it more readable, but it's your decision.

Either way is fine with me. The habit is influenced by MISRA C, which 
calls for only semantically boolean expressions in ifs.

> Maybe it did not exist when you started writing this filter, but both
> the main MPlayer option parser as well as the code in subopt-helper.c
> (which e.g. vo gl uses) would be much easier to use (and avoid the
> strdup in addition ;-) ).

Indeed :-) As far as I remember, the first attempts to write this filter 
started nearly 3 years ago.

Best,

Yue Shi Lai



More information about the MPlayer-dev-eng mailing list