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
adb206c2
Commit
adb206c2
authored
May 05, 2009
by
Måns Rullgård
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegaudio: use av_clip()
Originally committed as revision 18744 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4ee6a5c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
mpegaudiodec.c
libavcodec/mpegaudiodec.c
+2
-10
No files found.
libavcodec/mpegaudiodec.c
View file @
adb206c2
...
...
@@ -752,11 +752,7 @@ static inline int round_sample(int *sum)
int
sum1
;
sum1
=
(
*
sum
)
>>
OUT_SHIFT
;
*
sum
&=
(
1
<<
OUT_SHIFT
)
-
1
;
if
(
sum1
<
OUT_MIN
)
sum1
=
OUT_MIN
;
else
if
(
sum1
>
OUT_MAX
)
sum1
=
OUT_MAX
;
return
sum1
;
return
av_clip
(
sum1
,
OUT_MIN
,
OUT_MAX
);
}
/* signed 16x16 -> 32 multiply add accumulate */
...
...
@@ -774,11 +770,7 @@ static inline int round_sample(int64_t *sum)
int
sum1
;
sum1
=
(
int
)((
*
sum
)
>>
OUT_SHIFT
);
*
sum
&=
(
1
<<
OUT_SHIFT
)
-
1
;
if
(
sum1
<
OUT_MIN
)
sum1
=
OUT_MIN
;
else
if
(
sum1
>
OUT_MAX
)
sum1
=
OUT_MAX
;
return
sum1
;
return
av_clip
(
sum1
,
OUT_MIN
,
OUT_MAX
);
}
# define MULS(ra, rb) MUL64(ra, rb)
...
...
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