From ee4439c562e88446b94fbb98e9d02ad105efc01e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Mon, 7 Apr 2014 17:26:31 +0200 Subject: [PATCH] radeon/vce: remove RVCE_NUM_CPB_EXTRA_FRAMES MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Doesn't seems to be needed any more. Signed-off-by: Christian König --- src/gallium/drivers/radeon/radeon_vce.c | 2 +- src/gallium/drivers/radeon/radeon_vce.h | 1 - src/gallium/drivers/radeon/radeon_vce_40_2_2.c | 3 +-- 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; } -- 2.30.2