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

Unified Diff: media/formats/mp4/hevc.cc

Issue 2317273003: Use the correct HEVC profile in VideoDecoderConfig (Closed)
Patch Set: Added a comment to explain where general_profile_idc values are from Created 4 years, 3 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 | « media/formats/mp4/hevc.h ('k') | media/formats/mp4/mp4_stream_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/hevc.cc
diff --git a/media/formats/mp4/hevc.cc b/media/formats/mp4/hevc.cc
index ef47387343fd906a14429b8c7d39e781717d50d0..b0e3e40f74844228f8110bad8be136b87edd3b45 100644
--- a/media/formats/mp4/hevc.cc
+++ b/media/formats/mp4/hevc.cc
@@ -124,6 +124,20 @@ bool HEVCDecoderConfigurationRecord::ParseInternal(
return true;
}
+VideoCodecProfile HEVCDecoderConfigurationRecord::GetVideoProfile() const {
+ // The values of general_profile_idc are taken from the HEVC standard, see
+ // the latest https://www.itu.int/rec/T-REC-H.265/en section A.3
+ switch (general_profile_idc) {
+ case 1:
+ return HEVCPROFILE_MAIN;
+ case 2:
+ return HEVCPROFILE_MAIN10;
+ case 3:
+ return HEVCPROFILE_MAIN_STILL_PICTURE;
+ }
+ return VIDEO_CODEC_PROFILE_UNKNOWN;
+}
+
static const uint8_t kAnnexBStartCode[] = {0, 0, 0, 1};
static const int kAnnexBStartCodeSize = 4;
« no previous file with comments | « media/formats/mp4/hevc.h ('k') | media/formats/mp4/mp4_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698