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

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

Issue 2636433003: [NotForReview] Enable YUV video overlay on Skylake ChromeOS.
Patch Set: Created 3 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
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 "media/gpu/vaapi_wrapper.h" 5 #include "media/gpu/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 namespace { 65 namespace {
66 66
67 uint32_t BufferFormatToVAFourCC(gfx::BufferFormat fmt) { 67 uint32_t BufferFormatToVAFourCC(gfx::BufferFormat fmt) {
68 switch (fmt) { 68 switch (fmt) {
69 case gfx::BufferFormat::BGRX_8888: 69 case gfx::BufferFormat::BGRX_8888:
70 return VA_FOURCC_BGRX; 70 return VA_FOURCC_BGRX;
71 case gfx::BufferFormat::BGRA_8888: 71 case gfx::BufferFormat::BGRA_8888:
72 return VA_FOURCC_BGRA; 72 return VA_FOURCC_BGRA;
73 case gfx::BufferFormat::UYVY_422: 73 case gfx::BufferFormat::UYVY_422:
74 return VA_FOURCC_UYVY; 74 return VA_FOURCC_UYVY;
75 case gfx::BufferFormat::YUYV_422:
76 return VA_FOURCC_YUY2;
75 case gfx::BufferFormat::YVU_420: 77 case gfx::BufferFormat::YVU_420:
76 return VA_FOURCC_YV12; 78 return VA_FOURCC_YV12;
77 default: 79 default:
78 NOTREACHED(); 80 NOTREACHED();
79 return 0; 81 return 0;
80 } 82 }
81 } 83 }
82 84
83 uint32_t BufferFormatToVARTFormat(gfx::BufferFormat fmt) { 85 uint32_t BufferFormatToVARTFormat(gfx::BufferFormat fmt) {
84 switch (fmt) { 86 switch (fmt) {
85 case gfx::BufferFormat::UYVY_422: 87 case gfx::BufferFormat::UYVY_422:
88 case gfx::BufferFormat::YUYV_422:
86 return VA_RT_FORMAT_YUV422; 89 return VA_RT_FORMAT_YUV422;
87 case gfx::BufferFormat::BGRX_8888: 90 case gfx::BufferFormat::BGRX_8888:
88 case gfx::BufferFormat::BGRA_8888: 91 case gfx::BufferFormat::BGRA_8888:
89 return VA_RT_FORMAT_RGB32; 92 return VA_RT_FORMAT_RGB32;
90 case gfx::BufferFormat::YVU_420: 93 case gfx::BufferFormat::YVU_420:
91 return VA_RT_FORMAT_YUV420; 94 return VA_RT_FORMAT_YUV420;
92 default: 95 default:
93 NOTREACHED(); 96 NOTREACHED();
94 return 0; 97 return 0;
95 } 98 }
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 drm_fd_.reset(HANDLE_EINTR(dup(fd))); 1261 drm_fd_.reset(HANDLE_EINTR(dup(fd)));
1259 } 1262 }
1260 #endif // USE_OZONE 1263 #endif // USE_OZONE
1261 1264
1262 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { 1265 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) {
1263 return (major_version_ < major) || 1266 return (major_version_ < major) ||
1264 (major_version_ == major && minor_version_ < minor); 1267 (major_version_ == major && minor_version_ < minor);
1265 } 1268 }
1266 1269
1267 } // namespace media 1270 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/vaapi_video_decode_accelerator.cc ('k') | media/renderers/gpu_video_accelerator_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698