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
b2846eff
Commit
b2846eff
authored
Jul 09, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid redundant local variables
Originally committed as revision 5695 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
69f34e5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
cavs.c
libavcodec/cavs.c
+7
-11
No files found.
libavcodec/cavs.c
View file @
b2846eff
...
@@ -576,17 +576,13 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
...
@@ -576,17 +576,13 @@ 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
];
int
mvAref
=
mvA
->
ref
;
int
mvBref
=
mvB
->
ref
;
int
mvCref
;
mvP
->
ref
=
ref
;
mvP
->
ref
=
ref
;
mvP
->
dist
=
h
->
dist
[
mvP
->
ref
];
mvP
->
dist
=
h
->
dist
[
mvP
->
ref
];
if
(
mvC
->
ref
==
NOT_AVAIL
)
if
(
mvC
->
ref
==
NOT_AVAIL
)
mvC
=
&
h
->
mv
[
nP
-
5
];
// set to top-left (mvD)
mvC
=
&
h
->
mv
[
nP
-
5
];
// set to top-left (mvD)
mvCref
=
mvC
->
ref
;
if
(
mode
==
MV_PRED_PSKIP
)
{
if
(
mode
==
MV_PRED_PSKIP
)
{
if
((
mvA
ref
==
NOT_AVAIL
)
||
(
mvB
ref
==
NOT_AVAIL
)
||
if
((
mvA
->
ref
==
NOT_AVAIL
)
||
(
mvB
->
ref
==
NOT_AVAIL
)
||
((
mvA
->
x
|
mvA
->
y
|
mvA
->
ref
)
==
0
)
||
((
mvA
->
x
|
mvA
->
y
|
mvA
->
ref
)
==
0
)
||
((
mvB
->
x
|
mvB
->
y
|
mvB
->
ref
)
==
0
)
)
{
((
mvB
->
x
|
mvB
->
y
|
mvB
->
ref
)
==
0
)
)
{
mvP
->
x
=
mvP
->
y
=
0
;
mvP
->
x
=
mvP
->
y
=
0
;
...
@@ -595,33 +591,33 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
...
@@ -595,33 +591,33 @@ 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
)
&&
(
mvBref
<
0
)
&&
(
mvC
ref
<
0
))
{
if
((
mvA
->
ref
>=
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
<
0
))
{
mvP
->
x
=
mvA
->
x
;
mvP
->
x
=
mvA
->
x
;
mvP
->
y
=
mvA
->
y
;
mvP
->
y
=
mvA
->
y
;
}
else
if
((
mvA
ref
<
0
)
&&
(
mvBref
>=
0
)
&&
(
mvC
ref
<
0
))
{
}
else
if
((
mvA
->
ref
<
0
)
&&
(
mvB
->
ref
>=
0
)
&&
(
mvC
->
ref
<
0
))
{
mvP
->
x
=
mvB
->
x
;
mvP
->
x
=
mvB
->
x
;
mvP
->
y
=
mvB
->
y
;
mvP
->
y
=
mvB
->
y
;
}
else
if
((
mvA
ref
<
0
)
&&
(
mvBref
<
0
)
&&
(
mvC
ref
>=
0
))
{
}
else
if
((
mvA
->
ref
<
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
>=
0
))
{
mvP
->
x
=
mvC
->
x
;
mvP
->
x
=
mvC
->
x
;
mvP
->
y
=
mvC
->
y
;
mvP
->
y
=
mvC
->
y
;
}
else
{
}
else
{
switch
(
mode
)
{
switch
(
mode
)
{
case
MV_PRED_LEFT
:
case
MV_PRED_LEFT
:
if
(
mvAref
==
mvP
->
ref
)
{
if
(
mvA
->
ref
==
mvP
->
ref
)
{
mvP
->
x
=
mvA
->
x
;
mvP
->
x
=
mvA
->
x
;
mvP
->
y
=
mvA
->
y
;
mvP
->
y
=
mvA
->
y
;
}
else
}
else
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
break
;
break
;
case
MV_PRED_TOP
:
case
MV_PRED_TOP
:
if
(
mvBref
==
mvP
->
ref
)
{
if
(
mvB
->
ref
==
mvP
->
ref
)
{
mvP
->
x
=
mvB
->
x
;
mvP
->
x
=
mvB
->
x
;
mvP
->
y
=
mvB
->
y
;
mvP
->
y
=
mvB
->
y
;
}
else
}
else
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
mv_pred_median
(
h
,
mvP
,
mvA
,
mvB
,
mvC
);
break
;
break
;
case
MV_PRED_TOPRIGHT
:
case
MV_PRED_TOPRIGHT
:
if
(
mvCref
==
mvP
->
ref
)
{
if
(
mvC
->
ref
==
mvP
->
ref
)
{
mvP
->
x
=
mvC
->
x
;
mvP
->
x
=
mvC
->
x
;
mvP
->
y
=
mvC
->
y
;
mvP
->
y
=
mvC
->
y
;
}
else
}
else
...
...
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