mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
qsvenc: Use MFXVideoENCODE_Query() to update the parameters
Fill out the default/unset parameters with ones actually in use. Matches the current MediaSDK example code. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
committed by
Luca Barbato
parent
e00db9f78b
commit
b22094d749
+9
-1
@@ -757,10 +757,18 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = MFXVideoENCODE_Query(q->session, &q->param, &q->param);
|
||||||
|
if (ret == MFX_WRN_PARTIAL_ACCELERATION) {
|
||||||
|
av_log(avctx, AV_LOG_WARNING, "Encoder will work with partial HW acceleration\n");
|
||||||
|
} else if (ret < 0) {
|
||||||
|
return ff_qsv_print_error(avctx, ret,
|
||||||
|
"Error querying encoder params");
|
||||||
|
}
|
||||||
|
|
||||||
ret = MFXVideoENCODE_QueryIOSurf(q->session, &q->param, &q->req);
|
ret = MFXVideoENCODE_QueryIOSurf(q->session, &q->param, &q->req);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ff_qsv_print_error(avctx, ret,
|
return ff_qsv_print_error(avctx, ret,
|
||||||
"Error querying the encoding parameters");
|
"Error querying (IOSurf) the encoding parameters");
|
||||||
|
|
||||||
if (opaque_alloc) {
|
if (opaque_alloc) {
|
||||||
ret = qsv_init_opaque_alloc(avctx, q);
|
ret = qsv_init_opaque_alloc(avctx, q);
|
||||||
|
|||||||
Reference in New Issue
Block a user