mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-28 03:34:06 +00:00
test clipping qp to previous frame instead of previous ctus
This commit is contained in:
parent
ddb4e5a131
commit
0e8815a3d8
|
@ -672,12 +672,8 @@ void kvz_set_ctu_qp_lambda(encoder_state_t * const state, vector2d_t pos) {
|
||||||
const double clip_lambda = state->frame->lambda;
|
const double clip_lambda = state->frame->lambda;
|
||||||
|
|
||||||
double clip_neighbor_lambda = -1;
|
double clip_neighbor_lambda = -1;
|
||||||
// TODO: Check incorrect index for better results
|
if (state->frame->lcu_stats[index].lambda > 0) {
|
||||||
for(int temp_index = index - 1; temp_index >= ctu_limit; --temp_index) {
|
clip_neighbor_lambda = state->frame->lcu_stats[index].lambda;
|
||||||
if(state->frame->lcu_stats[temp_index].lambda > 0) {
|
|
||||||
clip_neighbor_lambda = state->frame->lcu_stats[temp_index].lambda;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clip_neighbor_lambda > 0) {
|
if (clip_neighbor_lambda > 0) {
|
||||||
|
@ -702,11 +698,8 @@ void kvz_set_ctu_qp_lambda(encoder_state_t * const state, vector2d_t pos) {
|
||||||
est_qp = lambda_to_qp(est_lambda);
|
est_qp = lambda_to_qp(est_lambda);
|
||||||
|
|
||||||
int clip_qp = -1;
|
int clip_qp = -1;
|
||||||
for (int temp_index = index - 1; temp_index >= ctu_limit; --temp_index) {
|
if (state->frame->lcu_stats[index].qp > 0) {
|
||||||
if (state->frame->lcu_stats[temp_index].qp > -1) {
|
clip_qp = state->frame->lcu_stats[index].qp;
|
||||||
clip_qp = state->frame->lcu_stats[temp_index].qp;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( clip_qp > -1) {
|
if( clip_qp > -1) {
|
||||||
|
|
Loading…
Reference in a new issue