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
104 unsigned int index= i + (s>>4);104 unsigned int index= i + (s>>4);
105 unsigned int v=0;105 unsigned int v=0;
106 if (index + 1 < AV_INTEGER_SIZE) v = a.v[index + 1] * (1U << 16);106 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];
108 out.v[i]= v >> (s&15);108 out.v[i]= v >> (s&15);
109 }109 }
110 return out;110 return out;
@@ -161,6 +161,6 @@ int64_t av_i2int(AVInteger a){ · 50 unmodified lines
161 uint64_t out = a.v[3];161 uint64_t out = a.v[3];
162 162
163 for (int i = 2; i >= 0; i--)163 for (int i = 2; i >= 0; i--)
164 out = (out<<16) + a.v[i];164 out = (out << 16) | a.v[i];
165 return out;165 return out;
166}166}

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