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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/filters/h264_parser.h" 5 #include "media/filters/h264_parser.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 sps->sar_height = kTableSarHeight[aspect_ratio_idc]; 809 sps->sar_height = kTableSarHeight[aspect_ratio_idc];
810 } 810 }
811 } 811 }
812 812
813 int data; 813 int data;
814 // Read and ignore overscan and video signal type info. 814 // Read and ignore overscan and video signal type info.
815 READ_BOOL_OR_RETURN(&data); // overscan_info_present_flag 815 READ_BOOL_OR_RETURN(&data); // overscan_info_present_flag
816 if (data) 816 if (data)
817 READ_BOOL_OR_RETURN(&data); // overscan_appropriate_flag 817 READ_BOOL_OR_RETURN(&data); // overscan_appropriate_flag
818 818
819 // 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.
820 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.
821 sps->primary_idc = 2;
822 sps->transfer_idc = 2;
823 sps->matrix_idc = 2;
824
819 READ_BOOL_OR_RETURN(&data); // video_signal_type_present_flag 825 READ_BOOL_OR_RETURN(&data); // video_signal_type_present_flag
820 if (data) { 826 if (data) {
821 READ_BITS_OR_RETURN(3, &data); // video_format 827 READ_BITS_OR_RETURN(3, &data); // video_format
822 READ_BOOL_OR_RETURN(&data); // video_full_range_flag 828 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.
823 READ_BOOL_OR_RETURN(&data); // colour_description_present_flag 829 READ_BOOL_OR_RETURN(&data); // colour_description_present_flag
824 if (data) 830 if (data) {
825 READ_BITS_OR_RETURN(24, &data); // color description syntax elements 831 // color description syntax elements
832 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.
833 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.
834 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.
835 }
826 } 836 }
827 837
828 READ_BOOL_OR_RETURN(&data); // chroma_loc_info_present_flag 838 READ_BOOL_OR_RETURN(&data); // chroma_loc_info_present_flag
829 if (data) { 839 if (data) {
830 READ_UE_OR_RETURN(&data); // chroma_sample_loc_type_top_field 840 READ_UE_OR_RETURN(&data); // chroma_sample_loc_type_top_field
831 READ_UE_OR_RETURN(&data); // chroma_sample_loc_type_bottom_field 841 READ_UE_OR_RETURN(&data); // chroma_sample_loc_type_bottom_field
832 } 842 }
833 843
834 // Read and ignore timing info. 844 // Read and ignore timing info.
835 READ_BOOL_OR_RETURN(&data); // timing_info_present_flag 845 READ_BOOL_OR_RETURN(&data); // timing_info_present_flag
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 1468
1459 default: 1469 default:
1460 DVLOG(4) << "Unsupported SEI message"; 1470 DVLOG(4) << "Unsupported SEI message";
1461 break; 1471 break;
1462 } 1472 }
1463 1473
1464 return kOk; 1474 return kOk;
1465 } 1475 }
1466 1476
1467 } // namespace media 1477 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698