* qatar/master: (33 commits)
rtpdec_qdm2: Don't try to parse data packet if no configuration is received
ac3enc: put the counting of stereo rematrixing bits in the same place to make the code easier to understand.
ac3enc: clean up count_frame_bits() and count_frame_bits_fixed()
mpegvideo: make FF_DEBUG_DCT_COEFF output coeffs via av_log() instead of just via AVFrame.
srtdec: make sure we don't write past the end of buffer
wmaenc: improve channel count and bitrate error handling in encode_init()
matroskaenc: make sure we don't produce invalid file with no codec ID
matroskadec: check that pointers were initialized before accessing them
lavf: fix function name in compute_pkt_fields2 av_dlog message
lavf: fix av_find_best_stream when providing a wanted stream.
lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.
ffmpeg: factorize quality calculation
tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
tiff: Prefer enum TiffCompr over int for TiffContext.compr.
mov: Support edit list atom version 1.
configure: Enable libpostproc automatically if GPL code is enabled.
Cosmetics: fix prototypes in oggdec
oggdec: fix memleak with continuous streams.
matroskaenc: add missing new line in av_log() call
dnxhdenc: add AVClass in private context.
...
swscale changes largely rewritten by me or replaced by baptsites due to lots of bugs in ronalds code.
Above code is also just in case its not obvios to a large extended duplicates that where cherry picked
from ffmpeg.
Conflicts:
configure
ffmpeg.c
libavformat/matroskaenc.c
libavutil/pixfmt.h
libswscale/ppc/swscale_template.c
libswscale/swscale.c
libswscale/swscale_template.c
libswscale/utils.c
libswscale/x86/swscale_template.c
tests/fate/h264.mak
tests/ref/lavfi/pixdesc_le
tests/ref/lavfi/pixfmts_copy_le
tests/ref/lavfi/pixfmts_null_le
tests/ref/lavfi/pixfmts_scale_le
tests/ref/lavfi/pixfmts_vflip_le
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The later parsing of payload data depends on the configuration
being present. If it hasn't been configured properly yet,
parsing a data packet may lead to a crash.
Signed-off-by: Martin Storsjö <martin@martin.st>
This allows the values to be used without changing C code and is closer to how
the other DEBUG flags work.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
In the main loop, stream_number is incremented after checking the stream type,
so the search usually will not find the wanted stream.
This patch eliminates the useless stream_number variable and introduces a new
one, called real_stream_index to store the real stream index of the current
stream, no matter if we are looping through all the streams or only the streams
of a program.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Yet another fix for the code originally designed for use without related_stream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Calculate quality value once per stream in print_report().
Also fix segfault, as coded_frame can be NULL.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Format detection and internal frame initialization is moved to a
separate init_image() function, which is called when all the tags have
been read, and so both BitsPerSample and SamplesPerPixel information
has been collected.
This fixes decoding of the file 11.tiff from roundup issue #1925.
Based on a patch by Kostya Shishkov <kostya.shishkov@gmail.com>.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
To use posix_memalign() "#define _XOPEN_SOURCE 600" have to be defined.
FFmpeg configure defines it from the command line through config.mak,
but when libavutil is used outside of FFmpeg the define is missing.
Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Add an extra size validity check in asf_read_frame_header(). Without
this asf->packet_size_left may become negative, which triggers an
assertion failure later.
This avoids the creation of a new AVStream instead of replacing it when
a stream reset occurs (track change with some webradios for example).
Signed-off-by: Diego Biurrun <diego@biurrun.de>