swr: add dither support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: use assert in swri_sum2 to check that only supported formats are used.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr-test: include opt.h, this is needed for changing options for testing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
aacsbr: silence message for SBR extension "padding".

Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.
Fixes trac issue #836.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
swr: add SWR_DITHER_RECTANGULAR to AVOptions array

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: remove unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: add triangular dither support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master: (22 commits)
  rv40dsp x86: use only one register, for both increment and loop counter
  rv40dsp: implement prescaled versions for biweight.
  avconv: use default channel layouts when they are unknown
  avconv: parse channel layout string
  nutdec: K&R formatting cosmetics
  vda: Signal 4 byte NAL headers to the decoder regardless of what's in the extradata
  mem: Consistently return NULL for av_malloc(0)
  vf_overlay: implement poll_frame()
  vf_scale: support named constants for sws flags.
  lavc doxy: add all installed headers to doxy groups.
  lavc doxy: add avfft to the main lavc group.
  lavc doxy: add remaining avcodec.h functions to a misc doxygen group.
  lavc doxy: add AVPicture functions to a doxy group.
  lavc doxy: add resampling functions to a doxy group.
  lavc doxy: replace \ with /
  lavc doxy: add encoding functions to a doxy group.
  lavc doxy: add decoding functions to a doxy group.
  lavc doxy: fix formatting of AV_PKT_DATA_{PARAM_CHANGE,H263_MB_INFO}
  lavc doxy: add AVPacket-related stuff to a separate doxy group.
  lavc doxy: add core functions/definitions to a doxy group.
  ...

Conflicts:
	ffmpeg.c
	libavcodec/avcodec.h
	libavcodec/vda.c
	libavcodec/x86/rv40dsp.asm
	libavfilter/vf_scale.c
	libavformat/nutdec.c
	libavutil/mem.c
	tests/ref/acodec/pcm_s24daud

Merged-by: Michael Niedermayer <michaelni@gmx.at>
vda: try to fix compile

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: fix copy & pasted comment to match the code.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: simplify code by using av_get_bytes_per_sample()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
interplayvideo: fix av_dlog parameter type mismatch

libavcodec/interplayvideo.c:909:13: warning: format ‘%p’ expects argument of type ‘void *’, but argument 7 has type ‘GetByteContext’ [-Wformat]
swr: add swr_get_class()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: generate more dither noise to improve quality.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: add triangular highpass dither

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
movenc: remove redundant check

The proper check is already in mov_write_header.

Signed-off-by: Martin Storsjö <martin@martin.st>
movenc: small refactor mov_write_packet

Share the formerly internal write_packet with the hinter and move the
fragment flush logic to the user facing one since it is not concerned
about movtrack-only streams.

Fixes bug #263

Signed-off-by: Martin Storsjö <martin@martin.st>
swr: pass context to swri_get_dither()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
swr: add a dither_scale parameter to tune the amplitude of the dither.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
cmdutils: parse options for swr

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