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

Unified Diff: core/fpdfapi/page/fpdf_page_func.cpp

Issue 2640143003: Update safe numerics package to get bitwise ops (Closed)
Patch Set: 0 is a perfectly fine value of zero 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
Index: core/fpdfapi/page/fpdf_page_func.cpp
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index 672bfc02be8e83b95b43fa228ee24ef5dd58ae4f..9949e052c9bf1747c2d88e7df96c0adfd74f4ffc 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -574,10 +574,9 @@ bool CPDF_SampledFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
if (!pSampleData)
return false;
- for (uint32_t j = 0; j < m_nOutputs; j++) {
+ for (uint32_t j = 0; j < m_nOutputs; j++, bitpos += m_nBitsPerSample) {
uint32_t sample =
- GetBits32(pSampleData, bitpos.ValueOrDie() + j * m_nBitsPerSample,
- m_nBitsPerSample);
+ GetBits32(pSampleData, bitpos.ValueOrDie(), m_nBitsPerSample);
FX_FLOAT encoded = (FX_FLOAT)sample;
for (uint32_t i = 0; i < m_nInputs; i++) {
if (index[i] == m_EncodeInfo[i].sizes - 1) {

Powered by Google App Engine
This is Rietveld 408576698