Add transformation matrix API.

Add AV_PKT_DATA_DISPLAYMATRIX and AV_FRAME_DATA_DISPLAYMATRIX as stream and
frame side data (respectively) to describe a display transformation matrix
for linear transformation operations on the decoded video.

Add functions to easily extract a rotation angle from a matrix and
conversely to setup a matrix for a given rotation angle.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
mov: store display matrix in a stream side data

Signed-off-by: Anton Khirnov <anton@khirnov.net>
display: Include mathematics.h for fallback definition of NAN

This fixes compilation with MSVC.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'bddd8cbf68551f6405b2bf77cc3e212af9fbe834'

* commit 'bddd8cbf68551f6405b2bf77cc3e212af9fbe834':
  Add transformation matrix API.

Conflicts:
	libavcodec/avcodec.h
	libavcodec/utils.c
	libavutil/version.h

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

* commit '853cc025d63ee2539fc0460dab62c5b9a3fd2043':
  mov: store display matrix in a stream side data

Conflicts:
	libavformat/isom.h
	libavformat/mov.c

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

* commit '82fc9f4b38244236a6ca7f946662ca653044a04c':
  display: Include mathematics.h for fallback definition of NAN

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/pthread_frame: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg/do_video_stats: fix used timebase

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc: define STRIDE_ALIGN as 32 when compiling with AVX support

Signed-off-by: James Almer <jamrial@gmail.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/ppc/asm: fix build with ABI v2

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Support raw dvdsub palette as stored on normal dvd's

This is how the palette is stored on dvd's. Currently
only xbmc passes the palette information to libavcodec
this way.
Check return value of avio_seek and avoid modifying state if it fails

The code still modifies state if the timestamp is not found. Not
sure exactly how to avoid that.
asf hacks
if av_read_packet returns AVERROR_IO, we are done. ffmpeg's codecs might or might not handle returning any completed demuxed packets correctly
added: Ticket #7187, TV Teletext support for DVB EBU Teletext streams
Don't accept mpegts PMT that isn't current
Don't reparse PMT unless it's version has changed
Read PID timestamps as well as PCR timestamps to find location in mpegts stream
Get stream durations using read_timestamp
changed: allow 4 second skew between streams in mov before attempting to seek