summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <[email protected]>2014-04-07 17:26:31 +0200
committerChristian König <[email protected]>2014-04-11 11:35:02 +0200
commitee4439c562e88446b94fbb98e9d02ad105efc01e (patch)
treeeb575540749c00ead6ea4323ce6e331fa8e6bd90
parentce57c8e925a378593b77f04d19c395a7f1c8f82e (diff)
radeon/vce: remove RVCE_NUM_CPB_EXTRA_FRAMES
Doesn't seems to be needed any more. Signed-off-by: Christian König <[email protected]>
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.c2
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.h1
-rw-r--r--src/gallium/drivers/radeon/radeon_vce_40_2_2.c3
3 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index 4b824f9ef10..012b4f8e13e 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -262,7 +262,7 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
vpitch = align(tmp_surf->npix_y, 16);
tmp_buf->destroy(tmp_buf);
if (!rvid_create_buffer(enc->ws, &enc->cpb,
- pitch * vpitch * 1.5 * (RVCE_NUM_CPB_FRAMES + RVCE_NUM_CPB_EXTRA_FRAMES),
+ pitch * vpitch * 1.5 * RVCE_NUM_CPB_FRAMES,
RADEON_DOMAIN_VRAM)) {
RVID_ERR("Can't create CPB buffer.\n");
goto error;
diff --git a/src/gallium/drivers/radeon/radeon_vce.h b/src/gallium/drivers/radeon/radeon_vce.h
index 9dc0c68eefb..3ea738b9452 100644
--- a/src/gallium/drivers/radeon/radeon_vce.h
+++ b/src/gallium/drivers/radeon/radeon_vce.h
@@ -44,7 +44,6 @@
#define RVCE_END() *begin = (&enc->cs->buf[enc->cs->cdw] - begin) * 4; }
#define RVCE_NUM_CPB_FRAMES 2
-#define RVCE_NUM_CPB_EXTRA_FRAMES 2
struct r600_common_screen;
diff --git a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
index 26c362961b8..c41b2d03ab8 100644
--- a/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
+++ b/src/gallium/drivers/radeon/radeon_vce_40_2_2.c
@@ -224,9 +224,8 @@ static void frame_offset(struct rvce_encoder *enc, unsigned frame_num,
unsigned pitch = align(enc->luma->level[0].pitch_bytes, 128);
unsigned vpitch = align(enc->luma->npix_y, 16);
unsigned fsize = pitch * (vpitch + vpitch / 2);
- unsigned base_offset = RVCE_NUM_CPB_EXTRA_FRAMES * fsize;
- *luma_offset = base_offset + (frame_num % RVCE_NUM_CPB_FRAMES) * fsize;
+ *luma_offset = (frame_num % RVCE_NUM_CPB_FRAMES) * fsize;
*chroma_offset = *luma_offset + pitch * vpitch;
}