picture.type -> encoder_state->global->pictype
picture.slicetype -> encoder_state->global->slicetype
picture.slice_sao_luma_flag -> 1 (was constant)
picture.slice_sao_chroma_flag -> 1 (was constant)
This may be changed later. For now it's better to avoid having slice related stuff in picture.
- Because encode_transform_tree also maintains the CBF data and assumes that
the CBFs are initially zeroed, calling the function more than once would
result in incorrect CBF data.
- It works just like the old structure except that the flags are checked with
bitmasks instead of having the flag value be propagated upwards. There isn't
really any benefit to this because the flags still have to be propagated to
parent CUs.
- Wrapped them inside a struct to make copying them easier. (Just need to copy
the struct instead of making individual copies)
transform skip vs. normal transform selection criteria might need more work, currently both are calculated for each 4x4 block and SAD+coeff_SSE is compared.
- This is necessary because after we add in-loop filters to be done per LCU,
the reconstruction buffer will have the deblocked pixels. We only need the
edge-pixels for intra prediction though so we just save those.
- Right now it only copies the pixels and passes them on to search, where
the copied pixels are asserted to be the same ones we copy from
reconstruction buffer.
- New yuv_t struct added for arrays of dynamic length. We might want to change
other buffers to use it or something like it in the future.
- Working towards issue #11.
- Widened datatypes for cfg struct members that take values from atoi to full
ints so that bounds checking can be done after parsing without overflow.
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.
- Adjust predictor list to take modes from PUs in addition to 2Nx2N CUs.
- Change intra_get_dir_luma_predictor to take PU index instead of CU index.
- Comment prediction encoding now that I've had to look it up.
- Add room to cu_data.coeff_top_yuv arrays for the 4x4 PUs data. Will probably have to do the same to other coeff flags. The flags could also probably be combined as they are a bit redundant.
- Move sao-stuff not directly related to encoding to sao-module.
- Calculate sao for all LCUs before encoding any of them. This is in
preparation to doing the reconstruction line at a time instead of
LCU at a time.
SAO needs to be coded before LCU data has been searched. Searching
has already been moved to happen before encoding in the master branch.
Conflicts:
src/encoder.c
src/picture.c
src/picture.h
- Move SATD (hadamart) code to it's own functions.
- Generate functions for fixed block sizes with macros, as if using templates.
- Define new interface with function pointer cost_16bit_nxn_func that different
cost functions can use.
- Hide fixed size block cost functions with getters.