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
0a13093d
Commit
0a13093d
authored
Jan 01, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
Originally committed as revision 1388 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
fbd8bb7e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
motion_est.c
libavcodec/motion_est.c
+15
-15
No files found.
libavcodec/motion_est.c
View file @
0a13093d
...
...
@@ -1222,21 +1222,6 @@ static inline int direct_search(MpegEncContext * s,
int16_t
(
*
mv_table
)[
2
]
=
s
->
b_direct_mv_table
;
uint16_t
*
const
mv_penalty
=
s
->
me
.
mv_penalty
[
1
]
+
MAX_MV
;
P_LEFT
[
0
]
=
mv_table
[
mot_xy
-
1
][
0
];
P_LEFT
[
1
]
=
mv_table
[
mot_xy
-
1
][
1
];
/* special case for first line */
if
((
mb_y
==
0
||
s
->
first_slice_line
))
{
}
else
{
P_TOP
[
0
]
=
mv_table
[
mot_xy
-
mot_stride
][
0
];
P_TOP
[
1
]
=
mv_table
[
mot_xy
-
mot_stride
][
1
];
P_TOPRIGHT
[
0
]
=
mv_table
[
mot_xy
-
mot_stride
+
1
][
0
];
P_TOPRIGHT
[
1
]
=
mv_table
[
mot_xy
-
mot_stride
+
1
][
1
];
P_MEDIAN
[
0
]
=
mid_pred
(
P_LEFT
[
0
],
P_TOP
[
0
],
P_TOPRIGHT
[
0
]);
P_MEDIAN
[
1
]
=
mid_pred
(
P_LEFT
[
1
],
P_TOP
[
1
],
P_TOPRIGHT
[
1
]);
}
ymin
=
xmin
=
(
-
32
)
>>
shift
;
ymax
=
xmax
=
31
>>
shift
;
...
...
@@ -1283,6 +1268,21 @@ static inline int direct_search(MpegEncContext * s,
return
256
*
256
*
256
*
64
;
}
P_LEFT
[
0
]
=
clip
(
mv_table
[
mot_xy
-
1
][
0
],
xmin
<<
shift
,
xmax
<<
shift
);
P_LEFT
[
1
]
=
clip
(
mv_table
[
mot_xy
-
1
][
1
],
ymin
<<
shift
,
ymax
<<
shift
);
/* special case for first line */
if
((
mb_y
==
0
||
s
->
first_slice_line
))
{
}
else
{
P_TOP
[
0
]
=
clip
(
mv_table
[
mot_xy
-
mot_stride
][
0
],
xmin
<<
shift
,
xmax
<<
shift
);
P_TOP
[
1
]
=
clip
(
mv_table
[
mot_xy
-
mot_stride
][
1
],
ymin
<<
shift
,
ymax
<<
shift
);
P_TOPRIGHT
[
0
]
=
clip
(
mv_table
[
mot_xy
-
mot_stride
+
1
][
0
],
xmin
<<
shift
,
xmax
<<
shift
);
P_TOPRIGHT
[
1
]
=
clip
(
mv_table
[
mot_xy
-
mot_stride
+
1
][
1
],
ymin
<<
shift
,
ymax
<<
shift
);
P_MEDIAN
[
0
]
=
mid_pred
(
P_LEFT
[
0
],
P_TOP
[
0
],
P_TOPRIGHT
[
0
]);
P_MEDIAN
[
1
]
=
mid_pred
(
P_LEFT
[
1
],
P_TOP
[
1
],
P_TOPRIGHT
[
1
]);
}
if
(
s
->
flags
&
CODEC_FLAG_QPEL
){
dmin
=
simple_direct_qpel_epzs_motion_search
(
s
,
0
,
&
mx
,
&
my
,
P
,
0
,
0
,
xmin
,
ymin
,
xmax
,
ymax
,
&
s
->
last_picture
,
mv_table
,
1
<<
14
,
mv_penalty
);
...
...
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