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

Side by Side Diff: content/common/gpu/media/h264_parser.cc

Issue 10411085: Build AVC decoder configuration record (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/gpu/media/h264_parser.h" 5 #include "content/common/gpu/media/h264_parser.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 10
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 H264Parser::Result H264Parser::ParseSPS(int* sps_id) { 650 H264Parser::Result H264Parser::ParseSPS(int* sps_id) {
651 // See 7.4.2.1. 651 // See 7.4.2.1.
652 int data; 652 int data;
653 Result res; 653 Result res;
654 654
655 *sps_id = -1; 655 *sps_id = -1;
656 656
657 scoped_ptr<H264SPS> sps(new H264SPS()); 657 scoped_ptr<H264SPS> sps(new H264SPS());
658 658
659 READ_BITS_OR_RETURN(8, &sps->profile_idc); 659 READ_BITS_OR_RETURN(8, &sps->profile_idc);
660 // Skip constraint_setx_flag and reserved flags. 660 READ_BITS_OR_RETURN(4, &sps->constraint_setx_flag);
661 READ_BITS_OR_RETURN(8, &data); 661 READ_BITS_OR_RETURN(4, &data);
Pawel Osciak 2012/06/03 17:33:22 In my version of the spec it's 6 bits of flags, no
sail 2012/06/04 14:57:02 Done.
662 READ_BITS_OR_RETURN(8, &sps->level_idc); 662 READ_BITS_OR_RETURN(8, &sps->level_idc);
663 READ_UE_OR_RETURN(&sps->seq_parameter_set_id); 663 READ_UE_OR_RETURN(&sps->seq_parameter_set_id);
664 TRUE_OR_RETURN(sps->seq_parameter_set_id < 32); 664 TRUE_OR_RETURN(sps->seq_parameter_set_id < 32);
665 665
666 if (sps->profile_idc == 100 || sps->profile_idc == 110 || 666 if (sps->profile_idc == 100 || sps->profile_idc == 110 ||
667 sps->profile_idc == 122 || sps->profile_idc == 244 || 667 sps->profile_idc == 122 || sps->profile_idc == 244 ||
668 sps->profile_idc == 44 || sps->profile_idc == 83 || 668 sps->profile_idc == 44 || sps->profile_idc == 83 ||
669 sps->profile_idc == 86 || sps->profile_idc == 118 || 669 sps->profile_idc == 86 || sps->profile_idc == 118 ||
670 sps->profile_idc == 128) { 670 sps->profile_idc == 128) {
671 READ_UE_OR_RETURN(&sps->chroma_format_idc); 671 READ_UE_OR_RETURN(&sps->chroma_format_idc);
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 1190
1191 default: 1191 default:
1192 DVLOG(4) << "Unsupported SEI message"; 1192 DVLOG(4) << "Unsupported SEI message";
1193 break; 1193 break;
1194 } 1194 }
1195 1195
1196 return kOk; 1196 return kOk;
1197 } 1197 }
1198 1198
1199 } // namespace content 1199 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/h264_parser.h ('k') | content/common/gpu/media/mac_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698