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
d382cc0f
Commit
d382cc0f
authored
Apr 24, 2015
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp9: use correct chroma subsampling for profile 1 inter block recon.
parent
d2aa6f65
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
271 additions
and
45 deletions
+271
-45
vp9.c
libavcodec/vp9.c
+8
-8
vp9_mc_template.c
libavcodec/vp9_mc_template.c
+263
-37
No files found.
libavcodec/vp9.c
View file @
d382cc0f
...
...
@@ -2609,7 +2609,7 @@ static av_always_inline void mc_luma_scaled(VP9Context *s, vp9_scaled_mc_func sm
int
bw
,
int
bh
,
int
w
,
int
h
,
const
uint16_t
*
scale
,
const
uint8_t
*
step
)
{
#define scale_mv(n, dim) (((int64_t)
n
* scale[dim]) >> 14)
#define scale_mv(n, dim) (((int64_t)
(n)
* scale[dim]) >> 14)
// BUG libvpx seems to scale the two components separately. This introduces
// rounding errors but we have to reproduce them to be exactly compatible
// with the output from libvpx...
...
...
@@ -2653,8 +2653,8 @@ static av_always_inline void mc_chroma_scaled(VP9Context *s, vp9_scaled_mc_func
const
uint16_t
*
scale
,
const
uint8_t
*
step
)
{
// BUG https://code.google.com/p/webm/issues/detail?id=820
int
mx
=
scale_mv
(
mv
->
x
,
0
)
+
(
scale_mv
(
x
*
16
,
0
)
&
~
15
)
+
(
scale_mv
(
x
*
32
,
0
)
&
15
);
int
my
=
scale_mv
(
mv
->
y
,
1
)
+
(
scale_mv
(
y
*
16
,
1
)
&
~
15
)
+
(
scale_mv
(
y
*
32
,
1
)
&
15
);
int
mx
=
scale_mv
(
mv
->
x
<<
!
s
->
ss_h
,
0
)
+
(
scale_mv
(
x
*
16
,
0
)
&
~
15
)
+
(
scale_mv
(
x
*
32
,
0
)
&
15
);
int
my
=
scale_mv
(
mv
->
y
<<
!
s
->
ss_v
,
1
)
+
(
scale_mv
(
y
*
16
,
1
)
&
~
15
)
+
(
scale_mv
(
y
*
32
,
1
)
&
15
);
#undef scale_mv
int
refbw_m1
,
refbh_m1
;
int
th
;
...
...
@@ -2670,7 +2670,7 @@ static av_always_inline void mc_chroma_scaled(VP9Context *s, vp9_scaled_mc_func
// FIXME bilinear filter only needs 0/1 pixels, not 3/4
// we use +7 because the last 7 pixels of each sbrow can be changed in
// the longest loopfilter of the next sbrow
th
=
(
y
+
refbh_m1
+
4
+
7
)
>>
5
;
th
=
(
y
+
refbh_m1
+
4
+
7
)
>>
(
6
-
s
->
ss_v
)
;
ff_thread_await_progress
(
ref_frame
,
FFMAX
(
th
,
0
),
0
);
if
(
x
<
3
||
y
<
3
||
x
+
4
>=
w
-
refbw_m1
||
y
+
4
>=
h
-
refbh_m1
)
{
s
->
vdsp
.
emulated_edge_mc
(
s
->
edge_emu_buffer
,
...
...
@@ -2748,7 +2748,7 @@ static av_always_inline void mc_chroma_unscaled(VP9Context *s, vp9_mc_func (*mc)
ptrdiff_t
y
,
ptrdiff_t
x
,
const
VP56mv
*
mv
,
int
bw
,
int
bh
,
int
w
,
int
h
)
{
int
mx
=
mv
->
x
,
my
=
mv
->
y
,
th
;
int
mx
=
mv
->
x
<<
!
s
->
ss_h
,
my
=
mv
->
y
<<
!
s
->
ss_v
,
th
;
y
+=
my
>>
4
;
x
+=
mx
>>
4
;
...
...
@@ -2759,7 +2759,7 @@ static av_always_inline void mc_chroma_unscaled(VP9Context *s, vp9_mc_func (*mc)
// FIXME bilinear filter only needs 0/1 pixels, not 3/4
// we use +7 because the last 7 pixels of each sbrow can be changed in
// the longest loopfilter of the next sbrow
th
=
(
y
+
bh
+
4
*
!!
my
+
7
)
>>
5
;
th
=
(
y
+
bh
+
4
*
!!
my
+
7
)
>>
(
6
-
s
->
ss_v
)
;
ff_thread_await_progress
(
ref_frame
,
FFMAX
(
th
,
0
),
0
);
if
(
x
<
!!
mx
*
3
||
y
<
!!
my
*
3
||
x
+
!!
mx
*
4
>
w
-
bw
||
y
+
!!
my
*
4
>
h
-
bh
)
{
...
...
@@ -2833,8 +2833,8 @@ static void inter_recon(AVCodecContext *ctx)
}
// uv itxfm add
end_x
>>=
1
;
end_y
>>=
1
;
end_x
>>=
s
->
ss_h
;
end_y
>>=
s
->
ss_v
;
step
=
1
<<
(
b
->
uvtx
*
2
);
for
(
p
=
0
;
p
<
2
;
p
++
)
{
dst
=
s
->
dst
[
p
+
1
];
...
...
libavcodec/vp9_mc_template.c
View file @
d382cc0f
This diff is collapsed.
Click to expand it.
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