ffmpeg.git
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Mon, 10 Oct 2011 01:41:49 +0000 (03:41 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header
  mpeg124: use sign_extend() function
  ac3dec: use get_sbits() instead of manually sign-extending
  4xm: fix signed overflow
  wmavoice: fix a signed overflow
  mpegvideo_enc: fix a signed overflow
  crc: fix signed overflow
  fate: run avconv with -nostats flag
  avtools: add -v as alias for -loglevel
  avconv: always print stats with AV_LOG_INFO
  doc/avconv: add forgotten output/per-stream info to -filter
  avconv: add -stats option to enable/disable printing encoding progress
  avconv: in output_packet() don't set decoded_data_size for video.
  avconv: remove pointless always true condition
  avconv: factorize common code in transcode_init()
  zmbv: remove memcpy() of decoded frame
  mpeg12enc: use sign_extend() function
  h264pred: use unsigned types for pixel values, fix signed overflows
  h264: fix signed overflows in x*0x01010101 expressions
  h264pred: remove unused variables

Conflicts:
avconv.c
tests/fate-run.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoreg tests: add g723.1
Michael Niedermayer [Mon, 10 Oct 2011 00:54:12 +0000 (02:54 +0200)]
reg tests: add g723.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agog723.1 encoder
Mohamed Naufal [Mon, 10 Oct 2011 00:48:34 +0000 (02:48 +0200)]
g723.1 encoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agog723.1 muxer
Mohamed Naufal [Mon, 10 Oct 2011 00:48:16 +0000 (02:48 +0200)]
g723.1 muxer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agompeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header
Mans Rullgard [Sun, 9 Oct 2011 22:21:01 +0000 (23:21 +0100)]
mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agompeg124: use sign_extend() function
Mans Rullgard [Sun, 9 Oct 2011 22:16:07 +0000 (23:16 +0100)]
mpeg124: use sign_extend() function

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoac3dec: use get_sbits() instead of manually sign-extending
Mans Rullgard [Sun, 9 Oct 2011 22:15:17 +0000 (23:15 +0100)]
ac3dec: use get_sbits() instead of manually sign-extending

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years ago4xm: fix signed overflow
Mans Rullgard [Sun, 9 Oct 2011 19:38:01 +0000 (20:38 +0100)]
4xm: fix signed overflow

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agowmavoice: fix a signed overflow
Mans Rullgard [Sun, 9 Oct 2011 19:46:22 +0000 (20:46 +0100)]
wmavoice: fix a signed overflow

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agompegvideo_enc: fix a signed overflow
Mans Rullgard [Sun, 9 Oct 2011 19:32:58 +0000 (20:32 +0100)]
mpegvideo_enc: fix a signed overflow

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoDo not auto-detect Sorenson Spark in f4v.
Carl Eugen Hoyos [Sun, 9 Oct 2011 20:58:31 +0000 (22:58 +0200)]
Do not auto-detect Sorenson Spark in f4v.

Assuming codec_tag H263 for FLV only leads to trouble.

8 years agoBe less verbose about continuity check errors.
Carl Eugen Hoyos [Sun, 9 Oct 2011 20:47:35 +0000 (22:47 +0200)]
Be less verbose about continuity check errors.

8 years agoprores: check slice mb_y against mb_height
Michael Niedermayer [Sun, 9 Oct 2011 19:58:13 +0000 (21:58 +0200)]
prores: check slice mb_y against mb_height

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoprores: only call get_buffer once per frame
Michael Niedermayer [Sun, 9 Oct 2011 19:51:55 +0000 (21:51 +0200)]
prores: only call get_buffer once per frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoprores:cosmetics
Michael Niedermayer [Sun, 9 Oct 2011 19:51:06 +0000 (21:51 +0200)]
prores:cosmetics

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoprores: fix typo
Michael Niedermayer [Sun, 9 Oct 2011 19:49:55 +0000 (21:49 +0200)]
prores: fix typo

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agocrc: fix signed overflow
Mans Rullgard [Sat, 8 Oct 2011 00:59:51 +0000 (01:59 +0100)]
crc: fix signed overflow

This fixes a signed overflow from i << 24 when i == 255 by
making i unsigned.  The result of the shift is already
assigned to an variable of unsigned type.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agofate: run avconv with -nostats flag
Mans Rullgard [Fri, 7 Oct 2011 13:13:02 +0000 (14:13 +0100)]
fate: run avconv with -nostats flag

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoavtools: add -v as alias for -loglevel
Mans Rullgard [Fri, 7 Oct 2011 12:29:03 +0000 (13:29 +0100)]
avtools: add -v as alias for -loglevel

This saves a bit of typing.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoavconv: always print stats with AV_LOG_INFO
Anton Khirnov [Sun, 9 Oct 2011 14:32:54 +0000 (16:32 +0200)]
avconv: always print stats with AV_LOG_INFO

It's now possible to disable printing stats during encoding with
-nostats, so there's no reason to print them differently depending on
whether it's last report or not.

8 years agodoc/avconv: add forgotten output/per-stream info to -filter
Anton Khirnov [Sun, 9 Oct 2011 13:57:54 +0000 (15:57 +0200)]
doc/avconv: add forgotten output/per-stream info to -filter

8 years agoavconv: add -stats option to enable/disable printing encoding progress
Anton Khirnov [Sun, 9 Oct 2011 13:57:30 +0000 (15:57 +0200)]
avconv: add -stats option to enable/disable printing encoding progress

8 years agoavconv: in output_packet() don't set decoded_data_size for video.
Anton Khirnov [Tue, 27 Sep 2011 18:00:28 +0000 (20:00 +0200)]
avconv: in output_packet() don't set decoded_data_size for video.

It's only used for audio.

8 years agoavconv: remove pointless always true condition
Anton Khirnov [Tue, 27 Sep 2011 06:21:48 +0000 (08:21 +0200)]
avconv: remove pointless always true condition

8 years agoavconv: factorize common code in transcode_init()
Anton Khirnov [Tue, 27 Sep 2011 06:16:26 +0000 (08:16 +0200)]
avconv: factorize common code in transcode_init()

8 years agoffprobe: parse arguments for -print_format writer
Stefano Sabatini [Sun, 2 Oct 2011 09:26:07 +0000 (11:26 +0200)]
ffprobe: parse arguments for -print_format writer

This allows -print_format to accept string of the form WRITER=OPTIONS,
as required by the pending compact writer patch.

8 years agoffprobe: create a dedicated "Writers" section in the manual
Stefano Sabatini [Sun, 2 Oct 2011 09:59:38 +0000 (11:59 +0200)]
ffprobe: create a dedicated "Writers" section in the manual

Also update documentation related to the output format.

8 years agoffprobe: extend writers API, and move the writers up in the file
Stefano Sabatini [Tue, 27 Sep 2011 18:07:51 +0000 (20:07 +0200)]
ffprobe: extend writers API, and move the writers up in the file

The new provided API is more flexible and is decoupled from the
application level code, so it is easier to maintain.

8 years agolavu: bump micro after gcd(), random(), and hypot() additions in eval
Stefano Sabatini [Sun, 9 Oct 2011 13:58:10 +0000 (15:58 +0200)]
lavu: bump micro after gcd(), random(), and hypot() additions in eval

8 years agodoc: avoid "@table has text but no @item" warning.
Clément Bœsch [Sun, 9 Oct 2011 08:23:58 +0000 (10:23 +0200)]
doc: avoid "@table has text but no @item" warning.

8 years agozmbv: remove memcpy() of decoded frame
Mans Rullgard [Sun, 9 Oct 2011 12:21:10 +0000 (13:21 +0100)]
zmbv: remove memcpy() of decoded frame

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agompeg12enc: use sign_extend() function
Mans Rullgard [Sat, 8 Oct 2011 11:56:54 +0000 (12:56 +0100)]
mpeg12enc: use sign_extend() function

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoh264pred: use unsigned types for pixel values, fix signed overflows
Mans Rullgard [Sat, 8 Oct 2011 20:22:06 +0000 (21:22 +0100)]
h264pred: use unsigned types for pixel values, fix signed overflows

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoh264: fix signed overflows in x*0x01010101 expressions
Mans Rullgard [Sat, 8 Oct 2011 20:19:51 +0000 (21:19 +0100)]
h264: fix signed overflows in x*0x01010101 expressions

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoh264pred: remove unused variables
Mans Rullgard [Sat, 8 Oct 2011 19:32:09 +0000 (20:32 +0100)]
h264pred: remove unused variables

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoAllow YUV444P and RGB/BGR encoding for libx264.
Themaister [Sat, 8 Oct 2011 10:16:43 +0000 (12:16 +0200)]
Allow YUV444P and RGB/BGR encoding for libx264.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sun, 9 Oct 2011 02:02:03 +0000 (04:02 +0200)]
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavf: fix signed overflow in avformat_find_stream_info()
  vp8: fix signed overflows
  motion_est: fix some signed overflows
  dca: fix signed overflow in shift
  aacdec: fix undefined shifts
  bink: Check for various out of bound writes
  bink: Check for out of bound writes when building tree
  put_bits: fix invalid shift by 32 in flush_put_bits()

