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

Side by Side Diff: third_party/libwebp/enc/vp8li.h

Issue 2651883004: libwebp-0.6.0-rc1 (Closed)
Patch Set: Created 3 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
« no previous file with comments | « third_party/libwebp/enc/vp8l_enc.c ('k') | third_party/libwebp/enc/vp8li_enc.h » ('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 2012 Google Inc. All Rights Reserved.
2 //
3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the COPYING file in the root of the source
5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree.
8 // -----------------------------------------------------------------------------
9 //
10 // Lossless encoder: internal header.
11 //
12 // Author: Vikas Arora (vikaas.arora@gmail.com)
13
14 #ifndef WEBP_ENC_VP8LI_H_
15 #define WEBP_ENC_VP8LI_H_
16
17 #include "./backward_references.h"
18 #include "./histogram.h"
19 #include "../utils/bit_writer.h"
20 #include "../webp/encode.h"
21 #include "../webp/format_constants.h"
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 typedef struct {
28 const WebPConfig* config_; // user configuration and parameters
29 const WebPPicture* pic_; // input picture.
30
31 uint32_t* argb_; // Transformed argb image data.
32 uint32_t* argb_scratch_; // Scratch memory for argb rows
33 // (used for prediction).
34 uint32_t* transform_data_; // Scratch memory for transform data.
35 uint32_t* transform_mem_; // Currently allocated memory.
36 size_t transform_mem_size_; // Currently allocated memory size.
37
38 int current_width_; // Corresponds to packed image width.
39
40 // Encoding parameters derived from quality parameter.
41 int histo_bits_;
42 int transform_bits_;
43 int cache_bits_; // If equal to 0, don't use color cache.
44
45 // Encoding parameters derived from image characteristics.
46 int use_cross_color_;
47 int use_subtract_green_;
48 int use_predict_;
49 int use_palette_;
50 int palette_size_;
51 uint32_t palette_[MAX_PALETTE_SIZE];
52
53 // Some 'scratch' (potentially large) objects.
54 struct VP8LBackwardRefs refs_[2]; // Backward Refs array corresponding to
55 // LZ77 & RLE coding.
56 VP8LHashChain hash_chain_; // HashChain data for constructing
57 // backward references.
58 } VP8LEncoder;
59
60 //------------------------------------------------------------------------------
61 // internal functions. Not public.
62
63 // Encodes the picture.
64 // Returns 0 if config or picture is NULL or picture doesn't have valid argb
65 // input.
66 int VP8LEncodeImage(const WebPConfig* const config,
67 const WebPPicture* const picture);
68
69 // Encodes the main image stream using the supplied bit writer.
70 // If 'use_cache' is false, disables the use of color cache.
71 WebPEncodingError VP8LEncodeStream(const WebPConfig* const config,
72 const WebPPicture* const picture,
73 VP8LBitWriter* const bw, int use_cache);
74
75 //------------------------------------------------------------------------------
76
77 #ifdef __cplusplus
78 } // extern "C"
79 #endif
80
81 #endif /* WEBP_ENC_VP8LI_H_ */
OLDNEW
« no previous file with comments | « third_party/libwebp/enc/vp8l_enc.c ('k') | third_party/libwebp/enc/vp8li_enc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698