]> git.sesse.net Git - ffmpeg/log
ffmpeg
12 years agoavformat_new_stream: fix initial last_dts value
Michael Niedermayer [Wed, 7 Mar 2012 20:41:54 +0000 (21:41 +0100)]
avformat_new_stream: fix initial last_dts value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomxfdec: Add intra_only flag to MXFTrack
Tomas Härdin [Wed, 7 Mar 2012 09:52:39 +0000 (10:52 +0100)]
mxfdec: Add intra_only flag to MXFTrack

This allows future assumptions to be made without affecting non-intra files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomxfdec: Fix Avid AirSpeed files being misinterpreted as OP1a
Tomas Härdin [Fri, 2 Mar 2012 10:33:28 +0000 (11:33 +0100)]
mxfdec: Fix Avid AirSpeed files being misinterpreted as OP1a

The "ECs != 1 -> OP1a" assumption was wrong. Luckily, the file that triggered
that behavior had two ECs, not zero. Hence distinguishing between them is
simple in this case.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomxfdec: Truncate packets that extend past the next edit unit
Tomas Härdin [Fri, 2 Mar 2012 10:16:10 +0000 (11:16 +0100)]
mxfdec: Truncate packets that extend past the next edit unit

This fixes rare cases where OPAtom may be treated as OP1a, causing all essence
to be read into RAM.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolibavutil: document av_force_cpu_flags(-1).
Michael Niedermayer [Wed, 7 Mar 2012 04:18:33 +0000 (05:18 +0100)]
libavutil: document av_force_cpu_flags(-1).

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffmpeg: show fps more accurately when it is small.
Nicolas George [Wed, 7 Mar 2012 22:26:29 +0000 (23:26 +0100)]
ffmpeg: show fps more accurately when it is small.

12 years agoswr: special case for empty channels in rematrix.
Nicolas George [Mon, 20 Feb 2012 22:55:28 +0000 (23:55 +0100)]
swr: special case for empty channels in rematrix.

Speed += 10% overall for pan=stereo:FL=FL+FR from wav to null.

12 years agovf_yadif: accept input with several frames available.
Nicolas George [Wed, 7 Mar 2012 16:34:28 +0000 (17:34 +0100)]
vf_yadif: accept input with several frames available.

Fixes ticket #1040.

12 years agoass_split: accept files with only \n and no \r.
Nicolas George [Wed, 29 Feb 2012 12:46:32 +0000 (13:46 +0100)]
ass_split: accept files with only \n and no \r.

The +1 is there to skip the ','.
With \r\n, the +1 skips the \r but that is ok.
With only \n, the +1 skips it and all hell breaks loose.

12 years agoassdec: avoid a possible NULL dereference.
Nicolas George [Wed, 29 Feb 2012 12:46:13 +0000 (13:46 +0100)]
assdec: avoid a possible NULL dereference.

12 years agoffv1: PIX_FMT_YUV444P10 support
Paul B Mahol [Tue, 6 Mar 2012 23:16:40 +0000 (23:16 +0000)]
ffv1: PIX_FMT_YUV444P10 support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoffv1: PIX_FMT_YUV444P9 & PIX_FMT_YUV422P9 support
Paul B Mahol [Tue, 6 Mar 2012 23:16:39 +0000 (23:16 +0000)]
ffv1: PIX_FMT_YUV444P9 & PIX_FMT_YUV422P9 support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoRevert "error_resilience: initialize s->block_index[]."
Michael Niedermayer [Wed, 7 Mar 2012 02:39:15 +0000 (03:39 +0100)]
Revert "error_resilience: initialize s->block_index[]."

This reverts commit 6193ff68549ecbaf1a4d63a0e06964ec580ac620.

This change is unneeded.

12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Wed, 7 Mar 2012 01:57:53 +0000 (02:57 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  SBR DSP: fix SSE code to not use SSE2 instructions.
  cpu: initialize mask to -1, so that by default, optimizations are used.
  error_resilience: initialize s->block_index[].
  svq3: protect against negative quantizers.
  Don't use ff_cropTbl[] for IDCT.
  swscale: make filterPos 32bit.
  FATE: add CPUFLAGS variable, mapping to -cpuflags avconv option.
  avconv: add -cpuflags option for setting supported cpuflags.
  cpu: add av_set_cpu_flags_mask().
  libx264: Allow overriding the sliced threads option
  avconv: fix counting encoded video size.

Conflicts:
doc/APIchanges
doc/fate.texi
doc/ffmpeg.texi
ffmpeg.c
libavcodec/h264idct_template.c
libavcodec/svq3.c
libavutil/avutil.h
libavutil/cpu.c
libavutil/cpu.h
libswscale/swscale.c
tests/Makefile
tests/fate-run.sh
tests/regression-funcs.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolavc/utils: fix const correctness of AVClass cast
Michael Niedermayer [Tue, 6 Mar 2012 23:47:11 +0000 (00:47 +0100)]
lavc/utils: fix const correctness of AVClass cast

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolavc/utils: remove unused variable from avcodec_encode_video2.
Michael Niedermayer [Tue, 6 Mar 2012 23:45:18 +0000 (00:45 +0100)]
lavc/utils: remove unused variable from avcodec_encode_video2.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agomjpegenc: Fix const correctness and avoid writes into AVFrame of amv_encode_picture()
Michael Niedermayer [Tue, 6 Mar 2012 23:40:39 +0000 (00:40 +0100)]
mjpegenc: Fix const correctness and avoid writes into AVFrame of amv_encode_picture()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoh264 Fix: "warning: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const...
Michael Niedermayer [Tue, 6 Mar 2012 23:33:55 +0000 (00:33 +0100)]
h264 Fix: "warning: assigning to 'uint8_t *' (aka 'unsigned char *') from 'const uint8_t *' (aka 'const unsigned char *') discards qualifiers"

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoh264: fix warning about "uint8_t *p" and const
Michael Niedermayer [Tue, 6 Mar 2012 23:32:02 +0000 (00:32 +0100)]
h264: fix warning about "uint8_t *p" and const

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agocook: silence some signed overflow warnings.
Michael Niedermayer [Tue, 6 Mar 2012 23:29:23 +0000 (00:29 +0100)]
cook: silence some signed overflow warnings.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswscale: remove duplicate PIX_FMT_GBRP entry from format_entries.
Michael Niedermayer [Tue, 6 Mar 2012 23:22:20 +0000 (00:22 +0100)]
swscale: remove duplicate PIX_FMT_GBRP entry from format_entries.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agovsrx_mptestsrc: remove duplicate config_props init.
Michael Niedermayer [Tue, 6 Mar 2012 23:20:23 +0000 (00:20 +0100)]
vsrx_mptestsrc: remove duplicate config_props init.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoSBR DSP: fix SSE code to not use SSE2 instructions.
Reimar Döffinger [Tue, 6 Mar 2012 21:11:30 +0000 (22:11 +0100)]
SBR DSP: fix SSE code to not use SSE2 instructions.

movq from SSE register _to_ memory is an SSE2 instruction.
Use the SSE movlps function instead that does the same thing.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agocpu: initialize mask to -1, so that by default, optimizations are used.
Ronald S. Bultje [Tue, 6 Mar 2012 20:47:23 +0000 (12:47 -0800)]
cpu: initialize mask to -1, so that by default, optimizations are used.

12 years agoaacdec: Fix out of array writes (stack).
Michael Niedermayer [Tue, 6 Mar 2012 20:21:02 +0000 (21:21 +0100)]
aacdec: Fix out of array writes (stack).

This fixes an issue in the code to check the size that will
be written to match the actual code writing. In the long
term it would make sense to change this so the counting and
writing code are the same so they dont need to be kept in sync.

It also increases the array size, which was too small either way
and adds a redudnant saftey check.

This issue does not affect any FFmpeg release as it has been
introduced Jan 31 which is narrowly after our last release.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoFix bink decoder for files with 24px width.
Bastien Bouclet [Tue, 6 Mar 2012 19:16:20 +0000 (20:16 +0100)]
Fix bink decoder for files with 24px width.

Fixes ticket #962.

12 years agoerror_resilience: initialize s->block_index[].
Ronald S. Bultje [Tue, 6 Mar 2012 18:27:05 +0000 (10:27 -0800)]
error_resilience: initialize s->block_index[].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agosvq3: protect against negative quantizers.
Ronald S. Bultje [Tue, 6 Mar 2012 01:03:32 +0000 (17:03 -0800)]
svq3: protect against negative quantizers.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoDon't use ff_cropTbl[] for IDCT.
Ronald S. Bultje [Tue, 6 Mar 2012 00:01:19 +0000 (16:01 -0800)]
Don't use ff_cropTbl[] for IDCT.

Results of IDCT can by far outreach the range of ff_cropTbl[], leading
to overreads and potentially crashes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoswscale: make filterPos 32bit.
Ronald S. Bultje [Mon, 5 Mar 2012 20:26:42 +0000 (12:26 -0800)]
swscale: make filterPos 32bit.

Fixes overflows for large image sizes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agodiracdec: Correct the bytestream end pointer.
Michael Niedermayer [Tue, 6 Mar 2012 18:13:55 +0000 (19:13 +0100)]
diracdec: Correct the bytestream end pointer.

This fixes some arith decoder overreads and a potential infinite loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoFATE: add CPUFLAGS variable, mapping to -cpuflags avconv option.
Anton Khirnov [Mon, 5 Mar 2012 07:05:56 +0000 (08:05 +0100)]
FATE: add CPUFLAGS variable, mapping to -cpuflags avconv option.

12 years agoavconv: add -cpuflags option for setting supported cpuflags.
Anton Khirnov [Sun, 4 Mar 2012 15:46:45 +0000 (16:46 +0100)]
avconv: add -cpuflags option for setting supported cpuflags.

Useful for testing.

12 years agocpu: add av_set_cpu_flags_mask().
Anton Khirnov [Sun, 4 Mar 2012 15:08:48 +0000 (16:08 +0100)]
cpu: add av_set_cpu_flags_mask().

12 years agolibx264: Allow overriding the sliced threads option
Martin Storsjö [Mon, 5 Mar 2012 19:54:17 +0000 (21:54 +0200)]
libx264: Allow overriding the sliced threads option

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoavconv: fix counting encoded video size.
Anton Khirnov [Tue, 6 Mar 2012 07:57:58 +0000 (08:57 +0100)]
avconv: fix counting encoded video size.

avcodec_encode_video2() return value is 0 on success, encoded frame size
is stored in the packet.

12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Tue, 6 Mar 2012 02:56:25 +0000 (03:56 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (31 commits)
  cdxl demux: do not create packets with uninitialized data at EOF.
  Replace computations of remaining bits with calls to get_bits_left().
  amrnb/amrwb: Remove get_bits usage.
  cosmetics: reindent
  avformat: do not require a pixel/sample format if there is no decoder
  avformat: do not fill-in audio packet duration in compute_pkt_fields()
  lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
  dca_parser: parse the sample rate and frame durations
  libspeexdec: do not set AVCodecContext.frame_size
  libopencore-amr: do not set AVCodecContext.frame_size
  alsdec: do not set AVCodecContext.frame_size
  siff: do not set AVCodecContext.frame_size
  amr demuxer: do not set AVCodecContext.frame_size.
  aiffdec: do not set AVCodecContext.frame_size
  mov: do not set AVCodecContext.frame_size
  ape: do not set AVCodecContext.frame_size.
  rdt: remove workaround for infinite loop with aac
  avformat: do not require frame_size in avformat_find_stream_info() for CELT
  avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
  avformat: do not require frame_size in avformat_find_stream_info() for AAC
  ...

Conflicts:
doc/APIchanges
libavcodec/Makefile
libavcodec/avcodec.h
libavcodec/h264.c
libavcodec/h264_ps.c
libavcodec/utils.c
libavcodec/version.h
libavcodec/x86/dsputil_mmx.c
libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agocdxl demux: do not create packets with uninitialized data at EOF.
Reimar Döffinger [Sun, 26 Feb 2012 22:47:41 +0000 (22:47 +0000)]
cdxl demux: do not create packets with uninitialized data at EOF.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agolibutvideo: Add Ut Video encoder wrapper
Derek Buitenhuis [Mon, 5 Mar 2012 20:29:23 +0000 (15:29 -0500)]
libutvideo: Add Ut Video encoder wrapper

All colorspaces are supported.

Renamed libutvideo.cpp to libutvideodec.cpp.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agolibutvideo: Move structs and includes to header
Derek Buitenhuis [Sun, 4 Mar 2012 00:53:59 +0000 (19:53 -0500)]
libutvideo: Move structs and includes to header

This is so the forthcoming encoder wrapper can share
them.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoReplace computations of remaining bits with calls to get_bits_left().
Alex Converse [Mon, 5 Mar 2012 01:53:50 +0000 (17:53 -0800)]
Replace computations of remaining bits with calls to get_bits_left().

12 years agoamrnb/amrwb: Remove get_bits usage.
Alex Converse [Mon, 5 Mar 2012 01:24:38 +0000 (17:24 -0800)]
amrnb/amrwb: Remove get_bits usage.

It is used to parse fixed sized fields out of a single octet. The code
is simpler without it.

12 years agoRemove AV_LOG_DEBUG from av_dlog() calls.
Carl Eugen Hoyos [Mon, 5 Mar 2012 13:28:29 +0000 (14:28 +0100)]
Remove AV_LOG_DEBUG from av_dlog() calls.

AV_LOG_DEBUG is forced by the av_dlog definition.

12 years agocosmetics: reindent
Justin Ruggles [Mon, 27 Feb 2012 23:16:11 +0000 (18:16 -0500)]
cosmetics: reindent

12 years agoavformat: do not require a pixel/sample format if there is no decoder
Justin Ruggles [Mon, 27 Feb 2012 23:02:10 +0000 (18:02 -0500)]
avformat: do not require a pixel/sample format if there is no decoder

Also, do not keep trying to find and open a decoder in try_decode_frame() if
we already tried and failed once.

Fixes always searching until max_analyze_duration in
avformat_find_stream_info() when demuxing codecs without a decoder.

12 years agoavformat: do not fill-in audio packet duration in compute_pkt_fields()
Justin Ruggles [Mon, 27 Feb 2012 23:07:07 +0000 (18:07 -0500)]
avformat: do not fill-in audio packet duration in compute_pkt_fields()

Use the estimated duration only to calculate missing timestamps if needed.

12 years agolavf: Use av_get_audio_frame_duration() in get_audio_frame_size()
Justin Ruggles [Mon, 27 Feb 2012 20:54:41 +0000 (15:54 -0500)]
lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()

Also, do not give AVCodecContext.frame_size priority for muxing.

Updated 2 FATE references:
dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified
             by -t 2 in the FATE test
wmv8-drm-nodec - durations are not needed. previously they were estimated
                 using the packet size and average bit rate.

12 years agodca_parser: parse the sample rate and frame durations
Justin Ruggles [Mon, 27 Feb 2012 18:58:01 +0000 (13:58 -0500)]
dca_parser: parse the sample rate and frame durations

12 years agolibspeexdec: do not set AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 16:18:33 +0000 (11:18 -0500)]
libspeexdec: do not set AVCodecContext.frame_size

It is not necessary

12 years agolibopencore-amr: do not set AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 16:15:17 +0000 (11:15 -0500)]
libopencore-amr: do not set AVCodecContext.frame_size

