Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: media/filters/h264_parser.cc

Issue 2746013006: use VideoColorSpace in decoder configuration (Closed)
Patch Set: oops, win compile fix reapplied Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/filters/h264_parser.h ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return base::nullopt; 116 return base::nullopt;
117 } 117 }
118 118
119 return gfx::Rect(crop_left, crop_top, 119 return gfx::Rect(crop_left, crop_top,
120 coded_size->width() - crop_left - crop_right, 120 coded_size->width() - crop_left - crop_right,
121 coded_size->height() - crop_top - crop_bottom); 121 coded_size->height() - crop_top - crop_bottom);
122 } 122 }
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 VideoColorSpace H264SPS::GetColorSpace() const {
127 if (colour_description_present_flag) { 127 if (colour_description_present_flag) {
128 return gfx::ColorSpace::CreateVideo( 128 return VideoColorSpace(
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 return gfx::ColorSpace(); 133 return VideoColorSpace();
134 } 134 }
135 } 135 }
136 136
137 H264PPS::H264PPS() { 137 H264PPS::H264PPS() {
138 memset(this, 0, sizeof(*this)); 138 memset(this, 0, sizeof(*this));
139 } 139 }
140 140
141 H264SliceHeader::H264SliceHeader() { 141 H264SliceHeader::H264SliceHeader() {
142 memset(this, 0, sizeof(*this)); 142 memset(this, 0, sizeof(*this));
143 } 143 }
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 1470
1471 default: 1471 default:
1472 DVLOG(4) << "Unsupported SEI message"; 1472 DVLOG(4) << "Unsupported SEI message";
1473 break; 1473 break;
1474 } 1474 }
1475 1475
1476 return kOk; 1476 return kOk;
1477 } 1477 }
1478 1478
1479 } // namespace media 1479 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/h264_parser.h ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698