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>
This commit is contained in:
Luca Barbato
2015-07-17 03:07:07 +02:00
parent 219b39a71a
commit 977105407c
2 changed files with 27 additions and 8 deletions

View File

@@ -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;