summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_vce.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-10-26 18:48:36 +0200
committerMarek Olšák <[email protected]>2016-11-01 22:33:13 +0100
commite9c76eeeaa673331fec6056a4baa30095de42f5e (patch)
treedb1b94cd0e0af28090212f33865a2cf6a04eaee0 /src/gallium/drivers/radeon/radeon_vce.c
parentc66a550385b4937b2aaba8484aeaa41cf77399b7 (diff)
gallium/radeon: remove radeon_surf_level::pitch_bytes
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vce.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index 7e7bf2a6d56..2f50ef4a748 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -223,7 +223,7 @@ struct rvce_cpb_slot *l1_slot(struct rvce_encoder *enc)
void rvce_frame_offset(struct rvce_encoder *enc, struct rvce_cpb_slot *slot,
signed *luma_offset, signed *chroma_offset)
{
- unsigned pitch = align(enc->luma->level[0].pitch_bytes, 128);
+ unsigned pitch = align(enc->luma->level[0].nblk_x * enc->luma->bpe, 128);
unsigned vpitch = align(enc->luma->level[0].nblk_y, 16);
unsigned fsize = pitch * (vpitch + vpitch / 2);
@@ -454,7 +454,7 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
goto error;
get_buffer(((struct vl_video_buffer *)tmp_buf)->resources[0], NULL, &tmp_surf);
- cpb_size = align(tmp_surf->level[0].pitch_bytes, 128);
+ cpb_size = align(tmp_surf->level[0].nblk_x * tmp_surf->bpe, 128);
cpb_size = cpb_size * align(tmp_surf->level[0].nblk_y, 32);
cpb_size = cpb_size * 3 / 2;
cpb_size = cpb_size * enc->cpb_num;