Skip to content

Commit e0691ea

Browse files
Dmitry Rogozhkinxhaihao
authored andcommitted
qsv: Update ffmpeg qsv_errors to recognize GPU hang and other statuses
GPU hang is one of the most typical errors on Intel GPUs in case something goes wrong. It's important to recognize it explicitly for easier bugs triage. Also, this error code can be used to trigger GPU recovery path in self-written applications. There were 2 other statuses which MediaSDK can ppotentially return, MFX_ERR_NONE_PARTIAL_OUTPUT and MFX_ERR_REALLOC_SURFACE. Adding them as well. v2: move MFX_ERR_NONE_PARTIAL_OUTPUT next to MFX_WRN_* (Haihao) Signed-off-by: Hon Wai Chow <[email protected]> Signed-off-by: Dmitry Rogozhkin <[email protected]> Signed-off-by: Haihao Xiang <[email protected]>
1 parent 6b12208 commit e0691ea

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

libavcodec/qsv.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ static const struct {
125125
{ MFX_ERR_INVALID_VIDEO_PARAM, AVERROR(EINVAL), "invalid video parameters" },
126126
{ MFX_ERR_UNDEFINED_BEHAVIOR, AVERROR_BUG, "undefined behavior" },
127127
{ MFX_ERR_DEVICE_FAILED, AVERROR(EIO), "device failed" },
128+
{ MFX_ERR_GPU_HANG, AVERROR(EIO), "GPU Hang" },
129+
{ MFX_ERR_REALLOC_SURFACE, AVERROR_UNKNOWN, "need bigger surface for output" },
128130
{ MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio parameters" },
129131
{ MFX_ERR_INVALID_AUDIO_PARAM, AVERROR(EINVAL), "invalid audio parameters" },
130132

@@ -137,6 +139,10 @@ static const struct {
137139
{ MFX_WRN_OUT_OF_RANGE, 0, "value out of range" },
138140
{ MFX_WRN_FILTER_SKIPPED, 0, "filter skipped" },
139141
{ MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0, "incompatible audio parameters" },
142+
143+
#if QSV_VERSION_ATLEAST(1, 31)
144+
{ MFX_ERR_NONE_PARTIAL_OUTPUT, 0, "partial output" },
145+
#endif
140146
};
141147

142148
/**

libavfilter/qsvvpp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ static const struct {
100100
{ MFX_ERR_INVALID_VIDEO_PARAM, AVERROR(EINVAL), "invalid video parameters" },
101101
{ MFX_ERR_UNDEFINED_BEHAVIOR, AVERROR_BUG, "undefined behavior" },
102102
{ MFX_ERR_DEVICE_FAILED, AVERROR(EIO), "device failed" },
103+
{ MFX_ERR_GPU_HANG, AVERROR(EIO), "GPU Hang" },
104+
{ MFX_ERR_REALLOC_SURFACE, AVERROR_UNKNOWN, "need bigger surface for output" },
103105
{ MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio parameters" },
104106
{ MFX_ERR_INVALID_AUDIO_PARAM, AVERROR(EINVAL), "invalid audio parameters" },
105107

@@ -112,6 +114,10 @@ static const struct {
112114
{ MFX_WRN_OUT_OF_RANGE, 0, "value out of range" },
113115
{ MFX_WRN_FILTER_SKIPPED, 0, "filter skipped" },
114116
{ MFX_WRN_INCOMPATIBLE_AUDIO_PARAM, 0, "incompatible audio parameters" },
117+
118+
#if QSV_VERSION_ATLEAST(1, 31)
119+
{ MFX_ERR_NONE_PARTIAL_OUTPUT, 0, "partial output" },
120+
#endif
115121
};
116122

117123
static int qsv_map_error(mfxStatus mfx_err, const char **desc)

0 commit comments

Comments
 (0)