Discussion:
[PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
(too old to reply)
Daniel Charles
2016-10-18 00:44:35 UTC
Permalink
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.

Also change the style on the code modified to be common
on all cases

Signed-off-by: Daniel Charles <***@intel.com>
---
src/i965_drv_video.c | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 9 deletions(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_MPEG2_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_MPEG2_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965) && !HAS_MPEG2_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
case VAProfileVC1Advanced:
if (HAS_VC1_DECODING(i965) && entrypoint == VAEntrypointVLD) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
case VAProfileNone:
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_JPEG_ENCODING(i965) && entrypoint == VAEntrypointEncPicture)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965) && !HAS_JPEG_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_VP8_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_VP8_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965) && !HAS_VP8_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
case VAProfileH264StereoHigh:
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,

case VAProfileHEVCMain:
if ((HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965) && !HAS_HEVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }

break;

case VAProfileHEVCMain10:
if ((HAS_HEVC10_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC10_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965) && !HAS_HEVC10_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }

break;

case VAProfileVP9Profile0:
case VAProfileVP9Profile2:
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint == VAEntrypointVLD))
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint == VAEntrypointEncSlice))
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965->wrapper_pdrvctx)
+ } else if (profile == VAProfileVP9Profile0 && i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;

default:
--
2.5.5
Eoff, Ullysses A
2016-10-18 15:25:07 UTC
Permalink
Please run the tests... I suspect this patch will cause some to fail. Those tests will need updated too.

U. Artie
-----Original Message-----
Sent: Monday, October 17, 2016 5:45 PM
Subject: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_MPEG2_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_MPEG2_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965) && !HAS_MPEG2_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VC1_DECODING(i965) && entrypoint == VAEntrypointVLD) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_JPEG_ENCODING(i965) && entrypoint == VAEntrypointEncPicture)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965) && !HAS_JPEG_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_VP8_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_VP8_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965) && !HAS_VP8_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965) && !HAS_HEVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC10_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965) && !HAS_HEVC10_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint == VAEntrypointVLD))
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint == VAEntrypointEncSlice))
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965->wrapper_pdrvctx)
+ } else if (profile == VAProfileVP9Profile0 && i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Charles, Daniel
2016-10-18 17:20:07 UTC
Permalink
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to fail. Those tests will need updated too.
Ran the test suite on ToT, no regression found with this patch.
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Sent: Monday, October 17, 2016 5:45 PM
Subject: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_MPEG2_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_MPEG2_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965) && !HAS_MPEG2_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VC1_DECODING(i965) && entrypoint == VAEntrypointVLD) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_JPEG_ENCODING(i965) && entrypoint == VAEntrypointEncPicture)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965) && !HAS_JPEG_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_VP8_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_VP8_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965) && !HAS_VP8_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965) && !HAS_HEVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC10_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965) && !HAS_HEVC10_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint == VAEntrypointVLD))
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint == VAEntrypointEncSlice))
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965->wrapper_pdrvctx)
+ } else if (profile == VAProfileVP9Profile0 && i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Eoff, Ullysses A
2016-10-18 17:48:19 UTC
Permalink
-----Original Message-----
Sent: Tuesday, October 18, 2016 10:20 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to fail. Those tests will need updated too.
Ran the test suite on ToT, no regression found with this patch.
Ah yes, I see why now. The AVC and JPEG config tests still pass on most HW because UNSUPPORTED_PROFILE is only returned if *both* encode *and* decode are unsupported. Thus, if there is such HW that doesn't support one or the other then those tests will be regressed.
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Sent: Monday, October 17, 2016 5:45 PM
Subject: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_MPEG2_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_MPEG2_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965) && !HAS_MPEG2_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VC1_DECODING(i965) && entrypoint == VAEntrypointVLD) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_JPEG_ENCODING(i965) && entrypoint == VAEntrypointEncPicture)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965) && !HAS_JPEG_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_VP8_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_VP8_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965) && !HAS_VP8_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965) && !HAS_HEVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC10_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965) && !HAS_HEVC10_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint == VAEntrypointVLD))
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint == VAEntrypointEncSlice))
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965->wrapper_pdrvctx)
+ } else if (profile == VAProfileVP9Profile0 && i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Charles, Daniel
2016-10-18 18:09:09 UTC
Permalink
On Tue, Oct 18, 2016 at 10:48 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
-----Original Message-----
Sent: Tuesday, October 18, 2016 10:20 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to fail. Those tests will need updated too.
Ran the test suite on ToT, no regression found with this patch.
Ah yes, I see why now. The AVC and JPEG config tests still pass on most HW because UNSUPPORTED_PROFILE is only returned if *both* encode *and* decode are unsupported. Thus, if there is such HW that doesn't support one or the other then those tests will be regressed.
I am not sure I follow you here.

Unsupported Profile is sent when neither encoder and decoder are
supported (VC1 is only decoder, VPP is a special case and VP9 decoder
can also be hybrid on some h/w). When h/w only supports one of them
(regardless which it is), it should return UNSUPPORTED_ENTRYPOINT as
profile is supported at least once. This patch is not changing this
last scenario. My testing was done on a h/w that has Jpeg Decoder but
no Jpeg Encoder and everything is okay.
--
Daniel.
Post by Eoff, Ullysses A
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Sent: Monday, October 17, 2016 5:45 PM
Subject: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_MPEG2_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_MPEG2_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965) && !HAS_MPEG2_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VC1_DECODING(i965) && entrypoint == VAEntrypointVLD) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_JPEG_ENCODING(i965) && entrypoint == VAEntrypointEncPicture)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965) && !HAS_JPEG_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_VP8_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_VP8_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965) && !HAS_VP8_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965) && !HAS_HEVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC10_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965) && !HAS_HEVC10_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint == VAEntrypointVLD))
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint == VAEntrypointEncSlice))
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965->wrapper_pdrvctx)
+ } else if (profile == VAProfileVP9Profile0 && i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Eoff, Ullysses A
2016-10-18 18:26:06 UTC
Permalink
-----Original Message-----
Sent: Tuesday, October 18, 2016 11:09 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
On Tue, Oct 18, 2016 at 10:48 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
-----Original Message-----
Sent: Tuesday, October 18, 2016 10:20 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to fail. Those tests will need updated too.
Ran the test suite on ToT, no regression found with this patch.
Ah yes, I see why now. The AVC and JPEG config tests still pass on most HW because UNSUPPORTED_PROFILE is only returned if
*both* encode *and* decode are unsupported. Thus, if there is such HW that doesn't support one or the other then those tests will
be regressed.
I am not sure I follow you here.
Unsupported Profile is sent when neither encoder and decoder are
supported (VC1 is only decoder, VPP is a special case and VP9 decoder
can also be hybrid on some h/w). When h/w only supports one of them
(regardless which it is), it should return UNSUPPORTED_ENTRYPOINT as
profile is supported at least once. This patch is not changing this
last scenario. My testing was done on a h/w that has Jpeg Decoder but
no Jpeg Encoder and everything is okay.
Right now, there are tests for AVC and JPEG that create a config for encode and decode entrypoints. Each test defines its own expected result of CreateConfig and compares with the actual result. If there is a platform that doesn't support any of the entrypoints for AVC or JPEG, then the expected result will be calculated wrong (i.e. the test expectation is not taking into account your new changes). (See i965_avce_config_test.cpp, i965_avcd_config_test.cpp, i965_jpege_config_test.cpp and i965_jpegd_config_test.cpp).

U. Artie
--
Daniel.
Post by Eoff, Ullysses A
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Sent: Monday, October 17, 2016 5:45 PM
Subject: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return unsupported profile
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_MPEG2_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_MPEG2_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965) && !HAS_MPEG2_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
(HAS_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSlice) ||
(HAS_LP_H264_ENCODING(i965) && entrypoint == VAEntrypointEncSliceLP)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965) && !HAS_H264_ENCODING(i965) &&
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VC1_DECODING(i965) && entrypoint == VAEntrypointVLD) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_JPEG_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_JPEG_ENCODING(i965) && entrypoint == VAEntrypointEncPicture)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965) && !HAS_JPEG_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_VP8_DECODING(i965) && entrypoint == VAEntrypointVLD) ||
(HAS_VP8_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965) && !HAS_VP8_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint == VAEntrypointEncSlice)) {
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
if ((HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965) && !HAS_HEVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint == VAEntrypointVLD))||
- (HAS_HEVC10_ENCODING(i965) && (entrypoint == VAEntrypointEncSlice)))
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965) && !HAS_HEVC10_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint == VAEntrypointVLD))
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint == VAEntrypointEncSlice))
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965->wrapper_pdrvctx)
+ } else if (profile == VAProfileVP9Profile0 && i965->wrapper_pdrvctx) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Xiang, Haihao
2016-10-19 13:25:14 UTC
Permalink
Neither JPEG decoding nor JPEG encoding is supported on SNB, JPEG cases will fail on SNB if don't change JPEG cases accordingly. On the old g4x, AVC cases will fail too.

