1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

354 Commits

Author SHA1 Message Date
Michael Niedermayer
20be510887 avcodec/vc1dec: remove blocks_off use from vc1_pred_b_mv()
it should always be 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 20:56:09 +01:00
Michael Niedermayer
41f9742053 avcodec/vc1dec: vc1_pred_b_mv() is not used for fields, simplify code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-04 20:12:54 +01:00
Michael Niedermayer
f4b288a639 avcodec/vc1dec: Print warning for frame pictures with direct mode MBs, followed by field pictures
This case is not implemented
No non fuzzed samples are known to use this

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 06:59:35 +01:00
Michael Niedermayer
85d51d8e32 avcodec/vc1dec: field pictures with direct mode MBs, followed by frame pictures are not supported
This case could occur when cuting and concatenating bitstreams

Fixes out of array read
Fixes: asan_heap-oob_1b33fdd_2849_cov_478905890_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 06:48:44 +01:00
Michael Niedermayer
2830f287e2 Merge commit 'ebfe622bb1ca57cecb932e42926745cba7161913'
* commit 'ebfe622bb1ca57cecb932e42926745cba7161913':
  mpegvideo: drop support for real (non-emulated) edges

Conflicts:
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo_motion.c
	libavcodec/wmv2.c

If this is slower on a major platform then it should be investigated
and potentially reverted.

See: 8fc52a5ef9
See: 3969b4b861
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 14:19:24 +01:00
Anton Khirnov
ebfe622bb1 mpegvideo: drop support for real (non-emulated) edges
Several decoders disable those anyway and they are not measurably faster
on x86. They might be somewhat faster on other platforms due to missing
emu edge SIMD, but the gain is not large enough (and those decoders
relevant enough) to justify the added complexity.
2014-01-09 09:41:19 +01:00
Michael Niedermayer
64b98df389 vc1: simplify *_use_ic initialization
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 14:59:31 +01:00
Michael Niedermayer
3e626548ce avcodec/vc1dec: use av_mallocz for luma_mv
This ensures that no mvs are uninitialized at the time of loop filtering
Fixes: msan_uninit-mem_7f0b6dfe293c_2786_SA20021.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-17 21:54:20 +01:00
Michael Niedermayer
d8fd183683 vc1: Fix mb_height for field pictures
Tables are always allocated now with sufficient space for either progressive
or interlaced content. The alternative would be to detect a change
and reallocate.

This fixes decoding of a sample.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-17 22:01:45 +02:00
Michael Niedermayer
c9f72e4b81 avcodec/vc1dec: fix mby_start for interlaced content
Fixes first frame of Ticket2531

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 17:12:18 +01:00
Michael Niedermayer
017e234c20 avcodec/vc1: fix mb_height for field pictures
Fixes ticket2531

Tables are always allocated now with sufficient space for either progressive
or interlaced content. The alternative would be to detect a change
and reallocate.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 16:50:21 +01:00
Michael Niedermayer
2cfccd8060 avcodec/vc1: Factorize imode enum out / remove duplication
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 05:16:25 +01:00
Michael Niedermayer
48016f8feb avcodec/vc1dec: propagate errors from vc1_parse_sprites()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 01:46:11 +01:00
Michael Niedermayer
5f00b333a4 avcodec/vc1dec: zero SpriteData struct
Fixes use of uninitialized data, as alternative alpha could be
calculated conditionally

Fixes part of msan_uninit-mem_7f51a8b0b3b0_1009_Arlington.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 01:46:11 +01:00
Michael Niedermayer
cf95dee3de avcodec/vc1dec: dont calculate unused values from uninitialized sprites
Fixes use of uninitialized data
Fixes part of msan_uninit-mem_7f51a8b0b3b0_1009_Arlington.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-14 00:59:43 +01:00
Michael Niedermayer
0d9f2f5c47 Merge commit '66499f34b56fc6a9fdef25543bd9d576fc787895'
* commit '66499f34b56fc6a9fdef25543bd9d576fc787895':
  mpegvideo: do not set current_picture_ptr in decoders

