Michael Niedermayer
9d3357391c
avcodec/mpeg12dec: Make ff_dlog() messages more clear
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
f4c311fef4
avcodec/mpeg12dec: Change mb decode tracing stuff to use ff_tlog()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
37d93fdbf0
avcodec/mpeg12dec: Use check_marker()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1932f7e2ee
avcodec/mpeg12dec: Fix undefined shift
...
Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
75cc57f73f
avcodec/mpeg12dec: Check actual aspect ratio instead of aspect_ratio_info
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1010b36d86
avcodec/mpeg12dec: Recalculate SAR unconditionally
...
Fixes Ticket4161
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
aeb36fd207
avcodec/mpeg12dec: Move user data debug code out of unrelated if (buf_size > 29)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3a56bcee7c
mpeg12dec: Use more specific error codes
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
b56afb48ae
mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
bab11fe7bf
avcodec/mpeg12dec: forward error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1852b2a0f4
avcodec/mpeg12dec: Use more specific error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0f8908aa1b
avcodec/mpeg12dec: do not fail on invalid frame_rate_index
...
Fixes Ticket4073
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
88b4c1a731
avcodec/mpeg12dec: Print error/warning messages on issues in mpeg1_decode_sequence()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
5d29efe4b0
mpeg12dec: simplify context duplication
...
CC: libav-stable@libav.org
Bug-Id: CID 717453 / CID 717454 / CID 717915
10 years ago
Michael Niedermayer
77f1199e8f
avcodec/mpeg12dec: do not trust AVCodecContext input dimensions
...
Fixes initial wtv dimensions
Fixes Ticket4070
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
620e7f0f3b
avcodec/mpeg12dec: fix time_base and framerate
...
They are not just inverses of each other.
This should restore behavior to before the introduction of framerate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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.
10 years ago
Michael Niedermayer
b8a55994f0
avcodec/mpeg12dec: print aspect_ratio_info in debug output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rémi Denis-Courmont
4e03b2097c
mpeg12: Always invoke the get_format() callback
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Michael Niedermayer
4dee4a4470
avcodec/mpegvideo: Factor ff_mpv_decode_init() out
...
Reviewed-by: Benoit Fouet <benoit.fouet@free.fr>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Gabriel Dume
4b1f5e5090
cosmetics: Write NULL pointer inequality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Diego Biurrun
835f798c7d
mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes
10 years ago
John Stebbins
998c9f15d1
idct: remove call to ff_idctdsp_init from ff_MPV_common_init
...
One step in untangling the mpegvideo code and fixing some problems in
the order that initialization is being done in h263dec and h261dec.
10 years ago
Diego Biurrun
990e2f3555
avcodec: Suppress deprecation warnings from DTG code scheduled for removal
10 years ago
Kieran Kunhya
2a3c36e920
Deprecate AFD field and add AFD as side-data
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Kieran Kunhya
1ef9e83764
avcodec: Deprecate dtg_active_format field in favor of avframe side-data
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Clément Bœsch
ee7ee9b1b4
avcodec/mpeg12dec: fix vissible typo after 17c65651
10 years ago
Michael Niedermayer
17c6565186
avcodec/mpeg12dec: Document Ticket3809 fix
...
Suggested-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
f95298c913
avcodec/mpeg12dec: fix support for interlaced mpeg2 with missing last slice
...
Fixes Ticket3809
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7f852962dc
avcodec/mpeg12dec: print the amount of overread
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Diego Biurrun
e3fcb14347
dsputil: Split off IDCT bits into their own context
11 years ago
Michael Niedermayer
4d1fa38d98
avcodec/mpeg12dec: Limit progressive_seq reinitilaization to where the resolution changes
...
Fixes Ticket3743
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
7b9ef8d701
mpeg: Split error resilience bits off into a separate file
11 years ago
Justin Ruggles
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
11 years ago
Diego Biurrun
e74433a8e6
dsputil: Split clear_block*/fill_block* off into a separate context
11 years ago
Anton Khirnov
5c1d7246cd
lavc: set AVCodecContext.hwaccel in ff_get_format()
...
This way each decoder does not have to do the same thing manually.
11 years ago
Anton Khirnov
632ad2248e
lavc: Add an internal wrapper around get_format()
...
It will be useful in the following commits.
11 years ago
Carl Eugen Hoyos
ced0d6c14d
Use correct msvc type specifiers for ptrdiff_t and size_t.
...
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472 .
Reviewed-by: Ronald Bultje
11 years ago
Michael Niedermayer
375013e3d6
avcodec/mpeg12dec: drop confusing av_dlog()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
wm4
f6774f905f
mpegvideo: operate with pointers to AVFrames instead of whole structs
...
The most interesting parts are initialization in ff_MPV_common_init() and
uninitialization in ff_MPV_common_end().
ff_mpeg_unref_picture and ff_thread_release_buffer have additional NULL
checks for Picture.f, because these functions can be called on
uninitialized or partially initialized Pictures.
NULL pointer checks are added to ff_thread_release_buffer() stub function.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Diego Biurrun
cc8163e1a3
avcodec: more correct printf specifiers
11 years ago
Vittorio Giovara
e0c16e4e32
mpegvideo: move mpegvideo formats-related defines to mpegutils.h
11 years ago
Janne Grunau
73eca738ac
mpeg12dec: do not add stereo3D side data to a non-existing frame
...
User data is usually coded before slice data. That means the frame
the user data belongs to is not available while parsing the user data.
The stereo3D side data has to use the same indirection over the private
context as pan scan information and A53 captions.
Bug-Id:632
11 years ago
Vittorio Giovara
a91d3658d9
mpeg: K&R formatting cosmetics
...
Also adjust header #include order and some comments.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Michael Niedermayer
7667afffb8
avcodec/mpeg12dec: Revert Change to mpeg2_fast_decode_block_non_intra
...
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index
Before:
1823 decicycles in mpeg2_fast_decode_block_non_intra, 8388493 runs, 115 skips
After:
1808 decicycles in mpeg2_fast_decode_block_non_intra, 8388494 runs, 114 skips
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6a92598e14
avcodec/mpeg12dec: Redesign index checks for mpeg2_fast_decode_block_intra
...
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index
Before:
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
After:
1658 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Janne Grunau
6d93307f8d
mpeg12: check scantable indices in all decode_block functions
...
Add checks to the fast functions used with CODEC_FLAGS2_FAST and move
the check for all other functions to before the invalid memory is
accessed. Fixes https://trac.videolan.org/vlc/ticket/9713 with
CODEC_FLAGS2_FAST.
CC: libav-stable@libav.org
11 years ago
Michael Niedermayer
934bb11ad7
avcodec/mpeg12dec: fix mis-indented line
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago