diff options
author | Leo Liu <[email protected]> | 2017-08-15 11:01:35 -0400 |
---|---|---|
committer | Leo Liu <[email protected]> | 2017-08-21 10:09:09 -0400 |
commit | 93577e608150b016c794dcc0db5aebc29cb9a89c (patch) | |
tree | 272aa4a5df5533c66ae8c63fe941f8d4a9bbd0e1 | |
parent | 535b3c2363fd54c15f954306035e6b2ab7dc19f5 (diff) |
st/va: add iq matrix handling for MJPEG
Signed-off-by: Leo Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/va/picture_mjpeg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/picture_mjpeg.c b/src/gallium/state_trackers/va/picture_mjpeg.c index 50f339eebfb..09b2efc21b4 100644 --- a/src/gallium/state_trackers/va/picture_mjpeg.c +++ b/src/gallium/state_trackers/va/picture_mjpeg.c @@ -53,7 +53,12 @@ void vlVaHandlePictureParameterBufferMJPEG(vlVaDriver *drv, vlVaContext *context void vlVaHandleIQMatrixBufferMJPEG(vlVaContext *context, vlVaBuffer *buf) { - /* TODO */ + VAIQMatrixBufferJPEGBaseline *mjpeg = buf->data; + + assert(buf->size >= sizeof(VAIQMatrixBufferJPEGBaseline) && buf->num_elements == 1); + + memcpy(&context->desc.mjpeg.quantization_table.load_quantiser_table, mjpeg->load_quantiser_table, 4); + memcpy(&context->desc.mjpeg.quantization_table.quantiser_table, mjpeg->quantiser_table, 4 * 64); } void vlVaHandleHuffmanTableBufferType(vlVaContext *context, vlVaBuffer *buf) |