Commit Graph

117 Commits

Author SHA1 Message Date
Martin Vignali
cbbec68847 libavcodec/blockdsp : add AVX version
Also modify the required alignment, to 32 instead of 16
for several codecs

Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-03 19:47:37 -03:00
Michael Niedermayer
12c3e120fe avcodec/ituh263dec: Use 0xffff as error code in h263p_decode_umotion()
This matches ff_h263_decode_motion() both functions error codes are interpreted by the same common code

Fixes: 690/clusterfuzz-testcase-4744944981901312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-02 03:16:12 +01:00
Michael Niedermayer
0716bcce5b avcodec/ituh263dec: Check for the bitstream end in ff_h263_decode_mb()
Fixes invalid shift

Fixes: 670/clusterfuzz-testcase-4852021066727424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-26 17:16:22 +01:00
Michael Niedermayer
0d85c7bb5a avcodec/ituh263dec: Fix runtime error: left shift of 1342177279 by 1 places cannot be represented in type 'int'
Fixes: 659/clusterfuzz-testcase-5866673603084288

Huge DMV could be created by an encoder ignoring the spec

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-24 00:38:45 +01:00
Michael Niedermayer
631f748491 avcodec/ituh263dec: Fix runtime error: left shift of negative value -22
Fixes: 639/clusterfuzz-testcase-5143866241974272

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-21 19:05:04 +01:00
Michael Niedermayer
b7d9b4a1f1 avcodec/ituh263dec: Check cbpy in ff_h263_decode_mb()
Fixes: 618/clusterfuzz-testcase-6594990333493248

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-20 00:49:44 +01:00
Michael Niedermayer
39afd0482f avcodec/ituh263dec: Implement U263s interpretation of H.263 B frames
Fixes Ticket1536

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-03 03:33:37 +01:00
Michael Niedermayer
0126cd95cc avcodec/ituh263dec: Correct timestamp recovery for B frames
Improves u263_b-frames_5.avi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 22:01:34 +01:00
Michael Niedermayer
901c625494 avcodec/ituh263dec: Use correct error codes in ff_h263_decode_mb()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 19:09:27 +01:00
Michael Niedermayer
e00c516d1e avcodec/ituh263dec: Correct indention
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 19:09:27 +01:00
Michael Niedermayer
b28ae1e09b avcodec/ituh263dec: Implement B frame support with UMV
Fixes: u263_b-frames_1.avi
Fixes part of Ticket1536

return -1 is used here as it is used in similar code in this function, I intend
to replace it by proper error codes in the whole function.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-01 17:35:54 +01:00
Michael Niedermayer
2baf36caed avcodec/ituh263dec: Avoid spending a long time in slice sync
Fixes: 177/fuzz-3-ffmpeg_VIDEO_AV_CODEC_ID_FLV1_fuzzer

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-15 18:27:31 +01:00
Clément Bœsch
6c98398b0b lavc/get_bits: add a logging context to check_marker()
Based on d338abb664
2016-06-22 20:07:49 +02: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
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
Michael Niedermayer
2a227fe879 Merge commit '0a49a62f998747cfa564d98d36a459fe70d3299b'
* commit '0a49a62f998747cfa564d98d36a459fe70d3299b':
  h263: Always check both dimensions

Conflicts:
	libavcodec/ituh263dec.c

See: 62006b539d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-30 22:14:25 +02:00
Michael Niedermayer
5585da7c5e Merge commit '6f4cd33efb5a9ec75db1677d5f7846c60337129f'
* commit '6f4cd33efb5a9ec75db1677d5f7846c60337129f':
  cosmetic: Reformat ff_h263_decode_mba

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-30 22:01:32 +02:00
Luca Barbato
0a49a62f99 h263: Always check both dimensions
CC: libav-stable@libav.org
Found-By: ago@gentoo.org
2015-06-30 15:34:38 +02:00
Luca Barbato
6f4cd33efb cosmetic: Reformat ff_h263_decode_mba 2015-06-30 15:34:38 +02:00
Michael Niedermayer
b5c71fba59 Merge commit 'e7af52a68dde9144b273a9598b60bf0f56e1323b'
* commit 'e7af52a68dde9144b273a9598b60bf0f56e1323b':
  mpegvideo: rv10: Move function declaration to a separate header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 21:05:57 +02:00
Michael Niedermayer
218f58a16a Merge commit 'e3d0f49abb20a551bf6d885f75c354d6d0bbeb9d'
* commit 'e3d0f49abb20a551bf6d885f75c354d6d0bbeb9d':
  mpegvideo: h263: Move all tables to a single file

Conflicts:
	libavcodec/h263.h
	libavcodec/h263data.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 20:57:37 +02:00
Vittorio Giovara
e7af52a68d mpegvideo: rv10: Move function declaration to a separate header 2015-06-12 12:26:54 +01:00
Vittorio Giovara
e3d0f49abb mpegvideo: h263: Move all tables to a single file 2015-06-12 12:26:04 +01:00
Michael Niedermayer
fd116b8dfa Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'
* commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61':
  mpegvideo: Move tables to a separate file

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:26:36 +02:00
Vittorio Giovara
378a00087f mpegvideo: Move tables to a separate file 2015-05-31 13:06:19 +02:00
Michael Niedermayer
75647622b5 Merge commit '6f57375d707de40dcec28d3cef886c364e032c21'
* commit '6f57375d707de40dcec28d3cef886c364e032c21':
  rl: Rename ff_*_rl() to ff_rl_*()