Conflicts:
libavcodec/bink.c
libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqtrle: check for out of bound writes.
Laurent Aimar [Sat, 8 Oct 2011 21:40:36 +0000 (23:40 +0200)]
qtrle: check for out of bound writes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoxxan: check for out of bound accesses
Laurent Aimar [Sat, 8 Oct 2011 21:40:34 +0000 (23:40 +0200)]
xxan: check for out of bound accesses

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agotxd: check for out of bound reads.
Laurent Aimar [Sat, 8 Oct 2011 19:57:27 +0000 (21:57 +0200)]
txd: check for out of bound reads.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoqtrle: check for invalid line offset
Laurent Aimar [Sat, 8 Oct 2011 21:01:33 +0000 (23:01 +0200)]
qtrle: check for invalid line offset

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovqavideo: check for out of bound reads.
Laurent Aimar [Sat, 8 Oct 2011 23:54:41 +0000 (01:54 +0200)]
vqavideo: check for out of bound reads.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovqa: fix double free on corrupted streams
Laurent Aimar [Sat, 8 Oct 2011 21:40:37 +0000 (23:40 +0200)]
vqa: fix double free on corrupted streams

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agovqavideo: check for invalid/unsupported version
Laurent Aimar [Sat, 8 Oct 2011 21:40:39 +0000 (23:40 +0200)]
vqavideo: check for invalid/unsupported version

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeamad: release the reference frame on video size changes
Laurent Aimar [Sat, 8 Oct 2011 21:40:33 +0000 (23:40 +0200)]
eamad: release the reference frame on video size changes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeamad: check for out of bound reads when doing MC
Laurent Aimar [Sat, 8 Oct 2011 21:40:31 +0000 (23:40 +0200)]
eamad: check for out of bound reads when doing MC

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeamad: avoid NULL derefence when missing the reference frame.
Laurent Aimar [Sat, 8 Oct 2011 21:40:32 +0000 (23:40 +0200)]
eamad: avoid NULL derefence when missing the reference frame.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeatgv: fix pointer arithmetic overflows.
Laurent Aimar [Sat, 8 Oct 2011 21:40:28 +0000 (23:40 +0200)]
eatgv: fix pointer arithmetic overflows.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeatgv: fix out of bound reads on corrupted motions vectors.
Laurent Aimar [Sat, 8 Oct 2011 21:40:27 +0000 (23:40 +0200)]
eatgv: fix out of bound reads on corrupted motions vectors.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeamad: clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer
Laurent Aimar [Sat, 8 Oct 2011 21:40:30 +0000 (23:40 +0200)]
eamad: clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoatrac1: give a valid context pointer to av_log().
Laurent Aimar [Sat, 8 Oct 2011 21:40:26 +0000 (23:40 +0200)]
atrac1: give a valid context pointer to av_log().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agopixdesc: fix gbr24p
Michael Niedermayer [Sat, 8 Oct 2011 22:59:59 +0000 (00:59 +0200)]
pixdesc: fix gbr24p

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: fix y/N regression so that \n is always needed
Michael Niedermayer [Sat, 8 Oct 2011 22:59:15 +0000 (00:59 +0200)]
ffmpeg: fix y/N regression so that \n is always needed

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agosws: gbr24p input support
Michael Niedermayer [Sat, 8 Oct 2011 21:07:05 +0000 (23:07 +0200)]
sws: gbr24p input support

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeval: fix () bug in not.
Michael Niedermayer [Sat, 8 Oct 2011 21:16:53 +0000 (23:16 +0200)]
eval: fix () bug in not.

