Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
x264
Commits
03da01e4
Commit
03da01e4
authored
Apr 24, 2008
by
Fiona Glaser
Committed by
Loren Merritt
Apr 27, 2008
Browse files
omit P/B-skip mc from macroblock_encode if the pixels haven't been overwritten since probe_skip
parent
e0f13712
Changes
3
Hide whitespace changes
Inline
Side-by-side
common/common.h
View file @
03da01e4
...
...
@@ -424,6 +424,9 @@ struct x264_t
* 1 (non-RD only) = the DCT is still in h->dct, restore fdec and skip reconstruction.
* 2 (RD only) = the DCT has since been overwritten by RD; restore that too. */
int
i_skip_intra
;
/* skip flag for P/B-skip motion compensation */
/* if we've already done skip MC, we don't need to do it again */
int
b_skip_pbskip_mc
;
struct
{
...
...
encoder/analyse.c
View file @
03da01e4
...
...
@@ -340,6 +340,7 @@ static void x264_mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int i_qp )
a
->
b_fast_intra
=
1
;
}
}
h
->
mb
.
b_skip_pbskip_mc
=
0
;
}
}
...
...
@@ -2388,6 +2389,7 @@ void x264_macroblock_analyse( x264_t *h )
{
h
->
mb
.
i_type
=
B_SKIP
;
x264_analyse_update_cache
(
h
,
&
analysis
);
h
->
mb
.
b_skip_pbskip_mc
=
1
;
return
;
}
}
...
...
@@ -2404,6 +2406,7 @@ void x264_macroblock_analyse( x264_t *h )
const
unsigned
int
flags
=
h
->
param
.
analyse
.
inter
;
int
i_type
;
int
i_partition
;
h
->
mb
.
b_skip_pbskip_mc
=
0
;
x264_mb_analyse_load_costs
(
h
,
&
analysis
);
...
...
encoder/macroblock.c
View file @
03da01e4
...
...
@@ -293,19 +293,21 @@ void x264_macroblock_encode_pskip( x264_t *h )
const
int
mvy
=
x264_clip3
(
h
->
mb
.
cache
.
mv
[
0
][
x264_scan8
[
0
]][
1
],
h
->
mb
.
mv_min
[
1
],
h
->
mb
.
mv_max
[
1
]
);
/* Motion compensation XXX probably unneeded */
h
->
mc
.
mc_luma
(
h
->
mb
.
pic
.
p_fdec
[
0
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
],
h
->
mb
.
pic
.
i_stride
[
0
],
mvx
,
mvy
,
16
,
16
);
/* don't do pskip motion compensation if it was already done in macroblock_analyse */
if
(
!
h
->
mb
.
b_skip_pbskip_mc
)
{
h
->
mc
.
mc_luma
(
h
->
mb
.
pic
.
p_fdec
[
0
],
FDEC_STRIDE
,
h
->
mb
.
pic
.
p_fref
[
0
][
0
],
h
->
mb
.
pic
.
i_stride
[
0
],
mvx
,
mvy
,
16
,
16
);
/* Chroma MC */
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
[
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
);
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
);
}
x264_macroblock_encode_skip
(
h
);
}
...
...
@@ -346,8 +348,9 @@ void x264_macroblock_encode( x264_t *h )
}
if
(
h
->
mb
.
i_type
==
B_SKIP
)
{
/* XXX motion compensation is probably unneeded */
x264_mb_mc
(
h
);
/* don't do bskip motion compensation if it was already done in macroblock_analyse */
if
(
!
h
->
mb
.
b_skip_pbskip_mc
)
x264_mb_mc
(
h
);
x264_macroblock_encode_skip
(
h
);
return
;
}
...
...
@@ -705,6 +708,7 @@ int x264_macroblock_probe_skip( x264_t *h, const int b_bidir )
}
}
h
->
mb
.
b_skip_pbskip_mc
=
1
;
return
1
;
}
...
...
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