Conflicts:
	libavcodec/mpeg4videodec.c
	libavcodec/rl.c
	libavcodec/rl.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:48:49 +02:00
Anton Khirnov
6f57375d70 rl: Rename ff_*_rl() to ff_rl_*() 2015-05-28 15:38:43 +01:00
Michael Niedermayer
d5227ceff1 Merge commit '9c1db92ad372d4cd69e0490e691c56e4097cb193'
* commit '9c1db92ad372d4cd69e0490e691c56e4097cb193':
  mpegvideo: Drop err_recognition

Conflicts:
	libavcodec/h263dec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg4video.h
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:38:42 +02:00
Vittorio Giovara
9c1db92ad3 mpegvideo: Drop err_recognition
It is just a duplicate of an AVCodecContext member so use it instead.
2015-05-22 15:34:39 +01:00
Michael Niedermayer
7b94a2f4b1 avcodec/ituh263dec: Use ff_tlog() for block level information
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-26 01:00:05 +02:00
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Michael Niedermayer
fbdaebb298 avcodec/ituh263dec: Use check_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-15 03:22:27 +02:00
Michael Niedermayer
c16896f525 Merge commit 'c01ccccbb13f464e74bb8498a8c573a66c430ca0'
* commit 'c01ccccbb13f464e74bb8498a8c573a66c430ca0':
  ituh263dec: use macro instead of #if

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-29 22:02:22 +01:00
Vittorio Giovara
c01ccccbb1 ituh263dec: use macro instead of #if 2015-01-29 17:33:34 +00:00
Michael Niedermayer
17085a0251 Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'
* commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41':
  lavc: deprecate the use of AVCodecContext.time_base for decoding

Conflicts:
	libavcodec/avcodec.h
	libavcodec/h264.c
	libavcodec/mpegvideo_parser.c
	libavcodec/utils.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-15 15:49:31 +02:00
Anton Khirnov
7ea1b3472a lavc: deprecate the use of AVCodecContext.time_base for decoding
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.

Add a new field, called 'framerate', to replace the use of time_base for
decoding.
2014-10-15 06:37:43 +00:00
Reimar Döffinger
e8d0b84e8a h261dec, ituh263dec: Move condition.
Stops compiler from doing incredibly stupid things.
With vsynth1-flv inner loop goes from 3501 to 3275
decicycles.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-09-01 19:41:20 +02:00
Reimar Döffinger
36c0043344 h261dec, ituh263dec: ensure CLOSE_READER is done on error paths, too.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-09-01 19:41:20 +02:00
Reimar Döffinger
2a00812d82 h261dec, ituh263dec: Avoid unnecessary -1 inside inner loop.
3646 -> 3597 decicycles in inner loop when decoding
vsynth1-flv.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-09-01 19:41:20 +02:00
Reimar Döffinger
935453102b ituh263dec: Optimize new RL_VLC based decoding.
Together with the switch to RL_VLC this results in
a speedup of about 30% in this inner loop.
Overall speedup only relevant for medium to high bitrate
streams.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-31 20:13:58 +02:00
Reimar Döffinger
da0a670b3c h261, h263 decoders: convert to RL_VLC.
Some additional optimizations in following patch.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-31 20:09:54 +02:00
Michael Niedermayer
2b05db4f81 Merge commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9'
* commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9':
  dsputil: Split clear_block*/fill_block* off into a separate context

Conflicts:
	configure
	libavcodec/asvdec.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/dsputil.h
	libavcodec/eamad.c
	libavcodec/intrax8.c
	libavcodec/mjpegdec.c
	libavcodec/ppc/dsputil_ppc.c
	libavcodec/vc1dec.c
	libavcodec/x86/dsputil_init.c
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-19 04:54:38 +02:00
Diego Biurrun
e74433a8e6 dsputil: Split clear_block*/fill_block* off into a separate context 2014-06-18 14:07:23 -07:00
Michael Niedermayer
9517900bef Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'
* commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b':
  mpegvideo: move mpegvideo formats-related defines to mpegutils.h

Conflicts:
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_mvpred.h
	libavcodec/svq1enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-17 12:36:48 +01:00
Vittorio Giovara
e0c16e4e32 mpegvideo: move mpegvideo formats-related defines to mpegutils.h 2014-03-16 23:04:41 +01:00
Keiji Costantini
9514440337 ituh263: reject b-frame with pp_time = 0
Avoid a division by 0 in ff_mpeg4_set_one_direct_mv.

Sample-Id: 00000168-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-03-01 23:17:30 +01:00
Michael Niedermayer
2d2b363c65 h263: remove unused ff_h263_find_resync_marker()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-30 00:58:33 +01:00
Michael Niedermayer
ad13b8ca9b Merge commit 'ee8af2dd99dcb7a01a667deedec81d1aa2a00d72'
* commit 'ee8af2dd99dcb7a01a667deedec81d1aa2a00d72':
  mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext

Conflicts:
	libavcodec/h263dec.c
	libavcodec/mpeg4videodec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-29 22:35:52 +01:00