Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LUTPaths: when is it used/useful? #16

Open
shekh opened this issue Nov 20, 2017 · 10 comments
Open

LUTPaths: when is it used/useful? #16

shekh opened this issue Nov 20, 2017 · 10 comments

Comments

@shekh
Copy link

shekh commented Nov 20, 2017

There is some weirdness here (hardcoded fully qualified path)

TCHAR defaultLUTpath[260] = "C:\\Program Files\\Common Files\\CineForm\\LUTs";

and here

TCHAR defaultLUTpath[260] = "C:\\Program Files\\Common Files\\CineForm\\LUTs";

Is this actually executed at some point?
Also there are registry access, system variable access etc. Is it a convention shared between all CineForm-enabled programs? Which programs create these registry keys and lut files?

@retokromer
Copy link
Contributor

I’m also interested in knowing more about the use of LUTs in CineForm.

@dnewman-gpsw
Copy link
Collaborator

Active Metadata is runs out of this path. CineForm FirstLight and GoPro Studio uses these for color correction and other visual enhancements that occur during decode. Also the defaults paths are typically overridden with system environment controls.

@dnewman-gpsw
Copy link
Collaborator

I just noted that Active Metadata was not be supported within VDFM, some CineForm user will miss this (including myself).

@shekh
Copy link
Author

shekh commented Nov 21, 2017

Good to know. I planned to collect some feedback and then have second attempt.

What do you think about replacing
"C:\Program Files\Common Files\" with SHGetSpecialFolderPathW(CSIDL_PROGRAM_FILES_COMMON)?
Leaving it as is leads to undefined behavior where c: drive does not exist, is removable, remote etc.

Also related somehow..
Is anyone having trouble compiling with atlbase/ccombstr dependency? It seems quite unnecessary, I`d love to see it go away (please somebody replace it with std::wstring :)

@shekh
Copy link
Author

shekh commented Nov 24, 2017

Ok, atlbase can be removed with no loss by adding this fragment to settings.h

#include <tchar.h>

class CComBSTR
{
public:
	char* str;

	CComBSTR()
	{
		str = NULL;
	}

	CComBSTR(LPCSTR pSrc)
	{
		str = NULL;
		if(pSrc){
			int size = strlen(pSrc);
			str = (char*)malloc(size+1);
			strcpy(str,pSrc);
		}
	}

	~CComBSTR()
	{
		free(str);
	}
};

#define USES_CONVERSION

inline char* OLE2T(CComBSTR& a){ return a.str; }

@dnewman-gpsw
Copy link
Collaborator

Cool. I will try that out.

@dnewman-gpsw
Copy link
Collaborator

This didn't work for me. So I cleaned up the code a different way. I have removed settings.cpp/h and atlbase.h from the Windows builds.

@shekh
Copy link
Author

shekh commented Nov 25, 2017

Great.
Now it looks like it does not need the registry key to exist (SOFTWARE\CineForm\ColorProcessing)
Is it still good idea to think: if there is any AM db the key also exists and points to db?
In previous code if(cfg.Open...) looked like the intent was to check for key existence.

@dnewman-gpsw
Copy link
Collaborator

An existing CineForm users will have these setup via the registry keys. New users can run with the defaults as they have not disk based database of active metadata changes. Users can manipulate the LUTPaths and DBPaths for interesting workflows like this https://vimeo.com/10024749

@zcream
Copy link

zcream commented Feb 17, 2020

Has anyone implemented metadata support outside of first light?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants