Add av_image_check_sar() and use it to validate SAR
h264: fix build when error resilience is disabled
Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'

* commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2':
  Add av_image_check_sar() and use it to validate SAR

Conflicts:
	libavcodec/dpx.c
	libavcodec/dvdec.c
	libavcodec/ffv1dec.c
	libavcodec/utils.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/utils: check sar only when width/height are set

This fixes loosing the perfectly valid SAR when width=height=0

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

* commit 'ca1e36a8e4cd416142487071dbca734567bdaddf':
  h264: fix build when error resilience is disabled

Conflicts:
	libavcodec/h264_picture.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/ituh263enc: fix advanced intra coding

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