Commit Graph

910 Commits

Author SHA1 Message Date
Michael Niedermayer f5c0b9aa6f Merge commit '96753bd00d6d4046db6818c0aadc21bf2a11d77b'
* commit '96753bd00d6d4046db6818c0aadc21bf2a11d77b':
  dsputil: x86: Correct the number of registers used in put_no_rnd_pixels16_l2
  dsputil: add missing HAVE_YASM guard
  hwaccel: do not offer unsupported pixel formats
  vdpau: add missing pixel format for H.264

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-27 16:30:01 +01:00
Rémi Denis-Courmont 78bc4d69eb hwaccel: do not offer unsupported pixel formats
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-27 07:03:22 +01:00
Michael Niedermayer ac8987591f Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'
* commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f':
  Drop DCTELEM typedef

Conflicts:
	libavcodec/alpha/dsputil_alpha.h
	libavcodec/alpha/motion_est_alpha.c
	libavcodec/arm/dsputil_init_armv6.c
	libavcodec/bfin/dsputil_bfin.h
	libavcodec/bfin/pixels_bfin.S
	libavcodec/cavs.c
	libavcodec/cavsdec.c
	libavcodec/dct-test.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/dsputil_template.c
	libavcodec/eamad.c
	libavcodec/h264_cavlc.c
	libavcodec/h264idct_template.c
	libavcodec/mpeg12.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/ppc/dsputil_altivec.c
	libavcodec/proresdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 17:44:56 +01:00
Diego Biurrun 88bd7fdc82 Drop DCTELEM typedef
It does not help as an abstraction and adds dsputil dependencies.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2013-01-22 18:32:56 -08:00
Michael Niedermayer cf061a9c3b Merge commit 'aeaf268e52fc11c1f64914a319e0edddf1346d6a'
* commit 'aeaf268e52fc11c1f64914a319e0edddf1346d6a':
  vp3: integrate clear_blocks with idct of previous block.
  mpegvideo: fix loop condition in draw_line()
  dvdsubdec: parse the size from the extradata

Conflicts:
	libavcodec/dvdsubdec.c
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 13:57:10 +01:00
Xi Wang 992b031838 mpegvideo: fix loop condition in draw_line()
The loop condition `x = ex' is incorrect.  It should be `x <= ex'.

This bug was introduced in commit c65dfac4 "mpegvideo.c: K&R formatting
and cosmetics."

CC:libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-19 22:20:43 +01:00
Michael Niedermayer e1d7d4bd13 mpegvideo: reset context state on failed thread update.
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-17 23:43:35 +01:00
Michael Niedermayer 8ac8f04993 mpegvideo: Fix long standing race condition with frame threads
Since resolution change support this also was exploitable, which is
how it was found.

Fixes read after free and out of array reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-15 05:34:37 +01:00
Michael Niedermayer 41bdef1d39 Merge commit '200e8ac92007bc2fe30da05d3bd00ab620842a6b'
* commit '200e8ac92007bc2fe30da05d3bd00ab620842a6b':
  vdpau: Add MPEG-4 decoding via hwaccel infrastructure
  vdpau: Add MPEG-1/2 decoding via hwaccel infrastructure

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-14 13:48:30 +01:00
Rémi Denis-Courmont aaf9d0e8f3 vdpau: Add MPEG-1/2 decoding via hwaccel infrastructure
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-13 14:53:47 +01:00
Michael Niedermayer d9226b3717 mpegvideo: dont leave stale pointers in next/last picture
Fixes out of array reads

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-12 04:46:08 +01:00
Michael Niedermayer 39d178806d Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: initialize videodsp with correct pixel depth

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-26 15:19:35 +01:00
Janne Grunau 1f4ea4e068 mpegvideo: initialize videodsp with correct pixel depth
Fixes decoding of 9/10 bit per pixel h264 videos as reported in
https://bugzilla.libav.org/show_bug.cgi?id=404 .
2012-12-26 00:24:21 +01:00
Michael Niedermayer a41bf09d9c Merge commit '6906b19346ae8a330bfaa1c16ce535be10789723'
* commit '6906b19346ae8a330bfaa1c16ce535be10789723':
  lavc: add missing files for arm
  lavc: introduce VideoDSPContext

Conflicts:
	configure
	libavcodec/arm/dsputil_init_armv5te.c
	libavcodec/dsputil.c
	libavcodec/dsputil.h
	libavcodec/dsputil_template.c
	libavcodec/h264.c
	libavcodec/mpegvideo.h
	libavcodec/mpegvideo_enc.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-21 17:18:43 +01:00
