Michael Niedermayer
973c3dba27
avcodec/mpeg12dec: Do not call show_bits() with invalid bits
...
Fixes assertion failure
Fixes: 63e50545709a6440d3d59f6426d58db9/signal_sigabrt_7ffff6ae7cc9_8189_3272a3010fd98ddf947c662bbde1ac13.ts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Luca Barbato
49d7fcd774
mpeg12: Unbreak building stale code
...
Broken in 2d59159508
9 years ago
Vittorio Giovara
2d59159508
lavc: AV-prefix a few left out capabilities
9 years ago
Ganesh Ajjanagadde
2cbaa078d1
avcodec: use HAVE_THREADS header guards to silence -Wunused-function
...
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7 ,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Michael Niedermayer
9b4dd0f876
avcodec/mpeg12dec: Initialize chroma_format to 1
...
This ensures that chroma format is never set to an invalid value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
bf9464027b
avcodec/mpeg12dec: Move non_linear_qscale to mpegvideodata
...
This will be used in the next commit
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
863522431f
avcodec/mpeg12dec: Fix integer overflow
...
Fixes: signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d9b56895b5
avcodec/mpegvideo: change bit_rate to 64bit
...
32bit is not sufficient for all cases
Fixes: signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
b54e03c9dc
avcodec/mpeg12dec: Set dimensions in mpeg1_decode_sequence() only in absence of errors
...
Fixes assertion failure
Fixes: 56dcafde14a8397161bb61a16c511179/signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Andreas Cadhalpun
095347ffe4
disable deprecation warnings in deprecated code
...
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Gwenole Beauchesne
9f8e57efe4
vaapi: define a unique pixel format for VA-API (AV_PIX_FMT_VAAPI).
...
Deprecate older VA pixel formats (MOCO, IDCT) as it is now very unlikely
to ever be useful in the future. Only keep plain AV_PIX_FMT_VAAPI format
that is aliased to the older VLD variant.
This is an API change.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
9 years ago
wm4
a383f226f0
lavc: move vdpau decoders under FF_API_VDPAU.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
9 years ago
Ronald S. Bultje
030b5a4f77
lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.
9 years ago
Michael Niedermayer
1f86079376
avcodec/mpeg12dec: Check chroma_format
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
wm4
94c0df79c7
lavc: propagate hwaccel errors
...
At least the new videotoolbox decoder does not actually set a frame if
end_frame fails. This causes the API to return success and signals that
a picture was decoded, even though AVFrame->data[0] is NULL.
Fix this by propagating end_frame errors.
9 years ago
Sebastien Zwickert
11d923d414
avcodec: add new Videotoolbox hwaccel.
9 years ago
James Almer
5d95f32bff
avocdec/mpeg12dec: fix mpeg_xvmc hwaccel flag
...
The flag is deprecated and as such didn't get a new AV_ prefixed version
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 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>
9 years ago
Carl Eugen Hoyos
8dad213143
lavc: Add properties field to AVCodecContext.
...
The new field can hold information about losslessness and closed captions for now.
9 years ago
Michael Niedermayer
bfd17046c1
avcodec/mpeg12dec: Fix decoding of faulty interlaced mpeg2
...
Fixes Ticket4721
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
378a00087f
mpegvideo: Move tables to a separate file
10 years ago
Philip Langdale
9ae766d1c6
avcodec/vdpau: Re-factor pre-hwaccel helper functions into separate header
...
h264.h and hevc.h are mutually exclusive due to defining some of the same
names. As such, we need to avoid forcing h264.h to be included if we want
hevc decode acceleration to be possible.
However, some of the pre-hwaccel helper functions need h264.h. To avoid
messy collisions, let's move the declaration of all those helpers to
a separate header which we will exclude for the hevc support (which will
be hwaccel-only).
Signed-off-by: Philip Langdale <philipl@overt.org>
10 years ago
Steve Lhomme
d8039ef8d2
D3D11va: add a Direct3D11 video decoder similar to DXVA2
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
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
d09321b68e
avcodec/mpeg12dec: Fix chroma location
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
33529104e5
avcodec/mpeg12dec: Fix "-flags +gray"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
7f45f7fc7f
avcodec/mpeg12dec: use the correct dimensions for checking SAR
...
Fixes Ticket4533
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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