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.
- I'm not too clear on how this should be used, but having it in the source
file after mingw stuff was included caused a warning about redefinition of
__USE_MINGW_ANSI_STDIO.
- CppCheck was complaining about unreleased resources for FILE*. They weren't
really because they get flushed and closed when program exits normally, but
let's close them anyway.
Quote from MALLOC(3) manpage:
The realloc() function returns a pointer to the newly allocated memory, which is suitably aligned for any kind of
variable and may be different from ptr, or NULL if the request fails.
- Also set default width and height to 0 because it makes no sense to assume
dimensions. It's kind of like defaulting to the most common altitude when
the altimeter is broken.
- Add config_validate to have a place for checks on overall cfg state.
Related to issue #12.
Motivation for adding this is that the syntax for frame accurate seeking in
ffmpeg is a little cumbersome. Also it's kind of a standard feature I guess.
- 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.
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.
- 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.
Intra search was using faulty border data and selected modes were a bit random. Around -0.5% (LP) and -2% (AI) change in BD-rate was seen in limited testing conditions.
Name mangling is causing problems on different platforms (issues #2 and #3) and some of it was solved modifying the Makefile. Separate 32bit and 64bit assembly functions were also causing problems and since we were going to move to x264asm abstraction layer anyway, we decided to do it now before spending time on the old implementation.
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)