It is not necessary

12 years agoalsdec: do not set AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 16:02:33 +0000 (11:02 -0500)]
alsdec: do not set AVCodecContext.frame_size

It is not necessary

12 years agosiff: do not set AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 04:27:21 +0000 (23:27 -0500)]
siff: do not set AVCodecContext.frame_size

also, properly set AVCodecContext.bits_per_coded_sample, AVStreasm.start_time,
and AVPacket.duration.

12 years agoamr demuxer: do not set AVCodecContext.frame_size.
Justin Ruggles [Mon, 27 Feb 2012 04:12:03 +0000 (23:12 -0500)]
amr demuxer: do not set AVCodecContext.frame_size.

it is not necessary.

12 years agoaiffdec: do not set AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 03:55:52 +0000 (22:55 -0500)]
aiffdec: do not set AVCodecContext.frame_size

It is unnecessary. Also, for some codecs we're reading more than 1 frame per
packet. Instead we use a private context variable to calculate the bit rate,
stream duration, and packet durations.

Updated FATE seek test, which has slightly different timestamps due to a
more accurate bit rate calculation.

12 years agomov: do not set AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 02:03:04 +0000 (21:03 -0500)]
mov: do not set AVCodecContext.frame_size

It is not necessary.

12 years agoape: do not set AVCodecContext.frame_size.
Justin Ruggles [Tue, 24 Jan 2012 23:25:47 +0000 (18:25 -0500)]
ape: do not set AVCodecContext.frame_size.

