summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_vce.h
diff options
context:
space:
mode:
authorChristian König <[email protected]>2014-04-04 15:29:18 +0200
committerChristian König <[email protected]>2014-04-11 11:35:03 +0200
commita56fa0e83b7ba7d2d34179e782abe795a399a001 (patch)
treef0aaff17bfa1eeec446e93fd5cb5e5c7494f3ef9 /src/gallium/drivers/radeon/radeon_vce.h
parentd7d41ce133fa7369f7a5ea12bfc971c5ecafb3ba (diff)
radeon/vce: add proper CPB backtrack
Remember what frames we encoded at which position. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vce.h')
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.h b/src/gallium/drivers/radeon/radeon_vce.h
index 3ea738b9452..f815cad38aa 100644
--- a/src/gallium/drivers/radeon/radeon_vce.h
+++ b/src/gallium/drivers/radeon/radeon_vce.h
@@ -34,6 +34,8 @@
#ifndef RADEON_VCE_H
#define RADEON_VCE_H
+#include "util/u_double_list.h"
+
#define RVCE_RELOC(buf, usage, domain) (enc->ws->cs_add_reloc(enc->cs, (buf), (usage), domain, RADEON_PRIO_MIN))
#define RVCE_CS(value) (enc->cs->buf[enc->cs->cdw++] = (value))
@@ -52,6 +54,16 @@ typedef void (*rvce_get_buffer)(struct pipe_resource *resource,
struct radeon_winsys_cs_handle **handle,
struct radeon_surface **surface);
+/* Coded picture buffer slot */
+struct rvce_cpb_slot {
+ struct list_head list;
+
+ unsigned index;
+ enum pipe_h264_enc_picture_type picture_type;
+ unsigned frame_num;
+ unsigned pic_order_cnt;
+};
+
/* VCE encoder representation */
struct rvce_encoder {
struct pipe_video_codec base;
@@ -82,6 +94,9 @@ struct rvce_encoder {
struct radeon_winsys_cs_handle* bs_handle;
unsigned bs_size;
+ struct rvce_cpb_slot *cpb_array;
+ struct list_head cpb_slots;
+
struct rvid_buffer *fb;
struct rvid_buffer cpb;
struct pipe_h264_enc_picture_desc pic;