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
76b58f9f
Commit
76b58f9f
authored
May 15, 2009
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics: Remove pointless {}.
Originally committed as revision 18848 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e09989be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
14 deletions
+1
-14
libamr.c
libavcodec/libamr.c
+1
-14
No files found.
libavcodec/libamr.c
View file @
76b58f9f
...
@@ -88,12 +88,8 @@ static int getBitrateMode(int bitrate)
...
@@ -88,12 +88,8 @@ static int getBitrateMode(int bitrate)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
{
if
(
rates
[
i
].
rate
==
bitrate
)
if
(
rates
[
i
].
rate
==
bitrate
)
{
return
rates
[
i
].
mode
;
return
rates
[
i
].
mode
;
}
}
/* no bitrate matching, return an error */
/* no bitrate matching, return an error */
return
-
1
;
return
-
1
;
}
}
...
@@ -103,14 +99,10 @@ static void amr_decode_fix_avctx(AVCodecContext * avctx)
...
@@ -103,14 +99,10 @@ static void amr_decode_fix_avctx(AVCodecContext * avctx)
const
int
is_amr_wb
=
1
+
(
avctx
->
codec_id
==
CODEC_ID_AMR_WB
);
const
int
is_amr_wb
=
1
+
(
avctx
->
codec_id
==
CODEC_ID_AMR_WB
);
if
(
avctx
->
sample_rate
==
0
)
if
(
avctx
->
sample_rate
==
0
)
{
avctx
->
sample_rate
=
8000
*
is_amr_wb
;
avctx
->
sample_rate
=
8000
*
is_amr_wb
;
}
if
(
avctx
->
channels
==
0
)
if
(
avctx
->
channels
==
0
)
{
avctx
->
channels
=
1
;
avctx
->
channels
=
1
;
}
avctx
->
frame_size
=
160
*
is_amr_wb
;
avctx
->
frame_size
=
160
*
is_amr_wb
;
avctx
->
sample_fmt
=
SAMPLE_FMT_S16
;
avctx
->
sample_fmt
=
SAMPLE_FMT_S16
;
...
@@ -329,12 +321,8 @@ static int getWBBitrateMode(int bitrate)
...
@@ -329,12 +321,8 @@ static int getWBBitrateMode(int bitrate)
int
i
;
int
i
;
for
(
i
=
0
;
i
<
9
;
i
++
)
for
(
i
=
0
;
i
<
9
;
i
++
)
{
if
(
rates
[
i
].
rate
==
bitrate
)
if
(
rates
[
i
].
rate
==
bitrate
)
{
return
rates
[
i
].
mode
;
return
rates
[
i
].
mode
;
}
}
/* no bitrate matching, return an error */
/* no bitrate matching, return an error */
return
-
1
;
return
-
1
;
}
}
...
@@ -443,10 +431,9 @@ static int amr_wb_decode_frame(AVCodecContext * avctx,
...
@@ -443,10 +431,9 @@ static int amr_wb_decode_frame(AVCodecContext * avctx,
int
packet_size
;
int
packet_size
;
static
const
uint8_t
block_size
[
16
]
=
{
18
,
23
,
33
,
37
,
41
,
47
,
51
,
59
,
61
,
6
,
6
,
0
,
0
,
0
,
1
,
1
};
static
const
uint8_t
block_size
[
16
]
=
{
18
,
23
,
33
,
37
,
41
,
47
,
51
,
59
,
61
,
6
,
6
,
0
,
0
,
0
,
1
,
1
};
if
(
buf_size
==
0
)
{
if
(
buf_size
==
0
)
/* nothing to do */
/* nothing to do */
return
0
;
return
0
;
}
mode
=
(
amrData
[
0
]
>>
3
)
&
0x000F
;
mode
=
(
amrData
[
0
]
>>
3
)
&
0x000F
;
packet_size
=
block_size
[
mode
];
packet_size
=
block_size
[
mode
];
...
...
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