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

Unified Diff: third_party/libwebp/utils/bit_writer_utils.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/utils/bit_writer_utils.h ('k') | third_party/libwebp/utils/color_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/utils/bit_writer_utils.c
diff --git a/third_party/libwebp/utils/bit_writer.c b/third_party/libwebp/utils/bit_writer_utils.c
similarity index 98%
rename from third_party/libwebp/utils/bit_writer.c
rename to third_party/libwebp/utils/bit_writer_utils.c
index 064428691b4788befb0813bdf4cee3e3162c74de..ab0c49dce826dfb3ab1d6ba0031386bf1b79dcb5 100644
--- a/third_party/libwebp/utils/bit_writer.c
+++ b/third_party/libwebp/utils/bit_writer_utils.c
@@ -16,8 +16,8 @@
#include <string.h> // for memcpy()
#include <stdlib.h>
-#include "./bit_writer.h"
-#include "./endian_inl.h"
+#include "./bit_writer_utils.h"
+#include "./endian_inl_utils.h"
#include "./utils.h"
//------------------------------------------------------------------------------
@@ -143,13 +143,13 @@ int VP8PutBitUniform(VP8BitWriter* const bw, int bit) {
void VP8PutBits(VP8BitWriter* const bw, uint32_t value, int nb_bits) {
uint32_t mask;
assert(nb_bits > 0 && nb_bits < 32);
- for (mask = 1u << (nb_bits - 1); mask; mask >>= 1)
+ for (mask = 1u << (nb_bits - 1); mask; mask >>= 1) {
VP8PutBitUniform(bw, value & mask);
+ }
}
void VP8PutSignedBits(VP8BitWriter* const bw, int value, int nb_bits) {
- if (!VP8PutBitUniform(bw, value != 0))
- return;
+ if (!VP8PutBitUniform(bw, value != 0)) return;
if (value < 0) {
VP8PutBits(bw, ((-value) << 1) | 1, nb_bits + 1);
} else {
« no previous file with comments | « third_party/libwebp/utils/bit_writer_utils.h ('k') | third_party/libwebp/utils/color_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698