frontends/va: remove unused slice_param_idx variable
authorSajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Sun, 20 Nov 2022 06:34:37 +0000 (22:34 -0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 21 Nov 2022 16:45:42 +0000 (16:45 +0000)
slice_param_idx was added to handle multiple slice params.
it's not used anymore.

Signed-off-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19877>

src/gallium/frontends/va/picture.c
src/gallium/frontends/va/picture_av1.c
src/gallium/frontends/va/va_private.h

index 07844f6..5004782 100644 (file)
@@ -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;
 
index 899afe8..c5828c5 100644 (file)
@@ -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 =
index 08f2fc3..695b475 100644 (file)
@@ -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);