adpcmenc: Calculate the IMA_QT predictor without overflow

Previously, the value given to put_bits was 10 bits long for positive
predictors, even though 9 bits were to be written. The extra bit could
in some cases overwrite existing bits in the bitstream writer cache.

This fixes a failed assert in put_bits.h, when running a version
built with -DDEBUG.

The fate test result gets slightly improved, thanks to getting rid
of the overwritten bits in the bitstream writer cache.

Signed-off-by: Martin Storsjö <martin@martin.st>
proresenc: Write the full value in one put_bits call

Previously, the put_bits call writing the value wrote a value
larger than the number of bits specified, failing asserts
in debug mode. There was no actual bitstream writer corruption,
since the overwritten bit already always was set to 1.

Signed-off-by: Martin Storsjö <martin@martin.st>
proresenc: Don't free a buffer not owned by the codec

The data in coded_frame isn't allocated using get_buffer, but
is copied from the input frame to the encoder, so we should
not try to free it ourselves.

This fixes an assert failure when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
pixdesc: cosmetics
avio: make avio_close NULL the freed buffer
configure: add support for bdver1 and bdver2 CPU types.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
elbg: Fix an assert

It seems the condition was flipped from what was intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
mpegvideo_enc: remove assert that has become obsolete with the new API

It now just checks uninitialized and unused data.

Signed-off-by: Martin Storsjö <martin@martin.st>
mpegvideo: remove last_picture_ptr / h264 assert.

This assert is no longer true since h264 error concealment needs
last_picture_ptr to be set.

Signed-off-by: Martin Storsjö <martin@martin.st>
svq1enc: Set picture_structure correctly

This fixes assert failures when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member

Signed-off-by: Martin Storsjö <martin@martin.st>
avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member

Signed-off-by: Martin Storsjö <martin@martin.st>
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member

Signed-off-by: Martin Storsjö <martin@martin.st>
avopt: Explicitly store float/double option defaults in .dbl

Signed-off-by: Martin Storsjö <martin@martin.st>
avopt: Explicitly store rational option defaults in .dbl

Signed-off-by: Martin Storsjö <martin@martin.st>
avopt: Reorder the default_val struct, making i64 the first field

Also mention this change in APIchanges.

Signed-off-by: Martin Storsjö <martin@martin.st>
build: utvideoenc: Add missing dependency on Huffman code
build: eamad: Add missing dependency on mpegvideo code
h264: Remove an assert on current_picture_ptr being null

It is possible in various error paths as well as gap handling
that this has already been allocated. It is not clear why that
would be a problem with the current code, thus disable the
assert to avoid a common assert failure when asserts are enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
parser: Don't use pc as context for av_dlog

The ParserContext class doesn't have an AVClass, required for
using it as a logging class.

Signed-off-by: Martin Storsjö <martin@martin.st>