本文整理汇总了C++中ConversionConfiguration::SetStandardCoefficient方法的典型用法代码示例。如果您正苦于以下问题:C++ ConversionConfiguration::SetStandardCoefficient方法的具体用法?C++ ConversionConfiguration::SetStandardCoefficient怎么用?C++ ConversionConfiguration::SetStandardCoefficient使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConversionConfiguration
的用法示例。
在下文中一共展示了ConversionConfiguration::SetStandardCoefficient方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetConversionParams
/**
* Y2R_U::SetConversionParams service function
*/
static void SetConversionParams(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
auto params = reinterpret_cast<const ConversionParameters*>(&cmd_buff[1]);
LOG_DEBUG(Service_Y2R,
"called input_format=%hhu output_format=%hhu rotation=%hhu block_alignment=%hhu "
"input_line_width=%hu input_lines=%hu standard_coefficient=%hhu "
"reserved=%hhu alpha=%hX",
params->input_format, params->output_format, params->rotation, params->block_alignment,
params->input_line_width, params->input_lines, params->standard_coefficient,
params->reserved, params->alpha);
ResultCode result = RESULT_SUCCESS;
conversion.input_format = params->input_format;
conversion.output_format = params->output_format;
conversion.rotation = params->rotation;
conversion.block_alignment = params->block_alignment;
result = conversion.SetInputLineWidth(params->input_line_width);
if (result.IsError()) goto cleanup;
result = conversion.SetInputLines(params->input_lines);
if (result.IsError()) goto cleanup;
result = conversion.SetStandardCoefficient(params->standard_coefficient);
if (result.IsError()) goto cleanup;
conversion.alpha = params->alpha;
cleanup:
cmd_buff[0] = 0x00290040; // TODO verify
cmd_buff[1] = result.raw;
}
示例2: SetStandardCoefficient
static void SetStandardCoefficient(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
LOG_DEBUG(Service_Y2R, "called standard_coefficient=%u", cmd_buff[1]);
cmd_buff[1] = conversion.SetStandardCoefficient((StandardCoefficient)cmd_buff[1]).raw;
}
示例3: SetStandardCoefficient
static void SetStandardCoefficient(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 index = cmd_buff[1];
cmd_buff[0] = IPC::MakeHeader(0x20, 1, 0);
cmd_buff[1] = conversion.SetStandardCoefficient((StandardCoefficient)index).raw;
LOG_DEBUG(Service_Y2R, "called standard_coefficient=%u", index);
}
示例4: SetPackageParameter
/**
* Y2R_U::SetPackageParameter service function
*/
static void SetPackageParameter(Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
auto params = reinterpret_cast<const ConversionParameters*>(&cmd_buff[1]);
conversion.input_format = params->input_format;
conversion.output_format = params->output_format;
conversion.rotation = params->rotation;
conversion.block_alignment = params->block_alignment;
ResultCode result = conversion.SetInputLineWidth(params->input_line_width);
if (result.IsError())
goto cleanup;
result = conversion.SetInputLines(params->input_lines);
if (result.IsError())
goto cleanup;
result = conversion.SetStandardCoefficient(params->standard_coefficient);
if (result.IsError())
goto cleanup;
conversion.padding = params->padding;
conversion.alpha = params->alpha;
cleanup:
cmd_buff[0] = IPC::MakeHeader(0x29, 1, 0);
cmd_buff[1] = result.raw;
LOG_DEBUG(
Service_Y2R,
"called input_format=%hhu output_format=%hhu rotation=%hhu block_alignment=%hhu "
"input_line_width=%hu input_lines=%hu standard_coefficient=%hhu reserved=%hhu alpha=%hX",
params->input_format, params->output_format, params->rotation, params->block_alignment,
params->input_line_width, params->input_lines, params->standard_coefficient,
params->padding, params->alpha);
}