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
2bc8348c
Commit
2bc8348c
authored
Aug 29, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/snowenc: convert all asserts to av_asserts
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f07b5699
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
snowenc.c
libavcodec/snowenc.c
+9
-9
No files found.
libavcodec/snowenc.c
View file @
2bc8348c
...
...
@@ -254,7 +254,7 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
int
s_context
=
2
*
left
->
level
+
2
*
top
->
level
+
tl
->
level
+
tr
->
level
;
int
ref
,
best_ref
,
ref_score
,
ref_mx
,
ref_my
;
a
ssert
(
sizeof
(
s
->
block_state
)
>=
256
);
a
v_assert0
(
sizeof
(
s
->
block_state
)
>=
256
);
if
(
s
->
keyframe
){
set_blocks
(
s
,
level
,
x
,
y
,
pl
,
pcb
,
pcr
,
0
,
0
,
0
,
BLOCK_INTRA
);
return
0
;
...
...
@@ -388,10 +388,10 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
iscore
+=
(
s
->
lambda2
*
(
get_rac_count
(
&
ic
)
-
base_bits
))
>>
FF_LAMBDA_SHIFT
;
// assert(score==256*256*256*64-1);
a
ssert
(
iscore
<
255
*
255
*
256
+
s
->
lambda2
*
10
);
a
ssert
(
iscore
>=
0
);
a
ssert
(
l
>=
0
&&
l
<=
255
);
a
ssert
(
pl
>=
0
&&
pl
<=
255
);
a
v_assert1
(
iscore
<
255
*
255
*
256
+
s
->
lambda2
*
10
);
a
v_assert1
(
iscore
>=
0
);
a
v_assert1
(
l
>=
0
&&
l
<=
255
);
a
v_assert1
(
pl
>=
0
&&
pl
<=
255
);
if
(
level
==
0
){
int
varc
=
iscore
>>
8
;
...
...
@@ -731,7 +731,7 @@ static int get_4block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index){
memcpy
(
dst
+
w
+
y2
*
ref_stride
,
src
+
w
+
y2
*
ref_stride
,
x
+
block_w
-
w
);
}
a
ssert
(
block_w
==
8
||
block_w
==
16
);
a
v_assert1
(
block_w
==
8
||
block_w
==
16
);
distortion
+=
s
->
dsp
.
me_cmp
[
block_w
==
8
](
&
s
->
m
,
src
+
x
+
y
*
ref_stride
,
dst
+
x
+
y
*
ref_stride
,
ref_stride
,
block_h
);
}
...
...
@@ -1606,8 +1606,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int
block_height
=
(
height
+
15
)
>>
4
;
int
stride
=
s
->
current_picture
.
linesize
[
0
];
a
ssert
(
s
->
current_picture
.
data
[
0
]);
a
ssert
(
s
->
last_picture
[
0
].
data
[
0
]);
a
v_assert0
(
s
->
current_picture
.
data
[
0
]);
a
v_assert0
(
s
->
last_picture
[
0
].
data
[
0
]);
s
->
m
.
avctx
=
s
->
avctx
;
s
->
m
.
current_picture
.
f
.
data
[
0
]
=
s
->
current_picture
.
data
[
0
];
...
...
@@ -1750,7 +1750,7 @@ redo_frame:
decorrelate
(
s
,
b
,
b
->
ibuf
,
b
->
stride
,
pic
->
pict_type
==
AV_PICTURE_TYPE_P
,
0
);
if
(
!
s
->
no_bitstream
)
encode_subband
(
s
,
b
,
b
->
ibuf
,
b
->
parent
?
b
->
parent
->
ibuf
:
NULL
,
b
->
stride
,
orientation
);
a
ssert
(
b
->
parent
==
NULL
||
b
->
parent
->
stride
==
b
->
stride
*
2
);
a
v_assert0
(
b
->
parent
==
NULL
||
b
->
parent
->
stride
==
b
->
stride
*
2
);
if
(
orientation
==
0
)
correlate
(
s
,
b
,
b
->
ibuf
,
b
->
stride
,
1
,
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