sps->conformance_window_flag = 1;
sps->conf_win_left_offset = 0;
sps->conf_win_right_offset =
- (ctx->surface_width - avctx->width) / 2;
+ (ctx->surface_width - avctx->width) >> desc->log2_chroma_w;
sps->conf_win_top_offset = 0;
sps->conf_win_bottom_offset =
- (ctx->surface_height - avctx->height) / 2;
+ (ctx->surface_height - avctx->height) >> desc->log2_chroma_h;
} else {
sps->conformance_window_flag = 0;
}
priv->fixed_qp_b = 30;
}
+ ctx->roi_quant_range = 51 + 6 * (ctx->profile->depth - 8);
+
return 0;
}
.close = &vaapi_encode_h265_close,
.priv_class = &vaapi_encode_h265_class,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.defaults = vaapi_encode_h265_defaults,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_VAAPI,
AV_PIX_FMT_NONE,
},
+ .hw_configs = ff_vaapi_encode_hw_configs,
.wrapper_name = "vaapi",
};