h264: Always invoke the get_format() callback

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mpeg12: Always invoke the get_format() callback

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
swresample/swresample: fix sample drop loop end condition

Fixes Ticket3985

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f9fefa499f0af48f47ea73c8ce0b25df0976c315)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86/synth_filter: add missing HAVE_YASM guard

Should fix compilation failures with --disable-yasm on some compilers

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 206167a295a5c28cec3c38f7308835b0b7e0618f)

Conflicts:

	libavcodec/x86/dcadsp_init.c
Update for 2.2.9

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
imc: fix order of operations in coefficients read

Reported-by: Ruoyu <liangry@ucweb.com>
resample: Avoid off-by-1 errors in PTS calcs.

The rounding used in the PTS calculations in filter_frame() does
not actually match the number of samples output by the resampler.
This leads to off-by-1 errors in the timestamps indicating gaps and
underruns, even when the input timestamps are all contiguous.

Bug-Id: 753

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 6cbbf0592f4f3940aac7f687850d1b726a2ea836)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit ca8c62d187fdca13979379fb2ab172ed662aa2f8)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Merge commit 'c7caed88a03567e8777a606f4bd42f093c6b302c' into release/2.2

* commit 'c7caed88a03567e8777a606f4bd42f093c6b302c':
  h264: Always invoke the get_format() callback

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0989a120f1dec400c54fcb54670cb84bba36d99b' into release/2.2

* commit '0989a120f1dec400c54fcb54670cb84bba36d99b':
  mpeg12: Always invoke the get_format() callback

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '787a6156a2d887bb1d65c1233a94a61741e7af7c' into release/2.2

* commit '787a6156a2d887bb1d65c1233a94a61741e7af7c':
  imc: fix order of operations in coefficients read

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '72ed4166a64714952777fb028b546a52e5b4e2c2' into release/2.2

* commit '72ed4166a64714952777fb028b546a52e5b4e2c2':
  resample: Avoid off-by-1 errors in PTS calcs.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
utvideoenc: properly set slice height/last line

Mimic decoder and obey sampling.

Does not affect fate tests for utvideo.
Fixes ticket #3949.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cb530dda7d76790b08ee3b7f67e251f3ce48c359)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
postproc/postprocess: fix quant store for fq mode

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 941aaa39e8cd78ba4d16dfcec767290aec9a0136)

Conflicts:

	tests/ref/fate/filter-pp3
postproc: fix qp count

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0b7e5d0d75e7d8762dd04d35f8c0821736164372)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/diracdec: Use 64bit in calculation of codeblock coordinates

Fixes integer overflow
Fixes out of array read
Fixes: asan_heap-oob_107866c_42_041.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 526886e6069636a918c8c04db17e864e3d8151c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/diracdec: Tighter checks on CODEBLOCKS_X/Y

Fixes very long but finite loop
Fixes: asan_heap-oob_107866c_42_041.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5145d22b88b9835db81c4d286b931a78e08ab76a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dirac_arith: fix integer overflow

Fixes: asan_heap-oob_1078676_9_008.drc
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 39680caceebfc6abf09b17032048752c014e57a8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dxa: check dimensions

Fixes out of array access
Fixes: asan_heap-oob_11222fb_21_020.dxa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e70312dfc22c4e54d5716f28f28db8f99c74cc90)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/dnxhddec: treat pix_fmt like width/height

Fixes out of array accesses
Fixes: asan_heap-oob_22c9a39_16_015.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f3c0e0bf6f53df0977f3878d4f5cec99dff8de9e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: Align dimensions by at least their chroma sub-sampling factors.

Fixes: out of array accesses
Fixes: asan_heap-oob_112c6b3_13_012.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit df74811cd53e45fcbbd3b77a1c42416816687c5c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>