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

Side by Side Diff: content/common/gpu/media/vaapi_jpeg_decoder.h

Issue 825843002: Add JPEG decoder for VAAPI JPEG decode acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mjpeg-vaapi-jpeg-parser
Patch Set: Created 5 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_
6 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_
7
8 #include "base/macros.h"
9 #include "content/common/content_export.h"
10 #include "content/common/gpu/media/vaapi_wrapper.h"
11
12 namespace media {
13 struct JpegParseResult;
14 } // namespace media
15
16 namespace content {
17
18 // A JPEG decoder that utilizes VA-API hardware video decode acceleration on
19 // Intel systems. Provides functionality to allow plugging VAAPI HW
20 // acceleration into the JDA framework.
wuchengli 2015/01/20 07:55:53 s/JDA/JpegDecodeAccelerator/ It's an uncommon acro
kcwu 2015/01/21 12:23:48 Done.
21 //
22 // Clients of this class are expected to manage VA surfaces created via
23 // VaapiWrapper, parse JPEG picture via ParseJpegPicture, and then pass them to
wuchengli 2015/01/20 07:55:53 s/ParseJpegPicture/media::ParseJpegPicture/
kcwu 2015/01/21 12:23:48 Done.
24 // this class.
25 //
26 // This class must be called on a single thread, and does nothing internally on
27 // any other thread.
28 class CONTENT_EXPORT VaapiJpegDecoder {
29 public:
30 // |vaapi_wrapper| should be initialized in kDecode mode with
31 // VAProfileJPEGBaseline profile.
32 // This class doesn't take the ownership of |vaapi_wrapper|.
33 VaapiJpegDecoder(VaapiWrapper* vaapi_wrapper);
34
35 ~VaapiJpegDecoder();
36
37 // Decode a JPEG picture. It will fill VA-API parameters and call
38 // corresponding VA-API methods according to parsed JPEG result
39 // |parse_result|. Decoded data will be outputted to the given |va_surface|.
40 // Return false on failure.
41 bool Decode(const media::JpegParseResult& parse_result,
wuchengli 2015/01/20 15:41:41 This can be static and pass VaapiWrapper here. It'
kcwu 2015/01/21 12:23:48 Done.
42 VASurfaceID va_surface);
43
44 private:
45 VaapiWrapper* vaapi_wrapper_;
46
47 DISALLOW_COPY_AND_ASSIGN(VaapiJpegDecoder);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698