diff options
author | Indrajit Das <[email protected]> | 2018-01-10 15:10:17 +0530 |
---|---|---|
committer | Christian König <[email protected]> | 2018-01-16 10:50:08 +0100 |
commit | 38dee62c9a0ced17fb1f25256f9da3b163a16f81 (patch) | |
tree | 7c41c849b46d4ab248511bb0faa902954ef825f1 /src/gallium/drivers/radeon/radeon_uvd.c | |
parent | 1cbcd70b64860b7e23202919229595b18cd4fbb6 (diff) |
radeon/uvd: update quantiser matrices only when requested
Only upload them when the pointers are valid.
Signed-off-by: Indrajit Das <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_uvd.c')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_uvd.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c index b46ee6e3c40..78ced179bb4 100644 --- a/src/gallium/drivers/radeon/radeon_uvd.c +++ b/src/gallium/drivers/radeon/radeon_uvd.c @@ -871,12 +871,17 @@ static struct ruvd_mpeg2 get_mpeg2_msg(struct ruvd_decoder *dec, for (i = 0; i < 2; ++i) result.ref_pic_idx[i] = get_ref_pic_idx(dec, pic->ref[i]); - result.load_intra_quantiser_matrix = 1; - result.load_nonintra_quantiser_matrix = 1; - - for (i = 0; i < 64; ++i) { - result.intra_quantiser_matrix[i] = pic->intra_matrix[zscan[i]]; - result.nonintra_quantiser_matrix[i] = pic->non_intra_matrix[zscan[i]]; + if(pic->intra_matrix) { + result.load_intra_quantiser_matrix = 1; + for (i = 0; i < 64; ++i) { + result.intra_quantiser_matrix[i] = pic->intra_matrix[zscan[i]]; + } + } + if(pic->non_intra_matrix) { + result.load_nonintra_quantiser_matrix = 1; + for (i = 0; i < 64; ++i) { + result.nonintra_quantiser_matrix[i] = pic->non_intra_matrix[zscan[i]]; + } } result.profile_and_level_indication = 0; |