Thanks
Haihao
-----Original Message-----
Ullysses A
Sent: Wednesday, October 19, 2016 2:26 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return
unsupported profile
-----Original Message-----
Sent: Tuesday, October 18, 2016 11:09 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return
unsupported profile
On Tue, Oct 18, 2016 at 10:48 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
-----Original Message-----
Sent: Tuesday, October 18, 2016 10:20 AM
return unsupported profile
Post by Eoff, Ullysses A
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to fail. Those
tests will need updated too.
Post by Eoff, Ullysses A
Ran the test suite on ToT, no regression found with this patch.
Ah yes, I see why now. The AVC and JPEG config tests still pass on most
HW because UNSUPPORTED_PROFILE is only returned if
*both* encode *and* decode are unsupported. Thus, if there is such HW
that doesn't support one or the other then those tests will
be regressed.
I am not sure I follow you here.
Unsupported Profile is sent when neither encoder and decoder are
supported (VC1 is only decoder, VPP is a special case and VP9 decoder
can also be hybrid on some h/w). When h/w only supports one of them
(regardless which it is), it should return UNSUPPORTED_ENTRYPOINT as
profile is supported at least once. This patch is not changing this
last scenario. My testing was done on a h/w that has Jpeg Decoder but
no Jpeg Encoder and everything is okay.
Right now, there are tests for AVC and JPEG that create a config for encode
and decode entrypoints. Each test defines its own expected result of
CreateConfig and compares with the actual result. If there is a platform that
doesn't support any of the entrypoints for AVC or JPEG, then the expected
result will be calculated wrong (i.e. the test expectation is not taking into
account your new changes). (See i965_avce_config_test.cpp,
i965_avcd_config_test.cpp, i965_jpege_config_test.cpp and
i965_jpegd_config_test.cpp).
U. Artie
--
Daniel.
Post by Eoff, Ullysses A
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Of Daniel Charles
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
Sent: Monday, October 17, 2016 5:45 PM
return unsupported profile
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49
++++++++++++++++++++++++++++++++++++++++---------
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_MPEG2_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_MPEG2_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965)
&& !HAS_MPEG2_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_H264_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_LP_H264_ENCODING(i965) && entrypoint ==
VAEntrypointEncSliceLP)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965)
&& !HAS_H264_ENCODING(i965) &&
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if (HAS_VC1_DECODING(i965) && entrypoint ==
VAEntrypointVLD) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_JPEG_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_JPEG_ENCODING(i965) && entrypoint ==
VAEntrypointEncPicture)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965)
&& !HAS_JPEG_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_VP8_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_VP8_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965)
&& !HAS_VP8_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_HEVC_DECODING(i965) && (entrypoint ==
VAEntrypointVLD))||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
- (HAS_HEVC_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice)))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_HEVC_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice))) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965)
&& !HAS_HEVC_ENCODING(i965)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint ==
VAEntrypointVLD))||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
- (HAS_HEVC10_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice)))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965)
&& !HAS_HEVC10_ENCODING(i965)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint
== VAEntrypointVLD))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint ==
VAEntrypointEncSlice))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965-
wrapper_pdrvctx)
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ } else if (profile == VAProfileVP9Profile0 && i965-
wrapper_pdrvctx) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Charles, Daniel
2016-10-19 17:30:13 UTC
Permalink
I'll add the patch to the test for jpeg and avc to adapt to this
change as the tests currently only account for UNSUPPORTED_ENTRYPOINT

