History

avutil/integer: Use '|' instead of '+' where it is more natural

Andreas Rheinhardt committed 4 years ago

Commit d7c3e521 parent 9a6cdd11 file · +2 −2Browse files

Unified · Split

libavutil/integer.c+2−2
@@ -104,7 +104,7 @@ AVInteger av_shr_i(AVInteger a, int s){ · 103 unmodified lines
104104 unsigned int index= i + (s>>4);
105105 unsigned int v=0;
106106 if (index + 1 < AV_INTEGER_SIZE) v = a.v[index + 1] * (1U << 16);
107− if(index <AV_INTEGER_SIZE) v+= a.v[index ];
107+ if (index < AV_INTEGER_SIZE) v |= a.v[index];
108108 out.v[i]= v >> (s&15);
109109 }
110110 return out;
@@ -161,6 +161,6 @@ int64_t av_i2int(AVInteger a){ · 50 unmodified lines
161161 uint64_t out = a.v[3];
162162
163163 for (int i = 2; i >= 0; i--)
164− out = (out<<16) + a.v[i];
164+ out = (out << 16) | a.v[i];
165165 return out;
166166 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t