diff options
Diffstat (limited to 'vp8/decoder/dboolhuff.h')
-rw-r--r-- | vp8/decoder/dboolhuff.h | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/vp8/decoder/dboolhuff.h b/vp8/decoder/dboolhuff.h index 46a4dd60e..4c0ca1ce7 100644 --- a/vp8/decoder/dboolhuff.h +++ b/vp8/decoder/dboolhuff.h @@ -28,17 +28,11 @@ typedef size_t VP8_BD_VALUE; Even relatively modest values like 100 would work fine.*/ #define VP8_LOTS_OF_BITS (0x40000000) -static unsigned char decrypt_byte(const unsigned char *ch, - const unsigned char *origin, - const unsigned char *key) -{ -#if CONFIG_DECRYPT - const int offset = (int)(ch - origin); - return *ch ^ key[offset % 32]; // VP8_DECRYPT_KEY_SIZE -#else - return *ch; -#endif -} +/*Decrypt n bytes of data from input -> output, using the decrypt_state + passed in VP8D_SET_DECRYPTOR. +*/ +typedef void (vp8_decrypt_cb)(void *decrypt_state, const unsigned char *input, + unsigned char *output, int count); typedef struct { @@ -47,8 +41,8 @@ typedef struct VP8_BD_VALUE value; int count; unsigned int range; - const unsigned char *origin; - const unsigned char *key; + vp8_decrypt_cb *decrypt_cb; + void *decrypt_state; } BOOL_DECODER; DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]); @@ -56,8 +50,8 @@ DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]); int vp8dx_start_decode(BOOL_DECODER *br, const unsigned char *source, unsigned int source_sz, - const unsigned char *origin, - const unsigned char *key); + vp8_decrypt_cb *decrypt_cb, + void *decrypt_state); void vp8dx_bool_decoder_fill(BOOL_DECODER *br); |