This does not currently affect the search primary search defining the used block sizes, only the refining second intra search. Gain 1.9% BD-rate on All Intra 600f of BQMall QP 22,27,32,37.
The plan is to replace the dumb search we are doing now with proper sequential
search that is encapsulated inside data structure that holds all temporary
search data for the LCU.
Because selecting references "far away" costs bits, this should help with the issue that multiple reference frames actually increases coded bits with no quality gain.
- Working towards issue #11.
- Removed intra_get_block_mode as unused.
- Removed unused parameters from functions. Many of them were remnants from
earlier data structures and earlier features of HEVC that have been removed.
- Lots of implicit conversions from larger types to smaller ones. I tried to
avoid turning all of them to explicit ones this time and opted for changing
the original data type instead. Had to do it in few cases though to stop the
changes from propagating too widely.
The intent was to remove the flag that enabled intra in inter frames, as that
is not really that usefull anymore, but it ended up disabling intra instead.
- Working towards issue #11.
- Change lambda cost multiplier for intra NxN to from 256 to 4.
- Add 0.5 to the lambda multipliers so it's rounded instead of truncated.
No need to be so clever for something this simple.
I moved the cost initialization outside the recursing function because it
relied on the clever recursion to work. It should eventually be moved to its
own function that also initializes all the other fields just to be safe. I
didn't do that yet because I want to do it per-LCU and these functions are
still working on per-frame basis.
The search_buildReferenceBorder was an ugly hack and a place for bugs to hide
that should never have existed. Now it doesn't.
The change reduces PSNR a little, but also reduces the bitrate, when the
expected result was to have no change in either. I'm guessing there was still
some bug in the search_buildReferenceBorder, but the bug could also be in
intra_build_reference_border. Will have to do more testing to be sure, but
having one place to look at will be better than having two.
Conflicts:
src/encoder.c
- Chroma RDOQ changes conflicted because I had moved the chroma
quantization/dequantization to it's own function.
- Merged to master because I want my code to show up in github. =)
All the old stuff still works, even though NxN doesn't work, so there
is no reason not to merge anyway.
- Re-enable intra search based on reconstructed image.
- This didn't have as much of an effect as I thought it would.
- Re-enable SAO and deblocking.
- Disable NxN searching. (4x4 luma coding is still broken)
- Set part-size for Inter.
- Change to Intra Only mode for testing.
- Many small changes here and there. Should have been separate commits probably, but too late.
- Disable SAO and deblocking to be able to see problems with reconstruction better.