Commit Graph

17047 Commits

Author SHA1 Message Date
Reimar Döffinger ee4ba9aecd Fix incorrect increment in sgidec.c
Fixes trac issue #899.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-08 17:26:23 +01:00
Michael Niedermayer 757473831c Merge remote-tracking branch 'qatar/master'
* qatar/master: (29 commits)
  cabac: Move code only used within the CABAC test program into the test program.
  vp56: Drop unnecessary cabac.h #include.
  h264-test: Initialize AVCodecContext.av_class.
  build: Skip compiling network.h and rtsp.h if networking is not enabled.
  cosmetics: drop some pointless parentheses
  Disable annoying warning without changing behavior
  faq: Solutions for common problems with sample paths when running FATE.
  avcodec: attempt to clarify the CODEC_CAP_DELAY documentation
  avcodec: fix avcodec_encode_audio() documentation.
  FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside.
  vqf: recognize more metadata chunks
  FATE test: BMV demuxer and associated video and audio decoders.
  FATE: indeo4 video decoder test.
  FATE: update xxan-wc4 test to a sample with more code coverage.
  Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream.
  g722enc: validate AVCodecContext.trellis
  g722enc: set frame_size, and also handle an odd number of input samples
  g722enc: split encoding into separate functions for trellis vs. no trellis
  mpegaudiodec: Use clearer pointer math
  tta: Fix returned error code at EOF
  ...

Conflicts:
	libavcodec/h264.c
	libavcodec/indeo3.c
	libavcodec/interplayvideo.c
	libavcodec/ivi_common.c
	libavcodec/libxvidff.c
	libavcodec/mpegvideo.c
	libavcodec/ppc/mpegvideo_altivec.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavfilter/vsrc_buffer.c
	libavformat/Makefile
	tests/fate/indeo.mak
	tests/ref/acodec/g722

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 03:34:22 +01:00
Michael Niedermayer a407baba85 g723_1: Fix "libavcodec/g723_1.c:988:8: warning: assignment from incompatible pointer type [enabled by default]"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 00:18:36 +01:00
Michael Niedermayer 53918a1c54 dca: Fix uninitialized variable warnings.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 00:18:36 +01:00
Michael Niedermayer 2d6f317d71 jpegdec: support ilv=1 grayscale jpeg-ls.
Fixes Ticket851

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 00:18:36 +01:00
Michael Niedermayer bbe25b4f3e ljpegdec: support non zero MCU for RGB. 2nd try
Fixes Ticket875
Compared to patch 1 this fixes a bright line at the right side.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-08 00:18:36 +01:00
Diego Biurrun badb195d13 cabac: Move code only used within the CABAC test program into the test program. 2012-01-07 22:13:14 +01:00
Diego Biurrun 1be4b8ccba vp56: Drop unnecessary cabac.h #include. 2012-01-07 22:13:12 +01:00
Diego Biurrun a7e3cb9d32 h264-test: Initialize AVCodecContext.av_class.
This fixes a segfault on startup.

Also remove a commented-out and completely unused variable.
2012-01-07 22:13:10 +01:00
Diego Biurrun 3dc99a18d4 cosmetics: drop some pointless parentheses 2012-01-07 22:13:07 +01:00
Justin Ruggles 3f6aa85ed4 avcodec: attempt to clarify the CODEC_CAP_DELAY documentation 2012-01-07 14:33:16 -05:00
Justin Ruggles 07837e4158 avcodec: fix avcodec_encode_audio() documentation.
the previous documentation indicated how many bytes are read from the input,
not how many samples are read.
2012-01-07 14:33:15 -05:00
Justin Ruggles cf1a259ad6 g722enc: validate AVCodecContext.trellis 2012-01-07 13:38:23 -05:00
Justin Ruggles 77c5b66cbe g722enc: set frame_size, and also handle an odd number of input samples
The fate reference is updated because the previous test skipped a sample in
each encode() call due each input frame having an odd number of samples.
2012-01-07 13:38:23 -05:00
Justin Ruggles 34093ba081 g722enc: split encoding into separate functions for trellis vs. no trellis 2012-01-07 13:38:23 -05:00
Carl Eugen Hoyos 19b945dc2a Cosmetics: Fix indentation.
Found by: Alexander Strasser
2012-01-07 19:23:21 +01:00
Vitor Sessak 96219141e2 mpegaudiodec: Use clearer pointer math
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-07 08:23:27 -08:00
Justin Ruggles 52e9854a83 tta: fix 24-bit decoding.
Decode to the correct output buffer.
2012-01-07 09:44:13 -05:00
Paul B Mahol 17aa02b9a1 interplayvideo: Handle changed video dimensions on the fly
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:38 +02:00
Martin Storsjö c5d907b6b0 libavcodec: Handle param change side data in avcodec_decode_video2, too
Also call avcodec_set_dimensions on dimension param change packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:35 +02:00
Martin Storsjö 867f923df4 libavcodec: Move apply_param_change up above avcodec_decode_video2
This is in preparation to calling it from avcodec_decode_video2.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:30 +02:00
Janne Grunau be540e0cb3 indeo3: check motion vectors for validity
Fixes null pointer dereferences in fuzzed files found by Oana Stratulat.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-07 09:41:11 +01:00
Michael Niedermayer 6a56f4e634 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  flicvideo: fix invalid reads
  vorbis: Avoid some out-of-bounds reads
  vqf: add more known extensions
  cabac: remove unused function renorm_cabac_decoder
  h264: Only use symbols from the SVQ3 decoder under proper conditionals.
  add bytestream2_tell() and bytestream2_seek() functions
  parsers: initialize MpegEncContext.slice_context_count to 1
  spdifenc: use special alignment for DTS-HD length_code

Conflicts:
	libavcodec/flicvideo.c
	libavcodec/h264.c
	libavcodec/mpeg4video_parser.c
	libavcodec/vorbis.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 02:30:27 +01:00
Michael Niedermayer b18a0cc781 indeo5: Fix null pointer dereference.
Bug found by: Oana Stratulat

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-07 00:18:42 +01:00
Michael Niedermayer 12d8340f16 ljpeg: Fix bits != 8 or 16 support
Fixes 2nd half of Ticket889

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 00:11:43 +01:00
Michael Niedermayer 5152beeba8 ljpeg: Add predictor=0 support.
Fixed first half of ticket889

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-07 00:11:43 +01:00
Laurentiu Ion b348c852aa flicvideo: fix invalid reads
Prevent invalid reads using bytestream2 functions.
Fixes bug #126.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-06 16:48:27 -05:00
Chris Evans 57cd6d7095 vorbis: Avoid some out-of-bounds reads
Fixes Bug: #190
Chromium Bug: #100543
Related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-06 19:58:22 +01:00
Diego Biurrun 3aa3fc45fe cabac: remove unused function renorm_cabac_decoder 2012-01-06 13:37:55 +01:00
Diego Biurrun 301fb92131 h264: Only use symbols from the SVQ3 decoder under proper conditionals.
Fixes --disable-everything --enable-decoder=h264 --disable-optimizations.
2012-01-06 13:37:53 +01:00
Clément Bœsch ed14b7242a timecode: more tolerant frame rate check for drop flag.
This fixes some timecode probing in MOV.
2012-01-06 12:16:06 +01:00
Justin Ruggles 6e8bf6db48 add bytestream2_tell() and bytestream2_seek() functions 2012-01-05 23:36:36 -05:00
Michael Niedermayer 3edff185ab Merge remote-tracking branch 'qatar/master'
* qatar/master: (21 commits)
  ipmovie: do not read audio packets before the codec is known
  truemotion2: check size before GetBitContext initialisation
  avio: Only do implicit network initialization for network protocols
  avio: Add an URLProtocol flag for indicating that a protocol uses network
  adpcm: ADPCM Electronic Arts has always two channels
  matroskadec: Fix a bug where a pointer was cached to an array that might later move due to a realloc()
  fate: Add missing reference file from 9b4767e4.
  mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.
  4xm: Prevent buffer overreads.
  mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan
  vp3: add fate test for non-zero last coefficient
  vp3: fix streams with non-zero last coefficient
  swscale: remove unused U/V arguments from yuv2rgb_write().
  timer: K&R formatting cosmetics
  lavf: cosmetics, reformat av_read_frame().
  lavf: refactor av_read_frame() to make it easier to understand.
  Report an error if pitch_lag is zero in AMR-NB decoder.
  Revert "4xm: Prevent buffer overreads."
  4xm: Prevent buffer overreads.
  4xm: pass the correct remaining buffer size to decode_i2_frame().
  ...

