Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: source/libvpx/vp8/decoder/dboolhuff.h

Issue 17009012: libvpx: Pull from upstream (Closed) Base URL: http://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/test/vp8_decrypt_test.cc ('k') | source/libvpx/vp8/decoder/dboolhuff.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/decoder/dboolhuff.h
===================================================================
--- source/libvpx/vp8/decoder/dboolhuff.h (revision 207064)
+++ source/libvpx/vp8/decoder/dboolhuff.h (working copy)
@@ -28,17 +28,11 @@
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 @@
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 @@
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);
« no previous file with comments | « source/libvpx/test/vp8_decrypt_test.cc ('k') | source/libvpx/vp8/decoder/dboolhuff.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698