@@ -369,7 +369,6 @@ VAStatus MediaLibvaCaps::CheckEncRTFormat(
369
369
attrib->value = VA_RT_FORMAT_YUV420;
370
370
}
371
371
372
- #ifdef _FULL_OPEN_SOURCE
373
372
EncodeFormat format = Others;
374
373
EncodeType type = entrypoint == VAEntrypointEncSliceLP ? Vdenc : DualPipe;
375
374
struct EncodeFormatTable * encodeFormatTable = m_encodeFormatTable;
@@ -396,7 +395,6 @@ VAStatus MediaLibvaCaps::CheckEncRTFormat(
396
395
break ;
397
396
}
398
397
}
399
- #endif
400
398
401
399
return VA_STATUS_SUCCESS;
402
400
}
@@ -1500,25 +1498,11 @@ VAStatus MediaLibvaCaps::CreateEncConfig(
1500
1498
}
1501
1499
if (VAConfigAttribRTFormat == attribList[j].type )
1502
1500
{
1503
- if (m_profileEntryTbl[profileTableIdx].m_profile == VAProfileJPEGBaseline)
1504
- {
1505
- if (VA_RT_FORMAT_YUV420 != attribList[j].value &&
1506
- VA_RT_FORMAT_YUV422 != attribList[j].value &&
1507
- VA_RT_FORMAT_YUV444 != attribList[j].value &&
1508
- VA_RT_FORMAT_YUV400 != attribList[j].value &&
1509
- VA_RT_FORMAT_YUV411 != attribList[j].value &&
1510
- VA_RT_FORMAT_RGB16 != attribList[j].value &&
1511
- VA_RT_FORMAT_RGB32 != attribList[j].value )
1512
- {
1513
- return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
1514
- }
1515
- }
1516
- else
1501
+ VAConfigAttrib attribRT;
1502
+ CheckEncRTFormat (m_profileEntryTbl[profileTableIdx].m_profile , entrypoint, &attribRT);
1503
+ if ((attribList[j].value | attribRT.value ) == 0 )
1517
1504
{
1518
- if (VA_RT_FORMAT_YUV420 != attribList[j].value )
1519
- {
1520
- return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
1521
- }
1505
+ return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
1522
1506
}
1523
1507
}
1524
1508
}
0 commit comments