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

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

Issue 794433005: VAAPI VDA H264 Encoder: explicitly set max_num_reorder_frames to 0 in VUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use default denoms per spec. Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/common/gpu/media/vaapi_video_encode_accelerator.h" 5 #include "content/common/gpu/media/vaapi_video_encode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 packed_sps_.AppendBits(5, current_sps_.cpb_removal_delay_length_minus1); 965 packed_sps_.AppendBits(5, current_sps_.cpb_removal_delay_length_minus1);
966 packed_sps_.AppendBits(5, current_sps_.dpb_output_delay_length_minus1); 966 packed_sps_.AppendBits(5, current_sps_.dpb_output_delay_length_minus1);
967 packed_sps_.AppendBits(5, current_sps_.time_offset_length); 967 packed_sps_.AppendBits(5, current_sps_.time_offset_length);
968 } 968 }
969 969
970 packed_sps_.AppendBool(false); // vcl_hrd_parameters_flag 970 packed_sps_.AppendBool(false); // vcl_hrd_parameters_flag
971 if (current_sps_.nal_hrd_parameters_present_flag) 971 if (current_sps_.nal_hrd_parameters_present_flag)
972 packed_sps_.AppendBool(current_sps_.low_delay_hrd_flag); 972 packed_sps_.AppendBool(current_sps_.low_delay_hrd_flag);
973 973
974 packed_sps_.AppendBool(false); // pic_struct_present_flag 974 packed_sps_.AppendBool(false); // pic_struct_present_flag
975 packed_sps_.AppendBool(false); // bitstream_restriction_flag 975 packed_sps_.AppendBool(true); // bitstream_restriction_flag
Pawel Osciak 2015/01/14 02:04:33 Nit: per coding style "end-of-line comments should
hshi1 2015/01/14 02:27:55 Done.
976
977 packed_sps_.AppendBool(false); // motion_vectors_over_pic_boundaries_flag
978 packed_sps_.AppendUE(2); // max_bytes_per_pic_denom
979 packed_sps_.AppendUE(1); // max_bits_per_mb_denom
980 packed_sps_.AppendUE(16); // log2_max_mv_length_horizontal
981 packed_sps_.AppendUE(16); // log2_max_mv_length_vertical
982
983 // Disable frame reordering.
Pawel Osciak 2015/01/14 02:04:33 Nit: this does not disable frame reordering. We "d
hshi1 2015/01/14 02:27:55 Done.
984 packed_sps_.AppendUE(0); // max_num_reorder_frames
985
986 // The value of max_dec_frame_buffering shall be greater than or equal to
987 // max_num_ref_frames.
988 const unsigned int max_dec_frame_buffering =
989 current_sps_.max_num_ref_frames;
990 packed_sps_.AppendUE(max_dec_frame_buffering);
976 } 991 }
977 992
978 packed_sps_.FinishNALU(); 993 packed_sps_.FinishNALU();
979 } 994 }
980 995
981 void VaapiVideoEncodeAccelerator::UpdatePPS() { 996 void VaapiVideoEncodeAccelerator::UpdatePPS() {
982 memset(&current_pps_, 0, sizeof(media::H264PPS)); 997 memset(&current_pps_, 0, sizeof(media::H264PPS));
983 998
984 current_pps_.seq_parameter_set_id = current_sps_.seq_parameter_set_id; 999 current_pps_.seq_parameter_set_id = current_sps_.seq_parameter_set_id;
985 current_pps_.pic_parameter_set_id = 0; 1000 current_pps_.pic_parameter_set_id = 0;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 } 1079 }
1065 1080
1066 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() 1081 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob()
1067 : coded_buffer(VA_INVALID_ID), keyframe(false) { 1082 : coded_buffer(VA_INVALID_ID), keyframe(false) {
1068 } 1083 }
1069 1084
1070 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() { 1085 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() {
1071 } 1086 }
1072 1087
1073 } // namespace content 1088 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698