Found-by: Oded Shimon
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoswscale: Fix prototypes of *toyv12 so they can be used with planar rgb input.
Michael Niedermayer [Sat, 8 Oct 2011 21:06:05 +0000 (23:06 +0200)]
swscale: Fix prototypes of *toyv12 so they can be used with planar rgb input.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoStart adding pixel definitions for planar rgb.
Themaister [Sat, 8 Oct 2011 19:54:20 +0000 (21:54 +0200)]
Start adding pixel definitions for planar rgb.

8 years agoffmpeg: put space back that was lost during someone reformating it.
Michael Niedermayer [Sat, 8 Oct 2011 19:39:36 +0000 (21:39 +0200)]
ffmpeg: put space back that was lost during someone reformating it.

Found-by: Ramiro
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agolavf: fix signed overflow in avformat_find_stream_info()
Mans Rullgard [Sat, 8 Oct 2011 01:06:26 +0000 (02:06 +0100)]
lavf: fix signed overflow in avformat_find_stream_info()

On the first iteration through this code, last_dts is always
INT64_MIN (AV_NOPTS_VALUE) and the subtraction overflows in
an invalid manner.  Although the result is only used if the
input values are valid, performing the subtraction is still
not allowed in a strict environment.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agovp8: fix signed overflows
Mans Rullgard [Sat, 8 Oct 2011 14:03:51 +0000 (15:03 +0100)]
vp8: fix signed overflows

