Unpremultiply

From Avisynth wiki
Jump to: navigation, search
Abstract
Author jsutinen, IanB
Version 20121231
Download Unpremultiply.zip
Category Masking
License BSD 3-Clause
Discussion Doom9 Thread

Contents

[edit] Description

AviSynth plugin to convert a premultipled RGB32 clip to straight matted alpha. AviSynth's Overlay() function requires straight matted input and will product artifacts if given a premultiplied clip. This plugin performs the appropriate conversion on the alpha channel to prevent this.

Eyeon Fusion is known to only produce premultiplied RGBA videos as well as improperly configured versions of Adobe After Effects. Other video compositing solutions may also suffer the same issue.

[edit] Requirements


[edit] Syntax and Parameters

Unpremultiply (clip)


clip   =
Input clip to be unpremultiplied. Input clip must be RGB32, also known as RGBA. All other input types should fail with an error message.


[edit] Examples

AviSource("RGB32OverlayClip.avi")
Unpremultiply() 


[edit] Changelog

Version       Date(D/M/Y)      Changes
20121231 31/12/2012 - The bottom row and right column of the lookup table were not being initialised.
20121227 27/12/2012 - Fix a rookie mistake in not clamping the intermediate results between 0 and 255. - Also changed to uses a fast 65K lookup table instead of the slow in place idiv's.
20081229 29/12/2008 - Initial release.


[edit] Archived Downloads

Version Download Mirror
20121231 Unpremultiply.zip N/A
20081229 Unpremultiply-20081229.zip Unpremultiply-20081229.zip


[edit] External Links

  • Doom9 Forum - Layer and Overlay operation giving wrong results with RGBA image source




Back to External Filters

Personal tools