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

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

Issue 1769593002: Add 4 VP9 profiles to the media::VideoCodecProfile enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hevc-codec-7
Patch Set: Better TODOs Created 4 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_wrapper.h" 5 #include "content/common/gpu/media/vaapi_wrapper.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 }; 120 };
121 121
122 // A map between VideoCodecProfile and VAProfile. 122 // A map between VideoCodecProfile and VAProfile.
123 static const ProfileMap kProfileMap[] = { 123 static const ProfileMap kProfileMap[] = {
124 {media::H264PROFILE_BASELINE, VAProfileH264Baseline}, 124 {media::H264PROFILE_BASELINE, VAProfileH264Baseline},
125 {media::H264PROFILE_MAIN, VAProfileH264Main}, 125 {media::H264PROFILE_MAIN, VAProfileH264Main},
126 // TODO(posciak): See if we can/want support other variants of 126 // TODO(posciak): See if we can/want support other variants of
127 // media::H264PROFILE_HIGH*. 127 // media::H264PROFILE_HIGH*.
128 {media::H264PROFILE_HIGH, VAProfileH264High}, 128 {media::H264PROFILE_HIGH, VAProfileH264High},
129 {media::VP8PROFILE_ANY, VAProfileVP8Version0_3}, 129 {media::VP8PROFILE_ANY, VAProfileVP8Version0_3},
130 {media::VP9PROFILE_ANY, VAProfileVP9Profile0}, 130 {media::VP9PROFILE_PROFILE0, VAProfileVP9Profile0},
131 }; 131 };
132 132
133 static std::vector<VAConfigAttrib> GetRequiredAttribs( 133 static std::vector<VAConfigAttrib> GetRequiredAttribs(
134 VaapiWrapper::CodecMode mode) { 134 VaapiWrapper::CodecMode mode) {
135 std::vector<VAConfigAttrib> required_attribs; 135 std::vector<VAConfigAttrib> required_attribs;
136 required_attribs.insert( 136 required_attribs.insert(
137 required_attribs.end(), 137 required_attribs.end(),
138 kCommonVAConfigAttribs, 138 kCommonVAConfigAttribs,
139 kCommonVAConfigAttribs + arraysize(kCommonVAConfigAttribs)); 139 kCommonVAConfigAttribs + arraysize(kCommonVAConfigAttribs));
140 if (mode == VaapiWrapper::kEncode) { 140 if (mode == VaapiWrapper::kEncode) {
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 drm_fd_.reset(HANDLE_EINTR(dup(fd))); 1269 drm_fd_.reset(HANDLE_EINTR(dup(fd)));
1270 } 1270 }
1271 #endif // USE_OZONE 1271 #endif // USE_OZONE
1272 1272
1273 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { 1273 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) {
1274 return (major_version_ < major) || 1274 return (major_version_ < major) ||
1275 (major_version_ == major && minor_version_ < minor); 1275 (major_version_ == major && minor_version_ < minor);
1276 } 1276 }
1277 1277
1278 } // namespace content 1278 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698