# HG changeset patch
# User Min Chen <[email protected]>
# Date 1381840284 -28800
# Node ID 67e0b25b7cd380dcddc4e541d329749e0923ffc4
# Parent edccd210d53260d0807bf7539d060262694b5561
faster grow buffer size to reduce number of memcpy
diff -r edccd210d532 -r 67e0b25b7cd3 source/Lib/TLibCommon/TComBitStream.cpp
--- a/source/Lib/TLibCommon/TComBitStream.cpp Tue Oct 15 20:31:05 2013 +0800
+++ b/source/Lib/TLibCommon/TComBitStream.cpp Tue Oct 15 20:31:24 2013 +0800
@@ -212,7 +212,7 @@
}
else
{
- buffsize += MIN_FIFO_SIZE;
+ buffsize *= 2;
/** FIFO size is Reached into MIN_FIFO_SIZE then Reallocate the FIFO
and Copy the fifo to new memory
location and continue to push encoded bit streams */
uint8_t *temp = (uint8_t *)X265_MALLOC(uint8_t, buffsize);
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel