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
64b98df3
Commit
64b98df3
authored
Dec 22, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vc1: simplify *_use_ic initialization
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ed5bed41
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
vc1.c
libavcodec/vc1.c
+6
-10
vc1.h
libavcodec/vc1.h
+1
-1
vc1dec.c
libavcodec/vc1dec.c
+3
-3
No files found.
libavcodec/vc1.c
View file @
64b98df3
...
...
@@ -596,24 +596,20 @@ static void rotate_luts(VC1Context *v)
C = A; \
} else { \
DEF; \
memcpy(&tmp,
&L
, sizeof(tmp)); \
memcpy(
&L , &N
, sizeof(tmp)); \
memcpy(
&N
, &tmp, sizeof(tmp)); \
memcpy(&tmp,
L
, sizeof(tmp)); \
memcpy(
L , N
, sizeof(tmp)); \
memcpy(
N
, &tmp, sizeof(tmp)); \
C = N; \
} \
} while(0)
ROTATE
(
int
tmp
,
v
->
last_use_ic
,
v
->
next_use_ic
,
v
->
curr_use_ic
,
v
->
aux_use_ic
);
ROTATE
(
int
*
tmp
,
&
v
->
last_use_ic
,
&
v
->
next_use_ic
,
v
->
curr_use_ic
,
&
v
->
aux_use_ic
);
ROTATE
(
uint8_t
tmp
[
2
][
256
],
v
->
last_luty
,
v
->
next_luty
,
v
->
curr_luty
,
v
->
aux_luty
);
ROTATE
(
uint8_t
tmp
[
2
][
256
],
v
->
last_lutuv
,
v
->
next_lutuv
,
v
->
curr_lutuv
,
v
->
aux_lutuv
);
INIT_LUT
(
32
,
0
,
v
->
curr_luty
[
0
],
v
->
curr_lutuv
[
0
],
0
);
INIT_LUT
(
32
,
0
,
v
->
curr_luty
[
1
],
v
->
curr_lutuv
[
1
],
0
);
v
->
curr_use_ic
=
0
;
if
(
v
->
curr_luty
==
v
->
next_luty
)
{
// If we just initialized next_lut, clear next_use_ic to match.
v
->
next_use_ic
=
0
;
}
*
v
->
curr_use_ic
=
0
;
}
int
ff_vc1_parse_frame_header
(
VC1Context
*
v
,
GetBitContext
*
gb
)
...
...
@@ -1108,7 +1104,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
INIT_LUT
(
v
->
lumscale2
,
v
->
lumshift2
,
v
->
curr_luty
[
v
->
cur_field_type
^
1
],
v
->
curr_lutuv
[
v
->
cur_field_type
^
1
],
0
);
INIT_LUT
(
v
->
lumscale
,
v
->
lumshift
,
v
->
last_luty
[
v
->
cur_field_type
],
v
->
last_lutuv
[
v
->
cur_field_type
],
1
);
}
v
->
next_use_ic
=
v
->
curr_use_ic
=
1
;
v
->
next_use_ic
=
*
v
->
curr_use_ic
=
1
;
}
else
{
INIT_LUT
(
v
->
lumscale
,
v
->
lumshift
,
v
->
last_luty
[
0
],
v
->
last_lutuv
[
0
],
1
);
INIT_LUT
(
v
->
lumscale2
,
v
->
lumshift2
,
v
->
last_luty
[
1
],
v
->
last_lutuv
[
1
],
1
);
...
...
libavcodec/vc1.h
View file @
64b98df3
...
...
@@ -315,7 +315,7 @@ typedef struct VC1Context{
uint8_t
aux_luty
[
2
][
256
],
aux_lutuv
[
2
][
256
];
///< lookup tables used for intensity compensation
uint8_t
next_luty
[
2
][
256
],
next_lutuv
[
2
][
256
];
///< lookup tables used for intensity compensation
uint8_t
(
*
curr_luty
)[
256
]
,(
*
curr_lutuv
)[
256
];
int
last_use_ic
,
curr_use_ic
,
next_use_ic
,
aux_use_ic
;
int
last_use_ic
,
*
curr_use_ic
,
next_use_ic
,
aux_use_ic
;
int
rnd
;
///< rounding control
/** Frame decoding info for S/M profiles only */
...
...
libavcodec/vc1dec.c
View file @
64b98df3
...
...
@@ -377,7 +377,7 @@ static void vc1_mc_1mv(VC1Context *v, int dir)
srcV
=
s
->
current_picture
.
f
.
data
[
2
];
luty
=
v
->
curr_luty
;
lutuv
=
v
->
curr_lutuv
;
use_ic
=
v
->
curr_use_ic
;
use_ic
=
*
v
->
curr_use_ic
;
}
else
{
srcY
=
s
->
last_picture
.
f
.
data
[
0
];
srcU
=
s
->
last_picture
.
f
.
data
[
1
];
...
...
@@ -571,7 +571,7 @@ static void vc1_mc_4mv_luma(VC1Context *v, int n, int dir, int avg)
if
(
v
->
field_mode
&&
(
v
->
cur_field_type
!=
v
->
ref_field_type
[
dir
])
&&
v
->
second_field
)
{
srcY
=
s
->
current_picture
.
f
.
data
[
0
];
luty
=
v
->
curr_luty
;
use_ic
=
v
->
curr_use_ic
;
use_ic
=
*
v
->
curr_use_ic
;
}
else
{
srcY
=
s
->
last_picture
.
f
.
data
[
0
];
luty
=
v
->
last_luty
;
...
...
@@ -873,7 +873,7 @@ static void vc1_mc_4mv_chroma(VC1Context *v, int dir)
srcU
=
s
->
current_picture
.
f
.
data
[
1
];
srcV
=
s
->
current_picture
.
f
.
data
[
2
];
lutuv
=
v
->
curr_lutuv
;
use_ic
=
v
->
curr_use_ic
;
use_ic
=
*
v
->
curr_use_ic
;
}
else
{
srcU
=
s
->
last_picture
.
f
.
data
[
1
];
srcV
=
s
->
last_picture
.
f
.
data
[
2
];
...
...
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