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

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

Issue 12807010: libvpx: Fix pull from upstream (Closed) Base URL: https://src.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 9 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/test.mk ('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 191065)
+++ source/libvpx/vp8/decoder/dboolhuff.h (working copy)
@@ -28,6 +28,18 @@
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
+}
+
typedef struct
{
const unsigned char *user_buffer_end;
@@ -35,13 +47,17 @@
VP8_BD_VALUE value;
int count;
unsigned int range;
+ const unsigned char *origin;
+ const unsigned char *key;
} BOOL_DECODER;
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);
+ unsigned int source_sz,
+ const unsigned char *origin,
+ const unsigned char *key);
void vp8dx_bool_decoder_fill(BOOL_DECODER *br);
« no previous file with comments | « source/libvpx/test/test.mk ('k') | source/libvpx/vp8/decoder/dboolhuff.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698