From: Leo Liu Date: Tue, 15 Aug 2017 15:01:35 +0000 (-0400) Subject: st/va: add iq matrix handling for MJPEG X-Git-Tag: upstream/18.1.0~6729 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93577e608150b016c794dcc0db5aebc29cb9a89c;p=platform%2Fupstream%2Fmesa.git st/va: add iq matrix handling for MJPEG Signed-off-by: Leo Liu Reviewed-by: Christian König --- diff --git a/src/gallium/state_trackers/va/picture_mjpeg.c b/src/gallium/state_trackers/va/picture_mjpeg.c index 50f339e..09b2efc 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)