From 34a4dd5ecb2a5ffdd0d1fcc74a58a00f18230311 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Wed, 5 Dec 2012 16:18:20 +0800 Subject: [PATCH] mpeg2enc: set the frames between I and P frames The default valude is 2 Signed-off-by: Xiang, Haihao --- test/encode/mpeg2enc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/encode/mpeg2enc.c b/test/encode/mpeg2enc.c index e93d6b0..466fffa 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; @@ -870,6 +871,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; -- 2.7.4