Commit Graph

33392 Commits

Author SHA1 Message Date
Michael Niedermayer
dc46692ded ffmpeg: fix setting codecs for demuxers.
Bug introduced by:
commit e3bf4e292c
Author: Anton Khirnov <anton@khirnov.net>
Date:   Tue Aug 30 04:10:54 2011 +0200

    ffmpeg: replace -vcodec/-acodec/-scodec with a better system.

    The new option doesn't depend on its placement wrt -new* options (which
    don't exist anymore) and works in a similar way as per-stream AVOptions.

    -[vas]codec remain as aliases to -codec:[vas]

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 19:21:22 +02:00
Michael Niedermayer
92ec66f983 ffmpeg: limit read_key() calls to get a tiny speed boost.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer
c09abba1d9 ffmpeg: avoid multiple redundant av_gettime() calls, rather reuse the value in a iteration of the main loop.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer
f3afc9d772 ffmpeg: fix run_as_daemon when HAVE_TERMIOS_H is false
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer
d6c231bac1 ffmpeg: cosmetic renamings to reduce difference to qatar.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer
0732dceef1 ffmpeg: call term_init() earlier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 18:37:47 +02:00
Michael Niedermayer
570fb660d6 ffmpeg: make q_pressed volatile, it can be changed from signal handlers.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 17:26:43 +02:00
Michael Niedermayer
fb79558516 ffmpeg: dont call read_key() in decode_interrupt_cb() this can cause keys to be lost
also its slow when read_key() is slow and there are a very large number of calls

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 17:26:43 +02:00
Michael Niedermayer
1339702540 eval: add gcd()
example: -vf 'scale=256:256,mp=geq=gcd(X\,Y)-2:128:128'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 04:38:17 +02:00
Michael Niedermayer
9e5e086b7e eval:add hypot()
useage example: -vf 'scale=256:256,mp=geq=random(1)/hypot(X-cos(N*0.07)*W/2-W/2\,Y-sin(N*0.09)*H/2-H/2)^2*1000000*sin(N*0.02):128:128'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 04:38:01 +02:00
Michael Niedermayer
9b47173545 Merge remote-tracking branch 'qatar/master'
* qatar/master: (24 commits)
  mpegps: Use av_get_packet() instead of poorly emulating it.
  motionpixels: decode only the 111 complete frames for fate
  mpc8: Check out of bound bands limit
  xan: Prevent NULL dereference with missing palette
  xan: Check for out of bound reads in xan_huffman_decode()
  xan: Fixed out of bound accesses in xan_unpack()
  motionpixels: Prevent calling init_vlc() with invalid parameters
  shorten: Fix out of bound writes in fix_bitshift()
  dsicinav: Check for out of bounds writes
  tiertexseqv: Check for out of bound reads
  quickdraw: Check for out of bound reads
  dsicinav: Check for out of bounds reads
  motionpixels: Fix the size of workspace buffers
  motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer
  wmavoice: Check for corrupted extra data
  wmavoice: Check for out of bound writes
  xan: Prevent NULL dereferences with missing reference frame
  bink: Prevent NULL dereferences with missing reference frame
  wavpack: Reset internal state on corrupted blocks
  wmapro: Validate the number of audio channels before using it
  ...

