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 "chromecast/media/cma/base/decoder_config_adapter.h" | 5 #include "chromecast/media/cma/base/decoder_config_adapter.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chromecast/media/base/media_codec_support.h" | 8 #include "chromecast/media/base/media_codec_support.h" |
9 #include "media/base/channel_layout.h" | 9 #include "media/base/channel_layout.h" |
10 | 10 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 video_config.primaries = | 300 video_config.primaries = |
301 static_cast<PrimaryID>(config.color_space_info().primaries); | 301 static_cast<PrimaryID>(config.color_space_info().primaries); |
302 video_config.transfer = | 302 video_config.transfer = |
303 static_cast<TransferID>(config.color_space_info().transfer); | 303 static_cast<TransferID>(config.color_space_info().transfer); |
304 video_config.matrix = static_cast<MatrixID>(config.color_space_info().matrix); | 304 video_config.matrix = static_cast<MatrixID>(config.color_space_info().matrix); |
305 video_config.range = static_cast<RangeID>(config.color_space_info().range); | 305 video_config.range = static_cast<RangeID>(config.color_space_info().range); |
306 | 306 |
307 base::Optional<::media::HDRMetadata> hdr_metadata = config.hdr_metadata(); | 307 base::Optional<::media::HDRMetadata> hdr_metadata = config.hdr_metadata(); |
308 if (hdr_metadata) { | 308 if (hdr_metadata) { |
309 video_config.have_hdr_metadata = true; | 309 video_config.have_hdr_metadata = true; |
310 video_config.hdr_metadata.max_cll = hdr_metadata->max_cll; | 310 video_config.hdr_metadata.max_content_light_level = |
311 video_config.hdr_metadata.max_fall = hdr_metadata->max_fall; | 311 hdr_metadata->max_content_light_level; |
| 312 video_config.hdr_metadata.max_frame_average_light_level = |
| 313 hdr_metadata->max_frame_average_light_level; |
312 | 314 |
313 const auto& mm1 = hdr_metadata->mastering_metadata; | 315 const auto& mm1 = hdr_metadata->mastering_metadata; |
314 auto& mm2 = video_config.hdr_metadata.mastering_metadata; | 316 auto& mm2 = video_config.hdr_metadata.mastering_metadata; |
315 mm2.primary_r_chromaticity_x = mm1.primary_r_chromaticity_x; | 317 mm2.primary_r_chromaticity_x = mm1.primary_r_chromaticity.x(); |
316 mm2.primary_r_chromaticity_y = mm1.primary_r_chromaticity_y; | 318 mm2.primary_r_chromaticity_y = mm1.primary_r_chromaticity.y(); |
317 mm2.primary_g_chromaticity_x = mm1.primary_g_chromaticity_x; | 319 mm2.primary_g_chromaticity_x = mm1.primary_g_chromaticity.x(); |
318 mm2.primary_g_chromaticity_y = mm1.primary_g_chromaticity_y; | 320 mm2.primary_g_chromaticity_y = mm1.primary_g_chromaticity.y(); |
319 mm2.primary_b_chromaticity_x = mm1.primary_b_chromaticity_x; | 321 mm2.primary_b_chromaticity_x = mm1.primary_b_chromaticity.x(); |
320 mm2.primary_b_chromaticity_y = mm1.primary_b_chromaticity_y; | 322 mm2.primary_b_chromaticity_y = mm1.primary_b_chromaticity.y(); |
321 mm2.white_point_chromaticity_x = mm1.white_point_chromaticity_x; | 323 mm2.white_point_chromaticity_x = mm1.white_point_chromaticity.x(); |
322 mm2.white_point_chromaticity_y = mm1.white_point_chromaticity_y; | 324 mm2.white_point_chromaticity_y = mm1.white_point_chromaticity.y(); |
323 mm2.luminance_max = mm1.luminance_max; | 325 mm2.luminance_max = mm1.luminance_max; |
324 mm2.luminance_min = mm1.luminance_min; | 326 mm2.luminance_min = mm1.luminance_min; |
325 } | 327 } |
326 | 328 |
327 return video_config; | 329 return video_config; |
328 } | 330 } |
329 | 331 |
330 } // namespace media | 332 } // namespace media |
331 } // namespace chromecast | 333 } // namespace chromecast |
OLD | NEW |