hardware/intel/libva
リビジョン | d7e33a9ce16440c10ba96bf3b47f0f8a4ae43167 (tree) |
---|---|
日時 | 2014-09-09 02:18:36 |
作者 | Zhao Yakui <yakui.zhao@inte...> |
コミッター | Xiang, Haihao |
test/avcenc: Remove the dynamic shrink of coded buffer
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 296e5a548b260fcca5713bbb3ed6477f63ac977f)
@@ -1285,20 +1285,6 @@ store_coded_buffer(FILE *avc_fp, int slice_type) | ||
1285 | 1285 | w_items = fwrite(coded_mem, slice_data_length, 1, avc_fp); |
1286 | 1286 | } while (w_items != 1); |
1287 | 1287 | |
1288 | - if (slice_type == SLICE_TYPE_I) { | |
1289 | - if (avcenc_context.codedbuf_i_size > slice_data_length * 3 / 2) { | |
1290 | - avcenc_context.codedbuf_i_size = slice_data_length * 3 / 2; | |
1291 | - } | |
1292 | - | |
1293 | - if (avcenc_context.codedbuf_pb_size < slice_data_length) { | |
1294 | - avcenc_context.codedbuf_pb_size = slice_data_length; | |
1295 | - } | |
1296 | - } else { | |
1297 | - if (avcenc_context.codedbuf_pb_size > slice_data_length * 3 / 2) { | |
1298 | - avcenc_context.codedbuf_pb_size = slice_data_length * 3 / 2; | |
1299 | - } | |
1300 | - } | |
1301 | - | |
1302 | 1288 | vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id); |
1303 | 1289 | |
1304 | 1290 | return 0; |
@@ -1523,7 +1509,7 @@ static void avcenc_context_init(int width, int height) | ||
1523 | 1509 | avcenc_context.codedbuf_buf_id = VA_INVALID_ID; |
1524 | 1510 | avcenc_context.misc_parameter_hrd_buf_id = VA_INVALID_ID; |
1525 | 1511 | avcenc_context.codedbuf_i_size = width * height; |
1526 | - avcenc_context.codedbuf_pb_size = 0; | |
1512 | + avcenc_context.codedbuf_pb_size = width * height; | |
1527 | 1513 | avcenc_context.current_input_surface = SID_INPUT_PICTURE_0; |
1528 | 1514 | avcenc_context.upload_thread_value = -1; |
1529 | 1515 | avcenc_context.packed_sei_header_param_buf_id = VA_INVALID_ID; |