prevents lavf from setting incorrect packet durations.

12 years agordt: remove workaround for infinite loop with aac
Justin Ruggles [Mon, 27 Feb 2012 09:08:44 +0000 (04:08 -0500)]
rdt: remove workaround for infinite loop with aac

avformat_find_stream_info() no longer hangs while waiting for AAC frame_size

12 years agoavformat: do not require frame_size in avformat_find_stream_info() for CELT
Justin Ruggles [Mon, 27 Feb 2012 07:46:03 +0000 (02:46 -0500)]
avformat: do not require frame_size in avformat_find_stream_info() for CELT

In Ogg/CELT, frame_size is found in the same place as the sample_rate and
channels, so we do not need to force the frame_size to be parsed.

12 years agoavformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3
Justin Ruggles [Mon, 27 Feb 2012 07:42:22 +0000 (02:42 -0500)]
avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3

It was only needed to avoid a bad time base (and thus non-monotone timestamps)
for stream copy to avi.

12 years agoavformat: do not require frame_size in avformat_find_stream_info() for AAC
Justin Ruggles [Mon, 27 Feb 2012 05:50:16 +0000 (00:50 -0500)]
avformat: do not require frame_size in avformat_find_stream_info() for AAC

We already will get the needed info because of CODEC_CAP_CHANNEL_CONF

