Skip to content

Commit

Permalink
check the support RT format inside CreateConfig
Browse files Browse the repository at this point in the history
Signed-off-by: XinfengZhang <carl.zhang@intel.com>
  • Loading branch information
XinfengZhang authored and oliver-sang committed Apr 13, 2018
1 parent e70e199 commit 6dfa058
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions media_driver/linux/common/ddi/media_libva_caps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ VAStatus MediaLibvaCaps::CheckEncRTFormat(
attrib->value = VA_RT_FORMAT_YUV420;
}

#ifdef _FULL_OPEN_SOURCE
EncodeFormat format = Others;
EncodeType type = entrypoint == VAEntrypointEncSliceLP ? Vdenc : DualPipe;
struct EncodeFormatTable* encodeFormatTable = m_encodeFormatTable;
Expand All @@ -396,7 +395,6 @@ VAStatus MediaLibvaCaps::CheckEncRTFormat(
break;
}
}
#endif

return VA_STATUS_SUCCESS;
}
Expand Down Expand Up @@ -1500,25 +1498,11 @@ VAStatus MediaLibvaCaps::CreateEncConfig(
}
if(VAConfigAttribRTFormat == attribList[j].type)
{
if(m_profileEntryTbl[profileTableIdx].m_profile == VAProfileJPEGBaseline)
{
if(VA_RT_FORMAT_YUV420 != attribList[j].value &&
VA_RT_FORMAT_YUV422 != attribList[j].value &&
VA_RT_FORMAT_YUV444 != attribList[j].value &&
VA_RT_FORMAT_YUV400 != attribList[j].value &&
VA_RT_FORMAT_YUV411 != attribList[j].value &&
VA_RT_FORMAT_RGB16 != attribList[j].value &&
VA_RT_FORMAT_RGB32 != attribList[j].value)
{
return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
}
}
else
VAConfigAttrib attribRT;
CheckEncRTFormat(m_profileEntryTbl[profileTableIdx].m_profile, entrypoint, &attribRT);
if((attribList[j].value | attribRT.value) == 0)
{
if(VA_RT_FORMAT_YUV420 != attribList[j].value)
{
return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
}
return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
}
}
}
Expand Down

0 comments on commit 6dfa058

Please sign in to comment.