- switch (avctx->profile) {
- case FF_PROFILE_VP9_0:
- case FF_PROFILE_UNKNOWN:
- ctx->va_profile = VAProfileVP9Profile0;
- ctx->va_rt_format = VA_RT_FORMAT_YUV420;
- break;
- case FF_PROFILE_VP9_1:
- av_log(avctx, AV_LOG_ERROR, "VP9 profile 1 is not "
- "supported.\n");
- return AVERROR_PATCHWELCOME;
- case FF_PROFILE_VP9_2:
- ctx->va_profile = VAProfileVP9Profile2;
- ctx->va_rt_format = VA_RT_FORMAT_YUV420_10BPP;
- break;
- case FF_PROFILE_VP9_3:
- av_log(avctx, AV_LOG_ERROR, "VP9 profile 3 is not "
- "supported.\n");
- return AVERROR_PATCHWELCOME;
- default:
- av_log(avctx, AV_LOG_ERROR, "Unknown VP9 profile %d.\n",
- avctx->profile);
- return AVERROR(EINVAL);
- }
- ctx->va_entrypoint = VAEntrypointEncSlice;
-
- if (avctx->flags & AV_CODEC_FLAG_QSCALE) {
- ctx->va_rc_mode = VA_RC_CQP;
- } else if (avctx->bit_rate > 0) {
- if (avctx->bit_rate == avctx->rc_max_rate)
- ctx->va_rc_mode = VA_RC_CBR;
- else
- ctx->va_rc_mode = VA_RC_VBR;
- } else {
- ctx->va_rc_mode = VA_RC_CQP;
- }
-
- // Packed headers are not currently supported.
- ctx->va_packed_headers = 0;
+ // No packed headers are currently desired. They could be written,
+ // but there isn't any reason to do so - the one usable driver (i965)
+ // can write its own headers and there is no metadata to include.
+ ctx->desired_packed_headers = 0;