| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/filters/h264_parser.h" | 5 #include "media/filters/h264_parser.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Based on T-REC-H.264 E.2.1, "VUI parameters semantics", | 124 // Based on T-REC-H.264 E.2.1, "VUI parameters semantics", |
| 125 // available from http://www.itu.int/rec/T-REC-H.264. | 125 // available from http://www.itu.int/rec/T-REC-H.264. |
| 126 gfx::ColorSpace H264SPS::GetColorSpace() const { | 126 gfx::ColorSpace H264SPS::GetColorSpace() const { |
| 127 if (colour_description_present_flag) { | 127 if (colour_description_present_flag) { |
| 128 return gfx::ColorSpace::CreateVideo( | 128 return gfx::ColorSpace::CreateVideo( |
| 129 colour_primaries, transfer_characteristics, matrix_coefficients, | 129 colour_primaries, transfer_characteristics, matrix_coefficients, |
| 130 video_full_range_flag ? gfx::ColorSpace::RangeID::FULL | 130 video_full_range_flag ? gfx::ColorSpace::RangeID::FULL |
| 131 : gfx::ColorSpace::RangeID::LIMITED); | 131 : gfx::ColorSpace::RangeID::LIMITED); |
| 132 } else { | 132 } else { |
| 133 // TODO(ccameron/hubbe): Add a uniform way to handle default video frames. | 133 return gfx::ColorSpace(); |
| 134 return gfx::ColorSpace( | |
| 135 gfx::ColorSpace::PrimaryID::BT709, gfx::ColorSpace::TransferID::BT709, | |
| 136 gfx::ColorSpace::MatrixID::BT709, | |
| 137 video_full_range_flag ? gfx::ColorSpace::RangeID::FULL | |
| 138 : gfx::ColorSpace::RangeID::LIMITED); | |
| 139 } | 134 } |
| 140 } | 135 } |
| 141 | 136 |
| 142 H264PPS::H264PPS() { | 137 H264PPS::H264PPS() { |
| 143 memset(this, 0, sizeof(*this)); | 138 memset(this, 0, sizeof(*this)); |
| 144 } | 139 } |
| 145 | 140 |
| 146 H264SliceHeader::H264SliceHeader() { | 141 H264SliceHeader::H264SliceHeader() { |
| 147 memset(this, 0, sizeof(*this)); | 142 memset(this, 0, sizeof(*this)); |
| 148 } | 143 } |
| (...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 | 1470 |
| 1476 default: | 1471 default: |
| 1477 DVLOG(4) << "Unsupported SEI message"; | 1472 DVLOG(4) << "Unsupported SEI message"; |
| 1478 break; | 1473 break; |
| 1479 } | 1474 } |
| 1480 | 1475 |
| 1481 return kOk; | 1476 return kOk; |
| 1482 } | 1477 } |
| 1483 | 1478 |
| 1484 } // namespace media | 1479 } // namespace media |
| OLD | NEW |