Skip to content

Commit

Permalink
VapourSynth/libavsmash_source.c, lwlibav_source.c: mark alpha clip as…
Browse files Browse the repository at this point in the history
… always in full range

Fixes #11.

Signed-off-by: akarin <i@akarin.info>
  • Loading branch information
AkarinVS committed Sep 26, 2021
1 parent 95de1ab commit 843a046
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion VapourSynth/libavsmash_source.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ static const VSFrameRef *VS_CC vs_filter_get_frame( int n, int activation_reason
vsapi->setFilterError( "lsmas: failed to output an alpha video frame.", frame_ctx );
return NULL;
}
VSMap *props = vsapi->getFramePropsRW( vs_frame );
VSMap *props = vsapi->getFramePropsRW( vs_frame2 );
vsapi->propSetFrame( props, "_ColorRange", 0, paReplace ); // alpha clip always full range
props = vsapi->getFramePropsRW( vs_frame );
vsapi->propSetFrame( props, "_Alpha", vs_frame2, paAppend );
vsapi->freeFrame( vs_frame2 );
}
Expand Down
4 changes: 3 additions & 1 deletion VapourSynth/lwlibav_source.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ static const VSFrameRef *VS_CC vs_filter_get_frame( int n, int activation_reason
vsapi->setFilterError( "lsmas: failed to output an alpha video frame.", frame_ctx );
return NULL;
}
VSMap *props = vsapi->getFramePropsRW( vs_frame );
VSMap *props = vsapi->getFramePropsRW( vs_frame2 );
vsapi->propSetFrame( props, "_ColorRange", 0, paReplace ); // alpha clip always full range
props = vsapi->getFramePropsRW( vs_frame );
vsapi->propSetFrame( props, "_Alpha", vs_frame2, paAppend );
vsapi->freeFrame( vs_frame2 );
}
Expand Down

0 comments on commit 843a046

Please sign in to comment.