Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5c1cb379
Commit
5c1cb379
authored
Apr 29, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
<= vs. >= 10l bug
Originally committed as revision 5333 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2848ce84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
mathematics.c
libavutil/mathematics.c
+9
-5
No files found.
libavutil/mathematics.c
View file @
5c1cb379
...
@@ -82,7 +82,7 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
...
@@ -82,7 +82,7 @@ int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd){
// int o= a1 & 0x8000000000000000ULL;
// int o= a1 & 0x8000000000000000ULL;
a1
+=
a1
+
((
a0
>>
i
)
&
1
);
a1
+=
a1
+
((
a0
>>
i
)
&
1
);
t1
+=
t1
;
t1
+=
t1
;
if
(
/*o || */
c
>
=
a1
){
if
(
/*o || */
c
<
=
a1
){
a1
-=
c
;
a1
-=
c
;
t1
++
;
t1
++
;
}
}
...
@@ -109,12 +109,13 @@ int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq){
...
@@ -109,12 +109,13 @@ int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq){
return
av_rescale_rnd
(
a
,
b
,
c
,
AV_ROUND_NEAR_INF
);
return
av_rescale_rnd
(
a
,
b
,
c
,
AV_ROUND_NEAR_INF
);
}
}
#if 0
#if 0
#undef printf
main(){
main(){
int64_t a,b,c,d,e;
int64_t a,b,c,d,e;
for(a=7; a<256
*256*256*128LL
; a=(a*3)+1){
for(a=7; a<256
LL*256*256*256*128
; a=(a*3)+1){
for(b=3; b<256
*256*256*128LL
; b=(b*5)/4+1){
for(b=3; b<256
LL*256*256*256*128
; b=(b*5)/4+1){
for(c=9; c<256
*256*256*128LL
; c=(c*7)/5+3 ){
for(c=9; c<256
LL*256*256*256*128
; c=(c*7)/5+3 ){
int64_t r= c/2;
int64_t r= c/2;
AVInteger ai;
AVInteger ai;
ai= av_mul_i(av_int2i(a), av_int2i(b));
ai= av_mul_i(av_int2i(a), av_int2i(b));
...
@@ -124,7 +125,10 @@ main(){
...
@@ -124,7 +125,10 @@ main(){
e= av_rescale(a,b,c);
e= av_rescale(a,b,c);
if(d!=e) printf("%Ld*%Ld/%Ld= %Ld=%Ld\n"L, a, b, c, d, e);
if((double)a * (double)b / (double)c > (1LL<<63))
continue;
if(d!=e) printf("%Ld*%Ld/%Ld= %Ld=%Ld\n", a, b, c, d, e);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment