aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/qsvvpp.c
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2021-01-05 15:02:56 +0800
committerLinjie Fu <linjie.justin.fu@gmail.com>2021-01-23 16:10:16 +0000
commitb8cd37a59fe249daf9d84cb0d4ea0a6f42d208af (patch)
tree519dcdd968877920b86f35915a0b901dd85fdb3d /libavfilter/qsvvpp.c
parentdb28e9c1d98c956328dd106885b198c8b187202f (diff)
downloadffmpeg-b8cd37a59fe249daf9d84cb0d4ea0a6f42d208af.tar.gz
qsv: dump more info in error, debug and verbose mode
Dump iopattern mode and the SDK error/warning desciptions for qsv based filters and iopattern mode for qsvenc Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com
Diffstat (limited to 'libavfilter/qsvvpp.c')
-rw-r--r--libavfilter/qsvvpp.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
index b31082db03..f216b3f248 100644
--- a/libavfilter/qsvvpp.c
+++ b/libavfilter/qsvvpp.c
@@ -609,15 +609,19 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s)
}
}
- if (ret != MFX_ERR_NONE) {
- av_log(avctx, AV_LOG_ERROR, "Error getting the session handle\n");
+ if (ret < 0)
+ return ff_qsvvpp_print_error(avctx, ret, "Error getting the session handle");
+ else if (ret > 0) {
+ ff_qsvvpp_print_warning(avctx, ret, "Warning in getting the session handle");
return AVERROR_UNKNOWN;
}
/* create a "slave" session with those same properties, to be used for vpp */
ret = MFXInit(impl, &ver, &s->session);
- if (ret != MFX_ERR_NONE) {
- av_log(avctx, AV_LOG_ERROR, "Error initializing a session for scaling\n");
+ if (ret < 0)
+ return ff_qsvvpp_print_error(avctx, ret, "Error initializing a session");
+ else if (ret > 0) {
+ ff_qsvvpp_print_warning(avctx, ret, "Warning in session initialization");
return AVERROR_UNKNOWN;
}
@@ -750,11 +754,16 @@ int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *p
else if (IS_OPAQUE_MEMORY(s->out_mem_mode))
s->vpp_param.IOPattern |= MFX_IOPATTERN_OUT_OPAQUE_MEMORY;
+ /* Print input memory mode */
+ ff_qsvvpp_print_iopattern(avctx, s->vpp_param.IOPattern & 0x0F, "VPP");
+ /* Print output memory mode */
+ ff_qsvvpp_print_iopattern(avctx, s->vpp_param.IOPattern & 0xF0, "VPP");
ret = MFXVideoVPP_Init(s->session, &s->vpp_param);
if (ret < 0) {
- av_log(avctx, AV_LOG_ERROR, "Failed to create a qsvvpp, ret = %d.\n", ret);
+ ret = ff_qsvvpp_print_error(avctx, ret, "Failed to create a qsvvpp");
goto failed;
- }
+ } else if (ret > 0)
+ ff_qsvvpp_print_warning(avctx, ret, "Warning When creating qsvvpp");
*vpp = s;
return 0;