Ronald S. Bultje 8c53d39e7f lavc: introduce VideoDSPContext
Move some functions from dsputil. The idea is that videodsp contains
functions that are useful for a large and varied set of video decoders.
Currently, it contains emulated_edge_mc() and prefetch().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-12-20 13:40:45 +01:00
Michael Niedermayer 73db0bf1b0 mpegvideo: increase scratchpad sizes
These where reduced in f1d8763a02
and this change can cause out of array accesses.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-20 03:58:13 +01:00
Michael Niedermayer 7e90053822 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: increase edge_emu_buffer size for VC1
  lavc: merge latest x86inc.asm fixes with x264

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-20 02:51:35 +01:00
Michael Niedermayer 642a655f7d Merge commit 'f1d8763a02b5fce9a7d9789e049d74a45b15e1e8'
* commit 'f1d8763a02b5fce9a7d9789e049d74a45b15e1e8':
  mpegvideo: allocate scratch buffers after linesize is known

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-19 15:44:59 +01:00
Janne Grunau 45635885e4 mpegvideo: increase edge_emu_buffer size for VC1
The VC1 decoder uses edge_emu_buffer simultaneously for luma and chroma
and needs more space. That was not a problem before f1d8763a02
since the size for edge_emu_buffer was always calculated with 2 byte per
pixel since the linesize was not known.

Fixes occasionally fate errors in vc1_sa10143.
2012-12-19 07:57:22 +01:00
Janne Grunau f1d8763a02 mpegvideo: allocate scratch buffers after linesize is known
Since we can't know which stride a custom get_buffer() implementation is
going to use we have to allocate this scratch buffers after the linesize
is known. It was pretty safe for 8 bit per pixel pixel formats since we
always allocated memory for up to 16 bits per pixel. It broke hoever
with cmdutis.c's alloc_buffer() and high pixel bit depth since it
allocated larger edges than mpegvideo expected.

Fixes fuzzed sample nasa-8s2.ts_s244342.
2012-12-18 19:48:30 +01:00
Michael Niedermayer 2f265d9087 Merge commit '6a27ae28f9bde981e85c82cf5bf42c5f43fb6f13'
* commit '6a27ae28f9bde981e85c82cf5bf42c5f43fb6f13':
  mpegvideo: treat delayed pictures as used

Conflicts:
	libavcodec/h264.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-14 15:36:37 +01:00
Janne Grunau 6a27ae28f9 mpegvideo: treat delayed pictures as used
This requires to move the avcodec_default_free_buffers() call to
ff_MPV_common_end() since otherwise delayed pictures would get freed
during a size change.
2012-12-13 21:02:42 +01:00
Michael Niedermayer 78ac7ee970 Merge commit '5d471b73d20616f5ac701ff62e5de49465cda264'
* commit '5d471b73d20616f5ac701ff62e5de49465cda264':
  rtpdec: K&R formatting and spelling cosmetics
  cosmetics: Fix dropable --> droppable typo

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-10 01:27:10 +01:00
Diego Biurrun ba0c898120 cosmetics: Fix dropable --> droppable typo 2012-12-09 13:36:11 +01:00
Michael Niedermayer b023392f34 mpegvideo: remove #if/define PARANOID code
This code never did anything as far as i can remember

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-05 19:31:27 +01:00
Michael Niedermayer 4063bb212e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264: set Picture.owner2 to the current thread

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-27 14:36:53 +01:00
Janne Grunau d5e83122bd h264: set Picture.owner2 to the current thread
This does not seem to have an effect currently. Fate-h264 passes with
THREADS=1..16 and both threading types as before. It fixes however a
segfault during error resilience with my adaptive-frame-mt patchset.
A picture in use during error resilience gets realloced in another
thread in the fuzzed sample sample_varPAR.avi_s226019.
2012-11-27 12:26:33 +01:00
Michael Niedermayer 1a947dfa83 ff_mpeg_update_thread_context: assert context unequality
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-18 16:47:29 +01:00
Michael Niedermayer e13d5e9a4b Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2'
* commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2':
  x86: h264_weight_10bit: port to cpuflags
  libtheoraenc: add missing pixdesc.h header
  avcodec: remove ff_is_hwaccel_pix_fmt
  pixdesc: add av_pix_fmt_get_chroma_sub_sample
  hlsenc: stand alone hls segmenter

Conflicts:
	doc/muxers.texi
	libavcodec/ffv1enc.c
	libavcodec/imgconvert.c
	libavcodec/mpegvideo_enc.c
	libavcodec/tiffenc.c
	libavformat/Makefile
	libavformat/allformats.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-11-14 11:59:20 +01:00
