summaryrefslogtreecommitdiff
path: root/libavcodec/hap.h
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-07-17 03:07:07 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-07-21 12:14:25 +0200
commit977105407cae55876041dddbf4ce0934cdd4cd6c (patch)
tree306fb9cc7fa9c055347193456a8e0e2128a84afd /libavcodec/hap.h
parent219b39a71a5694b1c14a07b86477f665a5b6849b (diff)
hap: Decode using optimal slices sizes
Enjoy some cache locality and use less threads. About 5x speedup (from 60ms to 12ms to decode a 4k frame). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/hap.h')
-rw-r--r--libavcodec/hap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/hap.h b/libavcodec/hap.h
index 1250a6f683..75299fda74 100644
--- a/libavcodec/hap.h
+++ b/libavcodec/hap.h
@@ -46,6 +46,8 @@ typedef struct HapContext {
uint8_t *snappied; /* Buffer interacting with snappy */
size_t max_snappy; /* Maximum compressed size for snappy buffer */
+ int slice_size; /* Optimal slice size */
+
/* Pointer to the selected compress or decompress function */
int (*tex_fun)(uint8_t *dst, ptrdiff_t stride, const uint8_t *block);
} HapContext;