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
21227514
Commit
21227514
authored
Jul 09, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 5696 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
b2846eff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
33 deletions
+16
-33
cavs.c
libavcodec/cavs.c
+16
-33
No files found.
libavcodec/cavs.c
View file @
21227514
...
@@ -576,6 +576,7 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
...
@@ -576,6 +576,7 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
vector_t
*
mvA
=
&
h
->
mv
[
nP
-
1
];
vector_t
*
mvA
=
&
h
->
mv
[
nP
-
1
];
vector_t
*
mvB
=
&
h
->
mv
[
nP
-
4
];
vector_t
*
mvB
=
&
h
->
mv
[
nP
-
4
];
vector_t
*
mvC
=
&
h
->
mv
[
nC
];
vector_t
*
mvC
=
&
h
->
mv
[
nC
];
vector_t
*
mvP2
=
NULL
;
mvP
->
ref
=
ref
;
mvP
->
ref
=
ref
;
mvP
->
dist
=
h
->
dist
[
mvP
->
ref
];
mvP
->
dist
=
h
->
dist
[
mvP
->
ref
];
...
@@ -592,42 +593,24 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
...
@@ -592,42 +593,24 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
}
}
/* if there is only one suitable candidate, take it */
/* if there is only one suitable candidate, take it */
if
((
mvA
->
ref
>=
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
<
0
))
{
if
((
mvA
->
ref
>=
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
<
0
))
{
mvP
->
x
=
mvA
->
x
;
mvP2
=
mvA
;
mvP
->
y
=
mvA
->
y
;
}
else
if
((
mvA
->
ref
<
0
)
&&
(
mvB
->
ref
>=
0
)
&&
(
mvC
->
ref
<
0
))
{
}
else
if
((
mvA
->
ref
<
0
)
&&
(
mvB
->
ref
>=
0
)
&&
(
mvC
->
ref
<
0
))
{
mvP
->
x
=
mvB
->
x
;
mvP2
=
mvB
;
mvP
->
y
=
mvB
->
y
;
}
else
if
((
mvA
->
ref
<
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
>=
0
))
{
}
else
if
((
mvA
->
ref
<
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
>=
0
))
{
mvP
->
x
=
mvC
->
x
;
mvP2
=
mvC
;
mvP
->
y
=
mvC
->
y
;
}
else
if
(
mode
==
MV_PRED_LEFT
&&
mvA
->
ref
==
ref
){
}
else
{
mvP2
=
mvA
;
switch
(
mode
)
{
}
else
if
(
mode
==
MV_PRED_TOP
&&
mvB
->
ref
==
ref
){
case
MV_PRED_LEFT
:
mvP2
=
mvB
;
if
(
mvA
->
ref
==
mvP
->
ref
)
{
}
else
if
(
mode
==
MV_PRED_TOPRIGHT
&&
mvC
->
ref
==
ref
){
mvP
->
x
=
mvA
->
x
;
mvP2
=
mvC
;
mvP
->
y
=
mvA
->
y
;
}
else
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
break
;
case
MV_PRED_TOP
:
if
(
mvB
->
ref
==
mvP
->
ref
)
{
mvP
->
x
=
mvB
->
x
;
mvP
->
y
=
mvB
->
y
;
}
else
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
break
;
case
MV_PRED_TOPRIGHT
:
if
(
mvC
->
ref
==
mvP
->
ref
)
{
mvP
->
x
=
mvC
->
x
;
mvP
->
y
=
mvC
->
y
;
}
else
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
break
;
default
:
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
break
;
}
}
}
if
(
mvP2
){
mvP
->
x
=
mvP2
->
x
;
mvP
->
y
=
mvP2
->
y
;
}
else
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
if
(
mode
<
MV_PRED_PSKIP
)
{
if
(
mode
<
MV_PRED_PSKIP
)
{
mvP
->
x
+=
get_se_golomb
(
&
h
->
s
.
gb
);
mvP
->
x
+=
get_se_golomb
(
&
h
->
s
.
gb
);
mvP
->
y
+=
get_se_golomb
(
&
h
->
s
.
gb
);
mvP
->
y
+=
get_se_golomb
(
&
h
->
s
.
gb
);
...
...
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