12 years agoswfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size
Justin Ruggles [Mon, 27 Feb 2012 08:09:44 +0000 (03:09 -0500)]
swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size

This way we can do stream copy without having the demuxer wait until
frame_size has been set.

12 years agortpenc: use av_get_audio_frame_duration() for max_frames_per_packet
Justin Ruggles [Mon, 27 Feb 2012 08:01:45 +0000 (03:01 -0500)]
rtpenc: use av_get_audio_frame_duration() for max_frames_per_packet

It is more reliable than AVCodecContext.frame_size for codecs with constant
packet duration.

12 years agoriffenc: use av_get_audio_frame_duration()
Justin Ruggles [Mon, 27 Feb 2012 07:34:14 +0000 (02:34 -0500)]
riffenc: use av_get_audio_frame_duration()

For encoding, frame_size is not a reliable indicator of packet duration.
Also, we don't want to have to force the demuxer to find frame_size for
stream copy to work.

12 years agoavcodec: add av_get_audio_frame_duration() function.
Justin Ruggles [Fri, 27 Jan 2012 01:08:23 +0000 (20:08 -0500)]
avcodec: add av_get_audio_frame_duration() function.

This is a utility function for the user to get the frame duration based on
the codec id, frame size in bytes, and various AVCodecContext parameters.