Conflicts:
	libavcodec/4xm.c
	libavcodec/mjpegdec.c
	libavcodec/truemotion2.c
	libavformat/ipmovie.c
	libavformat/mov_chan.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-06 02:45:12 +01:00
Janne Grunau f907615f08 parsers: initialize MpegEncContext.slice_context_count to 1
The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly)
a MpegEncContext in their private context. Since they do not call the
common mpegvideo init function slice_context_count has explicitly set
to 1.
Prevents a null pointer dereference in the h264 parser and fixes
bug 193.
2012-01-06 01:47:45 +01:00
James Zern 95afa0a573 libvpxenc: restore vp8flags for compatibility
removed in 98df93c, this makes the documentation correct again.

Found-by:  j@v2v.cc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-06 01:46:51 +01:00
Michael Niedermayer c88f0b728c tta: Fix regression of 24bit decoding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-06 01:46:51 +01:00
Michael Niedermayer c4f237a981 Revert commit 599b4c6efd
Author: Mans Rullgard <mans@mansr.com>
	Date:   Sun Dec 11 21:41:59 2011 +0000

    	x86: cabac: replace explicit memory references with "m" operands

    	This replaces the explicit offset(reg) memory references with
    	"m" operands for the same locations.  As a result, one fewer
    	register operand is needed for these inline asm statements.

This change appears to have broken compilation on darwin, and subsequent
fixes by martin (which did not fix compilation) removed the register
advantage, thus this change seems not a good idea to keep.
See: http://fate.ffmpeg.org/log.cgi?time=20120103122446&log=compile&slot=i386-darwin-llvm-gcc-4.2.1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-06 01:46:51 +01:00
Carl Eugen Hoyos e9a591d1f0 Fix compilation with --disable-everything --enable-demuxer=mov. 2012-01-06 01:40:34 +01:00
ami_stuff febf75f3d2 pam: Reject 64bpp rgba.
Fixes ticket #883
2012-01-06 01:25:54 +01:00
Carl Eugen Hoyos 09f25a9cb0 Allow decoding of uyvy422 CYUV with -vcodec rawvideo.
FourCC CYUV can be Creative YUV and uyvy422 rawvideo.
2012-01-06 00:59:08 +01:00
Carl Eugen Hoyos d185278c36 Support decoding of some unusual jpeg samples.
Avoid unsupported pix_fmts by upscaling chroma.

Fixes ticket #878.
2012-01-06 00:51:31 +01:00
Janne Grunau 696ace50ea truemotion2: check size before GetBitContext initialisation
Prevents null ptr derefence for negative sizes.
2012-01-05 23:19:13 +01:00
Janne Grunau bb5b3940b0 adpcm: ADPCM Electronic Arts has always two channels 2012-01-05 22:29:18 +01:00
Reimar Döffinger 4278023240 Check for overread in vqa video decoder.
This issue was discovered while decoding the FATE sample vqa/ws_snd.vqa.
For some unknown reason only audio decoding is tested by FATE for that file,
but not video.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-05 22:24:51 +01:00
Reimar Döffinger 1d0d63052b sipr: fall back to setting mode based on bit_rate.
Not all applications (e.g. MPlayer) set block_align, and
when using a different demuxer it might not even be
easily available.
So fall back to selecting mode based on bit rate as before
if block_align has not useful value.
It can't be worse than failing to decode completely.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2012-01-05 22:24:51 +01:00
Clément Bœsch 2aa7375a98 timecode: add avpriv_check_timecode_rate(). 2012-01-05 20:59:52 +01:00
ami_stuff a44b63f6c8 Support 48bpp pam decoding.
Fixes ticket #882.
2012-01-05 20:58:24 +01:00
ami_stuff 871e2f4fac Support 16bpp grayscale pam decoding.
Fixes ticket #881.
2012-01-05 20:57:49 +01:00
Michael Niedermayer 02026d08a9 libvpxenc: Remove duplicate AVOption constants.
Found-by:  j@v2v.cc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 20:37:47 +01:00
Aneesh Dogra 9b55b4bb3a 4xm: Prevent buffer overreads.
4xm decoder while decoding i2 frames can overread the buffer if proper checks
are not made.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-05 09:37:16 -08:00