Commit e1f55e04 authored by James Zern's avatar James Zern
Browse files

vp9_reader: reorder struct members

improves locality of reference

Change-Id: Ia4d55bb8c98e479528d88303fa35e8c74fbf939d
parent 60ef6c07
...@@ -30,14 +30,15 @@ typedef size_t BD_VALUE; ...@@ -30,14 +30,15 @@ typedef size_t BD_VALUE;
#define BD_VALUE_SIZE ((int)sizeof(BD_VALUE) * CHAR_BIT) #define BD_VALUE_SIZE ((int)sizeof(BD_VALUE) * CHAR_BIT)
typedef struct { typedef struct {
const uint8_t *buffer_end; // Be careful when reordering this struct, it may impact the cache negatively.
const uint8_t *buffer;
uint8_t clear_buffer[sizeof(BD_VALUE) + 1];
BD_VALUE value; BD_VALUE value;
int count;
unsigned int range; unsigned int range;
int count;
const uint8_t *buffer_end;
const uint8_t *buffer;
vpx_decrypt_cb decrypt_cb; vpx_decrypt_cb decrypt_cb;
void *decrypt_state; void *decrypt_state;
uint8_t clear_buffer[sizeof(BD_VALUE) + 1];
} vp9_reader; } vp9_reader;
int vp9_reader_init(vp9_reader *r, int vp9_reader_init(vp9_reader *r,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment