The clean up of input parsing and encoder initialization code had caused the
real source input dimensions to be used for array initialization, instead of
the dimensions modified to be multiples of the smallest coding unit.
We will also maintain the Makefile for basic building. This is for more
complicated stuff, like building the project on command line with
Visual Studio.
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.
In NxN mode, chroma predictions were pushed to buffer when chroma should not have been used at all. (Because it is processed only on first of the four NxN luma blocks)
- Working towards issue #11.
- Moved all const arrays from .h to the .c. These are not used anywhere else.
- Moved entropy_bits array and its helper macro to rdo.c. They are not used
anywhere else.
- Implicit conversions to explicit ones.
- 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.
- Change stderr back to text mode. Can't see what harm it should allow us to print
correct newlines for different platforms.
- Remove copy-pasted function calls from usage printing.
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.
Enables the output of spec-compliant byte streams, as the specification
notes that an additional zero_byte has to be added under certain
circuimstances.