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

Unified Diff: chromecast/media/cma/base/decoder_config_adapter.cc

Issue 2803563007: Refactoring of media::HDRMetadata struct (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/public/media/decoder_config.h » ('j') | media/base/hdr_metadata.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/base/decoder_config_adapter.cc
diff --git a/chromecast/media/cma/base/decoder_config_adapter.cc b/chromecast/media/cma/base/decoder_config_adapter.cc
index cf4fdee32b37f01f97351c720d60f2a7905ec09a..90a923234c16754d32b635929ecc8b5d35f099d6 100644
--- a/chromecast/media/cma/base/decoder_config_adapter.cc
+++ b/chromecast/media/cma/base/decoder_config_adapter.cc
@@ -307,19 +307,21 @@ VideoConfig DecoderConfigAdapter::ToCastVideoConfig(
base::Optional<::media::HDRMetadata> hdr_metadata = config.hdr_metadata();
if (hdr_metadata) {
video_config.have_hdr_metadata = true;
- video_config.hdr_metadata.max_cll = hdr_metadata->max_cll;
- video_config.hdr_metadata.max_fall = hdr_metadata->max_fall;
+ video_config.hdr_metadata.max_content_light_level =
+ hdr_metadata->max_content_light_level;
+ video_config.hdr_metadata.max_frame_average_light_level =
+ hdr_metadata->max_frame_average_light_level;
const auto& mm1 = hdr_metadata->mastering_metadata;
auto& mm2 = video_config.hdr_metadata.mastering_metadata;
- mm2.primary_r_chromaticity_x = mm1.primary_r_chromaticity_x;
- mm2.primary_r_chromaticity_y = mm1.primary_r_chromaticity_y;
- mm2.primary_g_chromaticity_x = mm1.primary_g_chromaticity_x;
- mm2.primary_g_chromaticity_y = mm1.primary_g_chromaticity_y;
- mm2.primary_b_chromaticity_x = mm1.primary_b_chromaticity_x;
- mm2.primary_b_chromaticity_y = mm1.primary_b_chromaticity_y;
- mm2.white_point_chromaticity_x = mm1.white_point_chromaticity_x;
- mm2.white_point_chromaticity_y = mm1.white_point_chromaticity_y;
+ mm2.primary_r_chromaticity_x = mm1.primary_r_chromaticity.x();
+ mm2.primary_r_chromaticity_y = mm1.primary_r_chromaticity.y();
+ mm2.primary_g_chromaticity_x = mm1.primary_g_chromaticity.x();
+ mm2.primary_g_chromaticity_y = mm1.primary_g_chromaticity.y();
+ mm2.primary_b_chromaticity_x = mm1.primary_b_chromaticity.x();
+ mm2.primary_b_chromaticity_y = mm1.primary_b_chromaticity.y();
+ mm2.white_point_chromaticity_x = mm1.white_point_chromaticity.x();
+ mm2.white_point_chromaticity_y = mm1.white_point_chromaticity.y();
mm2.luminance_max = mm1.luminance_max;
mm2.luminance_min = mm1.luminance_min;
}
« no previous file with comments | « no previous file | chromecast/public/media/decoder_config.h » ('j') | media/base/hdr_metadata.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698