| Index: webrtc/modules/video_coding/utility/vp8_header_parser.h
|
| diff --git a/webrtc/modules/video_coding/utility/vp8_header_parser.h b/webrtc/modules/video_coding/utility/vp8_header_parser.h
|
| index b4b1d3356fe5c8a18ddfbf927ba29dd6d5d7cc9e..b0c684c578b1e0628f62574050468b6415807f34 100644
|
| --- a/webrtc/modules/video_coding/utility/vp8_header_parser.h
|
| +++ b/webrtc/modules/video_coding/utility/vp8_header_parser.h
|
| @@ -28,46 +28,34 @@ enum {
|
| typedef struct VP8BitReader VP8BitReader;
|
| struct VP8BitReader {
|
| // Boolean decoder.
|
| - uint32_t value_; // Current value.
|
| - uint32_t range_; // Current range minus 1. In [127, 254] interval.
|
| - int bits_; // Number of valid bits left.
|
| + uint32_t value_; // Current value.
|
| + uint32_t range_; // Current range minus 1. In [127, 254] interval.
|
| + int bits_; // Number of valid bits left.
|
| // Read buffer.
|
| - const uint8_t* buf_; // Next byte to be read.
|
| - const uint8_t* buf_end_; // End of read buffer.
|
| - int eof_; // True if input is exhausted.
|
| + const uint8_t* buf_; // Next byte to be read.
|
| + const uint8_t* buf_end_; // End of read buffer.
|
| + int eof_; // True if input is exhausted.
|
| };
|
|
|
| const uint8_t kVP8Log2Range[128] = {
|
| - 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
|
| -};
|
| + 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};
|
|
|
| // range = ((range - 1) << kVP8Log2Range[range]) + 1
|
| const uint8_t kVP8NewRange[128] = {
|
| - 127, 127, 191, 127, 159, 191, 223, 127,
|
| - 143, 159, 175, 191, 207, 223, 239, 127,
|
| - 135, 143, 151, 159, 167, 175, 183, 191,
|
| - 199, 207, 215, 223, 231, 239, 247, 127,
|
| - 131, 135, 139, 143, 147, 151, 155, 159,
|
| - 163, 167, 171, 175, 179, 183, 187, 191,
|
| - 195, 199, 203, 207, 211, 215, 219, 223,
|
| - 227, 231, 235, 239, 243, 247, 251, 127,
|
| - 129, 131, 133, 135, 137, 139, 141, 143,
|
| - 145, 147, 149, 151, 153, 155, 157, 159,
|
| - 161, 163, 165, 167, 169, 171, 173, 175,
|
| - 177, 179, 181, 183, 185, 187, 189, 191,
|
| - 193, 195, 197, 199, 201, 203, 205, 207,
|
| - 209, 211, 213, 215, 217, 219, 221, 223,
|
| - 225, 227, 229, 231, 233, 235, 237, 239,
|
| - 241, 243, 245, 247, 249, 251, 253, 127
|
| -};
|
| + 127, 127, 191, 127, 159, 191, 223, 127, 143, 159, 175, 191, 207, 223, 239,
|
| + 127, 135, 143, 151, 159, 167, 175, 183, 191, 199, 207, 215, 223, 231, 239,
|
| + 247, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179,
|
| + 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239,
|
| + 243, 247, 251, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149,
|
| + 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179,
|
| + 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207, 209,
|
| + 211, 213, 215, 217, 219, 221, 223, 225, 227, 229, 231, 233, 235, 237, 239,
|
| + 241, 243, 245, 247, 249, 251, 253, 127};
|
|
|
| // Gets the QP, QP range: [0, 127].
|
| // Returns true on success, false otherwise.
|
|
|