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
79f4e3e2
Commit
79f4e3e2
authored
Aug 27, 2008
by
Fiona Glaser
Browse files
Fix some uses of uninitialized row_satd values in VBV
Resolves some issues with QP51 in I-frames with scenecut
parent
8de7dbbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
common/mc.c
View file @
79f4e3e2
...
...
@@ -299,9 +299,11 @@ void x264_frame_init_lowres( x264_t *h, x264_frame_t *frame )
i_stride
,
frame
->
i_stride_lowres
,
frame
->
i_width_lowres
,
frame
->
i_lines_lowres
);
x264_frame_expand_border_lowres
(
frame
);
for
(
y
=
0
;
y
<
16
;
y
++
)
for
(
x
=
0
;
x
<
16
;
x
++
)
frame
->
i_cost_est
[
y
][
x
]
=
-
1
;
memset
(
frame
->
i_cost_est
,
-
1
,
sizeof
(
frame
->
i_cost_est
)
);
for
(
x
=
0
;
x
<
h
->
param
.
i_bframe
+
2
;
x
++
)
for
(
y
=
0
;
y
<
h
->
param
.
i_bframe
+
2
;
y
++
)
frame
->
i_row_satds
[
y
][
x
][
0
]
=
-
1
;
}
static
void
frame_init_lowres_core
(
uint8_t
*
src0
,
uint8_t
*
dst0
,
uint8_t
*
dsth
,
uint8_t
*
dstv
,
uint8_t
*
dstc
,
...
...
encoder/slicetype.c
View file @
79f4e3e2
...
...
@@ -247,7 +247,8 @@ static int x264_slicetype_frame_cost( x264_t *h, x264_mb_analysis_t *a,
/* Check whether we already evaluated this frame
* If we have tried this frame as P, then we have also tried
* the preceding frames as B. (is this still true?) */
if
(
frames
[
b
]
->
i_cost_est
[
b
-
p0
][
p1
-
b
]
>=
0
)
/* Also check that we already calculated the row SATDs for the current frame. */
if
(
frames
[
b
]
->
i_cost_est
[
b
-
p0
][
p1
-
b
]
>=
0
&&
frames
[
b
]
->
i_row_satds
[
b
-
p0
][
p1
-
b
][
0
]
!=
-
1
)
{
i_score
=
frames
[
b
]
->
i_cost_est
[
b
-
p0
][
p1
-
b
];
}
...
...
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