qp calculation for frame

This commit is contained in:
Joose Sainio 2019-09-27 09:05:40 +03:00
parent 47019ca1cd
commit e36f481bda

View file

@ -266,7 +266,7 @@ static INLINE double calculate_weights(encoder_state_t* const state, const int l
return total_weight;
}
// TODO: Missing QP calculation
void estimatePicLambda(encoder_state_t * const state) {
double bits = pic_allocate_bits(state);
const int layer = state->frame->gop_offset - (state->frame->is_irap ? 1 : 0);
@ -341,6 +341,7 @@ void estimatePicLambda(encoder_state_t * const state) {
}
state->frame->lambda = estLambda;
state->frame->QP = lambda_to_qp(estLambda);
}