summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2012-12-05 16:18:20 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-12-07 16:05:35 +0800
commitaf0bcd2f61b931ec3b164a86db735d50105dea82 (patch)
tree8d051b795e68c1dd6c20c48c5ae87a5db15b64dc
parentc9a5d672a87cd92b0700972b12cd692bd4d071cd (diff)
downloadlibva-af0bcd2f61b931ec3b164a86db735d50105dea82.tar.gz
mpeg2enc: set the frames between I and P frames
The default valude is 2 Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
-rw-r--r--test/encode/mpeg2enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/encode/mpeg2enc.c b/test/encode/mpeg2enc.c
index aace552..29d9a99 100644
--- a/test/encode/mpeg2enc.c
+++ b/test/encode/mpeg2enc.c
@@ -101,6 +101,7 @@ struct mpeg2enc_context {
FILE *ofp;
unsigned char *frame_data_buffer;
int intra_period;
+ int ip_period;
int bit_rate; /* in kbps */
/* VA resource */
@@ -714,7 +715,7 @@ mpeg2enc_init_sequence_parameter(struct mpeg2enc_context *ctx,
}
seq_param->intra_period = ctx->intra_period;
- seq_param->ip_period = 0; /* FIXME: ??? */
+ seq_param->ip_period = ctx->ip_period; /* FIXME: ??? */
seq_param->picture_width = ctx->width;
seq_param->picture_height = ctx->height;
@@ -872,6 +873,7 @@ mpeg2enc_init(struct mpeg2enc_context *ctx)
ctx->codedbuf_buf_id = VA_INVALID_ID;
ctx->codedbuf_i_size = ctx->frame_size;
ctx->codedbuf_pb_size = 0;
+ ctx->ip_period = 2;
if (ctx->mode == MPEG2_MODE_I)
ctx->intra_period = 1;