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

Unified Diff: media/filters/h264_parser.cc

Issue 2345123002: Attach color space information to hardware decoded NV12 video frames. (Closed)
Patch Set: compile fixes for several platforms 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
Index: media/filters/h264_parser.cc
diff --git a/media/filters/h264_parser.cc b/media/filters/h264_parser.cc
index 991599e2accd577a09e05c85edb52b596e599ffb..560db4e7638b869f26561e6dff0e3ea7d1f0723c 100644
--- a/media/filters/h264_parser.cc
+++ b/media/filters/h264_parser.cc
@@ -816,13 +816,23 @@ H264Parser::Result H264Parser::ParseVUIParameters(H264SPS* sps) {
if (data)
READ_BOOL_OR_RETURN(&data); // overscan_appropriate_flag
+ // Default color space information.
sandersd (OOO until July 31) 2016/09/16 00:55:20 I'd prefer that these were in an else block. Note
Pawel Osciak 2016/09/16 04:37:39 +1. Also, in that case I'd also include video_form
hubbe 2016/09/16 18:03:29 Done.
hubbe 2016/09/16 18:03:30 Done.
+ sps->full_range = true;
sandersd (OOO until July 31) 2016/09/16 00:55:20 Should default to false.
hubbe 2016/09/16 18:03:30 Done.
+ sps->primary_idc = 2;
+ sps->transfer_idc = 2;
+ sps->matrix_idc = 2;
+
READ_BOOL_OR_RETURN(&data); // video_signal_type_present_flag
if (data) {
READ_BITS_OR_RETURN(3, &data); // video_format
- READ_BOOL_OR_RETURN(&data); // video_full_range_flag
+ READ_BOOL_OR_RETURN(&sps->full_range); // video_full_range_flag
Pawel Osciak 2016/09/16 04:37:39 s/full_range/video_full_range_flag/ If possible,
hubbe 2016/09/16 18:03:30 Done.
READ_BOOL_OR_RETURN(&data); // colour_description_present_flag
- if (data)
- READ_BITS_OR_RETURN(24, &data); // color description syntax elements
+ if (data) {
+ // color description syntax elements
+ READ_BITS_OR_RETURN(8, &sps->primary_idc);
Pawel Osciak 2016/09/16 04:37:39 s/primary_idc/colour_primaries/
hubbe 2016/09/16 18:03:30 Done.
+ READ_BITS_OR_RETURN(8, &sps->transfer_idc);
Pawel Osciak 2016/09/16 04:37:39 transfer_characteristics
hubbe 2016/09/16 18:03:30 Done.
+ READ_BITS_OR_RETURN(8, &sps->matrix_idc);
Pawel Osciak 2016/09/16 04:37:39 matrix_coefficients
hubbe 2016/09/16 18:03:30 Done.
+ }
}
READ_BOOL_OR_RETURN(&data); // chroma_loc_info_present_flag

Powered by Google App Engine
This is Rietveld 408576698