Luca Barbato c1a02e884a pixdesc: add av_pix_fmt_get_chroma_sub_sample
Deprecate avcodec_get_chroma_sub_sample.
2012-11-13 16:14:55 +01:00
Michael Niedermayer d312ffdd79 mpegvideo: fix lowres on field pictures
Fixes Ticket1846

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-25 04:03:58 +02:00
Michael Niedermayer 04c6ecb7da Merge commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed'
* commit 'c9ef43215c7d68c2cdcdbe02287aa114f27a32ed':
  fate-vc1: add dependencies
  ARM: fix overreads in neon h264 chroma mc
  rtsp: Make sure the ret variable is initialized in ff_rtsp_fetch_packet
  gitignore: ignore files created by msvc
  fate: Add proper dependencies for the tests in video.mak
  configure: Disable Snow decoder and encoder by default
  lzo: Drop obsolete fast_memcpy reference
  build: Drop OBJS declaration for non-existing PCM_DVD encoder
  mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all

Conflicts:
	libavcodec/mpegvideo.c
	libavformat/rtsp.c
	tests/fate/microsoft.mak
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-20 12:37:52 +02:00
Michael Niedermayer 6bcdfe48d0 mpeg4videodec: Disable frame multithreading for GMC, its not implemented at all
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-19 15:42:35 +03:00
Michael Niedermayer 20ec0d2a75 mpegvideo: fix motion_val checks
Fixes CID604124
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:08:53 +02:00
Michael Niedermayer f4d73f0fb5 mpegvideo: check return value of ff_MPV_common_init()
Fixes CID703621
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-14 00:08:44 +02:00
Michael Niedermayer 18884f159b Merge commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723'
* commit '0a7005bebd23ade7bb852bce0401af1a8fdbb723':
  rtpdec_xiph: fix function return type
  smjpeg: fix type of 'ret' variable in smjpeg_read_packet()
  mpegvideo: remove write-only variable
  Use proper return values in case of missing features
  fate: add avstring test
  rangecoder-test: Set error message log level to error, instead of debug

Conflicts:
	libavcodec/aacdec.c
	libavcodec/amrnbdec.c
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 15:42:49 +02:00
Michael Niedermayer 85fe70b64c Merge commit 'ca411fc1d34329cd17b28627f697e391ae52073f'
* commit 'ca411fc1d34329cd17b28627f697e391ae52073f':
  avcodec: Remove broken MMI optimizations

Conflicts:
	arch.mak
	configure
	libavcodec/avcodec.h
	libavcodec/mips/Makefile
	libavcodec/mips/dsputil_mmi.c
	libavcodec/mips/idct_mmi.c
	libavcodec/mips/mmi.h
	libavcodec/mips/mpegvideo_mmi.c
	libavcodec/options_table.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-13 15:25:11 +02:00
Mans Rullgard 7e76fc528d mpegvideo: remove write-only variable
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-12 22:21:10 +01:00
Michael Niedermayer 5e885275f1 mpeg4videodec: disable frame multithreading for GMC, its not implemented at all
This fixes race conditions in decoding MPEG-4 GMC files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 22:53:22 +02:00
Diego Biurrun ca411fc1d3 avcodec: Remove broken MMI optimizations
The code fails to compile and is broken beyond repair.
2012-10-12 20:56:54 +02:00
Michael Niedermayer af7dd79a32 Merge commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5'
* commit '50ba57e0ce63d9904269ea0728936a0c79f8bfb5':
  lavc: do not use av_pix_fmt_descriptors directly.

Conflicts:
	libavcodec/imgconvert.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/mpegvideo.c
	libavcodec/rawdec.c
	libavcodec/rawenc.c
	libavcodec/tiffenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 16:48:26 +02:00
Michael Niedermayer e335658370 Merge commit '9734b8ba56d05e970c353dfd5baafa43fdb08024'
* commit '9734b8ba56d05e970c353dfd5baafa43fdb08024':
  Move avutil tables only used in libavcodec to libavcodec.

Conflicts:
	libavcodec/mathtables.c
	libavutil/intmath.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-12 14:26:46 +02:00
Anton Khirnov 50ba57e0ce lavc: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:39 +02:00
Anton Khirnov 9953ff3cd8 mpegvideo: fix indentation 2012-10-12 12:45:38 +02:00
Diego Biurrun 9734b8ba56 Move avutil tables only used in libavcodec to libavcodec. 2012-10-11 18:29:36 +02:00
Michael Niedermayer ac627b3d38 Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
  Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat

