hardware/intel/intel-driver
リビジョン | 8e0a1017c327cfad275ec4f7f4e56b6f95d52037 (tree) |
---|---|
日時 | 2016-05-26 13:54:42 |
作者 | Zhao Yakui <yakui.zhao@inte...> |
コミッター | Xiang, Haihao |
Add the VAEncMacroblockMapBufferType buffer for encoding
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
@@ -2090,6 +2090,7 @@ i965_destroy_context(struct object_heap *heap, struct object_base *obj) | ||
2090 | 2090 | i965_release_buffer_store(&obj_context->codec_state.encode.packed_header_data_ext[i]); |
2091 | 2091 | free(obj_context->codec_state.encode.packed_header_data_ext); |
2092 | 2092 | |
2093 | + i965_release_buffer_store(&obj_context->codec_state.encode.encmb_map); | |
2093 | 2094 | } else { |
2094 | 2095 | assert(obj_context->codec_state.decode.num_slice_params <= obj_context->codec_state.decode.max_slice_params); |
2095 | 2096 | assert(obj_context->codec_state.decode.num_slice_datas <= obj_context->codec_state.decode.max_slice_datas); |
@@ -2361,6 +2362,7 @@ i965_create_buffer_internal(VADriverContextP ctx, | ||
2361 | 2362 | case VAProcFilterParameterBufferType: |
2362 | 2363 | case VAHuffmanTableBufferType: |
2363 | 2364 | case VAProbabilityBufferType: |
2365 | + case VAEncMacroblockMapBufferType: | |
2364 | 2366 | /* Ok */ |
2365 | 2367 | break; |
2366 | 2368 |
@@ -2421,6 +2423,7 @@ i965_create_buffer_internal(VADriverContextP ctx, | ||
2421 | 2423 | } else if (type == VASliceDataBufferType || |
2422 | 2424 | type == VAImageBufferType || |
2423 | 2425 | type == VAEncCodedBufferType || |
2426 | + type == VAEncMacroblockMapBufferType || | |
2424 | 2427 | type == VAProbabilityBufferType) { |
2425 | 2428 | |
2426 | 2429 | /* If the buffer is wrapped, the bo/buffer of buffer_store is bogus. |
@@ -2799,6 +2802,7 @@ i965_BeginPicture(VADriverContextP ctx, | ||
2799 | 2802 | obj_context->codec_state.encode.num_packed_header_data_ext = 0; |
2800 | 2803 | obj_context->codec_state.encode.slice_index = 0; |
2801 | 2804 | obj_context->codec_state.encode.vps_sps_seq_index = 0; |
2805 | + i965_release_buffer_store(&obj_context->codec_state.encode.encmb_map); | |
2802 | 2806 | } else { |
2803 | 2807 | obj_context->codec_state.decode.current_render_target = render_target; |
2804 | 2808 | i965_release_buffer_store(&obj_context->codec_state.decode.pic_param); |
@@ -3064,6 +3068,7 @@ DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(huffman_table, huffman_table) | ||
3064 | 3068 | /* extended buffer */ |
3065 | 3069 | DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(sequence_parameter_ext, seq_param_ext) |
3066 | 3070 | DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(picture_parameter_ext, pic_param_ext) |
3071 | +DEF_RENDER_ENCODE_SINGLE_BUFFER_FUNC(encmb_map, encmb_map) | |
3067 | 3072 | |
3068 | 3073 | #define DEF_RENDER_ENCODE_MULTI_BUFFER_FUNC(name, member) DEF_RENDER_MULTI_BUFFER_FUNC(encode, name, member) |
3069 | 3074 | // DEF_RENDER_ENCODE_MULTI_BUFFER_FUNC(slice_parameter, slice_params) |
@@ -3335,6 +3340,10 @@ i965_encoder_render_picture(VADriverContextP ctx, | ||
3335 | 3340 | obj_buffer); |
3336 | 3341 | break; |
3337 | 3342 | |
3343 | + case VAEncMacroblockMapBufferType: | |
3344 | + vaStatus = I965_RENDER_ENCODE_BUFFER(encmb_map); | |
3345 | + break; | |
3346 | + | |
3338 | 3347 | default: |
3339 | 3348 | vaStatus = VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE; |
3340 | 3349 | break; |
@@ -159,6 +159,7 @@ struct encode_state | ||
159 | 159 | struct buffer_store *packed_header_param[5]; |
160 | 160 | struct buffer_store *packed_header_data[5]; |
161 | 161 | struct buffer_store **slice_params_ext; |
162 | + struct buffer_store *encmb_map; | |
162 | 163 | int max_slice_params_ext; |
163 | 164 | int num_slice_params_ext; |
164 | 165 |