From: Sajeesh Sidharthan Date: Sun, 20 Nov 2022 06:34:37 +0000 (-0800) Subject: frontends/va: remove unused slice_param_idx variable X-Git-Tag: upstream/23.3.3~16590 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d8caa44bd5a3e7397a77789a5fd1b1593df9d25;p=platform%2Fupstream%2Fmesa.git frontends/va: remove unused slice_param_idx variable slice_param_idx was added to handle multiple slice params. it's not used anymore. Signed-off-by: Sajeesh Sidharthan Reviewed-by: Boyuan Zhang Part-of: --- diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index 07844f6..5004782 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -261,7 +261,7 @@ handleIQMatrixBuffer(vlVaContext *context, vlVaBuffer *buf) } static void -handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf, unsigned num_slice_buffers, unsigned num_slices) +handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices) { switch (u_reduce_video_profile(context->templat.profile)) { case PIPE_VIDEO_FORMAT_MPEG12: @@ -293,7 +293,7 @@ handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf, unsigned num_s break; case PIPE_VIDEO_FORMAT_AV1: - vlVaHandleSliceParameterBufferAV1(context, buf, num_slice_buffers, num_slices); + vlVaHandleSliceParameterBufferAV1(context, buf, num_slices); break; default: @@ -694,7 +694,6 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff VAStatus vaStatus = VA_STATUS_SUCCESS; unsigned i; - unsigned slice_param_idx = 0; unsigned slice_idx = 0; if (!ctx) @@ -740,14 +739,10 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff /* Some apps like gstreamer send all the slices at once and some others send individual VASliceParameterBufferType buffers - slice_param_idx is the zero based count of VASliceParameterBufferType - (including multiple buffers with num_elements > 1) received - before this call to handleSliceParameterBuffer - slice_idx is the zero based number of total slices received before this call to handleSliceParameterBuffer */ - handleSliceParameterBuffer(context, buf, slice_param_idx++, slice_idx); + handleSliceParameterBuffer(context, buf, slice_idx); slice_idx += buf->num_elements; } break; diff --git a/src/gallium/frontends/va/picture_av1.c b/src/gallium/frontends/va/picture_av1.c index 899afe8..c5828c5 100644 --- a/src/gallium/frontends/va/picture_av1.c +++ b/src/gallium/frontends/va/picture_av1.c @@ -380,7 +380,7 @@ void vlVaHandlePictureParameterBufferAV1(vlVaDriver *drv, vlVaContext *context, } } -void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slice_buffers, unsigned num_slices) +void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices) { for (uint32_t buffer_idx = 0; buffer_idx < buf->num_elements; buffer_idx++) { uint32_t slice_index = diff --git a/src/gallium/frontends/va/va_private.h b/src/gallium/frontends/va/va_private.h index 08f2fc3..695b475 100644 --- a/src/gallium/frontends/va/va_private.h +++ b/src/gallium/frontends/va/va_private.h @@ -512,7 +512,7 @@ void vlVaHandlePictureParameterBufferVP9(vlVaDriver *drv, vlVaContext *context, void vlVaHandleSliceParameterBufferVP9(vlVaContext *context, vlVaBuffer *buf); void vlVaDecoderVP9BitstreamHeader(vlVaContext *context, vlVaBuffer *buf); void vlVaHandlePictureParameterBufferAV1(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf); -void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slice_buffers, unsigned num_slices); +void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned num_slices); void getEncParamPresetH264(vlVaContext *context); void getEncParamPresetH265(vlVaContext *context); void vlVaHandleVAEncMiscParameterTypeQualityLevel(struct pipe_enc_quality_modes *p, vlVaQualityBits *in);