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
ac83e7b2
Commit
ac83e7b2
authored
Jul 07, 2007
by
Stefan Gehrer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make vector constants global
Originally committed as revision 9510 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
bd2216e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
cavs.c
libavcodec/cavs.c
+19
-19
cavsdata.h
libavcodec/cavsdata.h
+3
-3
No files found.
libavcodec/cavs.c
View file @
ac83e7b2
...
...
@@ -592,7 +592,7 @@ static void mv_pred(AVSContext *h, enum mv_loc_t nP, enum mv_loc_t nC,
((
mvA
->
ref
==
NOT_AVAIL
)
||
(
mvB
->
ref
==
NOT_AVAIL
)
||
((
mvA
->
x
|
mvA
->
y
|
mvA
->
ref
)
==
0
)
||
((
mvB
->
x
|
mvB
->
y
|
mvB
->
ref
)
==
0
)
))
{
mvP2
=
&
un_mv
;
mvP2
=
&
ff_cavs_
un_mv
;
/* if there is only one suitable candidate, take it */
}
else
if
((
mvA
->
ref
>=
0
)
&&
(
mvB
->
ref
<
0
)
&&
(
mvC
->
ref
<
0
))
{
mvP2
=
mvA
;
...
...
@@ -746,10 +746,10 @@ static inline void init_mb(AVSContext *h) {
h
->
pred_mode_Y
[
2
]
=
h
->
top_pred_Y
[
h
->
mbx
*
2
+
1
];
/* clear top predictors if MB B is not available */
if
(
!
(
h
->
flags
&
B_AVAIL
))
{
h
->
mv
[
MV_FWD_B2
]
=
un_mv
;
h
->
mv
[
MV_FWD_B3
]
=
un_mv
;
h
->
mv
[
MV_BWD_B2
]
=
un_mv
;
h
->
mv
[
MV_BWD_B3
]
=
un_mv
;
h
->
mv
[
MV_FWD_B2
]
=
ff_cavs_
un_mv
;
h
->
mv
[
MV_FWD_B3
]
=
ff_cavs_
un_mv
;
h
->
mv
[
MV_BWD_B2
]
=
ff_cavs_
un_mv
;
h
->
mv
[
MV_BWD_B3
]
=
ff_cavs_
un_mv
;
h
->
pred_mode_Y
[
1
]
=
h
->
pred_mode_Y
[
2
]
=
NOT_AVAIL
;
h
->
flags
&=
~
(
C_AVAIL
|
D_AVAIL
);
}
else
if
(
h
->
mbx
)
{
...
...
@@ -759,13 +759,13 @@ static inline void init_mb(AVSContext *h) {
h
->
flags
&=
~
C_AVAIL
;
/* clear top-right predictors if MB C is not available */
if
(
!
(
h
->
flags
&
C_AVAIL
))
{
h
->
mv
[
MV_FWD_C2
]
=
un_mv
;
h
->
mv
[
MV_BWD_C2
]
=
un_mv
;
h
->
mv
[
MV_FWD_C2
]
=
ff_cavs_
un_mv
;
h
->
mv
[
MV_BWD_C2
]
=
ff_cavs_
un_mv
;
}
/* clear top-left predictors if MB D is not available */
if
(
!
(
h
->
flags
&
D_AVAIL
))
{
h
->
mv
[
MV_FWD_D3
]
=
un_mv
;
h
->
mv
[
MV_BWD_D3
]
=
un_mv
;
h
->
mv
[
MV_FWD_D3
]
=
ff_cavs_
un_mv
;
h
->
mv
[
MV_BWD_D3
]
=
ff_cavs_
un_mv
;
}
/* set pointer for co-located macroblock type */
h
->
col_type
=
&
h
->
col_type_base
[
h
->
mby
*
h
->
mb_width
+
h
->
mbx
];
...
...
@@ -801,7 +801,7 @@ static inline int next_mb(AVSContext *h) {
h
->
pred_mode_Y
[
3
]
=
h
->
pred_mode_Y
[
6
]
=
NOT_AVAIL
;
/* clear left mv predictors */
for
(
i
=
0
;
i
<=
20
;
i
+=
4
)
h
->
mv
[
i
]
=
un_mv
;
h
->
mv
[
i
]
=
ff_cavs_
un_mv
;
h
->
mbx
=
0
;
h
->
mby
++
;
/* re-calculate sample pointers */
...
...
@@ -911,9 +911,9 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
filter_mb
(
h
,
I_8X8
);
/* mark motion vectors as intra */
h
->
mv
[
MV_FWD_X0
]
=
intra_mv
;
h
->
mv
[
MV_FWD_X0
]
=
ff_cavs_
intra_mv
;
set_mvs
(
&
h
->
mv
[
MV_FWD_X0
],
BLK_16X16
);
h
->
mv
[
MV_BWD_X0
]
=
intra_mv
;
h
->
mv
[
MV_BWD_X0
]
=
ff_cavs_
intra_mv
;
set_mvs
(
&
h
->
mv
[
MV_BWD_X0
],
BLK_16X16
);
if
(
h
->
pic_type
!=
FF_B_TYPE
)
*
h
->
col_type
=
I_8X8
;
...
...
@@ -972,9 +972,9 @@ static void decode_mb_b(AVSContext *h, enum mb_t mb_type) {
init_mb
(
h
);
/* reset all MVs */
h
->
mv
[
MV_FWD_X0
]
=
dir_mv
;
h
->
mv
[
MV_FWD_X0
]
=
ff_cavs_
dir_mv
;
set_mvs
(
&
h
->
mv
[
MV_FWD_X0
],
BLK_16X16
);
h
->
mv
[
MV_BWD_X0
]
=
dir_mv
;
h
->
mv
[
MV_BWD_X0
]
=
ff_cavs_
dir_mv
;
set_mvs
(
&
h
->
mv
[
MV_BWD_X0
],
BLK_16X16
);
switch
(
mb_type
)
{
case
B_SKIP
:
...
...
@@ -1116,10 +1116,10 @@ static void init_pic(AVSContext *h) {
/* clear some predictors */
for
(
i
=
0
;
i
<=
20
;
i
+=
4
)
h
->
mv
[
i
]
=
un_mv
;
h
->
mv
[
MV_BWD_X0
]
=
dir_mv
;
h
->
mv
[
i
]
=
ff_cavs_
un_mv
;
h
->
mv
[
MV_BWD_X0
]
=
ff_cavs_
dir_mv
;
set_mvs
(
&
h
->
mv
[
MV_BWD_X0
],
BLK_16X16
);
h
->
mv
[
MV_FWD_X0
]
=
dir_mv
;
h
->
mv
[
MV_FWD_X0
]
=
ff_cavs_
dir_mv
;
set_mvs
(
&
h
->
mv
[
MV_FWD_X0
],
BLK_16X16
);
h
->
pred_mode_Y
[
3
]
=
h
->
pred_mode_Y
[
6
]
=
NOT_AVAIL
;
h
->
cy
=
h
->
picture
.
data
[
0
];
...
...
@@ -1424,8 +1424,8 @@ static int cavs_decode_init(AVCodecContext * avctx) {
h
->
intra_pred_c
[
INTRA_C_LP_LEFT
]
=
intra_pred_lp_left
;
h
->
intra_pred_c
[
INTRA_C_LP_TOP
]
=
intra_pred_lp_top
;
h
->
intra_pred_c
[
INTRA_C_DC_128
]
=
intra_pred_dc_128
;
h
->
mv
[
7
]
=
un_mv
;
h
->
mv
[
19
]
=
un_mv
;
h
->
mv
[
7
]
=
ff_cavs_
un_mv
;
h
->
mv
[
19
]
=
ff_cavs_
un_mv
;
return
0
;
}
...
...
libavcodec/cavsdata.h
View file @
ac83e7b2
...
...
@@ -106,14 +106,14 @@ static const uint16_t dequant_mul[64] = {
/** marks block as unavailable, i.e. out of picture
or not yet decoded */
static
const
vector_t
un_mv
=
{
0
,
0
,
1
,
NOT_AVAIL
};
const
vector_t
ff_cavs_
un_mv
=
{
0
,
0
,
1
,
NOT_AVAIL
};
/** marks block as "no prediction from this direction"
e.g. forward motion vector in BWD partition */
static
const
vector_t
dir_mv
=
{
0
,
0
,
1
,
REF_DIR
};
const
vector_t
ff_cavs_
dir_mv
=
{
0
,
0
,
1
,
REF_DIR
};
/** marks block as using intra prediction */
static
const
vector_t
intra_mv
=
{
0
,
0
,
1
,
REF_INTRA
};
const
vector_t
ff_cavs_
intra_mv
=
{
0
,
0
,
1
,
REF_INTRA
};
#define EOB 0,0,0
...
...
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