Commit Graph

1216 Commits

Author SHA1 Message Date
Zhong Li
fd7cb86468 mpegdec: fix redundant dummy frames issue of interlaced clips
It is to fix https://trac.ffmpeg.org/ticket/6677. Actucally it is a
regression of commit 99e07a4453 which
always inserts a dummy frame when decode the first key field picture.

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-04 02:16:11 +02:00
James Almer
8a0954dd51 avcodec: add missing FF_API_DEBUG_MV wrappers
Signed-off-by: James Almer <jamrial@gmail.com>
2017-08-25 13:44:52 -03:00
Michael Niedermayer
70a7df049c avcodec/mpegvideo: Use intra_scantable in dct_unquantize_h263_intra_c()
Reviewed-by: James Darnley <jdarnley@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-21 02:25:23 +02:00
Michael Niedermayer
f670c13f13 avcodec: Rename ff_mpv_decode_mb() to ff_mpv_reconstruct_mb
The new name more accuratly describes what the function does

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-19 17:54:40 +02:00
Michael Niedermayer
2c9106257f avcodec/mpeg4videodec: Workaround interlaced mpeg4 edge MC bug
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-17 12:21:48 +01:00
Michael Niedermayer
85407c7e63 avcodec/mpegvideo: Fix edge emu buffer overlap with interlaced mpeg4
Fixes Ticket5936
Regression since c5fc8ae126

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-17 12:21:48 +01:00
Adriano Pallavicino
6089c44a2a Fix build warnings due to misleading indentation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 17:44:10 +01:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Clément Bœsch
d98ca4b14c Merge commit '99c554efc8b09c3f1bb2fb41c3da5431085f7470'
* commit '99c554efc8b09c3f1bb2fb41c3da5431085f7470':
  h264: eliminate low_delay

ff_print_debug_info2() is adjusted to allow a NULL pointer as low_delay.
It's only useful for MPEG codecs with the exception of H264.

Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-20 11:47:40 +02:00
Michael Niedermayer
24f5136196 avcodec/mpegvideo: Do not clear the parse context during init
It is allocated before, this cannot work
Fixes Ticket5613

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-10 15:54:20 +02:00
Michael Niedermayer
39c0b22df4 avcodec/mpegvideo: Deallocate last/next picture earlier
Fixes regression with mplayers direct rendering and reduces buffer count
pressure in some cases

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-05 02:08:54 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Lou Logan
06eef96b69 fix some a/an typos
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-03-28 14:13:17 -08:00
Luca Barbato
7d4a1ff344 mpegvideo: Fix undefined negative shifts in ff_init_block_index
Found-by: gcc5-ubsan.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-05 08:26:36 -05:00
Derek Buitenhuis
b986a4625d Merge commit '1482aff2048511b821ff9feac19426113cc641a2'
* commit '1482aff2048511b821ff9feac19426113cc641a2':
  lavc: Move noise_reduction to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-28 16:42:32 +00:00
Derek Buitenhuis
13be46c08e Merge commit '0ac9f33a9e69c64eee592791be3c5441a6a3d6b7'
* commit '0ac9f33a9e69c64eee592791be3c5441a6a3d6b7':
  lavc: Move frame_skip_* to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-28 15:08:10 +00:00
Derek Buitenhuis
21f9468402 avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:36:46 +00:00
Vittorio Giovara
1482aff204 lavc: Move noise_reduction to codec private options
This option is only used by mpegvideoenc, x264, xavs, and vpx.
It is a very codec-specific option, so deprecate the global variant.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Clément Bœsch
56bdf61baa avutil/motion_vector: export subpel motion information
FATE test changes because of the switch from shift to division.
2015-11-23 10:55:15 +01:00
Andreas Cadhalpun
6a69a175e7 mpegvideo: clear overread in clear_context
Otherwise the h263p decoder can try to copy overread bytes, even though
buffer is NULL.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-15 10:26:48 +01:00
Ganesh Ajjanagadde
c5fa42c69a avcodec/mpegvideo: use predefined M_PI
M_PI is defined in math.h, or in avutil/mathematics.h for compatibility
hacks. This uses this value instead of an ad-hoc floating literal.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-14 10:58:39 -05:00
Michael Niedermayer
58fe57d5a0 avcodec/mpeg12enc: Basic support for encoding non even QPs for -non_linear_quant 1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 02:52:57 +02:00
Michael Niedermayer
2d35757814 avcodec/mpegvideo: Change mpeg2 unquant to work with higher precission qscale
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-18 02:39:17 +02:00
Hendrik Leppkes
1789e46d34 Merge commit '5a1a9da8a7ae120f2543b8f2fa13dc8baac39f17'
* commit '5a1a9da8a7ae120f2543b8f2fa13dc8baac39f17':
  mpegvideo: Drop a stray error message

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-07 16:08:42 +02:00
Luca Barbato
5a1a9da8a7 mpegvideo: Drop a stray error message
The condition is not a failure.
2015-09-03 13:39:34 +02:00
Ronald S. Bultje
030b5a4f77 lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU. 2015-08-18 15:57:19 -04:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* commit '059a934806d61f7af9ab3fd9f74994b838ea5eba':
  lavc: Consistently prefix input buffer defines

