Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
x264
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
x264
Commits
e3c766fc
Commit
e3c766fc
authored
Apr 18, 2010
by
Fiona Glaser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mv0 special case in pskip chroma MC
Significantly faster pskip MC.
parent
f25f2345
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
encoder/macroblock.c
encoder/macroblock.c
+25
-11
No files found.
encoder/macroblock.c
View file @
e3c766fc
...
...
@@ -483,19 +483,27 @@ static void x264_macroblock_encode_pskip( x264_t *h )
h
->
mb
.
pic
.
p_fref
[
0
][
0
],
h
->
mb
.
pic
.
i_stride
[
0
],
mvx
,
mvy
,
16
,
16
,
&
h
->
sh
.
weight
[
0
][
0
]
);
h
->
mc
.
mc_chroma
(
h
->
mb
.
pic
.
p_fdec
[
1
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
4
],
h
->
mb
.
pic
.
i_stride
[
1
],
mvx
,
mvy
,
8
,
8
);
/* Special case for mv0, which is (of course) very common in P-skip mode. */
if
(
mvx
|
mvy
)
{
h
->
mc
.
mc_chroma
(
h
->
mb
.
pic
.
p_fdec
[
1
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
4
],
h
->
mb
.
pic
.
i_stride
[
1
],
mvx
,
mvy
,
8
,
8
);
h
->
mc
.
mc_chroma
(
h
->
mb
.
pic
.
p_fdec
[
2
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
5
],
h
->
mb
.
pic
.
i_stride
[
2
],
mvx
,
mvy
,
8
,
8
);
}
else
{
h
->
mc
.
copy
[
PIXEL_8x8
](
h
->
mb
.
pic
.
p_fdec
[
1
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
4
],
h
->
mb
.
pic
.
i_stride
[
1
],
8
);
h
->
mc
.
copy
[
PIXEL_8x8
](
h
->
mb
.
pic
.
p_fdec
[
2
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
5
],
h
->
mb
.
pic
.
i_stride
[
2
],
8
);
}
if
(
h
->
sh
.
weight
[
0
][
1
].
weightfn
)
h
->
sh
.
weight
[
0
][
1
].
weightfn
[
8
>>
2
](
h
->
mb
.
pic
.
p_fdec
[
1
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fdec
[
1
],
FDEC_STRIDE
,
&
h
->
sh
.
weight
[
0
][
1
],
8
);
h
->
mc
.
mc_chroma
(
h
->
mb
.
pic
.
p_fdec
[
2
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
5
],
h
->
mb
.
pic
.
i_stride
[
2
],
mvx
,
mvy
,
8
,
8
);
if
(
h
->
sh
.
weight
[
0
][
2
].
weightfn
)
h
->
sh
.
weight
[
0
][
2
].
weightfn
[
8
>>
2
](
h
->
mb
.
pic
.
p_fdec
[
2
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fdec
[
2
],
FDEC_STRIDE
,
...
...
@@ -899,9 +907,9 @@ int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
ALIGNED_ARRAY_16
(
int16_t
,
dct4x4
,[
4
],[
16
]
);
ALIGNED_ARRAY_16
(
int16_t
,
dct2x2
,[
4
]
);
ALIGNED_ARRAY_16
(
int16_t
,
dctscan
,[
16
]
);
ALIGNED_4
(
int16_t
mvp
[
2
]
);
int
i_qp
=
h
->
mb
.
i_qp
;
int
mvp
[
2
];
int
thresh
,
ssd
;
if
(
!
b_bidir
)
...
...
@@ -946,9 +954,15 @@ int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
if
(
!
b_bidir
)
{
h
->
mc
.
mc_chroma
(
h
->
mb
.
pic
.
p_fdec
[
1
+
ch
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
4
+
ch
],
h
->
mb
.
pic
.
i_stride
[
1
+
ch
],
mvp
[
0
],
mvp
[
1
],
8
,
8
);
/* Special case for mv0, which is (of course) very common in P-skip mode. */
if
(
M32
(
mvp
)
)
{
h
->
mc
.
mc_chroma
(
h
->
mb
.
pic
.
p_fdec
[
1
+
ch
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
4
+
ch
],
h
->
mb
.
pic
.
i_stride
[
1
+
ch
],
mvp
[
0
],
mvp
[
1
],
8
,
8
);
}
else
h
->
mc
.
copy
[
PIXEL_8x8
](
h
->
mb
.
pic
.
p_fdec
[
1
+
ch
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
][
4
+
ch
],
h
->
mb
.
pic
.
i_stride
[
1
+
ch
],
8
);
if
(
h
->
sh
.
weight
[
0
][
1
+
ch
].
weightfn
)
h
->
sh
.
weight
[
0
][
1
+
ch
].
weightfn
[
8
>>
2
](
h
->
mb
.
pic
.
p_fdec
[
1
+
ch
],
FDEC_STRIDE
,
...
...
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