nutenc: avoid av_tree_find() operation per syncpoint

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/nutenc: add mode that omits the index

When the index is not written, several data tables become unneeded,
reducing memory and cpu requirements.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/nutenc: limit index table size if no index is going to be written

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/nutenc: replace conditional by assert

Its implied by sp_count==0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
frame: fix the error path in av_frame_copy_props()

First free metadata, then the side data it is contained in.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
matroskaenc: base DefaultDuration on the framerate, not the codec timebase

This results in DefaultDuration not being written when the framerate is
not known, but as this field is purely informative, this should not
break any sane demuxers.
movenc: write avg_frame_rate as the framerate, not the codec timebase
flvenc: only write the framerate tag based on avg_frame_rate

Do not fall back on the codec timebase, since that can be anything for
VFR video.
matroskaenc: set the stream timebase earlier

Fixes calculating the ts offset for audio codecs with delay.
Merge commit 'a53551cba86bb67efcb6105fdc337a36c43132bd'

* commit 'a53551cba86bb67efcb6105fdc337a36c43132bd':
  frame: fix the error path in av_frame_copy_props()

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

* commit '81eec081afea9fc017a175581ceea7c420a0dfc3':
  matroskaenc: base DefaultDuration on the framerate, not the codec timebase

Conflicts:
	libavformat/matroskaenc.c
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

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

* commit 'cf6977712c9e5abe6dc55289f6322ccbf10321a9':
  movenc: write avg_frame_rate as the framerate, not the codec timebase

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

* commit '43e7f0797f9f821a3866a20f05e512e13c82076a':
  flvenc: only write the framerate tag based on avg_frame_rate

Conflicts:
	tests/ref/lavf/flv_fmt
	tests/ref/seek/lavf-flv_fmt
	tests/ref/seek/vsynth2-flv
	tests/ref/vsynth/vsynth1-flashsv
	tests/ref/vsynth/vsynth1-flv
	tests/ref/vsynth/vsynth2-flashsv
	tests/ref/vsynth/vsynth2-flv

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

* commit '962d63157322466a9a82f9f9d84c1b6f1b582f65':
  matroskaenc: set the stream timebase earlier

Conflicts:
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
aarch64: Use the correct syntax for relocations

This fixes building in PIC mode with gas. The examples in the gas
manual showed using a # here even though gas itself actually didn't
support that syntax (and the gas test suite only tests it without
the extra hash sign).

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
huffyuv: avoid duplicated defines

Move the defines to the dsp header.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
huffyuv: change left prediction access in BGRA

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
svq1enc: Rename SVQ1Context to SVQ1EncContext

This allows making it visible without name clashes.
dsputil: Move SVQ1 encoding specific bits into svq1enc
dsputil: Move ff_alternate_*_scan tables to mpegvideo