| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/logging.h" |
| 6 #include "base/macros.h" |
| 5 #include "media/cast/sender/vp8_quantizer_parser.h" | 7 #include "media/cast/sender/vp8_quantizer_parser.h" |
| 6 #include "base/logging.h" | |
| 7 | 8 |
| 8 namespace media { | 9 namespace media { |
| 9 namespace cast { | 10 namespace cast { |
| 10 | 11 |
| 11 namespace { | 12 namespace { |
| 12 // Vp8BitReader is a re-implementation of a subset of the VP8 entropy decoder. | 13 // Vp8BitReader is a re-implementation of a subset of the VP8 entropy decoder. |
| 13 // It is used to decompress the VP8 bitstream for the purposes of quickly | 14 // It is used to decompress the VP8 bitstream for the purposes of quickly |
| 14 // parsing the VP8 frame headers. It is mostly the exact same implementation | 15 // parsing the VP8 frame headers. It is mostly the exact same implementation |
| 15 // found in third_party/libvpx_new/.../vp8/decoder/dboolhuff.h except that only | 16 // found in third_party/libvpx_new/.../vp8/decoder/dboolhuff.h except that only |
| 16 // the portion of the implementation needed to parse the frame headers is | 17 // the portion of the implementation needed to parse the frame headers is |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // Parse the base q_index. | 201 // Parse the base q_index. |
| 201 uint8_t q_index = static_cast<uint8_t>(bit_reader.DecodeValue(7)); | 202 uint8_t q_index = static_cast<uint8_t>(bit_reader.DecodeValue(7)); |
| 202 if (q_index > 127) { | 203 if (q_index > 127) { |
| 203 return 63; | 204 return 63; |
| 204 } | 205 } |
| 205 return vp8_quantizer_lookup[q_index]; | 206 return vp8_quantizer_lookup[q_index]; |
| 206 } | 207 } |
| 207 | 208 |
| 208 } // namespace cast | 209 } // namespace cast |
| 209 } // namespace media | 210 } // namespace media |
| OLD | NEW |