Michael Niedermayer
abe3f79d62
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
mpeg12dec: do not add stereo3D side data to a non-existing frame
Conflicts:
libavcodec/mpeg12dec.c
See: fe285b04bb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-14 04:11:37 +01:00
Janne Grunau
73eca738ac
mpeg12dec: do not add stereo3D side data to a non-existing frame
...
User data is usually coded before slice data. That means the frame
the user data belongs to is not available while parsing the user data.
The stereo3D side data has to use the same indirection over the private
context as pan scan information and A53 captions.
Bug-Id:632
2014-02-13 13:03:01 +01:00
Michael Niedermayer
acd7505351
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
mpeg: K&R formatting cosmetics
Conflicts:
libavcodec/mpeg12dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-05 03:59:37 +01:00
Vittorio Giovara
a91d3658d9
mpeg: K&R formatting cosmetics
...
Also adjust header #include order and some comments.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-04 22:29:53 +01:00
Michael Niedermayer
7667afffb8
avcodec/mpeg12dec: Revert Change to mpeg2_fast_decode_block_non_intra
...
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index
Before:
1823 decicycles in mpeg2_fast_decode_block_non_intra, 8388493 runs, 115 skips
After:
1808 decicycles in mpeg2_fast_decode_block_non_intra, 8388494 runs, 114 skips
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:57:40 +01:00
Michael Niedermayer
6a92598e14
avcodec/mpeg12dec: Redesign index checks for mpeg2_fast_decode_block_intra
...
This fixes the speed regression from 20626f53e9
and still checks sufficiently to prevent out of allocated memory accesses
due to the index
Before:
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
After:
1658 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:57:29 +01:00
Michael Niedermayer
20626f53e9
Merge commit '6d93307f8df81808f0dcdbc064b848054a6e83b3'
...
* commit '6d93307f8df81808f0dcdbc064b848054a6e83b3':
mpeg12: check scantable indices in all decode_block functions
Benchmarks
Before:
1878 decicycles in mpeg2_decode_block_non_intra, 8388487 runs, 121 skips
1700 decicycles in mpeg2_decode_block_intra, 4194239 runs, 65 skips
1808 decicycles in mpeg2_fast_decode_block_non_intra, 8388492 runs, 116 skips
1669 decicycles in mpeg2_fast_decode_block_intra, 4194248 runs, 56 skips
--
2056 decicycles in mpeg1_decode_block_inter, 65535 runs, 1 skips
2346 decicycles in mpeg1_decode_block_intra, 32768 runs, 0 skips
2011 decicycles in mpeg1_fast_decode_block_inter, 65533 runs, 3 skips
----------------
After:
1858 decicycles in mpeg2_decode_block_non_intra, 8388490 runs, 118 skips
1691 decicycles in mpeg2_decode_block_intra, 4194233 runs, 71 skips
1823 decicycles in mpeg2_fast_decode_block_non_intra, 8388493 runs, 115 skips
1681 decicycles in mpeg2_fast_decode_block_intra, 4194238 runs, 66 skips
--
2010 decicycles in mpeg1_decode_block_inter, 65535 runs, 1 skips
2322 decicycles in mpeg1_decode_block_intra, 32766 runs, 2 skips
1995 decicycles in mpeg1_fast_decode_block_inter, 65535 runs, 1 skips
All benchmarks are the best scores of several runs
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 02:52:21 +01:00
Janne Grunau
6d93307f8d
mpeg12: check scantable indices in all decode_block functions
...
Add checks to the fast functions used with CODEC_FLAGS2_FAST and move
the check for all other functions to before the invalid memory is
accessed. Fixes https://trac.videolan.org/vlc/ticket/9713 with
CODEC_FLAGS2_FAST.
CC: libav-stable@libav.org
2014-01-25 21:50:20 +01:00
Michael Niedermayer
934bb11ad7
avcodec/mpeg12dec: fix mis-indented line
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:17 +01:00
Michael Niedermayer
5f54756f7e
avcodec/mpeg12dec: Disable the checked bitstream reader
...
Mpeg1/2 should not need it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:17 +01:00
Michael Niedermayer
76b5e99ce9
avcodec/mpeg12dec: Check for overread in mpeg_decode_slice()
...
This is needed in case the checked bitstream reader is disabled
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:17 +01:00
Michael Niedermayer
d82eccea2b
avcodec/mpeg12dec: check block index in mpeg2_fast_decode_block_non_intra()
...
Prevents some overreads at the cost of 1 cpu cycle
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Michael Niedermayer
0c8e5fb211
avcodec/mpeg12dec: Optimize mpeg1_decode_block_intra()
...
sandybridge i7 274->260 cycles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Michael Niedermayer
0a59055167
avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()
...
No speedloss meassured
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Michael Niedermayer
746350ea0f
avcodec/mpeg12dec: Make mpeg2_fast_decode_block_intra() more robust by breaking out on invalid vlcs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-24 18:09:16 +01:00
Carl Eugen Hoyos
c892621577
Fix compilation with --disable-hwaccel=mpeg1_xvmc,mpeg2_xvmc
2014-01-20 11:20:46 +01:00
Ivan Kalvachev
1c63aed232
Convert XvMC to hwaccel v3
...
Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-22 22:03:47 +01:00
Tomer Barletz
fe285b04bb
avcodec/mpeg12dec: Don't create side data when current picture ptr is NULL.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-16 03:25:44 +01:00
Michael Niedermayer
1dab49c344
Merge commit 'bacc2869f37b17b2a89e1083289fdaf7f95f27bc'
...
* commit 'bacc2869f37b17b2a89e1083289fdaf7f95f27bc':
mpeg12dec: parse frame packing arrangement user_data and save relevant stereo3d information
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 22:10:57 +01:00
Vittorio Giovara
bacc2869f3
mpeg12dec: parse frame packing arrangement user_data and save relevant stereo3d information
2013-12-09 16:02:43 +01:00
Michael Niedermayer
db7580b4f6
Merge commit 'a097f0049b28dc3ed13625e4a42619292c92492f'
...
* commit 'a097f0049b28dc3ed13625e4a42619292c92492f':
mpeg12dec: move first_slice from MpegEncContext to Mpeg1Context
Conflicts:
libavcodec/mpeg12dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-06 01:33:17 +01:00
Anton Khirnov
a097f0049b
mpeg12dec: move first_slice from MpegEncContext to Mpeg1Context
2013-12-05 13:22:03 +01:00
Michael Niedermayer
625b29037e
Merge commit '1eaac1d6f7bb8e52d82e1a114c88a59a9a8e5025'
...
* commit '1eaac1d6f7bb8e52d82e1a114c88a59a9a8e5025':
mpeg12dec: Extract CC user data into frame side data
Conflicts:
doc/APIchanges
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-26 13:00:46 +01:00
John Stebbins
1eaac1d6f7
mpeg12dec: Extract CC user data into frame side data
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-26 08:37:22 +01:00
Michael Niedermayer
1ac4797d19
Merge commit '7b9780e7bf9d86e3e4e9606a971bb2d0d718bac2'
...
* commit '7b9780e7bf9d86e3e4e9606a971bb2d0d718bac2':
mpeg12dec: Remove unused swap_uv member from Mpeg1Context
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 15:24:30 +01:00
Diego Biurrun
ad1161799e
mpeg12dec: Remove outdated UV swapping code for VCR2
2013-11-14 14:21:27 +01:00
Diego Biurrun
7b9780e7bf
mpeg12dec: Remove unused swap_uv member from Mpeg1Context
2013-11-14 12:46:00 +01:00
Diego Biurrun
3215140425
mpeg12dec: Remove incomplete and wrong UV swapping code for VCR2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 08:19:29 +01:00
Michael Niedermayer
5231eecdaf
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
Deprecate obsolete XvMC hardware decoding support
Conflicts:
libavcodec/mpeg12.c
libavcodec/mpeg12dec.c
libavcodec/mpegvideo.c
libavcodec/options_table.h
libavutil/pixdesc.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-14 03:26:35 +01:00
Diego Biurrun
19e30a58fc
Deprecate obsolete XvMC hardware decoding support
...
XvMC has long ago been superseded by newer acceleration APIs, such as
VDPAU, and few downstreams still support it. Furthermore XvMC is not
implemented within the hwaccel framework, but requires its own specific
code in the MPEG-1/2 decoder, which is a maintenance burden.
2013-11-13 21:07:45 +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
64a0ed190e
Merge commit '13207484bba8a8b78b40d5a22da8c9c555429089'
...
* commit '13207484bba8a8b78b40d5a22da8c9c555429089':
mpeg4video_parser: stop using deprecated avcodec_set_dimensions
mpeg12dec: stop using deprecated avcodec_set_dimensions
mjpegdec: stop using deprecated avcodec_set_dimensions
libvpxdec: stop using deprecated avcodec_set_dimensions
Conflicts:
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpeg4video_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 15:14:52 +01:00
Anton Khirnov
6c7254722a
mpeg12dec: stop using deprecated avcodec_set_dimensions
2013-10-31 20:14:15 +01:00
Michael Niedermayer
18802942d1
avcodec/mpeg12dec: Use skip_1stop_8data_bits()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-30 21:29:21 +01:00
Michael Niedermayer
e1848aa469
avcodec/mpeg12dec: forward errors when EXPLODE is set
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-30 02:08:34 +01: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
Michael Niedermayer
108b91c3fe
avcodec/mpeg12dec: clear mpeg_enc_ctx_allocated when contexts are deallocated
...
Fixes Ticket2950
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-14 00:31:40 +02:00
Michael Niedermayer
70967a60df
mpeg12dec: also print progressive seq and chroma format
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 13:55:57 +02: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
dbcee7cc5c
Merge commit '38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3'
...
* commit '38f64c03301ac66d7b54b3e4bd2bf6454f9fb2d3':
mpeg12decdata.h: Move all tables to the only place they are used
Conflicts:
libavcodec/mpeg12decdata.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 13:13:58 +02:00
Diego Biurrun
38f64c0330
mpeg12decdata.h: Move all tables to the only place they are used
2013-08-15 14:38:03 +02:00
Michael Niedermayer
9706401927
avcodec/mpeg12dec: check slice size before trying to decode it
...
Fixes assertion failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 19:36:50 +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
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
Michael Niedermayer
5dc2c99055
Merge commit '93a51984a27f3ba84d4e6f13d0c704ee9891603e'
...
* commit '93a51984a27f3ba84d4e6f13d0c704ee9891603e':
mpeg12: Ignore slice threading if hwaccel is active
Conflicts:
libavcodec/mpeg12dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-26 10:57:51 +02:00
Rémi Denis-Courmont
93a51984a2
mpeg12: Ignore slice threading if hwaccel is active
...
Slice threading does not work with hardware acceleration, as decoding
is per-picture. This fixes Bugzilla #542 .
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-07-25 19:43:32 +02:00
Michael Niedermayer
101c7ea906
avcodec/mpeg12dec: remove commented out assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-24 13:00:04 +02:00