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 AkarinVS/L-SMASH-Works#11.

Signed-off-by: akarin <i@akarin.info>
(cherry picked from commit AkarinVS/L-SMASH-Works@843a046)
  • Loading branch information
AkarinVS authored and Asd-g committed Apr 6, 2022
1 parent d297200 commit 4a9641b
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 @@ -282,7 +282,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 @@ -269,7 +269,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 4a9641b

Please sign in to comment.