Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(199)

Issue 6462050: YCC Distance Matte Node implementation

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by dfelinto
Modified:
11 years, 9 months ago
Reviewers:
jbkkavt, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

The Distance Node in 2.49 has a different calculation for RGB and YCC. While RGB calculate the distance in 3d between R,G and B, the YCC only takes Cb and Cr into consideration. See if this implementation is ok. Basically I: - renamed COM_DistanceMatteOperation into COM_DistanceRGBMatteOperation - turned the private properties into private - isolated the distance calculation function into a new function - inherited this file for the COM_DistanceYCCMatteOperation - overriding the function calculateDistance. Thanks, Dalai

Patch Set 1 #

Total comments: 5

Messages

Total messages: 4
dfelinto
11 years, 9 months ago (2012-08-13 01:18:32 UTC) #1
jbkkavt
have some issues to view the patch (the review site does not work) I think ...
11 years, 9 months ago (2012-08-15 18:46:00 UTC) #2
dfelinto
Hi Jeroen, Regarding the patch (attached since the codereview didn't work) this brings back 2.49 ...
11 years, 9 months ago (2012-08-15 20:20:48 UTC) #3
jbkkavt
11 years, 8 months ago (2012-08-16 12:42:32 UTC) #4
Ok, just reviewed the last part of it. Don't think we can commit without
discussing this as this patch solves a bug and does not change functionality.
Sorry for the misunderstanding... 

It seems that the calculateDistance method is not defined protected and virtual.

With these adjustments it is ok to commit.
 * make calculateDistance protected virtual
 * remove execute pixel from subclass (when it is exactly the same)
 * add conversion operations to executionsystem

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
File source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h
(right):

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
source/blender/compositor/operations/COM_DistanceRGBMatteOperation.h:37: +	float
calculateDistance(float key[4], float image[4]);
Define this function protected virtual, 
and only implement the execute pixel in the DistanceRGB matte, when it is exact
the same.

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
File source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
(right):

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp:37: {
Remove this method as it is the same as the base class

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
File source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h
(right):

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h:33:
private:
make this protected to use the definition in the base class

http://codereview.appspot.com/6462050/diff/1/source/blender/compositor/operat...
source/blender/compositor/operations/COM_DistanceYCCMatteOperation.h:46: 
Remove the execute pixel as it is the same in the base class
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b