aboutsummaryrefslogtreecommitdiff
path: root/src/enc/syntax.c
diff options
context:
space:
mode:
authorVikas Arora <vikasa@google.com>2013-01-29 16:19:32 -0800
committerVikas Arora <vikasa@google.com>2013-02-06 12:42:45 -0800
commit4b2196c929b70f2cdc1c2556580d349db89356d8 (patch)
tree579254d51f66d5554655598d8e2d24d9732d955d /src/enc/syntax.c
parent276905dd9bf0cffd7e04c78c95f2c1057275d5bd (diff)
downloadwebp-4b2196c929b70f2cdc1c2556580d349db89356d8.tar.gz
Sync libwebp with head#I6ecefe33
Also added ARM/NEON code for decoder/encoder modules. Change-Id: Ic8028037c94c1191c193d881b799a961b476138e
Diffstat (limited to 'src/enc/syntax.c')
-rw-r--r--src/enc/syntax.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/enc/syntax.c b/src/enc/syntax.c
index 99c21fec..4b20c1aa 100644
--- a/src/enc/syntax.c
+++ b/src/enc/syntax.c
@@ -11,8 +11,9 @@
#include <assert.h>
-#include "./vp8enci.h"
+#include "../utils/utils.h"
#include "webp/format_constants.h"
+#include "./vp8enci.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
@@ -21,18 +22,6 @@ extern "C" {
//------------------------------------------------------------------------------
// Helper functions
-// TODO(later): Move to webp/format_constants.h?
-static void PutLE24(uint8_t* const data, uint32_t val) {
- data[0] = (val >> 0) & 0xff;
- data[1] = (val >> 8) & 0xff;
- data[2] = (val >> 16) & 0xff;
-}
-
-static void PutLE32(uint8_t* const data, uint32_t val) {
- PutLE24(data, val);
- data[3] = (val >> 24) & 0xff;
-}
-
static int IsVP8XNeeded(const VP8Encoder* const enc) {
return !!enc->has_alpha_; // Currently the only case when VP8X is needed.
// This could change in the future.
@@ -73,7 +62,7 @@ static WebPEncodingError PutVP8XHeader(const VP8Encoder* const enc) {
assert(pic->width <= MAX_CANVAS_SIZE && pic->height <= MAX_CANVAS_SIZE);
if (enc->has_alpha_) {
- flags |= ALPHA_FLAG_BIT;
+ flags |= ALPHA_FLAG;
}
PutLE32(vp8x + TAG_SIZE, VP8X_CHUNK_SIZE);