Martin Storsjö
b772b0e28e
vc1dec: Undo mpegvideo initialization if unable to allocate tables
...
Previously, s->context_initialized was left set to 1
if ff_vc1_decode_init_alloc_tables failed, skipping the
initialization completely on the next decode call.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Martin Storsjö
ede508443e
vc1dec: Fix leaks in ff_vc1_decode_init_alloc_tables on errors
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
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
Luca Barbato
43bacd5b7d
vc1: check mb_height validity.
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Luca Barbato
090cd06311
vc1: check the source buffer in vc1_mc functions
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Rémi Denis-Courmont
578ea75a9e
vdpau: remove old-style decoders
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Carl Eugen Hoyos
ac83d62136
Avoid a null pointer dereference on oom when decoding vc1.
...
Fixes ticket #2723 .
12 years ago
Michael Niedermayer
6c4516d041
avcodec/vc1dec: Check source picture availability in vc1_mc_4mv_chroma4()
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fca435fee1
vc1dec: Disable dead code
...
Fixes CID732197/6
A assert is added to check that the disabled code wont
be needed in the future.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d8b9dbe776
vc1dec: Fix mixed field/frame intensity compensation
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
17410faa22
vc1dec: Match addressing between compensation and MC in vc1_mc_4mv_chroma4
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
1be175f929
vc1dec: Handle top and bottom blocks in vc1_mc_4mv_chroma4() differently if needed
...
Now it can use different references for those blocks and even use
averaging.
This fixes several chroma artifacts in several videos.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
c69765a2cc
vc1dec: Fix doxy for vc1_mc_4mv_chroma4()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
b412f705b5
vc1dec: Drop old use_ic code from vc1_b_mc
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
5053a9a1ff
vc1: Use shuffled use_ic instead of equally shuffled mv_mode
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
3ced06f283
vc1dec: Implement intensity compensation for vc1_interp_mc()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
28243b0d35
vc1dec: Redesign the intensity compensation
...
Use the intensity-compensated reference frame for subsequent
fields/B-frames.
Since we currently don't change the reference frame we have to
maintain lookup tables for intensity compensation in the following
dependent frames.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
93b1281264
vc1dec: Shuffle field MVs after decoding, not before
...
This simplifies the code since copying MVs to the reference is not needed
anymore (and maybe something about fixing artifacts).
Also remove the unused mv_f_last.
Fixes a small number of artifacts in black_screen_VC-1.mkv
and several more artifacts in other videos.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
ebe8c7fe52
vc1dec: restructure interpmvp code
...
This fixes a valgrind warning about use of uninitialized stuff
(no actual such use occurs though)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Sebastian Sandberg
1fb013a57c
vc1dec: Add support for interlaced B-frames
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Clément Bœsch
6c5bd7d785
lavc/vc1dec: fix a few "may be used uninitialized" warnings.
12 years ago
Michael Niedermayer
f4cc38e339
vc1dec: silence "may be used uninitialized in this function" warning from gcc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
3ca3709ad4
vc1dec: Remove some now unused variables
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
4162fc62b3
vc1dec: Do not allow field_mode to change after the first header
...
This fixes out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
ec7d002e55
vc1, mss2: Check for any negative return value from ff_vc1_parse_frame_header
...
This is required if we return other error codes than explicitly
-1, which so far has been the only other possible return value
besides 0.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
ccb148e478
vc1dec: Fix current ptr selection in vc1_mc_4mv_chroma()
...
No sample tried shows a difference.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
201412ffec
vc1dec: Factorize picture pointer selection in vc1_mc_4mv_chroma()
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
2412ad1717
vc1dec: Factorize picture pointer selection code
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
19673db34a
vc1dec: Factorize srcU/V offseting
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
012b319d91
vc1dec: Fix tff == 0 handling in init_block_index()
...
This fixes several files from VLC ticket 5887.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
0313653928
vc1dec: Update destination pointers in context for fields
...
This replaces a large number of checks for the second field by
fixing the pointers when they are setup.
This should also fix I/BI field pictures.
Changes checksums for vc1_sa10143, the file becomes slightly closer
to what the reference decoder outputs.
Based on "vc1dec: the second field is written wrong to the picture"
by Sebastian Sandberg <sebastiand.sandberg@gmail.com>.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
5d9d8461fb
vc1dec: Don't apply the loop filter on fields
...
Fixes read of uninitialized memory.
Based on a patch by Michael Niedermayer.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
46430fd47c
vc1dec: Don't attempt error concealment on field pictures
...
This is not implemented and doesn't work.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Sebastian Sandberg
1bd57a850a
vc1dec: fieldtx is only valid for interlaced frame pictures
...
The fieldtx_plane is not cleared for interlaced fields.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Carl Eugen Hoyos
905e1e4b52
Cosmetics: Fix indentation and add braces after last commit.
12 years ago
Carl Eugen Hoyos
8b8fa09b65
vc1dec: Call ff_vdpau_vc1_decode_picture() once for each field.
...
Fixes mplayer -vc ffvc1vdpau for interlaced streams.
12 years ago
Michael Niedermayer
d29f9f4a0e
vc1dec: fix lutuv use in vc1_mc_4mv_chroma4()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7e30bfcb91
vc1dec: Fix mixed field/frame intensity compensation
...
Fixes Ticket2523
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
90c2e40ebb
vc1dec: vc1_mc_4mv_chroma4: match addressing between compensation and MC
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
688fc4ac56
vc1dec: Try to fix vc1_mc_4mv_chroma4() parameters
...
This fixes several chroma artifacts in several videos
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9b49d3974e
vc1dec: add avg & variable direction support to vc1_mc_4mv_chroma4()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5183365aeb
vc1dec: fix doxy for vc1_mc_4mv_chroma4()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
32a6dfeb12
vc1dec: drop mv_f_last, simplify code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
12e3c1bee4
vc1dec: drop old use_ic code from vc1_b_mc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
100184ccff
vc1: use use_ic instead of shuffling mv_mode around
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
84c0ec92ae
vc1dec: Implement intensity compensation for vc1_interp_mc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
782ebd6118
vc1dec: redesign the intensity compensation
...
The existing implementation had little to do with VC1.
This could be implemented by adjusting the reference frames
ithemselfs but that would make frame multi-threading difficult.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c5669f3c59
vc1dec: fix current ptr selection in vc1_mc_4mv_chroma()
...
No sample tried shows a difference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
236b0c4084
vc1dec: factorize picture pointer selection in vc1_mc_4mv_chroma()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
72e5d91908
vc1dec: factorize picture pointer selection code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago