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

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

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile error Created 5 years, 8 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 "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/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 }; 96 };
97 97
98 struct VaapiVideoEncodeAccelerator::BitstreamBufferRef { 98 struct VaapiVideoEncodeAccelerator::BitstreamBufferRef {
99 BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size) 99 BitstreamBufferRef(int32 id, scoped_ptr<base::SharedMemory> shm, size_t size)
100 : id(id), shm(shm.Pass()), size(size) {} 100 : id(id), shm(shm.Pass()), size(size) {}
101 const int32 id; 101 const int32 id;
102 const scoped_ptr<base::SharedMemory> shm; 102 const scoped_ptr<base::SharedMemory> shm;
103 const size_t size; 103 const size_t size;
104 }; 104 };
105 105
106 std::vector<media::VideoEncodeAccelerator::SupportedProfile> 106 media::VideoEncodeAccelerator::SupportedProfiles
107 VaapiVideoEncodeAccelerator::GetSupportedProfiles() { 107 VaapiVideoEncodeAccelerator::GetSupportedProfiles() {
108
109 return VaapiWrapper::GetSupportedEncodeProfiles(); 108 return VaapiWrapper::GetSupportedEncodeProfiles();
110 } 109 }
111 110
112 static unsigned int Log2OfPowerOf2(unsigned int x) { 111 static unsigned int Log2OfPowerOf2(unsigned int x) {
113 CHECK_GT(x, 0u); 112 CHECK_GT(x, 0u);
114 DCHECK_EQ(x & (x - 1), 0u); 113 DCHECK_EQ(x & (x - 1), 0u);
115 114
116 int log = 0; 115 int log = 0;
117 while (x > 1) { 116 while (x > 1) {
118 x >>= 1; 117 x >>= 1;
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 } 1061 }
1063 1062
1064 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob() 1063 VaapiVideoEncodeAccelerator::EncodeJob::EncodeJob()
1065 : coded_buffer(VA_INVALID_ID), keyframe(false) { 1064 : coded_buffer(VA_INVALID_ID), keyframe(false) {
1066 } 1065 }
1067 1066
1068 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() { 1067 VaapiVideoEncodeAccelerator::EncodeJob::~EncodeJob() {
1069 } 1068 }
1070 1069
1071 } // namespace content 1070 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_video_encode_accelerator.h ('k') | content/common/gpu/media/vaapi_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698