Conflicts:
	libavcodec/mss2.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 04:09:47 +01:00
Michael Niedermayer
dfd11eb2a5 Merge commit 'ac1fc92ea410c396594fcd79f5d4491fe6a8cc90'
* commit 'ac1fc92ea410c396594fcd79f5d4491fe6a8cc90':
  vc1dec: move setting repeat_pict after frame_start() has been called.

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 03:55:12 +01:00
Anton Khirnov
66499f34b5 mpegvideo: do not set current_picture_ptr in decoders
This code was originally added in
5f1948111a to h263 to set decoded frame
pts to some random numbers (removed in
a1c5cc429d) and then cargo culted to other
decoders.

The code is left in h263dec for now, since some part of the decoder
(apparently OBMC) relies on the specific previous frame to be reused.
2013-12-05 13:28:05 +01:00
Anton Khirnov
ac1fc92ea4 vc1dec: move setting repeat_pict after frame_start() has been called.
This will allow removing the hacks where each decoder sets
current_picture_ptr on its own.
2013-12-05 13:27:24 +01:00
Michael Niedermayer
d7fbb63122 Merge commit 'de4ec972c06d9047bc1b73bb13f858a5d77d8df0'
* commit 'de4ec972c06d9047bc1b73bb13f858a5d77d8df0':
  vc1: fix a memleak.

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 12:28:49 +01:00
Anton Khirnov
de4ec972c0 vc1: fix a memleak.
Happens on a B-frame when neither low_delay nor last_picture_ptr is set
(probably corrupted streams only).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2013-11-21 20:57:36 +01:00
Michael Niedermayer
92cbd77568 Merge commit 'd48c20630214a4effcc920e93a5044bee4e2002e'
* commit 'd48c20630214a4effcc920e93a5044bee4e2002e':
  qtrleenc: use the AVFrame API properly.
  ulti: use the AVFrame API properly.
  vc1: use the AVFrame API properly.
  flashsv: use the AVFrame API properly.

Conflicts:
	libavcodec/flashsv.c
	libavcodec/qtrleenc.c
	libavcodec/ulti.c
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-17 03:31:32 +01:00
Anton Khirnov
6792559f8a vc1: use the AVFrame API properly. 2013-11-16 17:44:40 +01:00
Michael Niedermayer
91e00c4a78 Merge commit '458446acfa1441d283dacf9e6e545beb083b8bb0'
* commit '458446acfa1441d283dacf9e6e545beb083b8bb0':
  lavc: Edge emulation with dst/src linesize

Conflicts:
	libavcodec/cavs.c
	libavcodec/h264.c
	libavcodec/hevc.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_motion.c
	libavcodec/rv34.c
	libavcodec/svq3.c
	libavcodec/vc1dec.c
	libavcodec/videodsp.h
	libavcodec/videodsp_template.c
	libavcodec/vp3.c
	libavcodec/vp8.c
	libavcodec/wmv2.c
	libavcodec/x86/videodsp.asm
	libavcodec/x86/videodsp_init.c

Changes to the asm are not merged, they are left for volunteers or
in their absence for later.
The changes this merge introduces are reordering of the function
arguments

See: face578d56
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-15 15:07:10 +01:00
Ronald S. Bultje
458446acfa lavc: Edge emulation with dst/src linesize
Allow supporting files for which the image stride is smaller than
the maximum block size + number of subpel mc taps, e.g. a 64x64 VP9
file or a 16x16 VP8 file with -fflags +emu_edge.
2013-11-15 10:16:27 +01:00
Michael Niedermayer
78e150c5e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  hwaccel: Simplify ff_find_hwaccel

Conflicts:
	libavcodec/mpeg12dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-10 17:37:51 +01:00
Luca Barbato
08303d7741 hwaccel: Simplify ff_find_hwaccel
It is always called by passing fields from an AVCodecContext.
2013-11-10 13:59:48 +01:00
Michael Niedermayer
2c7c2a53b9 vcodec/vc1dec: remove dead code
Fixes CID732196

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 13:34:35 +01:00
Michael Niedermayer
1e2ab98460 avcodec/vc1dec: use logical operation instead of bitwise for twomv
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-23 14:32:04 +02:00
Clément Bœsch
b46f19100b cosmetics: group remaining .name and .long_name.
See b2bed9325.
2013-10-04 13:33:20 +00:00
Michael Niedermayer
ee77140afa Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
  cosmetics: Group .name and .long_name together in codec/format declarations

