mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-24 02:24:07 +00:00
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:
parent
e9b8d9b889
commit
dfc67b766a
|
@ -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
|
||||
// into account, so there is less of a chanse of luma mode being
|
||||
// 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;
|
||||
|
||||
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 };
|
||||
int num_modes = modes_in_depth[depth];
|
||||
|
||||
if (encoder_state->encoder_control->rdo == 3) {
|
||||
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_v[(LCU_WIDTH_C * 2 + 8) * (LCU_WIDTH_C * 2 + 8)];
|
||||
|
|
Loading…
Reference in a new issue