Skip to content

Commit

Permalink
MMALRender: Improve quality of 10->8 bit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Sep 10, 2017
1 parent d276e05 commit 1fbc9e0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1441,9 +1441,12 @@ bool CMMALRenderer::CheckConfigurationDeint(uint32_t width, uint32_t height, uin
else
{
// We need to scale the YUV to 16-bit
status = mmal_port_parameter_set_uint32(m_deint_output, MMAL_PARAMETER_OUTPUT_SHIFT, 16-bitsPerPixel);
status = mmal_port_parameter_set_int32(m_deint_input, MMAL_PARAMETER_CCM_SHIFT, 16-bitsPerPixel-1);
if (status != MMAL_SUCCESS)
CLog::Log(LOGERROR, "%s::%s Failed to enable extra buffers on %s (status=%x %s)", CLASSNAME, __func__, m_deint_input->name, status, mmal_status_to_string(status));
CLog::Log(LOGERROR, "%s::%s Failed to configure MMAL_PARAMETER_CCM_SHIFT on %s (status=%x %s)", CLASSNAME, __func__, m_deint_input->name, status, mmal_status_to_string(status));
status = mmal_port_parameter_set_uint32(m_deint_output, MMAL_PARAMETER_OUTPUT_SHIFT, 1);
if (status != MMAL_SUCCESS)
CLog::Log(LOGERROR, "%s::%s Failed to configure MMAL_PARAMETER_OUTPUT_SHIFT on %s (status=%x %s)", CLASSNAME, __func__, m_deint_output->name, status, mmal_status_to_string(status));
}
}

Expand Down

0 comments on commit 1fbc9e0

Please sign in to comment.