Vittorio Giovara
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Andreas Cadhalpun
f62880bfb8
mpeg4: use a self-explanatory #define MAX_NVOP_SIZE
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
a764402394
avcodec/h263dec: Try to use codec_tag instead of the stream_codec_tag
...
If this causes problems then the stream_codec_tag should be enabled again
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Rémi Denis-Courmont
c80a816142
h263dec: call get_format() on resolution changes
...
Fail safe if the pixel format changes.
10 years ago
Rémi Denis-Courmont
1f29e5d7a2
h263dec: call get_format after setting resolution and profile
...
Bug-Id: 541
10 years ago
Josh Allmann
9a03c23235
h263dec: Force padding bug workaround for H.263.
...
Fixes decoding of http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Michael Niedermayer
d225b0f7aa
avcodec/h263dec: Fix decoding messenger.h263
...
Fixes http://samples.mplayerhq.hu/V-codecs/h263/h263-raw/messenger.h263
Fixes regression since b239f3f6
Found-by: Josh Allmann
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
b869eea7ea
h263dec: Fix order of initialization
...
ff_MPV_common_init requires the frame dimensions which get parsed in
*_decode_picture_header.
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
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
368f50359e
dsputil: Split off quarterpel bits into their own 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
Michael Niedermayer
336901e060
avcodec/h263dec: use AV_EF_IGNORE_ERR
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
56cc178485
avcodec/h263dec: fix "incompatible pointer type" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
64e448994c
avcodec/h263dec: print MB position for each MB when TRACE is enabled
...
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
Rémi Denis-Courmont
3325911815
h263: improve hwaccel #ifdefs
11 years ago
Michael Niedermayer
ec6d043f8e
avcodec/h263dec: Workaround H263 end padding bug
...
Fixes: H263PaddingBugFixVID_6647.MOV
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b239f3f69d
avcodec/h263dec: move call to ff_mpeg4_workaround_bugs() under codec_id check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6c9b82b6a0
avcodec/mpeg4videodec: move bug workaround code into seperate function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
e2ceb17642
mpeg4videodec: move mpeg4-specific post-frame-decode code from h264dec to mpeg4videodec
11 years ago
Anton Khirnov
b452d5ae86
mpeg4videodec: move mpeg4-specific bug detection from h263 generic code to mpeg4
11 years ago
Anton Khirnov
ad09f52586
h263dec: remove commented out cruft
11 years ago
Anton Khirnov
1a89025793
mpeg4videodec: move MpegEncContext.vol_sprite_usage to Mpeg4DecContext
11 years ago
Anton Khirnov
ee8af2dd99
mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext
11 years ago
Anton Khirnov
8733799392
h263dec: sanitize a condition.
...
Call ff_mpeg4_decode_picture_header() only when the decoder has the
MPEG4 codec id, not based on a vaguely related value of h263_pred.
11 years ago
Luca Barbato
08303d7741
hwaccel: Simplify ff_find_hwaccel
...
It is always called by passing fields from an AVCodecContext.
11 years ago
Diego Biurrun
0338c39698
dsputil: Split off H.263 bits into their own H263DSPContext
11 years ago
Anton Khirnov
3b08631727
h26[13]dec: stop using deprecated avcodec_set_dimensions
11 years ago
Michael Niedermayer
c00686518c
avcodec/h263dec: fix handling of AV_EF_EXPLODE
...
This fixes checking a variable that had been overwritten before.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
aaaf2dc023
h263: Check init_get_bits return value
...
And use init_get_bits8 to check for integer overflows while at it.
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Luca Barbato
0749314886
h263: Return meaningful errors
11 years ago
Luca Barbato
1ce3ec24b3
h263: K&R formatting cosmetics
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Michael Niedermayer
d47e14b53a
h263dec: use init_get_bits8() and check its return code
...
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Martin Storsjö
8812a8057f
h263dec: Remove a hack that can cause infinite loops
...
The actual usefulness of the hack is not known, and it does cause
infinite loops with some broken input files.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Reimar Döffinger
2aa8e33d7d
Fix nonsense MPEG-4 hwaccel code.
...
Issues with the code:
1) The skip_bits_long breaks packed B-frames since we skip
of the packed frame, even for VDPAU.
2) Calling ff_h263_find_resync_marker_reverse is nonsense for MPEG-4,
and for H.263 the only code using this (vaapi_mpeg4) explicitly reverts
this change!
3) mb_x/mb_y are always 0 when vaapi_mpeg4_decode_slice, so doing
computations with them is just obfuscation
4) due to not updating mb_y the code would always go into the error
resilience case, causing nonsense error messages and maybe further
issues.
While tested to fix the data provided to the decoder in case of
VDPAU so it is the same as for the non-hwaccel code, the VA-API code
was not tested to still work, and adding regression testing even
as a quick hack is much more complicated for it.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
11 years ago
Reimar Döffinger
f76b633a94
mpeg4dec: Ensure data is not clobbered too early.
...
Avoid overwriting the bitstream buffer data before we
have ended processing the frame.
This is necessary to fix hwaccels which might try to use
the buffer during the end_frame call.
I am not sure but it is possible this could even trigger
a use-after-free if the av_fast_malloc allocated a new buffer.
This would require that decode_slice did not wind the bitstream
forward all the way to the end, which does not currently happen in
normal streams.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
11 years ago
Michael Niedermayer
7495186fd4
avcodec/h263dec: fix aspect of lead h263 EHC
...
Fixes part of ticket925
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b99d3613cf
avcodec/h263dec: use FF_CEIL_RSHIFT()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
5cc8b81687
mpeg4videodec: fix GEOV/GEOX fliping
...
Fixes Ticket317
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a0c6c8e53e
Revert "Merge commit of 'vdpau: remove old-style decoders'"
...
This reverts commit bf36dc50ea
, reversing
changes made to b7fc2693c7
.
Conflicts:
libavcodec/h264.c
Keeping support for the old VDPAU API has been requested by our VDPAU maintainer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Rémi Denis-Courmont
578ea75a9e
vdpau: remove old-style decoders
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Diego Biurrun
2832ea26f3
Remove commented-out debug #define cruft
12 years ago