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

Unified Diff: third_party/libwebp/dec/webp_dec.c

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/dec/webp.c ('k') | third_party/libwebp/dec/webpi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/dec/webp_dec.c
diff --git a/third_party/libwebp/dec/webp.c b/third_party/libwebp/dec/webp_dec.c
similarity index 98%
rename from third_party/libwebp/dec/webp.c
rename to third_party/libwebp/dec/webp_dec.c
index 90d8a45d230ff94d0c29452874581b49a7ba2e61..1b56c1ce5acd8a27e0f87760267d2dfc1ec58c84 100644
--- a/third_party/libwebp/dec/webp.c
+++ b/third_party/libwebp/dec/webp_dec.c
@@ -13,9 +13,9 @@
#include <stdlib.h>
-#include "./vp8i.h"
-#include "./vp8li.h"
-#include "./webpi.h"
+#include "./vp8i_dec.h"
+#include "./vp8li_dec.h"
+#include "./webpi_dec.h"
#include "../utils/utils.h"
#include "../webp/mux_types.h" // ALPHA_FLAG
@@ -39,8 +39,8 @@
// 20..23 VP8X flags bit-map corresponding to the chunk-types present.
// 24..26 Width of the Canvas Image.
// 27..29 Height of the Canvas Image.
-// There can be extra chunks after the "VP8X" chunk (ICCP, FRGM, ANMF, VP8,
-// VP8L, XMP, EXIF ...)
+// There can be extra chunks after the "VP8X" chunk (ICCP, ANMF, VP8, VP8L,
+// XMP, EXIF ...)
// All sizes are in little-endian order.
// Note: chunk data size must be padded to multiple of 2 when written.
@@ -289,7 +289,6 @@ static VP8StatusCode ParseHeadersInternal(const uint8_t* data,
int found_riff = 0;
int found_vp8x = 0;
int animation_present = 0;
- int fragments_present = 0;
const int have_all_data = (headers != NULL) ? headers->have_all_data : 0;
VP8StatusCode status;
@@ -318,7 +317,6 @@ static VP8StatusCode ParseHeadersInternal(const uint8_t* data,
return status; // Wrong VP8X / insufficient data.
}
animation_present = !!(flags & ANIMATION_FLAG);
- fragments_present = !!(flags & FRAGMENTS_FLAG);
if (!found_riff && found_vp8x) {
// Note: This restriction may be removed in the future, if it becomes
// necessary to send VP8X chunk to the decoder.
@@ -328,8 +326,7 @@ static VP8StatusCode ParseHeadersInternal(const uint8_t* data,
if (has_animation != NULL) *has_animation = animation_present;
if (format != NULL) *format = 0; // default = undefined
- if (found_vp8x && (animation_present || fragments_present) &&
- headers == NULL) {
+ if (found_vp8x && animation_present && headers == NULL) {
if (width != NULL) *width = canvas_width;
if (height != NULL) *height = canvas_height;
return VP8_STATUS_OK; // Just return features from VP8X header.
@@ -358,7 +355,7 @@ static VP8StatusCode ParseHeadersInternal(const uint8_t* data,
return VP8_STATUS_BITSTREAM_ERROR;
}
- if (format != NULL && !(animation_present || fragments_present)) {
+ if (format != NULL && !animation_present) {
*format = hdrs.is_lossless ? 2 : 1;
}
« no previous file with comments | « third_party/libwebp/dec/webp.c ('k') | third_party/libwebp/dec/webpi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698