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_wrapper.h

Issue 1209033018: Create VA surface with correct VA RT format for MJPEG decode acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 // This file contains an implementation of VaapiWrapper, used by 5 // This file contains an implementation of VaapiWrapper, used by
6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder for decode, 6 // VaapiVideoDecodeAccelerator and VaapiH264Decoder for decode,
7 // and VaapiVideoEncodeAccelerator for encode, to interface 7 // and VaapiVideoEncodeAccelerator for encode, to interface
8 // with libva (VA-API library for hardware video codec). 8 // with libva (VA-API library for hardware video codec).
9 9
10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 10 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 GetSupportedDecodeProfiles(); 76 GetSupportedDecodeProfiles();
77 77
78 ~VaapiWrapper(); 78 ~VaapiWrapper();
79 79
80 // Create |num_surfaces| backing surfaces in driver for VASurfaces, each 80 // Create |num_surfaces| backing surfaces in driver for VASurfaces, each
81 // of size |size|. Returns true when successful, with the created IDs in 81 // of size |size|. Returns true when successful, with the created IDs in
82 // |va_surfaces| to be managed and later wrapped in VASurfaces. 82 // |va_surfaces| to be managed and later wrapped in VASurfaces.
83 // The client must DestroySurfaces() each time before calling this method 83 // The client must DestroySurfaces() each time before calling this method
84 // again to free the allocated surfaces first, but is not required to do so 84 // again to free the allocated surfaces first, but is not required to do so
85 // at destruction time, as this will be done automatically from 85 // at destruction time, as this will be done automatically from
86 // the destructor. 86 // the destructor.
henryhsu 2015/07/09 06:56:26 describe |va_format| in comment.
kcwu 2015/07/13 05:45:16 Done.
87 bool CreateSurfaces(const gfx::Size& size, 87 bool CreateSurfaces(unsigned int va_format,
88 const gfx::Size& size,
88 size_t num_surfaces, 89 size_t num_surfaces,
89 std::vector<VASurfaceID>* va_surfaces); 90 std::vector<VASurfaceID>* va_surfaces);
90 91
91 // Free all memory allocated in CreateSurfaces. 92 // Free all memory allocated in CreateSurfaces.
92 void DestroySurfaces(); 93 void DestroySurfaces();
93 94
94 // Create a VASurface of |va_format|, |size| and using |va_attribs| 95 // Create a VASurface of |va_format|, |size| and using |va_attribs|
95 // attributes. The ownership of the surface is transferred to the 96 // attributes. The ownership of the surface is transferred to the
96 // caller. It differs from surfaces created using CreateSurfaces(), 97 // caller. It differs from surfaces created using CreateSurfaces(),
97 // where VaapiWrapper is the owner of the surfaces. 98 // where VaapiWrapper is the owner of the surfaces.
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 // Singleton variable to store supported profile information for encode and 354 // Singleton variable to store supported profile information for encode and
354 // decode. 355 // decode.
355 static base::LazyInstance<LazyProfileInfos> profile_infos_; 356 static base::LazyInstance<LazyProfileInfos> profile_infos_;
356 357
357 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper); 358 DISALLOW_COPY_AND_ASSIGN(VaapiWrapper);
358 }; 359 };
359 360
360 } // namespace content 361 } // namespace content
361 362
362 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_ 363 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698