summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2014-04-16 12:17:23 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2014-09-09 01:18:36 +0800
commitd7e33a9ce16440c10ba96bf3b47f0f8a4ae43167 (patch)
tree6711ce53e8869e7b459dd103900a6d4bc9495e6d
parent2e90a47d9ec2c28907d5530fccb1de04bf715c14 (diff)
downloadlibva-d7e33a9ce16440c10ba96bf3b47f0f8a4ae43167.tar.gz
test/avcenc: Remove the dynamic shrink of coded buffer
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 296e5a548b260fcca5713bbb3ed6477f63ac977f)
-rw-r--r--test/encode/avcenc.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/test/encode/avcenc.c b/test/encode/avcenc.c
index 84d217a..2064e43 100644
--- a/test/encode/avcenc.c
+++ b/test/encode/avcenc.c
@@ -1285,20 +1285,6 @@ store_coded_buffer(FILE *avc_fp, int slice_type)
w_items = fwrite(coded_mem, slice_data_length, 1, avc_fp);
} while (w_items != 1);
- if (slice_type == SLICE_TYPE_I) {
- if (avcenc_context.codedbuf_i_size > slice_data_length * 3 / 2) {
- avcenc_context.codedbuf_i_size = slice_data_length * 3 / 2;
- }
-
- if (avcenc_context.codedbuf_pb_size < slice_data_length) {
- avcenc_context.codedbuf_pb_size = slice_data_length;
- }
- } else {
- if (avcenc_context.codedbuf_pb_size > slice_data_length * 3 / 2) {
- avcenc_context.codedbuf_pb_size = slice_data_length * 3 / 2;
- }
- }
-
vaUnmapBuffer(va_dpy, avcenc_context.codedbuf_buf_id);
return 0;
@@ -1523,7 +1509,7 @@ static void avcenc_context_init(int width, int height)
avcenc_context.codedbuf_buf_id = VA_INVALID_ID;
avcenc_context.misc_parameter_hrd_buf_id = VA_INVALID_ID;
avcenc_context.codedbuf_i_size = width * height;
- avcenc_context.codedbuf_pb_size = 0;
+ avcenc_context.codedbuf_pb_size = width * height;
avcenc_context.current_input_surface = SID_INPUT_PICTURE_0;
avcenc_context.upload_thread_value = -1;
avcenc_context.packed_sei_header_param_buf_id = VA_INVALID_ID;