Conflicts:
	libavcodec/h264.c
	libavcodec/xan.c
	tests/ref/fate/motionpixels

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 03:39:01 +02:00
Michael Niedermayer
ac7cda9e14 eval: add random()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 03:13:21 +02:00
Michael Niedermayer
8fd56f7b12 eval: make variables persistent so they can be used between evaluations.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 03:13:21 +02:00
Michael Niedermayer
74f77eb048 H264: set colorspace and full range to values indicating unspecified by default
Code based on ffdshow
Author unknown

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-08 03:13:21 +02:00
Alex Converse
98ef887a75 mpegps: Use av_get_packet() instead of poorly emulating it. 2011-10-07 17:04:14 -07:00
Clément Bœsch
3775af0fec bintext: reset x and y pos after each frame decode.
This makes successive frames decode possible.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 22:28:07 +02:00
Maksym Veremeyenko
4052bf69ac return error code if error happens
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 22:28:07 +02:00
Janne Grunau
c2f2dfb3dd motionpixels: decode only the 111 complete frames for fate
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 19:32:07 +02:00
Laurent Aimar
9bd854b1ff mpc8: Check out of bound bands limit
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 17:15:45 +02:00
Laurent Aimar
7d17a794f0 xan: Prevent NULL dereference with missing palette
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 17:15:31 +02:00
Laurent Aimar
3db3fdf4c6 xan: Check for out of bound reads in xan_huffman_decode()
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:32 +02:00
Laurent Aimar
3e0757c2a8 xan: Fixed out of bound accesses in xan_unpack()
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:32 +02:00
Laurent Aimar
1cd0a55163 motionpixels: Prevent calling init_vlc() with invalid parameters
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:32 +02:00
Laurent Aimar
5f05cf4ea9 shorten: Fix out of bound writes in fix_bitshift()
The data pointers s->decoded[*] already take into account s->nwrap.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
1720603287 dsicinav: Check for out of bounds writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
64263dd526 tiertexseqv: Check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
4fd56f842c quickdraw: Check for out of bound reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
e3ca9b93d9 dsicinav: Check for out of bounds reads
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
210c80331e motionpixels: Fix the size of workspace buffers
Some buffers must be mod 4 in width and/or height.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
d337dd3a90 motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
d99427cb8b wmavoice: Check for corrupted extra data
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
1c1449b548 wmavoice: Check for out of bound writes
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
06be075cda xan: Prevent NULL dereferences with missing reference frame
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
c7e631986b bink: Prevent NULL dereferences with missing reference frame
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
2c6cf13940 wavpack: Reset internal state on corrupted blocks
wavpack_decode_block() supposes that it is called back with the exact
same buffer unless it has returned with an error. With multi-channels
files, wavpack_decode_frame() was breaking this assumption.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:31 +02:00
Laurent Aimar
2c1ba79941 wmapro: Validate the number of audio channels before using it
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Laurent Aimar
1e3336de69 mpc8: Fix return value on EOF
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Laurent Aimar
95010d18b2 shorten: Prevent block size from increasing
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Laurent Aimar
124a16f678 xan: Prevent out of bound accesses
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-07 16:25:30 +02:00
Michael Niedermayer
f22bc68dc0 Merge remote-tracking branch 'hexene/stagefright'
* hexene/stagefright:
  libstagefright: start decode_thread() only after decode_frame() is called at least once.
  libstagefright: mark the dummy frame as keyframe.
  libstagefright: limit the output queue size
  libstagefright: return EOS if CustomSource::read() is called after decode_thread() returns
  libstagefright: set the correct frame size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 15:32:30 +02:00
Mohamed Naufal
a85996d834 libstagefright: start decode_thread() only after decode_frame() is called at least once.
This prevents the situation where EOS is passed as the first frame to the
h/w decoder and thus avoids a potential crash.
2011-10-07 18:32:44 +05:30
Mohamed Naufal
fedbf9177c libstagefright: mark the dummy frame as keyframe.
This makes sure decoder->read() returns if it is the first frame fed.
2011-10-07 18:32:40 +05:30
Mohamed Naufal
295f13953d libstagefright: limit the output queue size 2011-10-07 18:32:36 +05:30
Mohamed Naufal
23ea48f2f7 libstagefright: return EOS if CustomSource::read() is called after decode_thread() returns 2011-10-07 18:32:31 +05:30
Mohamed Naufal
09a49e8919 libstagefright: set the correct frame size 2011-10-07 18:32:23 +05:30
Michael Niedermayer
14c21c1ff5 H264: Only wait before triggering ff_thread_setup_complete() until the next slice that contains a start-of-field/frame macroblock
This allows concurrent decoding of the last field/frame, rather than
only the last slice, of data packets with multiple NAL units packed
together.

This will fix the slowdown reported in e.g. bug 52.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-10-07 14:23:26 +02:00
Michael Niedermayer
355cc1a052 swresample/rematrix: show matrix with debug log level
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 13:51:40 +02:00
Michael Niedermayer
86602d1c79 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  vp6: Reset the internal state when aborting key frames header parsing
  vp56: Release old pictures after a resolution changes
  vp6: Check for huffman tree build errors
  vp56: Check for missing reference frame data
  cinepak: Fix invalid read access on extra data
  vmd: fix segfaults on corruped streams
  cook: Fix js_vlc_bits value validation for joint stereo
  segafilm: Check for memory allocation failures in segafilm demuxer.
  segafilm: Fix potential division by 0 on corrupted streams in the demuxer
  Fixed segfault on corrupted sega streams in the demuxer.
  Fixed deference of NULL pointer in motionpixels decoder.
  libx264: support 9- and 10-bit output.
  h264: correct implicit_weight for field-interlaced pictures.
  mpegvideo: set correct offset for edge emulation buffer.
  mpegvideo: fix position of bottom edge.

Conflicts:
	libavcodec/motionpixels.c
	libavcodec/mpegvideo.c
	libavcodec/version.h
	libavcodec/vmdav.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 03:38:50 +02:00
Marton Balint
177ed7e818 swresample: use av_get_default_channel_layout instead of guess_layout
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 02:53:18 +02:00
Marton Balint
cbfca6225a avutil: bump minor version because of av_get_default_channel_layout type fix
Well, probably an ABI breakage at least for 32bit, but hopefully it will go
unnoticed because the fix happened realtively soon.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-10-07 02:53:18 +02:00