- If intra search is not enabled for a depth, try the result from the
top left CU of the next depth. This seems to give most of the benefit
of at least 64x64 intra prediction units without costing very much
in performance.
- Remove unused variables.
- Change intra prediction functions to take their inputs as const pointers.
- Change intra_get_pred to take two pointers instead of an array of pointers,
because the warnings got just too exotic.
- Remove cu_info.intra[].cost and bitcost as unnecessary.
- Add luma_mode_bits to complement chroma_mode_bits and remove
intra_pred_ratecost as unneccessary. Difference is that intra_pred_ratecost
was more coarse and included chroma mode with the assumption that it would
be the same as chroma.
- Transform splits meant for intra modes were used for inter when inter mode
was chosen, which caused an assert to be triggered if the split transform
block didn't have any coefficients.
- This is required so these functions can be used for searching. When NULL
is given they take the CU from LCU struct as they did previously.
Conflicts:
src/search.c
- intra_build_reference_border was overflowing at depth 0 because it uses
arrays just large enough to accommodate 32x32 transforms, which is the
biggest transform.
- For similar reasons search_intra_rough doesn't work at depth 0.
- The --rd=3 mode tries all modes with transform search. It also works without
rough search so it was used to test depth 0 search. If --rd=3 is not on intra
split at depth 0 is not searched for.
Conflicts:
src/search.c
- Add encoder_state->global->cur_lambda_cost_sqrt.
- Use sqrt lambda for inter search and rough intra search.
- The effect on inter is around 10-20% bdrate. The effect on intra is smaller
and non-existent when --rd=2 is enabled, as the intra search refinement was
already done with SSD and correct lambda.