Michael Niedermayer
2c9106257f
avcodec/mpeg4videodec: Workaround interlaced mpeg4 edge MC bug
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
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>
8 years ago
Adriano Pallavicino
6089c44a2a
Fix build warnings due to misleading indentation
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Anton Khirnov
5ebef79abe
Fix instances of broken indentation found by gcc 6
9 years ago
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>
9 years ago
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>
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Lou Logan
06eef96b69
fix some a/an typos
...
Signed-off-by: Lou Logan <lou@lrcd.com>
9 years ago
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>
9 years ago
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>
9 years ago
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>
9 years ago
Clément Bœsch
56bdf61baa
avutil/motion_vector: export subpel motion information
...
FATE test changes because of the switch from shift to division.
9 years ago
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>
9 years ago
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>
9 years ago
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>
9 years ago
Michael Niedermayer
2d35757814
avcodec/mpegvideo: Change mpeg2 unquant to work with higher precission qscale
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Luca Barbato
5a1a9da8a7
mpegvideo: Drop a stray error message
...
The condition is not a failure.
9 years ago
Ronald S. Bultje
030b5a4f77
lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
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>
10 years ago
Vittorio Giovara
8b5007a31b
mpegvideo: Move ER functions to a separate file
10 years ago
Vittorio Giovara
c0e6b8cab8
mpegvideo: Mark one function as static
10 years ago
Vittorio Giovara
d1dd0d404c
mpegvideo: Move block permutation function where is used
...
Mark it as static.
10 years ago
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.
10 years ago
Vittorio Giovara
7061bf0925
mpegvideo: Move Picture-related functions to a separate file
10 years ago
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.
10 years ago
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.
10 years ago
Vittorio Giovara
da0c8664b4
mpegvideo: Move various temporary buffers to a separate context
10 years ago
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>
10 years ago
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>
10 years ago
Michael Niedermayer
f30a7d9861
avcodec/mpegvideo: Merge thread context initialization loops
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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.
10 years ago
Vittorio Giovara
378a00087f
mpegvideo: Move tables to a separate file
10 years ago
Vittorio Giovara
2f15846ad7
mpegvideo: wmv2: Move function declarations
10 years ago
Michael Niedermayer
403940de24
avcodec/mpegvideo: Use FFSWAP to exchange pointers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d860084c50
avcodec/mpegvideo: Reset bitstream_buffer_size on allocation failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Roman Savchenko
e5d1152ccc
avcodec/mpegvideo: Check pointer when allocation fail
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
fa1923f182
mpegvideo: Move ff_*_rl functions to a separate file
10 years ago
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.
10 years ago
Vittorio Giovara
4e17946f10
mpegvideo: Rework various functions not to use MpegEncContext directly
10 years ago
Vittorio Giovara
a3f4c930ac
mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly
10 years ago
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.
10 years ago
Vittorio Giovara
9c1db92ad3
mpegvideo: Drop err_recognition
...
It is just a duplicate of an AVCodecContext member so use it instead.
10 years ago
Vittorio Giovara
848e86f74d
mpegvideo: Drop flags and flags2
...
They are just duplicates of AVCodecContext members so use those instead.
10 years ago
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>
10 years ago
Michael Niedermayer
9ba5dd37a9
avcodec/mpegvideo: Fix indention
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago