yuv4mpeg: split the demuxer and muxer into separate files
yuv4mpegdec: do not set coded_frame properties

coded_frame is not meant to be changed from outside of lavc, and is not
used for decoding.
Set AVCodecContext.field_order instead.
yop: only set extradata size after it has been successfully allocated

Do not leave a non-zero extradata_size set on failure
avienc: sanitize variable naming in write_header()

Do not call an AVCodecContext 'stream', that is highly confusing.
Also, add a local variable for the current AVStream in the loop over all
streams.
lavf: extend avg_frame_rate documentation.
avconv: set output avg_frame_rate when known
dv: do not set codec timebase

It is not supposed to be set from outside of libavcodec.
Set average framerate instead.
Merge commit 'e4dc1000d7bbbcb5b45cf9849fc5315f19578e37'

* commit 'e4dc1000d7bbbcb5b45cf9849fc5315f19578e37':
  yuv4mpeg: split the demuxer and muxer into separate files

Conflicts:
	libavformat/yuv4mpegdec.c

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

* commit 'b513bf6f69e26e724de6d5dca642c3582dcd0517':
  yuv4mpegdec: do not set coded_frame properties

Conflicts:
	libavformat/yuv4mpegdec.c

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

* commit 'ab3fdaa7131e2fd8e33006daea25a282724c01f0':
  yop: only set extradata size after it has been successfully allocated

Conflicts:
	libavformat/yop.c

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

* commit 'c3311d472a7528c67f76d0d061704ae70a99b32e':
  avienc: sanitize variable naming in write_header()

Conflicts:
	libavformat/avienc.c

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

* commit '7a5f4f6853047eea74a6443d73f4d74d52b2799f':
  lavf: extend avg_frame_rate documentation.

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

* commit '93afb6c98df876b15e3d911a9450ad55f92080ce':
  avconv: set output avg_frame_rate when known

Conflicts:
	ffmpeg.c

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

* commit '79f2c426fde6e71c40b29504112d0528b85be623':
  dv: do not set codec timebase

Conflicts:
	libavformat/dv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/crystalhd: allocate padding for extradata

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/ffv1enc: allocate padding for extradata

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/movtextenc: allocate padding for extradata

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/wmv2enc: allocate padding for extradata and check malloc failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavd: Use av_gettime_relative()

Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.

Since v4l2 is compiled only on Linux where av_gettime_relative()
is monotonic, a small wrapper function av_gettime_monotonic() is used
(should be inlined the compiler) to put emphasis on that fact.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
x86: hevc_mc: specify coefficients registers

By default, macro EPEL_FILTER loads the coefficients inconditionally
into m14/m15. This forces an unneeded higher register count.

Reduce that count by making them parameters of EPEL_FILTER.

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