summaryrefslogtreecommitdiff
path: root/vp8/decoder
diff options
context:
space:
mode:
authorScott LaVarnway <slavarnway@google.com>2011-07-19 09:17:25 -0400
committerScott LaVarnway <slavarnway@google.com>2011-07-19 09:17:25 -0400
commita25f6a9c88d7fcbeaf2e9f12ee9ac1858ebf687f (patch)
tree3e80f9c998850a9ccfd10fad8541df2317f0db30 /vp8/decoder
parentb5ea2fbc2c1554769848774c836aad262af95072 (diff)
downloadlibvpx-a25f6a9c88d7fcbeaf2e9f12ee9ac1858ebf687f.tar
libvpx-a25f6a9c88d7fcbeaf2e9f12ee9ac1858ebf687f.tar.gz
libvpx-a25f6a9c88d7fcbeaf2e9f12ee9ac1858ebf687f.tar.bz2
libvpx-a25f6a9c88d7fcbeaf2e9f12ee9ac1858ebf687f.zip
Moved vp8_encode_bool into boolhuff.h
allowing the compiler to inline this function. For real-time encodes, this gave a boost of 1% to 2.5%, depending on the speed setting. Change-Id: I3929d176cca086b4261267b848419d5bcff21c02
Diffstat (limited to 'vp8/decoder')
-rw-r--r--vp8/decoder/dboolhuff.c13
-rw-r--r--vp8/decoder/dboolhuff.h4
-rw-r--r--vp8/decoder/detokenize.c4
3 files changed, 4 insertions, 17 deletions
diff --git a/vp8/decoder/dboolhuff.c b/vp8/decoder/dboolhuff.c
index 8527d51e8..7e7b05aa6 100644
--- a/vp8/decoder/dboolhuff.c
+++ b/vp8/decoder/dboolhuff.c
@@ -13,19 +13,6 @@
#include "vpx_ports/mem.h"
#include "vpx_mem/vpx_mem.h"
-DECLARE_ALIGNED(16, const unsigned char, vp8dx_bitreader_norm[256]) =
-{
- 0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-
int vp8dx_start_decode(BOOL_DECODER *br,
const unsigned char *source,
unsigned int source_sz)
diff --git a/vp8/decoder/dboolhuff.h b/vp8/decoder/dboolhuff.h
index f729837f9..853c10f14 100644
--- a/vp8/decoder/dboolhuff.h
+++ b/vp8/decoder/dboolhuff.h
@@ -34,7 +34,7 @@ typedef struct
unsigned int range;
} BOOL_DECODER;
-DECLARE_ALIGNED(16, extern const unsigned char, vp8dx_bitreader_norm[256]);
+DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
int vp8dx_start_decode(BOOL_DECODER *br,
const unsigned char *source,
@@ -101,7 +101,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
}
{
- register unsigned int shift = vp8dx_bitreader_norm[range];
+ register unsigned int shift = vp8_norm[range];
range <<= shift;
value <<= shift;
count -= shift;
diff --git a/vp8/decoder/detokenize.c b/vp8/decoder/detokenize.c
index c22e0f28c..166be9ef9 100644
--- a/vp8/decoder/detokenize.c
+++ b/vp8/decoder/detokenize.c
@@ -80,7 +80,7 @@ void vp8_reset_mb_tokens_context(MACROBLOCKD *x)
}
}
-DECLARE_ALIGNED(16, extern const unsigned char, vp8dx_bitreader_norm[256]);
+DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
#define FILL \
if(count < 0) \
VP8DX_BOOL_DECODER_FILL(count, value, bufptr, bufend);
@@ -88,7 +88,7 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8dx_bitreader_norm[256]);
#define NORMALIZE \
/*if(range < 0x80)*/ \
{ \
- shift = vp8dx_bitreader_norm[range]; \
+ shift = vp8_norm[range]; \
range <<= shift; \
value <<= shift; \
count -= shift; \