[Bf-codereview] Alpha premul pipeline cleanup (issue 7018048)
sergey.vfx at gmail.com
sergey.vfx at gmail.com
Sat Dec 29 21:31:42 CET 2012
On 2012/12/28 13:04:26, brechtvl wrote:
https://codereview.appspot.com/7018048/diff/1/intern/opencolorio/fallback_impl.cc
> File intern/opencolorio/fallback_impl.cc (right):
https://codereview.appspot.com/7018048/diff/1/intern/opencolorio/fallback_impl.cc#newcode266
> intern/opencolorio/fallback_impl.cc:266: inv_alpha = alpha != 0.0f ?
1.0f /
> alpha : 1.0f;
> This test is unnecessary given that it already checks for pixel[3] ==
0.0f
> above.
https://codereview.appspot.com/7018048/diff/1/intern/opencolorio/ocio_impl.cc
> File intern/opencolorio/ocio_impl.cc (right):
https://codereview.appspot.com/7018048/diff/1/intern/opencolorio/ocio_impl.cc#newcode408
> intern/opencolorio/ocio_impl.cc:408: inv_alpha = alpha != 0.0f ? 1.0f
/ alpha :
> 1.0f;
> Same here
https://codereview.appspot.com/7018048/diff/1/source/blender/makesrna/intern/rna_scene.c
> File source/blender/makesrna/intern/rna_scene.c (left):
https://codereview.appspot.com/7018048/diff/1/source/blender/makesrna/intern/rna_scene.c#oldcode3336
> source/blender/makesrna/intern/rna_scene.c:3336: - {R_ALPHAKEY,
"STRAIGHT", 0,
> "Straight Alpha", "Transparent RGB and alpha pixels are unmodified"},
> I think this option could become "Sky" and "Transparent". In the
tooltip for
> transparent it can perhaps mentioned that the alpha is premultiplied.
https://codereview.appspot.com/7018048/diff/1/source/blender/makesrna/intern/rna_sequencer.c
> File source/blender/makesrna/intern/rna_sequencer.c (right):
https://codereview.appspot.com/7018048/diff/1/source/blender/makesrna/intern/rna_sequencer.c#newcode1545
> source/blender/makesrna/intern/rna_sequencer.c:1545:
{SEQ_ALPHA_STRAIGHT,
> "STRAIGHT", 0, "Straight", "Transparent RGB and alpha pixels are
unmodified"},
> Suggestions to make the description more clear:
> RGB channels in transparent pixels are unaffected by the alpha channel
https://codereview.appspot.com/7018048/diff/1/source/blender/makesrna/intern/rna_sequencer.c#newcode1546
> source/blender/makesrna/intern/rna_sequencer.c:1546:
{SEQ_ALPHA_PREMUL,
> "PREMUL", 0, "Premultiplied", "Transparent RGB pixels are multiplied
by the
> alpha channel"},
> RGB channels in transparent pixels are multiplied by the alpha channel
Corrected all of this comments.
https://codereview.appspot.com/7018048/
More information about the Bf-codereview
mailing list