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
cb009a8c
Commit
cb009a8c
authored
Jan 28, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10l / 4mv segfault fix
Originally committed as revision 1517 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1501987b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
motion_est.c
libavcodec/motion_est.c
+7
-7
No files found.
libavcodec/motion_est.c
View file @
cb009a8c
...
...
@@ -870,8 +870,8 @@ static inline int h263_mv4_search(MpegEncContext *s, int xmin, int ymin, int xma
dmin4
=
s
->
me
.
sub_motion_search
(
s
,
&
mx4
,
&
my4
,
dmin4
,
rel_xmin4
,
rel_ymin4
,
rel_xmax4
,
rel_ymax4
,
pred_x4
,
pred_y4
,
&
s
->
last_picture
,
block
,
1
,
mv_penalty
);
if
(
s
->
dsp
.
me_sub_cmp
!=
s
->
dsp
.
mb_cmp
){
if
(
s
->
dsp
.
me_sub_cmp
[
0
]
!=
s
->
dsp
.
mb_cmp
[
0
]
){
int
dxy
;
const
int
offset
=
((
block
&
1
)
+
(
block
>>
1
)
*
s
->
linesize
)
*
8
;
uint8_t
*
dest_y
=
s
->
me
.
scratchpad
+
offset
;
...
...
@@ -881,17 +881,17 @@ static inline int h263_mv4_search(MpegEncContext *s, int xmin, int ymin, int xma
dxy
=
((
my4
&
3
)
<<
2
)
|
(
mx4
&
3
);
if
(
s
->
no_rounding
)
s
->
dsp
.
put_no_rnd_qpel_pixels_tab
[
0
][
dxy
](
dest_y
,
ref
,
s
->
linesize
);
s
->
dsp
.
put_no_rnd_qpel_pixels_tab
[
1
][
dxy
](
dest_y
,
ref
,
s
->
linesize
);
else
s
->
dsp
.
put_qpel_pixels_tab
[
0
][
dxy
](
dest_y
,
ref
,
s
->
linesize
);
s
->
dsp
.
put_qpel_pixels_tab
[
1
][
dxy
](
dest_y
,
ref
,
s
->
linesize
);
}
else
{
uint8_t
*
ref
=
s
->
last_picture
.
data
[
0
]
+
(
s
->
mb_x
*
16
+
(
mx4
>>
1
))
+
(
s
->
mb_y
*
16
+
(
my4
>>
1
))
*
s
->
linesize
+
offset
;
dxy
=
((
my4
&
1
)
<<
1
)
|
(
mx4
&
1
);
if
(
s
->
no_rounding
)
s
->
dsp
.
put_no_rnd_pixels_tab
[
0
][
dxy
](
dest_y
,
ref
,
s
->
linesize
,
16
);
s
->
dsp
.
put_no_rnd_pixels_tab
[
1
][
dxy
](
dest_y
,
ref
,
s
->
linesize
,
8
);
else
s
->
dsp
.
put_pixels_tab
[
0
][
dxy
](
dest_y
,
ref
,
s
->
linesize
,
16
);
s
->
dsp
.
put_pixels_tab
[
1
][
dxy
](
dest_y
,
ref
,
s
->
linesize
,
8
);
}
dmin_sum
+=
(
mv_penalty
[
mx4
-
pred_x4
]
+
mv_penalty
[
my4
-
pred_y4
])
*
s
->
me
.
mb_penalty_factor
;
}
else
...
...
@@ -909,7 +909,7 @@ static inline int h263_mv4_search(MpegEncContext *s, int xmin, int ymin, int xma
s
->
motion_val
[
s
->
block_index
[
block
]
][
1
]
=
my4
;
}
if
(
s
->
dsp
.
me_sub_cmp
!=
s
->
dsp
.
mb_cmp
){
if
(
s
->
dsp
.
me_sub_cmp
[
0
]
!=
s
->
dsp
.
mb_cmp
[
0
]
){
dmin_sum
+=
s
->
dsp
.
mb_cmp
[
0
](
s
,
s
->
new_picture
.
data
[
0
]
+
s
->
mb_x
*
16
+
s
->
mb_y
*
16
*
s
->
linesize
,
s
->
me
.
scratchpad
,
s
->
linesize
);
}
...
...
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