In addition to avoiding undefined behaviour, an unsigned type
makes more sense for packing multiple 8-bit values.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agomotion_est: fix some signed overflows
Mans Rullgard [Sat, 8 Oct 2011 12:52:44 +0000 (13:52 +0100)]
motion_est: fix some signed overflows

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agodca: fix signed overflow in shift
Mans Rullgard [Sat, 8 Oct 2011 12:49:42 +0000 (13:49 +0100)]
dca: fix signed overflow in shift

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoaacdec: fix undefined shifts
Mans Rullgard [Sat, 8 Oct 2011 12:41:23 +0000 (13:41 +0100)]
aacdec: fix undefined shifts

Since nnz can be zero, this is needed to avoid a shift by 32.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agodct-test: document the number of bits we use for testing.
Michael Niedermayer [Sat, 8 Oct 2011 17:58:27 +0000 (19:58 +0200)]
dct-test: document the number of bits we use for testing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agodct-test: better term for meximum error.
Michael Niedermayer [Sat, 8 Oct 2011 17:57:30 +0000 (19:57 +0200)]
dct-test: better term for meximum error.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: fix read_yn() if HAVE_TERMIOS_H || HAVE_KBHIT == 0
Michael Niedermayer [Sat, 8 Oct 2011 17:43:10 +0000 (19:43 +0200)]
ffmpeg: fix read_yn() if HAVE_TERMIOS_H || HAVE_KBHIT == 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: fix setting codecs for demuxers.
Michael Niedermayer [Sat, 8 Oct 2011 17:21:22 +0000 (19:21 +0200)]
ffmpeg: fix setting codecs for demuxers.

