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
bfed708c
Commit
bfed708c
authored
Nov 09, 2012
by
Anton Mitrofanov
Committed by
Fiona Glaser
Nov 08, 2012
Browse files
Fix possible issues with out-of-spec QP values
Fixes a possible regression in r2228.
parent
1580a74e
Changes
3
Hide whitespace changes
Inline
Side-by-side
common/set.c
View file @
bfed708c
...
...
@@ -241,7 +241,7 @@ int x264_cqm_init( x264_t *h )
if
(
!
h
->
mb
.
b_lossless
)
{
while
(
h
->
chroma_qp_table
[
h
->
param
.
rc
.
i_qp_min
]
<=
max_chroma_qp_err
)
while
(
h
->
chroma_qp_table
[
SPEC_QP
(
h
->
param
.
rc
.
i_qp_min
)
]
<=
max_chroma_qp_err
)
h
->
param
.
rc
.
i_qp_min
++
;
if
(
min_qp_err
<=
h
->
param
.
rc
.
i_qp_max
)
h
->
param
.
rc
.
i_qp_max
=
min_qp_err
-
1
;
...
...
encoder/analyse.c
View file @
bfed708c
...
...
@@ -2922,7 +2922,7 @@ static inline void x264_mb_analyse_qp_rd( x264_t *h, x264_mb_analysis_t *a )
{
if
(
!
origcbp
)
{
h
->
mb
.
i_qp
=
X264_MAX
(
h
->
mb
.
i_qp
-
threshold
-
1
,
h
->
param
.
rc
.
i_qp_min
);
h
->
mb
.
i_qp
=
X264_MAX
(
h
->
mb
.
i_qp
-
threshold
-
1
,
SPEC_QP
(
h
->
param
.
rc
.
i_qp_min
)
);
h
->
mb
.
i_chroma_qp
=
h
->
chroma_qp_table
[
h
->
mb
.
i_qp
];
already_checked_cost
=
x264_rd_cost_mb
(
h
,
a
->
i_lambda2
);
if
(
!
h
->
mb
.
cbp
[
h
->
mb
.
i_mb_xy
]
)
...
...
encoder/encoder.c
View file @
bfed708c
...
...
@@ -2239,6 +2239,7 @@ static int x264_slice_write( x264_t *h )
/* Set the QP equal to the first QP in the slice for more accurate CABAC initialization. */
h
->
mb
.
i_mb_xy
=
h
->
sh
.
i_first_mb
;
h
->
sh
.
i_qp
=
x264_ratecontrol_mb_qp
(
h
);
h
->
sh
.
i_qp
=
SPEC_QP
(
h
->
sh
.
i_qp
);
h
->
sh
.
i_qp_delta
=
h
->
sh
.
i_qp
-
h
->
pps
->
i_pic_init_qp
;
x264_slice_header_write
(
&
h
->
out
.
bs
,
&
h
->
sh
,
h
->
i_nal_ref_idc
);
...
...
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