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

Unified Diff: third_party/libwebp/utils/bit_writer_utils.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/utils/bit_writer.c ('k') | third_party/libwebp/utils/bit_writer_utils.c » ('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.h
diff --git a/third_party/libwebp/utils/bit_writer.h b/third_party/libwebp/utils/bit_writer_utils.h
similarity index 97%
rename from third_party/libwebp/utils/bit_writer.h
rename to third_party/libwebp/utils/bit_writer_utils.h
index ef360d1dc6f315fcd7692f6da391d0ed3135daec..9c02bbc06d9377e81300db25d018e3def98b0041 100644
--- a/third_party/libwebp/utils/bit_writer.h
+++ b/third_party/libwebp/utils/bit_writer_utils.h
@@ -54,7 +54,8 @@ int VP8BitWriterAppend(VP8BitWriter* const bw,
// return approximate write position (in bits)
static WEBP_INLINE uint64_t VP8BitWriterPos(const VP8BitWriter* const bw) {
- return (uint64_t)(bw->pos_ + bw->run_) * 8 + 8 + bw->nb_bits_;
+ const uint64_t nb_bits = 8 + bw->nb_bits_; // bw->nb_bits_ is <= 0, note
+ return (bw->pos_ + bw->run_) * 8 + nb_bits;
}
// Returns a pointer to the internal buffer.
« no previous file with comments | « third_party/libwebp/utils/bit_writer.c ('k') | third_party/libwebp/utils/bit_writer_utils.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698