Bug introduced by:
commit e3bf4e292cf999c9b8442a4e23677cab0b4781a9
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>
8 years agoffmpeg: limit read_key() calls to get a tiny speed boost.
Michael Niedermayer [Sat, 8 Oct 2011 16:36:15 +0000 (18:36 +0200)]
ffmpeg: limit read_key() calls to get a tiny speed boost.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: avoid multiple redundant av_gettime() calls, rather reuse the value in a...
Michael Niedermayer [Sat, 8 Oct 2011 15:32:06 +0000 (17:32 +0200)]
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>
8 years agoffmpeg: fix run_as_daemon when HAVE_TERMIOS_H is false
Michael Niedermayer [Sat, 8 Oct 2011 15:28:58 +0000 (17:28 +0200)]
ffmpeg: fix run_as_daemon when HAVE_TERMIOS_H is false

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: cosmetic renamings to reduce difference to qatar.
Michael Niedermayer [Sat, 8 Oct 2011 15:21:25 +0000 (17:21 +0200)]
ffmpeg: cosmetic renamings to reduce difference to qatar.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: call term_init() earlier
Michael Niedermayer [Sat, 8 Oct 2011 15:20:52 +0000 (17:20 +0200)]
ffmpeg: call term_init() earlier

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: make q_pressed volatile, it can be changed from signal handlers.
Michael Niedermayer [Sat, 8 Oct 2011 15:20:17 +0000 (17:20 +0200)]
ffmpeg: make q_pressed volatile, it can be changed from signal handlers.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoffmpeg: dont call read_key() in decode_interrupt_cb() this can cause keys to be lost
Michael Niedermayer [Sat, 8 Oct 2011 15:09:14 +0000 (17:09 +0200)]
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>
8 years agobink: Check for various out of bound writes
Laurent Aimar [Tue, 27 Sep 2011 12:16:41 +0000 (12:16 +0000)]
bink: Check for various out of bound writes

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agobink: Check for out of bound writes when building tree
Laurent Aimar [Tue, 27 Sep 2011 12:16:41 +0000 (12:16 +0000)]
bink: Check for out of bound writes when building tree

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agoeval: add gcd()
Michael Niedermayer [Sat, 8 Oct 2011 02:38:17 +0000 (04:38 +0200)]
eval: add gcd()

example: -vf 'scale=256:256,mp=geq=gcd(X\,Y)-2:128:128'

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeval:add hypot()
Michael Niedermayer [Sat, 8 Oct 2011 02:12:00 +0000 (04:12 +0200)]
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>
8 years agoput_bits: fix invalid shift by 32 in flush_put_bits()
Mans Rullgard [Sat, 8 Oct 2011 01:09:42 +0000 (02:09 +0100)]
put_bits: fix invalid shift by 32 in flush_put_bits()

If flush_put_bits() is called when the 32-bit buffer is empty,
e.g. after writing a multiple of 32 bits, and invalid shift by
32 is performed.  Since flush_put_bits() is called infrequently,
this additional check should have negligible performance impact.

Signed-off-by: Mans Rullgard <mans@mansr.com>
8 years agoMerge remote-tracking branch 'qatar/master'
Michael Niedermayer [Sat, 8 Oct 2011 01:39:01 +0000 (03:39 +0200)]
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>
8 years agoeval: add random()
Michael Niedermayer [Sat, 8 Oct 2011 01:09:16 +0000 (03:09 +0200)]
eval: add random()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoeval: make variables persistent so they can be used between evaluations.
Michael Niedermayer [Sat, 8 Oct 2011 01:08:18 +0000 (03:08 +0200)]
eval: make variables persistent so they can be used between evaluations.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoH264: set colorspace and full range to values indicating unspecified by default
Michael Niedermayer [Fri, 7 Oct 2011 23:12:46 +0000 (01:12 +0200)]
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>
8 years agompegps: Use av_get_packet() instead of poorly emulating it.
Alex Converse [Sat, 8 Oct 2011 00:02:36 +0000 (17:02 -0700)]
mpegps: Use av_get_packet() instead of poorly emulating it.