Conflicts:
	doc/examples/muxing.c
	ffmpeg.h
	ffmpeg_filter.c
	ffmpeg_opt.c
	ffplay.c
	ffprobe.c
	libavcodec/8bps.c
	libavcodec/aasc.c
	libavcodec/aura.c
	libavcodec/avcodec.h
	libavcodec/avs.c
	libavcodec/bfi.c
	libavcodec/bmp.c
	libavcodec/bmpenc.c
	libavcodec/c93.c
	libavcodec/cscd.c
	libavcodec/cyuv.c
	libavcodec/dpx.c
	libavcodec/dpxenc.c
	libavcodec/eatgv.c
	libavcodec/escape124.c
	libavcodec/ffv1.c
	libavcodec/flashsv.c
	libavcodec/fraps.c
	libavcodec/h264.c
	libavcodec/huffyuv.c
	libavcodec/iff.c
	libavcodec/imgconvert.c
	libavcodec/indeo3.c
	libavcodec/kmvc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libx264.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegdec.c
	libavcodec/mjpegenc.c
	libavcodec/motionpixels.c
	libavcodec/mpeg12.c
	libavcodec/mpeg12enc.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/pamenc.c
	libavcodec/pcxenc.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/pnm.c
	libavcodec/pnmdec.c
	libavcodec/pnmenc.c
	libavcodec/ptx.c
	libavcodec/qdrw.c
	libavcodec/qpeg.c
	libavcodec/qtrleenc.c
	libavcodec/raw.c
	libavcodec/rawdec.c
	libavcodec/rl2.c
	libavcodec/sgidec.c
	libavcodec/sgienc.c
	libavcodec/snowdec.c
	libavcodec/snowenc.c
	libavcodec/sunrast.c
	libavcodec/targa.c
	libavcodec/targaenc.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/tmv.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/vb.c
	libavcodec/vp3.c
	libavcodec/wnv1.c
	libavcodec/xl.c
	libavcodec/xwddec.c
	libavcodec/xwdenc.c
	libavcodec/yop.c
	libavdevice/v4l2.c
	libavdevice/x11grab.c
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/drawutils.c
	libavfilter/formats.c
	libavfilter/src_movie.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_format.c
	libavfilter/vf_hflip.c
	libavfilter/vf_lut.c
	libavfilter/vf_overlay.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavfilter/vf_transpose.c
	libavfilter/vf_yadif.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/movenc.c
	libavformat/mxf.h
	libavformat/utils.c
	libavformat/yuv4mpeg.c
	libavutil/imgutils.c
	libavutil/pixdesc.c
	libswscale/input.c
	libswscale/output.c
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c
	libswscale/utils.c
	libswscale/x86/swscale_template.c
	libswscale/x86/yuv2rgb.c
	libswscale/x86/yuv2rgb_template.c
	libswscale/yuv2rgb.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-08 21:06:57 +02:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Michael Niedermayer 0f1446a4d0 Merge commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b'
* commit 'ab35ec29a4071871934856c00da7d6ebcc0c095b':
  vf_overlay: get rid of pointless messing with timebase.
  samplefmt: make av_samples_alloc() initialize the data to silence.
  libspeexdec: handle NULL return value from speex_packet_to_header()
  h264probe: Don't error out on bits that no longer are reserved
  mpegvideo: set extended_data in ff_update_duplicate_context()
  libspeexdec: properly handle DTX for multiple frames-per-packet
  libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used
  libspeexdec: simplify setting of frame_size
  libspeexdec: set channel_layout

Conflicts:
	libavfilter/vf_overlay.c
	libavformat/h264dec.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-04 13:11:45 +02:00
Janne Grunau 1481e19825 mpegvideo: set extended_data in ff_update_duplicate_context()
AVFrame.extended_data has to reset to the AVFrame.data of the current
thread context after copying the frame contents.
Fixes crashes with frame-threading after 2bc0de3858.
2012-10-03 22:08:49 +02:00
Michael Niedermayer 31ab1575e5 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avcodec: Convert some commented-out printf/av_log instances to av_dlog
  avcodec: Drop silly and/or broken printf debug output
  avcodec: Drop some silly commented-out av_log() invocations
  avformat: Convert some commented-out printf/av_log instances to av_dlog
  avformat: Remove non-compiling and/or silly commented-out printf/av_log statements
  Remove some silly disabled code.
  ac3dec: ensure get_buffer() gets a buffer for the correct number of channels

Conflicts:
	libavcodec/dnxhddec.c
	libavcodec/ffv1.c
	libavcodec/h264.c
	libavcodec/h264_parser.c
	libavcodec/mjpegdec.c
	libavcodec/motion_est_template.c
	libavcodec/mpegaudiodec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/put_bits.h
	libavcodec/ratecontrol.c
	libavcodec/wmaenc.c
	libavdevice/timefilter.c
	libavformat/asfdec.c
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/flvenc.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-10-01 16:12:38 +02:00