summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-06 21:54:41 +0100
committerwm4 <wm4@nowhere>2019-11-06 21:54:41 +0100
commitb4466cf0d4afedd61be7c6c591ffbf98d46b1d05 (patch)
tree186b280ffdcf7cfa4e7b9218b1ca5529e58ecd0b /stream/stream.h
parentf37f4de8496556afaa024e39e2efb433eb1680d4 (diff)
downloadmpv-b4466cf0d4afedd61be7c6c591ffbf98d46b1d05.tar.bz2
mpv-b4466cf0d4afedd61be7c6c591ffbf98d46b1d05.tar.xz
stream: remove inline buffer optimization
Was probably worthless, and I can't measure a difference anymore (I used to be able and it still seemed worth doing so back then). When the default buffer size is enlarged in the next commit, the inline buffer probably won't even be useful in theory, because the data will rarely be on the same page as the other stream fields. It surely makes the inline buffer seem like a ridiculous micro-optimization. Farewell...
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 7437e1c86b..7dbcd833a4 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -31,8 +31,6 @@
// Minimum guaranteed buffer and seek-back size. For any reads <= of this size,
// it's guaranteed that you can seek back by <= of this size again.
#define STREAM_BUFFER_SIZE 2048
-// (Half of this is typically reserved for seeking back.)
-#define STREAM_FIXED_BUFFER_SIZE (STREAM_BUFFER_SIZE * 2)
// stream->mode
#define STREAM_READ 0
@@ -174,8 +172,6 @@ typedef struct stream {
unsigned int buffer_mask; // buffer_size-1, where buffer_size == 2**n
uint8_t *buffer;
-
- uint8_t buffer_inline[STREAM_FIXED_BUFFER_SIZE];
} stream_t;
// Non-inline version with stream_read_char().