Conflicts:
	libavcodec/8svx.c
	libavcodec/alac.c
	libavcodec/cljr.c
	libavcodec/dnxhddec.c
	libavcodec/dnxhdenc.c
	libavcodec/dpxenc.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/dvdsubenc.c
	libavcodec/ffv1dec.c
	libavcodec/flacdec.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/g726.c
	libavcodec/gif.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/h263dec.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopencore-amr.c
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/libspeexenc.c
	libavcodec/libvo-amrwbenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/libxavs.c
	libavcodec/libxvid.c
	libavcodec/ljpegenc.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpeg4videodec.c
	libavcodec/msmpeg4dec.c
	libavcodec/pgssubdec.c
	libavcodec/pngdec.c
	libavcodec/pngenc.c
	libavcodec/proresdec_lgpl.c
	libavcodec/proresenc_kostya.c
	libavcodec/ra144enc.c
	libavcodec/rawdec.c
	libavcodec/rv10.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tta.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/wavpack.c
	libavcodec/xbmenc.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 12:34:23 +02:00
Diego Biurrun
b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Ronald S. Bultje
face578d56 Rewrite emu_edge functions to have separate src/dst_stride arguments.
This allows supporting files for which the image stride is smaller than
the max. block size + number of subpel mc taps, e.g. a 64x64 VP9 file
or a 16x16 VP8 file with -fflags +emu_edge.
2013-09-28 20:28:08 -04:00
Michael Niedermayer
356031348c avcodec/vc1dec: fix propagating error codes from various functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:57:30 +02:00
Michael Niedermayer
a51f3b53fe avcodec/vc1dec: Fix return code on malloc() failure from ff_vc1_decode_init_alloc_tables()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:54:57 +02:00
Michael Niedermayer
50138a9235 Merge commit '23d6ba2c44540eb39c6880e4cbd527d297d264a9'
* commit '23d6ba2c44540eb39c6880e4cbd527d297d264a9':
  vc1dec: Check the error handling flags on slice/field header decode errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:34:36 +02:00
Michael Niedermayer
c74fa39b93 Merge commit 'bb7bf175951475235ee7d0504198c4a30cf5d5dd'
* commit 'bb7bf175951475235ee7d0504198c4a30cf5d5dd':
  vc1dec: Don't decode slices when the latest slice header failed to decode

Conflicts:
	libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:03:53 +02:00
Michael Niedermayer
79fbd7a5c1 Merge commit '5e25fdbfe01635cfc650ac4adc27d434b2df0d64'
* commit '5e25fdbfe01635cfc650ac4adc27d434b2df0d64':
  vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks

See: 09de0ffeab
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 13:57:15 +02:00
Michael Niedermayer
8b85d9bfb6 Merge commit 'b772b0e28eba6abf76d86ee8c6e459a86642db5a'
* commit 'b772b0e28eba6abf76d86ee8c6e459a86642db5a':
  vc1dec: Undo mpegvideo initialization if unable to allocate tables

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 13:44:37 +02:00
Michael Niedermayer
eed40b2957 Merge commit 'ede508443e4bf57dc1e019fac81bf6244b88fbd3'
* commit 'ede508443e4bf57dc1e019fac81bf6244b88fbd3':
  vc1dec: Fix leaks in ff_vc1_decode_init_alloc_tables on errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 13:29:58 +02:00
Martin Storsjö
23d6ba2c44 vc1dec: Check the error handling flags on slice/field header decode errors
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Michael Niedermayer
bb7bf17595 vc1dec: Don't decode slices when the latest slice header failed to decode
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
5e25fdbfe0 vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
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>
2013-09-22 21:02:47 +03:00
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>
2013-09-22 16:10:22 +03:00
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