Color: Combine/Separate YCbCrA node default to rec. 709

This commit is part of T54798

Differential Revision: https://developer.blender.org/D3183
This commit is contained in:
2018-05-08 22:24:58 -04:00
parent e0a436fcff
commit 80844fdfc0
2 changed files with 19 additions and 8 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}