hevc: Drop unnecessary shifts in deblocking_filter_CTB

beta_offset is pre-multiplied by 2.
hevc: Do not right shift a negative value in get_pcm
hevc: Do not left shift a negative value in hevc_loop_filter_chroma
configure: disable cpunop if the check fails

Moving cpunop from the HAVE_LIST to the ARCH_EXT_LIST_X86 has the side
effect of enabling it. The semantics of the check have to be changed
from enable if successful to disable if unsuccessful. This was missing
in 2b0bb69997c2416e74f41aa1400ce983bf8775c0 causing build errors with
nasm.
x86: add missing XOP checks and macros

Signed-off-by: James Almer <jamrial@gmail.com>
x86: add detection for FMA3 instruction set

Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
x86: add detection for Bit Manipulation Instruction sets

Based on x264 code

Signed-off-by: James Almer <jamrial@gmail.com>
avcodec/pngenc: fix invalid read in sub filter.

First pixel was computed based on invalid address read, and then
corrected by the following memcpy. After the commit, it's not computed
anymore, and memcpy fills the appropriate area.

Fixes Ticket #3387
Merge commit '50c988aa6d6c6f0ceb8f922bcea34800b56b85d9'

* commit '50c988aa6d6c6f0ceb8f922bcea34800b56b85d9':
  hevc: Drop unnecessary shifts in deblocking_filter_CTB

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'ff486c0f7f6b2ace3f0238660bc06cc35b389676'

* commit 'ff486c0f7f6b2ace3f0238660bc06cc35b389676':
  hevc: Do not right shift a negative value in get_pcm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '8eeacf31c5ea37baf6b222dc38d20cf4fd33c455'

* commit '8eeacf31c5ea37baf6b222dc38d20cf4fd33c455':
  hevc: Do not left shift a negative value in hevc_loop_filter_chroma

Merged-by: Michael Niedermayer <michaelni@gmx.at>
configure: Move cpunop into ARCH_EXT_LIST_X86

It is a processor feature, so it belongs there.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '5800ba0db667630e6ff81d30f03961ea10726aa6'

* commit '5800ba0db667630e6ff81d30f03961ea10726aa6':
  configure: disable cpunop if the check fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '10b0161d78148f46eaffb29ea022378947eaef2c'

* commit '10b0161d78148f46eaffb29ea022378947eaef2c':
  x86: add missing XOP checks and macros

Conflicts:
	configure
	libavutil/x86/cpu.h

See: 6c12b1de064d2604d19cb4c238a788cfed9679ac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '1b932eb1508f550fac9e911923a0383efda53aa3'

* commit '1b932eb1508f550fac9e911923a0383efda53aa3':
  x86: add detection for FMA3 instruction set

Conflicts:
	configure
	libavutil/cpu.h
	libavutil/x86/cpu.c

See: a2af8eddab75f1eac712411e4dde89823c0845e8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  x86: add detection for Bit Manipulation Instruction sets

Conflicts:
	libavutil/x86/cpu.c

See: 0bc3de19ffe296254f214dc7615e624d8e401bcb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
oggdec: validate VP8 keyframes

Fixes seeking with broken files

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swresample: add swr_is_initialized()

Idea-from/based-on: 7e86c27b4ee9e5a3fbe6cf5249b9d918b2a5e731
Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: check that the context for swr_convert() has been initialized

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86: Move XOP emulation to x86util

We need the emulation to support the cases where the first
argument is the same as the fourth. To achieve this a fifth
argument working as a temporary may be needed.
Emulation that doesn't obey the original instruction semantics
can't be in x86inc.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>