Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
x264
Commits
b37de189
Commit
b37de189
authored
Aug 07, 2011
by
Henrik Gramner
Committed by
Fiona Glaser
Aug 09, 2011
Browse files
Fix two bugs in 4:4:4 chroma weightp analysis
Caused slightly worse compression.
parent
014f9c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
encoder/slicetype.c
View file @
b37de189
...
...
@@ -273,7 +273,7 @@ static NOINLINE unsigned int x264_weight_cost_chroma444( x264_t *h, x264_frame_t
else
for
(
int
y
=
0
;
y
<
i_lines
;
y
+=
16
,
pixoff
=
y
*
i_stride
)
for
(
int
x
=
0
;
x
<
i_width
;
x
+=
16
,
pixoff
+=
16
)
cost
+=
h
->
pixf
.
mbcmp
[
PIXEL_16x16
](
&
ref
[
pixoff
],
16
,
&
src
[
pixoff
],
i_stride
);
cost
+=
h
->
pixf
.
mbcmp
[
PIXEL_16x16
](
&
ref
[
pixoff
],
i_stride
,
&
src
[
pixoff
],
i_stride
);
x264_emms
();
return
cost
;
}
...
...
@@ -340,7 +340,10 @@ void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *ref, int
else
{
if
(
CHROMA444
)
{
mcbuf
=
x264_weight_cost_init_chroma444
(
h
,
fenc
,
ref
,
h
->
mb
.
p_weight_buf
[
0
],
plane
);
origscore
=
minscore
=
x264_weight_cost_chroma444
(
h
,
fenc
,
mcbuf
,
NULL
,
plane
);
}
else
{
pixel
*
dstu
=
h
->
mb
.
p_weight_buf
[
0
];
...
...
@@ -349,8 +352,8 @@ void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *ref, int
if
(
plane
==
1
)
x264_weight_cost_init_chroma
(
h
,
fenc
,
ref
,
dstu
,
dstv
);
mcbuf
=
plane
==
1
?
dstu
:
dstv
;
origscore
=
minscore
=
x264_weight_cost_chroma
(
h
,
fenc
,
mcbuf
,
NULL
);
}
origscore
=
minscore
=
x264_weight_cost_chroma
(
h
,
fenc
,
mcbuf
,
NULL
);
}
if
(
!
minscore
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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