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

alpha clip _Range? #11

Closed
AkarinVS opened this issue Sep 13, 2021 · 1 comment
Closed

alpha clip _Range? #11

AkarinVS opened this issue Sep 13, 2021 · 1 comment

Comments

@AkarinVS
Copy link
Owner

should alpha clip defaults to full range?

currently lsmas uses the main clip's range to set the alpha clip's range, primaries, transfer, and matrix.

if( vs_format->colorFamily != cmRGB )
{
if( av_frame->color_range != AVCOL_RANGE_UNSPECIFIED )
vsapi->propSetInt( props, "_ColorRange", av_frame->color_range == AVCOL_RANGE_MPEG, paReplace );
vsapi->propSetInt( props, "_Primaries", av_frame->color_primaries, paReplace );
vsapi->propSetInt( props, "_Transfer", av_frame->color_trc, paReplace );
vsapi->propSetInt( props, "_Matrix", av_frame->colorspace, paReplace );
if( av_frame->chroma_location > 0 )
vsapi->propSetInt( props, "_ChromaLocation", av_frame->chroma_location - 1, paReplace );
}

For alpha clip, primaries and matrix are irrelevant, but I'm not sure about range and transfer.

I'd guess all alpha should be full range, but is this true?
What about transfer?

Also, is there a YUV image/video format that also includes alpha channel?

@YomikoR
Copy link

YomikoR commented Sep 26, 2021

They are just masks, and _Range is the only required property.

AkarinVS added a commit that referenced this issue Oct 2, 2021
…orRange property for _Alpha clips

Updates #11.
Fixes #16.

Signed-off-by: akarin <[email protected]>
Asd-g pushed a commit to HomeOfAviSynthPlusEvolution/L-SMASH-Works that referenced this issue Apr 6, 2022
Asd-g pushed a commit to HomeOfAviSynthPlusEvolution/L-SMASH-Works that referenced this issue Apr 6, 2022
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

2 participants