avfilter/vf_psnr: refactor subsampled format support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
lavd/v4l2: Improve debug message

In particular, print the standard supported by the selected input.
Additionally, use PRIx64 everywhere when printing standards.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/matroskaenc: remove bogus prores tag

Fixes: ffmpeg -i input -c:v prores output.mkv

Signed-off-by: Paul B Mahol <onemda@gmail.com>
swscale/utils: use memcpy instead of loop in sws_cloneVec()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/png: remove obsolete comments

Signed-off-by: Paul B Mahol <onemda@gmail.com>
avformat/srtdec: skip initial random line breaks.

I found a bunch of (recent) SRT files in the wild with 3 to 10 line
breaks at the beginning.
avformat/subtitles: add a next line jumper and use it.

This fixes a bunch of possible overread in avformat with the idiom p +=
strcspn(p, "\n") + 1 (strcspn() can focus on the trailing '\0' if no
'\n' is found, so the +1 leads to an overread).

Note on lavf/matroskaenc: no extra subtitles.o Makefile dependency is
added because only the header is required for ff_subtitles_next_line().

Note on lavf/mpsubdec: code gets slightly complex to avoid an infinite
loop in the probing since there is no more forced increment.
avformat/subtitles: support standalone CR (MacOS).

Recent .srt files with CR only were found in the wild.
avcodec/assenc: fix potential overread.
avcodec/srtdec: fix potential overread.
avformat/avidec: fix signedness of pointer type in get_stream_idx()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/truemotion2: Fix av_freep arguments

Fixes null pointer dereference
Fixes Ticket2944

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/truemotion2: use av_calloc() & av_malloc_array()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
libxvid: guess a good aspect when we cant store the exact one.

Based on 394781a8.
avcodec/ratecontrol: give some trivial tips in case of buffer underflows

See Ticket2725

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/proresdec2: return meaningful error codes

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  libxvid: guess a good aspect when we cant store the exact one.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mjpegdec: fix shift_output() with lowres

Fixes Ticket2940

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavc: don't show "Invalid and inefficient vfw-avi..." warning in mpeg4 parser

Only the actual decoder should print this warning.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavu/ripemd: Fully unroll the transform function loops

crypto_bench RIPEMD-160 results using an AMD Athlon X2 7750+, mingw32-w64 GCC 4.8.1 x86_64

Before:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:   12.342 +- 0.199

After:
lavu       RIPEMD-160   size: 1048576  runs:   1024  time:   10.143 +- 0.192

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>