radeon/vce: remove RVCE_NUM_CPB_EXTRA_FRAMES
authorChristian König <christian.koenig@amd.com>
Mon, 7 Apr 2014 15:26:31 +0000 (17:26 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 11 Apr 2014 09:35:02 +0000 (11:35 +0200)
Doesn't seems to be needed any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_vce.c
src/gallium/drivers/radeon/radeon_vce.h
src/gallium/drivers/radeon/radeon_vce_40_2_2.c

index 4b824f9ef10620db1aba34a9f160e23836b18e93..012b4f8e13e757d77fa7bce929e8748a0340d781 100644 (file)
@@ -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;
index 9dc0c68eefb9109a40e4f6a3e281c038c8e54fa1..3ea738b9452018dec6239db249125cf4d4280e26 100644 (file)
@@ -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;
 
index 26c362961b8c0c2ec528f0d8db4f4a38ae0ff944..c41b2d03ab860ea4de55a684549756dc93372bd6 100644 (file)
@@ -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;
 }