Mesa (master): radeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction
Leo Liu
leoliu at kemper.freedesktop.org
Sun Sep 3 01:35:24 UTC 2017
Module: Mesa
Branch: master
Commit: 8514c5d0781e4e25669a2cd3bf8a547016b299a2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8514c5d0781e4e25669a2cd3bf8a547016b299a2
Author: Leo Liu <leo.liu at amd.com>
Date: Fri Aug 25 13:17:41 2017 -0400
radeon/uvd: add Define Restart Interval to MJPEG bitstream reconstruction
It adds the capacity to decode MJPEG stream with DRI marker
Signed-off-by: Leo Liu <leo.liu at amd.com>
---
src/gallium/drivers/radeon/radeon_uvd.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index 228f654af1..00d6267018 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -1012,6 +1012,17 @@ static void get_mjpeg_slice_header(struct ruvd_decoder *dec, struct pipe_mjpeg_p
saved_size = size;
+ /* DRI */
+ if (pic->slice_parameter.restart_interval) {
+ buf[size++] = 0xff;
+ buf[size++] = 0xdd;
+ buf[size++] = 0x00;
+ buf[size++] = 0x04;
+ bs = (uint16_t*)&buf[size++];
+ *bs = util_bswap16(pic->slice_parameter.restart_interval);
+ saved_size = ++size;
+ }
+
/* SOF */
buf[size++] = 0xff;
buf[size++] = 0xc0;
More information about the mesa-commit
mailing list