12 years agoavcodec: add av_get_exact_bits_per_sample() function
Justin Ruggles [Thu, 19 Jan 2012 23:36:40 +0000 (18:36 -0500)]
avcodec: add av_get_exact_bits_per_sample() function

This only returns bits per sample when it is exactly correct. That is, the
codec contains only raw samples with no frame headers or padding. This applies
to basically all PCM codecs and a small subset of ADPCM codecs.

12 years agomatroska : Add support for reading/writing creation_time metadata.
Aaron Colwell [Mon, 5 Mar 2012 18:02:48 +0000 (19:02 +0100)]
matroska : Add support for reading/writing creation_time metadata.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agocook: fix return statements.
Michael Niedermayer [Mon, 5 Mar 2012 17:59:29 +0000 (18:59 +0100)]
cook: fix return statements.

Found-by: cbsrobot
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agowmaenc: change some asserts to av_assert0.
Michael Niedermayer [Mon, 5 Mar 2012 06:28:54 +0000 (07:28 +0100)]
wmaenc: change some asserts to av_assert0.

This ensures they are always checked

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agowmaenc: add assert to check encode_superframe() return.
Michael Niedermayer [Mon, 5 Mar 2012 06:27:42 +0000 (07:27 +0100)]
wmaenc: add assert to check encode_superframe() return.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoRevert "wmaenc: check final frame size against output packet size"
Michael Niedermayer [Mon, 5 Mar 2012 06:24:16 +0000 (07:24 +0100)]
Revert "wmaenc: check final frame size against output packet size"

This condition cannot happen, if it can it is a bug that MUST be fixed.
And i very happily volunteer to fix it if someone reports a case to
me that fails.

This reverts commit 5d652e063bd3a180f9de8915e5137aa4f938846d.

12 years agolavf: deobfuscate read_frame_internal().
Anton Khirnov [Sun, 4 Mar 2012 14:49:26 +0000 (15:49 +0100)]
lavf: deobfuscate read_frame_internal().

Split off packet parsing into a separate function. Parse full packets at
once and store them in a queue, eliminating the need for tracking
parsing state in AVStream.

The horrible unreadable loop in read_frame_internal() now isn't weirdly
ordered and doesn't contain evil gotos, so it should be much easier to
understand.

compute_pkt_fields() now invents slightly different timestamps for two
raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't
be more wrong (or right) than previous ones.

12 years agolavf: make read_from_packet_buffer() more flexible.
Anton Khirnov [Sat, 3 Mar 2012 15:28:32 +0000 (16:28 +0100)]
lavf: make read_from_packet_buffer() more flexible.

Make packet buffer a parameter, don't hardcode it to be
AVFormatContext.packet_buffer.

Also move the function higher in the file, since it will be called from
read_frame_internal().

12 years agolavf: factorize freeing a packet buffer.
Anton Khirnov [Sat, 3 Mar 2012 08:43:14 +0000 (09:43 +0100)]
lavf: factorize freeing a packet buffer.

12 years agoFix format string vulnerability detected by -Wformat-security.
Fabian Greffrath [Mon, 5 Mar 2012 15:06:01 +0000 (16:06 +0100)]
Fix format string vulnerability detected by -Wformat-security.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agodv: Do not redundantly initialize struct members to zero.
Diego Biurrun [Mon, 5 Mar 2012 12:57:14 +0000 (13:57 +0100)]
dv: Do not redundantly initialize struct members to zero.

12 years agoalsa: fix timefilter usage.
Nicolas George [Fri, 2 Mar 2012 10:54:45 +0000 (11:54 +0100)]
alsa: fix timefilter usage.

The period argument is supposed to be the number of samples since
the last update.

12 years agotimefilter: allow variable periods.
Nicolas George [Fri, 2 Mar 2012 10:49:27 +0000 (11:49 +0100)]
timefilter: allow variable periods.