Thanks for the feedback Haihao and Artie.
--
Daniel.
Post by Xiang, Haihao
Neither JPEG decoding nor JPEG encoding is supported on SNB, JPEG cases will fail on SNB if don't change JPEG cases accordingly. On the old g4x, AVC cases will fail too.
Thanks
Haihao
-----Original Message-----
Ullysses A
Sent: Wednesday, October 19, 2016 2:26 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return
unsupported profile
-----Original Message-----
Sent: Tuesday, October 18, 2016 11:09 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver] i965_validate_config: return
unsupported profile
On Tue, Oct 18, 2016 at 10:48 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
-----Original Message-----
Sent: Tuesday, October 18, 2016 10:20 AM
return unsupported profile
Post by Eoff, Ullysses A
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to fail. Those
tests will need updated too.
Post by Eoff, Ullysses A
Ran the test suite on ToT, no regression found with this patch.
Ah yes, I see why now. The AVC and JPEG config tests still pass on most
HW because UNSUPPORTED_PROFILE is only returned if
*both* encode *and* decode are unsupported. Thus, if there is such HW
that doesn't support one or the other then those tests will
be regressed.
I am not sure I follow you here.
Unsupported Profile is sent when neither encoder and decoder are
supported (VC1 is only decoder, VPP is a special case and VP9 decoder
can also be hybrid on some h/w). When h/w only supports one of them
(regardless which it is), it should return UNSUPPORTED_ENTRYPOINT as
profile is supported at least once. This patch is not changing this
last scenario. My testing was done on a h/w that has Jpeg Decoder but
no Jpeg Encoder and everything is okay.
Right now, there are tests for AVC and JPEG that create a config for encode
and decode entrypoints. Each test defines its own expected result of
CreateConfig and compares with the actual result. If there is a platform that
doesn't support any of the entrypoints for AVC or JPEG, then the expected
result will be calculated wrong (i.e. the test expectation is not taking into
account your new changes). (See i965_avce_config_test.cpp,
i965_avcd_config_test.cpp, i965_jpege_config_test.cpp and
i965_jpegd_config_test.cpp).
U. Artie
--
Daniel.
Post by Eoff, Ullysses A
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Of Daniel Charles
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
Sent: Monday, October 17, 2016 5:45 PM
return unsupported profile
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49
++++++++++++++++++++++++++++++++++++++++---------
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_MPEG2_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_MPEG2_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965)
&& !HAS_MPEG2_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_H264_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_LP_H264_ENCODING(i965) && entrypoint ==
VAEntrypointEncSliceLP)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965)
&& !HAS_H264_ENCODING(i965) &&
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if (HAS_VC1_DECODING(i965) && entrypoint ==
VAEntrypointVLD) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if (HAS_VPP(i965) && VAEntrypointVideoProc == entrypoint) {
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_JPEG_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_JPEG_ENCODING(i965) && entrypoint ==
VAEntrypointEncPicture)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965)
&& !HAS_JPEG_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_VP8_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_VP8_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965)
&& !HAS_VP8_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_HEVC_DECODING(i965) && (entrypoint ==
VAEntrypointVLD))||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
- (HAS_HEVC_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice)))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_HEVC_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice))) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965)
&& !HAS_HEVC_ENCODING(i965)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint ==
VAEntrypointVLD))||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
- (HAS_HEVC10_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice)))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965)
&& !HAS_HEVC10_ENCODING(i965)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) && (entrypoint
== VAEntrypointVLD))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint ==
VAEntrypointEncSlice))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965-
wrapper_pdrvctx)
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ } else if (profile == VAProfileVP9Profile0 && i965-
wrapper_pdrvctx) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) && !i965->wrapper_pdrvctx) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
Sean V Kelley
2016-10-24 22:34:12 UTC
Permalink
MJPEG Encoding will fail on more than just SNB - IVB, Haswell, Broadwell,
etc. Make sure the tests identify the requisite platforms.
Post by Xiang, Haihao
Neither JPEG decoding nor JPEG encoding is supported on SNB, JPEG cases
will fail on SNB if don't change JPEG cases accordingly. On the old g4x,
AVC cases will fail too.
Thanks
Haihao
-----Original Message-----
Eoff,
Ullysses A
Sent: Wednesday, October 19, 2016 2:26 AM
return
unsupported profile
-----Original Message-----
Sent: Tuesday, October 18, 2016 11:09 AM
return
unsupported profile
On Tue, Oct 18, 2016 at 10:48 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
-----Original Message-----
Sent: Tuesday, October 18, 2016 10:20 AM
Subject: Re: [Libva] [PATCH][libva-intel-driver]
return unsupported profile
Post by Eoff, Ullysses A
On Tue, Oct 18, 2016 at 8:25 AM, Eoff, Ullysses A
Post by Eoff, Ullysses A
Please run the tests... I suspect this patch will cause some to
fail. Those
tests will need updated too.
Post by Eoff, Ullysses A
Ran the test suite on ToT, no regression found with this patch.
Ah yes, I see why now. The AVC and JPEG config tests still pass on
most
HW because UNSUPPORTED_PROFILE is only returned if
*both* encode *and* decode are unsupported. Thus, if there is such HW
that doesn't support one or the other then those tests will
be regressed.
I am not sure I follow you here.
Unsupported Profile is sent when neither encoder and decoder are
supported (VC1 is only decoder, VPP is a special case and VP9 decoder
can also be hybrid on some h/w). When h/w only supports one of them
(regardless which it is), it should return UNSUPPORTED_ENTRYPOINT as
profile is supported at least once. This patch is not changing this
last scenario. My testing was done on a h/w that has Jpeg Decoder but
no Jpeg Encoder and everything is okay.
Right now, there are tests for AVC and JPEG that create a config for
encode
and decode entrypoints. Each test defines its own expected result of
CreateConfig and compares with the actual result. If there is a platform
that
doesn't support any of the entrypoints for AVC or JPEG, then the expected
result will be calculated wrong (i.e. the test expectation is not taking
into
account your new changes). (See i965_avce_config_test.cpp,
i965_avcd_config_test.cpp, i965_jpege_config_test.cpp and
i965_jpegd_config_test.cpp).
U. Artie
--
Daniel.
Post by Eoff, Ullysses A
--
Daniel.
Post by Eoff, Ullysses A
U. Artie
-----Original Message-----
Behalf
Of Daniel Charles
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
Sent: Monday, October 17, 2016 5:45 PM
return unsupported profile
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.
Also change the style on the code modified to be common
on all cases
---
src/i965_drv_video.c | 49
++++++++++++++++++++++++++++++++++++++++---------
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
1 file changed, 40 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index fbf2cda..0830ae0 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -711,6 +711,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_MPEG2_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_MPEG2_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_MPEG2_DECODING(i965)
&& !HAS_MPEG2_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -723,6 +725,9 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_H264_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_LP_H264_ENCODING(i965) && entrypoint ==
VAEntrypointEncSliceLP)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_H264_DECODING(i965)
&& !HAS_H264_ENCODING(i965) &&
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ !HAS_LP_H264_ENCODING(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -733,6 +738,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if (HAS_VC1_DECODING(i965) && entrypoint ==
VAEntrypointVLD) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VC1_DECODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -741,6 +748,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if (HAS_VPP(i965) && VAEntrypointVideoProc ==
entrypoint) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VPP(i965)){
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -750,6 +759,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_JPEG_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_JPEG_ENCODING(i965) && entrypoint ==
VAEntrypointEncPicture)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_JPEG_DECODING(i965)
&& !HAS_JPEG_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -759,6 +770,8 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_VP8_DECODING(i965) && entrypoint ==
VAEntrypointVLD) ||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
(HAS_VP8_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
+ } else if (!HAS_VP8_DECODING(i965)
&& !HAS_VP8_ENCODING(i965)){
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -768,8 +781,12 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_H264_MVC_DECODING_PROFILE(i965, profile) &&
entrypoint == VAEntrypointVLD) ||
- (HAS_H264_MVC_ENCODING(i965) && entrypoint ==
VAEntrypointEncSlice)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_H264_MVC_ENCODING(i965) &&
+ entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
+ } else if(!HAS_H264_MVC_DECODING_PROFILE(i965, profile)
&&
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ !HAS_H264_MVC_ENCODING(i965)) {
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
} else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
@@ -778,32 +795,46 @@ i965_validate_config(VADriverContextP ctx,
VAProfile profile,
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
if ((HAS_HEVC_DECODING(i965) && (entrypoint ==
VAEntrypointVLD))||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
- (HAS_HEVC_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice)))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_HEVC_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice))) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC_DECODING(i965)
&& !HAS_HEVC_ENCODING(i965)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
if ((HAS_HEVC10_DECODING(i965) && (entrypoint ==
VAEntrypointVLD))||
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
- (HAS_HEVC10_ENCODING(i965) && (entrypoint ==
VAEntrypointEncSlice)))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ (HAS_HEVC10_ENCODING(i965) &&
+ (entrypoint == VAEntrypointEncSlice))) {
va_status = VA_STATUS_SUCCESS;
- else
+ } else if (!HAS_HEVC10_DECODING(i965)
&& !HAS_HEVC10_ENCODING(i965)) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
break;
- if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
(entrypoint
== VAEntrypointVLD))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ if ((HAS_VP9_DECODING_PROFILE(i965, profile)) &&
+ (entrypoint == VAEntrypointVLD)) {
va_status = VA_STATUS_SUCCESS;
- else if ((HAS_VP9_ENCODING(i965)) && (entrypoint ==
VAEntrypointEncSlice))
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ } else if ((HAS_VP9_ENCODING(i965)) &&
+ (entrypoint == VAEntrypointEncSlice)) {
va_status = VA_STATUS_SUCCESS;
- else if ((profile == VAProfileVP9Profile0) && i965-
wrapper_pdrvctx)
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ } else if (profile == VAProfileVP9Profile0 && i965-
wrapper_pdrvctx) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
va_status = VA_STATUS_SUCCESS;
- else
+ } else if(!HAS_VP9_DECODING_PROFILE(i965, profile) &&
+ !HAS_VP9_ENCODING(i965) &&
!i965->wrapper_pdrvctx) {
Post by Eoff, Ullysses A
Post by Eoff, Ullysses A
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ } else {
va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+
break;
--
2.5.5
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
_______________________________________________
Libva mailing list
https://lists.freedesktop.org/mailman/listinfo/libva
--
Sean V. Kelley <***@intel.com>
Open Source Technology Center / SSG
Intel Corp.
Loading...