8 years agobintext: reset x and y pos after each frame decode.
Clément Bœsch [Fri, 7 Oct 2011 20:06:59 +0000 (22:06 +0200)]
bintext: reset x and y pos after each frame decode.

This makes successive frames decode possible.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agoreturn error code if error happens
Maksym Veremeyenko [Mon, 3 Oct 2011 04:47:39 +0000 (07:47 +0300)]
return error code if error happens

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
8 years agomotionpixels: decode only the 111 complete frames for fate
Janne Grunau [Fri, 7 Oct 2011 16:08:55 +0000 (18:08 +0200)]
motionpixels: decode only the 111 complete frames for fate

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agompc8: Check out of bound bands limit
Laurent Aimar [Sun, 25 Sep 2011 20:06:20 +0000 (20:06 +0000)]
mpc8: Check out of bound bands limit

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agoxan: Prevent NULL dereference with missing palette
Laurent Aimar [Thu, 29 Sep 2011 03:12:07 +0000 (03:12 +0000)]
xan: Prevent NULL dereference with missing palette

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agoxan: Check for out of bound reads in xan_huffman_decode()
Laurent Aimar [Thu, 29 Sep 2011 20:38:01 +0000 (20:38 +0000)]
xan: Check for out of bound reads in xan_huffman_decode()

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agoxan: Fixed out of bound accesses in xan_unpack()
Laurent Aimar [Thu, 29 Sep 2011 03:12:07 +0000 (03:12 +0000)]
xan: Fixed out of bound accesses in xan_unpack()

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agomotionpixels: Prevent calling init_vlc() with invalid parameters
Laurent Aimar [Thu, 29 Sep 2011 03:12:07 +0000 (03:12 +0000)]
motionpixels: Prevent calling init_vlc() with invalid parameters

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agoshorten: Fix out of bound writes in fix_bitshift()
Laurent Aimar [Fri, 30 Sep 2011 01:26:22 +0000 (01:26 +0000)]
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>
8 years agodsicinav: Check for out of bounds writes
Laurent Aimar [Thu, 29 Sep 2011 23:13:35 +0000 (23:13 +0000)]
dsicinav: Check for out of bounds writes

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agotiertexseqv: Check for out of bound reads
Laurent Aimar [Thu, 29 Sep 2011 23:13:35 +0000 (23:13 +0000)]
tiertexseqv: Check for out of bound reads

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agoquickdraw: Check for out of bound reads
Laurent Aimar [Thu, 29 Sep 2011 23:13:35 +0000 (23:13 +0000)]
quickdraw: Check for out of bound reads

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agodsicinav: Check for out of bounds reads
Laurent Aimar [Thu, 29 Sep 2011 23:13:35 +0000 (23:13 +0000)]
dsicinav: Check for out of bounds reads

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agomotionpixels: Fix the size of workspace buffers
Laurent Aimar [Thu, 29 Sep 2011 23:13:35 +0000 (23:13 +0000)]
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>
8 years agomotionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary...
Laurent Aimar [Thu, 29 Sep 2011 23:13:35 +0000 (23:13 +0000)]
motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
8 years agowmavoice: Check for corrupted extra data
Laurent Aimar [Tue, 27 Sep 2011 22:15:31 +0000 (22:15 +0000)]
wmavoice: Check for corrupted extra data

Signed-off-by: Janne Grunau <janne-libav@jannau.net>