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
7d2e03af
Commit
7d2e03af
authored
May 04, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vc1: make overlap filter for I-frames bit-exact.
parent
5c9f147e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
311 additions
and
60 deletions
+311
-60
vc1.h
libavcodec/vc1.h
+2
-0
vc1dec.c
libavcodec/vc1dec.c
+236
-43
vc1dsp.c
libavcodec/vc1dsp.c
+54
-0
vc1dsp.h
libavcodec/vc1dsp.h
+4
-2
vc1
tests/ref/fate/vc1
+15
-15
No files found.
libavcodec/vc1.h
View file @
7d2e03af
...
@@ -317,6 +317,8 @@ typedef struct VC1Context{
...
@@ -317,6 +317,8 @@ typedef struct VC1Context{
int
bi_type
;
int
bi_type
;
int
x8_type
;
int
x8_type
;
DCTELEM
(
*
block
)[
6
][
64
];
int
n_allocated_blks
,
cur_blk_idx
,
left_blk_idx
,
topleft_blk_idx
,
top_blk_idx
;
uint32_t
*
cbp_base
,
*
cbp
;
uint32_t
*
cbp_base
,
*
cbp
;
uint8_t
*
is_intra_base
,
*
is_intra
;
uint8_t
*
is_intra_base
,
*
is_intra
;
int16_t
(
*
luma_mv_base
)[
2
],
(
*
luma_mv
)[
2
];
int16_t
(
*
luma_mv_base
)[
2
],
(
*
luma_mv
)[
2
];
...
...
libavcodec/vc1dec.c
View file @
7d2e03af
This diff is collapsed.
Click to expand it.
libavcodec/vc1dsp.c
View file @
7d2e03af
...
@@ -78,6 +78,58 @@ static void vc1_h_overlap_c(uint8_t* src, int stride)
...
@@ -78,6 +78,58 @@ static void vc1_h_overlap_c(uint8_t* src, int stride)
}
}
}
}
static
void
vc1_v_s_overlap_c
(
DCTELEM
*
top
,
DCTELEM
*
bottom
)
{
int
i
;
int
a
,
b
,
c
,
d
;
int
d1
,
d2
;
int
rnd1
=
4
,
rnd2
=
3
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
a
=
top
[
48
];
b
=
top
[
56
];
c
=
bottom
[
0
];
d
=
bottom
[
8
];
d1
=
a
-
d
;
d2
=
a
-
d
+
b
-
c
;
top
[
48
]
=
((
a
<<
3
)
-
d1
+
rnd1
)
>>
3
;
top
[
56
]
=
((
b
<<
3
)
-
d2
+
rnd2
)
>>
3
;
bottom
[
0
]
=
((
c
<<
3
)
+
d2
+
rnd1
)
>>
3
;
bottom
[
8
]
=
((
d
<<
3
)
+
d1
+
rnd2
)
>>
3
;
bottom
++
;
top
++
;
rnd2
=
7
-
rnd2
;
rnd1
=
7
-
rnd1
;
}
}
static
void
vc1_h_s_overlap_c
(
DCTELEM
*
left
,
DCTELEM
*
right
)
{
int
i
;
int
a
,
b
,
c
,
d
;
int
d1
,
d2
;
int
rnd1
=
4
,
rnd2
=
3
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
a
=
left
[
6
];
b
=
left
[
7
];
c
=
right
[
0
];
d
=
right
[
1
];
d1
=
a
-
d
;
d2
=
a
-
d
+
b
-
c
;
left
[
6
]
=
((
a
<<
3
)
-
d1
+
rnd1
)
>>
3
;
left
[
7
]
=
((
b
<<
3
)
-
d2
+
rnd2
)
>>
3
;
right
[
0
]
=
((
c
<<
3
)
+
d2
+
rnd1
)
>>
3
;
right
[
1
]
=
((
d
<<
3
)
+
d1
+
rnd2
)
>>
3
;
right
+=
8
;
left
+=
8
;
rnd2
=
7
-
rnd2
;
rnd1
=
7
-
rnd1
;
}
}
/**
/**
* VC-1 in-loop deblocking filter for one line
* VC-1 in-loop deblocking filter for one line
* @param src source block type
* @param src source block type
...
@@ -672,6 +724,8 @@ av_cold void ff_vc1dsp_init(VC1DSPContext* dsp) {
...
@@ -672,6 +724,8 @@ av_cold void ff_vc1dsp_init(VC1DSPContext* dsp) {
dsp
->
vc1_inv_trans_4x4_dc
=
vc1_inv_trans_4x4_dc_c
;
dsp
->
vc1_inv_trans_4x4_dc
=
vc1_inv_trans_4x4_dc_c
;
dsp
->
vc1_h_overlap
=
vc1_h_overlap_c
;
dsp
->
vc1_h_overlap
=
vc1_h_overlap_c
;
dsp
->
vc1_v_overlap
=
vc1_v_overlap_c
;
dsp
->
vc1_v_overlap
=
vc1_v_overlap_c
;
dsp
->
vc1_h_s_overlap
=
vc1_h_s_overlap_c
;
dsp
->
vc1_v_s_overlap
=
vc1_v_s_overlap_c
;
dsp
->
vc1_v_loop_filter4
=
vc1_v_loop_filter4_c
;
dsp
->
vc1_v_loop_filter4
=
vc1_v_loop_filter4_c
;
dsp
->
vc1_h_loop_filter4
=
vc1_h_loop_filter4_c
;
dsp
->
vc1_h_loop_filter4
=
vc1_h_loop_filter4_c
;
dsp
->
vc1_v_loop_filter8
=
vc1_v_loop_filter8_c
;
dsp
->
vc1_v_loop_filter8
=
vc1_v_loop_filter8_c
;
...
...
libavcodec/vc1dsp.h
View file @
7d2e03af
...
@@ -40,8 +40,10 @@ typedef struct VC1DSPContext {
...
@@ -40,8 +40,10 @@ typedef struct VC1DSPContext {
void
(
*
vc1_inv_trans_8x4_dc
)(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
void
(
*
vc1_inv_trans_8x4_dc
)(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
void
(
*
vc1_inv_trans_4x8_dc
)(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
void
(
*
vc1_inv_trans_4x8_dc
)(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
void
(
*
vc1_inv_trans_4x4_dc
)(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
void
(
*
vc1_inv_trans_4x4_dc
)(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
void
(
*
vc1_v_overlap
)(
uint8_t
*
src
,
int
stride
);
void
(
*
vc1_v_overlap
)(
uint8_t
*
src
,
int
stride
);
void
(
*
vc1_h_overlap
)(
uint8_t
*
src
,
int
stride
);
void
(
*
vc1_h_overlap
)(
uint8_t
*
src
,
int
stride
);
void
(
*
vc1_v_s_overlap
)(
DCTELEM
*
top
,
DCTELEM
*
bottom
);
void
(
*
vc1_h_s_overlap
)(
DCTELEM
*
left
,
DCTELEM
*
right
);
void
(
*
vc1_v_loop_filter4
)(
uint8_t
*
src
,
int
stride
,
int
pq
);
void
(
*
vc1_v_loop_filter4
)(
uint8_t
*
src
,
int
stride
,
int
pq
);
void
(
*
vc1_h_loop_filter4
)(
uint8_t
*
src
,
int
stride
,
int
pq
);
void
(
*
vc1_h_loop_filter4
)(
uint8_t
*
src
,
int
stride
,
int
pq
);
void
(
*
vc1_v_loop_filter8
)(
uint8_t
*
src
,
int
stride
,
int
pq
);
void
(
*
vc1_v_loop_filter8
)(
uint8_t
*
src
,
int
stride
,
int
pq
);
...
...
tests/ref/fate/vc1
View file @
7d2e03af
0, 0, 38016, 0x
f47
15db5
0, 0, 38016, 0x
a6f
15db5
0, 3600, 38016, 0x
f47
15db5
0, 3600, 38016, 0x
a6f
15db5
0, 7200, 38016, 0x
f47
15db5
0, 7200, 38016, 0x
a6f
15db5
0, 10800, 38016, 0x
f46af0e1
0, 10800, 38016, 0x
5c4ef0e7
0, 14400, 38016, 0x
9c1c2cf1
0, 14400, 38016, 0x
53a42d1d
0, 18000, 38016, 0x
ff12d87f
0, 18000, 38016, 0x
68f7d89e
0, 21600, 38016, 0x
7408432b
0, 21600, 38016, 0x
c15f4368
0, 25200, 38016, 0x
7408432b
0, 25200, 38016, 0x
c15f4368
0, 28800, 38016, 0x
8d11479a
0, 28800, 38016, 0x
d1bd47a8
0, 32400, 38016, 0x
8d11479a
0, 32400, 38016, 0x
d1bd47a8
0, 36000, 38016, 0x
c4a121ab
0, 36000, 38016, 0x
e1e821ca
0, 39600, 38016, 0x
c4a121ab
0, 39600, 38016, 0x
e1e821ca
0, 43200, 38016, 0x
c4a121ab
0, 43200, 38016, 0x
e1e821ca
0, 46800, 38016, 0x
c4a121ab
0, 46800, 38016, 0x
e1e821ca
0, 50400, 38016, 0x
c4a121ab
0, 50400, 38016, 0x
e1e821ca
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