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

Unified Diff: content/common/gpu/media/tegra_jpeg_codec_device.h

Issue 825863002: WIP: Add hardware jpeg decode on tegra platform Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 6 years 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/tegra_jpeg_codec_device.h
diff --git a/content/common/gpu/media/tegra_jpeg_codec_device.h b/content/common/gpu/media/tegra_jpeg_codec_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..132f224a68a334eb501a0573aa7fc19cde4ea892
--- /dev/null
+++ b/content/common/gpu/media/tegra_jpeg_codec_device.h
@@ -0,0 +1,41 @@
+// Copyright 2014 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.
+//
+// This file contains the implementation of TegraV4L2Device used on
+// Tegra platform.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_
+#define CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_
+
+//#define TEGRA_ACCELERATE
+
+#include "content/common/gpu/media/jpeg_codec.h"
+#include "ui/gl/gl_bindings.h"
+
+
+namespace content {
+
+// This class implements the V4L2Device interface for Tegra platform.
+// It interfaces with libtegrav4l2 library which provides API that exhibit the
+// V4L2 specification via the library API instead of system calls.
+class TegraJpegCodecDevice : public JPEGCodec {
+ public:
+ explicit TegraJpegCodecDevice(Type type);
+ virtual ~TegraJpegCodecDevice();
+
+ virtual bool Initialize() override;
+ virtual bool Decode(const unsigned char* input, size_t input_size,
+ unsigned char** output_buffer, unsigned* w, unsigned* h,
+ unsigned* row_bytes) override;
+
+ private:
+ const Type type_;
+ long int hDecoder_;
+
+ DISALLOW_COPY_AND_ASSIGN(TegraJpegCodecDevice);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_TEGRA_V4L2_VIDEO_DEVICE_H_
« no previous file with comments | « content/common/gpu/media/jpeg_codec_unittest.cc ('k') | content/common/gpu/media/tegra_jpeg_codec_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698