summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMichael Varga <[email protected]>2014-10-23 10:18:09 -0500
committerLeo Liu <[email protected]>2014-11-10 10:24:07 -0500
commit92350a65c47f95e9630e815172529de4e583e247 (patch)
tree3639ee67a799f7fe385606e5e916317dc405c6d5 /src/gallium/state_trackers
parent9f1ee1b5c941422ae4761388b9562f4abd67c461 (diff)
st/va: MPEG4 populate the iq matrix buffers
Signed-off-by: Michael Varga <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/va/picture.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c
index a4eb26b406b..327c33d9cb0 100644
--- a/src/gallium/state_trackers/va/picture.c
+++ b/src/gallium/state_trackers/va/picture.c
@@ -296,6 +296,7 @@ handleIQMatrixBuffer(vlVaContext *context, vlVaBuffer *buf)
{
VAIQMatrixBufferMPEG2 *mpeg2;
VAIQMatrixBufferH264 *h264;
+ VAIQMatrixBufferMPEG4 *mpeg4;
switch (u_reduce_video_profile(context->decoder->profile)) {
case PIPE_VIDEO_FORMAT_MPEG12:
@@ -319,6 +320,21 @@ handleIQMatrixBuffer(vlVaContext *context, vlVaBuffer *buf)
memcpy(&context->desc.h264.pps->ScalingList8x8, h264->ScalingList8x8, 2 * 64);
break;
+ case PIPE_VIDEO_FORMAT_MPEG4:
+ assert(buf->size >= sizeof(VAIQMatrixBufferMPEG4) && buf->num_elements == 1);
+ mpeg4 = buf->data;
+
+ if (mpeg4->load_intra_quant_mat)
+ context->desc.mpeg4.intra_matrix = mpeg4->intra_quant_mat;
+ else
+ context->desc.mpeg4.intra_matrix = NULL;
+
+ if (mpeg4->load_non_intra_quant_mat)
+ context->desc.mpeg4.non_intra_matrix = mpeg4->non_intra_quant_mat;
+ else
+ context->desc.mpeg4.non_intra_matrix = NULL;
+ break;
+
default:
break;
}