• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/intel-driver


Commit MetaInfo

Révision1ae22a0549d30dd24991c4c2c9902e7b7a8d935e (tree)
l'heure2014-06-16 12:53:35
AuteurLi Xiaowei <xiaowei.a.li@inte...>
CommiterXiang, Haihao

Message de Log

encoder: MVC: Add support for MVC profiles

This is a part of bd630edd844b88ea543a027654db296ff7da16cd on staging

Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>

Change Summary

Modification

--- a/src/gen75_mfc.c
+++ b/src/gen75_mfc.c
@@ -427,7 +427,8 @@ static void gen75_mfc_init(VADriverContextP ctx,
427427 int height_in_mbs = 0;
428428 int slice_batchbuffer_size;
429429
430- if (encoder_context->codec == CODEC_H264) {
430+ if (encoder_context->codec == CODEC_H264 ||
431+ encoder_context->codec == CODEC_H264_MVC) {
431432 VAEncSequenceParameterBufferH264 *pSequenceParameter = (VAEncSequenceParameterBufferH264 *)encode_state->seq_param_ext->buffer;
432433 width_in_mbs = pSequenceParameter->picture_width_in_mbs;
433434 height_in_mbs = pSequenceParameter->picture_height_in_mbs;
@@ -1182,13 +1183,13 @@ gen75_mfc_avc_pipeline_slice_programing(VADriverContextP ctx,
11821183 assert(pPicParameter->pic_init_qp >= 0 && pPicParameter->pic_init_qp < 52);
11831184 assert(qp >= 0 && qp < 52);
11841185
1185- gen75_mfc_avc_slice_state(ctx,
1186+ gen75_mfc_avc_slice_state(ctx,
11861187 pPicParameter,
11871188 pSliceParameter,
11881189 encode_state, encoder_context,
11891190 (rate_control_mode == VA_RC_CBR), qp, slice_batch);
11901191
1191- if ( slice_index == 0)
1192+ if ( slice_index == 0)
11921193 intel_mfc_avc_pipeline_header_programing(ctx, encode_state, encoder_context, slice_batch);
11931194
11941195 slice_header_length_in_bits = build_avc_slice_header(pSequenceParameter, pPicParameter, pSliceParameter, &slice_header);
@@ -1199,6 +1200,8 @@ gen75_mfc_avc_pipeline_slice_programing(VADriverContextP ctx,
11991200 5, /* first 5 bytes are start code + nal unit type */
12001201 1, 0, 1, slice_batch);
12011202
1203+ free(slice_header);
1204+
12021205 dri_bo_map(vme_context->vme_output.bo , 1);
12031206 msg_ptr = (unsigned char *)vme_context->vme_output.bo->virtual;
12041207
@@ -1244,7 +1247,6 @@ gen75_mfc_avc_pipeline_slice_programing(VADriverContextP ctx,
12441247 1, 1, 1, 0, slice_batch);
12451248 }
12461249
1247- free(slice_header);
12481250
12491251 }
12501252
@@ -1556,6 +1558,7 @@ gen75_mfc_avc_batchbuffer_slice(VADriverContextP ctx,
15561558 0,
15571559 1,
15581560 slice_batch);
1561+
15591562 free(slice_header);
15601563
15611564 intel_batchbuffer_align(slice_batch, 16); /* aligned by an Oword */
@@ -2534,6 +2537,8 @@ static VAStatus gen75_mfc_pipeline(VADriverContextP ctx,
25342537 case VAProfileH264ConstrainedBaseline:
25352538 case VAProfileH264Main:
25362539 case VAProfileH264High:
2540+ case VAProfileH264MultiviewHigh:
2541+ case VAProfileH264StereoHigh:
25372542 vaStatus = gen75_mfc_avc_encode_picture(ctx, encode_state, encoder_context);
25382543 break;
25392544
--- a/src/gen75_vme.c
+++ b/src/gen75_vme.c
@@ -336,7 +336,8 @@ static VAStatus gen75_vme_constant_setup(VADriverContextP ctx,
336336
337337 vme_state_message = (unsigned int *)vme_context->vme_state_message;
338338
339- if (encoder_context->codec == CODEC_H264) {
339+ if (encoder_context->codec == CODEC_H264 ||
340+ encoder_context->codec == CODEC_H264_MVC) {
340341 if (vme_context->h264_level >= 30) {
341342 mv_num = 16;
342343
@@ -462,6 +463,7 @@ static VAStatus gen75_vme_vme_state_setup(VADriverContextP ctx,
462463
463464 switch (encoder_context->codec) {
464465 case CODEC_H264:
466+ case CODEC_H264_MVC:
465467 gen75_vme_state_setup_fixup(ctx, encode_state, encoder_context, vme_state_message);
466468
467469 break;
@@ -1010,6 +1012,7 @@ Bool gen75_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *
10101012
10111013 switch (encoder_context->codec) {
10121014 case CODEC_H264:
1015+ case CODEC_H264_MVC:
10131016 vme_kernel_list = gen75_vme_kernels;
10141017 encoder_context->vme_pipeline = gen75_vme_pipeline;
10151018 i965_kernel_num = sizeof(gen75_vme_kernels) / sizeof(struct i965_kernel);
--- a/src/gen8_mfc.c
+++ b/src/gen8_mfc.c
@@ -401,7 +401,8 @@ static void gen8_mfc_init(VADriverContextP ctx,
401401 int height_in_mbs = 0;
402402 int slice_batchbuffer_size;
403403
404- if (encoder_context->codec == CODEC_H264) {
404+ if (encoder_context->codec == CODEC_H264 ||
405+ encoder_context->codec == CODEC_H264_MVC) {
405406 VAEncSequenceParameterBufferH264 *pSequenceParameter = (VAEncSequenceParameterBufferH264 *)encode_state->seq_param_ext->buffer;
406407 width_in_mbs = pSequenceParameter->picture_width_in_mbs;
407408 height_in_mbs = pSequenceParameter->picture_height_in_mbs;
@@ -1046,13 +1047,13 @@ gen8_mfc_avc_pipeline_slice_programing(VADriverContextP ctx,
10461047 assert(pPicParameter->pic_init_qp >= 0 && pPicParameter->pic_init_qp < 52);
10471048 assert(qp >= 0 && qp < 52);
10481049
1049- gen8_mfc_avc_slice_state(ctx,
1050+ gen8_mfc_avc_slice_state(ctx,
10501051 pPicParameter,
10511052 pSliceParameter,
10521053 encode_state, encoder_context,
10531054 (rate_control_mode == VA_RC_CBR), qp, slice_batch);
10541055
1055- if ( slice_index == 0)
1056+ if ( slice_index == 0)
10561057 intel_mfc_avc_pipeline_header_programing(ctx, encode_state, encoder_context, slice_batch);
10571058
10581059 slice_header_length_in_bits = build_avc_slice_header(pSequenceParameter, pPicParameter, pSliceParameter, &slice_header);
@@ -1063,6 +1064,8 @@ gen8_mfc_avc_pipeline_slice_programing(VADriverContextP ctx,
10631064 5, /* first 5 bytes are start code + nal unit type */
10641065 1, 0, 1, slice_batch);
10651066
1067+ free(slice_header);
1068+
10661069 dri_bo_map(vme_context->vme_output.bo , 1);
10671070 msg_ptr = (unsigned char *)vme_context->vme_output.bo->virtual;
10681071
@@ -1108,7 +1111,6 @@ gen8_mfc_avc_pipeline_slice_programing(VADriverContextP ctx,
11081111 1, 1, 1, 0, slice_batch);
11091112 }
11101113
1111- free(slice_header);
11121114
11131115 }
11141116
@@ -1452,6 +1454,7 @@ gen8_mfc_avc_batchbuffer_slice(VADriverContextP ctx,
14521454 0,
14531455 1,
14541456 slice_batch);
1457+
14551458 free(slice_header);
14561459
14571460 intel_batchbuffer_align(slice_batch, 16); /* aligned by an Oword */
@@ -2435,6 +2438,8 @@ static VAStatus gen8_mfc_pipeline(VADriverContextP ctx,
24352438 case VAProfileH264ConstrainedBaseline:
24362439 case VAProfileH264Main:
24372440 case VAProfileH264High:
2441+ case VAProfileH264MultiviewHigh:
2442+ case VAProfileH264StereoHigh:
24382443 vaStatus = gen8_mfc_avc_encode_picture(ctx, encode_state, encoder_context);
24392444 break;
24402445
--- a/src/gen8_vme.c
+++ b/src/gen8_vme.c
@@ -321,7 +321,8 @@ static VAStatus gen8_vme_constant_setup(VADriverContextP ctx,
321321
322322 vme_state_message = (unsigned int *)vme_context->vme_state_message;
323323
324- if (encoder_context->codec == CODEC_H264) {
324+ if (encoder_context->codec == CODEC_H264 ||
325+ encoder_context->codec == CODEC_H264_MVC) {
325326 if (vme_context->h264_level >= 30) {
326327 mv_num = 16;
327328
@@ -1155,6 +1156,7 @@ Bool gen8_vme_context_init(VADriverContextP ctx, struct intel_encoder_context *e
11551156
11561157 switch (encoder_context->codec) {
11571158 case CODEC_H264:
1159+ case CODEC_H264_MVC:
11581160 vme_kernel_list = gen8_vme_kernels;
11591161 encoder_context->vme_pipeline = gen8_vme_pipeline;
11601162 i965_kernel_num = sizeof(gen8_vme_kernels) / sizeof(struct i965_kernel);