Conflicts:
	doc/examples/decoding_encoding.c
	libavcodec/4xm.c
	libavcodec/aac_adtstoasc_bsf.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.h
	libavcodec/asvenc.c
	libavcodec/avcodec.h
	libavcodec/avpacket.c
	libavcodec/dvdec.c
	libavcodec/ffv1enc.c
	libavcodec/g2meet.c
	libavcodec/gif.c
	libavcodec/h264.c
	libavcodec/h264_mp4toannexb_bsf.c
	libavcodec/huffyuvdec.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libxvid.c
	libavcodec/mdec.c
	libavcodec/motionpixels.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/noise_bsf.c
	libavcodec/nuv.c
	libavcodec/nvenc.c
	libavcodec/options.c
	libavcodec/parser.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/qsvdec.c
	libavcodec/svq1enc.c
	libavcodec/tiffenc.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/vc1dec.c
	libavcodec/wmalosslessdec.c
	libavformat/adxdec.c
	libavformat/aiffdec.c
	libavformat/apc.c
	libavformat/apetag.c
	libavformat/avidec.c
	libavformat/bink.c
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/id3v2.c
	libavformat/isom.c
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mpc.c
	libavformat/mpc8.c
	libavformat/mpegts.c
	libavformat/mvi.c
	libavformat/mxfdec.c
	libavformat/mxg.c
	libavformat/nutdec.c
	libavformat/oggdec.c
	libavformat/oggparsecelt.c
	libavformat/oggparseflac.c
	libavformat/oggparseopus.c
	libavformat/oggparsespeex.c
	libavformat/omadec.c
	libavformat/rawdec.c
	libavformat/riffdec.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_qdm2.c
	libavformat/rtpdec_svq3.c
	libavformat/sierravmd.c
	libavformat/smacker.c
	libavformat/smush.c
	libavformat/spdifenc.c
	libavformat/takdec.c
	libavformat/tta.c
	libavformat/utils.c
	libavformat/vqf.c
	libavformat/westwood_vqa.c
	libavformat/xmv.c
	libavformat/xwma.c
	libavformat/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:15:19 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615':
  lavc: AV-prefix all codec flags

Conflicts:
	doc/examples/muxing.c
	ffmpeg.c
	ffmpeg_opt.c
	ffplay.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/ac3enc_float.c
	libavcodec/atrac1.c
	libavcodec/atrac3.c
	libavcodec/atrac3plusdec.c
	libavcodec/dcadec.c
	libavcodec/ffv1enc.c
	libavcodec/h264.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_mb.c
	libavcodec/imc.c
	libavcodec/libmp3lame.c
	libavcodec/libtheoraenc.c
	libavcodec/libtwolame.c
	libavcodec/libvpxenc.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegaudiodec_template.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/nellymoserdec.c
	libavcodec/nellymoserenc.c
	libavcodec/nvenc.c
	libavcodec/on2avc.c
	libavcodec/options_table.h
	libavcodec/opus_celt.c
	libavcodec/pngenc.c
	libavcodec/ra288.c
	libavcodec/ratecontrol.c
	libavcodec/twinvq.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c
	libavcodec/vorbisdec.c
	libavcodec/vp3.c
	libavcodec/wma.c
	libavcodec/wmaprodec.c
	libavcodec/x86/hpeldsp_init.c
	libavcodec/x86/me_cmp_init.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:10:35 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
