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

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

Issue 825863002: WIP: Add hardware jpeg decode on tegra platform Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 5 years, 12 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 | content/common/gpu/media/jpeg_codec.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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_JPEG_CODEC_H_
6 #define CONTENT_COMMON_GPU_MEDIA_JPEG_CODEC_H_
7
8 #include <stddef.h>
9 #include "base/memory/scoped_ptr.h"
10
11 namespace content {
12
13 // Interface for encoding/decoding JPEG data. This is a wrapper around libjpeg,
14 // which has an inconvenient interface for callers. This is only used for UI
15 // elements, WebKit has its own more complicated JPEG decoder which handles,
16 // among other things, partially downloaded data.
17 class JPEGCodec {
18 public:
19
20 enum Type {
21 kDecoder,
22 kEncoder,
23 kImageProcessor,
24 };
25
26 virtual ~JPEGCodec();
27
28 static scoped_ptr<JPEGCodec> Create(Type type);
29
30 virtual bool Initialize() = 0;
31
32 // Decodes the JPEG data contained in input of length input_size. The
33 // decoded data will be placed in *output with the dimensions in *w and *h
34 // on success (returns true). This data will be written in the'format'
35 // format. On failure, the values of these output variables is undefined.
36 virtual bool Decode(const unsigned char* input, size_t input_size,
37 unsigned char** output, unsigned * w, unsigned * h,
38 unsigned* row_bytes) = 0;
39
40 // Decodes the JPEG data contained in input of length input_size. If
41 // successful, a SkBitmap is created and returned. It is up to the caller
42 // to delete the returned bitmap.
43 //static SkBitmap* Decode(const unsigned char* input, size_t input_size);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_COMMON_GPU_MEDIA_JPEG_CODEC_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/jpeg_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698