diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2018-05-09 05:24:58 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2018-05-09 05:24:58 +0300 |
commit | 80844fdfc04e5711bd3b1e1453c09551ee8897c7 (patch) | |
tree | d0fee4643e9f6bd6cdfdad969565325d12404ff9 | |
parent | e0a436fcff04b81f832288b2a984782ee5074b54 (diff) |
Color: Combine/Separate YCbCrA node default to rec. 709
This commit is part of T54798
Differential Revision: https://developer.blender.org/D3183
-rw-r--r-- | source/blender/compositor/operations/COM_ConvertOperation.cpp | 16 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c | 11 |
2 files changed, 19 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp index 327015c1139..8e79931d6f0 100644 --- a/source/blender/compositor/operations/COM_ConvertOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp @@ -164,15 +164,15 @@ ConvertRGBToYCCOperation::ConvertRGBToYCCOperation() : ConvertBaseOperation() void ConvertRGBToYCCOperation::setMode(int mode) { switch (mode) { - case 1: - this->m_mode = BLI_YCC_ITU_BT709; + case 0: + this->m_mode = BLI_YCC_ITU_BT601; break; case 2: this->m_mode = BLI_YCC_JFIF_0_255; break; - case 0: + case 1: default: - this->m_mode = BLI_YCC_ITU_BT601; + this->m_mode = BLI_YCC_ITU_BT709; break; } } @@ -202,15 +202,15 @@ ConvertYCCToRGBOperation::ConvertYCCToRGBOperation() : ConvertBaseOperation() void ConvertYCCToRGBOperation::setMode(int mode) { switch (mode) { - case 1: - this->m_mode = BLI_YCC_ITU_BT709; + case 0: + this->m_mode = BLI_YCC_ITU_BT601; break; case 2: this->m_mode = BLI_YCC_JFIF_0_255; break; - case 0: + case 1: default: - this->m_mode = BLI_YCC_ITU_BT601; + this->m_mode = BLI_YCC_ITU_BT709; break; } } diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c index d712f921ba3..27b1fff321e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c +++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c @@ -46,6 +46,10 @@ static bNodeSocketTemplate cmp_node_sepycca_out[] = { { -1, 0, "" } }; +static void node_composit_init_mode_sepycca(bNodeTree *UNUSED(ntree), bNode *node) +{ + node->custom1 = 1; /* BLI_YCC_ITU_BT709 */ +} void register_node_type_cmp_sepycca(void) { @@ -53,6 +57,7 @@ void register_node_type_cmp_sepycca(void) cmp_node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, 0); node_type_socket_templates(&ntype, cmp_node_sepycca_in, cmp_node_sepycca_out); + node_type_init(&ntype, node_composit_init_mode_sepycca); nodeRegisterType(&ntype); } @@ -72,12 +77,18 @@ static bNodeSocketTemplate cmp_node_combycca_out[] = { { -1, 0, "" } }; +static void node_composit_init_mode_combycca(bNodeTree *UNUSED(ntree), bNode *node) +{ + node->custom1 = 1; /* BLI_YCC_ITU_BT709 */ +} + void register_node_type_cmp_combycca(void) { static bNodeType ntype; cmp_node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, 0); node_type_socket_templates(&ntype, cmp_node_combycca_in, cmp_node_combycca_out); + node_type_init(&ntype, node_composit_init_mode_combycca); nodeRegisterType(&ntype); } |