4bde1a4a37 avcodec/mpegvideo: Fix null pointer dereference of picture array
Fixes: 0d0a2bace067d09c08f0fa5340496c23_signal_sigsegv_7ffff713351a_342_WobblyWindowsIntro.avi with memlimit of 67108864

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-14 00:31:57 +02:00
Michael Niedermayer
cc0380222a avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()
Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 1048576 alloc limit

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-13 19:26:37 +02:00
Michael Niedermayer
b160fc290c avcodec/mpegvideo: Clear pointers in ff_mpv_common_init()
This ensures that no stale pointers leak through on any path

Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-09 22:47:16 +02:00
Shivraj Patil
2eb28e889d avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for mpegvideo functions
This patch adds MSA (MIPS-SIMD-Arch) optimizations for mpegvideo functions in new file mpegvideo_msa.c

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-01 17:32:47 +02:00
Michael Niedermayer
58f63670e1 Merge commit '8b5007a31b8d1ddbe3661bf45a732336450b7d25'
* commit '8b5007a31b8d1ddbe3661bf45a732336450b7d25':
  mpegvideo: Move ER functions to a separate file

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 20:47:14 +02:00
Vittorio Giovara
8b5007a31b mpegvideo: Move ER functions to a separate file 2015-06-12 11:57:26 +01:00
Michael Niedermayer
11f86ec204 Merge commit 'c0e6b8cab874db97b6818007bc86507c8d213083'
* commit 'c0e6b8cab874db97b6818007bc86507c8d213083':
  mpegvideo: Mark one function as static

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 21:07:59 +02:00
Michael Niedermayer
21d8e2c0b5 Merge commit 'd1dd0d404c085f4fce7b8358b4aea677761c5d88'
* commit 'd1dd0d404c085f4fce7b8358b4aea677761c5d88':
  mpegvideo: Move block permutation function where is used

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 20:58:32 +02:00
Michael Niedermayer
d784d6b7ed Merge commit 'c6aa0554b0c3e31fec4580b68ea85b66966cd381'
* commit 'c6aa0554b0c3e31fec4580b68ea85b66966cd381':
  mpegvideo: Drop release_unused_pictures() function

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 20:50:36 +02:00
Michael Niedermayer
88679aeb08 Merge commit '7061bf0925a7d6c5899bbe710b2b8cdae9005274'
* commit '7061bf0925a7d6c5899bbe710b2b8cdae9005274':
  mpegvideo: Move Picture-related functions to a separate file

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 20:41:36 +02:00
Vittorio Giovara
c0e6b8cab8 mpegvideo: Mark one function as static 2015-06-10 14:06:44 +01:00
Vittorio Giovara
d1dd0d404c mpegvideo: Move block permutation function where is used
Mark it as static.
2015-06-10 14:06:23 +01:00
Vittorio Giovara
c6aa0554b0 mpegvideo: Drop release_unused_pictures() function
It is only used in one place, and it is small enough that it might be
called directly.
2015-06-10 14:05:53 +01:00
Vittorio Giovara
7061bf0925 mpegvideo: Move Picture-related functions to a separate file 2015-06-10 14:05:32 +01:00
Michael Niedermayer
3244a17650 Merge commit '9bb11be0e5a75782c3139ad058c2b571499aa37d'
* commit '9bb11be0e5a75782c3139ad058c2b571499aa37d':
  mpegvideo: Split picture allocation for encoding and decoding

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:49:26 +02:00
Michael Niedermayer
e05fda99f7 Merge commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a'
* commit 'f8716a1408f4f4ec63857b7015fbd62f9eac344a':
  mpegvideo: Rework frame_size_alloc function

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:16:36 +02:00
Michael Niedermayer
db8ae37a78 Merge commit 'da0c8664b4dc906696803685f7e53ade68594ab8'
* commit 'da0c8664b4dc906696803685f7e53ade68594ab8':
  mpegvideo: Move various temporary buffers to a separate context

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/rv34.c
	libavcodec/vc1_mc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 21:05:12 +02:00
Vittorio Giovara
9bb11be0e5 mpegvideo: Split picture allocation for encoding and decoding
The main ff_alloc_picture() function is made more generic with all the
parameters necessary as arguments. This will allows to move most of the
related functions to a separate file later.

Right now wrappers are provided to try and minimize the number of
changes in the code.
2015-06-08 12:39:42 +01:00
Vittorio Giovara
f8716a1408 mpegvideo: Rework frame_size_alloc function
Use more generic arguments and remove its static attribute since it will
be moved to a separate file.
2015-06-08 12:39:42 +01:00