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

Side by Side Diff: media/formats/webm/webm_colour_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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/formats/webm/webm_colour_parser.h" 5 #include "media/formats/webm/webm_colour_parser.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "media/formats/webm/webm_constants.h" 8 #include "media/formats/webm/webm_constants.h"
9 9
10 namespace media { 10 namespace media {
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 case Range::kBroadcast: 421 case Range::kBroadcast:
422 range_id = gfx::ColorSpace::RangeID::LIMITED; 422 range_id = gfx::ColorSpace::RangeID::LIMITED;
423 break; 423 break;
424 case Range::kFull: 424 case Range::kFull:
425 range_id = gfx::ColorSpace::RangeID::FULL; 425 range_id = gfx::ColorSpace::RangeID::FULL;
426 break; 426 break;
427 case Range::kDerived: 427 case Range::kDerived:
428 range_id = gfx::ColorSpace::RangeID::DERIVED; 428 range_id = gfx::ColorSpace::RangeID::DERIVED;
429 break; 429 break;
430 } 430 }
431 color_metadata.color_space = gfx::ColorSpace::CreateVideo( 431 color_metadata.color_space = VideoColorSpace(
432 primaries_, transfer_characteristics_, matrix_coefficients_, range_id); 432 primaries_, transfer_characteristics_, matrix_coefficients_, range_id);
433 433
434 if (max_cll_ != -1) 434 if (max_cll_ != -1)
435 color_metadata.hdr_metadata.max_cll = max_cll_; 435 color_metadata.hdr_metadata.max_cll = max_cll_;
436 436
437 if (max_fall_ != -1) 437 if (max_fall_ != -1)
438 color_metadata.hdr_metadata.max_fall = max_fall_; 438 color_metadata.hdr_metadata.max_fall = max_fall_;
439 439
440 if (mastering_metadata_parsed_) 440 if (mastering_metadata_parsed_)
441 color_metadata.hdr_metadata.mastering_metadata = 441 color_metadata.hdr_metadata.mastering_metadata =
442 mastering_metadata_parser_.GetMasteringMetadata(); 442 mastering_metadata_parser_.GetMasteringMetadata();
443 443
444 return color_metadata; 444 return color_metadata;
445 } 445 }
446 446
447 } // namespace media 447 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/webm/webm_colour_parser.h ('k') | media/formats/webm/webm_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698