diff options
author | Leo Liu <[email protected]> | 2017-08-25 13:17:41 -0400 |
---|---|---|
committer | Leo Liu <[email protected]> | 2017-09-02 21:33:11 -0400 |
commit | 8514c5d0781e4e25669a2cd3bf8a547016b299a2 (patch) | |
tree | 3fbdf4b92dfd0727e75329f70dccde6fe681c51e /src/gallium/drivers/radeon/radeon_uvd.c | |
parent | 3b02a8e9ddf105c2c0cc8a4a57df1a21affeb070 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_uvd.c')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_uvd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index 228f654af1b..00d62670182 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; |