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
9eb6e5cc
Commit
9eb6e5cc
authored
Jul 01, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmaenc: switch all remaining asserts to av_asserts
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f7cba736
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
wmaenc.c
libavcodec/wmaenc.c
+8
-11
No files found.
libavcodec/wmaenc.c
View file @
9eb6e5cc
...
...
@@ -24,9 +24,6 @@
#include "wma.h"
#include "libavutil/avassert.h"
#undef NDEBUG
#include <assert.h>
static
int
encode_init
(
AVCodecContext
*
avctx
){
WMACodecContext
*
s
=
avctx
->
priv_data
;
...
...
@@ -67,7 +64,7 @@ static int encode_init(AVCodecContext * avctx){
AV_WL32
(
extradata
,
flags1
);
AV_WL16
(
extradata
+
4
,
flags2
);
}
else
a
ssert
(
0
);
a
v_assert0
(
0
);
avctx
->
extradata
=
extradata
;
s
->
use_exp_vlc
=
flags2
&
0x0001
;
s
->
use_bit_reservoir
=
flags2
&
0x0002
;
...
...
@@ -151,7 +148,7 @@ static void encode_exp_vlc(WMACodecContext *s, int ch, const int *exp_param){
q_end
=
q
+
s
->
block_len
;
if
(
s
->
version
==
1
)
{
last_exp
=
*
exp_param
++
;
a
ssert
(
last_exp
-
10
>=
0
&&
last_exp
-
10
<
32
);
a
v_assert0
(
last_exp
-
10
>=
0
&&
last_exp
-
10
<
32
);
put_bits
(
&
s
->
pb
,
5
,
last_exp
-
10
);
q
+=
*
ptr
++
;
}
else
...
...
@@ -159,7 +156,7 @@ static void encode_exp_vlc(WMACodecContext *s, int ch, const int *exp_param){
while
(
q
<
q_end
)
{
int
exp
=
*
exp_param
++
;
int
code
=
exp
-
last_exp
+
60
;
a
ssert
(
code
>=
0
&&
code
<
120
);
a
v_assert1
(
code
>=
0
&&
code
<
120
);
put_bits
(
&
s
->
pb
,
ff_aac_scalefactor_bits
[
code
],
ff_aac_scalefactor_code
[
code
]);
/* XXX: use a table */
q
+=
*
ptr
++
;
...
...
@@ -175,7 +172,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
//FIXME remove duplication relative to decoder
if
(
s
->
use_variable_block_len
)
{
a
ssert
(
0
);
//FIXME not implemented
a
v_assert0
(
0
);
//FIXME not implemented
}
else
{
/* fixed block len */
s
->
next_block_len_bits
=
s
->
frame_len_bits
;
...
...
@@ -222,7 +219,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
mult
*=
mdct_norm
;
coefs
=
src_coefs
[
ch
];
if
(
s
->
use_noise_coding
&&
0
)
{
a
ssert
(
0
);
//FIXME not implemented
a
v_assert0
(
0
);
//FIXME not implemented
}
else
{
coefs
+=
s
->
coefs_start
;
n
=
nb_coefs
[
ch
];
...
...
@@ -278,13 +275,13 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
if
(
s
->
use_exp_vlc
)
{
encode_exp_vlc
(
s
,
ch
,
fixed_exp
);
}
else
{
a
ssert
(
0
);
//FIXME not implemented
a
v_assert0
(
0
);
//FIXME not implemented
// encode_exp_lsp(s, ch);
}
}
}
}
else
{
a
ssert
(
0
);
//FIXME not implemented
a
v_assert0
(
0
);
//FIXME not implemented
}
for
(
ch
=
0
;
ch
<
s
->
nb_channels
;
ch
++
)
{
...
...
@@ -306,7 +303,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
code
=
run
+
s
->
int_table
[
tindex
][
abs_level
-
1
];
}
a
ssert
(
code
<
s
->
coef_vlcs
[
tindex
]
->
n
);
a
v_assert2
(
code
<
s
->
coef_vlcs
[
tindex
]
->
n
);
put_bits
(
&
s
->
pb
,
s
->
coef_vlcs
[
tindex
]
->
huffbits
[
code
],
s
->
coef_vlcs
[
tindex
]
->
huffcodes
[
code
]);
if
(
code
==
0
){
...
...
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