Disable rd1 chroma search.

- The bdrate improvement isn't really worth the time it takes, so enable it
  only for rd3 untill it can be made faster or better.
This commit is contained in:
Ari Koivula 2014-10-16 13:59:20 +03:00
parent e9b8d9b889
commit dfc67b766a

View file

@ -1627,7 +1627,7 @@ static double search_cu(encoder_state * const encoder_state, int x, int y, int d
// rd2. Possibly because the luma mode search already takes chroma // rd2. Possibly because the luma mode search already takes chroma
// into account, so there is less of a chanse of luma mode being // into account, so there is less of a chanse of luma mode being
// really bad for chroma. // really bad for chroma.
if (encoder_state->encoder_control->rdo < 2) { if (encoder_state->encoder_control->rdo == 3) {
const videoframe * const frame = encoder_state->tile->frame; const videoframe * const frame = encoder_state->tile->frame;
double costs[5]; double costs[5];
@ -1643,6 +1643,10 @@ static double search_cu(encoder_state * const encoder_state, int x, int y, int d
const int8_t modes_in_depth[5] = { 1, 1, 1, 1, 2 }; const int8_t modes_in_depth[5] = { 1, 1, 1, 1, 2 };
int num_modes = modes_in_depth[depth]; int num_modes = modes_in_depth[depth];
if (encoder_state->encoder_control->rdo == 3) {
num_modes = 5;
}
if (num_modes != 1 && num_modes != 5) { if (num_modes != 1 && num_modes != 5) {
pixel rec_u[(LCU_WIDTH_C * 2 + 8) * (LCU_WIDTH_C * 2 + 8)]; pixel rec_u[(LCU_WIDTH_C * 2 + 8) * (LCU_WIDTH_C * 2 + 8)];
pixel rec_v[(LCU_WIDTH_C * 2 + 8) * (LCU_WIDTH_C * 2 + 8)]; pixel rec_v[(LCU_WIDTH_C * 2 + 8) * (LCU_WIDTH_C * 2 + 8)];