Initially found and designed by Michael Niedermayer.

12 years agotimefilter: internally compute feedback factors.
Nicolas George [Wed, 15 Feb 2012 18:15:45 +0000 (19:15 +0100)]
timefilter: internally compute feedback factors.

The feedback factors for the timefilter are directly computed from
the expected period. This commit changes the init function to accept
the period itself and compute the feedback factors internally,
rather than having all client code duplicate the formulas.

This commit also actually fixes the formulas: the current code had
sqrt(2*o), but the correct formula, both theoretically and according
to experimental testing, is sqrt(2)*o.

Furthermore, it adds an exponential to feedback factors larger than
1 with large periods.

12 years agox86: clean up ff_dsputil_init_mmx()
Mans Rullgard [Thu, 1 Mar 2012 12:48:00 +0000 (12:48 +0000)]
x86: clean up ff_dsputil_init_mmx()

This splits ff_dsputil_init_mmx() into multiple functions, one for
each MMX/SSE level, somewhat simplifying the nested conditions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agosmc: Fix overread.
Michael Niedermayer [Mon, 5 Mar 2012 02:43:15 +0000 (03:43 +0100)]
smc: Fix overread.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agobit_depth_template: use av_clip_uint8 over crop_tab.
Michael Niedermayer [Mon, 5 Mar 2012 02:05:21 +0000 (03:05 +0100)]
bit_depth_template: use av_clip_uint8 over crop_tab.

This fixes some global out of array reads and wrong cliping.
No speed difference meassurable under clang on i5
also all important code paths on all important platforms should
use SIMD.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoindeo3: move MV check up.
Michael Niedermayer [Mon, 5 Mar 2012 01:15:35 +0000 (02:15 +0100)]
indeo3: move MV check up.

This adds checking for modes >= 10.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agocook: check decouple values.
Michael Niedermayer [Thu, 1 Mar 2012 16:26:03 +0000 (17:26 +0100)]
cook: check decouple values.

This fixes a out of global array read in the cplscale* tables.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 4 Mar 2012 23:02:58 +0000 (00:02 +0100)]
Merge remote-tracking branch 'qatar/master'

* qatar/master: (27 commits)
  cmdutils: use new avcodec_is_decoder/encoder() functions.
  lavc: make codec_is_decoder/encoder() public.
  lavc: deprecate AVCodecContext.sub_id.
  libcdio: add a forgotten AVClass to the private context.
  swscale: remove "cpu flags" from -sws_flags description.
  proresenc: give user a possibility to alter some encoding parameters
  vorbisenc: add output buffer overwrite protection
  libopencore-amrnbenc: fix end-of-stream handling
  ra144enc: fix end-of-stream handling
  nellymoserenc: zero any leftover packet bytes
  nellymoserenc: use proper MDCT overlap delay
  qpeg: Use bytestream2 functions to prevent buffer overreads.
  swscale: make %rep unconditional.
  vp8: convert simple loopfilter x86 assembly to use named arguments.
  vp8: convert idct x86 assembly to use named arguments.
  vp8: convert mc x86 assembly to use named arguments.
  vp8: convert loopfilter x86 assembly to use cpuflags().
  vp8: convert idct/mc x86 assembly to use cpuflags().
  swscale: remove now unnecessary hack.
  x86inc: don't "bake" stack_offset in named arguments.
  ...

Conflicts:
cmdutils.c
doc/APIchanges
libavcodec/mpeg12.c
libavcodec/options.c
libavcodec/qpeg.c
libavcodec/utils.c
libavcodec/version.h
libavdevice/libcdio.c
tests/lavf-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoindeo3: Fix overreading requant_tab.
Michael Niedermayer [Sun, 4 Mar 2012 22:12:58 +0000 (23:12 +0100)]
indeo3: Fix overreading requant_tab.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoindeo3: Check motion vectors.
Michael Niedermayer [Sun, 4 Mar 2012 21:32:44 +0000 (22:32 +0100)]
indeo3: Check motion vectors.

