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

Unified Diff: libvpx/source/libvpx/vp8/encoder/boolhuff.h

Issue 7624054: Revert r97185 "Update libvpx snapshot to v0.9.7-p1 (Cayuga)." (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party
Patch Set: Created 9 years, 4 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 | « libvpx/source/libvpx/vp8/encoder/block.h ('k') | libvpx/source/libvpx/vp8/encoder/boolhuff.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libvpx/source/libvpx/vp8/encoder/boolhuff.h
diff --git a/libvpx/source/libvpx/vp8/encoder/boolhuff.h b/libvpx/source/libvpx/vp8/encoder/boolhuff.h
index 04755f5329bb53f6885504d26d07ceace329edb2..f723da3f001582116da3f48fd6e8ead6f3ed05ac 100644
--- a/libvpx/source/libvpx/vp8/encoder/boolhuff.h
+++ b/libvpx/source/libvpx/vp8/encoder/boolhuff.h
@@ -19,7 +19,6 @@
#ifndef __INC_BOOLHUFF_H
#define __INC_BOOLHUFF_H
-#include "vpx_ports/mem.h"
typedef struct
{
@@ -36,77 +35,9 @@ typedef struct
} BOOL_CODER;
extern void vp8_start_encode(BOOL_CODER *bc, unsigned char *buffer);
-
+extern void vp8_encode_bool(BOOL_CODER *bc, int x, int context);
extern void vp8_encode_value(BOOL_CODER *br, int data, int bits);
extern void vp8_stop_encode(BOOL_CODER *bc);
extern const unsigned int vp8_prob_cost[256];
-
-DECLARE_ALIGNED(16, extern const unsigned char, vp8_norm[256]);
-
-
-static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability)
-{
- unsigned int split;
- int count = br->count;
- unsigned int range = br->range;
- unsigned int lowvalue = br->lowvalue;
- register unsigned int shift;
-
-#ifdef ENTROPY_STATS
-#if defined(SECTIONBITS_OUTPUT)
-
- if (bit)
- Sectionbits[active_section] += vp8_prob_cost[255-probability];
- else
- Sectionbits[active_section] += vp8_prob_cost[probability];
-
-#endif
-#endif
-
- split = 1 + (((range - 1) * probability) >> 8);
-
- range = split;
-
- if (bit)
- {
- lowvalue += split;
- range = br->range - split;
- }
-
- shift = vp8_norm[range];
-
- range <<= shift;
- count += shift;
-
- if (count >= 0)
- {
- int offset = shift - count;
-
- if ((lowvalue << (offset - 1)) & 0x80000000)
- {
- int x = br->pos - 1;
-
- while (x >= 0 && br->buffer[x] == 0xff)
- {
- br->buffer[x] = (unsigned char)0;
- x--;
- }
-
- br->buffer[x] += 1;
- }
-
- br->buffer[br->pos++] = (lowvalue >> (24 - offset));
- lowvalue <<= offset;
- shift = count;
- lowvalue &= 0xffffff;
- count -= 8 ;
- }
-
- lowvalue <<= shift;
- br->count = count;
- br->lowvalue = lowvalue;
- br->range = range;
-}
-
#endif
« no previous file with comments | « libvpx/source/libvpx/vp8/encoder/block.h ('k') | libvpx/source/libvpx/vp8/encoder/boolhuff.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698