[Mesa-dev] [PATCH] st/va: remove assert for single slice
Christian König
deathsimple at vodafone.de
Thu Feb 2 10:04:24 UTC 2017
Am 01.02.2017 um 13:59 schrieb Nayan Deshmukh:
> we anyway allow for multiple slices
>
> Signed-off-by: Nayan Deshmukh <nayan26deshmukh at gmail.com>
> ---
> src/gallium/state_trackers/va/picture_mpeg12.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/va/picture_mpeg12.c b/src/gallium/state_trackers/va/picture_mpeg12.c
> index 812e9e5..4d9c45f 100644
> --- a/src/gallium/state_trackers/va/picture_mpeg12.c
> +++ b/src/gallium/state_trackers/va/picture_mpeg12.c
> @@ -81,6 +81,5 @@ void vlVaHandleIQMatrixBufferMPEG12(vlVaContext *context, vlVaBuffer *buf)
>
> void vlVaHandleSliceParameterBufferMPEG12(vlVaContext *context, vlVaBuffer *buf)
> {
> - assert(buf->size >= sizeof(VASliceParameterBufferMPEG2) && buf->num_elements == 1);
NAK, we can lower the requirements here, but we shouldn't completely
remove the assert.
Especially since we ignore all of the fields from the
VASliceParameterBufferMPEG2 structure and so won't catch errors.
Please test something like the following:
assert(buf->size >= (sizeof(VASliceParameterBufferMPEG2) *
buf->num_elements));
Regards,
Christian.
> context->desc.mpeg12.num_slices += buf->num_elements;
> }
More information about the mesa-dev
mailing list