1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

1184 Commits

Author SHA1 Message Date
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
Vittorio Giovara
da0c8664b4 mpegvideo: Move various temporary buffers to a separate context 2015-06-08 12:39:42 +01:00
Michael Niedermayer
46428ea332 avcodec/mpegvideo: Use av_memdup() for allocating thread_context
Also check for allocation failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 22:47:50 +02:00
Michael Niedermayer
7ddedd2362 avcodec/mpegvideo: Clear thread_context array before allocating
This is probably redundant but its safer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 22:47:50 +02:00
Michael Niedermayer
f30a7d9861 avcodec/mpegvideo: Merge thread context initialization loops
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-06 22:47:50 +02:00
Clément Bœsch
622ef80e3f avcodec/mpegvideo: use av_clip() instead of nested min & max
Note: MpegEncContext.mb_{y,height} are int fields, as well as local off
variable.
2015-06-06 13:18:28 +02: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
Michael Niedermayer
f5ee10c16a Merge commit '2f15846ad7ad57beb0bca99c624affa0facf284b'
* commit '2f15846ad7ad57beb0bca99c624affa0facf284b':
  mpegvideo: wmv2: Move function declarations

Conflicts:
	libavcodec/wmv2.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-01 01:09:38 +02:00
Vittorio Giovara
378a00087f mpegvideo: Move tables to a separate file 2015-05-31 13:06:19 +02:00
Vittorio Giovara
2f15846ad7 mpegvideo: wmv2: Move function declarations 2015-05-31 13:06:19 +02:00
Michael Niedermayer
403940de24 avcodec/mpegvideo: Use FFSWAP to exchange pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 14:03:52 +02:00
Michael Niedermayer
d860084c50 avcodec/mpegvideo: Reset bitstream_buffer_size on allocation failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 00:33:18 +02:00
Roman Savchenko
e5d1152ccc avcodec/mpegvideo: Check pointer when allocation fail
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-29 00:29:58 +02:00
Michael Niedermayer
68cce0101d Merge commit 'fa1923f18205410a3b0aa6c0e77cb31443ef340d'
* commit 'fa1923f18205410a3b0aa6c0e77cb31443ef340d':
  mpegvideo: Move ff_*_rl functions to a separate file

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:36:31 +02:00
Michael Niedermayer
9b736f74fc Merge commit '419e3404d07acaac019e8f363c281e17c3a3d622'
* commit '419e3404d07acaac019e8f363c281e17c3a3d622':
  mpegvideo: Drop exchange_uv() function and use its code directly

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-28 21:28:09 +02:00
Anton Khirnov
fa1923f182 mpegvideo: Move ff_*_rl functions to a separate file 2015-05-28 15:38:43 +01:00
Vittorio Giovara
419e3404d0 mpegvideo: Drop exchange_uv() function and use its code directly
Code is small enough that there is no advantage in a separate function.
2015-05-28 15:38:43 +01:00
Michael Niedermayer
f275f9eaee Merge commit '4e17946f10d39eec6cc03fb249ae8147373141b6'
* commit '4e17946f10d39eec6cc03fb249ae8147373141b6':
  mpegvideo: Rework various functions not to use MpegEncContext directly

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 22:39:47 +02:00
Michael Niedermayer
179527f34e Merge commit 'a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2'
* commit 'a3f4c930ac3f49f47b6e6ffda925d0dcf80320e2':
  mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 21:17:34 +02:00
Michael Niedermayer
a25ee5f922 Merge commit 'd528045558825f01472e9bee873f60c98d661e53'
* commit 'd528045558825f01472e9bee873f60c98d661e53':
  mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c

The memset is left in place

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 21:15:32 +02: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
Michael Niedermayer
d9b264bc73 Merge commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42'
* commit '848e86f74d3e6e87fa592ee8ba8c184cc5fd9a42':
  mpegvideo: Drop flags and flags2

Conflicts:
	libavcodec/mpeg12dec.c
	libavcodec/mpeg12enc.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/ratecontrol.c
	libavcodec/vc1_block.c
	libavcodec/vc1_loopfilter.c
	libavcodec/vc1_mc.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-22 20:24:41 +02:00
Vittorio Giovara
4e17946f10 mpegvideo: Rework various functions not to use MpegEncContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara
a3f4c930ac mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly 2015-05-22 15:34:39 +01:00
Vittorio Giovara
d528045558 mpegvideo: Have ff_mpeg_unref_picture use AVCodecContext directly
This skips setting the memory to 0 but allows for reuse on different
contextes. Oracle did not report any unsual activity because of it.
2015-05-22 15:34:39 +01: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
Vittorio Giovara
848e86f74d mpegvideo: Drop flags and flags2
They are just duplicates of AVCodecContext members so use those instead.
2015-05-22 15:34:39 +01:00
Michael Niedermayer
cf31e2df08 avcodec/mpegvideo: Fix null pointer dereference with grayscale decoding with mpeg2_field_encoding.ts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 17:10:26 +02:00
Michael Niedermayer
9ba5dd37a9 avcodec/mpegvideo: Fix indention
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 12:03:36 +02:00
Michael Niedermayer
82a6e18bbb avcodec/mpegvideo: Fix -flags +gray with xvid_vlc_trac7411.h263
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-09 01:36:53 +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
44309dd294 avcodec/mpegvideo: support mbskip_table==NULL in ff_print_debug_info2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-21 19:28:56 +01:00