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
5e39bb07
Commit
5e39bb07
authored
Aug 04, 2012
by
Mans Rullgard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: simplify dxy calculation in hpel_motion()
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
c2626492
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
mpegvideo_motion.c
libavcodec/mpegvideo_motion.c
+5
-6
No files found.
libavcodec/mpegvideo_motion.c
View file @
5e39bb07
...
...
@@ -177,20 +177,19 @@ static inline int hpel_motion(MpegEncContext *s,
op_pixels_func
*
pix_op
,
int
motion_x
,
int
motion_y
)
{
int
dxy
;
int
dxy
=
0
;
int
emu
=
0
;
dxy
=
((
motion_y
&
1
)
<<
1
)
|
(
motion_x
&
1
);
src_x
+=
motion_x
>>
1
;
src_y
+=
motion_y
>>
1
;
/* WARNING: do no forget half pels */
src_x
=
av_clip
(
src_x
,
-
16
,
s
->
width
);
//FIXME unneeded for emu?
if
(
src_x
=
=
s
->
width
)
dxy
&=
~
1
;
if
(
src_x
!
=
s
->
width
)
dxy
|=
motion_x
&
1
;
src_y
=
av_clip
(
src_y
,
-
16
,
s
->
height
);
if
(
src_y
=
=
s
->
height
)
dxy
&=
~
2
;
if
(
src_y
!
=
s
->
height
)
dxy
|=
(
motion_y
&
1
)
<<
1
;
src
+=
src_y
*
s
->
linesize
+
src_x
;
if
(
s
->
unrestricted_mv
&&
(
s
->
flags
&
CODEC_FLAG_EMU_EDGE
)){
...
...
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