| OLD | NEW |
| 1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 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 // main entry for the decoder | 10 // main entry for the decoder |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 htree_group = GetHtreeGroupForPos(hdr, col, row); | 1083 htree_group = GetHtreeGroupForPos(hdr, col, row); |
| 1084 } | 1084 } |
| 1085 assert(htree_group != NULL); | 1085 assert(htree_group != NULL); |
| 1086 if (htree_group->is_trivial_code) { | 1086 if (htree_group->is_trivial_code) { |
| 1087 *src = htree_group->literal_arb; | 1087 *src = htree_group->literal_arb; |
| 1088 goto AdvanceByOne; | 1088 goto AdvanceByOne; |
| 1089 } | 1089 } |
| 1090 VP8LFillBitWindow(br); | 1090 VP8LFillBitWindow(br); |
| 1091 if (htree_group->use_packed_table) { | 1091 if (htree_group->use_packed_table) { |
| 1092 code = ReadPackedSymbols(htree_group, br, src); | 1092 code = ReadPackedSymbols(htree_group, br, src); |
| 1093 if (br->eos_) break; |
| 1093 if (code == PACKED_NON_LITERAL_CODE) goto AdvanceByOne; | 1094 if (code == PACKED_NON_LITERAL_CODE) goto AdvanceByOne; |
| 1094 } else { | 1095 } else { |
| 1095 code = ReadSymbol(htree_group->htrees[GREEN], br); | 1096 code = ReadSymbol(htree_group->htrees[GREEN], br); |
| 1096 } | 1097 } |
| 1097 if (br->eos_) break; // early out | 1098 if (br->eos_) break; // early out |
| 1098 if (code < NUM_LITERAL_CODES) { // Literal | 1099 if (code < NUM_LITERAL_CODES) { // Literal |
| 1099 if (htree_group->is_trivial_literal) { | 1100 if (htree_group->is_trivial_literal) { |
| 1100 *src = htree_group->literal_arb | (code << 8); | 1101 *src = htree_group->literal_arb | (code << 8); |
| 1101 } else { | 1102 } else { |
| 1102 int red, blue, alpha; | 1103 int red, blue, alpha; |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 params->last_y = dec->last_out_row_; | 1663 params->last_y = dec->last_out_row_; |
| 1663 return 1; | 1664 return 1; |
| 1664 | 1665 |
| 1665 Err: | 1666 Err: |
| 1666 VP8LClear(dec); | 1667 VP8LClear(dec); |
| 1667 assert(dec->status_ != VP8_STATUS_OK); | 1668 assert(dec->status_ != VP8_STATUS_OK); |
| 1668 return 0; | 1669 return 0; |
| 1669 } | 1670 } |
| 1670 | 1671 |
| 1671 //------------------------------------------------------------------------------ | 1672 //------------------------------------------------------------------------------ |
| OLD | NEW |