From a925ce7761eda9f5c1d9f1af1f9e4da8c3494d96 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Thu, 29 Nov 2012 09:56:06 +0800 Subject: [PATCH] mpeg2enc: f_code[s][t] follows the picture coding type Signed-off-by: Xiang, Haihao --- test/encode/mpeg2enc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/encode/mpeg2enc.c b/test/encode/mpeg2enc.c index d92b65f..d15cf37 100644 --- a/test/encode/mpeg2enc.c +++ b/test/encode/mpeg2enc.c @@ -958,6 +958,25 @@ mpeg2enc_update_picture_parameter(struct mpeg2enc_context *ctx, pic_param->reconstructed_picture = surface_ids[SID_RECON_PICTURE]; pic_param->forward_reference_picture = surface_ids[SID_REFERENCE_PICTURE_L0]; pic_param->backward_reference_picture = surface_ids[SID_REFERENCE_PICTURE_L1]; + + if (pic_param->picture_type == VAEncPictureTypeIntra) { + pic_param->f_code[0][0] = 0xf; + pic_param->f_code[0][1] = 0xf; + pic_param->f_code[1][0] = 0xf; + pic_param->f_code[1][1] = 0xf; + } else if (pic_param->picture_type == VAEncPictureTypePredictive) { + pic_param->f_code[0][0] = 0x1; + pic_param->f_code[0][1] = 0x1; + pic_param->f_code[1][0] = 0xf; + pic_param->f_code[1][1] = 0xf; + } else if (pic_param->picture_type == VAEncPictureTypeBidirectional) { + pic_param->f_code[0][0] = 0x1; + pic_param->f_code[0][1] = 0x1; + pic_param->f_code[1][0] = 0x1; + pic_param->f_code[1][1] = 0x1; + } else { + assert(0); + } } static void -- 2.7.4