[Mesa-dev] [PATCH 1/3] st/va: Return more useful config attributes
Christian König
deathsimple at vodafone.de
Tue Sep 20 09:55:39 UTC 2016
> + if (profile == VAProfileHEVCMain10)
> + value = VA_RT_FORMAT_YUV420_10BPP;
We actually don't support that yet. Main10 profiles dither down the
10bit output to 8bits before writing it to the VA-API surface at the moment.
Apart from that the set looks good to me,
Christian.
Am 19.09.2016 um 01:09 schrieb Mark Thompson:
> ---
> More chroma formats might be supportable, I've kept this to YUV420 + RGB for now.
>
> Also, B-frames might be supported in some configurations? That could be conditional on the GPU being used somehow if necessary.
>
>
> src/gallium/state_trackers/va/config.c | 53 ++++++++++++++++++++++++++++------
> 1 file changed, 44 insertions(+), 9 deletions(-)
>
> diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
> index 4052316..c6c5bb1 100644
> --- a/src/gallium/state_trackers/va/config.c
> +++ b/src/gallium/state_trackers/va/config.c
> @@ -115,16 +115,51 @@ 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:
> + if (profile == VAProfileHEVCMain10)
> + value = VA_RT_FORMAT_YUV420_10BPP;
> + else
> + value = VA_RT_FORMAT_YUV420;
> + break;
> + default:
> + value = VA_ATTRIB_NOT_SUPPORTED;
> + break;
> + }
> + } else if (entrypoint == VAEntrypointEncSlice) {
> + switch (attrib_list[i].type) {
> + case VAConfigAttribRTFormat:
> + if (profile == VAProfileHEVCMain10)
> + value = VA_RT_FORMAT_YUV420_10BPP;
> + else
> + 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;
> }
More information about the mesa-dev
mailing list