Fixes overread of reference frame.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agocmdutils: use new avcodec_is_decoder/encoder() functions.
Anton Khirnov [Fri, 2 Mar 2012 16:05:01 +0000 (17:05 +0100)]
cmdutils: use new avcodec_is_decoder/encoder() functions.

Fixes listing encoders.

12 years agolavc: make codec_is_decoder/encoder() public.
Anton Khirnov [Fri, 2 Mar 2012 16:00:53 +0000 (17:00 +0100)]
lavc: make codec_is_decoder/encoder() public.

12 years agolavc: deprecate AVCodecContext.sub_id.
Anton Khirnov [Mon, 27 Feb 2012 17:52:13 +0000 (18:52 +0100)]
lavc: deprecate AVCodecContext.sub_id.

In most places where it's used, it's as a pointless write-only field.

Only rv10 decoder actually reads from it, but it stores some internal
version info in it. There is no reason for it to be in a public field.

12 years agolibcdio: add a forgotten AVClass to the private context.
Anton Khirnov [Sat, 3 Mar 2012 05:26:39 +0000 (06:26 +0100)]
libcdio: add a forgotten AVClass to the private context.

12 years agolibmpcodecs/vf_pp: import memleak fix from MPlayer.
Nicolas George [Sat, 3 Mar 2012 13:50:53 +0000 (14:50 +0100)]
libmpcodecs/vf_pp: import memleak fix from MPlayer.

12 years agovf_mp: uninit filter chain.
Nicolas George [Sat, 3 Mar 2012 12:17:47 +0000 (13:17 +0100)]
vf_mp: uninit filter chain.

Most of the code was taken from MPlayer's vf_uninit_filter_chain.

12 years agodsicinav: fix 10l bug introduced in 999d38f3a94eb963c073512e5dad7940456eb634
Michael Niedermayer [Sun, 4 Mar 2012 17:04:55 +0000 (18:04 +0100)]
dsicinav: fix 10l bug introduced in 999d38f3a94eb963c073512e5dad7940456eb634

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agopcm-mpeg: fix 10l condition flip
Michael Niedermayer [Sun, 4 Mar 2012 15:38:20 +0000 (16:38 +0100)]
pcm-mpeg: fix 10l condition flip

Original issue Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
10l bug Found-by: nevcairiel
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoswscale: remove "cpu flags" from -sws_flags description.
Ronald S. Bultje [Sun, 4 Mar 2012 05:38:03 +0000 (21:38 -0800)]
swscale: remove "cpu flags" from -sws_flags description.

12 years agoFix alpha overflow when converting from RGBA64 to RGBA.
Michael Niedermayer [Sun, 4 Mar 2012 12:42:16 +0000 (13:42 +0100)]
Fix alpha overflow when converting from RGBA64 to RGBA.

Fixes converting the sample from ticket #503 to 32bit RGB.

12 years agolavfi: add blackdetect filter
Stefano Sabatini [Fri, 2 Mar 2012 14:51:26 +0000 (15:51 +0100)]
lavfi: add blackdetect filter

Address trac ticket #901.

12 years agommvideo: fix overreads of the input buffer.
Michael Niedermayer [Sun, 4 Mar 2012 07:14:07 +0000 (08:14 +0100)]
mmvideo: fix overreads of the input buffer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agodsicinvideo: validate buffer offset before copying pixels.
Ronald S. Bultje [Wed, 29 Feb 2012 23:07:09 +0000 (15:07 -0800)]
dsicinvideo: validate buffer offset before copying pixels.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable-LOOeJiBropLYtjvyW6yDsg@public.gmane.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoproresenc: give user a possibility to alter some encoding parameters
Kostya Shishkov [Sat, 3 Mar 2012 18:14:35 +0000 (19:14 +0100)]
proresenc: give user a possibility to alter some encoding parameters

This allows user to select quantisation matrix from different profile,
stamp frames with custom vendor string and change target bitrate.