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

Unified 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: rebase 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/media/vaapi_jpeg_decoder.h
diff --git a/content/common/gpu/media/vaapi_jpeg_decoder.h b/content/common/gpu/media/vaapi_jpeg_decoder.h
new file mode 100644
index 0000000000000000000000000000000000000000..da47cda1631644fa833580e99056bf07e49cc6be
--- /dev/null
+++ b/content/common/gpu/media/vaapi_jpeg_decoder.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_
+#define CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_
+
+#include "base/macros.h"
+#include "content/common/content_export.h"
+#include "content/common/gpu/media/vaapi_wrapper.h"
+
+namespace media {
+struct JpegParseResult;
+} // namespace media
+
+namespace content {
+
+// A JPEG decoder that utilizes VA-API hardware video decode acceleration on
+// Intel systems. Provides functionality to allow plugging VAAPI HW
+// acceleration into the JpegDecodeAccelerator framework.
+//
+// Clients of this class are expected to manage VA surfaces created via
+// VaapiWrapper, parse JPEG picture via media::ParseJpegPicture, and then pass
+// them to this class.
+class CONTENT_EXPORT VaapiJpegDecoder {
+ public:
+ // Decode a JPEG picture. It will fill VA-API parameters and call
+ // corresponding VA-API methods according to parsed JPEG result
+ // |parse_result|. Decoded data will be outputted to the given |va_surface|.
+ // Return false on failure.
+ // |vaapi_wrapper| should be initialized in kDecode mode with
+ // VAProfileJPEGBaseline profile.
+ // |va_surface| should be created with size at least as the picture size.
Pawel Osciak 2015/01/25 08:51:11 at least as large
kcwu 2015/01/26 12:12:09 Done.
+ static bool Decode(VaapiWrapper* vaapi_wrapper,
+ const media::JpegParseResult& parse_result,
+ VASurfaceID va_surface);
+
+ private:
+ DISALLOW_IMPLICIT_CONSTRUCTORS(VaapiJpegDecoder);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_JPEG_DECODER_H_

Powered by Google App Engine
This is Rietveld 408576698