| OLD | NEW |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 // | 2 // |
| 3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
| 4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
| 5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
| 6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
| 7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
| 8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
| 9 // | 9 // |
| 10 // Cost tables for level and modes | 10 // Cost tables for level and modes |
| 11 // | 11 // |
| 12 // Author: Skal (pascal.massimino@gmail.com) | 12 // Author: Skal (pascal.massimino@gmail.com) |
| 13 | 13 |
| 14 #include "./cost.h" | 14 #include "./cost_enc.h" |
| 15 | 15 |
| 16 //------------------------------------------------------------------------------ | 16 //------------------------------------------------------------------------------ |
| 17 // Level cost tables | 17 // Level cost tables |
| 18 | 18 |
| 19 // For each given level, the following table gives the pattern of contexts to | 19 // For each given level, the following table gives the pattern of contexts to |
| 20 // use for coding it (in [][0]) as well as the bit value to use for each | 20 // use for coding it (in [][0]) as well as the bit value to use for each |
| 21 // context (in [][1]). | 21 // context (in [][1]). |
| 22 const uint16_t VP8LevelCodes[MAX_VARIABLE_LEVEL][2] = { | 22 const uint16_t VP8LevelCodes[MAX_VARIABLE_LEVEL][2] = { |
| 23 {0x001, 0x000}, {0x007, 0x001}, {0x00f, 0x005}, | 23 {0x001, 0x000}, {0x007, 0x001}, {0x00f, 0x005}, |
| 24 {0x00f, 0x00d}, {0x033, 0x003}, {0x033, 0x003}, {0x033, 0x023}, | 24 {0x00f, 0x00d}, {0x033, 0x003}, {0x033, 0x003}, {0x033, 0x023}, |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } | 333 } |
| 334 #endif | 334 #endif |
| 335 s = res->stats[VP8EncBands[n]][2]; | 335 s = res->stats[VP8EncBands[n]][2]; |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 if (n < 16) VP8RecordStats(0, s + 0); | 338 if (n < 16) VP8RecordStats(0, s + 0); |
| 339 return 1; | 339 return 1; |
| 340 } | 340 } |
| 341 | 341 |
| 342 //------------------------------------------------------------------------------ | 342 //------------------------------------------------------------------------------ |
| OLD | NEW |