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

Side by Side Diff: third_party/libwebp/demux/demux.c

Issue 2584033003: libwebp-0.5.2-rc2 (Closed)
Patch Set: layout tests Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 Google Inc. All Rights Reserved. 1 // Copyright 2012 Google Inc. All Rights Reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license 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 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 5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may 6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree. 7 // be found in the AUTHORS file in the root of the source tree.
8 // ----------------------------------------------------------------------------- 8 // -----------------------------------------------------------------------------
9 // 9 //
10 // WebP container demux. 10 // WebP container demux.
11 // 11 //
12 12
13 #ifdef HAVE_CONFIG_H 13 #ifdef HAVE_CONFIG_H
14 #include "../webp/config.h" 14 #include "../webp/config.h"
15 #endif 15 #endif
16 16
17 #include <assert.h> 17 #include <assert.h>
18 #include <stdlib.h> 18 #include <stdlib.h>
19 #include <string.h> 19 #include <string.h>
20 20
21 #include "../utils/utils.h" 21 #include "../utils/utils.h"
22 #include "../webp/decode.h" // WebPGetFeatures 22 #include "../webp/decode.h" // WebPGetFeatures
23 #include "../webp/demux.h" 23 #include "../webp/demux.h"
24 #include "../webp/format_constants.h" 24 #include "../webp/format_constants.h"
25 25
26 #define DMUX_MAJ_VERSION 0 26 #define DMUX_MAJ_VERSION 0
27 #define DMUX_MIN_VERSION 3 27 #define DMUX_MIN_VERSION 3
28 #define DMUX_REV_VERSION 0 28 #define DMUX_REV_VERSION 1
29 29
30 typedef struct { 30 typedef struct {
31 size_t start_; // start location of the data 31 size_t start_; // start location of the data
32 size_t end_; // end location 32 size_t end_; // end location
33 size_t riff_end_; // riff chunk end location, can be > end_. 33 size_t riff_end_; // riff chunk end location, can be > end_.
34 size_t buf_size_; // size of the buffer 34 size_t buf_size_; // size of the buffer
35 const uint8_t* buf_; 35 const uint8_t* buf_;
36 } MemBuffer; 36 } MemBuffer;
37 37
38 typedef struct { 38 typedef struct {
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 (const char*)iter->chunk.bytes - CHUNK_HEADER_SIZE; 957 (const char*)iter->chunk.bytes - CHUNK_HEADER_SIZE;
958 return SetChunk(fourcc, iter->chunk_num - 1, iter); 958 return SetChunk(fourcc, iter->chunk_num - 1, iter);
959 } 959 }
960 return 0; 960 return 0;
961 } 961 }
962 962
963 void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter) { 963 void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter) {
964 (void)iter; 964 (void)iter;
965 } 965 }
966 966
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698