st/va: MPEG4 populate the SPS structure
authorMichael Varga <Michael.Varga@amd.com>
Thu, 23 Oct 2014 15:36:52 +0000 (10:36 -0500)
committerLeo Liu <leo.liu@amd.com>
Mon, 10 Nov 2014 15:24:07 +0000 (10:24 -0500)
Signed-off-by: Michael Varga <Michael.Varga@amd.com>
src/gallium/state_trackers/va/picture.c

index 327c33d9cb080ba6c687e301746f9c89c4e1b188..ff13bc66e74e9af2e9dd947ba05117435962e2b0 100644 (file)
@@ -344,6 +344,7 @@ static void
 handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf)
 {
    VASliceParameterBufferH264 *h264;
+   VASliceParameterBufferMPEG4 *mpeg4;
 
    switch (u_reduce_video_profile(context->decoder->profile)) {
    case PIPE_VIDEO_FORMAT_MPEG4_AVC:
@@ -354,7 +355,12 @@ handleSliceParameterBuffer(vlVaContext *context, vlVaBuffer *buf)
       context->desc.h264.num_ref_idx_l1_active_minus1 =
          h264->num_ref_idx_l1_active_minus1;
       break;
+   case PIPE_VIDEO_FORMAT_MPEG4:
+      assert(buf->size >= sizeof(VASliceParameterBufferMPEG4) && buf->num_elements == 1);
+      mpeg4 = buf->data;
 
+      context->mpeg4.quant_scale = mpeg4->quant_scale;
+      break;
    default:
       break;
    }