forked from FFmpeg/FFmpeg
avutil/integer: Use '|' instead of '+' where it is more natural
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
9a6cdd1ba3
commit
d7c3e52fbf
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ AVInteger av_shr_i(AVInteger a, int s){
|
||||||
unsigned int index= i + (s>>4);
|
unsigned int index= i + (s>>4);
|
||||||
unsigned int v=0;
|
unsigned int v=0;
|
||||||
if (index + 1 < AV_INTEGER_SIZE) v = a.v[index + 1] * (1U << 16);
|
if (index + 1 < AV_INTEGER_SIZE) v = a.v[index + 1] * (1U << 16);
|
||||||
if(index <AV_INTEGER_SIZE) v+= a.v[index ];
|
if (index < AV_INTEGER_SIZE) v |= a.v[index];
|
||||||
out.v[i]= v >> (s&15);
|
out.v[i]= v >> (s&15);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
|
@ -161,6 +161,6 @@ int64_t av_i2int(AVInteger a){
|
||||||
uint64_t out = a.v[3];
|
uint64_t out = a.v[3];
|
||||||
|
|
||||||
for (int i = 2; i >= 0; i--)
|
for (int i = 2; i >= 0; i--)
|
||||||
out = (out<<16) + a.v[i];
|
out = (out << 16) | a.v[i];
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue