1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

309 Commits

Author SHA1 Message Date
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>
2013-08-17 22:17:49 +02:00
Michael Niedermayer
91062ddef1 Merge commit '43bacd5b7d3d265a77cd29d8abb131057796aecc'
* commit '43bacd5b7d3d265a77cd29d8abb131057796aecc':
  vc1: check mb_height validity.

See: b5f4836f8c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 16:07:37 +02:00
Michael Niedermayer
f606c6e92c Merge commit '090cd0631140ac1a3a795d2adfac5dbf5e381aa2'
* commit '090cd0631140ac1a3a795d2adfac5dbf5e381aa2':
  vc1: check the source buffer in vc1_mc functions

Conflicts:
	libavcodec/vc1dec.c

See: 3a04c18d89
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:57:35 +02:00
Michael Niedermayer
bf36dc50ea Merge commit '578ea75a9e4ac56e0bbbbe668700be756aa699f8'
* commit '578ea75a9e4ac56e0bbbbe668700be756aa699f8':
  vdpau: remove old-style decoders

Conflicts:
	libavcodec/allcodecs.c
	libavcodec/h263dec.c
	libavcodec/h264.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg4videodec.c
	libavcodec/vc1dec.c
	libavcodec/vdpau.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 13:24:22 +02:00
Luca Barbato
43bacd5b7d vc1: check mb_height validity.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-05 16:24:13 +02:00
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
2013-08-05 16:24:13 +02:00
Rémi Denis-Courmont
578ea75a9e vdpau: remove old-style decoders
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-05 11:15:49 +02:00
Carl Eugen Hoyos
ac83d62136 Avoid a null pointer dereference on oom when decoding vc1.
Fixes ticket #2723.
2013-06-29 14:49:47 +02:00
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>
2013-06-15 13:11:35 +02:00
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>
2013-06-04 02:43:20 +02:00
Michael Niedermayer
a58e10e5d1 Merge commit '728214992e3698305550c1762f973d2ac567f016'
* commit '728214992e3698305550c1762f973d2ac567f016':
  vc1dec: Remove interlaced warning
  vc1dec: Fix mixed field/frame intensity compensation
  vc1dec: Match addressing between compensation and MC in vc1_mc_4mv_chroma4
  vc1dec: Handle top and bottom blocks in vc1_mc_4mv_chroma4() differently if needed
  vc1dec: Fix doxy for vc1_mc_4mv_chroma4()
  vc1dec: Drop old use_ic code from vc1_b_mc
  vc1: Use shuffled use_ic instead of equally shuffled mv_mode
  vc1dec: Implement intensity compensation for vc1_interp_mc()

Conflicts:
	Changelog
	libavcodec/vc1dec.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-29 03:28:18 +02:00
Michael Niedermayer
d8b9dbe776 vc1dec: Fix mixed field/frame intensity compensation
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:24 +03:00
Michael Niedermayer
17410faa22 vc1dec: Match addressing between compensation and MC in vc1_mc_4mv_chroma4
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:20 +03:00
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>
2013-05-28 13:56:15 +03:00
Michael Niedermayer
c69765a2cc vc1dec: Fix doxy for vc1_mc_4mv_chroma4()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:12 +03:00
Michael Niedermayer
b412f705b5 vc1dec: Drop old use_ic code from vc1_b_mc
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:08 +03:00
Michael Niedermayer
5053a9a1ff vc1: Use shuffled use_ic instead of equally shuffled mv_mode
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:56:04 +03:00
Michael Niedermayer
3ced06f283 vc1dec: Implement intensity compensation for vc1_interp_mc()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-28 13:55:59 +03:00
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>
2013-05-28 13:55:55 +03:00
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>
2013-05-28 13:55:46 +03:00
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>
2013-05-17 15:11:47 +02:00
Michael Niedermayer
c453da33a3 Merge commit '1fb013a57c6d98d3f425506eb25f32b2cf7ddc6f'
* commit '1fb013a57c6d98d3f425506eb25f32b2cf7ddc6f':
  vc1dec: Add support for interlaced B-frames

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-17 10:23:40 +02:00
Sebastian Sandberg
1fb013a57c vc1dec: Add support for interlaced B-frames
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-17 00:28:37 +03:00
Clément Bœsch
6c5bd7d785 lavc/vc1dec: fix a few "may be used uninitialized" warnings. 2013-05-16 23:08:01 +02:00
Michael Niedermayer
f4cc38e339 vc1dec: silence "may be used uninitialized in this function" warning from gcc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 22:32:01 +02:00
Michael Niedermayer
e3c24f663e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  configure: Use linker hardening flags on mingw
  vc1: Make INIT_LUT() self contained
  vc1: Simplify code by using INIT_LUT()
  vc1: Move INIT_LUT() further up to allow using it in more places
  vc1dec: Remove some now unused variables
  vc1dec: Do not allow field_mode to change after the first header
  vc1, mss2: Check for any negative return value from ff_vc1_parse_frame_header
  vc1dec: Fix current ptr selection in vc1_mc_4mv_chroma()
  vc1dec: Factorize picture pointer selection in vc1_mc_4mv_chroma()
  vc1dec: Factorize picture pointer selection code
  vc1dec: Factorize srcU/V offseting
  vc1dec: Fix tff == 0 handling in init_block_index()
  vc1dec: Update destination pointers in context for fields

Conflicts:
	libavcodec/vc1.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 20:09:20 +02:00
Martin Storsjö
3ca3709ad4 vc1dec: Remove some now unused variables
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 12:13:53 +03:00
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>
2013-05-15 12:13:53 +03:00
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>
2013-05-15 12:13:53 +03:00
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>
2013-05-15 11:40:38 +03:00
Michael Niedermayer
201412ffec vc1dec: Factorize picture pointer selection in vc1_mc_4mv_chroma()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 11:40:17 +03:00
Michael Niedermayer
2412ad1717 vc1dec: Factorize picture pointer selection code
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 11:39:57 +03:00
Michael Niedermayer
19673db34a vc1dec: Factorize srcU/V offseting
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-05-15 11:39:36 +03:00
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>
2013-05-15 11:39:17 +03:00
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>
2013-05-15 11:38:49 +03:00
Michael Niedermayer
23439cf99b Merge commit '5d9d8461fbb87046a7ca220d3676a045bd7ab46e'
* commit '5d9d8461fbb87046a7ca220d3676a045bd7ab46e':
  vc1dec: Don't apply the loop filter on fields

Conflicts:
	tests/ref/fate/vc1_sa10143

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 10:07:15 +02:00
Michael Niedermayer
b602e47f12 Merge commit '46430fd47c6239ef8742d0a34f9412d5060fa798'
* commit '46430fd47c6239ef8742d0a34f9412d5060fa798':
  vc1dec: Don't attempt error concealment on field pictures
  vc1dec: fieldtx is only valid for interlaced frame pictures
  aacenc: Fix erasure of surround channels
  aacenc: Fix target bitrate for twoloop quantiser search

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 09:49:17 +02:00
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>
2013-05-14 14:36:00 +03:00
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>
2013-05-14 13:24:52 +03:00
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>
2013-05-14 12:44:09 +03:00
Carl Eugen Hoyos
905e1e4b52 Cosmetics: Fix indentation and add braces after last commit. 2013-05-06 21:55:14 +02:00
Carl Eugen Hoyos
8b8fa09b65 vc1dec: Call ff_vdpau_vc1_decode_picture() once for each field.
Fixes mplayer -vc ffvc1vdpau for interlaced streams.
2013-05-06 21:55:14 +02:00
Michael Niedermayer
d29f9f4a0e vc1dec: fix lutuv use in vc1_mc_4mv_chroma4()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 18:09:15 +02:00
Michael Niedermayer
7e30bfcb91 vc1dec: Fix mixed field/frame intensity compensation
Fixes Ticket2523

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 18:04:48 +02:00
Michael Niedermayer
90c2e40ebb vc1dec: vc1_mc_4mv_chroma4: match addressing between compensation and MC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-03 18:04:48 +02:00
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>
2013-04-25 22:39:19 +02:00
Michael Niedermayer
9b49d3974e vc1dec: add avg & variable direction support to vc1_mc_4mv_chroma4()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-25 22:39:19 +02:00
Michael Niedermayer
5183365aeb vc1dec: fix doxy for vc1_mc_4mv_chroma4()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-25 22:39:19 +02:00
Michael Niedermayer
32a6dfeb12 vc1dec: drop mv_f_last, simplify code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-25 13:51:44 +02:00
Michael Niedermayer
12e3c1bee4 vc1dec: drop old use_ic code from vc1_b_mc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-04-24 21:56:34 +02:00