mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-25 22:10:38 +02:00
st/va: Return more useful config attributes
The encoder attributes are needed for a user of the encoder to be able to configure it sensibly without internal knowledge. Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
0c94ed0987
commit
8a931c83ba
1 changed files with 38 additions and 9 deletions
|
|
@ -115,16 +115,45 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
|
|||
|
||||
for (i = 0; i < num_attribs; ++i) {
|
||||
unsigned int value;
|
||||
switch (attrib_list[i].type) {
|
||||
case VAConfigAttribRTFormat:
|
||||
value = VA_RT_FORMAT_YUV420;
|
||||
break;
|
||||
case VAConfigAttribRateControl:
|
||||
value = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR;
|
||||
break;
|
||||
default:
|
||||
if (entrypoint == VAEntrypointVLD) {
|
||||
switch (attrib_list[i].type) {
|
||||
case VAConfigAttribRTFormat:
|
||||
value = VA_RT_FORMAT_YUV420;
|
||||
break;
|
||||
default:
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
break;
|
||||
}
|
||||
} else if (entrypoint == VAEntrypointEncSlice) {
|
||||
switch (attrib_list[i].type) {
|
||||
case VAConfigAttribRTFormat:
|
||||
value = VA_RT_FORMAT_YUV420;
|
||||
break;
|
||||
case VAConfigAttribRateControl:
|
||||
value = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR;
|
||||
break;
|
||||
case VAConfigAttribEncPackedHeaders:
|
||||
value = 0;
|
||||
break;
|
||||
case VAConfigAttribEncMaxRefFrames:
|
||||
value = 1;
|
||||
break;
|
||||
default:
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
break;
|
||||
}
|
||||
} else if (entrypoint == VAEntrypointVideoProc) {
|
||||
switch (attrib_list[i].type) {
|
||||
case VAConfigAttribRTFormat:
|
||||
value = (VA_RT_FORMAT_YUV420 |
|
||||
VA_RT_FORMAT_RGB32);
|
||||
break;
|
||||
default:
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
break;
|
||||
}
|
||||
attrib_list[i].value = value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue