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

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

Issue 2260123002: V4L2VDA: use YV12 as output format if processor supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Pawel's comments Created 4 years, 3 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 | media/gpu/v4l2_device.cc » ('j') | 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 5
6 #include "media/gpu/generic_v4l2_device.h" 6 #include "media/gpu/generic_v4l2_device.h"
7 7
8 #include <errno.h> 8 #include <errno.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <libdrm/drm_fourcc.h> 10 #include <libdrm/drm_fourcc.h>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 return dmabuf_fds; 206 return dmabuf_fds;
207 } 207 }
208 208
209 bool GenericV4L2Device::CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) { 209 bool GenericV4L2Device::CanCreateEGLImageFrom(uint32_t v4l2_pixfmt) {
210 static uint32_t kEGLImageDrmFmtsSupported[] = { 210 static uint32_t kEGLImageDrmFmtsSupported[] = {
211 DRM_FORMAT_ARGB8888, 211 DRM_FORMAT_ARGB8888,
212 #if defined(ARCH_CPU_ARMEL) 212 #if defined(ARCH_CPU_ARMEL)
213 DRM_FORMAT_NV12, 213 DRM_FORMAT_NV12,
214 DRM_FORMAT_YVU420,
214 #endif 215 #endif
215 }; 216 };
216 217
217 return std::find( 218 return std::find(
218 kEGLImageDrmFmtsSupported, 219 kEGLImageDrmFmtsSupported,
219 kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported), 220 kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported),
220 V4L2PixFmtToDrmFormat(v4l2_pixfmt)) != 221 V4L2PixFmtToDrmFormat(v4l2_pixfmt)) !=
221 kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported); 222 kEGLImageDrmFmtsSupported + arraysize(kEGLImageDrmFmtsSupported);
222 } 223 }
223 224
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 StubPathMap paths; 316 StubPathMap paths;
316 paths[kModuleV4l2].push_back(kV4l2Lib); 317 paths[kModuleV4l2].push_back(kV4l2Lib);
317 318
318 return InitializeStubs(paths); 319 return InitializeStubs(paths);
319 #else 320 #else
320 return true; 321 return true;
321 #endif 322 #endif
322 } 323 }
323 324
324 } // namespace media 325 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/gpu/v4l2_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698