Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
3941a4f5
Commit
3941a4f5
authored
Aug 23, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snowenc: change a bunch of assert() to av_assert()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
2a754595
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
snowenc.c
libavcodec/snowenc.c
+13
-13
No files found.
libavcodec/snowenc.c
View file @
3941a4f5
...
@@ -390,8 +390,8 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
...
@@ -390,8 +390,8 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
s
->
m
.
mb_y
=
0
;
s
->
m
.
mb_y
=
0
;
c
->
skip
=
0
;
c
->
skip
=
0
;
a
ssert
(
c
->
stride
==
stride
);
a
v_assert1
(
c
->
stride
==
stride
);
a
ssert
(
c
->
uvstride
==
uvstride
);
a
v_assert1
(
c
->
uvstride
==
uvstride
);
c
->
penalty_factor
=
get_penalty_factor
(
s
->
lambda
,
s
->
lambda2
,
c
->
avctx
->
me_cmp
);
c
->
penalty_factor
=
get_penalty_factor
(
s
->
lambda
,
s
->
lambda2
,
c
->
avctx
->
me_cmp
);
c
->
sub_penalty_factor
=
get_penalty_factor
(
s
->
lambda
,
s
->
lambda2
,
c
->
avctx
->
me_sub_cmp
);
c
->
sub_penalty_factor
=
get_penalty_factor
(
s
->
lambda
,
s
->
lambda2
,
c
->
avctx
->
me_sub_cmp
);
...
@@ -430,10 +430,10 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
...
@@ -430,10 +430,10 @@ static int encode_q_branch(SnowContext *s, int level, int x, int y){
ref_score
=
ff_epzs_motion_search
(
&
s
->
m
,
&
ref_mx
,
&
ref_my
,
P
,
0
,
/*ref_index*/
0
,
last_mv
,
ref_score
=
ff_epzs_motion_search
(
&
s
->
m
,
&
ref_mx
,
&
ref_my
,
P
,
0
,
/*ref_index*/
0
,
last_mv
,
(
1
<<
16
)
>>
shift
,
level
-
LOG2_MB_SIZE
+
4
,
block_w
);
(
1
<<
16
)
>>
shift
,
level
-
LOG2_MB_SIZE
+
4
,
block_w
);
a
ssert
(
ref_mx
>=
c
->
xmin
);
a
v_assert2
(
ref_mx
>=
c
->
xmin
);
a
ssert
(
ref_mx
<=
c
->
xmax
);
a
v_assert2
(
ref_mx
<=
c
->
xmax
);
a
ssert
(
ref_my
>=
c
->
ymin
);
a
v_assert2
(
ref_my
>=
c
->
ymin
);
a
ssert
(
ref_my
<=
c
->
ymax
);
a
v_assert2
(
ref_my
<=
c
->
ymax
);
ref_score
=
c
->
sub_motion_search
(
&
s
->
m
,
&
ref_mx
,
&
ref_my
,
ref_score
,
0
,
0
,
level
-
LOG2_MB_SIZE
+
4
,
block_w
);
ref_score
=
c
->
sub_motion_search
(
&
s
->
m
,
&
ref_mx
,
&
ref_my
,
ref_score
,
0
,
0
,
level
-
LOG2_MB_SIZE
+
4
,
block_w
);
ref_score
=
ff_get_mb_score
(
&
s
->
m
,
ref_mx
,
ref_my
,
0
,
0
,
level
-
LOG2_MB_SIZE
+
4
,
block_w
,
0
);
ref_score
=
ff_get_mb_score
(
&
s
->
m
,
ref_mx
,
ref_my
,
0
,
0
,
level
-
LOG2_MB_SIZE
+
4
,
block_w
,
0
);
...
@@ -776,7 +776,7 @@ static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, uin
...
@@ -776,7 +776,7 @@ static int get_block_rd(SnowContext *s, int mb_x, int mb_y, int plane_index, uin
}
}
}
}
}
else
{
}
else
{
a
ssert
(
block_w
==
8
);
a
v_assert2
(
block_w
==
8
);
distortion
=
s
->
dsp
.
me_cmp
[
0
](
&
s
->
m
,
src
+
sx
+
sy
*
ref_stride
,
dst
+
sx
+
sy
*
ref_stride
,
ref_stride
,
block_w
*
2
);
distortion
=
s
->
dsp
.
me_cmp
[
0
](
&
s
->
m
,
src
+
sx
+
sy
*
ref_stride
,
dst
+
sx
+
sy
*
ref_stride
,
ref_stride
,
block_w
*
2
);
}
}
...
@@ -997,8 +997,8 @@ static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int
...
@@ -997,8 +997,8 @@ static av_always_inline int check_block(SnowContext *s, int mb_x, int mb_y, int
unsigned
value
;
unsigned
value
;
int
rd
,
index
;
int
rd
,
index
;
a
ssert
(
mb_x
>=
0
&&
mb_y
>=
0
);
a
v_assert2
(
mb_x
>=
0
&&
mb_y
>=
0
);
a
ssert
(
mb_x
<
b_stride
);
a
v_assert2
(
mb_x
<
b_stride
);
if
(
intra
){
if
(
intra
){
block
->
color
[
0
]
=
p
[
0
];
block
->
color
[
0
]
=
p
[
0
];
...
@@ -1051,9 +1051,9 @@ static av_always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_
...
@@ -1051,9 +1051,9 @@ static av_always_inline int check_4block_inter(SnowContext *s, int mb_x, int mb_
backup
[
2
]
=
block
[
b_stride
];
backup
[
2
]
=
block
[
b_stride
];
backup
[
3
]
=
block
[
b_stride
+
1
];
backup
[
3
]
=
block
[
b_stride
+
1
];
a
ssert
(
mb_x
>=
0
&&
mb_y
>=
0
);
a
v_assert2
(
mb_x
>=
0
&&
mb_y
>=
0
);
a
ssert
(
mb_x
<
b_stride
);
a
v_assert2
(
mb_x
<
b_stride
);
a
ssert
(((
mb_x
|
mb_y
)
&
1
)
==
0
);
a
v_assert2
(((
mb_x
|
mb_y
)
&
1
)
==
0
);
index
=
(
p0
+
31
*
p1
)
&
(
ME_CACHE_SIZE
-
1
);
index
=
(
p0
+
31
*
p1
)
&
(
ME_CACHE_SIZE
-
1
);
value
=
s
->
me_cache_generation
+
(
p0
>>
10
)
+
(
p1
<<
6
)
+
(
block
->
ref
<<
12
);
value
=
s
->
me_cache_generation
+
(
p0
>>
10
)
+
(
p1
<<
6
)
+
(
block
->
ref
<<
12
);
...
@@ -1601,7 +1601,7 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict)
...
@@ -1601,7 +1601,7 @@ static int ratecontrol_1pass(SnowContext *s, AVFrame *pict)
/* ugly, ratecontrol just takes a sqrt again */
/* ugly, ratecontrol just takes a sqrt again */
coef_sum
=
(
uint64_t
)
coef_sum
*
coef_sum
>>
16
;
coef_sum
=
(
uint64_t
)
coef_sum
*
coef_sum
>>
16
;
a
ssert
(
coef_sum
<
INT_MAX
);
a
v_assert0
(
coef_sum
<
INT_MAX
);
if
(
pict
->
pict_type
==
AV_PICTURE_TYPE_I
){
if
(
pict
->
pict_type
==
AV_PICTURE_TYPE_I
){
s
->
m
.
current_picture
.
mb_var_sum
=
coef_sum
;
s
->
m
.
current_picture
.
mb_var_sum
=
coef_sum
;
...
...
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