resample: Avoid off-by-1 errors in PTS calcs.

The rounding used in the PTS calculations in filter_frame() does
not actually match the number of samples output by the resampler.
This leads to off-by-1 errors in the timestamps indicating gaps and
underruns, even when the input timestamps are all contiguous.

Bug-Id: 753

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavc: make rc_qsquish a private option of mpegvideo encoders
lavc: make rc_qmod_* into private options of mpegvideo encoders
lavc: make rc_eq into private options of mpegvideo encoders
lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of mpegvideo encoders
lavc: deprecate unused me_threshold field
libvpxenc: add static-thresh private option

Currently, this option is accessed through AVCodecContext.mb_threshold,
which originally controlled reusing MB data when transcoding mpeg to
mpeg. Since the libvpx meaning is completely different from the original
mpegvideo meaning, it is better to use a separate private option for
this.
lavc: deprecate unused mb_threshold field
lavc: make border_masking into private options of mpegvideo encoders
Merge commit '6cbbf0592f4f3940aac7f687850d1b726a2ea836'

* commit '6cbbf0592f4f3940aac7f687850d1b726a2ea836':
  resample: Avoid off-by-1 errors in PTS calcs.

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

* commit 'a6e4ce9fd50897dc6d9c2ada4b6b8090de7de5bf':
  lavc: make rc_qsquish a private option of mpegvideo encoders

Conflicts:
	libavcodec/avcodec.h

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

* commit '946f95354ba76ef73c9b66889d86ab5fba4fb486':
  lavc: make rc_qmod_* into private options of mpegvideo encoders

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

* commit 'a75c2eb25a62105c09b48521aef429dc8a231637':
  lavc: make rc_eq into private options of mpegvideo encoders

Conflicts:
	libavcodec/options_table.h

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

* commit '66a68ddd1ac376b24db8695058bc8fc28f5bada6':
  lavc: make rc_buffer_aggressivity/rc_initial_cplx into private options of mpegvideo encoders

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

* commit '59b55c494e01de09dfd7cbf9cbbe7223265ac283':
  lavc: deprecate unused me_threshold field

Conflicts:
	ffmpeg.c

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

* commit '685be3d1aecf965281128f3b631ed965bcfa754d':
  libvpxenc: add static-thresh private option

Conflicts:
	libavcodec/libvpxenc.c

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

* commit 'c4f7bee0872d5e2e0e91673dd4b0f18de4a3d866':
  lavc: deprecate unused mb_threshold field

Conflicts:
	libavcodec/options_table.h

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

* commit '15ec053c4c0b198a2e93eb8e60c8f41e091e0c40':
  lavc: make border_masking into private options of mpegvideo encoders

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavutil: Add missing av_free() to cast5 selftest

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